!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.on("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.off("mousewheel",a)}})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).LazyLoad=t()}(this,(function(){"use strict";const e="undefined"!=typeof window,t=e&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=e&&window.devicePixelRatio>1,n={elements_selector:".lazy",container:t||e?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},s=e=>Object.assign({},n,e),l=function(e,t){let a;const n="LazyLoad::Initialized",s=new e(t);try{a=new CustomEvent(n,{detail:{instance:s}})}catch(e){a=document.createEvent("CustomEvent"),a.initCustomEvent(n,!1,!1,{instance:s})}window.dispatchEvent(a)},o="src",r="srcset",i="sizes",d="poster",c="llOriginalAttrs",_="data",u="loading",g="loaded",b="applied",h="error",m="native",p="data-",f="ll-status",v=(e,t)=>e.getAttribute(p+t),E=e=>v(e,f),I=(e,t)=>((e,t,a)=>{const n=p+t;null!==a?e.setAttribute(n,a):e.removeAttribute(n)})(e,f,t),y=e=>I(e,null),k=e=>null===E(e),A=e=>E(e)===m,L=[u,g,b,h],w=(e,t,a,n)=>{e&&"function"==typeof e&&(void 0===n?void 0===a?e(t):e(t,a):e(t,a,n))},x=(t,a)=>{e&&""!==a&&t.classList.add(a)},C=(t,a)=>{e&&""!==a&&t.classList.remove(a)},O=e=>e.llTempImage,M=(e,t)=>{if(!t)return;const a=t._observer;a&&a.unobserve(e)},z=(e,t)=>{e&&(e.loadingCount+=t)},N=(e,t)=>{e&&(e.toLoadCount=t)},T=e=>{let t=[];for(let a,n=0;a=e.children[n];n+=1)"SOURCE"===a.tagName&&t.push(a);return t},R=(e,t)=>{const a=e.parentNode;a&&"PICTURE"===a.tagName&&T(a).forEach(t)},G=(e,t)=>{T(e).forEach(t)},D=[o],H=[o,d],V=[o,r,i],F=[_],j=e=>!!e[c],B=e=>e[c],J=e=>delete e[c],S=(e,t)=>{if(j(e))return;const a={};t.forEach((t=>{a[t]=e.getAttribute(t)})),e[c]=a},P=(e,t)=>{if(!j(e))return;const a=B(e);t.forEach((t=>{((e,t,a)=>{a?e.setAttribute(t,a):e.removeAttribute(t)})(e,t,a[t])}))},U=(e,t,a)=>{x(e,t.class_applied),I(e,b),a&&(t.unobserve_completed&&M(e,t),w(t.callback_applied,e,a))},$=(e,t,a)=>{x(e,t.class_loading),I(e,u),a&&(z(a,1),w(t.callback_loading,e,a))},q=(e,t,a)=>{a&&e.setAttribute(t,a)},K=(e,t)=>{q(e,i,v(e,t.data_sizes)),q(e,r,v(e,t.data_srcset)),q(e,o,v(e,t.data_src))},Q={IMG:(e,t)=>{R(e,(e=>{S(e,V),K(e,t)})),S(e,V),K(e,t)},IFRAME:(e,t)=>{S(e,D),q(e,o,v(e,t.data_src))},VIDEO:(e,t)=>{G(e,(e=>{S(e,D),q(e,o,v(e,t.data_src))})),S(e,H),q(e,d,v(e,t.data_poster)),q(e,o,v(e,t.data_src)),e.load()},OBJECT:(e,t)=>{S(e,F),q(e,_,v(e,t.data_src))}},W=["IMG","IFRAME","VIDEO","OBJECT"],X=(e,t)=>{!t||(e=>e.loadingCount>0)(t)||(e=>e.toLoadCount>0)(t)||w(e.callback_finish,t)},Y=(e,t,a)=>{e.addEventListener(t,a),e.llEvLisnrs[t]=a},Z=(e,t,a)=>{e.removeEventListener(t,a)},ee=e=>!!e.llEvLisnrs,te=e=>{if(!ee(e))return;const t=e.llEvLisnrs;for(let a in t){const n=t[a];Z(e,a,n)}delete e.llEvLisnrs},ae=(e,t,a)=>{(e=>{delete e.llTempImage})(e),z(a,-1),(e=>{e&&(e.toLoadCount-=1)})(a),C(e,t.class_loading),t.unobserve_completed&&M(e,a)},ne=(e,t,a)=>{const n=O(e)||e;ee(n)||((e,t,a)=>{ee(e)||(e.llEvLisnrs={});const n="VIDEO"===e.tagName?"loadeddata":"load";Y(e,n,t),Y(e,"error",a)})(n,(s=>{((e,t,a,n)=>{const s=A(t);ae(t,a,n),x(t,a.class_loaded),I(t,g),w(a.callback_loaded,t,n),s||X(a,n)})(0,e,t,a),te(n)}),(s=>{((e,t,a,n)=>{const s=A(t);ae(t,a,n),x(t,a.class_error),I(t,h),w(a.callback_error,t,n),a.restore_on_error&&P(t,V),s||X(a,n)})(0,e,t,a),te(n)}))},se=(e,t,n)=>{(e=>W.indexOf(e.tagName)>-1)(e)?((e,t,a)=>{ne(e,t,a),((e,t,a)=>{const n=Q[e.tagName];n&&(n(e,t),$(e,t,a))})(e,t,a)})(e,t,n):((e,t,n)=>{(e=>{e.llTempImage=document.createElement("IMG")})(e),ne(e,t,n),(e=>{j(e)||(e[c]={backgroundImage:e.style.backgroundImage})})(e),((e,t,n)=>{const s=v(e,t.data_bg),l=v(e,t.data_bg_hidpi),r=a&&l?l:s;r&&(e.style.backgroundImage=`url("${r}")`,O(e).setAttribute(o,r),$(e,t,n))})(e,t,n),((e,t,n)=>{const s=v(e,t.data_bg_multi),l=v(e,t.data_bg_multi_hidpi),o=a&&l?l:s;o&&(e.style.backgroundImage=o,U(e,t,n))})(e,t,n),((e,t,a)=>{const n=v(e,t.data_bg_set);if(!n)return;let s=n.split("|").map((e=>`image-set(${e})`));e.style.backgroundImage=s.join(),U(e,t,a)})(e,t,n)})(e,t,n)},le=e=>{e.removeAttribute(o),e.removeAttribute(r),e.removeAttribute(i)},oe=e=>{R(e,(e=>{P(e,V)})),P(e,V)},re={IMG:oe,IFRAME:e=>{P(e,D)},VIDEO:e=>{G(e,(e=>{P(e,D)})),P(e,H),e.load()},OBJECT:e=>{P(e,F)}},ie=(e,t)=>{(e=>{const t=re[e.tagName];t?t(e):(e=>{if(!j(e))return;const t=B(e);e.style.backgroundImage=t.backgroundImage})(e)})(e),((e,t)=>{k(e)||A(e)||(C(e,t.class_entered),C(e,t.class_exited),C(e,t.class_applied),C(e,t.class_loading),C(e,t.class_loaded),C(e,t.class_error))})(e,t),y(e),J(e)},de=["IMG","IFRAME","VIDEO"],ce=e=>e.use_native&&"loading"in HTMLImageElement.prototype,_e=(e,t,a)=>{e.forEach((e=>(e=>e.isIntersecting||e.intersectionRatio>0)(e)?((e,t,a,n)=>{const s=(e=>L.indexOf(E(e))>=0)(e);I(e,"entered"),x(e,a.class_entered),C(e,a.class_exited),((e,t,a)=>{t.unobserve_entered&&M(e,a)})(e,a,n),w(a.callback_enter,e,t,n),s||se(e,a,n)})(e.target,e,t,a):((e,t,a,n)=>{k(e)||(x(e,a.class_exited),((e,t,a,n)=>{a.cancel_on_exit&&(e=>E(e)===u)(e)&&"IMG"===e.tagName&&(te(e),(e=>{R(e,(e=>{le(e)})),le(e)})(e),oe(e),C(e,a.class_loading),z(n,-1),y(e),w(a.callback_cancel,e,t,n))})(e,t,a,n),w(a.callback_exit,e,t,n))})(e.target,e,t,a)))},ue=e=>Array.prototype.slice.call(e),ge=e=>e.container.querySelectorAll(e.elements_selector),be=e=>(e=>E(e)===h)(e),he=(e,t)=>(e=>ue(e).filter(k))(e||ge(t)),me=function(t,a){const n=s(t);this._settings=n,this.loadingCount=0,((e,t)=>{ce(e)||(t._observer=new IntersectionObserver((a=>{_e(a,e,t)}),(e=>({root:e.container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}))(e)))})(n,this),((t,a)=>{e&&(a._onlineHandler=()=>{((e,t)=>{var a;(a=ge(e),ue(a).filter(be)).forEach((t=>{C(t,e.class_error),y(t)})),t.update()})(t,a)},window.addEventListener("online",a._onlineHandler))})(n,this),this.update(a)};return me.prototype={update:function(e){const a=this._settings,n=he(e,a);var s,l;N(this,n.length),t?this.loadAll(n):ce(a)?((e,t,a)=>{e.forEach((e=>{-1!==de.indexOf(e.tagName)&&((e,t,a)=>{e.setAttribute("loading","lazy"),ne(e,t,a),((e,t)=>{const a=Q[e.tagName];a&&a(e,t)})(e,t),I(e,m)})(e,t,a)})),N(a,0)})(n,a,this):(l=n,(e=>{e.disconnect()})(s=this._observer),((e,t)=>{t.forEach((t=>{e.observe(t)}))})(s,l))},destroy:function(){this._observer&&this._observer.disconnect(),e&&window.removeEventListener("online",this._onlineHandler),ge(this._settings).forEach((e=>{J(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){const t=this._settings;he(e,t).forEach((e=>{M(e,this),se(e,t,this)}))},restoreAll:function(){const e=this._settings;ge(e).forEach((t=>{ie(t,e)}))}},me.load=(e,t)=>{const a=s(t);se(e,a)},me.resetStatus=e=>{y(e)},e&&((e,t)=>{if(t)if(t.length)for(let a,n=0;a=t[n];n+=1)l(e,a);else l(e,t)})(me,window.lazyLoadOptions),me}));
(function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)})(function(a){function b(){var b,c,e={height:d.innerHeight,width:d.innerWidth};return e.height||(b=k.compatMode,(b||!a.support.boxModel)&&(c="CSS1Compat"===b?l:k.body,e={height:c.clientHeight,width:c.clientWidth})),e}function c(){return{top:d.pageYOffset||l.scrollTop||k.body.scrollTop,left:d.pageXOffset||l.scrollLeft||k.body.scrollLeft}}function e(){if(j.length){var d=0,e=a.map(j,function(a){var b=a.data.selector,c=a.$element;return b?c.find(b):c});for(f=f||b(),g=g||c();d<j.length;d++)if("undefined"!=typeof e[d]&&a.contains(l,e[d][0])){var h=a(e[d]),k={height:h[0].offsetHeight,width:h[0].offsetWidth},m=h.offset(),n=h.data("inview");if(!g||!f)return;m.top+k.height>g.top&&m.top<g.top+f.height&&m.left+k.width>g.left&&m.left<g.left+f.width?!n&&h.data("inview",!0).trigger("inview",[!0]):n&&h.data("inview",!1).trigger("inview",[!1])}}}var f,g,h,j=[],k=document,d=window,l=k.documentElement;a.event.special.inview={add:function(b){j.push({data:b,$element:a(this),element:this}),!h&&j.length&&(h=setInterval(e,250))},remove:function(a){for(var b,c=0;c<j.length;c++)if(b=j[c],b.element===this&&b.data.guid===a.guid){j.splice(c,1);break}j.length||(clearInterval(h),h=null)}},a(d).on("scroll resize scrollstop",function(){f=g=null}),!l.addEventListener&&l.attachEvent&&l.attachEvent("onfocusin",function(){g=null})});
!function(m){m.fn.collagePlus=function(a){var d="rtl"===m("body").css("direction");return this.each(function(){var o=0,h=[],s=1,t=m(this);m.fn.collagePlus.defaults.albumWidth=t.width(),m.fn.collagePlus.defaults.padding=parseFloat(t.css("padding-left")),m.fn.collagePlus.defaults.images=t.children();var g=m.extend({},m.fn.collagePlus.defaults,a);g.images.each(function(t){var a=m(this),i=a.is("img")?a:m(this).find("img"),e=void 0!==i.data("width")?i.data("width"):i.width(),d=void 0!==i.data("height")?i.data("height"):i.height(),l=function(t){$img=m(t);var a=new Array;return a.w=parseFloat($img.css("border-left-width"))+parseFloat($img.css("border-right-width")),a.h=parseFloat($img.css("border-top-width"))+parseFloat($img.css("border-bottom-width")),a}(i);i.data("width",e),i.data("height",d);var n=Math.ceil(e/d*g.targetHeight),r=Math.ceil(g.targetHeight);h.push([this,n,r,l.w,l.h]),(o+=n+l.w+g.padding)>g.albumWidth&&0!=h.length&&(f(h,o-g.padding,g,s),delete o,delete h,o=0,h=[],s+=1),g.images.length-1==t&&0!=h.length&&(f(h,o,g,s),delete o,delete h,o=0,h=[],s+=1)})});function f(t,a,i,e){for(var d=i.padding*(t.length-1)+t.length*t[0][3],l=(i.albumWidth-d)/(a-d),n=d,r=a<i.albumWidth,o=0;o<t.length;o++){var h=m(t[o][0]),s=Math.floor(t[o][1]*l),g=Math.floor(t[o][2]*l),f=!!(o<t.length-1);!0===i.allowPartialLastRow&&!0==r&&(s=t[o][1],g=t[o][2]),n+=s,!f&&n<i.albumWidth&&(!0===i.allowPartialLastRow&&!0==r?s=s:s+=i.albumWidth-n),s--;var c=h.is("img")?h:h.find("img");c.width(s),h.is("img")||h.width(s+t[o][3]),c.height(g),h.is("img")||h.height(g+t[o][4]),u(h,f,i),c.one("load",function(a){return function(){var t;"default"==i.effect?a.animate({opacity:"1"},{duration:i.fadeSpeed}):(t="vertical"==i.direction?e<=10?e:10:o<=9?o+1:10,a.removeClass(function(t,a){return(a.match(/\beffect-\S+/g)||[]).join(" ")}),a.addClass(i.effect),a.addClass("effect-duration-"+t))}}(h)).each(function(){this.complete&&m(this).trigger("load")})}}function u(t,a,i){var e={"margin-bottom":i.padding+"px",display:i.display,"vertical-align":"bottom",overflow:"hidden"};return d?e["margin-left"]=a?i.padding+"px":"0px":e["margin-right"]=a?i.padding+"px":"0px",t.css(e)}},m.fn.collagePlus.defaults={targetHeight:400,fadeSpeed:"fast",display:"inline-block",effect:"default",direction:"vertical",allowPartialLastRow:!1}}(jQuery);
(function(e){e.fn.ddslick=function(l){if(c[l]){return c[l].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof l==="object"||!l){return c.init.apply(this,arguments)}else{e.error("Method "+l+" does not exists.")}}};var c={},d={data:[],keepJSONItemsOnTop:false,width:260,height:null,background:"#eee",selectText:"",defaultSelectedIndex:null,truncateDescription:true,imagePosition:"left",showSelectedHTML:true,clickOffToClose:true,embedCSS:true,onSelected:function(){}},i='<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>',a='<ul class="dd-options"></ul>',b='<style id="css-ddslick" type="text/css">.dd-select{ border-radius:2px; border:solid 1px #ccc; position:relative; cursor:pointer;}.dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }.dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}.dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}.dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }.dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}.dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}.dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }.dd-options > li:last-child > .dd-option{ border-bottom:none;}.dd-option:hover{ background:#f3f3f3; color:#000;}.dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }.dd-option-selected { background:#f6f6f6; }.dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}.dd-image-right { float:right; margin-right:15px; margin-left:5px;}.dd-container{ position:relative;}​ .dd-selected-text { font-weight:bold}​</style>';c.init=function(l){var l=e.extend({},d,l);if(e("#css-ddslick").length<=0&&l.embedCSS){e(b).appendTo("head")}return this.each(function(){var p=e(this),q=p.data("ddslick");if(!q){var n=[],o=l.data;p.find("option").each(function(){var w=e(this),v=w.data();n.push({text:e.trim(w.text()),value:w.val(),selected:w.is(":selected"),description:v.description,imageSrc:v.imagesrc})});if(l.keepJSONItemsOnTop){e.merge(l.data,n)}else{l.data=e.merge(n,l.data)}var m=p,s=e('<div id="'+p.attr("id")+'"></div>');p.replaceWith(s);p=s;p.addClass("dd-container").append(i).append(a);var n=p.find(".dd-select"),u=p.find(".dd-options");u.css({width:l.width});n.css({width:l.width,background:l.background});p.css({width:l.width});if(l.height!=null){u.css({height:l.height,overflow:"auto"})}e.each(l.data,function(v,w){if(w.selected){l.defaultSelectedIndex=v}u.append('<li><a class="dd-option">'+(w.value?' <input class="dd-option-value" type="hidden" value="'+w.value+'" />':"")+(w.imageSrc?' <img class="dd-option-image'+(l.imagePosition=="right"?" dd-image-right":"")+'" src="'+w.imageSrc+'" />':"")+(w.text?' <label class="dd-option-text">'+w.text+"</label>":"")+(w.description?' <small class="dd-option-description dd-desc">'+w.description+"</small>":"")+"</a></li>")});var t={settings:l,original:m,selectedIndex:-1,selectedItem:null,selectedData:null};p.data("ddslick",t);if(l.selectText.length>0&&l.defaultSelectedIndex==null){p.find(".dd-selected").html(l.selectText)}else{var r=(l.defaultSelectedIndex!=null&&l.defaultSelectedIndex>=0&&l.defaultSelectedIndex<l.data.length)?l.defaultSelectedIndex:0;j(p,r)}p.find(".dd-select").on("click.ddslick",function(){f(p)});p.find(".dd-option").on("click.ddslick",function(){j(p,e(this).closest("li").index())});if(l.clickOffToClose){u.addClass("dd-click-off-close");p.on("click.ddslick",function(v){v.stopPropagation()});e("body").on("click",function(){e(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up")})}}})};c.select=function(l){return this.each(function(){if(l.index!==undefined){j(e(this),l.index)}})};c.open=function(){return this.each(function(){var m=e(this),l=m.data("ddslick");if(l){f(m)}})};c.close=function(){return this.each(function(){var m=e(this),l=m.data("ddslick");if(l){k(m)}})};c.destroy=function(){return this.each(function(){var n=e(this),m=n.data("ddslick");if(m){var l=m.original;n.removeData("ddslick").off(".ddslick").replaceWith(l)}})};function j(q,s){var u=q.data("ddslick");var r=q.find(".dd-selected"),n=r.siblings(".dd-selected-value"),v=q.find(".dd-options"),l=r.siblings(".dd-pointer"),p=q.find(".dd-option").eq(s),m=p.closest("li"),o=u.settings,t=u.settings.data[s];q.find(".dd-option").removeClass("dd-option-selected");p.addClass("dd-option-selected");u.selectedIndex=s;u.selectedItem=m;u.selectedData=t;if(o.showSelectedHTML){r.html((t.imageSrc?'<img class="dd-selected-image'+(o.imagePosition=="right"?" dd-image-right":"")+'" src="'+t.imageSrc+'" />':"")+(t.text?'<label class="dd-selected-text">'+t.text+"</label>":"")+(t.description?'<small class="dd-selected-description dd-desc'+(o.truncateDescription?" dd-selected-description-truncated":"")+'" >'+t.description+"</small>":""))}else{r.html(t.text)}n.val(t.value);u.original.val(t.value);q.data("ddslick",u);k(q);g(q);if(typeof o.onSelected=="function"){o.onSelected.call(this,u)}}function f(p){var o=p.find(".dd-select"),m=o.siblings(".dd-options"),l=o.find(".dd-pointer"),n=m.is(":visible");e(".dd-click-off-close").not(m).slideUp(50);e(".dd-pointer").removeClass("dd-pointer-up");if(n){m.slideUp("fast");l.removeClass("dd-pointer-up")}else{m.slideDown("fast");l.addClass("dd-pointer-up")}h(p)}function k(l){l.find(".dd-options").slideUp(50);l.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up")}function g(o){var n=o.find(".dd-select").css("height");var m=o.find(".dd-selected-description");var l=o.find(".dd-selected-image");if(m.length<=0&&l.length>0){o.find(".dd-selected-text").css("lineHeight",n)}}function h(l){l.find(".dd-option").each(function(){var p=e(this);var n=p.css("height");var o=p.find(".dd-option-description");var m=l.find(".dd-option-image");if(o.length<=0&&m.length>0){p.find(".dd-option-text").css("lineHeight",n)}})}})(jQuery);
(function(a){a.fn.removeWhitespace=function(){this.contents().filter(function(){return this.nodeType==3&&!/\S/.test(this.nodeValue)}).remove();return this}})(jQuery)
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function w(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:w(b(e))}function x(e,n){var r;void 0===n&&(n=[]);var o=w(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(x(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _(e,r,o){return r===H?I(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):I(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function F(e,t,o,s){var f="clippingParents"===t?function(e){var t=x(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&N(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=_(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),_(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?C(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,w=Y("number"!=typeof b?b:G(b,k)),x=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?x:m],E=F(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=I(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+w.top,bottom:B.bottom-E.bottom+w.bottom,left:E.left-B.left+w.left,right:B.right-E.right+w.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?x(e):e.contextElement?x(e.contextElement):[],popper:x(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,w="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var x=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:s(t*r)/r||0,y:s(n*r)/r||0}}({x:y,y:b}):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=x?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=x?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:C(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=C(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[C(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=C(v),g=f||(y===v||!h?[fe(v)]:function(e){if(C(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(C(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=C(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;w[S]>x[S]&&(q=fe(q));var N=fe(q),I=[];if(i&&I.push(V[H]<=0),s&&I.push(V[q]<=0,V[N]<=0),I.every((function(e){return e}))){E=B,j=!1;break}O.set(B,I)}if(j)for(var _=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===_(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),w=C(t.placement),x=U(t.placement),O=!x,j=z(w),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,N="y"===j?D:P,I="y"===j?A:L,_="y"===j?"height":"width",F=k[j],X=F+b[N],Y=F-b[I],G=m?-H[_]/2:0,K=x===W?B[_]:H[_],Q=x===W?-H[_]:-B[_],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[N],ne=ee[I],re=de(0,B[_],$[_]),oe=O?B[_]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[_]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=F+ie-fe,pe=de(m?a(X,F+oe-fe-se):X,F,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-F}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(w),we=null!=(ue=null==S?void 0:S[M])?ue:0,xe=be?ye:me-B[ve]-H[ve]-we+R.altAxis,Oe=be?me+B[ve]+H[ve]-we-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(xe,me,Oe):de(m?xe:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=C(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,w=p[l],x=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(w,O,x),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&N(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),we=[ee,te,oe,ie,ae,le,he,me,ge],xe=Z({defaultModifiers:we});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=xe,e.createPopperLite=be,e.defaultModifiers=we,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=!!e&&!!window.msCrypto,r={passive:!0,capture:!0},o=function(){return document.body};function i(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return"function"==typeof t?t.apply(void 0,e):t}function u(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function p(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t){return t.split("-")[0]}function d(t){return[].slice.call(t)}function v(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function m(){return document.createElement("div")}function g(t){return["Element","Fragment"].some((function(e){return a(t,e)}))}function h(t){return a(t,"MouseEvent")}function b(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function y(t){return g(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function w(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function x(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function E(t){var e,n=c(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function O(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function C(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var T={isTouch:!1},A=0;function L(){T.isTouch||(T.isTouch=!0,window.performance&&document.addEventListener("mousemove",D))}function D(){var t=performance.now();t-A<20&&(T.isTouch=!1,document.removeEventListener("mousemove",D)),A=t}function k(){var t=document.activeElement;if(b(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var R=Object.assign({appendTo:o,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),P=Object.keys(R);function j(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=R[o])?r:i);return e}),{});return Object.assign({},t,e)}function M(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(j(Object.assign({},R,{plugins:e}))):P).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function V(t,e){t.innerHTML=e}function I(t){var e=m();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",g(t)?e.appendChild(t):V(e,t)),e}function S(t,e){g(e.content)?(V(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?V(t,e.content):t.textContent=e.content)}function B(t){var e=t.firstElementChild,n=d(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function N(t){var e=m(),n=m();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=m();function o(n,r){var o=B(e),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||S(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(I(r.arrow))):i.appendChild(I(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),S(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}N.$$tippy=!0;var H=1,U=[],_=[];function z(e,a){var p,g,b,y,A,L,D,k,P=M(e,Object.assign({},R,j(v(a)))),V=!1,I=!1,S=!1,N=!1,z=[],F=u(wt,P.interactiveDebounce),W=H++,X=(k=P.plugins).filter((function(t,e){return k.indexOf(t)===e})),Y={id:W,reference:e,popper:m(),popperInstance:null,props:P,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:X,clearDelayTimeouts:function(){clearTimeout(p),clearTimeout(g),cancelAnimationFrame(b)},setProps:function(t){if(Y.state.isDestroyed)return;at("onBeforeUpdate",[Y,t]),bt();var n=Y.props,r=M(e,Object.assign({},n,v(t),{ignoreAttributes:!0}));Y.props=r,ht(),n.interactiveDebounce!==r.interactiveDebounce&&(pt(),F=u(wt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");ut(),it(),J&&J(n,r);Y.popperInstance&&(Ct(),At().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));at("onAfterUpdate",[Y,t])},setContent:function(t){Y.setProps({content:t})},show:function(){var t=Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=T.isTouch&&!Y.props.touch,a=i(Y.props.duration,0,R.duration);if(t||e||n||r)return;if(et().hasAttribute("disabled"))return;if(at("onShow",[Y],!1),!1===Y.props.onShow(Y))return;Y.state.isVisible=!0,tt()&&($.style.visibility="visible");it(),dt(),Y.state.isMounted||($.style.transition="none");if(tt()){var u=rt(),p=u.box,c=u.content;w([p,c],0)}L=function(){var t;if(Y.state.isVisible&&!N){if(N=!0,$.offsetHeight,$.style.transition=Y.props.moveTransition,tt()&&Y.props.animation){var e=rt(),n=e.box,r=e.content;w([n,r],a),x([n,r],"visible")}st(),ut(),f(_,Y),null==(t=Y.popperInstance)||t.forceUpdate(),at("onMount",[Y]),Y.props.animation&&tt()&&function(t,e){mt(t,e)}(a,(function(){Y.state.isShown=!0,at("onShown",[Y])}))}},function(){var t,e=Y.props.appendTo,n=et();t=Y.props.interactive&&e===o||"parent"===e?n.parentNode:s(e,[n]);t.contains($)||t.appendChild($);Y.state.isMounted=!0,Ct()}()},hide:function(){var t=!Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=i(Y.props.duration,1,R.duration);if(t||e||n)return;if(at("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,N=!1,V=!1,tt()&&($.style.visibility="hidden");if(pt(),vt(),it(!0),tt()){var o=rt(),a=o.box,s=o.content;Y.props.animation&&(w([a,s],r),x([a,s],"hidden"))}st(),ut(),Y.props.animation?tt()&&function(t,e){mt(t,(function(){!Y.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(r,Y.unmount):Y.unmount()},hideWithInteractivity:function(t){nt().addEventListener("mousemove",F),f(U,F),F(t)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Tt(),At().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);_=_.filter((function(t){return t!==Y})),Y.state.isMounted=!1,at("onHidden",[Y])},destroy:function(){if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),bt(),delete e._tippy,Y.state.isDestroyed=!0,at("onDestroy",[Y])}};if(!P.render)return Y;var q=P.render(Y),$=q.popper,J=q.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+Y.id,Y.popper=$,e._tippy=Y,$._tippy=Y;var G=X.map((function(t){return t.fn(Y)})),K=e.hasAttribute("aria-expanded");return ht(),ut(),it(),at("onCreate",[Y]),P.showOnCreate&&Lt(),$.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&nt().addEventListener("mousemove",F)})),Y;function Q(){var t=Y.props.touch;return Array.isArray(t)?t:[t,0]}function Z(){return"hold"===Q()[0]}function tt(){var t;return!(null==(t=Y.props.render)||!t.$$tippy)}function et(){return D||e}function nt(){var t=et().parentNode;return t?E(t):document}function rt(){return B($)}function ot(t){return Y.state.isMounted&&!Y.state.isVisible||T.isTouch||y&&"focus"===y.type?0:i(Y.props.delay,t?0:1,R.delay)}function it(t){void 0===t&&(t=!1),$.style.pointerEvents=Y.props.interactive&&!t?"":"none",$.style.zIndex=""+Y.props.zIndex}function at(t,e,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(r=Y.props)[t].apply(r,e)}function st(){var t=Y.props.aria;if(t.content){var n="aria-"+t.content,r=$.id;c(Y.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(Y.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function ut(){!K&&Y.props.aria.expanded&&c(Y.props.triggerTarget||e).forEach((function(t){Y.props.interactive?t.setAttribute("aria-expanded",Y.state.isVisible&&t===et()?"true":"false"):t.removeAttribute("aria-expanded")}))}function pt(){nt().removeEventListener("mousemove",F),U=U.filter((function(t){return t!==F}))}function ct(t){if(!T.isTouch||!S&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!Y.props.interactive||!C($,n)){if(c(Y.props.triggerTarget||e).some((function(t){return C(t,n)}))){if(T.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else at("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(Y.clearDelayTimeouts(),Y.hide(),I=!0,setTimeout((function(){I=!1})),Y.state.isMounted||vt())}}}function ft(){S=!0}function lt(){S=!1}function dt(){var t=nt();t.addEventListener("mousedown",ct,!0),t.addEventListener("touchend",ct,r),t.addEventListener("touchstart",lt,r),t.addEventListener("touchmove",ft,r)}function vt(){var t=nt();t.removeEventListener("mousedown",ct,!0),t.removeEventListener("touchend",ct,r),t.removeEventListener("touchstart",lt,r),t.removeEventListener("touchmove",ft,r)}function mt(t,e){var n=rt().box;function r(t){t.target===n&&(O(n,"remove",r),e())}if(0===t)return e();O(n,"remove",A),O(n,"add",r),A=r}function gt(t,n,r){void 0===r&&(r=!1),c(Y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),z.push({node:e,eventType:t,handler:n,options:r})}))}function ht(){var t;Z()&&(gt("touchstart",yt,{passive:!0}),gt("touchend",xt,{passive:!0})),(t=Y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(gt(t,yt),t){case"mouseenter":gt("mouseleave",xt);break;case"focus":gt(n?"focusout":"blur",Et);break;case"focusin":gt("focusout",Et)}}))}function bt(){z.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),z=[]}function yt(t){var e,n=!1;if(Y.state.isEnabled&&!Ot(t)&&!I){var r="focus"===(null==(e=y)?void 0:e.type);y=t,D=t.currentTarget,ut(),!Y.state.isVisible&&h(t)&&U.forEach((function(e){return e(t)})),"click"===t.type&&(Y.props.trigger.indexOf("mouseenter")<0||V)&&!1!==Y.props.hideOnClick&&Y.state.isVisible?n=!0:Lt(t),"click"===t.type&&(V=!n),n&&!r&&Dt(t)}}function wt(t){var e=t.target,n=et().contains(e)||$.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=l(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+u>i,v=r-e.bottom-p>i,m=e.left-n+c>i,g=n-e.right-f>i;return d||v||m||g}))}(At().concat($).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:P}:null})).filter(Boolean),t)&&(pt(),Dt(t))}function xt(t){Ot(t)||Y.props.trigger.indexOf("click")>=0&&V||(Y.props.interactive?Y.hideWithInteractivity(t):Dt(t))}function Et(t){Y.props.trigger.indexOf("focusin")<0&&t.target!==et()||Y.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||Dt(t)}function Ot(t){return!!T.isTouch&&Z()!==t.type.indexOf("touch")>=0}function Ct(){Tt();var n=Y.props,r=n.popperOptions,o=n.placement,i=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,u=tt()?B($).arrow:null,p=a?{getBoundingClientRect:a,contextElement:a.contextElement||et()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(tt()){var n=rt().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];tt()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),Y.popperInstance=t.createPopper(p,$,Object.assign({},r,{placement:o,onFirstUpdate:L,modifiers:c}))}function Tt(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function At(){return d($.querySelectorAll("[data-tippy-root]"))}function Lt(t){Y.clearDelayTimeouts(),t&&at("onTrigger",[Y,t]),dt();var e=ot(!0),n=Q(),r=n[0],o=n[1];T.isTouch&&"hold"===r&&o&&(e=o),e?p=setTimeout((function(){Y.show()}),e):Y.show()}function Dt(t){if(Y.clearDelayTimeouts(),at("onUntrigger",[Y,t]),Y.state.isVisible){if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&V)){var e=ot(!1);e?g=setTimeout((function(){Y.state.isVisible&&Y.hide()}),e):b=requestAnimationFrame((function(){Y.hide()}))}}else vt()}}function F(t,e){void 0===e&&(e={});var n=R.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",L,r),window.addEventListener("blur",k);var o=Object.assign({},e,{plugins:n}),i=y(t).reduce((function(t,e){var n=e&&z(e,o);return n&&t.push(n),t}),[]);return g(t)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(t){Object.keys(t).forEach((function(e){R[e]=t[e]}))},F.currentInput=T;var W=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(null==(e=t.props.render)||!e.$$tippy)return{};var n=B(t.popper),r=n.box,o=n.content,i=t.props.animateFill?function(){var t=m();return t.className="tippy-backdrop",x([t],"hidden"),t}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));o.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,x([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&x([i],"hidden")}}}};var q={clientX:0,clientY:0},$=[];function J(t){var e=t.clientX,n=t.clientY;q={clientX:e,clientY:n}}var G={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=E(t.props.triggerTarget||e),r=!1,o=!1,i=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function p(){n.removeEventListener("mousemove",f)}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),o=t.props.followCursor,i=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=i-s.left,p=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=t.left+u,r=t.top+p);var s="horizontal"===o?t.top:r,c="vertical"===o?t.right:n,f="horizontal"===o?t.bottom:r,l="vertical"===o?t.left:n;return{width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}})}function l(){t.props.followCursor&&($.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",J)}(n))}function d(){0===($=$.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",J)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!t.state.isMounted||o||s()||u()):(p(),c()))},onMount:function(){t.props.followCursor&&!o&&(i&&(f(q),i=!1),s()||u())},onTrigger:function(t,e){h(e)&&(q={clientX:e.clientX,clientY:e.clientY}),o="focus"===e.type},onHidden:function(){t.props.followCursor&&(c(),p(),i=!0)}}}};var K={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;t.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),e!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===t,s=o.top,u=i.bottom,p=a?o.left:i.left,c=a?o.right:i.right;return{top:s,bottom:u,left:p,right:c,width:c-p,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(a.placement)}})),e=a.placement)}};function s(){var e;o||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,a),o=!0,t.setProps(e),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(e,n){if(h(n)){var o=d(t.reference.getClientRects()),i=o.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var Q={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var o=null,i=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Z(o,s)||u&&Z(i,u))&&t.popperInstance&&t.popperInstance.update(),o=s,i=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Z(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),F.setDefaultProps({plugins:[Y,G,K,Q],render:N}),F.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,o=t,i=[],a=[],s=e.overrides,u=[],f=!1;function l(){a=o.map((function(t){return c(t.props.triggerTarget||t.reference)})).reduce((function(t,e){return t.concat(e)}),[])}function d(){i=o.map((function(t){return t.reference}))}function v(t){o.forEach((function(e){t?e.enable():e.disable()}))}function g(t){return o.map((function(e){var n=e.setProps;return e.setProps=function(o){n(o),e.reference===r&&t.setProps(o)},function(){e.setProps=n}}))}function h(t,e){var n=a.indexOf(e);if(e!==r){r=e;var u=(s||[]).concat("content").reduce((function(t,e){return t[e]=o[n].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:"function"==typeof u.getReferenceClientRect?u.getReferenceClientRect:function(){var t;return null==(t=i[n])?void 0:t.getBoundingClientRect()}}))}}v(!1),d(),l();var b={fn:function(){return{onDestroy:function(){v(!0)},onHidden:function(){r=null},onClickOutside:function(t){t.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(t){t.props.showOnCreate&&!f&&(f=!0,h(t,i[0]))},onTrigger:function(t,e){h(t,e.currentTarget)}}}},y=F(m(),Object.assign({},p(e,["overrides"]),{plugins:[b].concat(e.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(t){if(w(),!r&&null==t)return h(y,i[0]);if(!r||null!=t){if("number"==typeof t)return i[t]&&h(y,i[t]);if(o.indexOf(t)>=0){var e=t.reference;return h(y,e)}return i.indexOf(t)>=0?h(y,t):void 0}},y.showNext=function(){var t=i[0];if(!r)return y.show(0);var e=i.indexOf(r);y.show(i[e+1]||t)},y.showPrevious=function(){var t=i[i.length-1];if(!r)return y.show(t);var e=i.indexOf(r),n=i[e-1]||t;y.show(n)};var x=y.setProps;return y.setProps=function(t){s=t.overrides||s,x(t)},y.setInstances=function(t){v(!0),u.forEach((function(t){return t()})),o=t,v(!1),d(),l(),u=g(y),y.setProps({triggerTarget:a})},u=g(y),y},F.delegate=function(t,e){var n=[],o=[],i=!1,a=e.target,s=p(e,["target"]),u=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},s,{showOnCreate:!0}),l=F(t,u);function d(t){if(t.target&&!i){var n=t.target.closest(a);if(n){var r=n.getAttribute("data-tippy-trigger")||e.trigger||R.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&r.indexOf(X[t.type])<0)){var s=F(n,f);s&&(o=o.concat(s))}}}}function v(t,e,r,o){void 0===o&&(o=!1),t.addEventListener(e,r,o),n.push({node:t,eventType:e,handler:r,options:o})}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&o.forEach((function(t){t.destroy()})),o=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),n=[],e()},t.enable=function(){a(),o.forEach((function(t){return t.enable()})),i=!1},t.disable=function(){s(),o.forEach((function(t){return t.disable()})),i=!0},function(t){var e=t.reference;v(e,"touchstart",d,r),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)})),l},F.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;_.forEach((function(t){var e=!1;if(n&&(e=b(n)?t.reference===n:t.popper===n.popper),!e){var o=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:o})}}))},F.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',F}));
(function($,window,undefined){function getPixel(e,t){return parseInt(e.css(t),10)||0}function within(e,t,o){return e<t?t:e>o?o:e}function getViewport(){var e=window,t="inner";return"innerWidth"in window||(t="client",e=document.documentElement||document.body),{width:e[t+"Width"],height:e[t+"Height"]}}function removeHash(){var e=getScrollXY();window.location.hash="",window.scrollTo(e.x,e.y)}function findImageInElement(e){var t=$("*",e),o=new Array;return t.each(function(){var e="",t=this;if("none"!=$(t).css("background-image")?e=$(t).css("background-image"):void 0!==$(t).attr("src")&&"img"==t.nodeName.toLowerCase()&&(e=$(t).attr("src")),-1==e.indexOf("gradient")){e=e.replace(/url\(\"/g,""),e=e.replace(/url\(/g,""),e=e.replace(/\"\)/g,""),e=e.replace(/\)/g,"");for(var i=e.split(","),n=0;n<i.length;n++)i[n].length>0&&-1==$.inArray(i[n],o)&&o.push(i[n])}}),o}function getExtension(e){var t=e.split(".").pop().toLowerCase(),o=-1!==t.indexOf("?")?t.split("?").pop():"";return t.replace(o,"")}function getTypeByExtension(e){var t,o=getExtension(e);return t=-1!==extensions.image.indexOf(o)?"image":-1!==extensions.video.indexOf(o)?"video":"iframe",t}function percentToValue(e,t){return parseInt(t/100*e)}function parseURI(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function absolutizeURI(e,t){function o(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}return t=parseURI(t||""),e=parseURI(e||""),t&&e?(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+o(t.protocol||t.authority||"/"===t.pathname.charAt(0)?t.pathname:t.pathname?(e.authority&&!e.pathname?"/":"")+e.pathname.slice(0,e.pathname.lastIndexOf("/")+1)+t.pathname:e.pathname)+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash:null}function version_compare(e,t,o){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var i=0,n=0,a=0,r={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return e=(""+e).replace(/[_\-+]/g,"."),e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),e.length?e.split("."):[-8]},l=function(e){return e?isNaN(e)?r[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),n=max(e.length,t.length),i=0;i<n;i++)if(e[i]!=t[i]){if(e[i]=l(e[i]),t[i]=l(t[i]),e[i]<t[i]){a=-1;break}if(e[i]>t[i]){a=1;break}}if(!o)return a;switch(o){case">":case"gt":return a>0;case">=":case"ge":return a>=0;case"<=":case"le":return a<=0;case"==":case"=":case"eq":return 0===a;case"<>":case"!=":case"ne":return 0!==a;case"":case"<":case"lt":return a<0;default:return null}}function getScrollXY(){var e=0,t=0;return"number"==typeof window.pageYOffset?(t=window.pageYOffset,e=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(t=document.body.scrollTop,e=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(t=document.documentElement.scrollTop,e=document.documentElement.scrollLeft),{x:e,y:t}}var extensions={image:["bmp","gif","jpeg","jpg","png","tiff","tif","jfif","jpe","webp"],iframe:["asp","aspx","cgi","cfm","htm","html","jsp","php","pl","php3","php4","php5","phtml","rb","rhtml","shtml","txt"],video:["mpg","mpeg","mp4","webm","ogv","ogg","3gp","m4v"]},$win=$(window),$doc=$(document),transform,gpuAcceleration,fullScreenApi="",supportsCoarsePointer=!(!window.matchMedia||!window.matchMedia("(pointer: coarse)").matches),supportTouch=navigator.maxTouchPoints>0||supportsCoarsePointer||"ontouchstart"in window,isWebKit="WebkitAppearance"in document.documentElement.style,clickEvent=supportTouch?"itap.iLightBox":"click.iLightBox",touchStartEvent="pointerdown.iLightBox",touchStopEvent="pointerup.iLightBox",touchMoveEvent="pointermove.iLightBox",abs=Math.abs,sqrt=Math.sqrt,round=Math.round,max=Math.max,min=Math.min,floor=Math.floor,random=Math.random,WPCP_iLightBox=function(e,t,o,i){var n=this;if(n.options=t,n.selector=e.selector||e,n.context=e.context,n.instant=i,o.length<1?n.attachItems():n.items=o,n.vars={total:n.items.length,start:0,current:null,next:null,prev:null,BODY:$("body"),loadRequests:0,overlay:$('<div class="ilightbox-overlay"></div>'),loader:$('<div class="ilightbox-loader"><div></div></div>'),toolbar:$('<div class="ilightbox-toolbar"></div>'),innerToolbar:$('<div class="ilightbox-inner-toolbar"></div>'),title:$('<div class="ilightbox-title"></div>'),closeButton:$('<a class="ilightbox-close" title="'+n.options.text.close+'"></a>'),fullScreenButton:$('<a class="ilightbox-fullscreen" title="'+n.options.text.enterFullscreen+'"></a>'),innerPlayButton:$('<a class="ilightbox-play" title="'+n.options.text.slideShow+'"></a>'),innerNextButton:$('<a class="ilightbox-next-button" title="'+n.options.text.next+'"></a>'),innerPrevButton:$('<a class="ilightbox-prev-button" title="'+n.options.text.previous+'"></a>'),downloadButton:$('<a class="ilightbox-download"></a>'),holder:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==n.options.header.show?"":" staticHeader")+'" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextPhoto:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==n.options.header.show?"":" staticHeader")+' ilightbox-next" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),prevPhoto:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==n.options.header.show?"":"  staticHeader")+' ilightbox-prev" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextButton:$('<a class="ilightbox-button ilightbox-next-button" ondragstart="return false;" title="'+n.options.text.next+'"><span></span></a>'),prevButton:$('<a class="ilightbox-button ilightbox-prev-button" ondragstart="return false;" title="'+n.options.text.previous+'"><span></span></a>'),thumbnails:$('<div class="ilightbox-thumbnails" ondragstart="return false;"><div class="ilightbox-thumbnails-container"><a class="ilightbox-thumbnails-dragger"></a><div class="ilightbox-thumbnails-grid"></div></div></div>'),thumbs:!1,nextLock:!1,prevLock:!1,hashLock:!1,isMobile:!1,mobileMaxWidth:980,isInFullScreen:!1,isSwipe:!1,mouseID:0,cycleID:0,isPaused:0},n.vars.hideableElements=n.vars.nextButton.add(n.vars.prevButton),n.normalizeItems(),n.availPlugins(),n.options.startFrom=n.options.startFrom>0&&n.options.startFrom>=n.vars.total?n.vars.total-1:n.options.startFrom,n.options.startFrom=n.options.randomStart?floor(random()*n.vars.total):n.options.startFrom,n.vars.start=n.options.startFrom,i?n.instantCall():n.patchItemsEvents(),n.options.linkId&&(n.hashChangeHandler(),$win.iLightBoxHashChange(function(){n.hashChangeHandler()})),!0!==n.options.header.show&&(n.options.headerHeight=0),supportTouch){var a=/(click|mouseenter|mouseleave|mouseover|mouseout)/gi,r="itap";n.options.header.show="boolean"!=typeof n.options.header.show?n.options.header.show.replace(a,r):n.options.header.show,n.options.header.hide="boolean"!=typeof n.options.header.hide?n.options.header.hide.replace(a,r):n.options.header.hide,n.options.caption.show="boolean"!=typeof n.options.caption.show?n.options.caption.show.replace(a,r):n.options.caption.show,n.options.caption.hide="boolean"!=typeof n.options.caption.hide?n.options.caption.hide.replace(a,r):n.options.caption.hide}n.options.controls.arrows&&$.extend(n.options.styles,{nextOffsetX:0,prevOffsetX:0,nextOpacity:0,prevOpacity:0})},doc,request,exit,hasNative,eventName;WPCP_iLightBox.prototype={showLoader:function(){var e=this;e.vars.loadRequests+=1,"horizontal"==e.options.path.toLowerCase()?e.vars.loader.addClass("ilightbox-show").stop().animate({top:"-30px"},e.options.show.speed,"easeOutCirc"):e.vars.loader.addClass("ilightbox-show").stop().animate({left:"-30px"},e.options.show.speed,"easeOutCirc")},hideLoader:function(){var e=this;e.vars.loadRequests-=1,e.vars.loadRequests=e.vars.loadRequests<0?0:e.vars.loadRequests,"horizontal"==e.options.path.toLowerCase()?e.vars.loadRequests<=0&&e.vars.loader.removeClass("ilightbox-show").stop().animate({top:"-192px"},e.options.show.speed,"easeInCirc"):e.vars.loadRequests<=0&&e.vars.loader.removeClass("ilightbox-show").stop().animate({left:"-192px"},e.options.show.speed,"easeInCirc")},createUI:function(){var e=this;e.ui={currentElement:e.vars.holder,nextElement:e.vars.nextPhoto,prevElement:e.vars.prevPhoto,currentItem:e.vars.current,nextItem:e.vars.next,prevItem:e.vars.prev,hide:function(){e.closeAction()},refresh:function(){arguments.length>0?e.repositionPhoto(!0):e.repositionPhoto()},fullscreen:function(){e.fullScreenAction()}}},attachItems:function(){var iL=this,itemsObject=new Array,items=new Array;$(iL.selector,iL.context).each(function(){var t=$(this),URL=t.attr(iL.options.attr)||null,options=t.data("options")&&eval("({"+t.data("options")+"})")||{},caption=t.data("caption"),entryId=t.data("entry-id"),title=t.data("title")||t.attr("title"),type=t.data("type")||getTypeByExtension(URL);items.push({URL:URL,caption:caption,entryId:entryId,title:title,type:type,options:options}),iL.instant||itemsObject.push(t)}),iL.items=items,iL.itemsObject=itemsObject},normalizeItems:function(){var e=this,t=new Array;$.each(e.items,function(o,i){"string"==typeof i&&(i={url:i});var n=i.url||i.URL||null,a=i.options||{},r=i.caption||null,s=i.entryId||null,l=i.title||null,c=i.type?i.type.toLowerCase():getTypeByExtension(n),h="object"!=typeof n?getExtension(n):"";a.thumbnail=a.thumbnail||("image"==c?n:null),a.videoType=a.videoType||null,a.skin=a.skin||e.options.skin,a.width=a.width||null,a.height=a.height||null,a.mousewheel=void 0===a.mousewheel||a.mousewheel,a.swipe=void 0===a.swipe||a.swipe,"video"==c&&(a.html5video=void 0!==a.html5video?a.html5video:{},a.html5video.webm=a.html5video.webm||a.html5video.WEBM||null,a.html5video.controls=void 0!==a.html5video.controls?a.html5video.controls:"controls",a.html5video.preload=a.html5video.preload||"metadata",a.html5video.autoplay=void 0!==a.html5video.autoplay&&a.html5video.autoplay),a.width&&a.height||("video"==c?(a.width=1280,a.height=720):"iframe"!=c&&"pdf"!=c||(a.width="100%",a.height="90%")),delete i.url,i.index=o,i.URL=n,i.caption=r,i.entryId=s,i.title=l,i.type=c,i.options=a,i.ext=h,t.push(i)}),e.items=t},instantCall:function(){var e=this,t=e.vars.start;e.vars.current=t,e.vars.next=e.items[t+1]?t+1:null,e.vars.prev=e.items[t-1]?t-1:null,e.addContents(),e.patchEvents()},addContents:function(){var e=this,t=e.vars,o=e.options,i=getViewport(),n=o.path.toLowerCase();o.mobileOptimizer&&!o.innerToolbar&&(t.isMobile=i.width<=t.mobileMaxWidth),t.overlay.addClass(o.skin).hide().css("opacity",o.overlay.opacity),o.linkId&&t.overlay[0].setAttribute("linkid",o.linkId),o.controls.toolbar&&(t.toolbar.addClass(o.skin).append(t.closeButton),o.controls.fullscreen&&t.toolbar.append(t.fullScreenButton),o.controls.slideshow&&t.toolbar.append(t.innerPlayButton),t.total>1&&t.toolbar.append(t.innerPrevButton).append(t.innerNextButton),o.candownload&&t.toolbar.append(t.downloadButton)),t.BODY.addClass("ilightbox-noscroll").append(t.overlay).append(t.loader).append(t.holder).append(t.nextPhoto).append(t.prevPhoto),o.innerToolbar||t.BODY.append(t.toolbar),o.controls.arrows&&t.BODY.append(t.nextButton).append(t.prevButton),o.controls.thumbnail&&t.total>1&&(t.BODY.append(t.thumbnails),t.thumbnails.addClass(o.skin).addClass("ilightbox-"+n),$("div.ilightbox-thumbnails-grid",t.thumbnails).empty(),t.thumbs=!0);var a="horizontal"==o.path.toLowerCase()?{left:parseInt(i.width/2-t.loader.outerWidth()/2)}:{top:parseInt(i.height/2-t.loader.outerHeight()/2)};t.loader.addClass(o.skin).css(a),t.nextButton.add(t.prevButton).addClass(o.skin),"horizontal"==n&&t.loader.add(t.nextButton).add(t.prevButton).addClass("horizontal"),t.BODY[t.isMobile?"addClass":"removeClass"]("isMobile"),o.infinite||(t.prevButton.add(t.prevButton).add(t.innerPrevButton).add(t.innerNextButton).removeClass("disabled"),0==t.current&&t.prevButton.add(t.innerPrevButton).addClass("disabled"),t.current>=t.total-1&&t.nextButton.add(t.innerNextButton).addClass("disabled")),o.show.effect?(t.overlay.stop().fadeIn(o.show.speed),t.toolbar.stop().fadeIn(o.show.speed)):(t.overlay.show(),t.toolbar.show()),o.show.effect?setTimeout(function(){e.generateBoxes()},o.show.speed):e.generateBoxes(),e.createUI(),window.WPCP_iLightBox={close:function(){e.closeAction()},fullscreen:function(){e.fullScreenAction()},moveNext:function(){e.moveTo("next")},movePrev:function(){e.moveTo("prev")},goTo:function(t){e.goTo(t)},refresh:function(){e.refresh()},reposition:function(){arguments.length>0?e.repositionPhoto(!0):e.repositionPhoto()},setOption:function(t){e.setOption(t)},destroy:function(){e.closeAction(),e.dispatchItemsEvents()},il:e},o.linkId&&(t.hashLock=!0,window.location.hash=o.linkId+"/"+t.current,setTimeout(function(){t.hashLock=!1},55)),o.slideshow.startPaused||(e.resume(),t.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")),"function"==typeof e.options.callback.onOpen&&e.options.callback.onOpen.call(e)},loadContent:function(e,t,o){var i,n,a=this;switch(a.createUI(),e.speed=o||a.options.effects.loadedFadeSpeed,"current"==t&&(e.options.mousewheel?a.vars.lockWheel=!1:a.vars.lockWheel=!0,e.options.swipe?a.vars.lockSwipe=!1:a.vars.lockSwipe=!0),t){case"current":i=a.vars.holder,n=a.vars.current;break;case"next":i=a.vars.nextPhoto,n=a.vars.next;break;case"prev":i=a.vars.prevPhoto,n=a.vars.prev}if(i.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")+(!0!==a.options.header.show?"":" staticHeader")).addClass(e.options.skin),$("div.ilightbox-inner-toolbar",i).remove(),$("div.ilightbox-header",i).remove(),a.options.innerToolbar){var r=a.vars.innerToolbar.clone();if(e.title&&a.options.show.title){var s=a.vars.title.clone();s.empty().html(e.title),r.append(s)}a.options.innerToolbar&&r.append(a.vars.total>1?a.vars.toolbar.clone():a.vars.toolbar),i.prepend(r)}a.loadSwitcher(e,i,n,t)},loadSwitcher:function(e,t,o,i){var n=this,a=n.options,r={element:t,position:o};switch(e.type){case"image":"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),n.loadImage(e.URL,function(s){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r);var l=s?s.width:400,c=s?s.height:200;t.data({naturalWidth:l,naturalHeight:c}),$("div.ilightbox-container",t).empty().append(s?'<img src="'+e.URL+'" class="ilightbox-image" alt="'+(null!==e.caption?e.caption:e.title)+'" referrerpolicy="no-referrer"/>':'<span class="ilightbox-alert">'+a.errors.loadImage+"</span>");var h=$(".ilightbox-container img",t);if(0===h.closest(".panzoom-container").length){h.wrap('<div class="panzoom-container"></div>');var p=WPCPPanzoom(h.get(0),{cursor:"auto",minScale:1,maxScale:10,panOnlyWhenZoomed:!0,contain:"outside"});h.parent().get(0).addEventListener("wheel",function(e){e.shiftKey&&(e.stopPropagation(),p.zoomWithWheel(e))})}"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),n.configureHolder(e,i,t)});break;case"video":t.data({naturalWidth:e.options.width,naturalHeight:e.options.height}),"current"===i?(n.addContent(t,e),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r)):$("div.ilightbox-container",t).empty(),n.configureHolder(e,i,t);break;case"iframe":if(t.data({naturalWidth:e.options.width,naturalHeight:e.options.height}),n.configureHolder(e,i,t),"current"===i){var s=n.addContent(t,e);"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),s.on("load",function(){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),s.off("load")})}else $("div.ilightbox-container",t).empty();break;case"inline":s=$(e.URL);var l=n.addContent(t,e),c=findImageInElement(t);t.data({naturalWidth:n.items[o].options.width||s.outerWidth(),naturalHeight:n.items[o].options.height||s.outerHeight()}),l.children().eq(0).show(),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),n.loadImage(c,function(){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),n.configureHolder(e,i,t)});break;case"html":var h=e.URL;if(v=$("div.ilightbox-container",t),h[0].nodeName)s=h.clone();else{var p=$(h);s=p.selector?$("<div>"+p+"</div>"):p}var d=n.items[o].options.width||parseInt(s.attr("width")),u=n.items[o].options.height||parseInt(s.attr("height"));n.addContent(t,e),s.appendTo(document.documentElement).hide(),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r);c=findImageInElement(t);"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),n.loadImage(c,function(){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),t.show().data({naturalWidth:d||v.outerWidth(),naturalHeight:u||v.outerHeight()}).hide(),s.remove(),n.configureHolder(e,i,t)});break;case"pdf":if(t.data({naturalWidth:n.items[o].options.width||900,naturalHeight:n.items[o].options.height||600}),"current"===i){var f=a.WPCP,v=$("div.ilightbox-container",t);v.empty();var m=$('<div class="wpcp-pdf-viewer-container"></div>');v.append(m);var g=f&&f.element.hasClass("wpcp-theme-dark")?"dark":"light";"function"==typeof $.fn.WPCPPDFViewer&&m.WPCPPDFViewer({pdfUrl:e.URL,listtoken:f?f.options.listtoken:null,theme:g,vendorPath:f.options.plugin_url+"/vendors/pdfjs/",canPrint:a.candownload||!1}),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r)}else $("div.ilightbox-container",t).empty();n.configureHolder(e,i,t);break;default:s=n.addContent(t,e);t.data({naturalWidth:n.items[o].options.width||(s&&s.outerWidth?s.outerWidth():0),naturalHeight:n.items[o].options.height||(s&&s.outerHeight?s.outerHeight():0)}),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),n.configureHolder(e,i,t)}},configureHolder:function(e,t,o){var i=this,n=i.vars,a=i.options;if("current"!=t&&("next"==t?o.addClass("ilightbox-next"):o.addClass("ilightbox-prev")),"current"==t)var r=n.current;else if("next"==t){var s=a.styles.nextOpacity;r=n.next}else s=a.styles.prevOpacity,r=n.prev;var l={element:o,position:r};if(i.items[r].options.width=i.items[r].options.width||0,i.items[r].options.height=i.items[r].options.height||0,"current"==t){if(e.caption){i.setCaption(e,o);var c=$("div.ilightbox-caption",o);a.caption.start&&c.fadeIn(a.effects.fadeSpeed)}if(e.entryId){i.setHeader(e,o);var h=$("div.ilightbox-header",o);a.header.start&&h.fadeIn(a.effects.fadeSpeed)}a.show.effect?o.css(transform,gpuAcceleration).fadeIn(e.speed,function(){o.css(transform,""),i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)}):(o.show(),i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l))}else a.show.effect?o.fadeTo(e.speed,s,function(){"next"==t?n.nextLock=!1:n.prevLock=!1,i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)}):(o.css({opacity:s}).show(),"next"==t?n.nextLock=!1:n.prevLock=!1,i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l));window.requestAnimationFrame(function(){i.repositionPhoto()})},generateBoxes:function(){var e=this,t=e.vars,o=e.options;o.infinite&&t.total>=3?(t.current==t.total-1&&(t.next=0),0==t.current&&(t.prev=t.total-1)):o.infinite=!1,e.loadContent(e.items[t.current],"current",o.show.speed),e.items[t.next]&&e.loadContent(e.items[t.next],"next",o.show.speed),e.items[t.prev]&&e.loadContent(e.items[t.prev],"prev",o.show.speed)},generateThumbnails:function(){var e=this,t=e.vars,o=e.options,i=null;if(t.thumbs&&!e.vars.dontGenerateThumbs){var n=t.thumbnails,a=$("div.ilightbox-thumbnails-container",n),r=$("div.ilightbox-thumbnails-grid",a),s=0;r.removeAttr("style").empty(),$.each(e.items,function(l,c){var h=t.current==l?"ilightbox-active":"",p=t.current==l?o.thumbnails.activeOpacity:o.thumbnails.normalOpacity,d=c.options.thumbnail,u=$('<div class="ilightbox-thumbnail"></div>'),f=$('<div class="ilightbox-thumbnail-icon"></div>');u.css({opacity:0}).addClass(h),"video"==c.type&&void 0===c.options.icon?(f.addClass("ilightbox-thumbnail-video"),u.append(f)):c.options.icon&&(f.addClass("ilightbox-thumbnail-"+c.options.icon),u.append(f)),d&&(s++,u.append('<img class="preloading preloading-lightbox-thumbnail" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="'+d+'" data-src-retina="'+d+'" data-src-backup="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="'+c.title+'" border="0" />'),clearTimeout(i),i=setTimeout(function(){e.positionThumbnails(n,a,r)},20),setTimeout(function(){u.fadeTo(o.effects.loadedFadeSpeed,p)},20*s)),r.append(u)}),e.vars.dontGenerateThumbs=!0}},positionThumbnails:function(e,t,o){var i=this,n=i.vars,a=i.options,r=getViewport(),s=a.path.toLowerCase();e||(e=n.thumbnails),t||(t=$("div.ilightbox-thumbnails-container",e)),o||(o=$("div.ilightbox-thumbnails-grid",t));var l=$(".ilightbox-thumbnail",o),c="horizontal"==s?r.width-a.styles.pageOffsetX:l.eq(0).outerWidth()-a.styles.pageOffsetX,h="horizontal"==s?l.eq(0).outerHeight()-a.styles.pageOffsetY:r.height-a.styles.pageOffsetY,p="horizontal"==s?0:c,d="horizontal"==s?h:0,u=$(".ilightbox-active",o),f={};arguments.length<3&&(l.css({opacity:a.thumbnails.normalOpacity}),u.css({opacity:a.thumbnails.activeOpacity})),l.each(function(e){var t=$(this),o=t.data(),n="horizontal"==s?0:a.thumbnails.maxWidth;height="horizontal"==s?a.thumbnails.maxHeight:0,dims=i.getNewDimenstions(n,height,o.naturalWidth,o.naturalHeight,!0),t.css({width:dims.width,height:dims.height}),"horizontal"==s&&t.css({float:"left"}),"horizontal"==s?p+=t.outerWidth():d+=t.outerHeight()}),f={width:p,height:d},o.css(f),f={};var v=o.offset(),m=u.length?u.offset():{top:parseInt(h/2),left:parseInt(c/2)};v.top=v.top-$doc.scrollTop(),v.left=v.left-$doc.scrollLeft(),m.top=m.top-v.top-$doc.scrollTop(),m.left=m.left-v.left-$doc.scrollLeft(),"horizontal"==s?(f.top=0,f.left=parseInt(c/2-m.left-u.outerWidth()/2)):(f.top=parseInt(h/2-m.top-u.outerHeight()/2),f.left=0),arguments.length<3?o.stop().animate(f,a.effects.repositionSpeed,"easeOutCirc"):o.css(f)},loadImage:function(e,t){$.isArray(e)||(e=[e]);var o=this,i=e.length;i>0?(o.showLoader(),$.each(e,function(n,a){var r=new Image;r.referrerPolicy="no-referrer",r.onload=function(){i-=1,0==i&&(o.hideLoader(),t(r))},r.onerror=r.onabort=function(){i-=1,0==i&&(o.hideLoader(),t(!1))},r.src=e[n]})):t(!1)},patchItemsEvents:function(){var e=this,t=e.vars,o=supportTouch?"itap.iL":"click.iL",i=supportTouch?"click.iL":"itap.iL";if(e.context&&e.selector){var n=$(e.selector,e.context);$(e.context).on(o,e.selector,function(){var o=$(this),i=n.index(o);return t.current=i,t.next=e.items[i+1]?i+1:null,t.prev=e.items[i-1]?i-1:null,e.addContents(),e.patchEvents(),!1}).on(i,e.selector,function(){return!1})}else $.each(e.itemsObject,function(n,a){a.on(o,function(o){if(supportTouch){let e=$(o.target).closest(".entry");if(e.length&&!1===e.hasClass("hasfocus")&&!1===e.hasClass("is-selected"))return!0}return t.current=n,t.next=e.items[n+1]?n+1:null,t.prev=e.items[n-1]?n-1:null,e.addContents(),e.patchEvents(),!1}).on(i,function(e){e.preventDefault()})})},dispatchItemsEvents:function(){var e=this;e.vars,e.options;e.context&&e.selector?$(e.context).off(".iL",e.selector):$.each(e.itemsObject,function(e,t){t.off(".iL")})},refresh:function(){var e=this;e.dispatchItemsEvents(),e.attachItems(),e.normalizeItems(),e.patchItemsEvents()},patchEvents:function(){function e(e){o.isMobile||(o.mouseID||o.hideableElements.show(),o.mouseID=clearTimeout(o.mouseID),-1===c.indexOf(e.target)&&(o.mouseID=setTimeout(function(){o.hideableElements.hide(),o.mouseID=clearTimeout(o.mouseID)},3e3)))}var t=this,o=t.vars,i=t.options,n=i.path.toLowerCase(),a=$(".ilightbox-holder"),r=fullScreenApi.fullScreenEventName+".iLightBox",s=1e3,l=verticalDistanceThreshold=100,c=[o.nextButton[0],o.prevButton[0],o.nextButton[0].firstChild,o.prevButton[0].firstChild];$win.off(".iLightBox").on({"resize.iLightBox":function(){var e=getViewport();i.mobileOptimizer&&!i.innerToolbar&&(o.isMobile=e.width<=o.mobileMaxWidth),o.BODY[o.isMobile?"addClass":"removeClass"]("isMobile"),t.repositionPhoto(),supportTouch&&(clearTimeout(o.setTime),o.setTime=setTimeout(function(){var e=getScrollXY().y;window.scrollTo(0,e-30),window.scrollTo(0,e+30),window.scrollTo(0,e)},2e3)),o.thumbs&&t.positionThumbnails()},"keydown.iLightBox":function(e){if(i.controls.keyboard)switch(e.keyCode){case 13:e.shiftKey&&i.keyboard.shift_enter&&t.fullScreenAction();break;case 27:i.keyboard.esc&&t.closeAction();break;case 37:i.keyboard.left&&!o.lockKey&&t.moveTo("prev");break;case 38:i.keyboard.up&&!o.lockKey&&t.moveTo("prev");break;case 39:i.keyboard.right&&!o.lockKey&&t.moveTo("next");break;case 40:i.keyboard.down&&!o.lockKey&&t.moveTo("next")}}}),fullScreenApi.supportsFullScreen&&$win.on({[r]:function(){t.doFullscreen()}});var h=[i.header.show+".iLightBox",i.header.hide+".iLightBox",i.caption.show+".iLightBox",i.caption.hide+".iLightBox"].filter(function(e,t,o){return o.lastIndexOf(e)===t}),p="";$.each(h,function(e,t){0!=e&&(p+=" "),p+=t}),$doc.off(".iLightBox").on({[clickEvent]:function(){i.overlay.blur&&t.closeAction()}},".ilightbox-overlay").on({[clickEvent]:function(){t.moveTo("next")}},".ilightbox-next, .ilightbox-next-button").on({[clickEvent]:function(){t.moveTo("prev")}},".ilightbox-prev, .ilightbox-prev-button").on({[clickEvent]:function(){var e=$(this),i=$(".ilightbox-thumbnail",o.thumbnails),n=i.index(e);n!=o.current&&t.goTo(n)}},".ilightbox-thumbnail").on({"mouseenter.iLightBox mouseleave.iLightBox":function(e){"mouseenter"==e.type?o.lockWheel=!0:o.lockWheel=!1}},".ilightbox-wrapper").on({[clickEvent]:function(e){e.preventDefault(),e.stopImmediatePropagation();var o=$(this);if(o.hasClass("ilightbox-fullscreen"))t.fullScreenAction();else if(o.hasClass("ilightbox-play"))t.resume(),o.addClass("ilightbox-pause").removeClass("ilightbox-play");else if(o.hasClass("ilightbox-pause"))t.pause(),o.addClass("ilightbox-play").removeClass("ilightbox-pause");else if(o.hasClass("ilightbox-download")){var i=t.items[t.vars.current],n=t.options.WPCP.element.find('.entry[data-id="'+i.entryId+'"]:first a.entry_action_download:first');$(this).attr("href",n.attr("href"))}else t.closeAction();return!1}},".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause, .ilightbox-toolbar a.ilightbox-download").on({[touchMoveEvent]:function(e){e.preventDefault()}},".ilightbox-overlay, .ilightbox-thumbnails-container"),p&&$doc.on({[p]:function(e){var t=$("div.ilightbox-header",o.holder),n=$("div.ilightbox-caption",o.holder),a=i.effects.fadeSpeed;o.nextLock||o.prevLock?(e.type!=i.header.show||t.is(":visible")?e.type==i.header.hide&&t.is(":visible")&&t.fadeOut(a):t.fadeIn(a),e.type!=i.caption.show||n.is(":visible")?e.type==i.caption.hide&&n.is(":visible")&&n.fadeOut(a):n.fadeIn(a)):(e.type!=i.header.show||t.is(":visible")?e.type==i.header.hide&&t.is(":visible")&&t.stop().fadeOut(a):t.stop().fadeIn(a),e.type!=i.caption.show||n.is(":visible")?e.type==i.caption.hide&&n.is(":visible")&&n.stop().fadeOut(a):n.stop().fadeIn(a))}},".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)"),i.controls.arrows&&!supportTouch&&$doc.on({"mousemove.iLightBox":e}),i.controls.slideshow&&i.slideshow.pauseOnHover&&$doc.on({"mouseenter.iLightBox mouseleave.iLightBox":function(e){"mouseenter"==e.type&&o.cycleID?t.pause():"mouseleave"==e.type&&o.isPaused&&t.resume()}},".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)");var d=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails");i.controls.mousewheel&&d.on("mousewheel.iLightBox",function(e,i){o.lockWheel||(e.preventDefault(),i<0?t.moveTo("next"):i>0&&t.moveTo("prev"))}),i.controls.swipe&&a.on(touchStartEvent,function(e){function r(e){var t=$(this),o=g[e],i=[b.coords[0]-d.coords[0],b.coords[1]-d.coords[1]];t[0].style["horizontal"==n?"left":"top"]=("horizontal"==n?o.left-i[0]:o.top-i[1])+"px"}function c(e){if(b){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;d={time:(new Date).getTime(),coords:[t.pageX-v,t.pageY-f]},a.each(r),e.preventDefault()}}function h(){a.each(function(){var e=$(this),t=e.data("offset")||{top:e.offset().top-f,left:e.offset().left-v},o=t.top,i=t.left;e.css(transform,gpuAcceleration).stop().animate({top:o,left:i},500,"easeOutCirc",function(){e.css(transform,"")})})}if(!(o.nextLock||o.prevLock||1==o.total||o.lockSwipe)){var p=e.originalEvent&&e.originalEvent.pointerType;if(!p||"mouse"!==p){o.BODY.addClass("ilightbox-closedhand");var d,u=e.originalEvent.touches?e.originalEvent.touches[0]:e,f=$doc.scrollTop(),v=$doc.scrollLeft(),m=[a.eq(0).offset(),a.eq(1).offset(),a.eq(2).offset()],g=[{top:m[0].top-f,left:m[0].left-v},{top:m[1].top-f,left:m[1].left-v},{top:m[2].top-f,left:m[2].left-v}],b={time:(new Date).getTime(),coords:[u.pageX-v,u.pageY-f]};a.on(touchMoveEvent,c),$doc.one(touchStopEvent,function(e){a.off(touchMoveEvent,c),o.BODY.removeClass("ilightbox-closedhand"),b&&d&&("horizontal"==n&&d.time-b.time<s&&abs(b.coords[0]-d.coords[0])>l&&abs(b.coords[1]-d.coords[1])<verticalDistanceThreshold?b.coords[0]>d.coords[0]?o.current!=o.total-1||i.infinite?(o.isSwipe=!0,t.moveTo("next")):h():0!=o.current||i.infinite?(o.isSwipe=!0,t.moveTo("prev")):h():"vertical"==n&&d.time-b.time<s&&abs(b.coords[1]-d.coords[1])>l&&abs(b.coords[0]-d.coords[0])<verticalDistanceThreshold?b.coords[1]>d.coords[1]?o.current!=o.total-1||i.infinite?(o.isSwipe=!0,t.moveTo("next")):h():0!=o.current||i.infinite?(o.isSwipe=!0,t.moveTo("prev")):h():h()),b=d=undefined})}}})},goTo:function(e){var t=this,o=t.vars,i=t.options,n=e-o.current;if(i.infinite&&(e==o.total-1&&0==o.current&&(n=-1),o.current==o.total-1&&0==e&&(n=1)),1==n)t.moveTo("next");else if(-1==n)t.moveTo("prev");else{if(o.nextLock||o.prevLock)return!1;"function"==typeof i.callback.onBeforeChange&&i.callback.onBeforeChange.call(t,t.ui),i.linkId&&(o.hashLock=!0,window.location.hash=i.linkId+"/"+e),t.items[e]&&(t.items[e].options.mousewheel?t.vars.lockWheel=!1:o.lockWheel=!0,
t.items[e].options.swipe?o.lockSwipe=!1:o.lockSwipe=!0),$.each([o.holder,o.nextPhoto,o.prevPhoto],function(e,t){t.css(transform,gpuAcceleration).fadeOut(i.effects.loadedFadeSpeed)}),o.current=e,o.next=e+1,o.prev=e-1,t.createUI(),setTimeout(function(){t.generateBoxes()},i.effects.loadedFadeSpeed+50),$(".ilightbox-thumbnail",o.thumbnails).removeClass("ilightbox-active").eq(e).addClass("ilightbox-active"),t.positionThumbnails(),i.linkId&&setTimeout(function(){o.hashLock=!1},55),i.infinite||(o.nextButton.add(o.prevButton).add(o.innerPrevButton).add(o.innerNextButton).removeClass("disabled"),0==o.current&&o.prevButton.add(o.innerPrevButton).addClass("disabled"),o.current>=o.total-1&&o.nextButton.add(o.innerNextButton).addClass("disabled")),t.resetCycle(),"function"==typeof i.callback.onAfterChange&&i.callback.onAfterChange.call(t,t.ui)}},moveTo:function(e){var t=this,o=t.vars,i=t.options,n=i.path.toLowerCase(),a=getViewport(),r=i.effects.switchSpeed;if(o.nextLock||o.prevLock)return!1;var s="next"==e?o.next:o.prev;if(i.linkId&&(o.hashLock=!0,window.location.hash=i.linkId+"/"+s),"next"==e){if(!t.items[s])return!1;var l=o.nextPhoto,c=o.holder,h=o.prevPhoto,p="ilightbox-prev",d="ilightbox-next"}else if("prev"==e){if(!t.items[s])return!1;l=o.prevPhoto,c=o.holder,h=o.nextPhoto,p="ilightbox-next",d="ilightbox-prev"}"function"==typeof i.callback.onBeforeChange&&i.callback.onBeforeChange.call(t,t.ui),"next"==e?o.nextLock=!0:o.prevLock=!0;var u=$("div.ilightbox-header",c),f=$("div.ilightbox-caption",c);if(u.length&&u.stop().fadeOut(r,function(){$(this).remove()}),f.length&&f.stop().fadeOut(r,function(){$(this).remove()}),t.items[s].caption){t.setCaption(t.items[s],l);var v=$("div.ilightbox-caption",l);i.caption.start&&v.fadeIn(r)}if(t.items[s].entryId){t.setHeader(t.items[s],l);var m=$("div.ilightbox-header",l);i.header.start&&m.fadeIn(r)}$.each([l,c,h],function(e,t){t.removeClass("ilightbox-next ilightbox-prev")});var g=l.data("offset"),b=a.width-i.styles.pageOffsetX,x=a.height-i.styles.pageOffsetY-i.headerHeight,w=g.newDims.width,y=g.newDims.height,k=g.thumbsOffset,C=g.diff,I=parseInt(x/2-y/2-C.H-k.H/2),L=parseInt(b/2-w/2-C.W-k.W/2);l.css(transform,gpuAcceleration).animate({top:I,left:L,opacity:1},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){l.css(transform,"")}),$("div.ilightbox-container",l).animate({width:w,height:y},r,o.isSwipe?"easeOutCirc":"easeInOutCirc");var P=c.data("offset"),S=P.object;C=P.diff,w=P.newDims.width,y=P.newDims.height,w=parseInt(w*i.styles["next"==e?"prevScale":"nextScale"]),y=parseInt(y*i.styles["next"==e?"prevScale":"nextScale"]),I="horizontal"==n?parseInt(x/2-S.offsetY-y/2-C.H-k.H/2):parseInt(x-S.offsetX-C.H-k.H/2),"prev"==e?L="horizontal"==n?parseInt(b-S.offsetX-C.W-k.W/2):parseInt(b/2-w/2-C.W-S.offsetY-k.W/2):(I="horizontal"==n?I:parseInt(S.offsetX-C.H-y-k.H/2),L="horizontal"==n?parseInt(S.offsetX-C.W-w-k.W/2):parseInt(b/2-S.offsetY-w/2-C.W-k.W/2)),$("div.ilightbox-container",c).animate({width:w,height:y},r,o.isSwipe?"easeOutCirc":"easeInOutCirc"),c.addClass(p).css(transform,gpuAcceleration).animate({top:I,left:L,opacity:i.styles.prevOpacity},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){c.css(transform,""),$(".ilightbox-thumbnail",o.thumbnails).removeClass("ilightbox-active").eq(s).addClass("ilightbox-active"),t.positionThumbnails(),t.items[s]&&(t.items[s].options.mousewheel?o.lockWheel=!1:o.lockWheel=!0,t.items[s].options.swipe?o.lockSwipe=!1:o.lockSwipe=!0),o.isSwipe=!1,-1!==["iframe","video","pdf"].indexOf(t.items[o.current].type)&&$("div.ilightbox-container",c).empty(),"next"==e?(o.nextPhoto=h,o.prevPhoto=c,o.holder=l,o.nextPhoto.hide(),o.next=o.next+1,o.prev=o.current,o.current=o.current+1,i.infinite&&(o.current>o.total-1&&(o.current=0),o.current==o.total-1&&(o.next=0),0==o.current&&(o.prev=o.total-1)),t.createUI(),t.items[o.next]?t.loadContent(t.items[o.next],"next"):o.nextLock=!1):(o.prevPhoto=h,o.nextPhoto=c,o.holder=l,o.prevPhoto.hide(),o.next=o.current,o.current=o.prev,o.prev=o.current-1,i.infinite&&(o.current==o.total-1&&(o.next=0),0==o.current&&(o.prev=o.total-1)),t.createUI(),t.items[o.prev]?t.loadContent(t.items[o.prev],"prev"):o.prevLock=!1),-1!==["iframe","video","pdf"].indexOf(t.items[o.current].type)&&t.loadContent(t.items[o.current],"current"),i.linkId&&setTimeout(function(){o.hashLock=!1},55),i.infinite||(o.nextButton.add(o.prevButton).add(o.innerPrevButton).add(o.innerNextButton).removeClass("disabled"),0==o.current&&o.prevButton.add(o.innerPrevButton).addClass("disabled"),o.current>=o.total-1&&o.nextButton.add(o.innerNextButton).addClass("disabled")),t.repositionPhoto(),t.resetCycle(),"function"==typeof i.callback.onAfterChange&&i.callback.onAfterChange.call(t,t.ui)}),I="horizontal"==n?getPixel(h,"top"):"next"==e?parseInt(-x/2-h.outerHeight()):parseInt(2*I),L="horizontal"==n?"next"==e?parseInt(-b/2-h.outerWidth()):parseInt(2*L):getPixel(h,"left"),h.css(transform,gpuAcceleration).animate({top:I,left:L,opacity:i.styles.nextOpacity},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){h.css(transform,"")}).addClass(d)},setCaption:function(e,t){var o=this,i=$('<div class="ilightbox-caption panzoom-exclude lightbox-caption-inside"></div>');!1!==o.options.caption.show&&e.caption&&(i.html("<p>"+e.caption+"</p>"),$("div.ilightbox-container",t).append(i))},positionCaption:function(e,t){$(".ilightbox-caption",t)},setHeader:function(e,t){var o=this,i=$('<div class="ilightbox-header panzoom-exclude"></div>');if(!1!==o.options.header.show&&(!0!==o.options.header.show&&i.addClass("ilightbox-header-overlay ilightbox-header-accent"),o.options.WPCP.options.topContainer.hasClass("files")&&i.addClass("ilightbox-header-accent"),e.entryId)){t.prepend(i);var n=o.options.WPCP.element.find('.entry[data-id="'+e.entryId+'"]:first').find(".entry-info");n.clone(!0).appendTo(i),i.find(".entry-action-menu-button ul li a").each(function(e,t){($(t).hasClass("entry_action_view")||$(t).hasClass("entry_action_external_view"))&&$(t).parent().remove()}),i.find(".entry-action-menu-button ul li").length?tippy(i.find(".entry-action-menu-button").get(0),{trigger:"click",content:function(e){return $(e).find(".tippy-content-holder").clone(!0).get(0)},maxWidth:350,allowHTML:!0,placement:self.is_rtl?"bottom-start":"bottom-end",appendTo:i.get(0),moveTransition:"transform 0.2s ease-out",interactive:!0,theme:"wpcloudplugins-"+o.options.WPCP.options.content_skin,onShow:function(e){$(e.popper).find(".tippy-content-holder").removeClass("tippy-content-holder")},onHide:function(e){}}):i.find(".entry-action-menu-button").remove(),i.find(".entry-description-button").length&&(i.find(".entry-description-button").on("click",function(){let i;0===t.find(".wpcp-browser-container-info").length?(o.options.WPCP._renderInfoView(o.options.WPCP.element.find('.entry[data-id="'+e.entryId+'"]:first'),null,!1),i=o.options.WPCP.options.infoContainer.clone(),$(i).on({click:function(e){t.find(".wpcp-info--expanded").addClass("wpcp-info--collapsed").removeClass("wpcp-info--expanded"),o.options.WPCP.options.hasInfoOpen=!1}},".wpcp-info-close, .wpcp-browser-container-info .wpcp-container-overlay"),t.find(".ilightbox-container").append(i)):i=t.find(".wpcp-browser-container-info"),i.removeClass("wpcp-info--collapsed").addClass("wpcp-info--expanded"),o.options.WPCP.element.width()>o.options.WPCP.breakpoints.md&&t.find(".ilightbox-container").addClass("wpcp-has-info"),o.options.WPCP.options.hasInfoOpen=!0}),!0===o.options.WPCP.options.hasInfoOpen&&i.find(".entry-description-button").trigger("click"))}},fullScreenAction:function(){var e=this;e.vars;fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen(document.documentElement):fullScreenApi.requestFullScreen(document.documentElement):e.doFullscreen()},doFullscreen:function(){var e=this,t=e.vars,o=getViewport(),i=e.options;if(i.fullAlone){var n=t.holder,a=e.items[t.current],r=o.width,s=o.height,l=[n,t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.overlay,t.toolbar,t.thumbnails,t.loader],c=[t.nextButton,t.prevButton,t.loader,t.thumbnails];if(t.isInFullScreen)t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=!1,t.overlay.css({opacity:e.options.overlay.opacity}),$.each(c,function(e,t){t.show()}),t.fullScreenButton.attr("title",i.text.enterFullscreen),n.data({naturalWidth:n.data("naturalWidthOld"),naturalHeight:n.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null}),$.each(l,function(e,t){t.removeClass("ilightbox-fullscreen")}),"function"==typeof i.callback.onExitFullScreen&&i.callback.onExitFullScreen.call(e,e.ui);else{if(t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=!0,t.overlay.css({opacity:1}),$.each(c,function(e,t){t.hide()}),t.nextPhoto.css({opacity:0}),t.nextPhoto.css({opacity:0}),t.fullScreenButton.attr("title",i.text.exitFullscreen),-1!=i.fullStretchTypes.indexOf(a.type))n.data({naturalWidthOld:n.data("naturalWidth"),naturalHeightOld:n.data("naturalHeight"),naturalWidth:r,naturalHeight:s});else{o=a.options.fullViewPort||i.fullViewPort||"";var h=r,p=s,d=n.data("naturalWidth"),u=n.data("naturalHeight");if("fill"==o.toLowerCase())p=h/d*u,p<s&&(h=s/u*d,p=s);else if("fit"==o.toLowerCase()){var f=e.getNewDimenstions(h,p,d,u,!0);h=f.width,p=f.height}else if("stretch"==o.toLowerCase())h=h,p=p;else{var v=d>h||u>p;f=e.getNewDimenstions(h,p,d,u,v);h=f.width,p=f.height}n.data({naturalWidthOld:n.data("naturalWidth"),naturalHeightOld:n.data("naturalHeight"),naturalWidth:h,naturalHeight:p})}$.each(l,function(e,t){t.addClass("ilightbox-fullscreen")}),"function"==typeof i.callback.onEnterFullScreen&&i.callback.onEnterFullScreen.call(e,e.ui)}}else t.isInFullScreen?t.isInFullScreen=!1:t.isInFullScreen=!0;e.repositionPhoto(!0)},closeAction:function(){var e=this,t=e.vars,o=e.options,i=function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1};document.body.addEventListener("click",i,!0),document.body.addEventListener("touchend",i,!0),setTimeout(function(){document.body.removeEventListener("click",i,!0),document.body.removeEventListener("touchend",i,!0)},100),$win.off(".iLightBox"),$doc.off(".iLightBox"),t.isInFullScreen&&fullScreenApi.cancelFullScreen(document.documentElement),$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox"),$(".wpcp-pdf-viewer-wrapper").each(function(){$(this).data("wpcp-WPCPPDFViewer")&&$(this).WPCPPDFViewer("destroy")}),o.hide.effect?t.overlay.stop().fadeOut(o.hide.speed,function(){t.overlay.remove(),t.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}):(t.overlay.remove(),t.BODY.removeClass("ilightbox-noscroll").off(".iLightBox"));var n=[t.toolbar,t.holder,t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.loader,t.thumbnails];$.each(n,function(e,t){t.removeAttr("style").remove()}),e.vars.holder=$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==e.options.header.show?"":" staticHeader")+'" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),e.vars.nextPhoto=$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==e.options.header.show?"":" staticHeader")+' ilightbox-next" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),e.vars.prevPhoto=$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+(!0!==e.options.header.show?"":"  staticHeader")+' ilightbox-prev" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),t.dontGenerateThumbs=t.isInFullScreen=!1,window.WPCP_iLightBox=null,o.linkId&&(t.hashLock=!0,removeHash(),setTimeout(function(){t.hashLock=!1},55)),"function"==typeof o.callback.onHide&&o.callback.onHide.call(e,e.ui)},repositionPhoto:function(){var e=this,t=e.vars,o=e.options,i=o.path.toLowerCase(),n=getViewport(),a=n.width,r=n.height,s=t.isInFullScreen&&o.fullAlone||t.isMobile?0:"horizontal"==i?0:t.thumbnails.outerWidth(),l=t.isMobile?t.toolbar.outerHeight():t.isInFullScreen&&o.fullAlone?0:"horizontal"==i?t.thumbnails.outerHeight():0,c=t.isInFullScreen&&o.fullAlone?a:a-o.styles.pageOffsetX,h=t.isInFullScreen&&o.fullAlone?r:r-o.styles.pageOffsetY-o.headerHeight,p="horizontal"==i?parseInt(e.items[t.next]||e.items[t.prev]?2*(o.styles.nextOffsetX+o.styles.prevOffsetX):c/10<=30?30:c/10):parseInt(c/10<=30?30:c/10)+s,d="horizontal"==i?parseInt(h/10<=30?30:h/10)+l:parseInt(e.items[t.next]||e.items[t.prev]?2*(o.styles.nextOffsetX+o.styles.prevOffsetX):h/10<=30?30:h/10),u={type:"current",width:c,height:h,item:e.items[t.current],offsetW:p,offsetH:d,thumbsOffsetW:s,thumbsOffsetH:l,animate:arguments.length,holder:t.holder};e.repositionEl(u),e.items[t.next]&&(u=$.extend(u,{type:"next",item:e.items[t.next],offsetX:o.styles.nextOffsetX,offsetY:o.styles.nextOffsetY,holder:t.nextPhoto}),e.repositionEl(u)),e.items[t.prev]&&(u=$.extend(u,{type:"prev",item:e.items[t.prev],offsetX:o.styles.prevOffsetX,offsetY:o.styles.prevOffsetY,holder:t.prevPhoto}),e.repositionEl(u));var f="horizontal"==i?{left:parseInt(c/2-t.loader.outerWidth()/2)}:{top:parseInt(h/2-t.loader.outerHeight()/2)};t.loader.css(f)},repositionEl:function(e){var t=this,o=t.vars,i=t.options,n=i.path.toLowerCase(),a="current"==e.type&&o.isInFullScreen&&i.fullAlone?e.width:e.width-e.offsetW,r="current"==e.type&&o.isInFullScreen&&i.fullAlone?e.height:e.height-e.offsetH,s=e.item,l=e.item.options,c=e.holder,h=e.offsetX||0,p=e.offsetY||0,d=e.thumbsOffsetW,u=e.thumbsOffsetH;"current"==e.type?("number"==typeof l.width&&l.width&&(a=o.isInFullScreen&&i.fullAlone&&(-1!=i.fullStretchTypes.indexOf(s.type)||l.fullViewPort||i.fullViewPort)?a:l.width>a?a:l.width),"number"==typeof l.height&&l.height&&(r=o.isInFullScreen&&i.fullAlone&&(-1!=i.fullStretchTypes.indexOf(s.type)||l.fullViewPort||i.fullViewPort)?r:l.height>r?r:l.height)):("number"==typeof l.width&&l.width&&(a=l.width>a?a:l.width),"number"==typeof l.height&&l.height&&(r=l.height>r?r:l.height)),i.innerToolbar&&(r=parseInt(r-$(".ilightbox-inner-toolbar",c).outerHeight()));var f="string"==typeof l.width&&-1!=l.width.indexOf("%")?percentToValue(parseInt(l.width.replace("%","")),e.width):c.data("naturalWidth"),v="string"==typeof l.height&&-1!=l.height.indexOf("%")?percentToValue(parseInt(l.height.replace("%","")),e.height):c.data("naturalHeight"),m="string"==typeof l.width&&-1!=l.width.indexOf("%")||"string"==typeof l.height&&-1!=l.height.indexOf("%")?{width:f,height:v}:t.getNewDimenstions(a,r,f,v),g=$.extend({},m,{});"prev"==e.type||"next"==e.type?(f=parseInt(m.width*("next"==e.type?i.styles.nextScale:i.styles.prevScale)),v=parseInt(m.height*("next"==e.type?i.styles.nextScale:i.styles.prevScale))):(f=m.width,v=m.height);var b=parseInt((getPixel(c,"padding-left")+getPixel(c,"padding-right")+getPixel(c,"border-left-width")+getPixel(c,"border-right-width"))/2),x=parseInt((getPixel(c,"padding-top")+getPixel(c,"padding-bottom")+getPixel(c,"border-top-width")+getPixel(c,"border-bottom-width")+($(".ilightbox-inner-toolbar",c).outerHeight()||0))/2);switch(e.type){case"current":var w=parseInt(e.height/2-v/2-x-u/2),y=parseInt(e.width/2-f/2-b-d/2);t.positionCaption(r-v,c);break;case"next":w="horizontal"==n?parseInt(e.height/2-p-v/2-x-u/2):parseInt(e.height-h-x-u/2),y="horizontal"==n?parseInt(e.width-h-b-d/2):parseInt(e.width/2-f/2-b-p-d/2);break;case"prev":w="horizontal"==n?parseInt(e.height/2-p-v/2-x-u/2):parseInt(h-x-v-u/2),y="horizontal"==n?parseInt(h-b-f-d/2):parseInt(e.width/2-p-f/2-b-d/2)}c.data("offset",{top:w,left:y,newDims:g,diff:{W:b,H:x},thumbsOffset:{W:d,H:u},object:e}),e.animate>0&&i.effects.reposition?(c.css(transform,gpuAcceleration).stop().animate({top:w,left:y},i.effects.repositionSpeed,"easeOutCirc",function(){c.css(transform,"")}),$("div.ilightbox-container",c).stop().animate({width:f,height:v},i.effects.repositionSpeed,"easeOutCirc"),$("div.ilightbox-inner-toolbar",c).stop().animate({width:f},i.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})):(c.css({top:w,left:y}),$("div.ilightbox-container",c).css({width:f,height:v}),$("div.ilightbox-inner-toolbar",c).css({width:f}))},resume:function(e){var t=this,o=t.vars,i=t.options;if(!i.slideshow.pauseTime||i.controls.slideshow&&o.total<=1||e<o.isPaused)return;let n=$(t.ui.currentElement).find("audio,video");if(n.length){let e=n.get(0);if(void 0===navigator.userActivation||navigator.userActivation.hasBeenActive||(e.muted=!0),!e.ended)return 0===e.readyState&&(e.autoplay=!0),void(e.onended=function(e){t.resume()})}o.isPaused=0,o.cycleID&&(o.cycleID=clearTimeout(o.cycleID)),o.cycleID=setTimeout(function(){o.current==o.total-1?t.goTo(0):t.moveTo("next")},i.slideshow.pauseTime)},pause:function(e){var t=this,o=t.vars;t.options;e<o.isPaused||(o.isPaused=e||100,o.cycleID&&(o.cycleID=clearTimeout(o.cycleID)))},resetCycle:function(){var e=this,t=e.vars,o=e.options;o.controls.slideshow&&t.cycleID&&!t.isPaused&&e.resume()},getNewDimenstions:function(e,t,o,i,n){var a=this;factor=e?t?min(e/o,t/i):e/o:t/i,n||(factor>a.options.maxScale?factor=a.options.maxScale:factor<a.options.minScale&&(factor=a.options.minScale));var r=a.options.keepAspectRatio?round(o*factor):e,s=a.options.keepAspectRatio?round(i*factor):t;return{width:r,height:s,ratio:factor}},setOption:function(e){var t=this;t.options=$.extend(!0,t.options,e||{}),t.refresh()},availPlugins:function(){var e=this,t=document.createElement("video");e.plugins={html5H264:!(!t.canPlayType||!t.canPlayType("video/mp4").replace(/no/,"")),html5WebM:!(!t.canPlayType||!t.canPlayType("video/webm").replace(/no/,"")),html5Vorbis:!(!t.canPlayType||!t.canPlayType("video/ogg").replace(/no/,""))}},addContent:function(e,t){var o=this;switch(t.type){case"video":var i=!1,n=t.videoType,a=t.options.html5video;("video/mp4"==n||"mp4"==t.ext||"m4v"==t.ext||a.h264)&&o.plugins.html5H264?(t.ext="mp4",t.URL=a.h264||t.URL):a.webm&&o.plugins.html5WebM?(t.ext="webm",t.URL=a.webm||t.URL):a.ogg&&o.plugins.html5Vorbis&&(t.ext="ogv",t.URL=a.ogg||t.URL),!o.plugins.html5H264||"video/mp4"!=n&&"mp4"!=t.ext&&"m4v"!=t.ext?!o.plugins.html5WebM||"video/webm"!=n&&"webm"!=t.ext?!o.plugins.html5Vorbis||"video/ogg"!=n&&"ogv"!=t.ext||(i=!0,n="video/ogg"):(i=!0,n="video/webm"):(i=!0,n="video/mp4"),r=i?$("<video />",{width:"100%",height:"100%",preload:a.preload,autoplay:a.autoplay,poster:a.poster,controls:a.controls,controlsList:"nodownload"}).append($("<source />",{src:t.URL,type:n})):$("<span />",{class:"ilightbox-alert",html:o.options.errors.loadContents});break;case"iframe":r=$("<iframe />").attr({width:"number"==typeof t.options.width&&t.options.width&&"1"==o.options.minScale&&"1"==o.options.maxScale?t.options.width:"100%",height:"number"==typeof t.options.height&&t.options.height&&"1"==o.options.minScale&&"1"==o.options.maxScale?t.options.height:"100%",src:t.URL,frameborder:0,hspace:0,vspace:0,scrolling:supportTouch?"auto":"scroll",webkitAllowFullScreen:"",mozallowfullscreen:"",allowFullScreen:""});break;case"inline":r=$('<div class="ilightbox-wrapper"></div>').html($(t.URL).clone(!0));break;case"html":var r,s=t.URL;if(s[0].nodeName)r=$('<div class="ilightbox-wrapper"></div>').html(s);else{var l=$(t.URL),c=l.selector?$("<div>"+l+"</div>"):l;r=$('<div class="ilightbox-wrapper"></div>').html(c)}break;default:r=$("<span />",{class:"ilightbox-alert",html:o.options.errors.loadContents})}return $("div.ilightbox-container",e).empty().html(r),"video"===r[0].tagName.toLowerCase()&&isWebKit&&setTimeout(function(){var e=r[0].currentSrc+"&"+floor(3e4*random());r[0].currentSrc=e,r[0].src=e}),r},hashChangeHandler:function(e){var t=this,o=t.vars,i=t.options,n=e||window.location.href,a=parseURI(n).hash,r=a.split("/"),s=r[1];if(!(o.hashLock||"#"+i.linkId!=r[0]&&a.length>1))if(s){var l=r[1]||0;if(t.items[l]){var c=$(".ilightbox-overlay");c.length&&c.attr("linkid")==i.linkId?t.goTo(l):t.itemsObject[l].trigger(supportTouch?"itap":"click")}else{c=$(".ilightbox-overlay");c.length&&t.closeAction()}}else{c=$(".ilightbox-overlay");c.length&&t.closeAction()}}},$.fn.WPCP_iLightBox=function(){var e=arguments,t=$.isPlainObject(e[0])?e[0]:e[1],o=$.isArray(e[0])||"string"==typeof e[0]?e[0]:e[1];t||(t={});var i=$.extend(!0,{attr:"href",path:"vertical",skin:"dark",linkId:!1,infinite:!1,startFrom:0,randomStart:!1,keepAspectRatio:!0,maxScale:1,minScale:.2,innerToolbar:!1,headerHeight:50,WPCP:null,smartRecognition:!1,mobileOptimizer:!0,fullAlone:!0,fullViewPort:null,fullStretchTypes:"video",overlay:{blur:!0,opacity:.85},controls:{arrows:!1,slideshow:!1,toolbar:!0,fullscreen:!0,thumbnail:!0,keyboard:!0,mousewheel:!0,swipe:!0},keyboard:{left:!0,right:!0,up:!0,down:!0,esc:!0,shift_enter:!0},show:{effect:!0,speed:300,title:!0},hide:{effect:!0,speed:300},header:{start:!0,show:!0,hide:!0},caption:{start:!0,show:"mouseenter",hide:"mouseleave"},styles:{pageOffsetX:0,pageOffsetY:0,nextOffsetX:45,nextOffsetY:0,nextOpacity:1,nextScale:1,prevOffsetX:45,prevOffsetY:0,prevOpacity:1,prevScale:1},thumbnails:{maxWidth:120,maxHeight:80,normalOpacity:1,activeOpacity:.6},effects:{reposition:!0,repositionSpeed:200,switchSpeed:500,loadedFadeSpeed:180,fadeSpeed:200},slideshow:{pauseTime:5e3,pauseOnHover:!1,startPaused:!0},text:{close:"Press Esc to close",enterFullscreen:"Enter Fullscreen (Shift+Enter)",exitFullscreen:"Exit Fullscreen (Shift+Enter)",slideShow:"Slideshow",next:"Next",previous:"Previous"},errors:{loadImage:"An error occurred when trying to load photo.",loadContents:"An error occurred when trying to load contents."},callback:{}},t),n=!(!$.isArray(o)&&"string"!=typeof o);if(o=$.isArray(o)?o:new Array,"string"==typeof e[0]&&(o[0]=e[0]),version_compare($.fn.jquery,"1.8",">=")){var a=new WPCP_iLightBox($(this),i,o,n);return{close:function(){a.closeAction()},fullscreen:function(){a.fullScreenAction()},moveNext:function(){a.moveTo("next")},movePrev:function(){a.moveTo("prev")},goTo:function(e){a.goTo(e)},refresh:function(){a.refresh()},reposition:function(){arguments.length>0?a.repositionPhoto(!0):a.repositionPhoto()},setOption:function(e){a.setOption(e)},destroy:function(){a.closeAction(),a.dispatchItemsEvents()}}}throw"The jQuery version that was loaded is too old. iLightBox requires jQuery 1.8+"},$.WPCP_iLightBox=function(){return $.fn.WPCP_iLightBox(arguments[0],arguments[1])},$.extend($.easing,{easeInCirc:function(e,t,o,i,n){return-i*(sqrt(1-(t/=n)*t)-1)+o},easeOutCirc:function(e,t,o,i,n){return i*sqrt(1-(t=t/n-1)*t)+o},easeInOutCirc:function(e,t,o,i,n){return(t/=n/2)<1?-i/2*(sqrt(1-t*t)-1)+o:i/2*(sqrt(1-(t-=2)*t)+1)+o}}),function(){$.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(e,t){$.fn[t]=function(e){return e?this.on(t,e):this.trigger(t)}});var e={startEvent:"pointerdown.iTap",endEvent:"pointerup.iTap"};$.event.special.itap={setup:function(){var t,o,i,n,a=this,r=$(this),s=r.parents(".ajax-filelist");r.on(e.startEvent,function(l){t=getScrollXY(),o={x:s.scrollTop(),y:s.scrollLeft()},r.one(e.endEvent,function(e){if(i=getScrollXY(),n={x:s.scrollTop(),y:s.scrollLeft()},!o||!n||o.x==n.x&&o.y==n.y){var r=e||window.event;e=$.event.fix(r),e.type="itap",t&&i&&t.x==i.x&&t.y==i.y&&($.event.dispatch||$.event.handle).call(a,e),t=i=undefined}})})},teardown:function(){$(this).off(e.startEvent)}}}(),doc=document,request=Element.prototype.requestFullscreen||Element.prototype.webkitRequestFullscreen||Element.prototype.mozRequestFullScreen||Element.prototype.msRequestFullscreen,exit=doc.exitFullscreen||doc.webkitExitFullscreen||doc.mozCancelFullScreen||doc.msExitFullscreen,hasNative=!(!request||!exit),eventName="onfullscreenchange"in doc?"fullscreenchange":"onwebkitfullscreenchange"in doc?"webkitfullscreenchange":"onmozfullscreenchange"in doc?"mozfullscreenchange":"onmsfullscreenchange"in doc?"MSFullscreenChange":"",fullScreenApi={supportsFullScreen:hasNative,isFullScreen:function(){return!!(doc.fullscreenElement||doc.webkitFullscreenElement||doc.mozFullScreenElement||doc.msFullscreenElement)},requestFullScreen:function(e){request&&request.call(e)},cancelFullScreen:function(){exit&&exit.call(doc)},fullScreenEventName:eventName},function(){function e(e){for(var i=0,n=t.length;i<n;i++){var a=t[i]?t[i]+e.charAt(0).toUpperCase()+e.slice(1):e;if(o.style[a]!==undefined)return a}}var t=["","webkit","moz","ms","o"],o=document.createElement("div");transform=e("transform")||"",gpuAcceleration=e("perspective")?"translateZ(0) ":""}(),function(){function e(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var t,o=document,i=$.event.special,n=o.documentMode,a="oniLightBoxHashChange"in window&&(void 0===n||7<n);$.fn.iLightBoxHashChange=function(e){return e?this.on("iLightBoxHashChange",e):this.trigger("iLightBoxHashChange")},$.fn.iLightBoxHashChange.delay=50,i.iLightBoxHashChange=$.extend(i.iLightBoxHashChange,{setup:function(){if(a)return!1;$(t.start)},teardown:function(){if(a)return!1;$(t.stop)}}),t=function(){function t(){var i=e(),a=s(n);i!==n?(r(n=i,a),$(window).trigger("iLightBoxHashChange")):a!==n&&(location.href=location.href.replace(/#.*/,"")+a),o=setTimeout(t,$.fn.iLightBoxHashChange.delay)}var o,i={},n=e(),a=function(e){return e},r=a,s=a;return i.start=function(){o||t()},i.stop=function(){o&&clearTimeout(o),o=void 0},i}()}()})(jQuery,this);
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).RModal=o()}(this,(function(){var t=function(t){return(""+(t||"")).split(" ").filter((function(t){return!!t}))},o=function(o,e){t(e).forEach((function(t){o.classList.add(t)}))},e=function(o,e){t(e).forEach((function(t){o.classList.remove(t)}))};return function(){function t(t,o){var e=this;void 0===o&&(o={}),this.version="1.1.0",this.focusOutElement=null,this.opened=!1,this.opts={bodyClass:"modal-open",dialogClass:"modal-dialog",dialogOpenClass:"bounceInDown",dialogCloseClass:"bounceOutUp",focus:!0,focusElements:["a[href]","area[href]","input:not([disabled]):not([type=hidden])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","*[tabindex]","*[contenteditable]"],escapeClose:!0,content:void 0,closeTimeout:500},Object.keys(o).forEach((function(t){var s=t;void 0!==o[s]&&(e.opts[s]=o[s])})),this.overlay=t,this.dialog=t.querySelector("."+this.opts.dialogClass),this.opts.content&&this.content(this.opts.content)}return t.prototype.open=function(t){var o=this;if(this.content(t),"function"!=typeof this.opts.beforeOpen)return this._doOpen();this.opts.beforeOpen((function(){o._doOpen()}))},t.prototype._doOpen=function(){o(document.body,this.opts.bodyClass),e(this.dialog,this.opts.dialogCloseClass),o(this.dialog,this.opts.dialogOpenClass),this.overlay.style.display="block",this.opts.focus&&(this.focusOutElement=document.activeElement,this.focus()),"function"==typeof this.opts.afterOpen&&this.opts.afterOpen(),this.opened=!0},t.prototype.close=function(){var t=this;if("function"!=typeof this.opts.beforeClose)return this._doClose();this.opts.beforeClose((function(){t._doClose()}))},t.prototype._doClose=function(){var t=this;e(this.dialog,this.opts.dialogOpenClass),o(this.dialog,this.opts.dialogCloseClass),e(document.body,this.opts.bodyClass),this.opts.focus&&this.focus(this.focusOutElement),setTimeout((function(){t.overlay.style.display="none","function"==typeof t.opts.afterClose&&t.opts.afterClose(),t.opened=!1}),this.opts.closeTimeout)},t.prototype.content=function(t){if(void 0===t)return this.dialog.innerHTML;this.dialog.innerHTML=t},t.prototype.elements=function(t,o){return o=o||window.navigator.appVersion.indexOf("MSIE 9.0")>-1,t=Array.isArray(t)?t.join(","):t,[].filter.call(this.dialog.querySelectorAll(t),(function(t){if(o){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}return null!==t.offsetParent}))},t.prototype.focus=function(t){(t=t||this.elements(this.opts.focusElements||"")[0]||this.dialog.firstChild)&&"function"==typeof t.focus&&t.focus()},t.prototype.keydown=function(t){this.opts.escapeClose&&27==t.which&&this.close();var o=function(){t.preventDefault(),t.stopPropagation()};if(this.opened&&9==t.which&&this.dialog.contains(t.target)){var e=this.elements(this.opts.focusElements||""),s=e[0],i=e[e.length-1];s==i?o():t.target==s&&t.shiftKey?(o(),i.focus()):t.target!=i||t.shiftKey||(o(),s.focus())}},t.version="1.1.0",t}()}));
(function ($){
$.fn.extend({
animateCss: function (animationName){
var animationEnd='webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$(this).addClass('animated ' + animationName).one(animationEnd, function (){
$(this).removeClass('animated ' + animationName);
});
}});
})(jQuery);
var Shareon=function(r){"use strict";const o={bluesky:t=>`https://bsky.app/intent/compose?text=${t.text||t.title}%0A%0A${t.url}`,facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${t.url}${t.hashtags?`&hashtag=%23${t.hashtags.split("%2C")[0]}`:""}`,fediverse:t=>`https://${t.s2fInstance}/?text=${t.title}%0D%0A${t.url}${t.text?`%0D%0A%0D%0A${t.text}`:""}${t.via?`%0D%0A%0D%0A${t.via}`:""}`,email:t=>`mailto:?subject=${t.title}&body=${t.url}`,hackernews:t=>`https://news.ycombinator.com/submitlink?u=${t.url}&t=${t.title}`,linkedin:t=>`https://www.linkedin.com/sharing/share-offsite/?url=${t.url}`,mastodon:t=>`https://toot.kytta.dev/?text=${t.title}%0D%0A${t.url}${t.text?`%0D%0A%0D%0A${t.text}`:""}${t.via?`%0D%0A%0D%0A${t.via}`:""}`,messenger:t=>`https://www.facebook.com/dialog/send?app_id=${t.fbAppId}&link=${t.url}&redirect_uri=${t.url}`,odnoklassniki:t=>`https://connect.ok.ru/offer?url=${t.url}&title=${t.title}${t.media?`&imageUrl=${t.media}`:""}`,pinterest:t=>`https://pinterest.com/pin/create/button/?url=${t.url}&description=${t.title}${t.media?`&media=${t.media}`:""}`,pocket:t=>`https://getpocket.com/edit.php?url=${t.url}`,reddit:t=>`https://www.reddit.com/submit?title=${t.title}&url=${t.url}`,teams:t=>`https://teams.microsoft.com/share?href=${t.url}${t.text?`&msgText=${t.text}`:""}`,telegram:t=>`https://telegram.me/share/url?url=${t.url}${t.text?`&text=${t.text}`:""}`,tumblr:t=>`https://www.tumblr.com/widgets/share/tool?posttype=link${t.hashtags?`&tags=${t.hashtags}`:""}&title=${t.title}&content=${t.url}&canonicalUrl=${t.url}${t.text?`&caption=${t.text}`:""}${t.via?`&show-via=${t.via}`:""}`,twitter:t=>`https://twitter.com/intent/tweet?url=${t.url}&text=${t.title}${t.via?`&via=${t.via}`:""}${t.hashtags?`&hashtags=${t.hashtags}`:""}`,viber:t=>`viber://forward?text=${t.title}%0D%0A${t.url}${t.text?`%0D%0A%0D%0A${t.text}`:""}`,vkontakte:t=>`https://vk.com/share.php?url=${t.url}&title=${t.title}${t.media?`&image=${t.media}`:""}`,whatsapp:t=>`https://wa.me/?text=${t.title}%0D%0A${t.url}${t.text?`%0D%0A%0D%0A${t.text}`:""}`},p=t=>()=>{window.open(t,"_blank","noopener,noreferrer")},l=()=>{const t=document.querySelectorAll(".shareon");for(const a of t)for(const e of a.children)if(e){const u=e.classList.length;for(let n=0;n<u;n+=1){const i=e.classList.item(n);if(i==="copy-url"&&e.addEventListener("click",()=>{const s=e.dataset.url||a.dataset.url||window.location.href;navigator.clipboard.writeText(s),e.classList.add("done"),setTimeout(()=>{e.classList.remove("done")},1e3)}),i==="print"&&e.addEventListener("click",()=>{window.print()}),i==="web-share"){const s={title:e.dataset.title||a.dataset.title||document.title,text:e.dataset.text||a.dataset.text||"",url:e.dataset.url||a.dataset.url||window.location.href};navigator.canShare&&navigator.canShare(s)?e.addEventListener("click",()=>{navigator.share(s)}):e.style.display="none"}if(Object.prototype.hasOwnProperty.call(o,i)){const s={url:encodeURIComponent(e.dataset.url||a.dataset.url||window.location.href),title:encodeURIComponent(e.dataset.title||a.dataset.title||document.title),media:encodeURIComponent(e.dataset.media||a.dataset.media||""),text:encodeURIComponent(e.dataset.text||a.dataset.text||""),via:encodeURIComponent(e.dataset.via||a.dataset.via||""),hashtags:encodeURIComponent(e.dataset.hashtags||a.dataset.hashtags||""),fbAppId:encodeURIComponent(e.dataset.fbAppId||a.dataset.fbAppId||""),s2fInstance:encodeURIComponent(e.dataset.s2fInstance||a.dataset.s2fInstance||"s2f.kytta.dev")},h=o[i](s);e.tagName.toLowerCase()==="a"?(e.setAttribute("href",h),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank")):e.addEventListener("click",p(h));break}}}},c=document.currentScript;return c&&c.hasAttribute("init")&&l(),r.init=l,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({});
((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).WPCPPanzoom=e()})(this,function(){var a,X=function(){return(X=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},i=("undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}),"undefined"!=typeof document&&!!document.documentMode);var c=["webkit","moz","ms"],l={};function Y(t){if(l[t])return l[t];var e=a=a||document.createElement("div").style;if(t in e)return l[t]=t;for(var n=t[0].toUpperCase()+t.slice(1),o=c.length;o--;){var r="".concat(c[o]).concat(n);if(r in e)return l[t]=r}}function o(t,e){return parseFloat(e[Y(t)])||0}function s(t,e,n){void 0===n&&(n=window.getComputedStyle(t));t="border"===e?"Width":"";return{left:o("".concat(e,"Left").concat(t),n),right:o("".concat(e,"Right").concat(t),n),top:o("".concat(e,"Top").concat(t),n),bottom:o("".concat(e,"Bottom").concat(t),n)}}function C(t,e,n){t.style[Y(e)]=n}function N(t){var e=t.parentNode,n=window.getComputedStyle(t),o=window.getComputedStyle(e),r=t.getBoundingClientRect(),a=e.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:s(t,"margin",n),border:s(t,"border",n)},parent:{style:o,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:s(e,"padding",o),border:s(e,"border",o)}}}var T={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function L(t,e,n,o){T[t].split(" ").forEach(function(t){e.addEventListener(t,n,o)})}function V(t,e,n){T[t].split(" ").forEach(function(t){e.removeEventListener(t,n)})}function G(t,e){for(var n=t.length;n--;)if(t[n].pointerId===e.pointerId)return n;return-1}function I(t,e){if(e.touches)for(var n=0,o=0,r=e.touches;o<r.length;o++){var a=r[o];a.pointerId=n++,I(t,a)}else-1<(n=G(t,e))&&t.splice(n,1),t.push(e)}function R(t){for(var e,n=(t=t.slice(0)).pop();e=t.pop();)n={clientX:(e.clientX-n.clientX)/2+n.clientX,clientY:(e.clientY-n.clientY)/2+n.clientY};return n}function W(t){var e;return t.length<2?0:(e=t[0],t=t[1],Math.sqrt(Math.pow(Math.abs(t.clientX-e.clientX),2)+Math.pow(Math.abs(t.clientY-e.clientY),2)))}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?T={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(T={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var Z=/^http:[\w\.\/]+svg$/;var q={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:function(t){t.preventDefault(),t.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(t,e,n){var o=e.x,r=e.y,a=e.isSVG;C(t,"transform","scale(".concat(e.scale,") translate(").concat(o,"px, ").concat(r,"px)")),a&&i&&(e=window.getComputedStyle(t).getPropertyValue("transform"),t.setAttribute("transform",e))},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function t(u,f){if(!u)throw new Error("Panzoom requires an element as an argument");if(1!==u.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!(t=>{for(var e=t;e&&e.parentNode;){if(e.parentNode===document)return 1;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}})(u))throw new Error("Panzoom should be called on elements that have been attached to the DOM");f=X(X({},q),f);t=u;var t,l=Z.test(t.namespaceURI)&&"svg"!==t.nodeName.toLowerCase(),n=u.parentNode;n.style.overflow=f.overflow,n.style.userSelect="none",n.style.touchAction=f.touchAction,(f.canvas?n:u).style.cursor=f.cursor,u.style.userSelect="none",u.style.touchAction=f.touchAction,C(u,"transformOrigin","string"==typeof f.origin?f.origin:l?"0 0":"50% 50%");var r,a,i,c,s,d,m=0,h=0,v=1,p=!1;function g(t,e,n){n.silent||(n=new CustomEvent(t,{detail:e}),u.dispatchEvent(n))}function y(o,r,t){var a={x:m,y:h,scale:v,isSVG:l,originalEvent:t};return requestAnimationFrame(function(){var t,e,n;"boolean"==typeof r.animate&&(r.animate?(t=u,e=r,n=Y("transform"),C(t,"transition","".concat(n," ").concat(e.duration,"ms ").concat(e.easing))):C(u,"transition","none")),r.setTransform(u,a,r),g(o,a,r),g("panzoomchange",a,r)}),a}function w(t,e,n,o){var r,a,i,c,l,s,d=X(X({},f),o),p={x:m,y:h,opts:d};return(null!=o&&o.force||!(d.disablePan||d.panOnlyWhenZoomed&&v===d.startScale))&&(t=parseFloat(t),e=parseFloat(e),d.disableXAxis||(p.x=(d.relative?m:0)+t),d.disableYAxis||(p.y=(d.relative?h:0)+e),d.contain&&(t=((e=(t=(o=N(u)).elem.width/v)*n)-t)/2,a=((r=(a=o.elem.height/v)*n)-a)/2,"inside"===d.contain?(i=(-o.elem.margin.left-o.parent.padding.left+t)/n,c=(o.parent.width-e-o.parent.padding.left-o.elem.margin.left-o.parent.border.left-o.parent.border.right+t)/n,p.x=Math.max(Math.min(p.x,c),i),l=(-o.elem.margin.top-o.parent.padding.top+a)/n,s=(o.parent.height-r-o.parent.padding.top-o.elem.margin.top-o.parent.border.top-o.parent.border.bottom+a)/n,p.y=Math.max(Math.min(p.y,s),l)):"outside"===d.contain&&(i=(-(e-o.parent.width)-o.parent.padding.left-o.parent.border.left-o.parent.border.right+t)/n,c=(t-o.parent.padding.left)/n,p.x=Math.max(Math.min(p.x,c),i),l=(-(r-o.parent.height)-o.parent.padding.top-o.parent.border.top-o.parent.border.bottom+a)/n,s=(a-o.parent.padding.top)/n,p.y=Math.max(Math.min(p.y,s),l))),d.roundPixels)&&(p.x=Math.round(p.x),p.y=Math.round(p.y)),p}function b(t,e){var n,o,r,a=X(X({},f),e),i={scale:v,opts:a};return(null!=e&&e.force||!a.disableZoom)&&(e=f.minScale,n=f.maxScale,a.contain&&(r=(a=N(u)).elem.width/v,o=a.elem.height/v,1<r)&&1<o&&(r=(a.parent.width-a.parent.border.left-a.parent.border.right)/r,a=(a.parent.height-a.parent.border.top-a.parent.border.bottom)/o,"inside"===f.contain?n=Math.min(n,r,a):"outside"===f.contain&&(e=Math.max(e,r,a))),i.scale=Math.min(Math.max(t,e),n)),i}function x(t,e,n,o){t=w(t,e,v,n);return m!==t.x||h!==t.y?(m=t.x,h=t.y,y("panzoompan",t.opts,o)):{x:m,y:h,scale:v,isSVG:l,originalEvent:o}}function S(t,e,n){var o,r=b(t,e),a=r.opts;if(null!=e&&e.force||!a.disableZoom)return t=r.scale,e=m,r=h,a.focal&&(e=((o=a.focal).x/t-o.x/v+m*t)/t,r=(o.y/t-o.y/v+h*t)/t),o=w(e,r,t,{relative:!1,force:!0}),m=o.x,h=o.y,v=t,y("panzoomzoom",a,n)}function e(t,e){e=X(X(X({},f),{animate:!0}),e);return S(v*Math.exp((t?1:-1)*e.step),e)}function E(t,e,n,o){var r=N(u),a=r.parent.width-r.parent.padding.left-r.parent.padding.right-r.parent.border.left-r.parent.border.right,i=r.parent.height-r.parent.padding.top-r.parent.padding.bottom-r.parent.border.top-r.parent.border.bottom,c=e.clientX-r.parent.left-r.parent.padding.left-r.parent.border.left-r.elem.margin.left,e=e.clientY-r.parent.top-r.parent.padding.top-r.parent.border.top-r.elem.margin.top,r=(l||(c-=r.elem.width/v/2,e-=r.elem.height/v/2),{x:c/a*(a*t),y:e/i*(i*t)});return S(t,X(X({},n),{animate:!1,focal:r}),o)}S(f.startScale,{animate:!1,force:!0}),setTimeout(function(){x(f.startX,f.startY,{animate:!1,force:!0})});var M=[];function o(t){((t,e)=>{for(var n,o,r=t;null!=r;r=r.parentNode)if(n=r,o=e.excludeClass,1===n.nodeType&&-1<" ".concat((n.getAttribute("class")||"").trim()," ").indexOf(" ".concat(o," "))||-1<e.exclude.indexOf(r))return 1})(t.target,f)||(I(M,t),p=!0,f.handleStartEvent(t),g("panzoomstart",{x:r=m,y:a=h,scale:v,isSVG:l,originalEvent:t},f),t=R(M),i=t.clientX,c=t.clientY,s=v,d=W(M))}function A(t){var e,n,o;p&&void 0!==r&&void 0!==a&&void 0!==i&&void 0!==c&&(I(M,t),e=R(M),n=1<M.length,o=v,n&&(0===d&&(d=W(M)),E(o=b((W(M)-d)*f.step/80+s).scale,e,{animate:!1},t)),n&&!f.pinchAndPan||x(r+(e.clientX-i)/o,a+(e.clientY-c)/o,{animate:!1},t))}function P(t){1===M.length&&g("panzoomend",{x:m,y:h,scale:v,isSVG:l,originalEvent:t},f);var e=M;if(t.touches)for(;e.length;)e.pop();else{t=G(e,t);-1<t&&e.splice(t,1)}p&&(p=!1,r=a=i=c=void 0)}var O=!1;function z(){O||(O=!0,L("down",f.canvas?n:u,o),L("move",document,A,{passive:!0}),L("up",document,P,{passive:!0}))}return f.noBind||z(),{bind:z,destroy:function(){O=!1,V("down",f.canvas?n:u,o),V("move",document,A),V("up",document,P)},eventNames:T,getPan:function(){return{x:m,y:h}},getScale:function(){return v},getOptions:function(){var t,e=f,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},handleDown:o,handleMove:A,handleUp:P,pan:x,reset:function(t){var t=X(X(X({},f),{animate:!0,force:!0}),t),e=(v=b(t.startScale,t).scale,w(t.startX,t.startY,v,t));return m=e.x,h=e.y,y("panzoomreset",t)},resetStyle:function(){n.style.overflow="",n.style.userSelect="",n.style.touchAction="",n.style.cursor="",u.style.cursor="",u.style.userSelect="",u.style.touchAction="",C(u,"transformOrigin","")},setOptions:function(t){for(var e in t=void 0===t?{}:t)t.hasOwnProperty(e)&&(f[e]=t[e]);(t.hasOwnProperty("cursor")||t.hasOwnProperty("canvas"))&&(n.style.cursor=u.style.cursor="",(f.canvas?n:u).style.cursor=f.cursor),t.hasOwnProperty("overflow")&&(n.style.overflow=t.overflow),t.hasOwnProperty("touchAction")&&(n.style.touchAction=t.touchAction,u.style.touchAction=t.touchAction)},setStyle:function(t,e){return C(u,t,e)},zoom:S,zoomIn:function(t){return e(!0,t)},zoomOut:function(t){return e(!1,t)},zoomToPoint:E,zoomWithWheel:function(t,e){t.preventDefault();var e=X(X(X({},f),e),{animate:!1}),n=0===t.deltaY&&t.deltaX?t.deltaX:t.deltaY;return E(b(v*Math.exp((n<0?1:-1)*e.step/3),e).scale,t,e,t)}}}return t.defaultOptions=q,t});
const WPCPhashCode=s => s.split('').reduce((a,b)=> (((a << 5) - a) + b.charCodeAt(0))|0, 0)
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand (t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
!function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top<h,s=g.bottom>0&&g.bottom<=h,c=g.left>=0&&g.left<f,a=g.right>0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery);
!function(s,e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("undefined"!=typeof exports)e(require("jquery"));else{var t={exports:{}};e(s.jQuery),s.jqueryAsBreadcrumbsEs=t.exports}}(this,function(s){"use strict";function e(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}var t=function(s){return s&&s.__esModule?s:{default:s}}(s),i=function(){function s(s,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}return function(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),e}}(),n={namespace:"breadcrumb",overflow:"left",responsive:!0,ellipsisText:"&#8230;",ellipsisClass:null,hiddenClass:"is-hidden",dropdownClass:null,dropdownMenuClass:null,dropdownItemClass:null,dropdownItemDisableClass:"disabled",toggleClass:null,toggleIconClass:"caret",getItems:function(s){return s.children()},getItemLink:function(s){return s.find("a")},ellipsis:function(s,e){return'<li class="'+s.ellipsisClass+'">'+e+"</li>"},dropdown:function(s){var e="dropdown-menu";return"right"===this.options.overflow&&(e+=" dropdown-menu-right"),'<li class="dropdown '+s.dropdownClass+'">\n      <a href="javascript:void(0);" class="'+s.toggleClass+'" data-toggle="dropdown">\n        <i class="'+s.toggleIconClass+'"></i>\n      </a>\n      <ul class="'+e+" "+s.dropdownMenuClass+'"></ul>\n    </li>'},dropdownItem:function(s,e,t){return t?'<li class="'+s.dropdownItemClass+'"><a href="'+t+'">'+e+"</a></li>":'<li class="'+s.dropdownItemClass+" "+s.dropdownItemDisableClass+'"><a href="#">'+e+"</a></li>"},onInit:null,onReady:null},o=0,l=function(){function s(i,l){e(this,s),this.element=i,this.$element=(0,t.default)(i),this.options=t.default.extend({},n,l,this.$element.data()),this.namespace=this.options.namespace,this.$element.addClass(this.namespace),this.classes={toggleClass:this.options.toggleClass?this.options.toggleClass:this.namespace+"-toggle",toggleIconClass:this.options.toggleIconClass,dropdownClass:this.options.dropdownClass?this.options.dropdownClass:this.namespace+"-dropdown",dropdownMenuClass:this.options.dropdownMenuClass?this.options.dropdownMenuClass:this.namespace+"-dropdown-menu",dropdownItemClass:this.options.dropdownItemClass?this.options.dropdownItemClass:"",dropdownItemDisableClass:this.options.dropdownItemDisableClass?this.options.dropdownItemDisableClass:"",ellipsisClass:this.options.ellipsisClass?this.options.ellipsisClass:this.namespace+"-ellipsis",hiddenClass:this.options.hiddenClass},this.initialized=!1,this.instanceId=++o,this.$children=this.options.getItems(this.$element),this.$firstChild=this.$children.eq(0),this.$dropdown=null,this.$dropdownMenu=null,this.gap=6,this.items=[],this._trigger("init"),this.init()}return i(s,[{key:"init",value:function(){var s=this;this.$element.addClass(this.namespace+"-"+this.options.overflow),this._prepareItems(),this._createDropdown(),this._createEllipsis(),this.render(),this.options.responsive&&(0,t.default)(window).on(this.eventNameWithId("resize"),this._throttle(function(){s.resize()},250)),this.initialized=!0,this._trigger("ready")}},{key:"_prepareItems",value:function(){var s=this;this.$children.each(function(){var e=(0,t.default)(this),i=s.options.getItemLink(e),n=(0,t.default)(s.options.dropdownItem.call(s,s.classes,e.text(),i.attr("href")));s.items.push({$this:e,outerWidth:e.outerWidth(),$item:n})}),"left"===this.options.overflow&&this.items.reverse()}},{key:"_createDropdown",value:function(){this.$dropdown=(0,t.default)(this.options.dropdown.call(this,this.classes)).addClass(this.classes.hiddenClass).appendTo(this.$element),this.$dropdownMenu=this.$dropdown.find("."+this.classes.dropdownMenuClass),this._createDropdownItems(),"right"===this.options.overflow?this.$dropdown.appendTo(this.$element):this.$dropdown.prependTo(this.$element)}},{key:"_createDropdownItems",value:function(){for(var s=0;s<this.items.length;s++)this.items[s].$item.appendTo(this.$dropdownMenu).addClass(this.classes.hiddenClass)}},{key:"_createEllipsis",value:function(){this.options.ellipsisText&&(this.$ellipsis=(0,t.default)(this.options.ellipsis.call(this,this.classes,this.options.ellipsisText)).addClass(this.classes.hiddenClass),"right"===this.options.overflow?this.$ellipsis.insertBefore(this.$dropdown):this.$ellipsis.insertAfter(this.$dropdown))}},{key:"render",value:function(){for(var s=this.getDropdownWidth(),e=0,t=this.getConatinerWidth(),i=!1,n=0;n<this.items.length;n++)(e+=this.items[n].outerWidth)+s>t?(i=!0,this._showDropdownItem(n)):this._hideDropdownItem(n);i?(this.$ellipsis.removeClass(this.classes.hiddenClass),this.$dropdown.removeClass(this.classes.hiddenClass)):(this.$ellipsis.addClass(this.classes.hiddenClass),this.$dropdown.addClass(this.classes.hiddenClass)),this._trigger("update")}},{key:"resize",value:function(){this.render()}},{key:"getDropdownWidth",value:function(){return this.$dropdown.outerWidth()+(this.options.ellipsisText?this.$ellipsis.outerWidth():0)}},{key:"getConatinerWidth",value:function(){var s=0,e=this;return this.$element.children().each(function(){"inline-block"===(0,t.default)(this).css("display")&&"none"===(0,t.default)(this).css("float")&&(s+=e.gap)}),this.$element.width()-s}},{key:"_showDropdownItem",value:function(s){this.items[s].$item.removeClass(this.classes.hiddenClass),this.items[s].$this.addClass(this.classes.hiddenClass)}},{key:"_hideDropdownItem",value:function(s){this.items[s].$this.removeClass(this.classes.hiddenClass),this.items[s].$item.addClass(this.classes.hiddenClass)}},{key:"_trigger",value:function(s){for(var e=arguments.length,t=Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];var n=[this].concat(t);this.$element.trigger("asBreadcrumbs::"+s,n);var o="on"+(s=s.replace(/\b\w+\b/g,function(s){return s.substring(0,1).toUpperCase()+s.substring(1)}));"function"==typeof this.options[o]&&this.options[o].apply(this,t)}},{key:"eventName",value:function(s){if("string"!=typeof s||""===s)return"."+this.options.namespace;for(var e=(s=s.split(" ")).length,t=0;t<e;t++)s[t]=s[t]+"."+this.options.namespace;return s.join(" ")}},{key:"eventNameWithId",value:function(s){if("string"!=typeof s||""===s)return"."+this.options.namespace+"-"+this.instanceId;for(var e=(s=s.split(" ")).length,t=0;t<e;t++)s[t]=s[t]+"."+this.options.namespace+"-"+this.instanceId;return s.join(" ")}},{key:"_throttle",value:function(s,e){var t=this,i=Date.now||function(){return(new Date).getTime()},n=void 0,o=void 0,l=void 0,a=void 0,r=0,d=function(){r=i(),n=null,a=s.apply(o,l),n||(o=l=null)};return function(){for(var h=arguments.length,p=Array(h),u=0;u<h;u++)p[u]=arguments[u];var c=i(),f=e-(c-r);return o=t,l=p,f<=0||f>e?(n&&(clearTimeout(n),n=null),r=c,a=s.apply(o,l),n||(o=l=null)):n||(n=setTimeout(d,f)),a}}},{key:"destroy",value:function(){this.$element.children().removeClass(this.classes.hiddenClass),this.$dropdown.remove(),this.options.ellipsisText&&this.$ellipsis.remove(),this.initialized=!1,this.$element.data("asBreadcrumbs",null),(0,t.default)(window).off(this.eventNameWithId("resize")),this._trigger("destroy")}}],[{key:"setDefaults",value:function(s){t.default.extend(n,t.default.isPlainObject(s)&&s)}}]),s}(),a={version:"0.2.3"},r="asBreadcrumbs",d=t.default.fn.asBreadcrumbs,h=function(s){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];if("string"==typeof s){var o=s;if(/^_/.test(o))return!1;if(!/^(get)/.test(o))return this.each(function(){var s=t.default.data(this,r);s&&"function"==typeof s[o]&&s[o].apply(s,i)});var a=this.first().data(r);if(a&&"function"==typeof a[o])return a[o].apply(a,i)}return this.each(function(){(0,t.default)(this).data(r)||(0,t.default)(this).data(r,new l(this,s))})};t.default.fn.asBreadcrumbs=h,t.default.asBreadcrumbs=t.default.extend({setDefaults:l.setDefaults,noConflict:function(){return t.default.fn.asBreadcrumbs=d,h}},a)});
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var presets,simpleStr,wrap,slice$=[].slice,toString$={}.toString;presets=require("./presets").presets;simpleStr=function(arr){return arr.join("")};wrap=function(content){return"data:image/svg+xml;base64,"+btoa(content)};(function(){var make,handler,ldBar;make={head:function(viewBox){return'<?xml version="1.0" encoding="utf-8"?>\n        <svg xmlns="http://www.w3.org/2000/svg" viewBox="'+viewBox+'">'},gradient:function(dir,dur){var colors,ret,len,gx,gy,x,y,i$,i,idx;dir==null&&(dir=45);dur==null&&(dur=1);colors=slice$.call(arguments,2);ret=[this.head("0 0 100 100")];len=colors.length*4+1;dir=dir*Math.PI/180;gx=Math.pow(Math.cos(dir),2);gy=Math.sqrt(gx-Math.pow(gx,2));if(dir>Math.PI*.25){gy=Math.pow(Math.sin(dir),2);gx=Math.sqrt(gy-Math.pow(gy,2))}x=gx*100;y=gy*100;ret.push('<defs><linearGradient id="gradient" x1="0" x2="'+gx+'" y1="0" y2="'+gy+'">');for(i$=0;i$<len;++i$){i=i$;idx=i*100/(len-1);ret.push('<stop offset="'+idx+'%" stop-color="'+colors[i%colors.length]+'"/>')}ret.push('</linearGradient></defs>\n<rect x="0" y="0" width="400" height="400" fill="url(#gradient)">\n<animateTransform attributeName="transform" type="translate" from="-'+x+",-"+y+'"\nto="0,0" dur="'+dur+'s" repeatCount="indefinite"/></rect></svg>');return wrap(ret.join(""))},stripe:function(c1,c2,dur){var ret,i;c1==null&&(c1="#b4b4b4");c2==null&&(c2="#e6e6e6");dur==null&&(dur=1);ret=[this.head("0 0 100 100")];ret=ret.concat(['<rect fill="'+c2+'" width="100" height="100"/>',"<g><g>",function(){var i$,results$=[];for(i$=0;i$<13;++i$){i=i$;results$.push('<polygon fill="'+c1+'" '+('points="'+(-90+i*20)+",100 "+(-100+i*20)+",")+("100 "+(-60+i*20)+",0 "+(-50+i*20)+',0 "/>'))}return results$}().join(""),'</g><animateTransform attributeName="transform" type="translate" ','from="0,0" to="20,0" dur="'+dur+'s" repeatCount="indefinite"/></g></svg>'].join(""));return wrap(ret)},bubble:function(c1,c2,count,dur,size,sw){var ret,i$,i,idx,x,r,d;c1==null&&(c1="#39d");c2==null&&(c2="#9cf");count==null&&(count=15);dur==null&&(dur=1);size==null&&(size=6);sw==null&&(sw=1);ret=[this.head("0 0 200 200"),'<rect x="0" y="0" width="200" height="200" fill="'+c1+'"/>'];for(i$=0;i$<count;++i$){i=i$;idx=-(i/count)*dur;x=Math.random()*184+8;r=(Math.random()*.7+.3)*size;d=dur*(1+Math.random()*.5);ret.push(['<circle cx="'+x+'" cy="0" r="'+r+'" fill="none" stroke="'+c2+'" stroke-width="'+sw+'">','<animate attributeName="cy" values="190;-10" times="0;1" ','dur="'+d+'s" begin="'+idx+'s" repeatCount="indefinite"/>',"</circle>",'<circle cx="'+x+'" cy="0" r="'+r+'" fill="none" stroke="'+c2+'" stroke-width="'+sw+'">','<animate attributeName="cy" values="390;190" times="0;1" ','dur="'+d+'s" begin="'+idx+'s" repeatCount="indefinite"/>',"</circle>"].join(""))}return wrap(ret.join("")+"</svg>")}};handler={queue:{},running:false,main:function(timestamp){var keepon,removed,k,ref$,func,ret,this$=this;keepon=false;removed=[];for(k in ref$=this.queue){func=ref$[k];ret=func(timestamp);if(!ret){removed.push(func)}keepon=keepon||ret}for(k in ref$=this.queue){func=ref$[k];if(removed.indexOf(func)>=0){delete this.queue[k]}}if(keepon){return requestAnimationFrame(function(it){return this$.main(it)})}else{return this.running=false}},add:function(key,f){var this$=this;if(!this.queue[key]){this.queue[key]=f}if(!this.running){this.running=true;return requestAnimationFrame(function(it){return this$.main(it)})}}};window.ldBar=ldBar=function(selector,option){var xmlns,root,cls,idPrefix,id,domTree,newNode,x$,config,attr,that,isStroke,parseRes,dom,svg,text,group,length,path0,path1,patimg,img,ret,size,this$=this;option==null&&(option={});xmlns={xlink:"http://www.w3.org/1999/xlink"};root=toString$.call(selector).slice(8,-1)==="String"?document.querySelector(selector):selector;if(!root.ldBar){root.ldBar=this}else{return root.ldBar}cls=root.getAttribute("class")||"";if(!~cls.indexOf("ldBar")){root.setAttribute("class",cls+" ldBar")}idPrefix="ldBar-"+Math.random().toString(16).substring(2);id={key:idPrefix,clip:idPrefix+"-clip",filter:idPrefix+"-filter",pattern:idPrefix+"-pattern",mask:idPrefix+"-mask",maskPath:idPrefix+"-mask-path"};domTree=function(n,o){var k,v;n=newNode(n);for(k in o){v=o[k];if(k!=="attr"){n.appendChild(domTree(k,v||{}))}}n.attrs(o.attr||{});return n};newNode=function(n){return document.createElementNS("http://www.w3.org/2000/svg",n)};x$=document.body.__proto__.__proto__.__proto__;x$.text=function(t){return this.appendChild(document.createTextNode(t))};x$.attrs=function(o){var k,v,ret,results$=[];for(k in o){v=o[k];ret=/([^:]+):([^:]+)/.exec(k);if(!ret||!xmlns[ret[1]]){results$.push(this.setAttribute(k,v))}else{results$.push(this.setAttributeNS(xmlns[ret[1]],k,v))}}return results$};x$.styles=function(o){var k,v,results$=[];for(k in o){v=o[k];results$.push(this.style[k]=v)}return results$};x$.attr=function(n,v){if(v!=null){return this.setAttribute(n,v)}else{return this.getAttribute(n)}};config={type:"stroke",img:"",path:"M10 10L90 10M90 8M90 12","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"pattern-size":null,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,duration:1,easing:"linear",value:0,"img-size":null,bbox:null,"set-dim":true,"aspect-ratio":"xMidYMid","transition-in":false,min:0,max:100,precision:0,padding:undefined};config["preset"]=root.attr("data-preset")||option["preset"];if(config.preset!=null){import$(config,presets[config.preset])}for(attr in config){if(that=that=root.attr("data-"+attr)){config[attr]=that}}import$(config,option);if(config.img){config.path=null}isStroke=config.type==="stroke";parseRes=function(v){var parser,ret;parser=/data:ldbar\/res,([^()]+)\(([^)]+)\)/;ret=parser.exec(v);if(!ret){return v}return ret=make[ret[1]].apply(make,ret[2].split(","))};config.fill=parseRes(config.fill);config.stroke=parseRes(config.stroke);if(config["set-dim"]==="false"){config["set-dim"]=false}dom={attr:{"xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:config["aspect-ratio"],width:"100%",height:"100%"},defs:{filter:{attr:{id:id.filter,x:-1,y:-1,width:3,height:3},feMorphology:{attr:{operator:+config["fill-background-extrude"]>=0?"dilate":"erode",radius:Math.abs(+config["fill-background-extrude"])}},feColorMatrix:{attr:{values:"0 0 0 0 1    0 0 0 0 1    0 0 0 0 1    0 0 0 1 0",result:"cm"}}},mask:{attr:{id:id.mask},image:{attr:{"xlink:href":config.img,filter:"url(#"+id.filter+")",x:0,y:0,width:100,height:100,preserveAspectRatio:config["aspect-ratio"]}}},g:{mask:{attr:{id:id.maskPath},path:{attr:{d:config.path||"",fill:"#fff",stroke:"#fff",filter:"url(#"+id.filter+")"}}}},clipPath:{attr:{id:id.clip},rect:{attr:{class:"mask",fill:"#000"}}},pattern:{attr:{id:id.pattern,patternUnits:"userSpaceOnUse",x:0,y:0,width:300,height:300},image:{attr:{x:0,y:0,width:300,height:300}}}}};svg=domTree("svg",dom);text=document.createElement("div");text.setAttribute("class","ldBar-label");root.appendChild(svg);root.appendChild(text);group=[0,0];length=0;this.fit=function(){var that,box,d,rect;if(that=config["bbox"]){box=that.split(" ").map(function(it){return+it.trim()});box={x:box[0],y:box[1],width:box[2],height:box[3]}}else{box=group[1].getBBox()}if(!box||box.width===0||box.height===0){box={x:0,y:0,width:100,height:100}}d=Math.max.apply(null,["stroke-width","stroke-trail-width","fill-background-extrude"].map(function(it){return config[it]}))*1.5;if(config["padding"]!=null){d=+config["padding"]}svg.attrs({viewBox:[box.x-d,box.y-d,box.width+d*2,box.height+d*2].join(" ")});if(config["set-dim"]){["width","height"].map(function(it){if(!root.style[it]||this$.fit[it]){root.style[it]=box[it]+d*2+"px";return this$.fit[it]=true}})}rect=group[0].querySelector("rect");if(rect){return rect.attrs({x:box.x-d,y:box.y-d,width:box.width+d*2,height:box.height+d*2})}};if(config.path){if(isStroke){group[0]=domTree("g",{path:{attr:{d:config.path,fill:"none",class:"baseline"}}})}else{group[0]=domTree("g",{rect:{attr:{x:0,y:0,width:100,height:100,mask:"url(#"+id.maskPath+")",fill:config["fill-background"],class:"frame"}}})}svg.appendChild(group[0]);group[1]=domTree("g",{path:{attr:{d:config.path,class:isStroke?"mainline":"solid","clip-path":config.type==="fill"?"url(#"+id.clip+")":""}}});svg.appendChild(group[1]);path0=group[0].querySelector(isStroke?"path":"rect");path1=group[1].querySelector("path");if(isStroke){path1.attrs({fill:"none"})}patimg=svg.querySelector("pattern image");img=new Image;img.addEventListener("load",function(){var box,that;box=(that=config["pattern-size"])?{width:+that,height:+that}:img.width&&img.height?{width:img.width,height:img.height}:{width:300,height:300};svg.querySelector("pattern").attrs({width:box.width,height:box.height});return patimg.attrs({width:box.width,height:box.height})});if(/.+\..+|^data:/.exec(!isStroke?config.fill:config.stroke)){img.src=!isStroke?config.fill:config.stroke;patimg.attrs({"xlink:href":img.src})}if(isStroke){path0.attrs({stroke:config["stroke-trail"],"stroke-width":config["stroke-trail-width"]});path1.attrs({"stroke-width":config["stroke-width"],stroke:/.+\..+|^data:/.exec(config.stroke)?"url(#"+id.pattern+")":config.stroke})}if(config.fill&&!isStroke){path1.attrs({fill:/.+\..+|^data:/.exec(config.fill)?"url(#"+id.pattern+")":config.fill})}length=path1.getTotalLength();this.fit();this.inited=true}else if(config.img){if(config["img-size"]){ret=config["img-size"].split(",");size={width:+ret[0],height:+ret[1]}}else{size={width:100,height:100}}group[0]=domTree("g",{rect:{attr:{x:0,y:0,width:100,height:100,mask:"url(#"+id.mask+")",fill:config["fill-background"]}}});svg.querySelector("mask image").attrs({width:size.width,height:size.height});group[1]=domTree("g",{image:{attr:{width:size.width,height:size.height,x:0,y:0,preserveAspectRatio:config["aspect-ratio"],"clip-path":config.type==="fill"?"url(#"+id.clip+")":"","xlink:href":config.img,class:"solid"}}});img=new Image;img.addEventListener("load",function(){var ret,size,v;if(config["img-size"]){ret=config["img-size"].split(",");size={width:+ret[0],height:+ret[1]}}else if(img.width&&img.height){size={width:img.width,height:img.height}}else{size={width:100,height:100}}svg.querySelector("mask image").attrs({width:size.width,height:size.height});group[1].querySelector("image").attrs({width:size.width,height:size.height});this$.fit();v=this$.value;this$.value=undefined;this$.set(v,true);return this$.inited=true});img.src=config.img;svg.appendChild(group[0]);svg.appendChild(group[1])}svg.attrs({width:"100%",height:"100%"});this.transition={value:{src:0,des:0},time:{},ease:function(t,b,c,d){t=t/(d*.5);if(t<1){return c*.5*t*t+b}t=t-1;return-c*.5*(t*(t-2)-1)+b},handler:function(time,doTransition){var ref$,min,max,prec,dv,dt,dur,v,p,node,style,box,dir;doTransition==null&&(doTransition=true);if(this.time.src==null){this.time.src=time}ref$=[config["min"],config["max"],1/config["precision"]],min=ref$[0],max=ref$[1],prec=ref$[2];ref$=[this.value.des-this.value.src,(time-this.time.src)*.001,+config["duration"]||1],dv=ref$[0],dt=ref$[1],dur=ref$[2];v=doTransition?this.ease(dt,this.value.src,dv,dur):this.value.des;if(config.precision){v=Math.round(v*prec)/prec}else if(doTransition){v=Math.round(v)}v>=min||(v=min);v<=max||(v=max);text.textContent=v;p=100*(v-min)/(max-min);if(isStroke){node=path1;style={"stroke-dasharray":config["stroke-dir"]==="reverse"?"0 "+length*(100-p)*.01+" "+length*p*.01+" 0":p*.01*length+" "+((100-p)*.01*length+1)}}else{box=group[1].getBBox();dir=config["fill-dir"];style=dir==="btt"||!dir?{y:box.y+box.height*(100-p)*.01,height:box.height*p*.01,x:box.x,width:box.width}:dir==="ttb"?{y:box.y,height:box.height*p*.01,x:box.x,width:box.width}:dir==="ltr"?{y:box.y,height:box.height,x:box.x,width:box.width*p*.01}:dir==="rtl"?{y:box.y,height:box.height,x:box.x+box.width*(100-p)*.01,width:box.width*p*.01}:void 8;node=svg.querySelector("rect")}node.attrs(style);if(dt>=dur){delete this.time.src;return false}return true},start:function(src,des,doTransition){var ref$,this$=this;ref$=this.value;ref$.src=src;ref$.des=des;!!(root.offsetWidth||root.offsetHeight||root.getClientRects().length);if(!doTransition||!(root.offsetWidth||root.offsetHeight||root.getClientRects().length)){this.time.src=0;this.handler(1e3,false);return}return handler.add(id.key,function(time){return this$.handler(time)})}};this.set=function(v,doTransition){var src,des;doTransition==null&&(doTransition=true);src=this.value||0;if(v!=null){this.value=v}else{v=this.value}des=this.value;return this.transition.start(src,des,doTransition)};this.set(+config.value||0,config["transition-in"])||false;return this};return window.addEventListener("load",function(){var i$,ref$,len$,node,results$=[];for(i$=0,len$=(ref$=document.querySelectorAll(".ldBar")).length;i$<len$;++i$){node=ref$[i$];if(!node.ldBar){results$.push(node.ldBar=new ldBar(node))}}return results$},false)})();module.exports=ldBar;function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"./presets":2}],2:[function(require,module,exports){var presets,out$=typeof exports!="undefined"&&exports||this;out$.presets=presets={rainbow:{type:"stroke",path:"M10 10L90 10",stroke:"data:ldbar/res,gradient(0,1,#a551df,#fd51ad,#ff7f82,#ffb874,#ffeb90)",bbox:"10 10 80 10"},energy:{type:"fill",path:"M15 5L85 5A5 5 0 0 1 85 15L15 15A5 5 0 0 1 15 5",stroke:"#f00",fill:"data:ldbar/res,gradient(45,2,#4e9,#8fb,#4e9)","fill-dir":"ltr","fill-background":"#444","fill-background-extrude":1,bbox:"10 5 80 10"},stripe:{type:"fill",path:"M15 5L85 5A5 5 0 0 1 85 15L15 15A5 5 0 0 1 15 5",stroke:"#f00",fill:"data:ldbar/res,stripe(#25b,#58e,1)","fill-dir":"ltr","fill-background":"#ddd","fill-background-extrude":1,bbox:"10 5 80 10"},text:{type:"fill",img:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20" viewBox="0 0 70 20"><text x="35" y="10" text-anchor="middle" dominant-baseline="central" font-family="arial">LOADING</text></svg>',"fill-background-extrude":1.3,"pattern-size":100,"fill-dir":"ltr","img-size":"70,20",bbox:"0 0 70 20"},line:{type:"stroke",path:"M10 10L90 10",stroke:"#25b","stroke-width":3,"stroke-trail":"#ddd","stroke-trail-width":1,bbox:"10 10 80 10"},fan:{type:"stroke",path:"M10 90A40 40 0 0 1 90 90","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 50 80 40"},circle:{type:"stroke",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 10 80 80"},bubble:{type:"fill",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","fill-dir":"btt",fill:"data:ldbar/res,bubble(#39d,#cef)","pattern-size":"150","fill-background":"#ddd","fill-background-extrude":2,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 10 80 80"}}},{}]},{},[1]);
(function (a){ var b=function (b){ this.options=b||{}; var c=b.complete||function (){ }; this.options.complete=function (b, d){ (function (){ c(b, d) })(), a.ajaxQueue.currentRequest=null, a.ajaxQueue.startNextRequest() }}; b.prototype={ options: {}, perform: function (){ a.ajax(this.options) }}, a.ajaxQueue={ queue: [], currentRequest: null, stopped: !1, stop: function (){ a.ajaxQueue.stopped = !0 }, run: function (){ a.ajaxQueue.stopped = !1, a.ajaxQueue.startNextRequest() }, clear: function (){ a.ajaxQueue.queue=[], a.ajaxQueue.currentRequest=null }, addRequest: function (c){ var d=new b(c); a.ajaxQueue.queue.push(d), a.ajaxQueue.startNextRequest() }, startNextRequest: function (){ if(a.ajaxQueue.currentRequest) return !1; var b=a.ajaxQueue.queue.shift(); b&&(a.ajaxQueue.currentRequest=b, b.perform()) }} })(jQuery);
var tns=function(){function e(){for(var e,t,n,a=arguments[0]||{},o=1,s=arguments.length;o<s;o++)if(null!==(e=arguments[o]))for(t in e)if(n=e[t],a===n)continue;else void 0!==n&&(a[t]=n);return a}function t(e){return 0<=["true","false"].indexOf(e)?JSON.parse(e):e}function n(e,t,n,i){if(i)try{e.setItem(t,n)}catch(t){}return n}function i(){var e=window.tnsId;return window.tnsId=e?e+1:1,"tns"+window.tnsId}function a(){var e=document,t=e.body;return t||(t=e.createElement("body"),t.fake=!0),t}function o(e){var t="";return e.fake&&(t=P.style.overflow,e.style.background="",e.style.overflow=P.style.overflow="hidden",P.appendChild(e)),t}function s(e,t){e.fake&&(e.remove(),P.style.overflow=t,P.offsetHeight)}function r(){var e=document,t=a(),n=o(t),r=e.createElement("div"),l=!1;t.appendChild(r);try{for(var d,u="(10px * 10)",c=["calc"+u,"-moz-calc"+u,"-webkit-calc"+u],p=0;3>p;p++)if(d=c[p],r.style.width=d,100===r.offsetWidth){l=d.replace(u,"");break}}catch(t){}return t.fake?s(t,n):r.remove(),l}function l(){var e=document,t=a(),n=o(t),r=e.createElement("div"),l=e.createElement("div"),d="",u=!1;r.className="tns-t-subp2",l.className="tns-t-ct";for(var c=0;70>c;c++)d+="<div></div>";return l.innerHTML=d,r.appendChild(l),t.appendChild(r),u=2>Math.abs(r.getBoundingClientRect().left-l.children[67].getBoundingClientRect().left),t.fake?s(t,n):r.remove(),u}function d(){if(window.matchMedia||window.msMatchMedia)return!0;var e,t=document,n=a(),i=o(n),r=t.createElement("div"),l=t.createElement("style");return l.type="text/css",r.className="tns-mq-test",n.appendChild(l),n.appendChild(r),l.styleSheet?l.styleSheet.cssText="@media all and (min-width:1px){.tns-mq-test{position:absolute}}":l.appendChild(t.createTextNode("@media all and (min-width:1px){.tns-mq-test{position:absolute}}")),e=window.getComputedStyle?window.getComputedStyle(r).position:r.currentStyle.position,n.fake?s(n,i):r.remove(),"absolute"===e}function u(e,t){var n=document.createElement("style");return e&&n.setAttribute("media",e),t&&n.setAttribute("nonce",t),document.querySelector("head").appendChild(n),n.sheet?n.sheet:n.styleSheet}function c(e,t,n,i){"insertRule"in e?e.insertRule(t+"{"+n+"}",i):e.addRule(t,n,i)}function p(e,t){"deleteRule"in e?e.deleteRule(t):e.removeRule(t)}function m(e){var t="insertRule"in e?e.cssRules:e.rules;return t.length}function h(e,t){return Math.atan2(e,t)*(180/Math.PI)}function y(e,t){var n=!1,i=Math.abs(90-Math.abs(e));return i>=90-t?n="horizontal":i<=t&&(n="vertical"),n}function g(e,t,n){for(var a=0,o=e.length;a<o;a++)t.call(n,e[a],a)}function f(e,t){return e.hasAttribute(t)}function v(e,t){return e.getAttribute(t)}function x(e){return"undefined"!=typeof e.item}function b(e,t){if(e=x(e)||e instanceof Array?e:[e],"[object Object]"===Object.prototype.toString.call(t))for(var n=e.length;n--;)for(var a in t)e[n].setAttribute(a,t[a])}function C(e,t){e=x(e)||e instanceof Array?e:[e],t=t instanceof Array?t:[t];for(var n=t.length,a=e.length;a--;)for(var o=n;o--;)e[a].removeAttribute(t[o])}function T(e){for(var t=[],n=0,a=e.length;n<a;n++)t.push(e[n]);return t}function N(e){"none"!==e.style.display&&(e.style.display="none")}function A(e){"none"===e.style.display&&(e.style.display="")}function E(e){return"none"!==window.getComputedStyle(e).display}function w(e){if("string"==typeof e){var t=[e],n=e.charAt(0).toUpperCase()+e.substr(1);["Webkit","Moz","ms","O"].forEach(function(i){("ms"!==i||"transform"===e)&&t.push(i+n)}),e=t}for(var a,o=document.createElement("fakeelement"),s=e.length,r=0;r<e.length;r++)if(a=e[r],void 0!==o.style[a])return a;return!1}function I(e){if(!e)return!1;if(!window.getComputedStyle)return!1;var t,n=document,i=a(),r=o(i),l=n.createElement("p"),d=9<e.length?"-"+e.slice(0,-9).toLowerCase()+"-":"";return d+="transform",i.insertBefore(l,null),l.style[e]="translate3d(1px,1px,1px)",t=window.getComputedStyle(l).getPropertyValue(d),i.fake?s(i,r):l.remove(),void 0!==t&&0<t.length&&"none"!==t}function L(e,t){var n=!1;return /^Webkit/.test(e)?n="webkit"+t+"End":/^O/.test(e)?n="o"+t+"End":e&&(n=t.toLowerCase()+"end"),n}function S(e,t,n){for(var i in t){var a=!(!(0<=["touchstart","touchmove"].indexOf(i))||n)&&V;e.addEventListener(i,t[i],a)}}function D(e,t){for(var n in t){var i=!!(0<=["touchstart","touchmove"].indexOf(n))&&V;e.removeEventListener(n,t[n],i)}}function B(){return{topics:{},on:function(e,t){this.topics[e]=this.topics[e]||[],this.topics[e].push(t)},off:function(e,t){if(this.topics[e])for(var n=0;n<this.topics[e].length;n++)if(this.topics[e][n]===t){this.topics[e].splice(n,1);break}},emit:function(e,t){t.type=e,this.topics[e]&&this.topics[e].forEach(function(n){n(t,e)})}}}function O(e,t,n,i,a,o,s){function r(){o-=l,u+=c,e.style[t]=n+u+d+i,0<o?setTimeout(r,l):s()}var l=Math.min(o,10),d=0<=a.indexOf("%")?"%":"px",a=a.replace(d,""),u=+e.style[t].replace(n,"").replace(i,"").replace(d,""),c=(a-u)/o*l;setTimeout(r,l)}var R=window,k=R.requestAnimationFrame||R.webkitRequestAnimationFrame||R.mozRequestAnimationFrame||R.msRequestAnimationFrame||function(e){return setTimeout(e,16)},H=window,M=H.cancelAnimationFrame||H.mozCancelAnimationFrame||function(e){clearTimeout(e)},P=document.documentElement,z=("classList"in document.createElement("_")),W=z?function(e,t){return e.classList.contains(t)}:function(e,t){return 0<=e.className.indexOf(t)},q=z?function(e,t){W(e,t)||e.classList.add(t)}:function(e,t){W(e,t)||(e.className+=" "+t)},F=z?function(e,t){W(e,t)&&e.classList.remove(t)}:function(e,t){W(e,t)&&(e.className=e.className.replace(t,""))},j=!1;try{var Y=Object.defineProperty({},"passive",{get:function(){j=!0}});window.addEventListener("test",null,Y)}catch(t){}var V=!!j&&{passive:!0};Object.keys||(Object.keys=function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var G=function(a){function o(e){for(var t in e)tn||("slideBy"===t&&(e[t]="page"),"edgePadding"===t&&(e[t]=!1),"autoHeight"===t&&(e[t]=!1)),"responsive"==t&&o(e[t])}function s(e){e&&(qn=jn=Yn=Vn=Hn=Gn=Kn=Un=!1)}function x(){for(var e=tn?di-ei:di;0>e;)e+=xn;return e%xn+1}function R(e){return e=e?Math.max(0,Math.min(zn?xn-1:xn-On,e)):0,tn?e+ei:e}function H(e){for(null==e&&(e=di),tn&&(e-=ei);0>e;)e+=xn;return Math.floor(e%xn)}function P(){var e,t=H();return e=Mi?t:In||wn?Math.ceil((t+1)*ta/xn-1):Math.floor(t/On),!zn&&tn&&di===mi&&(e=ta-1),e}function z(){if(wn||In&&!kn)return xn-1;var e=In?"fixedWidth":"items",t=[];if((In||a[e]<xn)&&t.push(a[e]),$t)for(var n in $t){var i=$t[n][e];i&&(In||i<xn)&&t.push(i)}return t.length||t.push(0),Math.ceil(In?kn/Math.min.apply(null,t):Math.max.apply(null,t))}function j(){var e=z(),t=tn?Math.ceil((5*e-xn)/2):4*e-xn;return t=Math.max(e,t),K("edgePadding")?t+1:t}function Y(){return Rt.innerWidth||Ot.documentElement.clientWidth||Ot.body.clientWidth}function V(e){return"top"===e?"afterbegin":"beforeend"}function Q(e){if(null!=e){var t,n,i=Ot.createElement("div");return e.appendChild(i),t=i.getBoundingClientRect(),n=t.right-t.left,i.remove(),n||Q(e.parentNode)}}function X(){var e=Ln?2*Ln-Sn:0;return Q(gn)-e}function K(e){if(a[e])return!0;if($t)for(var t in $t)if($t[t][e])return!0;return!1}function U(e,t){if(null==t&&(t=bn),"items"===e&&In)return Math.floor((Dn+Sn)/(In+Sn))||1;var n=a[e];if($t)for(var i in $t)t>=parseInt(i)&&e in $t[i]&&(n=$t[i][e]);return"slideBy"==e&&"page"===n&&(n=U("items")),tn||"slideBy"!=e&&"items"!=e||(n=Math.floor(n)),n}function _(e){return Wt?Wt+"("+100*e+"% / "+ti+")":100*e/ti+"%"}function J(e,t,n,i,a){var o="";if(void 0!==e){var s=e;t&&(s-=t),o=pn?"margin: 0 "+s+"px 0 "+e+"px;":"margin: "+e+"px 0 "+s+"px 0;"}else if(t&&!n){var r="-"+t+"px",l=pn?r+" 0 0":"0 "+r+" 0";o="margin: 0 "+l+";"}return!tn&&a&&Vt&&i&&(o+=ne(i)),o}function Z(e,t,n){return e?(e+t)*ti+"px":Wt?Wt+"("+100*ti+"% / "+n+")":100*ti/n+"%"}function $(e,t,n){var i;if(e)i=e+t+"px";else{tn||(n=Math.floor(n));var a=tn?ti:n;i=Wt?Wt+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"===en?i+" !important;":i+";"}function ee(e){var t="";if(!1!==e){var n=pn?"padding-":"margin-",i=pn?"right":"bottom";t=n+i+": "+e+"px;"}return t}function te(e,t){var n=e.substring(0,e.length-t).toLowerCase();return n&&(n="-"+n+"-"),n}function ne(e){return te(Vt,18)+"transition-duration:"+e/1e3+"s;"}function ie(e){return te(Qt,17)+"animation-duration:"+e/1e3+"s;"}function ae(){K("gutter");if(mn.className="tns-outer",hn.className="tns-inner",mn.id=Ci+"-ow",hn.id=Ci+"-iw",""===yn.id&&(yn.id=Ci),bi+=qt||wn?" tns-subpixel":" tns-no-subpixel",bi+=Wt?" tns-calc":" tns-no-calc",wn&&(bi+=" tns-autowidth"),bi+=" tns-"+a.axis,yn.className+=bi,tn?(un=Ot.createElement("div"),un.id=Ci+"-mw",un.className="tns-ovh",mn.appendChild(un),un.appendChild(hn)):mn.appendChild(hn),Wn){var e=un?un:hn;e.className+=" tns-ah"}if(gn.insertBefore(mn,yn),hn.appendChild(yn),g(vn,function(e,t){q(e,"tns-item"),e.id||(e.id=Ci+"-item"+t),!tn&&dn&&q(e,dn),b(e,{"aria-hidden":"true",tabindex:"-1"})}),ei){for(var t=Ot.createDocumentFragment(),n=Ot.createDocumentFragment(),i=ei;i--;){var o=i%xn,s=vn[o].cloneNode(!0);if(q(s,"tns-slide-cloned"),C(s,"id"),n.insertBefore(s,n.firstChild),tn){var r=vn[xn-1-o].cloneNode(!0);q(r,"tns-slide-cloned"),C(r,"id"),t.appendChild(r)}}yn.insertBefore(t,yn.firstChild),yn.appendChild(n),vn=yn.children}}function oe(){if(K("autoHeight")||wn||!pn){var e=yn.querySelectorAll("img");g(e,function(e){var t=e.src;Jn||(t&&0>t.indexOf("data:image")?(e.src="",S(e,ji),q(e,"loading"),e.src=t):we(e))}),k(function(){Be(T(e),function(){An=!0})}),K("autoHeight")&&(e=Se(di,Math.min(di+On-1,ti-1))),Jn?se():k(function(){Be(T(e),se)})}else tn&&_e(),de(),ue()}function se(){if(wn&&1<xn){var e=zn?di:xn-1;(function t(){var n=vn[e].getBoundingClientRect().left,i=vn[e-1].getBoundingClientRect().right;1>=Math.abs(n-i)?re():setTimeout(function(){t()},16)})()}else re()}function re(){(!pn||wn)&&(Me(),wn?(ii=Ke(),Ai&&(Ei=he()),mi=li(),s(Ti||Ei)):Lt()),tn&&_e(),de(),ue()}function le(){if(!tn)for(var e,t=di,n=di+Math.min(xn,On);t<n;t++)e=vn[t],e.style.left=100*(t-di)/On+"%",q(e,sn),F(e,dn);if(pn&&(qt||wn?(c(_n,"#"+Ci+" > .tns-item","font-size:"+Rt.getComputedStyle(vn[0]).fontSize+";",m(_n)),c(_n,"#"+Ci,"font-size:0;",m(_n))):tn&&g(vn,function(e,t){e.style.marginLeft=_(t)})),Ft){if(Vt){var o=un&&a.autoHeight?ne(a.speed):"";c(_n,"#"+Ci+"-mw",o,m(_n))}o=J(a.edgePadding,a.gutter,a.fixedWidth,a.speed,a.autoHeight),c(_n,"#"+Ci+"-iw",o,m(_n)),tn&&(o=pn&&!wn?"width:"+Z(a.fixedWidth,a.gutter,a.items)+";":"",Vt&&(o+=ne(Mn)),c(_n,"#"+Ci,o,m(_n))),o=pn&&!wn?$(a.fixedWidth,a.gutter,a.items):"",a.gutter&&(o+=ee(a.gutter)),tn||(Vt&&(o+=ne(Mn)),Qt&&(o+=ie(Mn))),o&&c(_n,"#"+Ci+" > .tns-item",o,m(_n))}else{Re(),hn.style.cssText=J(Ln,Sn,In,Wn),tn&&pn&&!wn&&(yn.style.width=Z(In,Sn,On));var o=pn&&!wn?$(In,Sn,On):"";Sn&&(o+=ee(Sn)),o&&c(_n,"#"+Ci+" > .tns-item",o,m(_n))}if($t&&Ft)for(var s in $t){s=parseInt(s);var r=$t[s],o="",l="",d="",u="",p="",h=wn?null:U("items",s),y=U("fixedWidth",s),f=U("speed",s),v=U("edgePadding",s),x=U("autoHeight",s),b=U("gutter",s);Vt&&un&&U("autoHeight",s)&&"speed"in r&&(l="#"+Ci+"-mw{"+ne(f)+"}"),("edgePadding"in r||"gutter"in r)&&(d="#"+Ci+"-iw{"+J(v,b,y,f,x)+"}"),tn&&pn&&!wn&&("fixedWidth"in r||"items"in r||In&&"gutter"in r)&&(u="width:"+Z(y,b,h)+";"),Vt&&"speed"in r&&(u+=ne(f)),u&&(u="#"+Ci+"{"+u+"}"),("fixedWidth"in r||In&&"gutter"in r||!tn&&"items"in r)&&(p+=$(y,b,h)),"gutter"in r&&(p+=ee(b)),!tn&&"speed"in r&&(Vt&&(p+=ne(f)),Qt&&(p+=ie(f))),p&&(p="#"+Ci+" > .tns-item{"+p+"}"),o=l+d+u+p,o&&_n.insertRule("@media (min-width: "+s/16+"em){"+o+"}",_n.cssRules.length)}}function de(){if(Pe(),mn.insertAdjacentHTML("afterbegin","<div class=\"tns-liveregion tns-visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">slide <span class=\"current\">"+Ne()+"</span>  of "+xn+"</div>"),En=mn.querySelector(".tns-liveregion .current"),Pi){var e=Gn?"stop":"start";ya?b(ya,{"data-action":e}):a.autoplayButtonOutput&&(mn.insertAdjacentHTML(V(a.autoplayPosition),"<button type=\"button\" data-action=\""+e+"\">"+fa[0]+e+fa[1]+Xn[0]+"</button>"),ya=mn.querySelector("[data-action]")),ya&&S(ya,{click:pt}),Gn&&(lt(),Kn&&S(yn,Si),Un&&S(yn,Di))}if(Hi){tn?ei:0;if($i)b($i,{"aria-label":"Carousel Pagination"}),Zi=$i.children,g(Zi,function(e,t){b(e,{"data-nav":t,tabindex:"-1","aria-label":ra+(t+1),"aria-controls":Ci})});else{for(var t="",n=Mi?"":"style=\"display:none\"",o=0;o<xn;o++)t+="<button type=\"button\" data-nav=\""+o+"\" tabindex=\"-1\" aria-controls=\""+Ci+"\" "+n+" aria-label=\""+ra+(o+1)+"\"></button>";t="<div class=\"tns-nav\" aria-label=\"Carousel Pagination\">"+t+"</div>",mn.insertAdjacentHTML(V(a.navPosition),t),$i=mn.querySelector(".tns-nav"),Zi=$i.children}if(Dt(),Vt){var s=Vt.substring(0,Vt.length-18).toLowerCase(),r="transition: all "+Mn/1e3+"s";s&&(r="-"+s+"-"+r),c(_n,"[aria-controls^="+Ci+"-item]",r,m(_n))}b(Zi[aa],{"aria-label":ra+(aa+1)+la}),C(Zi[aa],"tabindex"),q(Zi[aa],sa),S($i,Li)}ki&&(!Qi&&(!Ki||!Ui)&&(mn.insertAdjacentHTML(V(a.controlsPosition),"<div class=\"tns-controls\" aria-label=\"Carousel Navigation\" tabindex=\"0\"><button type=\"button\" data-controls=\"prev\" tabindex=\"-1\" aria-controls=\""+Ci+"\">"+Fn[0]+"</button><button type=\"button\" data-controls=\"next\" tabindex=\"-1\" aria-controls=\""+Ci+"\">"+Fn[1]+"</button></div>"),Qi=mn.querySelector(".tns-controls")),(!Ki||!Ui)&&(Ki=Qi.children[0],Ui=Qi.children[1]),a.controlsContainer&&b(Qi,{"aria-label":"Carousel Navigation",tabindex:"0"}),(a.controlsContainer||a.prevButton&&a.nextButton)&&b([Ki,Ui],{"aria-controls":Ci,tabindex:"-1"}),(a.controlsContainer||a.prevButton&&a.nextButton)&&(b(Ki,{"data-controls":"prev"}),b(Ui,{"data-controls":"next"})),Vi=Fe(Ki),Gi=Fe(Ui),Ve(),Qi?S(Qi,Ii):(S(Ki,Ii),S(Ui,Ii))),ge()}function ue(){if(tn&&Kt){var e={};e[Kt]=tt,S(yn,e)}Yn&&S(yn,Oi,a.preventScrollOnTouch),Vn&&S(yn,Ri),Hn&&S(Ot,Bi),"inner"===en?xi.on("outerResized",function(){me(),xi.emit("innerLoaded",Bt())}):($t||In||wn||Wn||!pn)&&S(Rt,{resize:pe}),Wn&&("outer"===en?xi.on("innerLoaded",De):!Ti&&De()),Ee(),Ti?be():Ei&&ve(),xi.on("indexChanged",Oe),"inner"===en&&xi.emit("innerLoaded",Bt()),"function"==typeof vi&&vi(Bt()),Cn=!0}function ce(){if(_n.disabled=!0,_n.ownerNode&&_n.ownerNode.remove(),D(Rt,{resize:pe}),Hn&&D(Ot,Bi),Qi&&D(Qi,Ii),$i&&D($i,Li),D(yn,Si),D(yn,Di),ya&&D(ya,{click:pt}),Gn&&clearInterval(da),tn&&Kt){var e={};e[Kt]=tt,D(yn,e)}Yn&&D(yn,Oi),Vn&&D(yn,Ri);var t=[fn,Xi,_i,Ji,ea,ga];for(var n in Jt.forEach(function(e,n){var i="container"===e?mn:a[e];if("object"==typeof i&&i){var o=!!i.previousElementSibling&&i.previousElementSibling,s=i.parentNode;i.outerHTML=t[n],a[e]=o?o.nextElementSibling:s.firstElementChild}}),Jt=sn=rn=ln=dn=pn=mn=hn=yn=gn=fn=vn=xn=cn=bn=wn=In=Ln=Sn=Dn=On=Rn=kn=Hn=Mn=Pn=zn=Wn=_n=Jn=Tn=$n=ei=ti=ni=ii=ai=oi=si=ri=li=di=ui=pi=mi=Nn=yi=gi=fi=vi=xi=bi=Ci=Ti=Ni=Ai=Ei=wi=Ii=Li=Si=Di=Bi=Oi=Ri=ki=Hi=Mi=Pi=zi=Wi=qi=Fi=ji=An=qn=Fn=Qi=Xi=Ki=Ui=Vi=Gi=jn=$i=ea=Zi=ta=na=ia=aa=oa=sa=ra=la=Gn=Qn=ha=Xn=Kn=ya=ga=Un=fa=da=ua=ca=pa=ma=Ta=Na=va=xa=ba=Aa=Ca=Ea=Yn=Vn=null,this)"rebuild"!=n&&(this[n]=null);Cn=!1}function pe(t){k(function(){me(xt(t))})}function me(t){if(Cn){"outer"===en&&xi.emit("outerResized",Bt(t)),bn=Y();var e,n=cn,o=!1;$t&&(ye(),e=n!==cn,e&&xi.emit("newBreakpointStart",Bt(t)));var r,l,d=On,u=Ti,h=Ei,y=Hn,g=qn,f=jn,v=Yn,x=Vn,b=Gn,C=Kn,T=Un,E=di;if(e){var w=In,I=Wn,L=Fn,B=Bn,O=Xn;if(!Ft)var k=Sn,H=Ln}if(Hn=U("arrowKeys"),qn=U("controls"),jn=U("nav"),Yn=U("touch"),Bn=U("center"),Vn=U("mouseDrag"),Gn=U("autoplay"),Kn=U("autoplayHoverPause"),Un=U("autoplayResetOnVisibility"),e&&(Ti=U("disable"),In=U("fixedWidth"),Mn=U("speed"),Wn=U("autoHeight"),Fn=U("controlsText"),Xn=U("autoplayText"),Qn=U("autoplayTimeout"),!Ft&&(Ln=U("edgePadding"),Sn=U("gutter"))),s(Ti),Dn=X(),pn&&!wn||Ti||(Me(),!pn&&(Lt(),o=!0)),(In||wn)&&(ii=Ke(),mi=li()),(e||In)&&(On=U("items"),Rn=U("slideBy"),l=On!==d,l&&(!In&&!wn&&(mi=li()),wa())),e&&Ti!==u&&(Ti?be():Ce()),Ai&&(e||In||wn)&&(Ei=he(),Ei!==h&&(Ei?(Je(Ue(R(0))),ve()):(xe(),o=!0))),s(Ti||Ei),Gn||(Kn=Un=!1),Hn!==y&&(Hn?S(Ot,Bi):D(Ot,Bi)),qn!==g&&(qn?Qi?A(Qi):(Ki&&A(Ki),Ui&&A(Ui)):Qi?N(Qi):(Ki&&N(Ki),Ui&&N(Ui))),jn!==f&&(jn?(A($i),Dt()):N($i)),Yn!==v&&(Yn?S(yn,Oi,a.preventScrollOnTouch):D(yn,Oi)),Vn!==x&&(Vn?S(yn,Ri):D(yn,Ri)),Gn!==b&&(Gn?(ya&&A(ya),!ua&&!pa&&lt()):(ya&&N(ya),ua&&dt())),Kn!==C&&(Kn?S(yn,Si):D(yn,Si)),Un!==T&&(Un?S(Ot,Di):D(Ot,Di)),!e)Bn&&(In||wn)&&(o=!0);else if((In!==w||Bn!==B)&&(o=!0),Wn===I||Wn||(hn.style.height=""),qn&&Fn!==L&&(Ki.innerHTML=Fn[0],Ui.innerHTML=Fn[1]),ya&&Xn!==O){var M=Gn?1:0,i=ya.innerHTML,P=i.length-O[M].length;i.substring(P)===O[M]&&(ya.innerHTML=i.substring(0,P)+Xn[M])}if((l||In&&!wn)&&(ta=St(),Dt()),r=di!==E,r?(xi.emit("indexChanged",Bt()),o=!0):l?!r&&Oe():(In||wn)&&(Ee(),Pe(),Te()),l&&!tn&&ze(),!Ti&&!Ei){if(e&&!Ft&&((Ln!==H||Sn!==k)&&(hn.style.cssText=J(Ln,Sn,In,Mn,Wn)),pn)){tn&&(yn.style.width=Z(In,Sn,On));var z=$(In,Sn,On)+ee(Sn);p(_n,m(_n)-1),c(_n,"#"+Ci+" > .tns-item",z,m(_n))}Wn&&De(),o&&(_e(),ui=di)}e&&xi.emit("newBreakpointEnd",Bt(t))}}function he(){if(!In&&!wn){var e=Bn?On-(On-1)/2:On;return xn<=e}var t=In?(In+Sn)*xn:Tn[xn],n=Ln?Dn+2*Ln:Dn+Sn;return Bn&&(n-=In?(Dn-In)/2:(Dn-(Tn[di+1]-Tn[di]-Sn))/2),t<=n}function ye(){for(var e in cn=0,$t)e=parseInt(e),bn>=e&&(cn=e)}function ge(){!Gn&&ya&&N(ya),!jn&&$i&&N($i),qn||(Qi?N(Qi):(Ki&&N(Ki),Ui&&N(Ui)))}function fe(){Gn&&ya&&A(ya),jn&&$i&&A($i),qn&&(Qi?A(Qi):(Ki&&A(Ki),Ui&&A(Ui)))}function ve(){if(!wi){if(Ln&&(hn.style.margin="0px"),ei)for(var e="tns-transparent",t=ei;t--;)tn&&q(vn[t],e),q(vn[ti-t-1],e);ge(),wi=!0}}function xe(){if(wi){if(Ln&&Ft&&(hn.style.margin=""),ei)for(var e="tns-transparent",t=ei;t--;)tn&&F(vn[t],e),F(vn[ti-t-1],e);fe(),wi=!1}}function be(){if(!Ni){if(_n.disabled=!0,yn.className=yn.className.replace(bi.substring(1),""),C(yn,["style"]),zn)for(var e=ei;e--;)tn&&N(vn[e]),N(vn[ti-e-1]);if(pn&&tn||C(hn,["style"]),!tn)for(var t,n=di,a=di+xn;n<a;n++)t=vn[n],C(t,["style"]),F(t,sn),F(t,dn);ge(),Ni=!0}}function Ce(){if(Ni){if(_n.disabled=!1,yn.className+=bi,_e(),zn)for(var e=ei;e--;)tn&&A(vn[e]),A(vn[ti-e-1]);if(!tn)for(var t=di,n=di+xn;t<n;t++){var a=vn[t],o=t<di+On?sn:dn;a.style.left=100*(t-di)/On+"%",q(a,o)}fe(),Ni=!1}}function Te(){var e=Ne();En.innerHTML!==e&&(En.innerHTML=e)}function Ne(){var e=Ae(),t=e[0]+1,n=e[1]+1;return t===n?t+"":t+" to "+n}function Ae(e){null==e&&(e=Ue());var t,n,o,s=di;if(Bn||Ln?(wn||In)&&(n=-(parseFloat(e)+Ln),o=n+Dn+2*Ln):wn&&(n=Tn[di],o=n+Dn),wn)Tn.forEach(function(e,a){a<ti&&((Bn||Ln)&&e<=n+.5&&(s=a),.5<=o-e&&(t=a))});else{if(In){var r=In+Sn;Bn||Ln?(s=Math.floor(n/r),t=Math.ceil(o/r-1)):t=s+Math.ceil(Dn/r)-1}else if(Bn||Ln){var l=On-1;if(Bn?(s-=l/2,t=di+l/2):t=di+l,Ln){var i=Ln*On/Dn;s-=i,t+=i}s=Math.floor(s),t=Math.ceil(t)}else t=s+On-1;s=Math.max(s,0),t=Math.min(t,ti-1)}return[s,t]}function Ee(){if(Jn&&!Ti){var e=Ae();e.push(Zn),Se.apply(null,e).forEach(function(e){if(!W(e,Fi)){var t={};t[Kt]=function(t){t.stopPropagation()},S(e,t),S(e,ji),e.src=v(e,"data-src");var n=v(e,"data-srcset");n&&(e.srcset=n),q(e,"loading")}})}}function we(e){q(e,"loaded"),Le(e)}function Ie(e){q(e,"failed"),Le(e)}function Le(e){q(e,Fi),F(e,"loading"),D(e,ji)}function Se(e,t,n){var i=[];for(n||(n="img");e<=t;)g(vn[e].querySelectorAll(n),function(e){i.push(e)}),e++;return i}function De(){var e=Se.apply(null,Ae());k(function(){Be(e,He)})}function Be(e,t){return An?t():(e.forEach(function(t,n){!Jn&&t.complete&&Le(t),W(t,Fi)&&e.splice(n,1)}),e.length?void k(function(){Be(e,t)}):t())}function Oe(){Ee(),Pe(),Te(),Ve(),We()}function Re(){tn&&Wn&&(un.style[Vt]=Mn/1e3+"s")}function ke(e,t){for(var n=[],a=e,o=Math.min(e+t,ti);a<o;a++)n.push(vn[a].offsetHeight);return Math.max.apply(null,n)}function He(){var e=Wn?ke(di,On):ke(ei,xn),t=un?un:hn;t.style.height!==e&&(t.style.height=e+"px")}function Me(){Tn=[0];var e=pn?"left":"top",t=pn?"right":"bottom",n=vn[0].getBoundingClientRect()[e];g(vn,function(a,o){o&&Tn.push(a.getBoundingClientRect()[e]-n),o===ti-1&&Tn.push(a.getBoundingClientRect()[t]-n)})}function Pe(){var e=Ae(),t=e[0],n=e[1];g(vn,function(e,a){a>=t&&a<=n?f(e,"aria-hidden")&&(C(e,["aria-hidden","tabindex"]),q(e,qi)):!f(e,"aria-hidden")&&(b(e,{"aria-hidden":"true",tabindex:"-1"}),F(e,qi))})}function ze(){for(var e,t=di+Math.min(xn,On),n=ti;n--;)e=vn[n],n>=di&&n<t?(q(e,"tns-moving"),e.style.left=100*(n-di)/On+"%",q(e,sn),F(e,dn)):e.style.left&&(e.style.left="",q(e,dn),F(e,sn)),F(e,rn);setTimeout(function(){g(vn,function(e){F(e,"tns-moving")})},300)}function We(){if(jn&&(aa=0<=ia?ia:P(),ia=-1,aa!==oa)){var e=Zi[oa],t=Zi[aa];b(e,{tabindex:"-1","aria-label":ra+(oa+1)}),F(e,sa),b(t,{"aria-label":ra+(aa+1)+la}),C(t,"tabindex"),q(t,sa),oa=aa}}function qe(e){return e.nodeName.toLowerCase()}function Fe(e){return"button"===qe(e)}function je(e){return"true"===e.getAttribute("aria-disabled")}function Ye(e,t,n){e?t.disabled=n:t.setAttribute("aria-disabled",n.toString())}function Ve(){if(!(!qn||Pn||zn)){var e=Vi?Ki.disabled:je(Ki),t=Gi?Ui.disabled:je(Ui),n=!!(di<=pi),i=!Pn&&di>=mi;n&&!e&&Ye(Vi,Ki,!0),!n&&e&&Ye(Vi,Ki,!1),i&&!t&&Ye(Gi,Ui,!0),!i&&t&&Ye(Gi,Ui,!1)}}function Ge(e,t){Vt&&(e.style[Vt]=t)}function Qe(){return In?(In+Sn)*ti:Tn[ti]}function Xe(e){null==e&&(e=di);var t=Ln?Sn:0;return wn?(Dn-t-(Tn[e+1]-Tn[e]-Sn))/2:In?(Dn-In)/2:(On-1)/2}function Ke(){var e=Ln?Sn:0,t=Dn+e-Qe();return Bn&&!zn&&(t=In?-(In+Sn)*(ti-1)-Xe():Xe(ti-1)-Tn[ti-1]),0<t&&(t=0),t}function Ue(e){null==e&&(e=di);var t;if(!pn||wn)t=-Tn[e],Bn&&wn&&(t+=Xe());else if(In)t=-(In+Sn)*e,Bn&&(t+=Xe());else{var n=jt?ti:On;Bn&&(e-=Xe()),t=100*-e/n}return ni&&(t=Math.max(t,ii)),t+=!pn||wn||In?"px":"%",t}function _e(e){Ge(yn,"0s"),Je(e)}function Je(e){null==e&&(e=Ue()),yn.style[oi]=si+e+ri}function Ze(e,t,n,a){var o=e+On;zn||(o=Math.min(o,ti));for(var s,r=e;r<o;r++)s=vn[r],a||(s.style.left=100*(r-di)/On+"%"),ln&&Gt&&(s.style[Gt]=s.style[Xt]=ln*(r-e)/1e3+"s"),F(s,t),q(s,n),a&&$n.push(s)}function $e(t,e){ai&&wa(),(di!==ui||e)&&(xi.emit("indexChanged",Bt()),xi.emit("transitionStart",Bt()),Wn&&De(),ua&&t&&0<=["click","keydown"].indexOf(t.type)&&dt(),fi=!0,Ia())}function et(e){return e.toLowerCase().replace(/-/g,"")}function tt(e){if(tn||fi){if(xi.emit("transitionEnd",Bt(e)),!tn&&0<$n.length)for(var t,n=0;n<$n.length;n++)t=$n[n],t.style.left="",Xt&&Gt&&(t.style[Xt]="",t.style[Gt]=""),F(t,rn),q(t,dn);if(!e||!tn&&e.target.parentNode===yn||e.target===yn&&et(e.propertyName)===et(oi)){if(!ai){var a=di;wa(),di!==a&&(xi.emit("indexChanged",Bt()),_e())}"inner"===en&&xi.emit("innerLoaded",Bt()),fi=!1,ui=di}}}function nt(t,n){if(!Ei)if("prev"===t)it(n,-1);else if("next"===t)it(n,1);else{if(fi){if(hi)return;tt()}var e=H(),i=0;if("first"===t?i=-e:"last"===t?i=tn?xn-On-e:xn-1-e:("number"!=typeof t&&(t=parseInt(t)),!isNaN(t)&&(!n&&(t=Math.max(0,Math.min(xn-1,t))),i=t-e)),!tn&&i&&Math.abs(i)<On){var a=0<i?1:-1;i+=di+i-xn>=pi?xn*a:-1*(2*xn*a)}di+=i,tn&&zn&&(di<pi&&(di+=xn),di>mi&&(di-=xn)),H(di)!==H(ui)&&$e(n)}}function it(t,n){if(fi){if(hi)return;tt()}var i;if(!n){t=xt(t);for(var a=bt(t);a!==Qi&&0>[Ki,Ui].indexOf(a);)a=a.parentNode;var o=[Ki,Ui].indexOf(a);0<=o&&(i=!0,n=0===o?-1:1)}if(Pn){if(di===pi&&-1===n)return void nt("last",t);if(di===mi&&1===n)return void nt("first",t)}n&&(di+=Rn*n,wn&&(di=Math.floor(di)),$e(i||t&&"keydown"===t.type?t:null))}function at(t){if(fi){if(hi)return;tt()}t=xt(t);for(var n,i=bt(t);i!==$i&&!f(i,"data-nav");)i=i.parentNode;if(f(i,"data-nav")){var n=ia=+v(i,"data-nav"),a=In||wn?n*xn/ta:n*On,o=Mi?n:Math.min(Math.ceil(a),xn-1);nt(o,t),aa===n&&(ua&&dt(),ia=-1)}}function ot(){da=setInterval(function(){it(null,ha)},Qn),ua=!0}function st(){clearInterval(da),ua=!1}function rt(e,t){b(ya,{"data-action":e}),ya.innerHTML=fa[0]+e+fa[1]+t}function lt(){ot(),ya&&rt("stop",Xn[1])}function dt(){st(),ya&&rt("start",Xn[0])}function ut(){Gn&&!ua&&(lt(),pa=!1)}function ct(){ua&&(dt(),pa=!0)}function pt(){ua?(dt(),pa=!0):(lt(),pa=!1)}function mt(){Ot.hidden?ua&&(st(),ma=!0):ma&&(ot(),ma=!1)}function ht(){ua&&(st(),ca=!0)}function yt(){ca&&(ot(),ca=!1)}function gt(t){t=xt(t);var n=[kt.LEFT,kt.RIGHT].indexOf(t.keyCode);0<=n&&(0===n?!Ki.disabled&&it(t,-1):!Ui.disabled&&it(t,1))}function ft(e){e.focus()}function vt(t){t=xt(t);var n=Ot.activeElement;if(f(n,"data-nav")){var i=[kt.LEFT,kt.RIGHT,kt.ENTER,kt.SPACE].indexOf(t.keyCode),a=+v(n,"data-nav");0<=i&&(0===i?0<a&&ft(Zi[a-1]):1===i?a<ta-1&&ft(Zi[a+1]):(ia=a,nt(a,t)))}}function xt(t){return t=t||Rt.event,Ct(t)?t.changedTouches[0]:t}function bt(t){return t.target||Rt.event.srcElement}function Ct(t){return 0<=t.type.indexOf("touch")}function Tt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Nt(){return y(h(Na.y-Ta.y,Na.x-Ta.x),yi)===a.axis}function At(t){if(fi){if(hi)return;tt()}Gn&&ua&&st(),Aa=!0,Ca&&(M(Ca),Ca=null);var e=xt(t);xi.emit(Ct(t)?"touchStart":"dragStart",Bt(t)),!Ct(t)&&0<=["img","a"].indexOf(qe(bt(t)))&&Tt(t),Na.x=Ta.x=e.clientX,Na.y=Ta.y=e.clientY,tn&&(va=parseFloat(yn.style[oi].replace(si,"")),Ge(yn,"0s"))}function Et(t){if(Aa){var e=xt(t);Na.x=e.clientX,Na.y=e.clientY,tn?!Ca&&(Ca=k(function(){wt(t)})):("?"===gi&&(gi=Nt()),gi&&(Yi=!0)),("boolean"!=typeof t.cancelable||t.cancelable)&&Yi&&t.preventDefault()}}function wt(t){if(!gi)return void(Aa=!1);if(M(Ca),Aa&&(Ca=k(function(){wt(t)})),"?"===gi&&(gi=Nt()),gi){!Yi&&Ct(t)&&(Yi=!0);try{t.type&&xi.emit(Ct(t)?"touchMove":"dragMove",Bt(t))}catch(e){}var e=va,n=Ea(Na,Ta);if(!pn||In||wn)e+=n,e+="px";else{var i=jt?100*(n*On)/((Dn+Sn)*ti):100*n/(Dn+Sn);e+=i,e+="%"}yn.style[oi]=si+e+ri}}function It(t){if(Aa){Ca&&(M(Ca),Ca=null),tn&&Ge(yn,""),Aa=!1;var e=xt(t);Na.x=e.clientX,Na.y=e.clientY;var n=Ea(Na,Ta);if(Math.abs(n)){if(!Ct(t)){var i=bt(t);S(i,{click:function t(n){Tt(n),D(i,{click:t})}})}tn?Ca=k(function(){if(pn&&!wn){var e=-n*On/(Dn+Sn);e=0<n?Math.floor(e):Math.ceil(e),di+=e}else{var a=-(va+n);if(0>=a)di=pi;else if(a>=Tn[ti-1])di=mi;else for(var o=0;o<ti&&a>=Tn[o];)di=o,a>Tn[o]&&0>n&&(di+=1),o++}$e(t,n),xi.emit(Ct(t)?"touchEnd":"dragEnd",Bt(t))}):gi&&it(t,0<n?-1:1)}}"auto"===a.preventScrollOnTouch&&(Yi=!1),yi&&(gi="?"),Gn&&!ua&&ot()}function Lt(){var e=un?un:hn;e.style.height=Tn[di+On]-Tn[di]+"px"}function St(){var e=In?(In+Sn)*xn/Dn:xn/On;return Math.min(Math.ceil(e),xn)}function Dt(){if(jn&&!Mi&&ta!==na){var e=na,t=ta,n=A;for(na>ta&&(e=ta,t=na,n=N);e<t;)n(Zi[e]),e++;na=ta}}function Bt(t){return{container:yn,slideItems:vn,navContainer:$i,navItems:Zi,controlsContainer:Qi,hasControls:ki,prevButton:Ki,nextButton:Ui,items:On,slideBy:Rn,cloneCount:ei,slideCount:xn,slideCountNew:ti,index:di,indexCached:ui,displayIndex:x(),navCurrentIndex:aa,navCurrentIndexCached:oa,pages:ta,pagesCached:na,sheet:_n,isOn:Cn,event:t||{}}}a=e({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0,nonce:!1},a||{});var Ot=document,Rt=window,kt={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},Ht={},Mt=a.useLocalStorage;if(Mt){var Pt=navigator.userAgent,zt=new Date;try{Ht=Rt.localStorage,Ht?(Ht.setItem(zt,zt),Mt=Ht.getItem(zt)==zt,Ht.removeItem(zt)):Mt=!1,Mt||(Ht={})}catch(t){Mt=!1}Mt&&(Ht.tnsApp&&Ht.tnsApp!==Pt&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(e){Ht.removeItem(e)}),localStorage.tnsApp=Pt)}var Wt=Ht.tC?t(Ht.tC):n(Ht,"tC",r(),Mt),qt=Ht.tPL?t(Ht.tPL):n(Ht,"tPL",l(),Mt),Ft=Ht.tMQ?t(Ht.tMQ):n(Ht,"tMQ",d(),Mt),jt=Ht.tTf?t(Ht.tTf):n(Ht,"tTf",w("transform"),Mt),Yt=Ht.t3D?t(Ht.t3D):n(Ht,"t3D",I(jt),Mt),Vt=Ht.tTDu?t(Ht.tTDu):n(Ht,"tTDu",w("transitionDuration"),Mt),Gt=Ht.tTDe?t(Ht.tTDe):n(Ht,"tTDe",w("transitionDelay"),Mt),Qt=Ht.tADu?t(Ht.tADu):n(Ht,"tADu",w("animationDuration"),Mt),Xt=Ht.tADe?t(Ht.tADe):n(Ht,"tADe",w("animationDelay"),Mt),Kt=Ht.tTE?t(Ht.tTE):n(Ht,"tTE",L(Vt,"Transition"),Mt),Ut=Ht.tAE?t(Ht.tAE):n(Ht,"tAE",L(Qt,"Animation"),Mt),_t=Rt.console&&"function"==typeof Rt.console.warn,Jt=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],Zt={};if(Jt.forEach(function(e){if("string"==typeof a[e]){var t=a[e],n=Ot.querySelector(t);if(Zt[e]=t,n&&n.nodeName)a[e]=n;else return void(_t&&console.warn("Can't find",a[e]))}}),1>a.container.children.length)return void(_t&&console.warn("No slides found in",a.container));var $t=a.responsive,en=a.nested,tn="carousel"===a.mode;if($t){0 in $t&&(a=e(a,$t[0]),delete $t[0]);var nn={};for(var an in $t){var on=$t[an];on="number"==typeof on?{items:on}:on,nn[an]=on}$t=nn,nn=null}if(tn||o(a),!tn){a.axis="horizontal",a.slideBy="page",a.edgePadding=!1;var sn=a.animateIn,rn=a.animateOut,ln=a.animateDelay,dn=a.animateNormal}var un,cn,pn="horizontal"===a.axis,mn=Ot.createElement("div"),hn=Ot.createElement("div"),yn=a.container,gn=yn.parentNode,fn=yn.outerHTML,vn=yn.children,xn=vn.length,bn=Y(),Cn=!1;$t&&ye(),tn&&(yn.className+=" tns-vpfix");var Tn,Nn,An,En,wn=a.autoWidth,In=U("fixedWidth"),Ln=U("edgePadding"),Sn=U("gutter"),Dn=X(),Bn=U("center"),On=wn?1:Math.floor(U("items")),Rn=U("slideBy"),kn=a.viewportMax||a.fixedWidthViewportWidth,Hn=U("arrowKeys"),Mn=U("speed"),Pn=a.rewind,zn=!Pn&&a.loop,Wn=U("autoHeight"),qn=U("controls"),Fn=U("controlsText"),jn=U("nav"),Yn=U("touch"),Vn=U("mouseDrag"),Gn=U("autoplay"),Qn=U("autoplayTimeout"),Xn=U("autoplayText"),Kn=U("autoplayHoverPause"),Un=U("autoplayResetOnVisibility"),_n=u(null,U("nonce")),Jn=a.lazyload,Zn=a.lazyloadSelector,$n=[],ei=zn?j():0,ti=tn?xn+2*ei:xn+ei,ni=!!((In||wn)&&!zn),ii=In?Ke():null,ai=!(tn&&zn),oi=pn?"left":"top",si="",ri="",li=function(){return In?function(){return Bn&&!zn?xn-1:Math.ceil(-ii/(In+Sn))}:wn?function(){for(var e=0;e<ti;e++)if(Tn[e]>=-ii)return e}:function(){return Bn&&tn&&!zn?xn-1:zn||tn?Math.max(0,ti-Math.ceil(On)):ti-1}}(),di=R(U("startIndex")),ui=di,ci=x(),pi=0,mi=wn?null:li(),hi=a.preventActionWhenRunning,yi=a.swipeAngle,gi=!yi||"?",fi=!1,vi=a.onInit,xi=new B,bi=" tns-slider tns-"+a.mode,Ci=yn.id||i(),Ti=U("disable"),Ni=!1,Ai=a.freezable,Ei=Ai&&!wn&&he(),wi=!1,Ii={click:it,keydown:gt},Li={click:at,keydown:vt},Si={mouseover:ht,mouseout:yt},Di={visibilitychange:mt},Bi={keydown:function(t){t=xt(t);var n=[kt.LEFT,kt.RIGHT].indexOf(t.keyCode);0<=n&&it(t,0===n?-1:1)}},Oi={touchstart:At,touchmove:Et,touchend:It,touchcancel:It},Ri={mousedown:At,mousemove:Et,mouseup:It,mouseleave:It},ki=K("controls"),Hi=K("nav"),Mi=!!wn||a.navAsThumbnails,Pi=K("autoplay"),zi=K("touch"),Wi=K("mouseDrag"),qi="tns-slide-active",Fi="tns-complete",ji={load:function(t){we(bt(t))},error:function(t){Ie(bt(t))}},Yi="force"===a.preventScrollOnTouch;if(ki)var Vi,Gi,Qi=a.controlsContainer,Xi=a.controlsContainer?a.controlsContainer.outerHTML:"",Ki=a.prevButton,Ui=a.nextButton,_i=a.prevButton?a.prevButton.outerHTML:"",Ji=a.nextButton?a.nextButton.outerHTML:"";if(Hi)var Zi,$i=a.navContainer,ea=a.navContainer?a.navContainer.outerHTML:"",ta=wn?xn:St(),na=0,ia=-1,aa=P(),oa=aa,sa="tns-nav-active",ra="Carousel Page ",la=" (Current Slide)";if(Pi)var da,ua,ca,pa,ma,ha="forward"===a.autoplayDirection?1:-1,ya=a.autoplayButton,ga=a.autoplayButton?a.autoplayButton.outerHTML:"",fa=["<span class='tns-visually-hidden'>"," animation</span>"];if(zi||Wi)var va,xa,ba,Ca,Ta={},Na={},Aa=!1,Ea=pn?function(e,t){return e.x-t.x}:function(e,t){return e.y-t.y};wn||s(Ti||Ei),jt&&(oi=jt,si="translate",Yt?(si+=pn?"3d(":"3d(0px, ",ri=pn?", 0px, 0px)":", 0px)"):(si+=pn?"X(":"Y(",ri=")")),tn&&(yn.className=yn.className.replace("tns-vpfix","")),ae(),le(),oe();var wa=function(){return zn?tn?function(){var e=pi,t=mi;e+=Rn,t-=Rn,Ln?(e+=1,t-=1):In&&(Dn+Sn)%(In+Sn)&&(t-=1),ei&&(di>t?di-=xn:di<e&&(di+=xn))}:function(){if(di>mi)for(;di>=pi+xn;)di-=xn;else if(di<pi)for(;di<=mi-xn;)di+=xn}:function(){di=Math.max(pi,Math.min(mi,di))}}(),Ia=function(){return tn?function(){Ge(yn,""),Vt||!Mn?(Je(),(!Mn||!E(yn))&&tt()):O(yn,oi,si,ri,Ue(),Mn,tt),pn||Lt()}:function(){$n=[];var e={};e[Kt]=e[Ut]=tt,D(vn[ui],e),S(vn[di],e),Ze(ui,sn,rn,!0),Ze(di,dn,sn),Kt&&Ut&&Mn&&E(yn)||tt()}}();return{version:"2.9.3",getInfo:Bt,events:xi,goTo:nt,play:ut,pause:ct,isOn:Cn,updateSliderHeight:He,refresh:oe,destroy:ce,rebuild:function(){return G(e(a,Zt))}}};return G}();
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(E,P){"use strict";if(!E.jstree){var s=0,a=!1,n=!1,o=!1,r=[],e=E("script:last").attr("src"),b=window.document,c=window.setImmediate,i=window.Promise;!c&&i&&(c=function(e,t){i.resolve(t).then(e)}),E.jstree={version:"3.3.17",defaults:{plugins:[]},plugins:{},path:e&&-1!==e.indexOf("/")?e.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},E.jstree.create=function(e,i){var r=new E.jstree.core(++s),t=i;return i=E.extend(!0,{},E.jstree.defaults,i),t&&t.plugins&&(i.plugins=t.plugins),E.each(i.plugins,function(e,t){"core"!==e&&(r=r.plugin(t,i[t]))}),E(e).data("jstree",r),r.init(e,i),r},E.jstree.destroy=function(){E(".jstree:jstree").jstree("destroy"),E(b).off(".jstree")},E.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},E.jstree.reference=function(t){var i=null,e=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!e||!e.length)try{e=E(t)}catch(e){}if(!e||!e.length)try{e=E("#"+t.replace(E.jstree.idregex,"\\$&"))}catch(e){}return e&&e.length&&(e=e.closest(".jstree")).length&&(e=e.data("jstree"))?i=e:E(".jstree").each(function(){var e=E(this).data("jstree");if(e&&e._model.data[t])return i=e,!1}),i},E.fn.jstree=function(i){var r="string"==typeof i,s=Array.prototype.slice.call(arguments,1),a=null;return!(!0===i&&!this.length)&&(this.each(function(){var e=E.jstree.reference(this),t=r&&e?e[i]:null;if(a=r&&t?t.apply(e,s):null,e||r||i!==P&&!E.isPlainObject(i)||E.jstree.create(this,i),null!==(a=e&&!r||!0===i?e||!1:a)&&a!==P)return!1}),null!==a&&a!==P?a:this)},E.expr.pseudos.jstree=E.expr.createPseudo(function(e){return function(e){return E(e).hasClass("jstree")&&E(e).data("jstree")!==P}}),E.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:E.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(e){e.type="click",E(e.currentTarget).trigger(e)},enter:function(e){e.type="click",E(e.currentTarget).trigger(e)},left:function(e){var e;e.preventDefault(),this.is_open(e.currentTarget)?this.close_node(e.currentTarget):(e=this.get_parent(e.currentTarget))&&e.id!==E.jstree.root&&this.get_node(e,!0).children(".jstree-anchor").trigger("focus")},up:function(e){e.preventDefault();var e=this.get_prev_dom(e.currentTarget);e&&e.length&&e.children(".jstree-anchor").trigger("focus")},right:function(e){var e;e.preventDefault(),this.is_closed(e.currentTarget)?this.open_node(e.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").trigger("focus")}):!this.is_open(e.currentTarget)||(e=this.get_node(e.currentTarget,!0).children(".jstree-children")[0])&&E(this._firstChild(e)).children(".jstree-anchor").trigger("focus")},down:function(e){e.preventDefault();var e=this.get_next_dom(e.currentTarget);e&&e.length&&e.children(".jstree-anchor").trigger("focus")},"*":function(e){this.open_all()},home:function(e){e.preventDefault();var e=this._firstChild(this.get_container_ul()[0]);e&&E(e).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}},allow_reselect:!1},E.jstree.core.prototype={plugin:function(e,t){var i=E.jstree.plugins[e];return i?(this._data[e]={},i.prototype=this,new i(t,this)):this},init:function(e,t){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[E.jstree.root]={id:E.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=E(e).addClass("jstree jstree-"+this._id),this.settings=t,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(E.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e=b.createElement("LI"),t,i;return e.setAttribute("role","none"),(t=b.createElement("I")).className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),e.appendChild(t),(t=b.createElement("A")).className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),t.setAttribute("role","treeitem"),(i=b.createElement("I")).className="jstree-icon jstree-themeicon",i.setAttribute("role","presentation"),t.appendChild(i),e.appendChild(t),t=i=null,e},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},i=[];if(e.ctrlKey&&i.push("ctrl"),e.altKey&&i.push("alt"),e.shiftKey&&i.push("shift"),i.push(t[e.which]?t[e.which].toLowerCase():e.which),"shift-shift"===(i=i.sort().join("-").toLowerCase())||"ctrl-ctrl"===i||"alt-alt"===i)return null;var r=this.settings.core.keyboard,s,a;for(s in r)if(r.hasOwnProperty(s)&&(a="-"!==(a=s)&&"+"!==a?(a=a.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase():a)===i)return r[s];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var s="",a=null,t=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(b.selection&&b.selection.empty)b.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(e){}}}).on("mousedown.jstree",function(e){e.target===this.element[0]&&(e.preventDefault(),t=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",function(e){this.toggle_node(e.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(e.target)}.bind(this)).on("click.jstree",".jstree-anchor",function(e){e.preventDefault(),e.currentTarget!==b.activeElement&&E(e.currentTarget).trigger("focus"),this.activate_node(e.currentTarget,e)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var e=t.call(this,e);if(!1===e||!0===e)return e}}.bind(this)).on("load_node.jstree",function(e,t){t.status&&(t.node.id!==E.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){for(var e=[],t,i,t=0,i=this._data.core.selected.length;t<i;t++)e=e.concat(this._model.data[this._data.core.selected[t]].parents);for(t=0,i=(e=E.vakata.array_unique(e)).length;t<i;t++)this.open_node(e[t],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;a&&clearTimeout(a),a=setTimeout(function(){s=""},500);var i=String.fromCharCode(e.which).toLowerCase(),t=this.element.find(".jstree-anchor").filter(":visible"),e=t.index(b.activeElement)||0,r=!1;if(1<(s+=i).length){if(t.slice(e).each(function(e,t){if(0===E(t).text().toLowerCase().indexOf(s))return E(t).trigger("focus"),!(r=!0)}.bind(this)),r)return;if(t.slice(0,e).each(function(e,t){if(0===E(t).text().toLowerCase().indexOf(s))return E(t).trigger("focus"),!(r=!0)}.bind(this)),r)return}new RegExp("^"+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(s)&&(t.slice(e+1).each(function(e,t){if(E(t).text().toLowerCase().charAt(0)===i)return E(t).trigger("focus"),!(r=!0)}.bind(this)),r||t.slice(0,e+1).each(function(e,t){if(E(t).text().toLowerCase().charAt(0)===i)return E(t).trigger("focus"),!(r=!0)}.bind(this)))}.bind(this)).on("init.jstree",function(){var e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(e){this._data.core.focused=null,E(e.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0"),E(e.currentTarget).attr("tabindex","-1")}.bind(this)).on("focus.jstree",".jstree-anchor",function(e){var t=this.get_node(e.currentTarget);t&&(t.id||0===t.id)&&(this._data.core.focused=t.id),this.element.find(".jstree-hovered").not(e.currentTarget).trigger("mouseleave"),E(e.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1"),E(e.currentTarget).attr("tabindex","0")}.bind(this)).on("focus.jstree",function(){var e;500<+new Date-t&&!this._data.core.focused&&this.settings.core.restore_focus&&(t=0,(e=this.get_node(this.element.attr("aria-activedescendant"),!0))&&e.find("> .jstree-anchor").trigger("focus"))}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(e){this.hover_node(e.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(e){this.dehover_node(e.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),E(b).off(".jstree-"+this._id)},trigger:function(e,t){((t=t||{}).instance=this).element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var t=this.settings.core.strings;return E.vakata.is_function(t)?t.call(this,e):t&&t[e]?t[e]:e},_firstChild:function(e){e=e?e.firstChild:null;while(null!==e&&1!==e.nodeType)e=e.nextSibling;return e},_nextSibling:function(e){e=e?e.nextSibling:null;while(null!==e&&1!==e.nodeType)e=e.nextSibling;return e},_previousSibling:function(e){e=e?e.previousSibling:null;while(null!==e&&1!==e.nodeType)e=e.previousSibling;return e},get_node:function(e,t){var i;(e=e&&(e.id||0===e.id)?e.id:e)instanceof E&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(i=E("#"+e.replace(E.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else if((i=this.element.find(e)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else{if(!(i=this.element.find(e)).length||!i.hasClass("jstree"))return!1;e=this._model.data[E.jstree.root]}return e=t?e.id===E.jstree.root?this.element:E("#"+e.id.replace(E.jstree.idregex,"\\$&"),this.element):e}catch(e){return!1}},get_path:function(e,t,i){if(!(e=e.parents?e:this.get_node(e))||e.id===E.jstree.root||!e.parents)return!1;var r,s,a=[];for(a.push(i?e.id:e.text),r=0,s=e.parents.length;r<s;r++)a.push(i?e.parents[r]:this.get_text(e.parents[r]));return a=a.reverse().slice(1),t?a.join(t):a},get_next_dom:function(e,t){var i;if((e=this.get_node(e,!0))[0]===this.element[0]){i=this._firstChild(this.get_container_ul()[0]);while(i&&0===i.offsetHeight)i=this._nextSibling(i);return!!i&&E(i)}if(!e||!e.length)return!1;if(t){i=e[0];do{i=this._nextSibling(i)}while(i&&0===i.offsetHeight);return!!i&&E(i)}if(e.hasClass("jstree-open")){i=this._firstChild(e.children(".jstree-children")[0]);while(i&&0===i.offsetHeight)i=this._nextSibling(i);if(null!==i)return E(i)}i=e[0];do{i=this._nextSibling(i)}while(i&&0===i.offsetHeight);return null!==i?E(i):e.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(e,t){var i;if((e=this.get_node(e,!0))[0]===this.element[0]){i=this.get_container_ul()[0].lastChild;while(i&&0===i.offsetHeight)i=this._previousSibling(i);return!!i&&E(i)}if(!e||!e.length)return!1;if(t){i=e[0];do{i=this._previousSibling(i)}while(i&&0===i.offsetHeight);return!!i&&E(i)}i=e[0];do{i=this._previousSibling(i)}while(i&&0===i.offsetHeight);if(null===i)return!(!(i=e[0].parentNode.parentNode)||!i.className||-1===i.className.indexOf("jstree-node"))&&E(i);e=E(i);while(e.hasClass("jstree-open"))e=e.children(".jstree-children").first().children(".jstree-node:visible:last");return e},get_parent:function(e){return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&e.parent},get_children_dom:function(e){return(e=this.get_node(e,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||0<e.children.length)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(n,o){var e=this.get_node(n,!0),t,i,r,s,a;if(E.vakata.is_array(n))return this._load_nodes(n.slice(),o),!0;if(!(n=this.get_node(n)))return o&&o.call(this,n,!1),!1;if(n.state.loaded){for(n.state.loaded=!1,r=0,s=n.parents.length;r<s;r++)this._model.data[n.parents[r]].children_d=E.vakata.array_filter(this._model.data[n.parents[r]].children_d,function(e){return-1===E.inArray(e,n.children_d)});for(t=0,i=n.children_d.length;t<i;t++)this._model.data[n.children_d[t]].state.selected&&(a=!0),delete this._model.data[n.children_d[t]];a&&(this._data.core.selected=E.vakata.array_filter(this._data.core.selected,function(e){return-1===E.inArray(e,n.children_d)})),n.children=[],n.children_d=[],a&&this.trigger("changed",{action:"load_node",node:n,selected:this._data.core.selected})}return n.state.failed=!1,n.state.loading=!0,(n.id!==E.jstree.root?e.children(".jstree-anchor"):e).attr("aria-busy",!0),e.addClass("jstree-loading"),this._load_node(n,function(e){(n=this._model.data[n.id]).state.loading=!1,n.state.loaded=e,n.state.failed=!n.state.loaded;for(var t=this.get_node(n,!0),i=0,r=0,s=this._model.data,a=!1,i=0,r=n.children.length;i<r;i++)if(s[n.children[i]]&&!s[n.children[i]].state.hidden){a=!0;break}n.state.loaded&&t&&t.length&&(t.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==n.id&&t.addClass(n.state.opened?"jstree-open":"jstree-closed"):t.addClass("jstree-leaf")),(n.id!==E.jstree.root?t.children(".jstree-anchor"):t).attr("aria-busy",!1),t.removeClass("jstree-loading"),this.trigger("load_node",{node:n,status:e}),o&&o.call(this,n,e)}.bind(this)),!0},_load_nodes:function(e,t,i,r){for(var s=!0,a=function(){this._load_nodes(e,t,!0)},n=this._model.data,o,d,c=[],o=0,d=e.length;o<d;o++)n[e[o]]&&(!n[e[o]].state.loaded&&!n[e[o]].state.failed||!i&&r)&&(this.is_loading(e[o])||this.load_node(e[o],a),s=!1);if(s){for(o=0,d=e.length;o<d;o++)n[e[o]]&&n[e[o]].state.loaded&&c.push(e[o]);t&&!t.done&&(t.call(this,c),t.done=!0)}},load_all:function(e,t){if(e=e||E.jstree.root,!(e=this.get_node(e)))return!1;var i=[],r=this._model.data,s=r[e.id].children_d,a,n;for(e.state&&!e.state.loaded&&i.push(e.id),a=0,n=s.length;a<n;a++)r[s[a]]&&r[s[a]].state&&!r[s[a]].state.loaded&&i.push(s[a]);i.length?this._load_nodes(i,function(){this.load_all(e,t)}):(t&&t.call(this,e),this.trigger("load_all",{node:e}))},_load_node:function(s,a){var e=this.settings.core.data,t,n=function e(){return 3!==this.nodeType&&8!==this.nodeType};return e?E.vakata.is_function(e)?e.call(this,s,function(e){!1===e?a.call(this,!1):this["string"==typeof e?"_append_html_data":"_append_json_data"](s,"string"==typeof e?E(E.parseHTML(e)).filter(n):e,function(e){a.call(this,e)})}.bind(this)):"object"==typeof e?e.url?(e=E.extend(!0,{},e),E.vakata.is_function(e.url)&&(e.url=e.url.call(this,s)),E.vakata.is_function(e.data)&&(e.data=e.data.call(this,s)),E.ajax(e).done(function(e,t,i){var r=i.getResponseHeader("Content-Type");return r&&-1!==r.indexOf("json")||"object"==typeof e?this._append_json_data(s,e,function(e){a.call(this,e)}):r&&-1!==r.indexOf("html")||"string"==typeof e?this._append_html_data(s,E(E.parseHTML(e)).filter(n),function(e){a.call(this,e)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:s.id,xhr:i})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))}.bind(this)).fail(function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:s.id,xhr:e})},a.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(t=E.vakata.is_array(e)?E.extend(!0,[],e):E.isPlainObject(e)?E.extend(!0,{},e):e,s.id===E.jstree.root?this._append_json_data(s,t,function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:s.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))):"string"==typeof e?s.id===E.jstree.root?this._append_html_data(s,E(E.parseHTML(e)).filter(n),function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:s.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1)):a.call(this,!1):s.id===E.jstree.root?this._append_html_data(s,this._data.core.original_container_html.clone(!0),function(e){a.call(this,e)}):a.call(this,!1)},_node_changed:function(e){(e=this.get_node(e))&&-1===E.inArray(e.id,this._model.changed)&&this._model.changed.push(e.id)},_append_html_data:function(e,t,i){(e=this.get_node(e)).children=[],e.children_d=[];var t=t.is("ul")?t.children():t,r=e.id,s=[],a=[],n=this._model.data,o=n[r],e=this._data.core.selected.length,d,c,l;for(t.each(function(e,t){(d=this._parse_model_from_html(E(t),r,o.parents.concat()))&&(s.push(d),a.push(d),n[d].children_d.length&&(a=a.concat(n[d].children_d)))}.bind(this)),o.children=s,o.children_d=a,c=0,l=o.parents.length;c<l;c++)n[o.parents[c]].children_d=n[o.parents[c]].children_d.concat(a);this.trigger("model",{nodes:a,parent:r}),r!==E.jstree.root?(this._node_changed(r),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==e&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),i.call(this,!0)},_append_json_data:function(e,t,d,i){if(null!==this.element){(e=this.get_node(e)).children=[],e.children_d=[],t.d&&"string"==typeof(t=t.d)&&(t=JSON.parse(t)),E.vakata.is_array(t)||(t=[t]);var r=null,s={df:this._model.default_state,dat:t,par:e.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},v=this,a=function(e,c){var t=(e=e.data?e.data:e).dat,i=e.par,r=[],s=[],l=[],h=e.df,_=e.t_id,g=e.t_cnt,u=e.m,a=u[i],e=e.sel,n,o,d,f,p=function(e,t,i){i=i?i.concat():[],t&&i.unshift(t);var r=e.id.toString(),s,a,n,o,d={id:r,text:e.text||"",icon:e.icon===c||e.icon,parent:t,parents:i,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(s in h)h.hasOwnProperty(s)&&(d.state[s]=h[s]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(d.icon=e.data.jstree.icon),d.icon!==c&&null!==d.icon&&""!==d.icon||(d.icon=!0),e&&e.data&&(d.data=e.data,e.data.jstree))for(s in e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(d.state[s]=e.data.jstree[s]);if(e&&"object"==typeof e.state)for(s in e.state)e.state.hasOwnProperty(s)&&(d.state[s]=e.state[s]);if(e&&"object"==typeof e.li_attr)for(s in e.li_attr)e.li_attr.hasOwnProperty(s)&&(d.li_attr[s]=e.li_attr[s]);if(d.li_attr.id||(d.li_attr.id=r),e&&"object"==typeof e.a_attr)for(s in e.a_attr)e.a_attr.hasOwnProperty(s)&&(d.a_attr[s]=e.a_attr[s]);for(e&&e.children&&!0===e.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),s=0,a=(u[d.id]=d).children.length;s<a;s++)n=p(u[d.children[s]],d.id,i),o=u[n],d.children_d.push(n),o.children_d.length&&(d.children_d=d.children_d.concat(o.children_d));return delete e.data,delete e.children,u[d.id].original=e,d.state.selected&&l.push(d.id),d.id},m=function(e,t,i){i=i?i.concat():[],t&&i.unshift(t);var r=!1,s,a,n,o,d;do{r="j"+_+"_"+ ++g}while(u[r]);for(s in d={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===c||e.icon,parent:t,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},h)h.hasOwnProperty(s)&&(d.state[s]=h[s]);if(e&&(e.id||0===e.id)&&(d.id=e.id.toString()),e&&e.text&&(d.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(d.icon=e.data.jstree.icon),d.icon!==c&&null!==d.icon&&""!==d.icon||(d.icon=!0),e&&e.data&&(d.data=e.data,e.data.jstree))for(s in e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(d.state[s]=e.data.jstree[s]);if(e&&"object"==typeof e.state)for(s in e.state)e.state.hasOwnProperty(s)&&(d.state[s]=e.state[s]);if(e&&"object"==typeof e.li_attr)for(s in e.li_attr)e.li_attr.hasOwnProperty(s)&&(d.li_attr[s]=e.li_attr[s]);if(d.li_attr.id&&!d.id&&0!==d.id&&(d.id=d.li_attr.id.toString()),d.id||0===d.id||(d.id=r),d.li_attr.id||(d.li_attr.id=d.id),e&&"object"==typeof e.a_attr)for(s in e.a_attr)e.a_attr.hasOwnProperty(s)&&(d.a_attr[s]=e.a_attr[s]);if(e&&e.children&&e.children.length){for(s=0,a=e.children.length;s<a;s++)n=m(e.children[s],d.id,i),o=u[n],d.children.push(n),o.children_d.length&&(d.children_d=d.children_d.concat(o.children_d));d.children_d=d.children_d.concat(d.children)}return e&&e.children&&!0===e.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),delete e.data,delete e.children,d.original=e,(u[d.id]=d).state.selected&&l.push(d.id),d.id};if(t.length&&t[0].id!==c&&t[0].parent!==c){for(o=0,d=t.length;o<d;o++)t[o].children||(t[o].children=[]),t[o].state||(t[o].state={}),u[t[o].id.toString()]=t[o];for(o=0,d=t.length;o<d;o++)u[t[o].parent.toString()]?(u[t[o].parent.toString()].children.push(t[o].id.toString()),a.children_d.push(t[o].id.toString())):void 0!==v&&(v._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:t[o].id.toString(),parent:t[o].parent.toString()})},v.settings.core.error.call(v,v._data.core.last_error));for(o=0,d=a.children.length;o<d;o++)n=p(u[a.children[o]],i,a.parents.concat()),s.push(n),u[n].children_d.length&&(s=s.concat(u[n].children_d));for(o=0,d=a.parents.length;o<d;o++)u[a.parents[o]].children_d=u[a.parents[o]].children_d.concat(s);f={cnt:g,mod:u,sel:e,par:i,dpc:s,add:l}}else{for(o=0,d=t.length;o<d;o++)(n=m(t[o],i,a.parents.concat()))&&(r.push(n),s.push(n),u[n].children_d.length&&(s=s.concat(u[n].children_d)));for(a.children=r,a.children_d=s,o=0,d=a.parents.length;o<d;o++)u[a.parents[o]].children_d=u[a.parents[o]].children_d.concat(s);f={cnt:g,mod:u,sel:e,par:i,dpc:s,add:l}}if("undefined"!=typeof window&&void 0!==window.document)return f;postMessage(f)},n=function(e,t){if(null!==this.element){var i,r;for(i in this._cnt=e.cnt,r=this._model.data)r.hasOwnProperty(i)&&r[i].state&&r[i].state.loading&&e.mod[i]&&(e.mod[i].state.loading=!0);if(this._model.data=e.mod,t){var s,a=e.add,n=e.sel,o=this._data.core.selected.slice(),r=this._model.data;if(n.length!==o.length||E.vakata.array_unique(n.concat(o)).length!==n.length){for(i=0,s=n.length;i<s;i++)-1===E.inArray(n[i],a)&&-1===E.inArray(n[i],o)&&(r[n[i]].state.selected=!1);for(i=0,s=o.length;i<s;i++)-1===E.inArray(o[i],n)&&(r[o[i]].state.selected=!0)}}e.add.length&&(this._data.core.selected=this._data.core.selected.concat(e.add)),this.trigger("model",{nodes:e.dpc,parent:e.par}),e.par!==E.jstree.root?(this._node_changed(e.par),this.redraw()):this.redraw(!0),e.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!t&&c?c(function(){d.call(v,!0)}):d.call(v,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage="+a.toString()],{type:"text/javascript"}))),!this._data.core.working||i?(this._data.core.working=!0,(r=new window.Worker(this._wrk)).onmessage=function(e){n.call(this,e.data,!0);try{r.terminate(),r=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),r.onerror=function(e){n.call(this,a(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),s.par?r.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([e,t,d,!0])}catch(e){n.call(this,a(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else n.call(this,a(s),!1)}},_parse_model_from_html:function(e,t,i){i=i?[].concat(i):[],t&&i.unshift(t);var r,s,a=this._model.data,n={id:!1,text:!1,icon:!0,parent:t,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},o,t,d;for(o in this._model.default_state)this._model.default_state.hasOwnProperty(o)&&(n.state[o]=this._model.default_state[o]);if(t=E.vakata.attributes(e,!0),E.each(t,function(e,t){return!(t=E.vakata.trim(t)).length||(n.li_attr[e]=t,void("id"===e&&(n.id=t.toString())))}),(t=e.children("a").first()).length&&(t=E.vakata.attributes(t,!0),E.each(t,function(e,t){(t=E.vakata.trim(t)).length&&(n.a_attr[e]=t)})),(t=(e.children("a").first().length?e.children("a").first():e).clone()).children("ins, i, ul").remove(),t=t.html(),t=E("<div></div>").html(t),n.text=this.settings.core.force_text?t.text():t.html(),t=e.data(),n.data=t?E.extend(!0,{},t):null,n.state.opened=e.hasClass("jstree-open"),n.state.selected=e.children("a").hasClass("jstree-clicked"),n.state.disabled=e.children("a").hasClass("jstree-disabled"),n.data&&n.data.jstree)for(o in n.data.jstree)n.data.jstree.hasOwnProperty(o)&&(n.state[o]=n.data.jstree[o]);(t=e.children("a").children(".jstree-themeicon")).length&&(n.icon=!t.hasClass("jstree-themeicon-hidden")&&t.attr("rel")),n.state.icon!==P&&(n.icon=n.state.icon),n.icon!==P&&null!==n.icon&&""!==n.icon||(n.icon=!0),t=e.children("ul").children("li");do{d="j"+this._id+"_"+ ++this._cnt}while(a[d]);return n.id=n.li_attr.id?n.li_attr.id.toString():d,t.length?(t.each(function(e,t){r=this._parse_model_from_html(E(t),n.id,i),s=this._model.data[r],n.children.push(r),s.children_d.length&&(n.children_d=n.children_d.concat(s.children_d))}.bind(this)),n.children_d=n.children_d.concat(n.children)):e.hasClass("jstree-closed")&&(n.state.loaded=!1),n.li_attr.class&&(n.li_attr.class=n.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),n.a_attr.class&&(n.a_attr.class=n.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),(a[n.id]=n).state.selected&&this._data.core.selected.push(n.id),n.id},_parse_model_from_flat_json:function(e,t,i){i=i?i.concat():[],t&&i.unshift(t);var r=e.id.toString(),s=this._model.data,a=this._model.default_state,n,o,d,c,l={id:r,text:e.text||"",icon:e.icon===P||e.icon,parent:t,parents:i,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(n in a)a.hasOwnProperty(n)&&(l.state[n]=a[n]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),l.icon!==P&&null!==l.icon&&""!==l.icon||(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(n in e.data.jstree)e.data.jstree.hasOwnProperty(n)&&(l.state[n]=e.data.jstree[n]);if(e&&"object"==typeof e.state)for(n in e.state)e.state.hasOwnProperty(n)&&(l.state[n]=e.state[n]);if(e&&"object"==typeof e.li_attr)for(n in e.li_attr)e.li_attr.hasOwnProperty(n)&&(l.li_attr[n]=e.li_attr[n]);if(l.li_attr.id||(l.li_attr.id=r),e&&"object"==typeof e.a_attr)for(n in e.a_attr)e.a_attr.hasOwnProperty(n)&&(l.a_attr[n]=e.a_attr[n]);for(e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),n=0,o=(s[l.id]=l).children.length;n<o;n++)c=s[d=this._parse_model_from_flat_json(s[l.children[n]],l.id,i)],l.children_d.push(d),c.children_d.length&&(l.children_d=l.children_d.concat(c.children_d));return delete e.data,delete e.children,s[l.id].original=e,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(e,t,i){i=i?i.concat():[],t&&i.unshift(t);var r=!1,s,a,n,o,d=this._model.data,c=this._model.default_state,l;do{r="j"+this._id+"_"+ ++this._cnt}while(d[r]);for(s in l={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===P||e.icon,parent:t,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},c)c.hasOwnProperty(s)&&(l.state[s]=c[s]);if(e&&(e.id||0===e.id)&&(l.id=e.id.toString()),e&&e.text&&(l.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),l.icon!==P&&null!==l.icon&&""!==l.icon||(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(s in e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(l.state[s]=e.data.jstree[s]);if(e&&"object"==typeof e.state)for(s in e.state)e.state.hasOwnProperty(s)&&(l.state[s]=e.state[s]);if(e&&"object"==typeof e.li_attr)for(s in e.li_attr)e.li_attr.hasOwnProperty(s)&&(l.li_attr[s]=e.li_attr[s]);if(l.li_attr.id&&!l.id&&0!==l.id&&(l.id=l.li_attr.id.toString()),l.id||0===l.id||(l.id=r),l.li_attr.id||(l.li_attr.id=l.id),e&&"object"==typeof e.a_attr)for(s in e.a_attr)e.a_attr.hasOwnProperty(s)&&(l.a_attr[s]=e.a_attr[s]);if(e&&e.children&&e.children.length){for(s=0,a=e.children.length;s<a;s++)o=d[n=this._parse_model_from_json(e.children[s],l.id,i)],l.children.push(n),o.children_d.length&&(l.children_d=l.children_d.concat(o.children_d));l.children_d=l.children.concat(l.children_d)}return e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete e.data,delete e.children,l.original=e,(d[l.id]=l).state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){for(var e=(this._model.force_full_redraw?this._model.data[E.jstree.root].children:this._model.changed).concat([]),t=b.createElement("UL"),i,r,s,a=this._data.core.focused,r=0,s=e.length;r<s;r++)(i=this.redraw_node(e[r],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&t.appendChild(i);this._model.force_full_redraw&&(t.className=this.get_container_ul()[0].className,t.setAttribute("role","presentation"),this.element.empty().append(t)),null!==a&&this.settings.core.restore_focus&&((i=this.get_node(a,!0))&&i.length&&i.children(".jstree-anchor")[0]!==b.activeElement?i.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:e})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(e){var t=this.get_node(e),i=!1,r=!1,s=!1,a=b;if(!t)return!1;if(t.id===E.jstree.root)return this.redraw(!0);if(!(e=this.get_node(e,!0))||!e.length)return!1;if(e.children(".jstree-children").remove(),e=e[0],t.children.length&&t.state.loaded){for((s=a.createElement("UL")).setAttribute("role","group"),s.className="jstree-children",i=0,r=t.children.length;i<r;i++)s.appendChild(this.redraw_node(t.children[i],!0,!0));e.appendChild(s)}},redraw_node:function(e,t,i,r){var s=this.get_node(e),a=!1,n=!1,o=!1,d=!1,c=!1,l=!1,h="",_=b,g=this._model.data,u=!1,f=!1,p=null,m=0,v=0,j=!1,k=!1;if(!s)return!1;if(s.id===E.jstree.root)return this.redraw(!0);if(t=t||0===s.children.length,e=b.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(s.id[0])?"\\3"+s.id[0]+" "+s.id.substr(1).replace(E.jstree.idregex,"\\$&"):s.id.replace(E.jstree.idregex,"\\$&"))):b.getElementById(s.id))e=E(e),i||((a=e.parent().parent()[0])===this.element[0]&&(a=null),n=e.index()),(t=!t&&s.children.length&&!e.children(".jstree-children").length?!0:t)||(o=e.children(".jstree-children")[0]),u=e.children(".jstree-anchor")[0]===b.activeElement,e.remove();else if(t=!0,!i){if(!(null===(a=s.parent!==E.jstree.root?E("#"+s.parent.replace(E.jstree.idregex,"\\$&"),this.element)[0]:null)||a&&g[s.parent].state.opened))return!1;n=E.inArray(s.id,(null===a?g[E.jstree.root]:g[s.parent]).children)}for(d in e=this._data.core.node.cloneNode(!0),h="jstree-node ",s.li_attr)s.li_attr.hasOwnProperty(d)&&"id"!==d&&("class"!==d?e.setAttribute(d,s.li_attr[d]):h+=s.li_attr[d]);for(s.a_attr.id||(s.a_attr.id=s.id+"_anchor"),e.childNodes[1].setAttribute("aria-selected",!!s.state.selected),e.childNodes[1].setAttribute("aria-level",s.parents.length),this.settings.core.compute_elements_positions&&(e.childNodes[1].setAttribute("aria-setsize",g[s.parent].children.length),e.childNodes[1].setAttribute("aria-posinset",g[s.parent].children.indexOf(s.id)+1)),s.state.disabled&&e.childNodes[1].setAttribute("aria-disabled",!0),d=0,c=s.children.length;d<c;d++)if(!g[s.children[d]].state.hidden){j=!0;break}if(null!==s.parent&&g[s.parent]&&!s.state.hidden&&(d=E.inArray(s.id,g[s.parent].children),k=s.id,-1!==d))for(d++,c=g[s.parent].children.length;d<c;d++)if((k=!g[g[s.parent].children[d]].state.hidden?g[s.parent].children[d]:k)!==s.id)break;for(c in s.state.hidden&&(h+=" jstree-hidden"),s.state.loading&&(h+=" jstree-loading"),s.state.loaded&&!j?h+=" jstree-leaf":(h+=s.state.opened&&s.state.loaded?" jstree-open":" jstree-closed",e.childNodes[1].setAttribute("aria-expanded",s.state.opened&&s.state.loaded)),k===s.id&&(h+=" jstree-last"),e.id=s.id,e.className=h,h=(s.state.selected?" jstree-clicked":"")+(s.state.disabled?" jstree-disabled":""),s.a_attr)s.a_attr.hasOwnProperty(c)&&("href"===c&&"#"===s.a_attr[c]||("class"!==c?e.childNodes[1].setAttribute(c,s.a_attr[c]):h+=" "+s.a_attr[c]));if(h.length&&(e.childNodes[1].className="jstree-anchor "+h),(s.icon&&!0!==s.icon||!1===s.icon)&&(!1===s.icon?e.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===s.icon.indexOf("/")&&-1===s.icon.indexOf(".")?e.childNodes[1].childNodes[0].className+=" "+s.icon+" jstree-themeicon-custom":(e.childNodes[1].childNodes[0].style.backgroundImage='url("'+s.icon+'")',e.childNodes[1].childNodes[0].style.backgroundPosition="center center",e.childNodes[1].childNodes[0].style.backgroundSize="auto",e.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?e.childNodes[1].appendChild(_.createTextNode(s.text)):e.childNodes[1].innerHTML+=s.text,t&&s.children.length&&(s.state.opened||r)&&s.state.loaded){for((l=_.createElement("UL")).setAttribute("role","group"),l.className="jstree-children",d=0,c=s.children.length;d<c;d++)l.appendChild(this.redraw_node(s.children[d],t,!0));e.appendChild(l)}if(o&&e.appendChild(o),!i){for(d=0,c=(a=a||this.element[0]).childNodes.length;d<c;d++)if(a.childNodes[d]&&a.childNodes[d].className&&-1!==a.childNodes[d].className.indexOf("jstree-children")){p=a.childNodes[d];break}p||((p=_.createElement("UL")).setAttribute("role","group"),p.className="jstree-children",a.appendChild(p)),n<(a=p).childNodes.length?a.insertBefore(e,a.childNodes[n]):a.appendChild(e),u&&(m=this.element[0].scrollTop,v=this.element[0].scrollLeft,e.childNodes[1].focus(),this.element[0].scrollTop=m,this.element[0].scrollLeft=v)}return s.state.opened&&!s.state.loaded&&(s.state.opened=!1,setTimeout(function(){this.open_node(s.id,!1,0)}.bind(this),0)),e},open_node:function(e,i,r){var t,s,a,n;if(E.vakata.is_array(e)){for(t=0,s=(e=e.slice()).length;t<s;t++)this.open_node(e[t],i,r);return!0}return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&(r=r===P?this.settings.core.animation:r,this.is_closed(e)?this.is_loaded(e)?(a=this.get_node(e,!0),n=this,a.length&&(r&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),e.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(e),r?(this.trigger("before_open",{node:e}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",n.element&&n.trigger("after_open",{node:e})})):(this.trigger("before_open",{node:e}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].childNodes[1].setAttribute("aria-expanded",!0))),e.state.opened=!0,i&&i.call(this,e,!0),a.length||this.trigger("before_open",{node:e}),this.trigger("open_node",{node:e}),r&&a.length||this.trigger("after_open",{node:e}),!0):this.is_loading(e)?setTimeout(function(){this.open_node(e,i,r)}.bind(this),500):void this.load_node(e,function(e,t){return t?this.open_node(e,i,r):!!i&&i.call(this,e,!1)}):(i&&i.call(this,e,!1),!1))},_open_to:function(e){if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;for(var t,i,r=e.parents,t=0,i=r.length;t<i;t+=1)t!==E.jstree.root&&this.open_node(r[t],!1,0);return E("#"+e.id.replace(E.jstree.idregex,"\\$&"),this.element)},close_node:function(e,t){var i,r,s,a;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.close_node(e[i],t);return!0}return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&(!this.is_closed(e)&&(t=t===P?this.settings.core.animation:t,a=(s=this).get_node(e,!0),e.state.opened=!1,this.trigger("close_node",{node:e}),void(a.length?t?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(t,function(){this.style.display="",a.children(".jstree-children").remove(),s.element&&s.trigger("after_close",{node:e})}):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.children(".jstree-anchor").attr("aria-expanded",!1),a.children(".jstree-children").remove(),this.trigger("after_close",{node:e})):this.trigger("after_close",{node:e}))))},toggle_node:function(e){var t,i;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.toggle_node(e[t]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,i,r){if(e=e||E.jstree.root,!(e=this.get_node(e)))return!1;var t=e.id===E.jstree.root?this.get_container_ul():this.get_node(e,!0),s,a,n;if(!t.length){for(s=0,a=e.children_d.length;s<a;s++)this.is_closed(this._model.data[e.children_d[s]])&&(this._model.data[e.children_d[s]].state.opened=!0);return this.trigger("open_all",{node:e})}r=r||t,(t=(n=this).is_closed(e)?t.find(".jstree-closed").addBack():t.find(".jstree-closed")).each(function(){n.open_node(this,function(e,t){t&&this.is_parent(e)&&this.open_all(e,i,r)},i||0)}),0===r.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(r)})},close_all:function(e,t){if(e=e||E.jstree.root,!(e=this.get_node(e)))return!1;var i=e.id===E.jstree.root?this.get_container_ul():this.get_node(e,!0),r=this,s,a;for(i.length&&(i=this.is_open(e)?i.find(".jstree-open").addBack():i.find(".jstree-open"),E(i.get().reverse()).each(function(){r.close_node(this,t||0)})),s=0,a=e.children_d.length;s<a;s++)this._model.data[e.children_d[s]].state.opened=!1;this.trigger("close_all",{node:e})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(e){var t,i;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.enable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;e.state.disabled=!1,this.get_node(e,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:e})},disable_node:function(e){var t,i;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.disable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;e.state.disabled=!0,this.get_node(e,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:e})},is_hidden:function(e){return!0===(e=this.get_node(e)).state.hidden},hide_node:function(e,t){var i,r;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.hide_node(e[i],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;e.state.hidden||(e.state.hidden=!0,this._node_changed(e.parent),t||this.redraw(),this.trigger("hide_node",{node:e}))},show_node:function(e,t){var i,r;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.show_node(e[i],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;e.state.hidden&&(e.state.hidden=!1,this._node_changed(e.parent),t||this.redraw(),this.trigger("show_node",{node:e}))},hide_all:function(e){var t,i=this._model.data,r=[];for(t in i)i.hasOwnProperty(t)&&t!==E.jstree.root&&!i[t].state.hidden&&(i[t].state.hidden=!0,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(e){var t,i=this._model.data,r=[];for(t in i)i.hasOwnProperty(t)&&t!==E.jstree.root&&i[t].state.hidden&&(i[t].state.hidden=!1,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(e,t){if(this.is_disabled(e))return!1;if(t&&"object"==typeof t||(t={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==P?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&(!t.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(t.shiftKey){for(var i=this.get_node(e).id,r=this._data.core.last_clicked.id,s=this.get_node(this._data.core.last_clicked.parent).children,a=!1,n,o,n=0,o=s.length;n<o;n+=1)s[n]===i&&(a=!a),s[n]===r&&(a=!a),this.is_disabled(s[n])||!a&&s[n]!==i&&s[n]!==r?t.ctrlKey||this.deselect_node(s[n],!0,t):this.is_hidden(s[n])||this.select_node(s[n],!0,!1,t);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:t})}else this.is_selected(e)?this.deselect_node(e,!1,t):(t.ctrlKey&&(this._data.core.last_clicked=this.get_node(e)),this.select_node(e,!1,!1,t));else!this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,t):(!this.settings.core.allow_reselect&&this.is_selected(e)&&1===this._data.core.selected.length||(this.deselect_all(!0),this.select_node(e,!1,!1,t)),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:t})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var t=this.element.find(".jstree-hovered"),i=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout(function(){i.attr("aria-activedescendant",e[0].id)},0)},dehover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||!e.children(".jstree-hovered").length)return!1;e.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(e)})},select_node:function(e,t,i,r){var s,a,n,o;if(E.vakata.is_array(e)){for(a=0,n=(e=e.slice()).length;a<n;a++)this.select_node(e[a],t,i,r);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;s=this.get_node(e,!0),e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),(s=!i?this._open_to(e):s)&&s.length&&s.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:e,selected:this._data.core.selected,event:r}),t||this.trigger("changed",{action:"select_node",node:e,selected:this._data.core.selected,event:r}))},deselect_node:function(e,t,i){var r,s,a;if(E.vakata.is_array(e)){for(r=0,s=(e=e.slice()).length;r<s;r++)this.deselect_node(e[r],t,i);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;a=this.get_node(e,!0),e.state.selected&&(e.state.selected=!1,this._data.core.selected=E.vakata.array_remove_item(this._data.core.selected,e.id),a.length&&a.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:e,selected:this._data.core.selected,event:i}),t||this.trigger("changed",{action:"deselect_node",node:e,selected:this._data.core.selected,event:i}))},select_all:function(e){var t=this._data.core.selected.concat([]),i,r;for(this._data.core.selected=this._model.data[E.jstree.root].children_d.concat(),i=0,r=this._data.core.selected.length;i<r;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),e||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:t})},deselect_all:function(e){for(var t=this._data.core.selected.concat([]),i,r,i=0,r=this._data.core.selected.length;i<r;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:t}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:t})},is_selected:function(e){return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&e.state.selected},get_selected:function(e){return e?E.map(this._data.core.selected,function(e){return this.get_node(e)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(e){for(var t=this.get_selected(!0),i={},r,s,a,n,r=0,s=t.length;r<s;r++)i[t[r].id]=t[r];for(r=0,s=t.length;r<s;r++)for(a=0,n=t[r].children_d.length;a<n;a++)i[t[r].children_d[a]]&&delete i[t[r].children_d[a]];for(r in t=[],i)i.hasOwnProperty(r)&&t.push(r);return e?E.map(t,function(e){return this.get_node(e)}.bind(this)):t},get_bottom_selected:function(e){for(var t=this.get_selected(!0),i=[],r,s,r=0,s=t.length;r<s;r++)t[r].children.length||i.push(t[r].id);return e?E.map(i,function(e){return this.get_node(e)}.bind(this)):i},get_state:function(){var e={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},t;for(t in this._model.data)this._model.data.hasOwnProperty(t)&&t!==E.jstree.root&&(this._model.data[t].state.loaded&&this.settings.core.loaded_state&&e.core.loaded.push(t),this._model.data[t].state.opened&&e.core.open.push(t),this._model.data[t].state.selected&&e.core.selected.push(t));return e},set_state:function(t,i){if(t){if(t.core&&t.core.selected&&t.core.initial_selection===P&&(t.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),t.core){var e,r,s,a,n;if(t.core.loaded)return this.settings.core.loaded_state&&E.vakata.is_array(t.core.loaded)&&t.core.loaded.length?this._load_nodes(t.core.loaded,function(e){delete t.core.loaded,this.set_state(t,i)}):(delete t.core.loaded,this.set_state(t,i)),!1;if(t.core.open)return E.vakata.is_array(t.core.open)&&t.core.open.length?this._load_nodes(t.core.open,function(e){this.open_node(e,!1,0),delete t.core.open,this.set_state(t,i)}):(delete t.core.open,this.set_state(t,i)),!1;if(t.core.scroll)return t.core.scroll&&t.core.scroll.left!==P&&this.element.scrollLeft(t.core.scroll.left),t.core.scroll&&t.core.scroll.top!==P&&this.element.scrollTop(t.core.scroll.top),delete t.core.scroll,this.set_state(t,i),!1;if(t.core.selected)return a=this,t.core.initial_selection!==P&&t.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),E.each(t.core.selected,function(e,t){a.select_node(t,!1,!0)})),delete t.core.initial_selection,delete t.core.selected,this.set_state(t,i),!1;for(n in t)t.hasOwnProperty(n)&&"core"!==n&&-1===E.inArray(n,this.settings.plugins)&&delete t[n];if(E.isEmptyObject(t.core))return delete t.core,this.set_state(t,i),!1}return E.isEmptyObject(t)?(t=null,i&&i.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(e,t){this._data.core.state=!0===t?{}:this.get_state(),t&&E.vakata.is_function(t)&&(this._data.core.state=t.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[E.jstree.root]={id:E.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var i=this.get_container_ul()[0].className;e||(this.element.html("<ul class='"+i+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(E.jstree.root,function(e,t){t&&(this.get_container_ul()[0].className=i,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(E.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===E.jstree.root)return!1;var i=[],e=[],r=this._data.core.selected.concat([]);e.push(t.id),!0===t.state.opened&&i.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){e.push(this.id),i.push(this.id)}),this._load_nodes(e,function(e){this.open_node(i,!1,0),this.select_node(r),this.trigger("refresh_node",{node:t,nodes:e})}.bind(this),!1,!0)},set_id:function(e,t){if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;var i,r,s=this._model.data,a=e.id;for(t=t.toString(),s[e.parent].children[E.inArray(e.id,s[e.parent].children)]=t,i=0,r=e.parents.length;i<r;i++)s[e.parents[i]].children_d[E.inArray(e.id,s[e.parents[i]].children_d)]=t;for(i=0,r=e.children.length;i<r;i++)s[e.children[i]].parent=t;for(i=0,r=e.children_d.length;i<r;i++)s[e.children_d[i]].parents[E.inArray(e.id,s[e.children_d[i]].parents)]=t;return-1!==(i=E.inArray(e.id,this._data.core.selected))&&(this._data.core.selected[i]=t),(i=this.get_node(e.id,!0))&&(i.attr("id",t),this.element.attr("aria-activedescendant")===e.id&&this.element.attr("aria-activedescendant",t)),delete s[e.id],e.id=t,s[e.li_attr.id=t]=e,this.trigger("set_id",{node:e,new:e.id,old:a}),!0},get_text:function(e){return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&e.text},set_text:function(e,t){var i,r;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.set_text(e[i],t);return!0}return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&(e.text=t,this.get_node(e,!0).length&&this.redraw_node(e.id),this.trigger("set_text",{obj:e,text:t}),!0)},get_json:function(e,t,i){if(!(e=this.get_node(e||E.jstree.root)))return!1;t&&t.flat&&!i&&(i=[]);var r={id:e.id,text:e.text,icon:this.get_icon(e),li_attr:E.extend(!0,{},e.li_attr),a_attr:E.extend(!0,{},e.a_attr),state:{},data:(!t||!t.no_data)&&E.extend(!0,E.vakata.is_array(e.data)?[]:{},e.data)},s,a;if(t&&t.flat?r.parent=e.parent:r.children=[],t&&t.no_state)delete r.state;else for(s in e.state)e.state.hasOwnProperty(s)&&(r.state[s]=e.state[s]);if(t&&t.no_li_attr&&delete r.li_attr,t&&t.no_a_attr&&delete r.a_attr,t&&t.no_id&&(delete r.id,r.li_attr&&r.li_attr.id&&delete r.li_attr.id,r.a_attr&&r.a_attr.id&&delete r.a_attr.id),t&&t.flat&&e.id!==E.jstree.root&&i.push(r),!t||!t.no_children)for(s=0,a=e.children.length;s<a;s++)t&&t.flat?this.get_json(e.children[s],t,i):r.children.push(this.get_json(e.children[s],t));return t&&t.flat?i:e.id===E.jstree.root?r.children:r},create_node:function(e,t,i,r,s){if(null===e&&(e=E.jstree.root),!(e=this.get_node(e)))return!1;if(!(i=i===P?"last":i).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,i,r,!0)});var a,n,o,d;switch((t="string"==typeof(t=t||{text:this.get_string("New node")})?{text:t}:E.extend(!0,{},t)).text===P&&(t.text=this.get_string("New node")),i=e.id===E.jstree.root&&"after"===(i="before"===i?"first":i)?"last":i){case"before":a=this.get_node(e.parent),i=E.inArray(e.id,a.children),e=a;break;case"after":a=this.get_node(e.parent),i=E.inArray(e.id,a.children)+1,e=a;break;case"inside":case"first":i=0;break;case"last":i=e.children.length;break;default:i=i||0}if(i>e.children.length&&(i=e.children.length),t.id===P&&(t.id=!0),!this.check("create_node",t,e,i))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===t.id&&delete t.id,!(t=this._parse_model_from_json(t,e.id,e.parents.concat())))return!1;for(a=this.get_node(t),(n=[]).push(t),n=n.concat(a.children_d),this.trigger("model",{nodes:n,parent:e.id}),e.children_d=e.children_d.concat(n),o=0,d=e.parents.length;o<d;o++)this._model.data[e.parents[o]].children_d=this._model.data[e.parents[o]].children_d.concat(n);for(t=a,a=[],o=0,d=e.children.length;o<d;o++)a[i<=o?o+1:o]=e.children[o];return a[i]=t.id,e.children=a,this.redraw_node(e,!0),this.trigger("create_node",{node:this.get_node(t),parent:e.id,position:i}),r&&r.call(this,this.get_node(t)),t.id},rename_node:function(e,t){var i,r,s;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.rename_node(e[i],t);return!0}return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&(s=e.text,this.check("rename_node",e,this.get_parent(e),t)?(this.set_text(e,t),this.trigger("rename_node",{node:e,text:t,old:s}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(e){var t,i,r,s,a,n,o,d,c,l,h,s;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.delete_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;if(r=this.get_node(e.parent),s=E.inArray(e.id,r.children),l=!1,!this.check("delete_node",e,r,s))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==s&&(r.children=E.vakata.array_remove(r.children,s)),(a=e.children_d.concat([])).push(e.id),n=0,o=e.parents.length;n<o;n++)this._model.data[e.parents[n]].children_d=E.vakata.array_filter(this._model.data[e.parents[n]].children_d,function(e){return-1===E.inArray(e,a)});for(d=0,c=a.length;d<c;d++)if(this._model.data[a[d]].state.selected){l=!0;break}for(l&&(this._data.core.selected=E.vakata.array_filter(this._data.core.selected,function(e){return-1===E.inArray(e,a)})),this.trigger("delete_node",{node:e,parent:r.id}),l&&this.trigger("changed",{action:"delete_node",node:e,selected:this._data.core.selected,parent:r.id}),d=0,c=a.length;d<c;d++)delete this._model.data[a[d]];return-1!==E.inArray(this._data.core.focused,a)&&(this._data.core.focused=null,h=this.element[0].scrollTop,s=this.element[0].scrollLeft,r.id===E.jstree.root?this._model.data[E.jstree.root].children[0]&&this.get_node(this._model.data[E.jstree.root].children[0],!0).children(".jstree-anchor").trigger("focus"):this.get_node(r,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=h,this.element[0].scrollLeft=s),this.redraw_node(r,!0),!0},check:function(e,t,i,r,s){t=t&&t.id?t:this.get_node(t),i=i&&i.id?i:this.get_node(i);var a=e.match(/^(move_node|copy_node|create_node)$/i)?i:t,n=this.settings.core.check_callback;if("move_node"===e||"copy_node"===e){if(!(s&&s.is_multi||"move_node"!==e||E.inArray(t.id,i.children)!==r))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!i||!i.id)&&i.id})});if(!(s&&s.is_multi||t.id!==i.id&&("move_node"!==e||E.inArray(t.id,i.children)!==r)&&-1===E.inArray(i.id,t.children_d)))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!i||!i.id)&&i.id})})}return(a=a&&a.data?a.data:a)&&a.functions&&(!1===a.functions[e]||!0===a.functions[e])?(!1===a.functions[e]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!i||!i.id)&&i.id})}),a.functions[e]):!(!1===n||E.vakata.is_function(n)&&!1===n.call(this,e,t,i,r,s)||n&&!1===n[e])||!(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!i||!i.id)&&i.id})})},last_error:function(){return this._data.core.last_error},move_node:function(e,t,i,r,s,a,n){var o,d,c,l,h,_,g,u,f,p,m,v,j,k;if(t=this.get_node(t),i=i===P?0:i,!t)return!1;if(!i.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(t))return this.load_node(t,function(){this.move_node(e,t,i,r,!0,!1,n)});if(E.vakata.is_array(e)){if(1!==e.length){for(o=0,d=e.length;o<d;o++)(f=this.move_node(e[o],t,i,r,s,!1,n))&&(t=f,i="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id!==P?e:this.get_node(e))||e.id===E.jstree.root)return!1;if(c=(e.parent||E.jstree.root).toString(),h=i.toString().match(/^(before|after)$/)&&t.id!==E.jstree.root?this.get_node(t.parent):t,g=!(_=n||(this._model.data[e.id]?this:E.jstree.reference(e.id)))||!_._id||this._id!==_._id,l=_&&_._id&&c&&_._model.data[c]&&_._model.data[c].children?E.inArray(e.id,_._model.data[c].children):-1,_&&_._id&&(e=_._model.data[e.id]),g)return!!(f=this.copy_node(e,t,i,r,s,!1,n))&&(_&&_.delete_node(e),f);switch(i=t.id===E.jstree.root&&"after"===(i="before"===i?"first":i)?"last":i){case"before":i=E.inArray(t.id,h.children);break;case"after":i=E.inArray(t.id,h.children)+1;break;case"inside":case"first":i=0;break;case"last":i=h.children.length;break;default:i=i||0}if(i>h.children.length&&(i=h.children.length),!this.check("move_node",e,h,i,{core:!0,origin:n,is_multi:_&&_._id&&_._id!==this._id,is_foreign:!_||!_._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(e.parent===h.id){for(u=h.children.concat(),-1!==(f=E.inArray(e.id,u))&&(u=E.vakata.array_remove(u,f),f<i&&i--),f=[],p=0,m=u.length;p<m;p++)f[i<=p?p+1:p]=u[p];f[i]=e.id,h.children=f,this._node_changed(h.id),this.redraw(h.id===E.jstree.root)}else{for((f=e.children_d.concat()).push(e.id),p=0,m=e.parents.length;p<m;p++){for(u=[],v=0,j=(k=_._model.data[e.parents[p]].children_d).length;v<j;v++)-1===E.inArray(k[v],f)&&u.push(k[v]);_._model.data[e.parents[p]].children_d=u}for(_._model.data[c].children=E.vakata.array_remove_item(_._model.data[c].children,e.id),p=0,m=h.parents.length;p<m;p++)this._model.data[h.parents[p]].children_d=this._model.data[h.parents[p]].children_d.concat(f);for(u=[],p=0,m=h.children.length;p<m;p++)u[i<=p?p+1:p]=h.children[p];for(u[i]=e.id,h.children=u,h.children_d.push(e.id),h.children_d=h.children_d.concat(e.children_d),e.parent=h.id,(f=h.parents.concat()).unshift(h.id),k=e.parents.length,f=(e.parents=f).concat(),p=0,m=e.children_d.length;p<m;p++)this._model.data[e.children_d[p]].parents=this._model.data[e.children_d[p]].parents.slice(0,-1*k),Array.prototype.push.apply(this._model.data[e.children_d[p]].parents,f);c!==E.jstree.root&&h.id!==E.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(c),this._node_changed(h.id)),a||this.redraw()}return r&&r.call(this,e,h,i),this.trigger("move_node",{node:e,parent:h.id,position:i,old_parent:c,old_position:l,is_multi:_&&_._id&&_._id!==this._id,is_foreign:!_||!_._id,old_instance:_,new_instance:this}),e.id},copy_node:function(e,t,i,r,s,a,n){var o,d,c,l,h,_,g,u,f,p,m;if(t=this.get_node(t),i=i===P?0:i,!t)return!1;if(!i.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(t))return this.load_node(t,function(){this.copy_node(e,t,i,r,!0,!1,n)});if(E.vakata.is_array(e)){if(1!==e.length){for(o=0,d=e.length;o<d;o++)(l=this.copy_node(e[o],t,i,r,s,!0,n))&&(t=l,i="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id!==P?e:this.get_node(e))||e.id===E.jstree.root)return!1;switch(u=(e.parent||E.jstree.root).toString(),f=i.toString().match(/^(before|after)$/)&&t.id!==E.jstree.root?this.get_node(t.parent):t,m=!(p=n||(this._model.data[e.id]?this:E.jstree.reference(e.id)))||!p._id||this._id!==p._id,p&&p._id&&(e=p._model.data[e.id]),i=t.id===E.jstree.root&&"after"===(i="before"===i?"first":i)?"last":i){case"before":i=E.inArray(t.id,f.children);break;case"after":i=E.inArray(t.id,f.children)+1;break;case"inside":case"first":i=0;break;case"last":i=f.children.length;break;default:i=i||0}if(i>f.children.length&&(i=f.children.length),!this.check("copy_node",e,f,i,{core:!0,origin:n,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=p?p.get_json(e,{no_id:!0,no_data:!0,no_state:!0}):e))return!1;if(!0===g.id&&delete g.id,!(g=this._parse_model_from_json(g,f.id,f.parents.concat())))return!1;for(l=this.get_node(g),e&&e.state&&!1===e.state.loaded&&(l.state.loaded=!1),(c=[]).push(g),c=c.concat(l.children_d),this.trigger("model",{nodes:c,parent:f.id}),h=0,_=f.parents.length;h<_;h++)this._model.data[f.parents[h]].children_d=this._model.data[f.parents[h]].children_d.concat(c);for(c=[],h=0,_=f.children.length;h<_;h++)c[i<=h?h+1:h]=f.children[h];return c[i]=l.id,f.children=c,f.children_d.push(l.id),f.children_d=f.children_d.concat(l.children_d),f.id===E.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(f.id),a||this.redraw(f.id===E.jstree.root),r&&r.call(this,l,f,i),this.trigger("copy_node",{node:l,original:e,parent:f.id,position:i,old_parent:u,old_position:p&&p._id&&u&&p._model.data[u]&&p._model.data[u].children?E.inArray(e.id,p._model.data[u].children):-1,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id,old_instance:p,new_instance:this}),l.id},cut:function(e){if(e=e||this._data.core.selected.concat(),!(e=!E.vakata.is_array(e)?[e]:e).length)return!1;for(var t=[],i,r,s,r=0,s=e.length;r<s;r++)(i=this.get_node(e[r]))&&(i.id||0===i.id)&&i.id!==E.jstree.root&&t.push(i);if(!t.length)return!1;a=t,n="move_node",(o=this).trigger("cut",{node:e})},copy:function(e){if(e=e||this._data.core.selected.concat(),!(e=!E.vakata.is_array(e)?[e]:e).length)return!1;for(var t=[],i,r,s,r=0,s=e.length;r<s;r++)(i=this.get_node(e[r]))&&i.id!==P&&i.id!==E.jstree.root&&t.push(i);if(!t.length)return!1;a=t,n="copy_node",(o=this).trigger("copy",{node:e})},get_buffer:function(){return{mode:n,node:a,inst:o}},can_paste:function(){return!1!==n&&!1!==a},paste:function(e,t){if(!((e=this.get_node(e))&&n&&n.match(/^(copy_node|move_node)$/)&&a))return!1;this[n](a,e,t,!1,!1,!1,o)&&this.trigger("paste",{parent:e.id,node:a,mode:n}),o=n=a=!1},clear_buffer:function(){o=n=a=!1,this.trigger("clear_buffer")},edit:function(r,e,s){var t,i,a,n,o,d,c,t,l,h=!1;return!!(r=this.get_node(r))&&(this.check("edit",r,this.get_parent(r))?(l=r,e="string"==typeof e?e:r.text,this.set_text(r,""),r=this._open_to(r),l.text=e,t=this._data.core.rtl,i=this.element.width(),this._data.core.focused=l.id,a=r.children(".jstree-anchor").trigger("focus"),n=E("<span></span>"),o=e,d=E("<div></div>",{css:{position:"absolute",top:"-200px",left:t?"0px":"-1000px",visibility:"hidden"}}).appendTo(b.body),c=E("<input />",{value:o,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},on:{blur:function(e){e.stopImmediatePropagation(),e.preventDefault();var t,i=n.children(".jstree-rename-input").val(),e=this.settings.core.force_text,e;""===i&&(i=o),d.remove(),n.replaceWith(a),n.remove(),o=e?o:E("<div></div>").append(E.parseHTML(o)).html(),r=this.get_node(r),this.set_text(r,o),(e=!!this.rename_node(r,e?E("<div></div>").text(i).text():E("<div></div>").append(E.parseHTML(i)).html()))||this.set_text(r,o),this._data.core.focused=l.id,setTimeout(function(){var e=this.get_node(l.id,!0);e.length&&(this._data.core.focused=l.id,e.children(".jstree-anchor").trigger("focus"))}.bind(this),0),s&&s.call(this,l,e,h,i),c=null}.bind(this),keydown:function(e){var t=e.which;27===t&&(h=!0,this.value=o),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){c.width(Math.min(d.text("pW"+this.value).width(),i))},keypress:function(e){if(13===e.which)return!1}}}),t={fontFamily:a.css("fontFamily")||"",fontSize:a.css("fontSize")||"",fontWeight:a.css("fontWeight")||"",fontStyle:a.css("fontStyle")||"",fontStretch:a.css("fontStretch")||"",fontVariant:a.css("fontVariant")||"",letterSpacing:a.css("letterSpacing")||"",wordSpacing:a.css("wordSpacing")||""},n.attr("class",a.attr("class")).append(a.contents().clone()).append(c),a.replaceWith(n),d.css(t),c.css(t).width(Math.min(d.text("pW"+c[0].value).width(),i))[0].select(),void E(b).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){c&&e.target!==c&&E(c).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,t){if(!e)return!1;var i,i;(t=!0===t?(i=(i=this.settings.core.themes.dir)||E.jstree.path+"/themes")+"/"+e+"/style.css":t)&&-1===E.inArray(t,r)&&(E("head").append('<link rel="stylesheet" href="'+t+'" type="text/css" />'),r.push(t)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),(this._data.core.themes.variant=e)&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(e,t){var i,r,s,a;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.set_icon(e[i],t);return!0}return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&(a=e.icon,e.icon=!0===t||null===t||t===P||""===t||t,s=this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===t?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),this.hide_icon(e)):(!0===t||null===t||t===P||""===t?s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"):-1===t.indexOf("/")&&-1===t.indexOf(".")?(s.removeClass(a).css("background",""),s.addClass(t+" jstree-themeicon-custom").attr("rel",t)):(s.removeClass(a).css("background",""),s.addClass("jstree-themeicon-custom").css("background","url('"+t+"') center center no-repeat").attr("rel",t)),!1===a&&this.show_icon(e)),!0)},get_icon:function(e){return!(!(e=this.get_node(e))||e.id===E.jstree.root)&&e.icon},hide_icon:function(e){var t,i;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.hide_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===E.jstree.root)&&(e.icon=!1,this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(e){var t,i,r;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.show_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===E.jstree.root)&&(r=this.get_node(e,!0),e.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),e.icon||(e.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},E.vakata={},E.vakata.attributes=function(e,i){e=E(e)[0];var r=i?{}:[];return e&&e.attributes&&E.each(e.attributes,function(e,t){-1===E.inArray(t.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==t.value&&""!==E.vakata.trim(t.value)&&(i?r[t.name]=t.value:r.push(t.name))}),r},E.vakata.array_unique=function(e){for(var t=[],i,r,s,a={},i=0,s=e.length;i<s;i++)a[e[i]]===P&&(t.push(e[i]),a[e[i]]=!0);return t},E.vakata.array_remove=function(e,t){return e.splice(t,1),e},E.vakata.array_remove_item=function(e,t){var t=E.inArray(t,e);return-1!==t?E.vakata.array_remove(e,t):e},E.vakata.array_filter=function(e,t,i,r,s){if(e.filter)return e.filter(t,i);for(s in r=[],e)~~s+""==s+""&&0<=s&&t.call(i,e[s],+s,e)&&r.push(e[s]);return r},E.vakata.trim=function(e){return String.prototype.trim?String.prototype.trim.call(e.toString()):e.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},E.vakata.is_function=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},E.vakata.is_array=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Function.prototype.bind||(Function.prototype.bind=function(){var t=this,i=arguments[0],r=Array.prototype.slice.call(arguments,1);if("function"!=typeof t)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var e=r.concat(Array.prototype.slice.call(arguments));return t.apply(i,e)}}),E.jstree.plugins.changed=function(e,a){var n=[];this.trigger=function(e,t){var i,r;if(t=t||{},"changed"===e.replace(".jstree","")){t.changed={selected:[],deselected:[]};for(var s={},i=0,r=n.length;i<r;i++)s[n[i]]=1;for(i=0,r=t.selected.length;i<r;i++)s[t.selected[i]]?s[t.selected[i]]=2:t.changed.selected.push(t.selected[i]);for(i=0,r=n.length;i<r;i++)1===s[n[i]]&&t.changed.deselected.push(n[i]);n=t.selected.slice()}a.trigger.call(this,e,t)},this.refresh=function(e,t){return n=[],a.refresh.apply(this,arguments)}};var l=b.createElement("I"),h,_,g,d,u,f,p,w;l.className="jstree-icon jstree-checkbox",l.setAttribute("role","presentation"),E.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},E.jstree.plugins.checkbox=function(e,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(e,t){for(var i=this._model.data,r=i[t.parent],s=t.nodes,a,n,a=0,n=s.length;a<n;a++)i[s[a]].state.checked=i[s[a]].state.checked||i[s[a]].original&&i[s[a]].original.state&&i[s[a]].original.state.checked,i[s[a]].state.checked&&this._data.checkbox.selected.push(s[a])}.bind(this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",function(e,t){var i=this._model.data,r=i[t.parent],s=t.nodes,a=[],n,o,d,c,l,h,t=this.settings.checkbox.cascade,_=this.settings.checkbox.tie_selection;if(-1!==t.indexOf("down"))if(r.state[_?"selected":"checked"]){for(o=0,d=s.length;o<d;o++)i[s[o]].state[_?"selected":"checked"]=!0;this._data[_?"core":"checkbox"].selected=this._data[_?"core":"checkbox"].selected.concat(s)}else for(o=0,d=s.length;o<d;o++)if(i[s[o]].state[_?"selected":"checked"]){for(c=0,l=i[s[o]].children_d.length;c<l;c++)i[i[s[o]].children_d[c]].state[_?"selected":"checked"]=!0;this._data[_?"core":"checkbox"].selected=this._data[_?"core":"checkbox"].selected.concat(i[s[o]].children_d)}if(-1!==t.indexOf("up")){for(o=0,d=r.children_d.length;o<d;o++)i[r.children_d[o]].children.length||a.push(i[r.children_d[o]].parent);for(c=0,l=(a=E.vakata.array_unique(a)).length;c<l;c++){r=i[a[c]];while(r&&r.id!==E.jstree.root){for(o=n=0,d=r.children.length;o<d;o++)n+=i[r.children[o]].state[_?"selected":"checked"];if(n!==d)break;r.state[_?"selected":"checked"]=!0,this._data[_?"core":"checkbox"].selected.push(r.id),(h=this.get_node(r,!0))&&h.length&&h.children(".jstree-anchor").attr("aria-selected",!0).addClass(_?"jstree-clicked":"jstree-checked"),r=this.get_node(r.parent)}}}this._data[_?"core":"checkbox"].selected=E.vakata.array_unique(this._data[_?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(e,t){var i=this,r=t.node,s=this._model.data,a=this.get_node(r.parent),n,o,d,c,t=this.settings.checkbox.cascade,l=this.settings.checkbox.tie_selection,h={},_=this._data[l?"core":"checkbox"].selected;for(n=0,o=_.length;n<o;n++)h[_[n]]=!0;if(-1!==t.indexOf("down"))for(var g=this._cascade_new_checked_state(r.id,!0),u=r.children_d.concat(r.id),n=0,o=u.length;n<o;n++)-1<g.indexOf(u[n])?h[u[n]]=!0:delete h[u[n]];if(-1!==t.indexOf("up"))while(a&&a.id!==E.jstree.root){for(n=d=0,o=a.children.length;n<o;n++)d+=s[a.children[n]].state[l?"selected":"checked"];if(d!==o)break;a.state[l?"selected":"checked"]=!0,h[a.id]=!0,(c=this.get_node(a,!0))&&c.length&&c.children(".jstree-anchor").attr("aria-selected",!0).addClass(l?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}for(n in _=[],h)h.hasOwnProperty(n)&&_.push(n);this._data[l?"core":"checkbox"].selected=_}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(e,t){for(var i=this.get_node(E.jstree.root),r=this._model.data,s,a,n,s=0,a=i.children_d.length;s<a;s++)(n=r[i.children_d[s]])&&n.original&&n.original.state&&n.original.state.undetermined&&(n.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(e,t){var i=this,r=t.node,s=this.get_node(r,!0),a,n,o,d=this.settings.checkbox.cascade,c=this.settings.checkbox.tie_selection,t=this._data[c?"core":"checkbox"].selected,l={},h=[],_=r.children_d.concat(r.id),g,t;if(-1!==d.indexOf("down")&&(g=this._cascade_new_checked_state(r.id,!1),t=E.vakata.array_filter(t,function(e){return-1===_.indexOf(e)||-1<g.indexOf(e)})),-1!==d.indexOf("up")&&-1===t.indexOf(r.id)){for(a=0,n=r.parents.length;a<n;a++)(o=this._model.data[r.parents[a]]).state[c?"selected":"checked"]=!1,o&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1),(o=this.get_node(r.parents[a],!0))&&o.length&&o.children(".jstree-anchor").attr("aria-selected",!1).removeClass(c?"jstree-clicked":"jstree-checked");t=E.vakata.array_filter(t,function(e){return-1===r.parents.indexOf(e)})}this._data[c?"core":"checkbox"].selected=t}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(e,t){var i=this.get_node(t.parent),r=this._model.data,s,a,n,o,d=this.settings.checkbox.tie_selection;while(i&&i.id!==E.jstree.root&&!i.state[d?"selected":"checked"]){for(s=n=0,a=i.children.length;s<a;s++)n+=r[i.children[s]].state[d?"selected":"checked"];if(!(0<a&&n===a))break;i.state[d?"selected":"checked"]=!0,this._data[d?"core":"checkbox"].selected.push(i.id),(o=this.get_node(i,!0))&&o.length&&o.children(".jstree-anchor").attr("aria-selected",!0).addClass(d?"jstree-clicked":"jstree-checked"),i=this.get_node(i.parent)}}.bind(this)).on("move_node.jstree",function(e,t){var i=t.is_multi,r=t.old_parent,t=this.get_node(t.parent),s=this._model.data,a,n,o,d,c,l=this.settings.checkbox.tie_selection;if(!i){a=this.get_node(r);while(a&&a.id!==E.jstree.root&&!a.state[l?"selected":"checked"]){for(o=n=0,d=a.children.length;o<d;o++)n+=s[a.children[o]].state[l?"selected":"checked"];if(!(0<d&&n===d))break;a.state[l?"selected":"checked"]=!0,this._data[l?"core":"checkbox"].selected.push(a.id),(c=this.get_node(a,!0))&&c.length&&c.children(".jstree-anchor").attr("aria-selected",!0).addClass(l?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}}a=t;while(a&&a.id!==E.jstree.root){for(o=n=0,d=a.children.length;o<d;o++)n+=s[a.children[o]].state[l?"selected":"checked"];if(n===d)a.state[l?"selected":"checked"]||(a.state[l?"selected":"checked"]=!0,this._data[l?"core":"checkbox"].selected.push(a.id),(c=this.get_node(a,!0))&&c.length&&c.children(".jstree-anchor").attr("aria-selected",!0).addClass(l?"jstree-clicked":"jstree-checked"));else{if(!a.state[l?"selected":"checked"])break;a.state[l?"selected":"checked"]=!1,this._data[l?"core":"checkbox"].selected=E.vakata.array_remove_item(this._data[l?"core":"checkbox"].selected,a.id),(c=this.get_node(a,!0))&&c.length&&c.children(".jstree-anchor").attr("aria-selected",!1).removeClass(l?"jstree-clicked":"jstree-checked")}a=this.get_node(a.parent)}}.bind(this))},this.get_undetermined=function(e){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];for(var i,r,s,a,n={},o=this._model.data,t=this.settings.checkbox.tie_selection,d=this._data[t?"core":"checkbox"].selected,c=[],l=this,h=[],i=0,r=d.length;i<r;i++)if(o[d[i]]&&o[d[i]].parents)for(s=0,a=o[d[i]].parents.length;s<a;s++){if(n[o[d[i]].parents[s]]!==P)break;o[d[i]].parents[s]!==E.jstree.root&&(n[o[d[i]].parents[s]]=!0,c.push(o[d[i]].parents[s]))}for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var e=l.get_node(this),t;if(e)if(e.state.loaded){for(i=0,r=e.children_d.length;i<r;i++)if(!(t=o[e.children_d[i]]).state.loaded&&t.original&&t.original.state&&t.original.state.undetermined&&!0===t.original.state.undetermined)for(n[t.id]===P&&t.id!==E.jstree.root&&(n[t.id]=!0,c.push(t.id)),s=0,a=t.parents.length;s<a;s++)n[t.parents[s]]===P&&t.parents[s]!==E.jstree.root&&(n[t.parents[s]]=!0,c.push(t.parents[s]))}else if(e.original&&e.original.state&&e.original.state.undetermined&&!0===e.original.state.undetermined)for(n[e.id]===P&&e.id!==E.jstree.root&&(n[e.id]=!0,c.push(e.id)),s=0,a=e.parents.length;s<a;s++)n[e.parents[s]]===P&&e.parents[s]!==E.jstree.root&&(n[e.parents[s]]=!0,c.push(e.parents[s]))}),i=0,r=c.length;i<r;i++)o[c[i]].state[t?"selected":"checked"]||h.push(e?o[c[i]]:c[i]);return h},this._undetermined=function(){if(null!==this.element){var e=this.get_undetermined(!1),t,i,r;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),t=0,i=e.length;t<i;t++)(r=this.get_node(e[t],!0))&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(e,t,i,r){if(e=d.redraw_node.apply(this,arguments)){for(var s,a,n=null,o=null,s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){n=e.childNodes[s];break}n&&(!this.settings.checkbox.tie_selection&&this._model.data[e.id].state.checked&&(n.className+=" jstree-checked"),o=l.cloneNode(!1),this._model.data[e.id].state.checkbox_disabled&&(o.className+=" jstree-checkbox-disabled"),n.insertBefore(o,n.childNodes[0]))}return i||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),e},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(e){e=this.get_node(e);var t=this.settings.checkbox.cascade,i,r,s=this.settings.checkbox.tie_selection,a=this._data[s?"core":"checkbox"].selected,n=this._model.data;if(!e||!0===e.state[s?"selected":"checked"]||-1===t.indexOf("undetermined")||-1===t.indexOf("down")&&-1===t.indexOf("up"))return!1;if(!e.state.loaded&&!0===e.original.state.undetermined)return!0;for(i=0,r=e.children_d.length;i<r;i++)if(-1!==E.inArray(e.children_d[i],a)||!n[e.children_d[i]].state.loaded&&n[e.children_d[i]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(e){var t,i,r;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.disable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled||(e.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:e}))},this.enable_checkbox=function(e){var t,i,r;if(E.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.enable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled&&(e.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:e}))},this.activate_node=function(e,t){return!E(t.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||E(t.target).hasClass("jstree-checkbox"))&&(t.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!E(t.target).hasClass("jstree-checkbox")?d.activate_node.call(this,e,t):!this.is_disabled(e)&&(this.is_checked(e)?this.uncheck_node(e,t):this.check_node(e,t),void this.trigger("activate_node",{node:this.get_node(e)})))},this.delete_node=function(e){if(this.settings.checkbox.tie_selection||E.vakata.is_array(e))return d.delete_node.call(this,e);var t,i,r,s=!1;if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;for((t=e.children_d.concat([])).push(e.id),i=0,r=t.length;i<r;i++)if(this._model.data[t[i]].state.checked){s=!0;break}return s&&(this._data.checkbox.selected=E.vakata.array_filter(this._data.checkbox.selected,function(e){return-1===E.inArray(e,t)})),d.delete_node.call(this,e)},this._cascade_new_checked_state=function(e,t){var i=this,r=this.settings.checkbox.tie_selection,s=this._model.data[e],a=[],n=[],o,d,c;if(!this.settings.checkbox.cascade_to_disabled&&s.state.disabled||!this.settings.checkbox.cascade_to_hidden&&s.state.hidden)c=this.get_checked_descendants(e),s.state[r?"selected":"checked"]&&c.push(s.id),a=a.concat(c);else{if(s.children)for(o=0,d=s.children.length;o<d;o++){var l=s.children[o],c=i._cascade_new_checked_state(l,t),a=a.concat(c);-1<c.indexOf(l)&&n.push(l)}var h=i.get_node(s,!0),e=0<n.length&&n.length<s.children.length;s.original&&s.original.state&&s.original.state.undetermined&&(s.original.state.undetermined=e),!e&&t&&n.length===s.children.length?(s.state[r?"selected":"checked"]=t,a.push(s.id),h.children(".jstree-anchor").attr("aria-selected",!0).addClass(r?"jstree-clicked":"jstree-checked")):(s.state[r?"selected":"checked"]=!1,h.children(".jstree-anchor").attr("aria-selected",!1).removeClass(r?"jstree-clicked":"jstree-checked"))}return a},this.get_checked_descendants=function(e){var t=this,i=t.settings.checkbox.tie_selection,e=t._model.data[e];return E.vakata.array_filter(e.children_d,function(e){return t._model.data[e].state[i?"selected":"checked"]})},this.check_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.select_node(e,!1,!0,t);var i,r,s,a;if(E.vakata.is_array(e)){for(r=0,s=(e=e.slice()).length;r<s;r++)this.check_node(e[r],t);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;i=this.get_node(e,!0),e.state.checked||(e.state.checked=!0,this._data.checkbox.selected.push(e.id),i&&i.length&&i.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.uncheck_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.deselect_node(e,!1,t);var i,r,s;if(E.vakata.is_array(e)){for(i=0,r=(e=e.slice()).length;i<r;i++)this.uncheck_node(e[i],t);return!0}if(!(e=this.get_node(e))||e.id===E.jstree.root)return!1;s=this.get_node(e,!0),e.state.checked&&(e.state.checked=!1,this._data.checkbox.selected=E.vakata.array_remove_item(this._data.checkbox.selected,e.id),s.length&&s.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var e=this._data.checkbox.selected.concat([]),t,i;for(this._data.checkbox.selected=this._model.data[E.jstree.root].children_d.concat(),t=0,i=this._data.checkbox.selected.length;t<i;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();for(var e=this._data.checkbox.selected.concat([]),t,i,t=0,i=this._data.checkbox.selected.length;t<i;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:e})},this.is_checked=function(e){return this.settings.checkbox.tie_selection?this.is_selected(e):!(!(e=this.get_node(e))||e.id===E.jstree.root)&&e.state.checked},this.get_checked=function(e){return this.settings.checkbox.tie_selection?this.get_selected(e):e?E.map(this._data.checkbox.selected,function(e){return this.get_node(e)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_top_selected(e);for(var t=this.get_checked(!0),i={},r,s,a,n,r=0,s=t.length;r<s;r++)i[t[r].id]=t[r];for(r=0,s=t.length;r<s;r++)for(a=0,n=t[r].children_d.length;a<n;a++)i[t[r].children_d[a]]&&delete i[t[r].children_d[a]];for(r in t=[],i)i.hasOwnProperty(r)&&t.push(r);return e?E.map(t,function(e){return this.get_node(e)}.bind(this)):t},this.get_bottom_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(e);for(var t=this.get_checked(!0),i=[],r,s,r=0,s=t.length;r<s;r++)t[r].children.length||i.push(t[r].id);return e?E.map(i,function(e){return this.get_node(e)}.bind(this)):i},this.load_node=function(e,t){var i,r,s,a,n,o;if(!E.vakata.is_array(e)&&!this.settings.checkbox.tie_selection&&(o=this.get_node(e))&&o.state.loaded)for(i=0,r=o.children_d.length;i<r;i++)this._model.data[o.children_d[i]].state.checked&&(this._data.checkbox.selected=E.vakata.array_remove_item(this._data.checkbox.selected,o.children_d[i]));return d.load_node.apply(this,arguments)},this.get_state=function(){var e=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(e.checkbox=this._data.checkbox.selected.slice()),e},this.set_state=function(e,t){var i=d.set_state.apply(this,arguments),r;return i&&e.checkbox?(this.settings.checkbox.tie_selection||(this.uncheck_all(),r=this,E.each(e.checkbox,function(e,t){r.check_node(t)})),delete e.checkbox,this.set_state(e,t),!1):i},this.refresh=function(e,t){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},E.jstree.defaults.conditionalselect=function(){return!0},E.jstree.plugins.conditionalselect=function(e,i){this.activate_node=function(e,t){if(this.settings.conditionalselect.call(this,this.get_node(e),t))return i.activate_node.call(this,e,t)}},E.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(e,t){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(e){var i=E.jstree.reference(e.reference),e=i.get_node(e.reference);i.create_node(e,{},"last",function(t){try{i.edit(t)}catch(e){setTimeout(function(){i.edit(t)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(e){var t=E.jstree.reference(e.reference),e=t.get_node(e.reference);t.edit(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(e){var t=E.jstree.reference(e.reference),e=t.get_node(e.reference);t.is_selected(e)?t.delete_node(t.get_selected()):t.delete_node(e)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){var t=E.jstree.reference(e.reference),e=t.get_node(e.reference);t.is_selected(e)?t.cut(t.get_top_selected()):t.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){var t=E.jstree.reference(e.reference),e=t.get_node(e.reference);t.is_selected(e)?t.copy(t.get_top_selected()):t.copy(e)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!E.jstree.reference(e.reference).can_paste()},separator_after:!1,label:"Paste",action:function(e){var t=E.jstree.reference(e.reference),e=t.get_node(e.reference);t.paste(e)}}}}}}},E.jstree.plugins.contextmenu=function(e,a){this.bind=function(){a.bind.call(this);var i=0,r=null,t,s;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(e,t){"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),i=e.ctrlKey?+new Date:0,(t||r)&&(i=+new Date+1e4),r&&clearTimeout(r),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY,e))}.bind(this)).on("click.jstree",".jstree-anchor",function(e){this._data.contextmenu.visible&&(!i||250<+new Date-i)&&E.vakata.context.hide(),i=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(e){e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(t=e.originalEvent.changedTouches[0].clientX,s=e.originalEvent.changedTouches[0].clientY,r=setTimeout(function(){E(e.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(e){r&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(10<Math.abs(t-e.originalEvent.changedTouches[0].clientX)||10<Math.abs(s-e.originalEvent.changedTouches[0].clientY))&&(clearTimeout(r),E.vakata.context.hide())}).on("touchend.vakata.jstree",function(e){r&&clearTimeout(r)}),E(b).on("context_hide.vakata.jstree",function(e,t){this._data.contextmenu.visible=!1,E(t.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&E.vakata.context.hide(),E(b).off("context_hide.vakata.jstree"),a.teardown.call(this)},this.show_contextmenu=function(t,i,r,e){if(!(t=this.get_node(t))||t.id===E.jstree.root)return!1;var s=this.settings.contextmenu,a,n=this.get_node(t,!0).children(".jstree-anchor"),o=!1,d=!1;!s.show_at_node&&i!==P&&r!==P||(o=n.offset(),i=o.left,r=o.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(t)&&this.activate_node(t,e),d=s.items,E.vakata.is_function(d)&&(d=d.call(this,t,function(e){this._show_contextmenu(t,i,r,e)}.bind(this))),E.isPlainObject(d)&&this._show_contextmenu(t,i,r,d)},this._show_contextmenu=function(e,t,i,r){var s,a=this.get_node(e,!0).children(".jstree-anchor");E(b).one("context_show.vakata.jstree",function(e,t){var i="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";E(t.element).addClass(i),a.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,E.vakata.context.show(a,{x:t,y:i},r),this.trigger("show_contextmenu",{node:e,x:t,y:i})}},g={element:_=!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1},(h=E).vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){h(b).triggerHandler("context_"+e+".vakata",{reference:g.reference,element:g.element,position:{x:g.position_x,y:g.position_y}})},_execute:function(e){return!(!(e=g.items[e])||e._disabled&&(!h.vakata.is_function(e._disabled)||e._disabled({item:e,reference:g.reference,element:g.element}))||!e.action)&&e.action.call(null,{item:e,reference:g.reference,element:g.element,position:{x:g.position_x,y:g.position_y}})},_parse:function(e,t){if(!e)return!1;t||(g.html="",g.items=[]);var i="",r=!1,s;return t&&(i+="<ul>"),h.each(e,function(e,t){return!t||(g.items.push(t),!r&&t.separator_before&&(i+="<li class='vakata-context-separator'><a href='#' "+(h.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>"),r=!1,i+="<li class='"+(t._class||"")+(!0===t._disabled||h.vakata.is_function(t._disabled)&&t._disabled({item:t,reference:g.reference,element:g.element})?" vakata-contextmenu-disabled ":"")+"' "+(t.shortcut?" data-shortcut='"+t.shortcut+"' ":"")+">",i+="<a href='#' rel='"+(g.items.length-1)+"' "+(t.title?"title='"+t.title+"'":"")+">",h.vakata.context.settings.icons&&(i+="<i ",t.icon&&(-1!==t.icon.indexOf("/")||-1!==t.icon.indexOf(".")?i+=" style='background:url(\""+t.icon+"\") center center no-repeat' ":i+=" class='"+t.icon+"' "),i+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),i+=(h.vakata.is_function(t.label)?t.label({item:e,reference:g.reference,element:g.element}):t.label)+(t.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+t.shortcut+'">'+(t.shortcut_label||"")+"</span>":"")+"</a>",t.submenu&&(s=h.vakata.context._parse(t.submenu,!0))&&(i+=s),i+="</li>",void(t.separator_after&&(i+="<li class='vakata-context-separator'><a href='#' "+(h.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>",r=!0)))}),i=i.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),t&&(i+="</ul>"),t||(g.html=i,h.vakata.context._trigger("parse")),10<i.length&&i},_show_submenu:function(e){var t,i,r,s,a,n,o,d;(e=h(e)).length&&e.children("ul").length&&(t=e.children("ul"),r=(i=e.offset().left)+e.outerWidth(),s=e.offset().top,a=t.width(),n=t.height(),o=h(window).width()+h(window).scrollLeft(),d=h(window).height()+h(window).scrollTop(),_?e[r-(a+10+e.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):e[o<r+a&&o-r<i?"addClass":"removeClass"]("vakata-context-right"),d<s+n+10&&t.css("bottom","-1px"),e.hasClass("vakata-context-right")?i<a&&t.css("margin-right",i-a):o-r<a&&t.css("margin-left",o-r-a),t.show())},show:function(e,t,i){var r,s,a,n,o,d,c,i,l=!0;switch(g.element&&g.element.length&&g.element.width(""),!0){case!t&&!e:return!1;case!!t&&!!e:g.reference=e,g.position_x=t.x,g.position_y=t.y;break;case!t&&!!e:r=(g.reference=e).offset(),g.position_x=r.left+e.outerHeight(),g.position_y=r.top;break;case!!t&&!e:g.position_x=t.x,g.position_y=t.y}e&&!i&&h(e).data("vakata_contextmenu")&&(i=h(e).data("vakata_contextmenu")),h.vakata.context._parse(i)&&g.element.html(g.html),g.items.length&&(g.element.appendTo(b.body),s=g.element,a=g.position_x,n=g.position_y,o=s.width(),d=s.height(),c=h(window).width()+h(window).scrollLeft(),i=h(window).height()+h(window).scrollTop(),_&&(a-=s.outerWidth()-h(e).outerWidth())<h(window).scrollLeft()+20&&(a=h(window).scrollLeft()+20),g.element.css({left:a=c<a+o+20?c-(o+20):a,top:n=i<n+d+20?i-(d+20):n}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),g.is_visible=!0,h.vakata.context._trigger("show"))},hide:function(){g.is_visible&&(g.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),g.is_visible=!1,h.vakata.context._trigger("hide"))}},h(function(){_="rtl"===h(b.body).css("direction");var i=!1;g.element=h("<ul class='vakata-context'></ul>"),g.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),h.contains(this,e.relatedTarget)||(i&&clearTimeout(i),g.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),h(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),h.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){h.contains(this,e.relatedTarget)||h(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){var t;h(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),h.vakata.context.settings.hide_onmouseleave&&(i=setTimeout((t=this,function(){h.vakata.context.hide()}),h.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),h(this).trigger("blur").parent().hasClass("vakata-context-disabled")||!1===h.vakata.context._execute(h(this).attr("rel"))||h.vakata.context.hide()}).on("keydown","a",function(e){var t=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),h(e.currentTarget).trigger(e);break;case 37:g.is_visible&&(g.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 38:g.is_visible&&((t=!(t=g.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length?g.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last():t).addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 39:g.is_visible&&(g.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 40:g.is_visible&&((t=!(t=g.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length?g.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first():t).addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 27:h.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(e){e.preventDefault();var e=g.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();e.parent().not(".vakata-context-disabled")&&e.trigger("click")}),h(b).on("mousedown.vakata.jstree",function(e){g.is_visible&&g.element[0]!==e.target&&!h.contains(g.element[0],e.target)&&h.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,t){g.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),_&&g.element.addClass("vakata-context-rtl").css("direction","rtl"),g.element.find("ul").hide().end()})}),E.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1,blank_space_drop:!1},E.jstree.plugins.dnd=function(e,o){this.init=function(e,t){o.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in b.createElement("span")},this.bind=function(){o.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(e){if(this.settings.dnd.large_drag_target&&E(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var t=this.get_node(e.target),i=this.is_selected(t)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=1<i?i+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=E.vakata.html.escape(r)),t&&(t.id||0===t.id)&&t.id!==E.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||E.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,1<i?this.get_top_selected(!0):[t],e))){if(d={jstree:!0,origin:this,obj:this.get_node(t,!0),nodes:1<i?this.get_top_selected():[t.id]},u=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),E.vakata.dnd.start(e,d,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy">+</ins></div>');E.vakata.dnd._trigger("start",e,{helper:E(),element:u,data:d})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),E.vakata.dnd._trigger("move",e,{helper:E(),element:u,data:d}),!1}).on("drop.jstree",function(e){return e.preventDefault(),E.vakata.dnd._trigger("stop",e,{helper:E(),element:u,data:d}),!1}.bind(this))},this.redraw_node=function(e,t,i,r){if((e=o.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{for(var s,a,n=null,s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){n=e.childNodes[s];break}n&&n.setAttribute("draggable",!0)}return e}},E(function(){var N=!1,T=!1,O=!1,A=!1,S=E('<div id="jstree-marker">&#160;</div>').hide();E(b).on("dragover.vakata.jstree",function(e){u&&E.vakata.dnd._trigger("move",e,{helper:E(),element:u,data:d})}).on("drop.vakata.jstree",function(e){u&&(E.vakata.dnd._trigger("stop",e,{helper:E(),element:u,data:d}),d=u=null)}).on("dnd_start.vakata.jstree",function(e,t){O=N=!1,t&&t.data&&t.data.jstree&&S.appendTo(b.body)}).on("dnd_move.vakata.jstree",function(e,s){var a=s.event.target!==O.target;if(A&&(s.event&&"dragover"===s.event.type&&!a||clearTimeout(A)),s&&s.data&&s.data.jstree&&(!s.event.target.id||"jstree-marker"!==s.event.target.id)){O=s.event;var n=E.jstree.reference(s.event.target),o=!1,d=!1,t=!1,i,c,l,h,_,g,u,f,p,m,v,j,k,b,y,x,w,C;if(n&&n._data&&n._data.dnd)if(S.attr("class","jstree-"+n.get_theme()+(n.settings.core.themes.responsive?" jstree-dnd-responsive":"")),x=s.data.origin&&(s.data.origin.settings.dnd.always_copy||s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)),s.helper.children().attr("class","jstree-"+n.get_theme()+" jstree-"+n.get_theme()+"-"+n.get_theme_variant()+" "+(n.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[x?"show":"hide"](),s.event.target!==n.element[0]&&s.event.target!==n.get_container_ul()[0]||0!==n.get_container_ul().children().length&&!n.settings.dnd.blank_space_drop){if((o=n.settings.dnd.large_drop_target?E(s.event.target).closest(".jstree-node").children(".jstree-anchor"):E(s.event.target).closest(".jstree-anchor"))&&o.length&&o.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(d=o.offset(),t=(s.event.pageY!==P?s.event:s.event.originalEvent).pageY-d.top,h=o.outerHeight(),u=t<h/3?["b","i","a"]:h-h/3<t?["a","i","b"]:h/2<t?["i","a","b"]:["i","b","a"],E.each(u,function(e,t){switch(t){case"b":c=d.left-6,l=d.top,_=n.get_parent(o),g=o.parent().index(),C="jstree-below";break;case"i":b=n.settings.dnd.inside_pos,y=n.get_node(o.parent()),c=d.left-2,l=d.top+h/2+1,_=y.id,g="first"===b?0:"last"===b?y.children.length:Math.min(b,y.children.length),C="jstree-inside";break;case"a":c=d.left-6,l=d.top+h,_=n.get_parent(o),g=o.parent().index()+1,C="jstree-above"}for(f=!0,p=0,m=s.data.nodes.length;p<m;p++)if(v=s.data.origin&&(s.data.origin.settings.dnd.always_copy||s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey))?"copy_node":"move_node",j=g,"move_node"==v&&"a"===t&&s.data.origin&&s.data.origin===n&&_===n.get_parent(s.data.nodes[p])&&(k=n.get_node(_),j>E.inArray(s.data.nodes[p],k.children)&&--j),!(f=f&&(n&&n.settings&&n.settings.dnd&&!1===n.settings.dnd.check_while_dragging||n.check(v,s.data.origin&&s.data.origin!==n?s.data.origin.get_node(s.data.nodes[p]):s.data.nodes[p],_,j,{dnd:!0,ref:n.get_node(o.parent()),pos:t,origin:s.data.origin,is_multi:s.data.origin&&s.data.origin!==n,is_foreign:!s.data.origin})))){n&&n.last_error&&(T=n.last_error());break}var i,r;if("i"===t&&o.parent().is(".jstree-closed")&&n.settings.dnd.open_timeout&&(s.event&&"dragover"===s.event.type&&!a||(A&&clearTimeout(A),A=setTimeout((r=o,function(){i.open_node(r)}),(i=n).settings.dnd.open_timeout))),f)return(w=n.get_node(_,!0)).hasClass(".jstree-dnd-parent")||(E(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),w.addClass("jstree-dnd-parent")),N={ins:n,par:_,pos:"i"!==t||"last"!==b||0!==g||n.is_loaded(y)?g:"last"},S.css({left:c+"px",top:l+"px"}).show(),S.removeClass("jstree-above jstree-inside jstree-below").addClass(C),s.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),s.event.originalEvent&&s.event.originalEvent.dataTransfer&&(s.event.originalEvent.dataTransfer.dropEffect=x?"copy":"move"),T={},!(u=!0)}),!0===u))return}else{for(f=!0,p=0,m=s.data.nodes.length;p<m;p++)if(!(f=f&&n.check(s.data.origin&&(s.data.origin.settings.dnd.always_copy||s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey))?"copy_node":"move_node",s.data.origin&&s.data.origin!==n?s.data.origin.get_node(s.data.nodes[p]):s.data.nodes[p],E.jstree.root,"last",{dnd:!0,ref:n.get_node(E.jstree.root),pos:"i",origin:s.data.origin,is_multi:s.data.origin&&s.data.origin!==n,is_foreign:!s.data.origin})))break;if(f)return N={ins:n,par:E.jstree.root,pos:"last"},S.hide(),s.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(s.event.originalEvent&&s.event.originalEvent.dataTransfer&&(s.event.originalEvent.dataTransfer.dropEffect=x?"copy":"move"))}E(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),N=!1,s.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),s.event.originalEvent&&s.event.originalEvent.dataTransfer,S.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(S.hide(),O=N=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(e,t){if(E(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),A&&clearTimeout(A),t&&t.data&&t.data.jstree){S.hide().detach();var i,r,s=[];if(N){for(i=0,r=t.data.nodes.length;i<r;i++)s[i]=t.data.origin?t.data.origin.get_node(t.data.nodes[i]):t.data.nodes[i];N.ins[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(t.event.metaKey||t.event.ctrlKey))?"copy_node":"move_node"](s,N.par,N.pos,!1,!1,!1,t.data.origin)}else(i=E(t.event.target).closest(".jstree")).length&&T&&T.error&&"check"===T.error&&(i=i.jstree(!0))&&i.settings.core.error.call(this,T);N=O=!1}}).on("keyup.jstree keydown.jstree",function(e,t){(t=E.vakata.dnd._get())&&t.data&&t.data.jstree&&("keyup"===e.type&&27===e.which?(A&&clearTimeout(A),A=O=T=N=!1,S.hide().detach(),E.vakata.dnd._clean()):(t.helper.find(".jstree-copy").first()[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey))?"show":"hide"](),O&&(O.metaKey=e.metaKey,O.ctrlKey=e.ctrlKey,E.vakata.dnd._trigger("move",O))))})}),p={element:!((f=E).vakata.html={div:f("<div></div>"),escape:function(e){return f.vakata.html.div.text(e).html()},strip:function(e){return f.vakata.html.div.empty().append(f.parseHTML(e)).text()}}),target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},f.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(e,t,i){(i=i===P?f.vakata.dnd._get():i).event=t,f(b).triggerHandler("dnd_"+e+".vakata",i)},_get:function(){return{data:p.data,element:p.element,helper:p.helper}},_clean:function(){p.helper&&p.helper.remove(),p.scroll_i&&(clearInterval(p.scroll_i),p.scroll_i=!1),p={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},u=null,f(b).off("mousemove.vakata.jstree touchmove.vakata.jstree",f.vakata.dnd.drag),f(b).off("mouseup.vakata.jstree touchend.vakata.jstree",f.vakata.dnd.stop)},_scroll:function(e){if(!p.scroll_e||!p.scroll_l&&!p.scroll_t)return p.scroll_i&&(clearInterval(p.scroll_i),p.scroll_i=!1),!1;if(!p.scroll_i)return p.scroll_i=setInterval(f.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var t=p.scroll_e.scrollTop(),e=p.scroll_e.scrollLeft();p.scroll_e.scrollTop(t+p.scroll_t*f.vakata.dnd.settings.scroll_speed),p.scroll_e.scrollLeft(e+p.scroll_l*f.vakata.dnd.settings.scroll_speed),t===p.scroll_e.scrollTop()&&e===p.scroll_e.scrollLeft()||f.vakata.dnd._trigger("scroll",p.scroll_e)},start:function(e,t,i){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=b.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),p.is_drag&&f.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(e){}return p.init_x=e.pageX,p.init_y=e.pageY,p.data=t,p.is_down=!0,p.element=e.currentTarget,p.target=e.target,p.is_touch="touchstart"===e.type,!1!==i&&(p.helper=f("<div id='vakata-dnd'></div>").html(i).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),f(b).on("mousemove.vakata.jstree touchmove.vakata.jstree",f.vakata.dnd.drag),f(b).on("mouseup.vakata.jstree touchend.vakata.jstree",f.vakata.dnd.stop),!1},drag:function(i){if("touchmove"===i.type&&i.originalEvent&&i.originalEvent.changedTouches&&i.originalEvent.changedTouches[0]&&(i.pageX=i.originalEvent.changedTouches[0].pageX,i.pageY=i.originalEvent.changedTouches[0].pageY,i.target=b.elementFromPoint(i.originalEvent.changedTouches[0].pageX-window.pageXOffset,i.originalEvent.changedTouches[0].pageY-window.pageYOffset)),p.is_down){if(!p.is_drag){if(!(Math.abs(i.pageX-p.init_x)>(p.is_touch?f.vakata.dnd.settings.threshold_touch:f.vakata.dnd.settings.threshold)||Math.abs(i.pageY-p.init_y)>(p.is_touch?f.vakata.dnd.settings.threshold_touch:f.vakata.dnd.settings.threshold)))return;p.helper&&(p.helper.appendTo(b.body),p.helper_w=p.helper.outerWidth()),p.is_drag=!0,f(p.target).one("click.vakata",!1),f.vakata.dnd._trigger("start",i)}var e=!1,t=!1,r=!1,s=!1,a=!1,n=!1,o=!1,d=!1,c=!1,l=!1;return p.scroll_t=0,p.scroll_l=0,p.scroll_e=!1,f(f(i.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return this.ownerDocument&&/^auto|scroll$/.test(f(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var e=f(this),t=e.offset();if(this.scrollHeight>this.offsetHeight&&(t.top+e.height()-i.pageY<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_t=1),i.pageY-t.top<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(t.left+e.width()-i.pageX<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_l=1),i.pageX-t.left<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_l=-1)),p.scroll_t||p.scroll_l)return p.scroll_e=f(this),!1}),p.scroll_e||(e=f(b),t=f(window),r=e.height(),s=t.height(),a=e.width(),n=t.width(),o=e.scrollTop(),d=e.scrollLeft(),s<r&&i.pageY-o<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_t=-1),s<r&&s-(i.pageY-o)<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_t=1),n<a&&i.pageX-d<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_l=-1),n<a&&n-(i.pageX-d)<f.vakata.dnd.settings.scroll_proximity&&(p.scroll_l=1),(p.scroll_t||p.scroll_l)&&(p.scroll_e=e)),p.scroll_e&&f.vakata.dnd._scroll(!0),p.helper&&(c=parseInt(i.pageY+f.vakata.dnd.settings.helper_top,10),l=parseInt(i.pageX+f.vakata.dnd.settings.helper_left,10),a&&l+p.helper_w>a&&(l=a-(p.helper_w+2)),p.helper.css({left:l+"px",top:(c=r&&r<c+25?r-50:c)+"px"})),f.vakata.dnd._trigger("move",i),!1}},stop:function(e){var t;return"touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=b.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),p.is_drag?(e.target!==p.target&&f(p.target).off("click.vakata"),f.vakata.dnd._trigger("stop",e)):"touchend"===e.type&&e.target===p.target&&(t=setTimeout(function(){f(e.target).trigger("click")},100),f(e.target).one("click",function(){t&&clearTimeout(t)})),f.vakata.dnd._clean(),!1}},E.jstree.defaults.massload=null,E.jstree.plugins.massload=function(e,l){this.init=function(e,t){this._data.massload={},l.init.call(this,e,t)},this._load_nodes=function(a,n,o,d){var e=this.settings.massload,t=[],i=this._model.data,r,s,c;if(!o){for(r=0,s=a.length;r<s;r++)i[a[r]]&&(i[a[r]].state.loaded||i[a[r]].state.failed)&&!d||(t.push(a[r]),(c=this.get_node(a[r],!0))&&c.length&&c.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},t.length){if(E.vakata.is_function(e))return e.call(this,t,function(e){var t,i;if(e)for(t in e)e.hasOwnProperty(t)&&(this._data.massload[t]=e[t]);for(t=0,i=a.length;t<i;t++)(c=this.get_node(a[t],!0))&&c.length&&c.removeClass("jstree-loading").attr("aria-busy",!1);l._load_nodes.call(this,a,n,o,d)}.bind(this));if("object"==typeof e&&e&&e.url)return e=E.extend(!0,{},e),E.vakata.is_function(e.url)&&(e.url=e.url.call(this,t)),E.vakata.is_function(e.data)&&(e.data=e.data.call(this,t)),E.ajax(e).done(function(e,t,i){var r,s;if(e)for(r in e)e.hasOwnProperty(r)&&(this._data.massload[r]=e[r]);for(r=0,s=a.length;r<s;r++)(c=this.get_node(a[r],!0))&&c.length&&c.removeClass("jstree-loading").attr("aria-busy",!1);l._load_nodes.call(this,a,n,o,d)}.bind(this)).fail(function(e){l._load_nodes.call(this,a,n,o,d)}.bind(this))}}return l._load_nodes.call(this,a,n,o,d)},this._load_node=function(e,t){var i=this._data.massload[e.id],r=null,i;return i?(r=this["string"==typeof i?"_append_html_data":"_append_json_data"](e,"string"==typeof i?E(E.parseHTML(i)).filter(function(){return 3!==this.nodeType}):i,function(e){t.call(this,e)}),(i=this.get_node(e.id,!0))&&i.length&&i.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[e.id],r):l._load_node.call(this,e,t)}},E.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},E.jstree.plugins.search=function(e,o){this.bind=function(){o.bind.call(this),this._data.search.str="",this._data.search.dom=E(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(e,t){if(this._data.search.som&&t.res.length){for(var i=this._model.data,r,s,a=[],n,o,r=0,s=t.res.length;r<s;r++)if(i[t.res[r]]&&!i[t.res[r]].state.hidden&&(a.push(t.res[r]),a=a.concat(i[t.res[r]].parents),this._data.search.smc))for(n=0,o=i[t.res[r]].children_d.length;n<o;n++)i[i[t.res[r]].children_d[n]]&&!i[i[t.res[r]].children_d[n]].state.hidden&&a.push(i[t.res[r]].children_d[n]);a=E.vakata.array_remove_item(E.vakata.array_unique(a),E.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(a,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(e,t){this._data.search.som&&t.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(r,e,t,i,s,a){if(!1===r||""===E.vakata.trim(r.toString()))return this.clear_search();i=(i=this.get_node(i))&&(i.id||0===i.id)?i.id:null,r=r.toString();var n=this.settings.search,o=n.ajax||!1,d=this._model.data,c=null,l=[],h=[],_,g;if(this._data.search.res.length&&!s&&this.clear_search(),t===P&&(t=n.show_only_matches),a===P&&(a=n.show_only_matches_children),!e&&!1!==o)return E.vakata.is_function(o)?o.call(this,r,function(e){e&&e.d&&(e=e.d),this._load_nodes(E.vakata.is_array(e)?E.vakata.array_unique(e):[],function(){this.search(r,!0,t,i,s,a)})}.bind(this),i):((o=E.extend({},o)).data||(o.data={}),o.data.str=r,i&&(o.data.inside=i),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=E.ajax(o).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(o)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(e){e&&e.d&&(e=e.d),this._load_nodes(E.vakata.is_array(e)?E.vakata.array_unique(e):[],function(){this.search(r,!0,t,i,s,a)})}.bind(this)),this._data.search.lastRequest);if(s||(this._data.search.str=r,this._data.search.dom=E(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=t,this._data.search.smc=a),c=new E.vakata.search(r,!0,{caseSensitive:n.case_sensitive,fuzzy:n.fuzzy}),E.each(d[i||E.jstree.root].children_d,function(e,t){var i=d[t];i.text&&!i.state.hidden&&(!n.search_leaves_only||i.state.loaded&&0===i.children.length)&&(n.search_callback&&n.search_callback.call(this,r,i)||!n.search_callback&&c.search(i.text).isMatch)&&(l.push(t),h=h.concat(i.parents))}),l.length){for(_=0,g=(h=E.vakata.array_unique(h)).length;_<g;_++)h[_]!==E.jstree.root&&d[h[_]]&&!0===this.open_node(h[_],null,0)&&this._data.search.opn.push(h[_]);s?(this._data.search.dom=this._data.search.dom.add(E(this.element[0].querySelectorAll("#"+E.map(l,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(E.jstree.idregex,"\\$&"):e.replace(E.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=E.vakata.array_unique(this._data.search.res.concat(l))):(this._data.search.dom=E(this.element[0].querySelectorAll("#"+E.map(l,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(E.jstree.idregex,"\\$&"):e.replace(E.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=l),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:r,res:this._data.search.res,show_only_matches:t})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=E(this.element[0].querySelectorAll("#"+E.map(this._data.search.res,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(E.jstree.idregex,"\\$&"):e.replace(E.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=E()},this.redraw_node=function(e,t,i,r){if((e=o.redraw_node.apply(this,arguments))&&-1!==E.inArray(e.id,this._data.search.res)){for(var s,a,n=null,s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){n=e.childNodes[s];break}n&&(n.className+=" jstree-search")}return e}},(w=E).vakata.search=function(p,e,m){m=m||{},!1!==(m=w.extend({},w.vakata.search.defaults,m)).fuzzy&&(m.fuzzy=!0),p=m.caseSensitive?p:p.toLowerCase();var v=m.location,i=m.distance,j=m.threshold,k=p.length,b,y,x,t;return 32<k&&(m.fuzzy=!1),m.fuzzy&&(b=1<<k-1,y=function(){for(var e={},t=0,t=0;t<k;t++)e[p.charAt(t)]=0;for(t=0;t<k;t++)e[p.charAt(t)]|=1<<k-t-1;return e}(),x=function(e,t){var e=e/k,t=Math.abs(v-t);return i?e+t/i:t?1:e}),t=function(e){if(e=m.caseSensitive?e.toString():e.toString().toLowerCase(),p===e||-1!==e.indexOf(p))return{isMatch:!0,score:0};if(!m.fuzzy)return{isMatch:!1,score:1};var t,i,r=e.length,s=j,a=e.indexOf(p,v),n,o,d=k+r,c,l,h,_,g,u=1,f=[];for(-1!==a&&(s=Math.min(x(0,a),s),-1!==(a=e.lastIndexOf(p,v+k))&&(s=Math.min(x(0,a),s))),a=-1,t=0;t<k;t++){n=0,o=d;while(n<o)x(t,v+o)<=s?n=o:d=o,o=Math.floor((d-n)/2+n);for(d=o,l=Math.max(1,v-o+1),h=Math.min(v+o,r)+k,(_=new Array(h+2))[h+1]=(1<<t)-1,i=h;l<=i;i--)if(g=y[e.charAt(i-1)],_[i]=0===t?(_[i+1]<<1|1)&g:(_[i+1]<<1|1)&g|(c[i+1]|c[i])<<1|1|c[i+1],_[i]&b&&(u=x(t,i-1))<=s){if(s=u,f.push(a=i-1),!(v<a))break;l=Math.max(1,2*v-a)}if(x(t+1,v)>s)break;c=_}return{isMatch:0<=a,score:u}},!0===e?{search:t}:t(e)},w.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1},E.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1};var m=!(E.jstree.plugins.sort=function(e,t){this.bind=function(){t.bind.call(this),this.element.on("model.jstree",function(e,t){this.sort(t.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)}.bind(this))},this.sort=function(e,t){var i,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(this.settings.sort.bind(this)),t))for(i=0,r=e.children_d.length;i<r;i++)this.sort(e.children_d[i],!1)}}),t,v;E.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},E.jstree.plugins.state=function(e,t){this.bind=function(){t.bind.call(this);var i=function(){this.element.on(this.settings.state.events,function(){m&&clearTimeout(m),m=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(e,t){this.element.one("restore_state.jstree",i),this.restore_state()||i()}.bind(this))},this.save_state=function(){var e=this.get_state();this.settings.state.preserve_loaded||delete e.core.loaded;var e={state:e,ttl:this.settings.state.ttl,sec:+new Date};E.vakata.storage.set(this.settings.state.key,JSON.stringify(e))},this.restore_state=function(){var i=E.vakata.storage.get(this.settings.state.key);if(i)try{i=JSON.parse(i)}catch(e){return!1}return!(i&&i.ttl&&i.sec&&+new Date-i.sec>i.ttl)&&(!!(i=(i=i&&i.state?i.state:i)&&E.vakata.is_function(this.settings.state.filter)?this.settings.state.filter.call(this,i):i)&&(this.settings.state.preserve_loaded||delete i.core.loaded,this.element.one("set_state.jstree",function(e,t){t.instance.trigger("restore_state",{state:E.extend(!0,{},i)})}),this.set_state(i),!0))},this.clear_state=function(){return E.vakata.storage.del(this.settings.state.key)}},E.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}},E.jstree.defaults.types={default:{}},E.jstree.defaults.types[E.jstree.root]={},E.jstree.plugins.types=function(e,l){this.init=function(e,t){var i,r;if(t&&t.types&&t.types.default)for(i in t.types)if("default"!==i&&i!==E.jstree.root&&t.types.hasOwnProperty(i))for(r in t.types.default)t.types.default.hasOwnProperty(r)&&t.types[i][r]===P&&(t.types[i][r]=t.types.default[r]);l.init.call(this,e,t),this._model.data[E.jstree.root].type=E.jstree.root},this.refresh=function(e,t){l.refresh.call(this,e,t),this._model.data[E.jstree.root].type=E.jstree.root},this.bind=function(){this.element.on("model.jstree",function(e,t){for(var i=this._model.data,r=t.nodes,s=this.settings.types,a,n,o="default",d,a=0,n=r.length;a<n;a++){if(o="default",i[r[a]].original&&i[r[a]].original.type&&s[i[r[a]].original.type]&&(o=i[r[a]].original.type),i[r[a]].data&&i[r[a]].data.jstree&&i[r[a]].data.jstree.type&&s[i[r[a]].data.jstree.type]&&(o=i[r[a]].data.jstree.type),i[r[a]].type=o,!0===i[r[a]].icon&&s[o].icon!==P&&(i[r[a]].icon=s[o].icon),s[o].li_attr!==P&&"object"==typeof s[o].li_attr)for(d in s[o].li_attr)s[o].li_attr.hasOwnProperty(d)&&"id"!==d&&(i[r[a]].li_attr[d]===P?i[r[a]].li_attr[d]=s[o].li_attr[d]:"class"===d&&(i[r[a]].li_attr.class=s[o].li_attr.class+" "+i[r[a]].li_attr.class));if(s[o].a_attr!==P&&"object"==typeof s[o].a_attr)for(d in s[o].a_attr)s[o].a_attr.hasOwnProperty(d)&&"id"!==d&&(i[r[a]].a_attr[d]===P?i[r[a]].a_attr[d]=s[o].a_attr[d]:"href"===d&&"#"===i[r[a]].a_attr[d]?i[r[a]].a_attr.href=s[o].a_attr.href:"class"===d&&(i[r[a]].a_attr.class=s[o].a_attr.class+" "+i[r[a]].a_attr.class))}i[E.jstree.root].type=E.jstree.root}.bind(this)),l.bind.call(this)},this.get_json=function(e,t,i){var r,s,a=this._model.data,n=t?E.extend(!0,{},t,{no_id:!1}):{},o=l.get_json.call(this,e,n,i);if(!1===o)return!1;if(E.vakata.is_array(o))for(r=0,s=o.length;r<s;r++)o[r].type=(o[r].id||0===o[r].id)&&a[o[r].id]&&a[o[r].id].type?a[o[r].id].type:"default",t&&t.no_id&&(delete o[r].id,o[r].li_attr&&o[r].li_attr.id&&delete o[r].li_attr.id,o[r].a_attr&&o[r].a_attr.id&&delete o[r].a_attr.id);else o.type=(o.id||0===o.id)&&a[o.id]&&a[o.id].type?a[o.id].type:"default",t&&t.no_id&&(o=this._delete_ids(o));return o},this._delete_ids=function(e){if(E.vakata.is_array(e)){for(var t=0,i=e.length;t<i;t++)e[t]=this._delete_ids(e[t]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id,e.children&&E.vakata.is_array(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(e,t,i,r,s){if(!1===l.check.call(this,e,t,i,r,s))return!1;t=t&&(t.id||0===t.id)?t:this.get_node(t),i=i&&(i.id||0===i.id)?i:this.get_node(i);var a,n,o,d,c,a=(a=t&&(t.id||0===t.id)?s&&s.origin?s.origin:E.jstree.reference(t.id):null)&&a._model&&a._model.data?a._model.data:null;switch(e){case"create_node":case"move_node":case"copy_node":if("move_node"!==e||-1===E.inArray(t.id,i.children)){if((n=this.get_rules(i)).max_children!==P&&-1!==n.max_children&&n.max_children===i.children.length)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})});if(n.valid_children!==P&&-1!==n.valid_children&&-1===E.inArray(t.type||"default",n.valid_children))return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})});if(a&&t.children_d&&t.parents){for(d=o=0,c=t.children_d.length;d<c;d++)o=Math.max(o,a[t.children_d[d]].parents.length);o=o-t.parents.length+1}(o<=0||o===P)&&(o=1);do{if(n.max_depth!==P&&-1!==n.max_depth&&n.max_depth<o)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})});i=this.get_node(i.parent),n=this.get_rules(i),o++}while(i)}}return!0},this.get_rules=function(e){if(!(e=this.get_node(e)))return!1;var e=this.get_type(e,!0);return e.max_depth===P&&(e.max_depth=-1),e.max_children===P&&(e.max_children=-1),e.valid_children===P&&(e.valid_children=-1),e},this.get_type=function(e,t){return!!(e=this.get_node(e))&&(t?E.extend({type:e.type},this.settings.types[e.type]):e.type)},this.set_type=function(e,t){var i=this._model.data,r,s,a,n,o,d,c,l;if(E.vakata.is_array(e)){for(s=0,a=(e=e.slice()).length;s<a;s++)this.set_type(e[s],t);return!0}if(r=this.settings.types,e=this.get_node(e),!r[t]||!e)return!1;if((c=this.get_node(e,!0))&&c.length&&(l=c.children(".jstree-anchor")),n=e.type,o=this.get_icon(e),e.type=t,!0!==o&&r[n]&&(r[n].icon===P||o!==r[n].icon)||this.set_icon(e,r[t].icon===P||r[t].icon),r[n]&&r[n].li_attr!==P&&"object"==typeof r[n].li_attr)for(d in r[n].li_attr)r[n].li_attr.hasOwnProperty(d)&&"id"!==d&&("class"===d?(i[e.id].li_attr.class=(i[e.id].li_attr.class||"").replace(r[n].li_attr[d],""),c&&c.removeClass(r[n].li_attr[d])):i[e.id].li_attr[d]===r[n].li_attr[d]&&(i[e.id].li_attr[d]=null,c&&c.removeAttr(d)));if(r[n]&&r[n].a_attr!==P&&"object"==typeof r[n].a_attr)for(d in r[n].a_attr)r[n].a_attr.hasOwnProperty(d)&&"id"!==d&&("class"===d?(i[e.id].a_attr.class=(i[e.id].a_attr.class||"").replace(r[n].a_attr[d],""),l&&l.removeClass(r[n].a_attr[d])):i[e.id].a_attr[d]===r[n].a_attr[d]&&("href"===d?(i[e.id].a_attr[d]="#",l&&l.attr("href","#")):(delete i[e.id].a_attr[d],l&&l.removeAttr(d))));if(r[t].li_attr!==P&&"object"==typeof r[t].li_attr)for(d in r[t].li_attr)r[t].li_attr.hasOwnProperty(d)&&"id"!==d&&(i[e.id].li_attr[d]===P?(i[e.id].li_attr[d]=r[t].li_attr[d],c&&("class"===d?c.addClass(r[t].li_attr[d]):c.attr(d,r[t].li_attr[d]))):"class"===d&&(i[e.id].li_attr.class=r[t].li_attr[d]+" "+i[e.id].li_attr.class,c&&c.addClass(r[t].li_attr[d])));if(r[t].a_attr!==P&&"object"==typeof r[t].a_attr)for(d in r[t].a_attr)r[t].a_attr.hasOwnProperty(d)&&"id"!==d&&(i[e.id].a_attr[d]===P?(i[e.id].a_attr[d]=r[t].a_attr[d],l&&("class"===d?l.addClass(r[t].a_attr[d]):l.attr(d,r[t].a_attr[d]))):"href"===d&&"#"===i[e.id].a_attr[d]?(i[e.id].a_attr.href=r[t].a_attr.href,l&&l.attr("href",r[t].a_attr.href)):"class"===d&&(i[e.id].a_attr.class=r[t].a_attr.class+" "+i[e.id].a_attr.class,l&&l.addClass(r[t].a_attr[d])));return!0}},E.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(e,t){return e+" ("+t+")"}},E.jstree.plugins.unique=function(e,f){this.check=function(e,t,i,r,s){if(!1===f.check.call(this,e,t,i,r,s))return!1;if(t=t&&(t.id||0===t.id)?t:this.get_node(t),!(i=i&&(i.id||0===i.id)?i:this.get_node(i))||!i.children)return!0;for(var a="rename_node"===e?r:t.text,n=[],o=this.settings.unique.case_sensitive,d=this.settings.unique.trim_whitespace,c=this._model.data,l,h,_,l=0,h=i.children.length;l<h;l++)_=c[i.children[l]].text,o||(_=_.toLowerCase()),d&&(_=_.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),n.push(_);switch(o||(a=a.toLowerCase()),d&&(a=a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),e){case"delete_node":return!0;case"rename_node":return _=t.text||"",o||(_=_.toLowerCase()),d&&(_=_.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(l=-1===E.inArray(a,n)||t.text&&_===a)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+a+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})}),l;case"create_node":return(l=-1===E.inArray(a,n))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+a+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})}),l;case"copy_node":return(l=-1===E.inArray(a,n))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+a+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})}),l;case"move_node":return(l=t.parent===i.id&&(!s||!s.is_multi)||-1===E.inArray(a,n))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+a+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id&&0!==t.id)&&t.id,par:!(!i||!i.id&&0!==i.id)&&i.id})}),l}return!0},this.create_node=function(e,t,i,r,s){if(!t||"object"==typeof t&&t.text===P){if(null===e&&(e=E.jstree.root),!(e=this.get_node(e)))return f.create_node.call(this,e,t,i,r,s);if(!(i=i===P?"last":i).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(e))return f.create_node.call(this,e,t,i,r,s);t=t||{};for(var a,n,o,d,c,l=this._model.data,h=this.settings.unique.case_sensitive,_=this.settings.unique.trim_whitespace,g=this.settings.unique.duplicate,u,n=a=this.get_string("New node"),o=[],d=0,c=e.children.length;d<c;d++)u=l[e.children[d]].text,h||(u=u.toLowerCase()),_&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),o.push(u);d=1,u=n,h||(u=u.toLowerCase()),_&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));while(-1!==E.inArray(u,o))u=n=g.call(this,a,++d).toString(),h||(u=u.toLowerCase()),_&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));t.text=n}return f.create_node.call(this,e,t,i,r,s)}};var j=b.createElement("DIV");if(j.setAttribute("unselectable","on"),j.setAttribute("role","presentation"),j.className="jstree-wholerow",j.innerHTML="&#160;",E.jstree.plugins.wholerow=function(e,a){this.bind=function(){a.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");for(var i=!1,r,s,r=0,s=t.selected.length;r<s;r++)(i=this.get_node(t.selected[r],!0))&&i.length&&i.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(e){var t;this._data.contextmenu&&(e.preventDefault(),t=E.Event("contextmenu",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY}),E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t))}.bind(this)).on("click.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=E.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=E.Event("dblclick",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(e){e.stopImmediatePropagation();var t=E.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});E(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(e){this.dehover_node(e.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),a.teardown.call(this)},this.redraw_node=function(e,t,i,r){var s;return(e=a.redraw_node.apply(this,arguments))&&(s=j.cloneNode(!0),-1!==E.inArray(e.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(s.className+=" jstree-wholerow-hovered"),e.insertBefore(s,e.childNodes[0])),e}},window.customElements&&Object&&Object.create){var e=Object.create(HTMLElement.prototype);e.createdCallback=function(){var e={core:{},plugins:[]},t;for(t in E.jstree.plugins)E.jstree.plugins.hasOwnProperty(t)&&this.attributes[t]&&(e.plugins.push(t),this.getAttribute(t)&&JSON.parse(this.getAttribute(t))&&(e[t]=JSON.parse(this.getAttribute(t))));for(t in E.jstree.defaults.core)E.jstree.defaults.core.hasOwnProperty(t)&&this.attributes[t]&&(e.core[t]=JSON.parse(this.getAttribute(t))||this.getAttribute(t));E(this).jstree(e)};try{window.customElements.define("vakata-jstree",function(){},{prototype:e})}catch(e){}}}});
(function(e,n){"use strict";var t=!1,a=!1,i=[];e.widget("wpcp.WPCPPDFViewer",{options:{pdfUrl:null,container:null,listtoken:null,theme:"light",vendorPath:null,canPrint:!1,minZoom:.1,maxZoom:3},pdf:null,numPages:null,currentPage:1,scale:null,containerHeight:0,containerWidth:0,pageHeight:0,pageWidth:0,canvasContainer:null,renderedPages:{},renderTasks:{},isLoading:!0,isRendering:!1,wheelZoomTimeout:null,scrollRafId:null,searchQuery:"",searchResults:[],currentSearchResult:-1,searchTimeout:null,isDestroyed:!1,activePointers:{},pinchActive:!1,pinchStartDistance:0,pinchStartScale:null,pinchLastAppliedScale:null,pinchRafId:null,pendingPinchScale:null,pendingPinchCenter:null,originalTouchAction:null,pinchPreviewScale:null,_create:function(){var e=this;e._buildUI(),e._initResizeHandler(),e._loadPDF()},_buildUI:function(){var n=this;n.element.addClass("wpcp-pdf-viewer-wrapper");var t=e('<div class="wpcp-pdf-canvas-container"></div>');n.canvasContainer=t[0],n.element.append(t);var a=e('<div class="wpcp-pdf-loading"><i class="eva eva-loader-outline eva-spin"></i></div>');n.element.append(a);var i=e('<div class="wpcp-pdf-error" style="display:none;"></div>');i.append('<i class="eva eva-alert-triangle wpcp-pdf-error-icon"></i>'),i.append('<p class="wpcp-pdf-error-title">Failed to load PDF</p>'),i.append('<p class="wpcp-pdf-error-message"></p>'),n.element.append(i);var r=e('<div class="wpcp-pdf-controls" style="display:none;"></div>'),c=e('<div class="wpcp-pdf-controls-inner"></div>');c.append('<button class="wpcp-pdf-btn wpcp-pdf-prev" title="Previous page" disabled><i class="eva eva-arrow-back"></i></button>'),c.append('<div class="wpcp-pdf-page-info"><span class="wpcp-pdf-page-current">1</span> / <span class="wpcp-pdf-page-total">1</span></div>'),c.append('<button class="wpcp-pdf-btn wpcp-pdf-next" title="Next page" disabled><i class="eva eva-arrow-forward"></i></button>'),c.append('<div class="wpcp-pdf-divider"></div>'),c.append('<button class="wpcp-pdf-btn wpcp-pdf-zoom-out" title="Zoom out"><i class="eva eva-minus"></i></button>'),c.append('<span class="wpcp-pdf-zoom-level">100%</span>'),c.append('<button class="wpcp-pdf-btn wpcp-pdf-zoom-in" title="Zoom in"><i class="eva eva-plus"></i></button>'),c.append('<div class="wpcp-pdf-divider"></div>'),c.append('<button class="wpcp-pdf-btn wpcp-pdf-fit active" title="Fit to page"><i class="eva eva-expand"></i></button>'),c.append('<div class="wpcp-pdf-divider"></div>'),c.append('<button class="wpcp-pdf-btn wpcp-pdf-search" title="Search in PDF"><i class="eva eva-search"></i></button>'),n.options.canPrint&&c.append('<button class="wpcp-pdf-btn wpcp-pdf-print" title="Print PDF"><i class="eva eva-printer"></i></button>'),r.append(c),n.element.append(r);var o=e('<div class="wpcp-pdf-search-panel" style="display:none;"></div>'),s=e('<div class="wpcp-pdf-search-inner"></div>');s.append('<input name="pdf-search" type="text" class="wpcp-pdf-search-input" placeholder="..." /><button class="wpcp-pdf-search-prev" title="Previous result" disabled><i class="eva eva-arrow-up"></i></button><button class="wpcp-pdf-search-next" title="Next result" disabled><i class="eva eva-arrow-down"></i></button><span class="wpcp-pdf-search-count"></span><button class="wpcp-pdf-search-close" title="Close search"><i class="eva eva-close"></i></button>'),o.append(s),n.element.append(o),n._initEventHandlers()},_initEventHandlers:function(){var n,t=this;t.element.find(".wpcp-pdf-prev").on("click",function(){t._scrollToPage(t.currentPage-1)}),t.element.find(".wpcp-pdf-next").on("click",function(){t._scrollToPage(t.currentPage+1)}),t.element.find(".wpcp-pdf-zoom-in").on("click",function(){t._zoomIn()}),t.element.find(".wpcp-pdf-zoom-out").on("click",function(){t._zoomOut()}),t.element.find(".wpcp-pdf-fit").on("click",function(){t._fitToPage()}),t.element.find(".wpcp-pdf-search").on("click",function(){t._toggleSearch()}),t.element.find(".wpcp-pdf-print").on("click",function(){t._printPDF()}),t.element.find(".wpcp-pdf-search-input").on("input",function(){clearTimeout(t.searchTimeout),t.searchTimeout=setTimeout(function(){t._performSearch(t.element.find(".wpcp-pdf-search-input").val())},300)}),t.element.find(".wpcp-pdf-search-input").on("keydown",function(e){"Enter"===e.key?(e.preventDefault(),e.shiftKey?t._goToPrevSearchResult():t._goToNextSearchResult()):"Escape"===e.key&&t._toggleSearch()}),t.element.find(".wpcp-pdf-search-prev").on("click",function(){t._goToPrevSearchResult()}),t.element.find(".wpcp-pdf-search-next").on("click",function(){t._goToNextSearchResult()}),t.element.find(".wpcp-pdf-search-close").on("click",function(){t._toggleSearch()}),e(t.canvasContainer).on("scroll",function(){t._updateCurrentPageFromScroll(),clearTimeout(n),n=setTimeout(function(){t.scrollRafId||(t.scrollRafId=requestAnimationFrame(function(){t.scrollRafId=null,t._renderVisiblePages()}))},120)}),e(t.canvasContainer).on("wheel",function(e){if(e.ctrlKey||e.metaKey){if(e.preventDefault(),t.wheelZoomTimeout)return;t.wheelZoomTimeout=setTimeout(function(){t.wheelZoomTimeout=null},150),e.originalEvent.deltaY<0?t._zoomIn(.1):t._zoomOut(.1)}}),t._initKeyboardNavigation(),t._initTouchZoom()},_initTouchZoom:function(){var n=this,t=e(n.canvasContainer);n.originalTouchAction||(n.originalTouchAction=t.css("touch-action")||""),t.css("touch-action","pan-x pan-y"),t.on("pointerdown.pdfviewer-touch-"+n.options.listtoken,function(e){e.pointerType&&"touch"!==e.pointerType||(n.activePointers[e.pointerId]={x:e.clientX,y:e.clientY},2===Object.keys(n.activePointers).length&&n._startPinch())}),t.on("pointermove.pdfviewer-touch-"+n.options.listtoken,function(e){n.activePointers[e.pointerId]&&(n.activePointers[e.pointerId]={x:e.clientX,y:e.clientY},n.pinchActive&&(e.preventDefault(),n._queuePinchZoom()))}),t.on("pointerup.pdfviewer-touch-"+n.options.listtoken,function(e){delete n.activePointers[e.pointerId],n._endPinchIfNeeded()}),t.on("pointercancel.pdfviewer-touch-"+n.options.listtoken,function(e){delete n.activePointers[e.pointerId],n._endPinchIfNeeded()})},_startPinch:function(){var n=this,t=Object.values(n.activePointers);2===t.length&&(n.pinchActive=!0,n.pinchStartDistance=n._getPinchDistance(t[0],t[1]),n.pinchStartScale=null!==n.scale?n.scale:n._calculateFitScale(),n.pinchLastAppliedScale=n.pinchStartScale,n.pinchPreviewScale=n.pinchStartScale,e(n.canvasContainer).addClass("pinch-zoom-active").css("touch-action","none"))},_queuePinchZoom:function(){var n=this,t=Object.values(n.activePointers);if(2===t.length&&n.pinchActive){var a=n._getPinchDistance(t[0],t[1]);if(n.pinchStartDistance){var i=a/n.pinchStartDistance,r=n.pinchStartScale*i;r=Math.max(n.options.minZoom,Math.min(r,n.options.maxZoom));var c=n._getPinchCenter(t[0],t[1]),o=e(n.canvasContainer).offset()||{left:0,top:0},s={x:c.x-o.left,y:c.y-o.top};n.pendingPinchScale=r,n.pendingPinchCenter=s,n.pinchRafId||(n.pinchRafId=requestAnimationFrame(function(){n.pinchRafId=null,n.pinchActive&&null!==n.pendingPinchScale&&(Math.abs(n.pendingPinchScale-n.pinchLastAppliedScale)<.05||(n.pinchLastAppliedScale=n.pendingPinchScale,n._applyPinchPreview(n.pendingPinchScale,n.pendingPinchCenter)))}))}}},_endPinchIfNeeded:function(){var n=this;if(Object.keys(n.activePointers).length<2){var t=n.pendingPinchScale,a=n.pendingPinchCenter;n.pinchActive=!1,n.pinchStartDistance=0,n.pinchStartScale=null,n.pendingPinchScale=null,n.pendingPinchCenter=null,n.pinchPreviewScale=null,e(n.canvasContainer).removeClass("pinch-zoom-active").css({"touch-action":"pan-x pan-y",transform:"","transform-origin":""}),t&&n._applyScale(t,a)}},_getPinchDistance:function(e,n){var t=e.x-n.x,a=e.y-n.y;return Math.sqrt(t*t+a*a)},_getPinchCenter:function(e,n){return{x:(e.x+n.x)/2,y:(e.y+n.y)/2}},_applyPinchPreview:function(n,t){var a=this,i=a.pinchStartScale||(null!==a.scale?a.scale:a._calculateFitScale()),r=n/i;a.pinchPreviewScale=n;var c=t?t.x+"px "+t.y+"px":"50% 50%";e(a.canvasContainer).css({"transform-origin":c,transform:"scale("+r+")"}),a.element.find(".wpcp-pdf-zoom-level").text(Math.round(100*n)+"%")},_initKeyboardNavigation:function(){var n=this;e(document).on("keydown.pdfviewer-"+n.options.listtoken,function(t){if(n.element.is(":visible")){var a=document.activeElement;if(!a||e.contains(n.element[0],a))switch(t.key){case"ArrowLeft":case"PageUp":t.preventDefault(),n._scrollToPage(n.currentPage-1);break;case"ArrowRight":case"PageDown":t.preventDefault(),n._scrollToPage(n.currentPage+1);break;case"+":case"=":t.preventDefault(),n._zoomIn();break;case"-":t.preventDefault(),n._zoomOut();break;case"0":t.preventDefault(),n._fitToPage()}}})},_initResizeHandler:function(){var t,a=this;e(n).on("resize.pdfviewer-"+a.options.listtoken,function(){clearTimeout(t),t=setTimeout(function(){a._updateContainerSize(),null===a.scale&&a.pdf&&(a.renderedPages={},a._renderAllPages())},250)}),a._updateContainerSize()},_updateContainerSize:function(){var e=this,n=e.element.find(".wpcp-pdf-canvas-container");e.containerHeight=n.height(),e.containerWidth=n.width()},_loadPDF:function(){var e=this;if(e.options.pdfUrl){try{var t=new URL(e.options.pdfUrl,n.location.href);if("http:"!==t.protocol&&"https:"!==t.protocol)return e._showError("Invalid PDF URL: Only HTTP and HTTPS protocols are allowed"),void console.error("Blocked PDF URL with invalid protocol:",t.protocol)}catch(n){return e._showError("Invalid PDF URL format"),void console.error("PDF URL validation error:",n)}e.element.find(".wpcp-pdf-loading").show(),e.element.find(".wpcp-pdf-error").hide(),"undefined"==typeof pdfjsLib?e._loadPDFJSLibrary(function(n){n?e._initializePDF():e._showError("Failed to load PDF.js library")}):e._initializePDF()}else e._showError("No PDF URL provided")},_loadPDFJSLibrary:function(e){var n=this;if(!n.options.vendorPath)return console.error("PDF.js vendor path not provided"),void e(!1);if(a)i.push(e);else if("undefined"!=typeof pdfjsLib&&t)e(!0);else{a=!0,i.push(e);var r=n.options.vendorPath;"/"!==r.substr(-1)&&(r+="/");var c=r+"pdf.js",o=r+"pdf.worker.js",s=document.createElement("script");s.src=c,s.type="module",s.async=!0,s.onload=function(){if("undefined"!=typeof pdfjsLib){pdfjsLib.GlobalWorkerOptions.workerSrc=o,t=!0,a=!1;var e=i.slice();i=[],e.forEach(function(e){e(!0)})}else{console.error("PDF.js library loaded but pdfjsLib not available"),a=!1;e=i.slice();i=[],e.forEach(function(e){e(!1)})}},s.onerror=function(){console.error("Failed to load PDF.js library from:",c),a=!1;var e=i.slice();i=[],e.forEach(function(e){e(!1)})},document.head.appendChild(s)}},_initializePDF:function(){var e=this,n=pdfjsLib.getDocument({url:e.options.pdfUrl,withCredentials:!1,rangeChunkSize:65536,disableAutoFetch:!1,disableStream:!1,disableRange:!1});n.promise.then(function(n){e.pdf=n,e.numPages=n.numPages,e.isLoading=!1,e.element.find(".wpcp-pdf-loading").hide(),e.element.find(".wpcp-pdf-controls").show(),e.element.find(".wpcp-pdf-page-total").text(e.numPages),e._updateButtons(),e._renderAllPages()}).catch(function(n){console.error("PDF.js load error:",n),e._showError(n.message||"Failed to load PDF")})},_renderAllPages:function(){var n=this;e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").each(function(){e(this).find("canvas").remove(),e(this).find(".textLayer").remove()}),e(n.canvasContainer).empty(),n.renderedPages={};for(var t=1;t<=n.numPages;t++){var a=e('<div class="wpcp-pdf-page-wrapper" data-page="'+t+'"></div>'),i=null!==n.scale?n.scale:n._calculateFitScale(),r=n.pageHeight?n.pageHeight*i:800,c=n.pageWidth?n.pageWidth*i:600,o=e('<div class="wpcp-pdf-placeholder"></div>');o.css({"min-height":r+"px",width:c+"px"}),o.append('<i class="eva eva-loader-outline eva-spin"></i>'),a.append(o),a.css("min-height",r+"px"),e(n.canvasContainer).append(a)}n._renderVisiblePages()},_renderVisiblePages:function(){var n=this,t=e(n.canvasContainer).scrollTop(),a=n.containerHeight,i=t,r=t+a,c=800;n._cleanupDistantPages();var o=e(n.canvasContainer).find(".wpcp-pdf-page-wrapper");o.each(function(){var a=e(this),o=parseInt(a.attr("data-page"),10);if(n.renderedPages[o])return!0;var s=a.position().top+t,p=a.height()||800,l=s+p,d=l>=i-c&&s<=r+c;d&&n._renderPage(o)})},_cleanupDistantPages:function(){var n=this,t=e(n.canvasContainer).scrollTop(),a=n.containerHeight,i=t,r=t+a,c=1600;e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").each(function(){var a=e(this),o=parseInt(a.attr("data-page"),10),s=a.find("canvas");if(0===s.length)return!0;var p=a.position().top+t,l=a.height()||800,d=p+l,h=d<i-c||p>r+c;if(h){if(a.find("canvas").remove(),a.find(".textLayer").remove(),delete n.renderedPages[o],n.renderTasks[o]&&n.renderTasks[o].cancel)try{n.renderTasks[o].cancel()}catch(e){}delete n.renderTasks[o]}})},_renderPage:function(t){var a=this;if(!(!a.pdf||t<1||t>a.numPages||a.isDestroyed||a.renderTasks[t])){var i=e(a.canvasContainer).find('.wpcp-pdf-page-wrapper[data-page="'+t+'"]');if(0!==i.length){var r=i.find("canvas")[0];r||(r=document.createElement("canvas"),r.className="wpcp-pdf-canvas",r.setAttribute("data-page",t),i.append(r));var c=r.getContext("2d");a.pdf.getPage(t).then(function(o){if(1===t){var s=o.getViewport({scale:1});a.pageHeight=s.height,a.pageWidth=s.width;var p=null!==a.scale?a.scale:a._calculateFitScale(),l=a.pageHeight*p,d=a.pageWidth*p;e(a.canvasContainer).find(".wpcp-pdf-page-wrapper").each(function(){e(this).css("min-height",l+"px"),e(this).find(".wpcp-pdf-placeholder").css({"min-height":l+"px",width:d+"px"})})}var h=null!==a.scale?a.scale:a._calculateFitScale(),u=n.devicePixelRatio||1,f=o.getViewport({scale:1});s=o.getViewport({scale:h});r.height=s.height*u,r.width=s.width*u,r.style.height=s.height+"px",r.style.width=s.width+"px",c.setTransform(u,0,0,u,0,0);var v={canvasContext:c,viewport:s},g=o.render(v);a.renderTasks[t]=g,g.promise.then(function(){return i.find(".wpcp-pdf-placeholder").remove(),a.renderedPages[t]=!0,o.getTextContent()}).then(function(n){var i=e(r).parent(),c=i.find(".textLayer");if(0===c.length?(c=e('<div class="textLayer"></div>'),i.append(c)):c.empty(),c.css({"--scale-factor":h,"--total-scale-factor":h,"--viewport-scale":h,"--scale-round-x":"1px","--scale-round-y":"1px","--min-font-size":"1",width:f.width+"px",height:f.height+"px"}),c.attr("data-main-rotation",s.rotation||0),void 0!==pdfjsLib.TextLayer){var o=new pdfjsLib.TextLayer({textContentSource:n,container:c[0],viewport:s});o.render()}t===a.numPages&&(a.isRendering=!1,a._updateUI()),delete a.renderTasks[t]}).catch(function(e){console.error("PDF.js render error:",e),delete a.renderTasks[t],delete a.renderedPages[t]})}).catch(function(e){console.error("PDF.js getPage error:",e)})}}},_calculateFitScale:function(){var e=this;if(!(e.containerHeight&&e.containerWidth&&e.pageHeight&&e.pageWidth&&0!==e.pageHeight&&0!==e.pageWidth))return 1;var n=e.containerHeight-120,t=e.containerWidth-40,a=n/e.pageHeight,i=t/e.pageWidth,r=Math.min(a,i);return Math.min(r,1)},_scrollToPage:function(n){var t=this;if(!(n<1||n>t.numPages)){var a=e(t.canvasContainer).find('.wpcp-pdf-page-wrapper[data-page="'+n+'"]');a.length&&(e(t.canvasContainer).animate({scrollTop:a.position().top+e(t.canvasContainer).scrollTop()},300),t.currentPage=n,t._updateUI())}},_updateCurrentPageFromScroll:function(){var n=this,t=e(n.canvasContainer).scrollTop();e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").each(function(){var a=e(this),i=a.position().top+t,r=a.height(),c=i+r/2;if(c>=t&&c<=t+n.containerHeight){var o=parseInt(a.attr("data-page"),10);return n.currentPage!==o&&(n.currentPage=o,e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").removeClass("current-page"),a.addClass("current-page"),n._updateUI()),!1}})},_zoomIn:function(e){var n=this,t="number"==typeof e?e:.25,a=null!==n.scale?n.scale:n._calculateFitScale(),i=Math.min(a+t,n.options.maxZoom);n._applyScale(i)},_zoomOut:function(e){var n=this,t="number"==typeof e?e:.25,a=null!==n.scale?n.scale:n._calculateFitScale(),i=Math.max(a-t,n.options.minZoom);n._applyScale(i)},_fitToPage:function(){var e=this;e.scale=null,e.element.find(".wpcp-pdf-fit").addClass("active"),e._cancelAllRenderTasks(),e.renderedPages={},e._updateUI(),e._renderAllPages()},_applyScale:function(n,t){var a=this,i=Math.max(a.options.minZoom,Math.min(n,a.options.maxZoom)),r=null!==a.scale?a.scale:a._calculateFitScale(),c=i/r,o=e(a.canvasContainer).scrollTop(),s=e(a.canvasContainer).scrollLeft(),p=t||{x:a.containerWidth/2,y:a.containerHeight/2};a.scale=i,a.element.find(".wpcp-pdf-fit").removeClass("active"),a._cancelAllRenderTasks(),a.renderedPages={},a._updateUI(),a._renderAllPages(),requestAnimationFrame(function(){var n=(o+p.y)*c-p.y,t=(s+p.x)*c-p.x;e(a.canvasContainer).scrollTop(n),e(a.canvasContainer).scrollLeft(t)})},_cancelAllRenderTasks:function(){var e=this;Object.keys(e.renderTasks).forEach(function(n){var t=e.renderTasks[n];if(t&&t.cancel)try{t.cancel()}catch(e){}}),e.renderTasks={}},_updateUI:function(){var e=this;e.element.find(".wpcp-pdf-page-current").text(e.currentPage);var n=null!==e.scale?e.scale:e._calculateFitScale(),t=Math.round(100*n);e.element.find(".wpcp-pdf-zoom-level").text(t+"%"),e._updateButtons()},_updateButtons:function(){var e=this;e.element.find(".wpcp-pdf-prev").prop("disabled",e.currentPage<=1),e.element.find(".wpcp-pdf-next").prop("disabled",e.currentPage>=e.numPages);var n=null!==e.scale?e.scale:e._calculateFitScale();e.element.find(".wpcp-pdf-zoom-out").prop("disabled",n<=e.options.minZoom),e.element.find(".wpcp-pdf-zoom-in").prop("disabled",n>=e.options.maxZoom)},_showError:function(e){var n=this;n.isLoading=!1,n.element.find(".wpcp-pdf-loading").hide(),n.element.find(".wpcp-pdf-controls").hide(),n.element.find(".wpcp-pdf-canvas-container").hide();var t=n.element.find(".wpcp-pdf-error");t.find(".wpcp-pdf-error-message").text(e),t.show()},_toggleSearch:function(){var e=this,n=e.element.find(".wpcp-pdf-search-panel"),t=e.element.find(".wpcp-pdf-search-input"),a=e.element.find(".wpcp-pdf-search");n.is(":visible")?(n.slideUp(200),a.removeClass("active"),e._clearSearch()):(n.slideDown(200,function(){t.focus()}),a.addClass("active"))},_performSearch:function(e){var n=this;if(n._clearSearchHighlights(),!e||e.length<2)return n.searchQuery="",n.searchResults=[],n.currentSearchResult=-1,void n._updateSearchUI();n.searchQuery=e.toLowerCase(),n.searchResults=[],n.currentSearchResult=-1;for(var t=[],a=1;a<=n.numPages;a++)t.push(n._searchPage(a,n.searchQuery));Promise.all(t).then(function(){n.searchResults.length>0&&(n.currentSearchResult=0,n._highlightSearchResults(),n._scrollToSearchResult(0)),n._updateSearchUI()})},_searchPage:function(e,n){var t=this;return t.pdf.getPage(e).then(function(a){return a.getTextContent().then(function(a){var i=a.items,r="",c=[];i.forEach(function(e,n){var t=e.str;c.push({start:r.length,end:r.length+t.length,itemIndex:n}),r+=t+" "});for(var o=r.toLowerCase(),s=0;-1!==(s=o.indexOf(n,s));){var p=s,l=s+n.length;t.searchResults.push({pageNum:e,start:p,end:l,text:r.substring(p,l)}),s=l}})})},_highlightSearchResults:function(){var n=this;if(e(n.canvasContainer).find(".textLayer span").removeClass("search-highlight search-highlight-current"),n.searchResults.forEach(function(t,a){var i=e(n.canvasContainer).find('.wpcp-pdf-page-wrapper[data-page="'+t.pageNum+'"]'),r=i.find(".textLayer");if(0!==r.length){r.find("span");var c=a===n.currentSearchResult;n._highlightTextInLayer(r,t,c)}}),e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").removeClass("current-search-result"),n.currentSearchResult>=0){var t=n.searchResults[n.currentSearchResult],a=e(n.canvasContainer).find('.wpcp-pdf-page-wrapper[data-page="'+t.pageNum+'"]');a.addClass("current-search-result")}},_highlightTextInLayer:function(n,t,a){var i=this,r=n.find("span"),c=i.searchQuery,o=a?"search-highlight-current":"search-highlight";r.each(function(){var n=e(this),t=n.text();t&&-1!==t.toLowerCase().indexOf(c)&&n.addClass(o)})},_clearSearchHighlights:function(){var n=this;e(n.canvasContainer).find(".textLayer span").removeClass("search-highlight search-highlight-current"),e(n.canvasContainer).find(".wpcp-pdf-page-wrapper").removeClass("current-search-result")},_clearSearch:function(){var e=this;e.searchQuery="",e.searchResults=[],e.currentSearchResult=-1,e.element.find(".wpcp-pdf-search-input").val(""),e._clearSearchHighlights(),e._updateSearchUI()},_goToNextSearchResult:function(){var e=this;0!==e.searchResults.length&&(e.currentSearchResult=(e.currentSearchResult+1)%e.searchResults.length,e._highlightSearchResults(),e._scrollToSearchResult(e.currentSearchResult),e._updateSearchUI())},_goToPrevSearchResult:function(){var e=this;0!==e.searchResults.length&&(e.currentSearchResult=e.currentSearchResult-1,e.currentSearchResult<0&&(e.currentSearchResult=e.searchResults.length-1),e._highlightSearchResults(),e._scrollToSearchResult(e.currentSearchResult),e._updateSearchUI())},_scrollToSearchResult:function(n){var t=this;if(!(n<0||n>=t.searchResults.length)){var a=t.searchResults[n];e(t.canvasContainer).find(".wpcp-pdf-page-wrapper").removeClass("current-search-result");var i=e(t.canvasContainer).find('.wpcp-pdf-page-wrapper[data-page="'+a.pageNum+'"]');if(i.addClass("current-search-result"),t.renderedPages[a.pageNum]||(t.renderedPages[a.pageNum]=!0,t._renderPage(a.pageNum)),i.length){var r=i.position().top+e(t.canvasContainer).scrollTop();e(t.canvasContainer).animate({scrollTop:r-50},300)}}},_printPDF:function(){var e=this;e.pdf?e.pdf.getData().then(function(e){var t=new Blob([e],{type:"application/pdf"}),a=URL.createObjectURL(t),i=n.open(a,"_blank");i?i.onload=function(){i.focus(),i.print(),i.onafterprint=function(){URL.revokeObjectURL(a),i.close()}}:(URL.revokeObjectURL(a),alert("Please allow popups to print the PDF"))}).catch(function(e){console.error("Error preparing PDF for print:",e),alert("Failed to prepare PDF for printing")}):console.warn("PDF not loaded yet")},_updateSearchUI:function(){var e=this,n=e.element.find(".wpcp-pdf-search-count"),t=e.element.find(".wpcp-pdf-search-prev"),a=e.element.find(".wpcp-pdf-search-next");0===e.searchResults.length?(n.text(""),t.prop("disabled",!0),a.prop("disabled",!0)):(n.text(e.currentSearchResult+1+" / "+e.searchResults.length),t.prop("disabled",!1),a.prop("disabled",!1))},_destroy:function(){var t=this;return t.isDestroyed=!0,e(document).off("keydown.pdfviewer-"+t.options.listtoken),e(n).off("resize.pdfviewer-"+t.options.listtoken),e(t.canvasContainer).off("scroll wheel"),t.wheelZoomTimeout&&clearTimeout(t.wheelZoomTimeout),t.searchTimeout&&clearTimeout(t.searchTimeout),t.scrollRafId&&(cancelAnimationFrame(t.scrollRafId),t.scrollRafId=null),t.pinchRafId&&(cancelAnimationFrame(t.pinchRafId),t.pinchRafId=null),t._cancelAllRenderTasks(),t.pdf&&t.pdf.destroy(),t.renderedPages={},t.searchResults=[],e(t.canvasContainer).off(".pdfviewer-touch-"+t.options.listtoken).removeClass("pinch-zoom-active").css({"touch-action":"pan-x pan-y",transform:"","transform-origin":""}),this._super()}})})(jQuery,window);
var WPCP_shortcodeEncode=function(){return function(e){if("string"!=typeof e)throw new Error("WPCP_shortcodeEncode: Input must be a string.");return btoa(new TextEncoder().encode(e).reduce((t,n)=>t+String.fromCharCode(n),""))}}();
var WPCP_shortcodeDecode=function(){return function(e){if("string"!=typeof e)throw new Error("WPCP_shortcodeDecode: Input must be a Base64-encoded string.");return new TextDecoder().decode(Uint8Array.from(atob(e),t=>t.charCodeAt(0)))}}();