5 lines
No EOL
152 KiB
JavaScript
5 lines
No EOL
152 KiB
JavaScript
function sprintf(){var t=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,e=arguments,n=0,i=e[n++],o=function(t,e,n,i){n||(n=" ");var o=t.length>=e?"":new Array(1+e-t.length>>>0).join(n);return i?t+o:o+t},r=function(t,e,n,i,r,a){var s=i-t.length;return s>0&&(t=n||!r?o(t,i,a,n):t.slice(0,e.length)+o("",s,"0",!0)+t.slice(e.length)),t},a=function(t,e,n,i,a,s,l){var c=t>>>0;return n=n&&c&&{2:"0b",8:"0",16:"0x"}[e]||"",t=n+o(c.toString(e),s||0,"0",!1),r(t,n,i,a,l)},s=function(t,e,n,i,o,a){return null!=i&&(t=t.slice(0,i)),r(t,"",e,n,o,a)},l=function(t,i,l,c,u,d,h){var f,p,g,m,b;if("%%"===t)return"%";for(var v=!1,y="",w=!1,P=!1,$=" ",x=l.length,F=0;l&&F<x;F++)switch(l.charAt(F)){case" ":y=" ";break;case"+":y="+";break;case"-":v=!0;break;case"'":$=l.charAt(F+1);break;case"0":w=!0,$="0";break;case"#":P=!0}if(c=c?"*"===c?+e[n++]:"*"==c.charAt(0)?+e[c.slice(1,-1)]:+c:0,c<0&&(c=-c,v=!0),!isFinite(c))throw new Error("sprintf: (minimum-)width must be finite");switch(d=d?"*"===d?+e[n++]:"*"==d.charAt(0)?+e[d.slice(1,-1)]:+d:"fFeE".indexOf(h)>-1?6:"d"===h?0:void 0,b=i?e[i.slice(0,-1)]:e[n++],h){case"s":return s(String(b),v,c,d,w,$);case"c":return s(String.fromCharCode(+b),v,c,d,w);case"b":return a(b,2,P,v,c,d,w);case"o":return a(b,8,P,v,c,d,w);case"x":return a(b,16,P,v,c,d,w);case"X":return a(b,16,P,v,c,d,w).toUpperCase();case"u":return a(b,10,P,v,c,d,w);case"i":case"d":return f=+b||0,f=Math.round(f-f%1),p=f<0?"-":y,b=p+o(String(Math.abs(f)),d,"0",!1),r(b,p,v,c,w);case"e":case"E":case"f":case"F":case"g":case"G":return f=+b,p=f<0?"-":y,g=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],b=p+Math.abs(f)[g](d),r(b,p,v,c,w)[m]();default:return t}};return i.replace(t,l)}function testPassword(t){var e=0,n="weak",i="",o=0;return t.length<5?(e+=3,i=i+"3 points for length ("+t.length+")\n"):t.length>4&&t.length<8?(e+=6,i=i+"6 points for length ("+t.length+")\n"):t.length>7&&t.length<16?(e+=12,i=i+"12 points for length ("+t.length+")\n"):t.length>15&&(e+=18,i=i+"18 point for length ("+t.length+")\n"),t.match(/[a-z]/)&&(e+=1,i+="1 point for at least one lower case char\n"),t.match(/[A-Z]/)&&(e+=5,i+="5 points for at least one upper case char\n"),t.match(/\d+/)&&(e+=5,i+="5 points for at least one number\n"),t.match(/(.*[0-9].*[0-9].*[0-9])/)&&(e+=5,i+="5 points for at least three numbers\n"),t.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)&&(e+=5,i+="5 points for at least one special char\n"),t.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)&&(e+=5,i+="5 points for at least two special chars\n"),t.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(e+=2,i+="2 combo points for upper and lower letters\n"),t.match(/([a-zA-Z])/)&&t.match(/([0-9])/)&&(e+=2,i+="2 combo points for letters and numbers\n"),t.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)&&(e+=2,i+="2 combo points for letters, numbers and special chars\n"),0==t.length&&(e=0),n=e<16?"very weak":e>15&&e<25?"weak":e>24&&e<35?"average":e>34&&e<45?"strong":"stronger",o=Math.round(Math.min(100,100*e/45))/100,{score:e,ratio:o,percent:100*o+"%",verdict:n,log:i}}$(function(){var t={url:PF.obj.config.json_api,cache:!1,dataType:"json",data:{auth_token:PF.obj.config.auth_token}};void 0!==PF.obj.config.session_id&&(t.data.session_id=PF.obj.config.session_id),$.ajaxSetup(t),$(window).bind("beforeunload",function(){if("continue"!=$("form",PF.obj.modal.selectors.root).data("beforeunload"))return $(PF.obj.modal.selectors.root).is(":visible")&&PF.fn.form_modal_has_changed()?PF.fn._s("All the changes that you have made will be lost if you continue."):void 0});let e=0;const n=void 0!==window.pageXOffset,i="CSS1Compat"===(document.compatMode||""),o=function(){let t,o=n?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop;return t=o>e,e=o,t};var r;window.addEventListener("scroll",function(){r||(r=!0,setTimeout(function(){var t=o();$("#top-bar, .follow-scroll").each(function(){"1"!==$(this).attr("data-scroll-lock")&&$(this).addClass(t?"scroll-down":"scroll-up").removeClass(t?"scroll-up":"scroll-down")}),r=!1},250))}),$(window).bind("hashchange",function(){"#edit"!=window.location.hash||$(PF.obj.modal.selectors.root).exists()||$("[data-modal=edit]").first().click()}),PF.fn.bindtipTip();var a,s=$(window).width();if($(window).on("resize",function(){PF.fn.close_pops(),clearTimeout(a),a=setTimeout(function(){PF.fn.modal.fixScrollbars();var t=PF.fn.getDeviceName(),e=["phone","phablet"],n=["tablet","laptop","desktop"],i=PF.fn.getDeviceName();(i!==t&&$.inArray(t,e)>=0&&-1==$.inArray(i,e)||$.inArray(t,n)>=0&&-1==$.inArray(i,n))&&PF.fn.close_pops(),$(".top-bar").css("top",""),$(PF.fn.topMenu.vars.menu).css("height",$(window).height()),$("body").css({position:"",height:""}),$(".antiscroll").removeClass("jsly").data("antiscroll",""),$(".antiscroll-inner").css({height:"",width:"",maxheight:""}),PF.fn.list_fluid_width(),s!==$(window).width()&&($(PF.obj.listing.selectors.list_item,PF.obj.listing.selectors.content_listing_visible).css("opacity",0),$("[data-action=top-bar-menu-full]","#top-bar").hasClass("current")&&PF.fn.topMenu.hide(0),PF.fn.listing.columnizer(!0,0,!0),$(PF.obj.listing.selectors.list_item,PF.obj.listing.selectors.content_listing_visible).css("opacity",1)),s=$(window).width()},250)}),$(document).on("click","html",function(){PF.fn.close_pops()}),$(document).on("keydown",".numeric-input",function(t){t.keydown_numeric()}),$(document).on("click","[data-scrollto]",function(t){var e=$(this).data("scrollto"),n=$(e.match(/^\#|\./)?e:"#"+e);n.exists()?PF.fn.scroll(n):console.log("PF scrollto error: target doesn't exists",n)}),$(document).on("click focus","[data-login-needed], [data-user-logged=must]",function(t){if(!PF.fn.is_user_logged())return t.preventDefault(),t.stopPropagation(),window.location.href=PF.obj.vars.urls.login,!1}),$(document).on("click","[data-trigger]",function(t){if(t.isPropagationStopped())return!1;var e=$(this).data("trigger"),n=$(e.match(/^\#|\./)?e:"#"+e);n.exists()?(t.stopPropagation(),t.preventDefault(),n.closest(PF.obj.modal.selectors.root).length||PF.fn.modal.close(),n.click()):console.log("PF trigger error: target doesn't exists",n)}),$("form[method=post]").each(function(){$("input[name=auth_token]",this).exists()||$(this).append($("<input>",{type:"hidden",name:"auth_token",value:PF.obj.config.auth_token}))}),$(document).on("click",".clear-form",function(){$(this).closest("form")[0].reset()}),$(document).on("submit","form[data-action=validate]",function(t){$(this).data("type");var e=!1,n=$(this).find("[required], [data-validate]");if(n.each(function(){var t=$(this).attr("type"),n=$(this).attr("pattern"),i=function(t){$(t).highlight(),e=!0};if($(this).is("[required]")&&""==$(this).val()){if($(this).is(":hidden")){var o=$($($(this).data("highlight")).exists()?$(this).data("highlight"):"#"+$(this).data("highlight"));$(o).highlight()}i(this)}if(void 0===n&&0==/mail|url/.test(t))return!0;n&&(n=new RegExp(n),n.test($(this).val())||i(this)),"email"!=t||$(this).val().isEmail()||i(this)}),e)return PF.fn.growl.expirable(PF.fn._s("Check the errors in the form to continue.")),!1}),$(document).on("change","select[data-combo]",function(){var t=$("#"+$(this).data("combo"));t.exists()&&t.children(".switch-combo").hide();var e=$("#"+$(this).closest("select").data("combo")),n=$("[data-combo-value~="+$("option:selected",this).attr("value")+"]",e);n.exists()&&n.show().find("[data-required]").each(function(){$(this).attr("required","required")}),$(".switch-combo",e).each(function(){$(this).is(":visible")||$("[required]",this).attr("data-required",!0).removeAttr("required")})}),$(document).on("keyup",function(t){$this=$(t.target),27==t.keyCode&&$(PF.obj.modal.selectors.root).is(":visible")&&!$this.is(":input")&&$("[data-action=cancel],[data-action=close-modal]",PF.obj.modal.selectors.root).first().click()}),$(document).on("change",":input",function(t){PF.fn.growl.close()}),$(document).on("keyup",":input",function(t){$(".input-warning",$(this).closest(".input-label")).html("")}),$(document).on("blur",":input",function(){var t=$.trim($(this).prop("value"));$(this).prop("value",t)}),$(document).on("click",":input[data-focus=select-all]",function(){this.select()}),$(document).on("keyup change blur",":input[type=password]",function(){var t=testPassword($(this).val()),e=$(this).closest("div");""==$(this).val()&&(t.percent=0,t.verdict=""),$("[data-content=password-meter-bar]",e).attr("data-veredict",t.verdict.replace(/ /g,"-")).width(t.percent),$("[data-text=password-meter-message]",e).removeClass("red-warning").text(""!==t.verdict?PF.fn._s(t.verdict):"")}),$(document).on("click","[rel=popup-link], .popup-link",function(t){t.preventDefault();var e=$(this)[void 0!==$(this).attr("href")?"attr":"data"]("href");if(void 0!==e)return"mailto"==e.substring(0,6)&&PF.fn.isDevice(["phone","phablet"])?(window.location=e,!1):void PF.fn.popup({href:e})}),$(document).on("click","[data-modal=simple],[data-modal=html]",function(){var t=$("[data-modal="+$(this).data("target")+"], #"+$(this).data("target")).first();PF.fn.modal.call({template:t.html(),buttons:!1})}),$(document).on("submit",PF.obj.modal.selectors.root+" form",function(t){return!$(this).data("prevented")&&(void 0!==$(this).attr("method")&&void 0)}),$(document).on("click","[data-modal=edit],[data-modal=form],[data-confirm]",function(t){t.preventDefault();var e,n=$(this);n.is("[data-confirm]")?(e=n,PF.obj.modal.type="confirm"):(e=$("[data-modal="+n.data("target")+"], #"+n.data("target")).first(),0==e.length&&(e=$("[data-modal=form-modal], #form-modal").first()),0==e.length&&console.log("PF Error: Modal target doesn't exists."),PF.obj.modal.type=n.data("modal"));var i=n.data("args"),o=window[e.data("submit-fn")],r=window[e.data("cancel-fn")],a=(window[e.data("load-fn")],e.data("submit-done")),s={url:e.data("ajax-url")||(void 0!==e.data("is-xhr")?PF.obj.config.json_api:null),deferred:window[e.data("ajax-deferred")]};if("function"!=typeof o&&e.data("submit-fn")){var l=e.data("submit-fn").split(".");o=window;for(var c=0;c<l.length;c++)o=o[l[c]]}if("function"!=typeof r&&e.data("cancel-fn")){var u=e.data("cancel-fn").split(".");r=window;for(c=0;c<u.length;c++)r=r[u[c]]}if("function"!=typeof load_function&&e.data("load-fn")){var d=e.data("load-fn").split(".");load_function=window;for(c=0;c<d.length;c++)load_function=load_function[d[c]]}if("object"!=typeof s.deferred&&e.data("ajax-deferred")){var h=e.data("ajax-deferred").split(".");s.deferred=window;for(c=0;c<h.length;c++)s.deferred=s.deferred[h[c]]}var f=window[e.data("before-fn")];if("function"!=typeof f&&e.data("before-fn")){var p=e.data("before-fn").split(".");f=window;for(c=0;c<p.length;c++)f=f[p[c]]}"function"==typeof f&&f(t);var g=$(this).data("options")||{};if(n.is("[data-confirm]")){var m={message:n.data("confirm"),confirm:"function"==typeof o?o(i):"",cancel:"function"==typeof r?r(i):"",ajax:s};n.attr("href")&&""==m.confirm&&(m.confirm=function(){return window.location.replace(n.attr("href"))}),PF.fn.modal.confirm($.extend(m,g))}else{m={template:e.html(),button_submit:$(this).is("[data-modal=edit]")?PF.fn._s("Save changes"):PF.fn._s("Submit"),confirm:function(){var t=PF.fn.form_modal_has_changed(),r=$("form",PF.obj.modal.selectors.root);if(void 0!==r.attr("action"))return r.data("prevented",!t),void PF.fn.modal.close();if($(":input[name]",r).each(function(){if($(this).is(":visible"))"required"==$(this).attr("data-required")&&$(this).prop("required",!0);else{var t=$(this).attr("required");void 0!==t&&!1!==t&&$(this).prop("required",!1).attr("data-required","required")}}),!r[0].checkValidity())return!1;if(t||g.forced){if("function"==typeof o&&(submit_fn=o(i)),"undefined"!=typeof submit_fn&&0==submit_fn)return!1;if($(":input",PF.obj.modal.selectors.root).each(function(){$(this).val($.trim($(this).val()))}),n.is("[data-modal=edit]")&&e.html($(PF.obj.modal.selectors.body,$(PF.obj.modal.selectors.root).bindFormData()).html().replace(/rel=[\'"]tooltip[\'"]/g,'rel="template-tooltip"')),void 0!==s.url)return!0;PF.fn.modal.close(function(){void 0!==a&&PF.fn.growl.expirable(""!==a?a:PF.fn._s("Changes saved successfully."))})}else PF.fn.modal.close()},cancel:function(){if("function"==typeof cancel_fn&&(cancel_fn=cancel_fn()),"undefined"!=typeof cancel_fn&&0==cancel_fn)return!1;if("skip"!=e.data("prompt")&&PF.fn.form_modal_has_changed()){if($(PF.obj.modal.selectors.changes_confirm).exists())return;$(PF.obj.modal.selectors.box,PF.obj.modal.selectors.root).css({transition:"none"}).hide(),$(PF.obj.modal.selectors.root).append('<div id="'+PF.obj.modal.selectors.changes_confirm.replace("#","")+'"><div class="content-width"><h2>'+PF.fn._s("All the changes that you have made will be lost if you continue.")+'</h2><div class="'+PF.obj.modal.selectors.btn_container.replace(".","")+' margin-bottom-0"><button class="btn btn-input default" data-action="cancel">'+PF.fn._s("Go back to form")+'</button> <span class="btn-alt">'+PF.fn._s("or")+' <a data-action="submit">'+PF.fn._s("continue anyway")+"</a></span></div></div>"),$(PF.obj.modal.selectors.changes_confirm).css("margin-top",-$(PF.obj.modal.selectors.changes_confirm).outerHeight(!0)/2).hide().fadeIn("fast")}else PF.fn.modal.close(),"#edit"==window.location.hash&&(window.location.hash="")},load:function(){"function"==typeof load_function&&load_function()},callback:function(){},ajax:s};PF.fn.modal.call($.extend(m,g))}}),PF.fn.is_user_logged()||$("[data-login-needed]:input, [data-user-logged=must]:input").each(function(){$(this).attr("readonly",!0)}),$(document).on("keydown",PF.obj.modal.selectors.root+" input",function(t){var e=$(t.target),n=t.charCode||t.keyCode;13===n?13==n&&$("[data-action=submit]",PF.obj.modal.selectors.root).exists()&&!e.is(".prevent-submit")&&$("[data-action=submit]",PF.obj.modal.selectors.root).click():PF.fn.growl.close()}),window.location.hash&&"#edit"==window.location.hash&&$("[data-modal=edit]").first().click(),$(document).on("click","#menu-fullscreen .fullscreen, [data-action=top-bar-menu-full]",function(t){if(!$(t.target).is("#pop-box-mask")){var e=$("[data-action=top-bar-menu-full]","#top-bar").hasClass("current");PF.fn.topMenu[e?"hide":"show"]()}}),$(document).on("click","[data-action=top-bar-search]",function(){$("[data-action=top-bar-search-input]",".top-bar").removeClass("hidden").show(),$("[data-action=top-bar-search-input]:visible input").first().focus(),is_ios()&&!$(this).closest(PF.fn.topMenu.vars.menu).exists()&&$(".top-bar").css("position","absolute"),$("[data-action=top-bar-search]",".top-bar").hide()}),$(document).on("click",".input-search .icon--search",function(t){$("input",t.currentTarget.offsetParent).focus()}),$(document).on("click",".input-search .icon--close, .input-search [data-action=clear-search]",function(t){var e=$("input",t.currentTarget.offsetParent);""==e.val()?$(this).closest("[data-action=top-bar-search-input]").exists()&&($("[data-action=top-bar-search-input]",".top-bar").hide(),$("[data-action=top-bar-search]",".top-bar").removeClass("opened").show()):($(this).closest("[data-action=top-bar-search-input]").exists()||$(this).hide(),e.val("").change())}),$(document).on("keyup change","input.search",function(t){var e=$(this),n=$(this).closest(".input-search");if(!$(this).closest("[data-action=top-bar-search-input]").exists()){var i=""==e.val()?"hide":"show";$(".icon--close, [data-action=clear-search]",n)[i]()}}),$(document).on("click mouseenter",".pop-btn",function(t){if(!PF.fn.isDevice(["phone","phablet"])||"mouseenter"!=t.type&&!$(this).hasClass("pop-btn-desktop")){var e,n,i=$(t.target),o=$.makeArray(["phone","phablet"]),r=$(this);if(("mouseenter"!=t.type||$(this).hasClass("pop-btn-auto"))&&!$(this).hasClass("disabled")&&(!i.closest(".current").exists()||PF.fn.isDevice("phone")||i.closest(".pop-btn-show").exists())){if(PF.fn.growl.close(),t.stopPropagation(),e=$(this),n=$(".pop-box",e),e.addClass("opened"),$(".pop-box-inner",n).css("max-height",""),PF.fn.isDevice(o)){var a=$(".btn-text,.text,.pop-btn-text",e).first().text();void 0!==a&&""!=a||(a=PF.fn._s("Select")),$(".pop-box-header",n).exists()||n.prepend($("<div/>",{class:"pop-box-header",html:a+'<span class="btn-icon icon--close fas fa-times"></span></span>'}))}else $(".pop-box-header",n).remove(),n.css({bottom:""});if(n.hasClass("anchor-center")&&void 0===n.data("guidstr")&&(PF.fn.isDevice(o)?n.css("margin-left",""):n.css("margin-left",-n.width()/2)),i.is("[data-change]")&&($("li",n).removeClass("current"),i.closest("li").addClass("current"),$("[data-text-change]",e).text($("li.current a",n).text()),t.preventDefault()),n.exists()){r=t.istriggered?$(t.target):$(this);if(!(n.is(":visible")&&$(t.target).closest(".pop-box-inner").exists()&&r.hasClass("pop-keep-click"))){$(".pop-box:visible").not(n).hide().closest(".pop-btn").removeClass("opened");var s=function(t){if(t.is(":visible"))if(PF.fn.isDevice(o))$(".antiscroll-inner",t).height("100%");else{var e=t.css("marginLeft");void 0!==e&&(e=parseFloat(e),t.css("marginLeft",""));var n=t.getWindowCutoff();if(n&&(n.left||n.right)&&n.right<e){s="guid-"+PF.fn.guid();t.css("marginLeft",n.right+"px").addClass(s).attr("data-guidstr",s);var i=r.outerWidth()/2+r.offset().left-t.offset().left,a=[];$.each(["top","bottom"],function(t,e){$.each(["after","before"],function(t,n){a.push("."+s+".arrow-box-"+e+":"+n)})}),$('<style id="'+s+'">'+a.join()+" { left: "+i+"px; }</style>").appendTo("head")}else t.css("marginLeft",e+"px");$(".antiscroll-wrap:not(.jsly):visible",t).addClass("jsly").antiscroll()}else{var s=t.attr("data-guidstr");t.css("marginLeft","").removeClass(s).removeAttr("data-guidstr").closest(".pop-btn").removeClass("opened"),void 0!==s&&$("style#"+s).remove()}};if(PF.fn.isDevice(o)){$(this).is("[data-action=top-bar-notifications]")&&n.css({height:$(window).height()});var l=n.height()+"px",c=parseInt($(".top-bar").outerHeight())+parseInt($(".top-bar").css("top"))+parseInt($(".top-bar").css("margin-top"))+parseInt($(".top-bar").css("margin-bottom"))+"px";n.is(":visible")?($("#pop-box-mask").css({opacity:0}),n.css({transform:"none"}),r.closest(PF.fn.topMenu.vars.menu).exists()&&($(".top-bar").css({transform:"none"}),$(PF.fn.topMenu.vars.menu).css({height:$(window).height()+parseInt(c)})),setTimeout(function(){if(n.hide().attr("style",""),$("#pop-box-mask").remove(),s(n),r.closest(PF.fn.topMenu.vars.menu).exists()&&($(PF.fn.topMenu.vars.menu).css({height:""}),$(PF.fn.topMenu.vars.menu).animate({scrollTop:PF.fn.topMenu.vars.scrollTop},PF.obj.config.animation.normal/2)),!$("body").data("hasOverflowHidden")){var t="pop-box-show pop-box-show--top";$("#fullscreen-modal").exists()||(t+=" overflow-hidden"),$("body").removeClass(t)}n.find(".pop-box-inner").css("height","")},PF.obj.config.animation.normal)):($("#pop-box-mask").remove(),n.parent().prepend($("<div/>",{id:"pop-box-mask",class:"fullscreen black"}).css({zIndex:400,display:"block"})),PF.fn.topMenu.vars.scrollTop=$(PF.fn.topMenu.vars.menu).scrollTop(),setTimeout(function(){$("#pop-box-mask").css({opacity:1}),setTimeout(function(){n.show().css({bottom:"-"+l,maxHeight:$(window).height(),zIndex:1e3,transform:"translate(0,0)"}),setTimeout(function(){n.css({transform:"translate(0,-"+l+")"})},1),setTimeout(function(){s(n)},PF.obj.config.animation.normal),$("body").hasClass("overflow-hidden")?$("body").data("hasOverflowHidden",1):$("body").addClass("overflow-hidden "+(r.closest(".top-bar").exists()?"pop-box-show--top":"pop-box-show")),r.closest(PF.fn.topMenu.vars.menu).exists()&&$(PF.fn.topMenu.vars.menu).css({height:$(window).height()+parseInt(c)}),$(".pop-box-inner",n).css("height",n.height()-$(".pop-box-header",n).outerHeight(!0))},1)},1))}else n[n.is(":visible")?"hide":"show"](0,function(){s(n)})}}}}}).on("mouseleave",".pop-btn",function(){if(PF.fn.isDevice(["laptop","desktop"])){var t=$(this),e=$(".pop-box",t);!t.hasClass("pop-btn-auto")||PF.fn.isDevice(["phone","phablet"])&&t.hasClass("pop-btn-auto")||e.hide().closest(".pop-btn").removeClass("opened")}}),window.location.hash,$(".content-tabs").exists()){var l=$("a",".content-tabs .current");History.replaceState({href:l.attr("href"),"data-tab":l.data("tab"),pushed:"tabs",statenum:0},null,null)}var c=History.getState();void 0===c.data&&History.replaceState({scrollTop:0},document.title,window.location.href),History.Adapter.bind(window,"popstate",function(){var t=History.getState();t.data&&void 0!==t.data.scrollTop&&$(window).scrollTop()!==t.data.scrollTop&&$(window).scrollTop(t.data.scrollTop)}),$("a",".content-tabs").click(function(t){if(1==$(this).data("link")&&$(this).data("tab",!1),$(this).closest(".current,.disabled").exists())t.preventDefault();else if(void 0!==$(this).data("tab")){var e={};if($.each(this.attributes,function(){e[this.name]=this.value}),e.pushed="tabs","classic"!=$("#"+e["data-tab"]).data("load")){if(window.location.hash){var n=window.location.href;n=n.replace(window.location.hash,"")}History.pushState(e,document.title,void 0!==n?n:$(this).attr("href")),t.preventDefault()}var i=$("[data-action=tab-menu]",$(this).closest(".header"));i.find("[data-content=current-tab-label]").text($(this).text()),console.log(),i.find('[data-content="tab-icon"]').attr("class","").addClass($(this).find(".btn-icon").attr("class")),i.is(":visible")&&i.click()}}),$(document).on("click","[data-action=tab-menu]",function(){var t=$(this).closest(".header").find(".content-tabs"),e=t.is(":visible"),n=$(this);e||(t.data("classes",t.attr("class")),t.removeClass(function(t,e){return(e.match(/\b\w+-hide/g)||[]).join(" ")}),t.hide()),e||n.removeClass("current"),t[e?"hide":"show"](),e&&(t.css("display","").addClass(t.data("classes")),n.addClass("current"))}),$(window).bind("statechange",function(t){var e;PF.fn.growl.close(),e=History.getState().data,e&&"tabs"==e.pushed&&PF.fn.show_tab(e["data-tab"])}),$(document).on("click",PF.obj.listing.selectors.list_item+" a",function(t){""!=$(this).attr("src")&&History.replaceState({scrollTop:$(window).scrollTop()},document.title,window.location.href)}),$(document).on("click","[data-action=load-more]",function(t){PF.obj.listing.lockClickMore||(PF.obj.listing.lockClickMore=!0,$(this).closest(".content-listing-more").hide(),!PF.fn.is_listing()||$(this).closest(PF.obj.listing.selectors.content_listing).is(":hidden")||$(this).closest("#content-listing-template").exists()||PF.obj.listing.calling||(PF.fn.listing.queryString.stock_new(),PF.obj.listing.query_string.seek=$(this).attr("data-seek"),PF.obj.listing.query_string.page=$(PF.obj.listing.selectors.content_listing_visible).data("page"),PF.obj.listing.query_string.page++,PF.fn.listing.ajax(),t.preventDefault()))}),$(PF.obj.listing.selectors.list_item).length>0&&(PF.fn.listing.show(),$(window).scroll(function(){var t=$(PF.obj.listing.selectors.content_listing_load_more,PF.obj.listing.selectors.content_listing_visible).find("button[data-action=load-more]"),e=$(document).height()-$(window).height()-1.5*document.documentElement.clientHeight;t.length>0&&$(window).scrollTop()>e&&0==PF.obj.listing.calling&&t.click()})),$(document).on("click",PF.obj.modal.selectors.root+" [data-switch]",function(){var t=$(this).closest(PF.obj.modal.selectors.root);$("[data-view=switchable]",t).hide(),$("#"+$(this).attr("data-switch"),t).show()}),$(document).on("click","[data-toggle]",function(){var t=$("[data-content="+$(this).data("toggle")+"]"),e=!t.is(":visible");$(this).html($(this).data("html-"+(e?"on":"off"))),t.toggle()}),$(document).on("click","[data-action=cookie-law-close]",function(){var t=$(this).closest("#cookie-law-banner"),e=void 0!==t.data("cookie")?t.data("cookie"):"PF_COOKIE_LAW_DISPLAY";Cookies.set(e,0,{expires:365}),t.remove()}),Clipboard=new Clipboard("[data-action=copy]",{text:function(t){var e=$(t.getAttribute("data-action-target")),n=e.is(":input")?e.val():e.text();return n.trim()}}),Clipboard.on("success",function(t){var e=$(t.trigger.getAttribute("data-action-target"));e.highlight(),t.clearSelection()})});var PF={fn:{},str:{},obj:{}};PF.obj.config={base_url:"",json_api:"/json/",listing:{items_per_page:24},animation:{easingFn:"ease",normal:400,fast:250}},PF.obj.l10n={},PF.fn._s=function(t,e){return void 0===t?t:(void 0!==PF.obj.l10n&&void 0!==PF.obj.l10n[t]?(t=PF.obj.l10n[t][0],void 0===t&&(t=t)):t=t,t=t.toString(),void 0!==e&&(t=sprintf(t,e)),t)},PF.fn._n=function(t,e,n){var i;return i=void 0!==PF.obj.l10n&&void 0!==PF.obj.l10n[t]?PF.obj.l10n[t][1==n?0:1]:1==n?t:e,i=void 0===i?t:i.toString(),void 0!==n&&(i=sprintf(i,n)),i},PF.fn.extend_lang=function(t){$.each(PF.obj.lang_strings,function(e,n){void 0!==t[e]&&$.extend(PF.obj.lang_strings[e],t[e])})},PF.fn.get_url_vars=function(){for(var t,e=/\+/g,n=/([^&=]+)=?([^&]*)/g,i=function(t){return decodeURIComponent(escape(t.replace(e," ")))},o=window.location.search.substring(1),r={};t=n.exec(o);)r[i(t[1])]=i(t[2]);return r},PF.fn.get_url_var=function(t){return PF.fn.get_url_vars()[t]},PF.fn.is_user_logged=function(){return $("#top-bar-user").exists()},PF.fn.generate_random_string=function(t){void 0===t&&(t=5);for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*n.length));return e},PF.fn.getDateTime=function(){var t=new Date,e=t.getFullYear(),n=t.getMonth()+1,i=t.getDate(),o=t.getHours(),r=t.getMinutes(),a=t.getSeconds();if(1==n.toString().length)n="0"+n;if(1==i.toString().length)i="0"+i;if(1==o.toString().length)o="0"+o;if(1==r.toString().length)r="0"+r;if(1==a.toString().length)a="0"+a;var s=e+"-"+n+"-"+i+" "+o+":"+r+":"+a;return s},PF.fn.htmlEncode=function(t){return $("<div/>").text($.trim(t)).html()},PF.fn.htmlDecode=function(t){return $("<div/>").html($.trim(t)).text()},PF.fn.nl2br=function(t){var e="<br>";return(t+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+e+"$2")},PF.fn.versionCompare=function(t,e,n){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var i=0,o=0,r=0,a={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(t){return t=(""+t).replace(/[_\-+]/g,"."),t=t.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),t.length?t.split("."):[-8]};for(numVersion=function(t){return t?isNaN(t)?a[t]||-7:parseInt(t,10):0},t=s(t),e=s(e),o=Math.max(t.length,e.length),i=0;i<o;i++)if(t[i]!=e[i]){if(t[i]=numVersion(t[i]),e[i]=numVersion(e[i]),t[i]<e[i]){r=-1;break}if(t[i]>e[i]){r=1;break}}if(!n)return r;switch(n){case">":case"gt":return r>0;case">=":case"ge":return r>=0;case"<=":case"le":return r<=0;case"==":case"=":case"eq":return 0===r;case"<>":case"!=":case"ne":return 0!==r;case"":case"<":case"lt":return r<0;default:return null}},PF.fn.baseName=function(t){var e=new String(t).substring(t.lastIndexOf("/")+1);return-1!=e.lastIndexOf(".")&&(e=e.substring(0,e.lastIndexOf("."))),e},PF.fn.guid=function(){var t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)})},PF.fn.md5=function(t){return SparkMD5.hash(t)},PF.fn.dataURItoBlob=function(t){var e;e=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):unescape(t.split(",")[1]);for(var n=t.split(",")[0].split(":")[1].split(";")[0],i=new Uint8Array(e.length),o=0;o<e.length;o++)i[o]=e.charCodeAt(o);return new Blob([i],{type:n})},PF.fn.clean_facebook_hash=function(){"#_=_"==window.location.hash&&(window.location.hash="")},PF.fn.clean_facebook_hash(),Array.min=function(t){return Math.min.apply(Math,t)},Array.max=function(t){return Math.max.apply(Math,t)},Array.sum=function(t){return t.reduce(function(t,e){return e+t})},Object.size=function(t){var e,n=0;for(e in t)t.hasOwnProperty(e)&&n++;return n},Object.flatten=function(t,e){if(void 0===e)e="";var n={};return $.each(t,function(t,i){i&&("object"==typeof i?n=$.extend({},n,Object.flatten(i,e+t+"_")):n[e+t]=i)}),n},String.prototype.isNumeric=function(){return!isNaN(parseFloat(this))&&isFinite(this)},String.prototype.repeat=function(t){return new Array(t+1).join(this)},String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.replaceAll=function(t,e){var n=this;return n.replace(new RegExp(t,"g"),e)},String.prototype.isEmail=function(){var t=/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return t.test(this)},String.prototype.getRounded=function(t,e){var n,i,o,r;if(t|=0,n=Math.pow(10,t),value=this,value*=n,r=value>0|-(value<0),o=value%1==.5*r,i=Math.floor(value),o)switch(e){case"PHP_ROUND_HALF_DOWN":value=i+(r<0);break;case"PHP_ROUND_HALF_EVEN":value=i+i%2*r;break;case"PHP_ROUND_HALF_ODD":value=i+!(i%2);break;default:value=i+(r>0)}return(o?value:Math.round(value))/n},String.prototype.getBytes=function(){var t=["KB","MB","GB","TB","PB","EB","ZB","YB"],e=this.toUpperCase().substr(-2);if(-1==t.indexOf(e))return this;var n=t.indexOf(e)+1;return parseFloat(this)*Math.pow(1e3,n)},String.prototype.formatBytes=function(t){var e=parseInt(this),n=["KB","MB","GB","TB","PB","EB","ZB","YB"];if(!$.isNumeric(this))return!1;if(e<1e3)return e+" B";if(void 0===t)t=2;for(var i=0;i<n.length;i++){var o=Math.pow(1e3,i+1),r=1e3*o;if(e<r){var a=e/o;return this.getRounded.call(a,t)+" "+n[i]}}},String.prototype.match_image_urls=function(){return this.match(/\b(?:(http[s]?|ftp[s]):\/\/)?([^:\/\s]+)(:[0-9]+)?((?:\/\w+)*\/)([\w\-\.]+[^#?\s]+)([^#\s]*)?(#[\w\-]+)?\.(?:jpe?g|gif|png|bmp|webp)\b/gim)},String.prototype.match_urls=function(){return this.match(/\b(?:(http[s]?|ftp[s]):\/\/)?([^:\/\s]+)(:[0-9]+)?((?:\/\w+)*\/)([\w\-\.]+[^#?\s]+)([^#\s]*)?(#[\w\-]+)?\b/gim)},"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){void 0===e&&(e=0),e<0&&(e+=this.length),e<0&&(e=0);for(var n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1}),Array.prototype.array_unique=function(){var t=[];return $.each(this,function(e,n){-1==$.inArray(n,t)&&t.push(n)}),t},PF.fn.deparam=function(t){if(void 0!==t&&t){t=t.substring(t.indexOf("?")+1);for(var e={},n=t.replace(/^[\?|&]*/,"").replace(/[&|\?]*$/,"").split("&"),i=0;i<n.length;i++){var o=n[i].split("="),r=decodeURIComponent(o[0]),a=o[1]?decodeURIComponent(o[1]):null;e.hasOwnProperty(r)&&!a||(e[r]=a)}return e}},String.prototype.removeURLParameter=function(t){var e=PF.fn.deparam(this);return void 0!==e[t]&&delete e[t],decodeURIComponent($.param(e))},String.prototype.changeURLParameterValue=function(t,e){var n=this.substring(0,this.indexOf("?")),i=PF.fn.deparam(this);return void 0!==i[t]&&(i[t]=e),n+"?"+decodeURIComponent($.param(i))},String.prototype.truncate_middle=function(t){function e(t,e,n){for(var i=[" ","/","&"],o=.8*e,r=(n=void 0!==n&&n,t=n?t.split("").reverse().join(""):t,""),a=0;a<e-1&&(r+=t[a],!(a>=o&&i.indexOf(t[a])>=0));a++);return n?r.split("").reverse().join(""):r}t=void 0!==t?t:40;var n=t/2,i=this.replace(/https?:\/\//g,"");return i.length<=t?i:e(i,n,!1)+"..."+e(i,n,!0)},jQuery.extend({compare:function(t,e){var n="[object Object]",i="[object Array]",o=Object.prototype.toString.apply(t),r=Object.prototype.toString.apply(e);return o===r&&(o===n?$.compareObject(t,e):o===i?$.compareArray(t,e):t===e)},compareArray:function(t,e){var n,i,o,r,a;if(t===e)return!0;if(t.length!=e.length)return!1;for(n=jQuery.extend(!0,[],t),i=jQuery.extend(!0,[],e),n.sort(),i.sort(),o=0,l=n.length;o<l;o+=1){if(r=Object.prototype.toString.apply(n[o]),a=Object.prototype.toString.apply(i[o]),r!==a)return!1;if(!1===$.compare(n[o],i[o]))return!1}return!0},compareObject:function(t,e){var n,i,o;if(t===e)return!0;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t){if(t.hasOwnProperty(n)){if(void 0===e[n])return!1;if(i=Object.prototype.toString.apply(t[n]),o=Object.prototype.toString.apply(e[n]),i!==o)return!1}if(!1===$.compare(t[n],e[n]))return!1}return!0}}),jQuery.fn.exists=function(){return this.length>0},jQuery.fn.replace_svg=function(){this.attr("src")&&$(this).each(function(){
|
|
$(this).attr("src",$(this).attr("src").replace(".svg",".png"))})},jQuery.fn.is_fluid=function(){return!0},jQuery.fn.bindFormData=function(){return $(":input",this).each(function(){var t=PF.fn.htmlEncode($(this).val());if($(this).is("input")&&(this.setAttribute("value",this.value),this.checked?this.setAttribute("checked","checked"):this.removeAttribute("checked")),$(this).is("textarea")&&$(this).html(t),$(this).is("select")){var e=this.selectedIndex,n=0;$(this).children("option").each(function(){n++!=e?this.removeAttribute("selected"):this.setAttribute("selected","selected")})}}),this},jQuery.fn.formValues=function(t){var e=$(":input",this);return"object"!=typeof t?(t={},$.each(e,function(){this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/color|date|datetime|datetime-local|email|month|range|search|tel|time|url|week|text|number|hidden|password/i.test(this.type))&&(this.name.match(/^.*\[\]$/)&&this.checked?(void 0===t[this.name]&&(t[this.name]=[]),t[this.name].push($(this).val())):t[this.name]=$(this).val())}),t):($.each(e,function(){this.name.match(/^.*\[\]$/)&&"object"==typeof t[this.name]?$(this).prop("checked",-1!==t[this.name].indexOf($(this).val())):this.name&&t[this.name]?/checkbox|radio/i.test(this.type)?$(this).prop("checked",t[this.name]==$(this).val()):$(this).val(t[this.name]):/checkbox|radio/i.test(this.type)&&$(this).removeProp("checked")}),$(this))},jQuery.fn.storeformData=function(t){return void 0===t&&void 0!==$(this).attr("id")&&(t=$(this).attr("id")),void 0!==t&&$(this).data(t,$(this).formValues()),this},jQuery.fn.is_sameformData=function(t){var e=$(this);return void 0===t&&(t=e.attr("id")),jQuery.compare(e.formValues(),e.data(t))},jQuery.Event.prototype.keydown_numeric=function(){var t=this;if(t.shiftKey)return t.preventDefault(),!1;var e=t.charCode||t.keyCode,n=t.target;""==$(n).val()||parseInt($(n).val());return 13==e||(46==e||8==e||9==e||27==e||65==e&&!0===t.ctrlKey||e>=35&&e<=40||void((e<48||e>57)&&(e<96||e>105)&&t.preventDefault()))},PF.fn.is_canvas_supported=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},PF.fn.is_validity_supported=function(){var t=document.createElement("input");return"object"==typeof t.validity},PF.fn.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;return n==i&&(i=e.clientWidth),document.body.removeChild(e),n-i},PF.str.ScrollBarWidth=PF.fn.getScrollBarWidth(),PF.fn.top_notifications_viewed=function(){var t=$("[data-action=top-bar-notifications]"),e=($(".top-bar-notifications-list",t),$(".top-btn-number",t));$(".persistent",t).exists()?e.text($(".persistent",t).length).addClass("on"):e.removeClass("on")},PF.fn.bindtipTip=function(t,e){void 0===t&&(t=$("body")),t instanceof jQuery==0&&(t=$(t));var n={delay:0,content:!1,fadeIn:0};void 0!==e&&(void 0!==e.delay&&(n.delay=e.delay),void 0!==e.content&&(n.content=e.content),void 0!==e.content&&(n.fadeIn=e.fadeIn)),"tooltip"!==t.attr("rel")&&(t=$("[rel=tooltip]",t)),t.each(function(){if((void 0!==$(this).attr("href")||void 0!==$(this).data("href"))&&PF.fn.isDevice(["phone","phablet","tablet"]))return!0;var t=void 0===$(this).data("tiptip")?"bottom":$(this).data("tiptip");PF.fn.isDevice(["phone","phablet"])&&(t="top"),$(this).tipTip({delay:n.delay,defaultPosition:t,content:n.content,fadeIn:n.fadeIn,fadeOut:0})})},PF.fn.form_modal_has_changed=function(){if(!$(PF.obj.modal.selectors.root).is(":hidden")&&void 0!==$("html").data("modal-form-values")){var t=$("html").data("modal-form-values"),e=PF.fn.deparam($(":input:visible",PF.obj.modal.selectors.root).serialize()),n=!1,i=$.extend({},t,e);for(var o in i)if(t[o]!==e[o]){n=!0;break}return n}},PF.fn.is_listing=function(){return $(PF.obj.listing.selectors.content_listing).exists()},PF.fn.is_tabs=function(){return $(".content-tabs").exists()},jQuery.fn.shake=function(t){return this.each(function(t){var e=$(this);e.addClass("animate shake").promise().done(function(){setTimeout(function(){e.removeClass("shake")},820)})}),"function"==typeof t&&t(),this},jQuery.fn.highlight=function(t){if(this.is(":animated")||!this.exists())return this;void 0===t&&(t="yellow");var e=t;switch(t){case"yellow":e="#FFFBA2";break;case"red":e="#FF7F7F";break;default:e=t}var n=$(this).css("background-color");$(this).css("background");return $(this).css({background:"",backgroundColor:e}).animate({backgroundColor:n},800,function(){$(this).css("background","")}),this},jQuery.fn.pf_slideDown=function(t,e){var n,i,o,r="normal",a=$(this).length;return"function"==typeof t&&(e=t,t=r),void 0===t&&(t=r),$(this).each(function(r){var s=parseInt($(this).css("top")),l=s>0?s:0;0==t?(n={display:"block",opacity:0},i={opacity:1},o=jQuery.speed("fast").duration):(n={top:-$(this).outerHeight(!0),opacity:1,display:"block"},i={top:l},o=jQuery.speed(t).duration),$(this).data("originalTop",$(this).css("top")),$(this).css(n).animate(i,o,function(){r==a-1&&"function"==typeof e&&e()})}),this},jQuery.fn.pf_slideUp=function(t,e){var n="normal",i=$(this).length;return"function"==typeof t&&(e=t,t=n),void 0===t&&(t=n),$(this).each(function(n){$(this).animate({top:-$(this).outerHeight(!0)},jQuery.speed(t).duration,function(){$(this).css({display:"none",top:$(this).data("originalTop")}),n==i-1&&"function"==typeof e&&e()})}),this},jQuery.fn.is_in_viewport=function(){var t=$(this)[0].getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},jQuery.fn.is_within_viewport=function(t){var e=$(this)[0].getBoundingClientRect();return void 0===t&&(t=0),e.top>=0&&e.left>=0&&e.top+t<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},jQuery.fn.getWindowCutoff=function(){var t={top:$(this).offset().top,left:$(this).offset().left,width:$(this).outerWidth(),height:$(this).outerHeight()};t.right=t.left+t.width,t.bottom=t.top+t.height;var e=!1,n={top:t.top>0?0:t.top,right:document.body.clientWidth-t.right,bottom:document.body.clientHeight-t.bottom,left:t.left>0?0:t.left};for(var i in n)n[i]<0?e=!0:n[i]=0;return e?n:null},PF.fn.scroll=function(t,e){if("function"==typeof t)e=t,t="";var n=parseInt($("body").css("margin-top"));0==n&&$(".top-bar-placeholder").exists()&&(n=$(".top-bar-placeholder").height()),$(t).exists()||(t="html"),$("body,html").animate({scrollTop:$(t).offset().top-n},"normal",function(){"function"==typeof e&&e()})},PF.fn.close_pops=function(t){$(".pop-box:visible").each(function(){$(this).closest(".pop-btn").click()})},PF.fn.growl={selectors:{root:"#growl"},str:{timeout:null,timeoutcall:!1},call:function(t){if(void 0!==t&&("string"==typeof t&&(t={message:t}),void 0!==t.message)){var e,n,i,o;for(key in e={message:t.message,insertTo:"body",where:"before",color:"default",css:{},classes:"",expires:0,callback:function(){}},e)void 0!==t[key]&&(key.match("/^(callback)$/")?"function"==typeof t[key]&&(e[key]=t[key]):e[key]=t[key]);if($(e.insertTo).exists()||(e.insertTo="body"),$(PF.fn.growl.selectors.root).exists()){if($(PF.fn.growl.selectors.root).text()==e.message)return void $(PF.fn.growl.selectors.root).shake();$(PF.fn.growl.selectors.root).remove()}switch(n=$('<div id="'+PF.fn.growl.selectors.root.replace("#","")+'" class="growl animated">'+e.message+'<span class="icon fas fa-times" data-action="close"></span></div>').css(e.css).addClass(e.classes),i="body"!==e.insertTo?"static":"",e.color){case"dark":o="dark";break;default:o=""}n.addClass(i+" "+o),"before"==e.where?$(e.insertTo).prepend(n.hide()):$(e.insertTo).append(n.hide()),$(".fullscreen").is(":visible")&&n.css({"z-index":parseInt($(".fullscreen").css("z-index"))+1}),n.pf_slideDown("static"==i?0:200,function(){"function"==typeof e.callback&&e.callback()}),$(document).on("click",".growl",function(t){(PF.fn.isDevice(["phone","phablet"])||$(t.target).is("[data-action=close]"))&&PF.fn.growl.close(!0)}),e.expires>0&&("number"==typeof this.str.timeout&&clearTimeout(this.str.timeout),this.str.timeout=setTimeout(function(){PF.fn.growl.str.timeoutcall=!0,PF.fn.growl.close()},e.expires))}},expirable:function(t,e){void 0!==t&&(void 0===e&&(e=5e3),PF.fn.growl.call({message:t,expires:e}))},close:function(t,e){var n=$(PF.fn.growl.selectors.root);t&&(this.str.timeout=null,this.str.timeoutcall=!1,clearTimeout(this.str.timeout)),n.exists()&&("number"!=typeof this.str.timeout||this.str.timeoutcall)&&n.fadeOut("fast",function(){$(this).remove(),"function"==typeof e&&e()})}},PF.obj.modal={type:"",selectors:{root:"#fullscreen-modal",box:"#fullscreen-modal-box",body:"#fullscreen-modal-body",login:"[data-modal=login]",changes_confirm:"#fullscreen-changes-confirm",btn_container:".btn-container",close_buttons:".close-modal,.cancel-modal,[data-action=cancel],[data-action-close]",submit_button:"[data-action=submit]",growl_placeholder:"#fullscreen-growl-placeholder"},ajax:{url:"",deferred:{}},locked:!1,form_data:{},XHR:{},prevented:!1},PF.obj.modal.$close_buttons=$(PF.obj.modal.selectors.close_buttons,PF.obj.modal.selectors.root),PF.obj.modal.$submit_button=$(PF.obj.modal.selectors.submit_button,PF.obj.modal.selectors.root),PF.fn.modal={str:{transition:"all "+PF.obj.config.animation.fast+"ms ease"},call:function(t){var e,n;if(void 0!==t&&(void 0!==t.template&&void 0===t.type&&(t.type="html"),void 0!==t.title&&void 0!==t.message||"login"===t.type||"html"===t.type)){for(key in PF.fn.growl.close(),e={forced:!1,type:"confirm",title:t.title,message:t.message,html:!1,template:t.template,buttons:!0,button_submit:PF.fn._s("Submit"),txt_or:PF.fn._s("or"),button_cancel:PF.fn._s("cancel"),ajax:{url:null,data:null,deferred:{}},confirm:function(){},cancel:function(){PF.fn.modal.close()},load:function(){},callback:function(){}},e)void 0!==t[key]&&(/^cancel|confirm|callback$/.test(key)?"function"==typeof t[key]&&(e[key]=t[key]):e[key]=t[key]);void 0!==t.ajax&&!t.ajax.url&&t.ajax.deferred&&(e.ajax.url=PF.obj.config.json_api),"login"==e.type&&(e.buttons=!1),"confirm"==e.type&&(e.button_submit=PF.fn._s("Confirm"));var i,o="black",r=['<div id="',PF.obj.modal.selectors.root.replace("#",""),'"class="fullscreen '+o+'"><div id="',PF.obj.modal.selectors.box.replace("#",""),'"class="clickable"><div id="',PF.obj.modal.selectors.body.replace("#",""),'">%MODAL_BODY%</div>%MODAL_BUTTONS%<span class="close-modal icon--close fas fa-times" data-action="close-modal"></span></div></div>'].join(""),a=e.buttons?['<div class="',PF.obj.modal.selectors.btn_container.replace(".",""),'"><button class="btn btn-input default" data-action="submit" type="submit">',e.button_submit,"</button></div>"].join(""):"";switch("login"==e.type&&(e.template=void 0===e.template?$(PF.obj.modal.selectors.login).html():e.template),e.type){case"html":case"login":i=e.template;break;case"confirm":default:n=e.message,e.html||(n="<p>"+n+"</p>"),i="<h1>"+e.title+"</h1>"+n}if(void 0!==i){if(r=r.replace("%MODAL_BODY%",i).replace("%MODAL_BUTTONS%",a).replace(/template-tooltip/g,"tooltip"),$(PF.obj.modal.selectors.root).remove(),$("body").data("hasOverflowHidden",$("body").hasClass("overflow-hidden")&&!$("body").hasClass("pop-box-show")),$("body").prepend(r).addClass("overflow-hidden"),this.fixScrollbars(),$("[rel=tooltip]",PF.obj.modal.selectors.root).each(function(){PF.fn.bindtipTip(this,{content:$(this).data("title")})}),$(":button, input[type=submit], input[type=reset]",PF.obj.modal.selectors.root).length>0){var s=$("form",PF.obj.modal.selectors.root);s.exists()?(s.append($($(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root).html()).wrapInner(PF.obj.modal.selectors.btn_container.replace(".",""))),$(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root).each(function(){$(this).closest("form").exists()||$(this).remove()})):$(PF.obj.modal.selectors.box,PF.obj.modal.selectors.root).wrapInner("<form />")}e.callback(),$(PF.obj.modal.selectors.box).css({transform:"scale(0.7)",opacity:0,transition:PF.fn.modal.str.transition}),$(PF.obj.modal.selectors.root).addClass("--show"),setTimeout(function(){$(PF.obj.modal.selectors.root).css({opacity:1}),$(PF.obj.modal.selectors.box).css({transform:"scale(1)",opacity:1}),"undefined"!=typeof PFrecaptchaCallback&&PFrecaptchaCallback(),setTimeout(function(){$("html").data("modal-form-values",PF.fn.deparam($(":input:visible",PF.obj.modal.selectors.root).serialize())),"function"==typeof e.load&&e.load()},PF.obj.config.animation.fast)},1),$(PF.obj.modal.selectors.root).click(function(n){var i=$(n.target),o=this;if(!PF.obj.modal.locked)if(i.closest(PF.obj.modal.selectors.changes_confirm).exists()&&(i.is(PF.obj.modal.selectors.close_buttons)||i.is(PF.obj.modal.selectors.submit_button)))$(PF.obj.modal.selectors.changes_confirm).remove(),i.is(PF.obj.modal.selectors.close_buttons)?$(PF.obj.modal.selectors.box,o).fadeIn("fast",function(){$(this).css("transition",PF.fn.modal.str.transition)}):PF.fn.modal.close();else if(i.closest(".clickable").exists()&&!i.is(PF.obj.modal.selectors.close_buttons)||(PF.fn.growl.close(),e.cancel()),i.is(PF.obj.modal.selectors.submit_button)){if(!1===e.confirm())return;var r=!0;if($("input, textarea, select",PF.obj.modal.selectors.root).not(":input[type=button], :input[type=submit], :input[type=reset]").length>0&&!PF.fn.form_modal_has_changed()&&!e.forced&&(r=!1),r)if(e.ajax.url){var a,s=$(PF.obj.modal.selectors.btn_container,PF.obj.modal.selectors.root);switch(PF.obj.modal.locked=!0,s.first().clone().height(s.height()).html("").addClass("loading").appendTo(PF.obj.modal.selectors.root+" form"),s.hide(),PF.obj.modal.$close_buttons.hide(),PF.obj.modal.type){case"edit":a=PF.fn._s("Saving");break;case"confirm":case"form":default:a=PF.fn._s("Sending")}PF.fn.loading.inline($(PF.obj.modal.selectors.btn_container+".loading",PF.obj.modal.selectors.root),{size:"small",message:a,valign:"center"}),$(PF.obj.modal.selectors.root).disableForm(),(!$.isEmptyObject(PF.obj.modal.form_data)||void 0!==t.ajax&&void 0===t.ajax.data)&&(e.ajax.data=PF.obj.modal.form_data),PF.obj.modal.XHR=$.ajax({url:e.ajax.url,type:"POST",data:e.ajax.data}).complete(function(t){if(PF.obj.modal.locked=!1,200==t.status){var n=void 0!==e.ajax.deferred&&void 0!==e.ajax.deferred.success?e.ajax.deferred.success:null;"function"==typeof n?PF.fn.modal.close(function(){"function"==typeof n&&n(t)}):"object"==typeof n&&("function"==typeof n.before&&n.before(t),"function"==typeof n.done&&n.done(t))}else if($(PF.obj.modal.selectors.root).enableForm(),$(PF.obj.modal.selectors.btn_container+".loading",PF.obj.modal.selectors.root).remove(),s.css("display",""),void 0!==e.ajax.deferred&&"function"==typeof e.ajax.deferred.error)e.ajax.deferred.error(t);else{var i=PF.fn._s("An error occurred. Please try again later.");t.responseJSON.error.message&&(i=t.responseJSON.error.message),PF.fn.growl.call(i)}})}else PF.fn.modal.close(e.callback())}})}else console.log("PF Error: Modal content is empty")}},confirm:function(t){t.type="confirm",void 0===t.title&&(t.title=PF.fn._s("Confirm action")),PF.fn.modal.call(t)},simple:function(t){"string"==typeof t&&(t={message:t}),void 0===t.buttons&&(t.buttons=!1),void 0===t.title&&(t.title=PF.fn._s("information")),PF.fn.modal.call(t)},fixScrollbars:function(){if($(PF.obj.modal.selectors.root).exists()){var t={padding:$(".fixed, .position-fixed"),margin:$("html")},e={};PF.str.ScrollBarWidth>0&&$("html").hasScrollBar().vertical&&!$("body").data("hasOverflowHidden")?(e.padding=PF.str.ScrollBarWidth+"px",e.margin=PF.str.ScrollBarWidth+"px"):(e.padding="",e.margin=""),t.padding.css({paddingRight:e.padding}),t.margin.css({marginRight:e.margin})}},close:function(t){$(PF.obj.modal.selectors.root).exists()&&(PF.fn.growl.close(!0),$("[rel=tooltip]",PF.obj.modal.selectors.root).tipTip("hide"),$(PF.obj.modal.selectors.box).css({transform:"scale(0.5)",opacity:0}),$(PF.obj.modal.selectors.root).css({opacity:0}),setTimeout(function(){PF.str.ScrollBarWidth>0&&$("html").hasScrollBar().vertical&&$(".fixed, .position-fixed").css({paddingRight:""}),$("html").css({marginRight:""}),$("body").data("hasOverflowHidden")||$("body").removeClass("overflow-hidden"),$("body").removeData("hasOverflowHidden"),$(PF.obj.modal.selectors.root).remove(),"function"==typeof t&&t()},PF.obj.config.animation.normal))}},PF.fn.popup=function(t){var e={height:t.height||500,width:t.width||650,scrollTo:0,resizable:0,scrollbars:0,location:0};e.top=screen.height/2-e.height/2,e.left=screen.width/2-e.width/2;var n="";for(var i in e)n+=i+"="+e[i]+",";n=n.slice(0,-1),window.open(t.href,"Popup",n)},PF.fn.list_fluid_width=function(){if($("body").is_fluid()){var t=$(PF.obj.listing.selectors.content_listing_visible),e=$(PF.obj.listing.selectors.pad_content,t),n=$(PF.obj.listing.selectors.list_item,t),i=n.outerWidth(!0),o=n.outerWidth(!0)-n.width();PF.obj.listing.content_listing_ratio=parseInt((t.width()+o)/i),n.length<PF.obj.listing.content_listing_ratio&&e.css("width","100%")}},PF.obj.tabs={hashdata:{}},PF.fn.show_tab=function(t){if(void 0!==t){var e=$("a[data-tab="+t+"]",".content-tabs");$("li",e.closest("ul")).removeClass("current"),e.closest("li").addClass("current");var n=$("#tabbed-content-group");if($target=$("#"+e.data("tab")),$(".tabbed-content",n).removeClass("visible").hide(),$($target,n).addClass("visible").show(),$("[data-content=list-selection]").addClass("hidden"),$("[data-content=list-selection][data-tab="+e.data("tab")+"]").removeClass("hidden"),n.exists()){var i=$(PF.obj.listing.selectors.list_item+":not(.jsly)",$target),o=!$target.hasClass("jsly");"ajax"!=$target.data("load")||"true"===$target.data("empty")||$(PF.obj.listing.selectors.list_item,$target).exists()?(PF.fn.listing.queryString.stock_current(),PF.fn.listing.columnizer(!1,0,!1),i[o?"fadeIn":"show"]()):(PF.fn.listing.queryString.stock_load(),$target.html(PF.obj.listing.template.fill),PF.fn.loading.inline($(PF.obj.listing.selectors.content_listing_loading,$target)),PF.fn.listing.queryString.stock_new(),PF.fn.listing.ajax())}PF.fn.listing.columnizerQueue(),1==$(PF.obj.listing.selectors.content_listing_visible).data("queued")&&PF.fn.listing.columnizer(!0,0)}},PF.obj.listing={columns:"",columns_number:1,current_column:"",current_column:"",XHR:{},query_string:PF.fn.get_url_vars(),calling:!1,content_listing_ratio:1,selectors:{sort:".sort-listing .current [data-sort]",content_listing:".content-listing",content_listing_visible:".content-listing:visible",content_listing_loading:".content-listing-loading",content_listing_load_more:".content-listing-more",content_listing_pagination:".content-listing-pagination",empty_icon:".icon.fas.fa-inbox",pad_content:".pad-content-listing",list_item:".list-item"},template:{fill:$("[data-template=content-listing]").html(),empty:$("[data-template=content-listing-empty]").html(),loading:$("[data-template=content-listing-loading]").html()}},PF.fn.listing={},PF.fn.listing.show=function(t,e){$content_listing=$("#content-listing-tabs").exists()?$(PF.obj.listing.selectors.content_listing_visible,"#content-listing-tabs"):$(PF.obj.listing.selectors.content_listing),PF.fn.loading.inline(PF.obj.listing.selectors.content_listing_loading),$content_listing.imagesLoaded(function(n){$(PF.obj.listing.selectors.list_item+":visible",$content_listing);var i=$(PF.obj.listing.selectors.list_item,$content_listing);(void 0!==t&&$(t.html).length<PF.obj.config.listing.items_per_page||$(PF.obj.listing.selectors.list_item,$content_listing).length<PF.obj.config.listing.items_per_page)&&PF.fn.listing.removeLoader($content_listing),!$(PF.obj.listing.selectors.content_listing_pagination,$content_listing).is("[data-type=classic]")&&$("[data-action=load-more]",$content_listing).exists()||$(PF.obj.listing.selectors.content_listing_loading,$content_listing).remove(),PF.fn.listing.columnizer(!1,0),i.show(),PF.fn.listing.columnizer(!0,0),i.addClass("--show"),PF.obj.listing.calling=!1;var o=$(PF.obj.listing.selectors.content_listing_loading,$content_listing).exists()&&$(PF.obj.listing.selectors.content_listing_loading,$content_listing).is_in_viewport();void 0===PF.obj.listing.show_load_more&&(PF.obj.listing.show_load_more=o),$(PF.obj.listing.selectors.content_listing_loading,$content_listing)[(o?"add":"remove")+"Class"]("visibility-hidden"),$(PF.obj.listing.selectors.content_listing_load_more,$content_listing)[PF.obj.listing.show_load_more?"show":"hide"](),PF.obj.listing.lockClickMore&&(PF.obj.listing.lockClickMore=!1),"function"==typeof e&&e()})},PF.fn.listing.removeLoader=function(t){var e=[PF.obj.listing.selectors.content_listing_load_more,PF.obj.listing.selectors.content_listing_loading];$(PF.obj.listing.selectors.content_listing_pagination,$content_listing).is("[data-type=endless]")&&e.push(PF.obj.listing.selectors.content_listing_pagination),$.each(e,function(e,n){$(n,t).remove()})},PF.fn.listing.queryString={stock_load:function(){var t=$(PF.obj.listing.selectors.content_listing_visible),e=PF.fn.deparam(t.data("params"));for(var n in PF.obj.listing.params_hidden=void 0!==t.data("params-hidden")?PF.fn.deparam(t.data("params-hidden")):null,void 0===PF.obj.listing.query_string.action&&(PF.obj.listing.query_string.action=t.data("action")||"list"),void 0===PF.obj.listing.query_string.list&&(PF.obj.listing.query_string.list=t.data("list")),void 0===PF.obj.listing.query_string.sort&&(void 0!==e&&void 0!==e.sort?PF.obj.listing.query_string.sort=e.sort:PF.obj.listing.query_string.sort=$(":visible"+PF.obj.listing.selectors.sort).data("sort")),void 0===PF.obj.listing.query_string.page&&(PF.obj.listing.query_string.page=1),t.data("page",PF.obj.listing.query_string.page),$(PF.obj.listing.selectors.content_listing+"[data-load=ajax]").each(function(){var t=$("[data-tab="+$(this).attr("id")+"]"+PF.obj.listing.selectors.sort),e=PF.fn.deparam($(this).data("params")),n=PF.fn.deparam($(this).data("params-hidden")),i={q:e&&e.q?e.q:null,list:$(this).data("list"),sort:t.exists()?t.data("sort"):e&&e.sort?e.sort:null,page:e&&e.page?e.page:1};for(var o in n&&n.list&&delete i.list,i)i[o]||delete i[o]}),e)0==/action|list|sort|page/.test(n)&&(PF.obj.listing.query_string[n]=e[n]);if(void 0!==PF.obj.listing.params_hidden){for(var n in PF.obj.listing.params_hidden)0==/action|list|sort|page/.test(n)&&(PF.obj.listing.query_string[n]=PF.obj.listing.params_hidden[n]);PF.obj.listing.query_string.params_hidden=PF.obj.listing.params_hidden,PF.obj.listing.params_hidden.params_hidden=null}},stock_new:function(){var t=$(PF.obj.listing.selectors.content_listing_visible),e=PF.fn.deparam(t.data("params"));t.data("offset")?PF.obj.listing.query_string.offset=t.data("offset"):delete PF.obj.listing.query_string.offset,PF.obj.listing.query_string.action=t.data("action")||"list",PF.obj.listing.query_string.list=t.data("list"),void 0!==e&&void 0!==e.sort?PF.obj.listing.query_string.sort=e.sort:PF.obj.listing.query_string.sort=$(":visible"+PF.obj.listing.selectors.sort).data("sort"),PF.obj.listing.query_string.page=1},stock_current:function(){this.stock_new(),PF.obj.listing.query_string.page=$(PF.obj.listing.selectors.content_listing_visible).data("page")}},PF.fn.listing.queryString.stock_load(),PF.fn.listing.ajax=function(){if(1!=PF.obj.listing.calling){PF.obj.listing.calling=!0;var t=$(PF.obj.listing.selectors.content_listing_visible),e=$(PF.obj.listing.selectors.pad_content,t),n=$(PF.obj.listing.selectors.content_listing_load_more,t);n.hide(),$(PF.obj.listing.selectors.content_listing_loading,t).removeClass("visibility-hidden").show(),PF.obj.listing.XHR=$.ajax({type:"POST",data:$.param($.extend({},PF.obj.listing.query_string,$.ajaxSettings.data))}).complete(function(i){var o=i.responseJSON,r=function(){$(PF.obj.listing.selectors.content_listing_loading+","+PF.obj.listing.selectors.content_listing_pagination+":not([data-visibility=visible])",t).remove()},a=function(){t.data("empty","true").html(PF.obj.listing.template.empty),$("[data-content=list-selection][data-tab="+t.attr("id")+"]").addClass("disabled")};if(4==i.readyState&&void 0!==o){if($("[data-content=list-selection][data-tab="+t.attr("id")+"]").removeClass("disabled"),200!==i.status){var s=void 0!==o.error&&void 0!==o.error.message?o.error.message:"Bad request";PF.fn.growl.call("Error: "+s),t.data("load","")}if(void 0!==o.html&&""!=o.html||0!=$(PF.obj.listing.selectors.list_item,t).length||a(),void 0===o.html||""==o.html)return r(),PF.obj.listing.calling=!1,void("function"==typeof PF.fn.listing_end&&PF.fn.listing_end());t.data({load:"",page:PF.obj.listing.query_string.page});var l=$.extend({},PF.obj.listing.query_string);for(var c in PF.obj.listing.params_hidden)void 0!==l[c]&&delete l[c];for(var c in delete l.action,l)l[c]||delete l[c];if(-1==document.URL.indexOf("?"+$.param(l))){var u=window.location.href;u=u.split("?")[0].replace(/\/$/,"")+"/?"+$.param(l),window.location.hash&&(u=u.replace(window.location.hash,"")),History.pushState({pushed:"pagination",scrollTop:$(window).scrollTop()},document.title,u)}$("a[data-tab="+t.attr("id")+"]").attr("href",document.URL),e.append(o.html),$("[data-action=load-more]",n).attr("data-seek",o.seekEnd),PF.fn.listing.show(o,function(){$(PF.obj.listing.selectors.content_listing_loading,t).addClass("visibility-hidden")})}else PF.obj.listing.calling=!1,t.data("load",""),r(),0==$(PF.obj.listing.selectors.list_item,t).length&&a(),0!==i.readyState&&PF.fn.growl.call(PF.fn._s("An error occurred. Please try again later."));"function"==typeof PF.fn.listing.ajax.callback&&PF.fn.listing.ajax.callback(i)})}},PF.fn.listing.columnizerQueue=function(){$(PF.obj.listing.selectors.content_listing+":hidden").data("queued",!0)},PF.fn.listing.refresh=function(t){PF.fn.listing.columnizer(!0,t,!1)};var width=$(window).width();PF.fn.listing.columnizer=function(t,e,n){var o={phone:1,phablet:3,tablet:4,laptop:5,desktop:6,largescreen:7};if("boolean"!=typeof t)t=!1;if(void 0===PF.obj.listing.mode&&(t=!0),"boolean"!=typeof n){n=!1;var r=!0}else r=!1;if(!n&&r&&(width!==$(window).width()||t)&&(n=!0),void 0===e)e=PF.obj.config.animation.normal;var a=$("#content-listing-tabs").exists()?$(PF.obj.listing.selectors.content_listing_visible,"#content-listing-tabs"):$(PF.obj.listing.selectors.content_listing),s=$(PF.obj.listing.selectors.pad_content,a),l="responsive",c=$(t||n?PF.obj.listing.selectors.list_item:PF.obj.listing.selectors.list_item+":not(.jsly)",a);if(a.addClass("jsly"),void 0!==PF.obj.config.listing.device_to_columns&&(o=$.extend({},o,PF.obj.config.listing.device_to_columns)),a.data("device-columns")&&(o=$.extend({},o,a.data("device-columns"))),PF.obj.listing.mode=l,PF.obj.listing.device=PF.fn.getDeviceName(),c.exists()){if(void 0===a.data("columns")||t||n){var u=c.first();for(u.css("width",""),PF.obj.listing.columns=new Array,PF.obj.listing.columns_number=o[PF.fn.getDeviceName()],i=0;i<PF.obj.listing.columns_number;i++)PF.obj.listing.columns[i+1]=0;PF.obj.listing.current_column=1}else PF.obj.listing.columns=a.data("columns"),PF.obj.listing.columns_number=a.data("columns").length-1,PF.obj.listing.current_column=a.data("current_column");a.removeClass("small-cols").addClass(PF.obj.listing.columns_number>6?"small-cols":""),s.css("width","100%");var d=0;c.each(function(t){$(this).addClass("jsly");var i=$(".list-item-image",this),o=$(".list-item-image img",this),r=$(".list-item-thumbs",this),s=o.hasClass("jsly-loaded");o.show(),n&&($(this).css({top:"",left:"",height:"",position:""}),i.css({maxHeight:"",height:""}),o.removeClass("jsly").css({width:"",height:""}).parent().css({marginLeft:"",marginTop:""}),$("li",r).css({width:"",height:""}));var l=1==PF.obj.listing.columns_number?"100%":parseInt(1/PF.obj.listing.columns_number*a.width()+"px");if($(this).css("width",l),PF.obj.listing.current_column>PF.obj.listing.columns_number&&(PF.obj.listing.current_column=1),$(this).attr("data-col",PF.obj.listing.current_column),!o.exists()){var u=!0;o=$(".image-container .empty",this)}var h=$(this).is(":visible");c.show();var f=i.hasClass("fixed-size"),p={w:parseInt(o.attr("width")),h:parseInt(o.attr("height"))};if(p.ratio=p.w/p.h,n&&PF.obj.listing.columns_number>1||(p.w,a.width()),u||i.css("min-height")&&!o.hasClass("jsly")){parseInt(i.css("height"));var g={w:$(this).width(),h:f?$(this).width():null},m=Math.min(p.w,p.w<g.w?p.w:g.w);if(f){i.css({height:g.w}),p.ratio<=3&&(p.ratio>1||1==p.ratio)?(p.h=Math.min(p.h,p.w<g.w?p.w:g.w),p.w=p.h*p.ratio):(p.w=m,p.h=p.w/p.ratio);parseInt(i.css("min-height"));i.css("min-height",0)}else p.w=m,p.ratio>=3||p.ratio<1||1==p.ratio?p.h=p.w/p.ratio:(p.h=Math.min(p.h,p.w),p.w=p.h*p.ratio),u&&(p.h=g.w),i.css({height:p.h});0==o.width()&&o.css({width:m,height:m/p.ratio}),$(".image-container",this).is(".list-item-avatar-cover")&&o.css(f?{width:"auto",height:"100%"}:{width:"100%",height:"auto"}),0!==o.height()&&(i.height(),o.height()),i.width(),o.width();var b=Math.max(2*o.position().left,0),v=Math.max(2*o.position().top,0),y=b/i.width(),w=v/i.height();(b>0||v>0)&&(y<=.25||w<=.25)&&i.addClass("--fit"),r.exists()&&$("li",r).css({width:100/$("li",r).length+"%"}).css({height:$("li",r).width()}),h||c.hide()}if(!o.hasClass("jsly")&&$(this).is(":hidden")&&$(this).css("top","100%"),PF.obj.listing.columns[PF.obj.listing.current_column]+=$(this).outerHeight(!0),1==PF.obj.listing.columns_number)$(this).removeClass("position-absolute");else{$(this).is(":animated")&&(e=0),$(this).addClass("position-absolute");var P=$(this).outerWidth(!0)*(PF.obj.listing.current_column-1),x=parseInt($(this).css("left"))!=P;x&&(animate_grid=!0,$(this).animate({left:P},e));var F=PF.obj.listing.columns[PF.obj.listing.current_column]-$(this).outerHeight(!0);parseInt($(this).css("top"))!=F&&(animate_grid=!0,$(this).animate({top:F},e),x&&(d=1))}if(h&&c.show(),s||o.addClass("jsly").hide().imagesLoaded(function(t){$(t.elements).show().addClass("jsly-loaded")}),f)PF.obj.listing.current_column++;else{for(var _,j,S,k=1;k<=PF.obj.listing.columns_number;k++){if(S=PF.obj.listing.columns[k],void 0===j&&(j=S,_=k),0==PF.obj.listing.columns[k]){_=k;break}S<j&&(j=PF.obj.listing.columns[k],_=k)}PF.obj.listing.current_column=_}}),a.data({columns:PF.obj.listing.columns,current_column:PF.obj.listing.current_column});var h=0;if($.each(PF.obj.listing.columns,function(t,e){e>h&&(h=e)}),PF.obj.listing.width=a.width(),void 0!==PF.obj.listing.height)var f=PF.obj.listing.height;PF.obj.listing.height=h;var p=void 0!==f&&f!==PF.obj.listing.height;p||(s.height(h),PF.fn.list_fluid_width()),p&&(s.height(f),setTimeout(function(){s.animate({height:h},e,function(){PF.fn.list_fluid_width()})},e*d)),a.data("list-mode",PF.obj.listing.mode),$(PF.obj.listing.selectors.content_listing_visible).data("queued",!1)}},PF.fn.loading={spin:{small:{lines:11,length:0,width:3,radius:7,speed:1,trail:45,blocksize:20},normal:{lines:11,length:0,width:5,radius:10,speed:1,trail:45,blocksize:30},big:{lines:11,length:0,width:7,radius:13,speed:1,trail:45,blocksize:40},huge:{lines:11,length:0,width:9,radius:16,speed:1,trail:45,blocksize:50}},inline:function(t,e){if(void 0!==t){if(t instanceof jQuery==0)t=$(t);var n={size:"normal",color:$("body").css("color"),center:!1,position:"absolute",shadow:!1,valign:"top"};if(void 0===e)e=n;else for(var i in n)void 0===e[i]&&(e[i]=n[i]);PF.fn.loading.spin[e.size];PF.fn.loading.spin[e.size].color=e.color,PF.fn.loading.spin[e.size].shadow=e.shadow,t.html('<span class="loading-indicator"></span>'+(void 0!==e.message?'<span class="loading-text">'+e.message+"</span>":"")).css({"line-height":PF.fn.loading.spin[e.size].blocksize+"px"}),$(".loading-indicator",t).css({width:PF.fn.loading.spin[e.size].blocksize,height:PF.fn.loading.spin[e.size].blocksize}).spin(PF.fn.loading.spin[e.size]),e.center&&$(".loading-indicator",t.css("textAlign","center")).css({position:e.position,top:"50%",
|
|
left:"50%",marginTop:-PF.fn.loading.spin[e.size].blocksize/2,marginLeft:-PF.fn.loading.spin[e.size].blocksize/2}),"center"==e.valign&&$(".loading-indicator,.loading-text",t).css("marginTop",(t.height()-PF.fn.loading.spin[e.size].blocksize)/2+"px"),$(".spinner",t).css({top:PF.fn.loading.spin[e.size].blocksize/2+"px",left:PF.fn.loading.spin[e.size].blocksize/2+"px"})}},fullscreen:function(){$("body").append('<div class="fullscreen" id="pf-fullscreen-loader"><div class="fullscreen-loader black-bkg"><span class="loading-txt">'+PF.fn._s("loading")+"</span></div></div>"),$(".fullscreen-loader","#pf-fullscreen-loader").spin(PF.fn.loading.spin.huge),$("#pf-fullscreen-loader").css("opacity",1)},destroy:function(t){var e=$("#pf-fullscreen-loader"),n=$("#pf-onscreen-loader");"fullscreen"==t&&(t=e),"onscreen"==t&&(t=n),void 0!==t?t.remove():(e.remove(),n.remove())}},jQuery.fn.disableForm=function(){return $(this).data("disabled",!0),$(":input",this).each(function(){$(this).attr("disabled",!0)}),this},jQuery.fn.enableForm=function(){return $(this).data("disabled",!1),$(":input",this).removeAttr("disabled"),this},PF.fn.isDevice=function(t){if("object"==typeof t)t="."+t.join(",.");else t="."+t;return $("html").is(t)},PF.fn.getDeviceName=function(){var t;return $.each(PF.obj.devices,function(e,n){if(PF.fn.isDevice(n))return t=n,!0}),t},PF.fn.topMenu={vars:{$button:$("[data-action=top-bar-menu-full]","#top-bar"),menu:"#menu-fullscreen",speed:PF.obj.config.animation.fast,menu_top:parseInt($("#top-bar").outerHeight())+parseInt($("#top-bar").css("top"))+parseInt($("#top-bar").css("margin-top"))+parseInt($("#top-bar").css("margin-bottom"))-parseInt($("#top-bar").css("border-bottom-width"))+"px"},show:function(t){if(!$("body").is(":animated")){if(void 0===t)t=this.vars.speed;this.vars.$button.addClass("current"),$("html").addClass("menu-fullscreen-visible"),$("#top-bar").append($("<div/>",{id:"menu-fullscreen",class:"touch-scroll",html:$("<div/>",{class:"fullscreen black"})}).css({borderTopWidth:this.vars.menu_top,left:"-100%"}).append($("<ul/>",{html:$(".top-bar-left").html()+$(".top-bar-right").html()})));var e=$(this.vars.menu);$("li.phone-hide, li > .top-btn-text, li > .top-btn-text > span, li > a > .top-btn-text > span",e).each(function(){$(this).removeClass("phone-hide")}),$("[data-action=top-bar-menu-full]",e).remove(),$(".btn.black, .btn.default, .btn.blue, .btn.green, .btn.orange, .btn.red, .btn.transparent",e).removeClass("btn black default blue green orange red transparent"),setTimeout(function(){e.css({transform:"translate(100%, 0)"}),$(".fullscreen").css("opacity",1)},1),setTimeout(function(){$("html").css({backgroundColor:""})},this.vars.speed)}},hide:function(t){if(!$("body").is(":animated")&&$(this.vars.menu).is(":visible")){if(void 0===t)t=this.vars.speed;$("#top-bar").css("position",""),this.vars.$button.removeClass("current"),$("html").removeClass("menu-fullscreen-visible");var e=$(this.vars.menu);e.css({transform:"none"}),setTimeout(function(){e.remove()},t)}}},function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{},i=n[t]=n[t]||[];return i[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=0,o=n[i];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var a=r&&r[o];a&&(this.off(t,o),delete r[o]),o.apply(this,e),i+=a?0:1,o=n[i]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function n(t,e){for(var n in e)t[n]=e[n];return t}function i(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=i(t),this.options=n({},this.options),"function"==typeof e?r=e:n(this.options,e),r&&this.on("always",r),this.getImages(),s&&(this.jqDeferred=new s.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function a(t,e){this.url=t,this.element=e,this.img=new Image}var s=t.jQuery,l=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var n=t.querySelectorAll("img"),i=0;i<n.length;i++){var o=n[i];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(i=0;i<r.length;i++){var a=r[i];this.addElementBackgroundImages(a)}}}};var c={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(e.backgroundImage);null!==i;){var o=i&&i[2];o&&this.addBackground(o,t),i=n.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var n=new a(t,e);this.images.push(n)},o.prototype.check=function(){function t(t,n,i){setTimeout(function(){e.progress(t,n,i)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&l&&l.log("progress: "+n,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype=Object.create(r.prototype),a.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(s=e,s.fn.imagesLoaded=function(t,e){var n=new o(this,t,e);return n.jqDeferred.promise(s(this))})},o.makeJQueryPlugin(),o}),function(t){t.fn.tipTip=function(e){var n={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:6,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},afterEnter:function(){},exit:function(){},afterExit:function(){},cssClass:""};if(t("#tiptip_holder").length<=0){var i=t('<div id="tiptip_holder"></div>'),o=t('<div id="tiptip_content"></div>'),r=t('<div id="tiptip_arrow"></div>');t("body").append(i.html(o).prepend(r.html('<div id="tiptip_arrow_inner"></div>')))}else i=t("#tiptip_holder"),o=t("#tiptip_content"),r=t("#tiptip_arrow");return this.each(function(){function a(){var e;if(!1!==u.enter.call(l,d)&&(u.content?e=t.isFunction(u.content)?u.content.call(l,d):u.content:(e=u.content=l.attr(u.attribute),l.removeAttr(u.attribute)),e)){o.html(e),i.hide().removeAttr("class").css({margin:"0px","max-width":u.maxWidth}),u.cssClass&&i.addClass(u.cssClass),r.removeAttr("style");var n=parseInt(l.offset().top),a=parseInt(l.offset().left),s=parseInt(l.outerWidth()),c=parseInt(l.outerHeight()),f=i.outerWidth(),p=i.outerHeight(),g=Math.round((s-f)/2),m=Math.round((c-p)/2),b=Math.round(a+g),v=Math.round(n+c+u.edgeOffset),y="",w="",P=Math.round(f-12)/2;"bottom"==u.defaultPosition?y="_bottom":"top"==u.defaultPosition?y="_top":"left"==u.defaultPosition?y="_left":"right"==u.defaultPosition&&(y="_right");var $=g+a<parseInt(t(window).scrollLeft()),x=f+a>parseInt(t(window).width());$&&g<0||"_right"==y&&!x||"_left"==y&&a<f+u.edgeOffset+5?(y="_right",w=Math.round(p-13)/2,P=-12,b=Math.round(a+s+u.edgeOffset),v=Math.round(n+m)):(x&&g<0||"_left"==y&&!$)&&(y="_left",w=Math.round(p-13)/2,P=Math.round(f),b=Math.round(a-(f+u.edgeOffset+5)),v=Math.round(n+m));var F=n+c+u.edgeOffset+p+8>parseInt(t(window).height()+t(window).scrollTop()),_=n+c-(u.edgeOffset+p+8)<0;F||"_bottom"==y&&F||"_top"==y&&!_?("_top"==y||"_bottom"==y?y="_top":y+="_top",w=p,v=Math.round(n-(p+5+u.edgeOffset))):(_|("_top"==y&&_)||"_bottom"==y&&!F)&&("_top"==y||"_bottom"==y?y="_bottom":y+="_bottom",w=-12,v=Math.round(n+c+u.edgeOffset)),"_right_top"==y||"_left_top"==y?v+=5:"_right_bottom"!=y&&"_left_bottom"!=y||(v-=5),"_left_top"!=y&&"_left_bottom"!=y||(b+=5),r.css({"margin-left":P+"px","margin-top":w+"px"}),i.css({"margin-left":b+"px","margin-top":v+"px"}).addClass("tip"+y),h&&clearTimeout(h),h=setTimeout(function(){i.stop(!0,!0).fadeIn(u.fadeIn)},u.delay),u.afterEnter.call(l,d)}}function s(){!1!==u.exit.call(l,d)&&(h&&clearTimeout(h),i.fadeOut(u.fadeOut),u.afterExit.call(l,d))}var l=t(this),c=l.data("tipTip"),u=c&&c.options||t.extend(n,e),d={holder:i,content:o,arrow:r,options:u};if(c)switch(e){case"show":a();break;case"hide":s();break;case"destroy":l.unbind(".tipTip").removeData("tipTip")}else{var h=!1;l.data("tipTip",{options:u}),"hover"==u.activation?l.bind("mouseenter.tipTip",function(){a()}).bind("mouseleave.tipTip",function(){u.keepAlive?i.one("mouseleave.tipTip",function(){s()}):s()}):"focus"==u.activation?l.bind("focus.tipTip",function(){a()}).bind("blur.tipTip",function(){s()}):"click"==u.activation?l.bind("click.tipTip",function(t){return t.preventDefault(),a(),!1}).bind("mouseleave.tipTip",function(){u.keepAlive?i.one("mouseleave.tipTip",function(){s()}):s()}):u.activation}})}}(jQuery),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var n=t.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(i)}}if(t.support.touch="ontouchend"in document,t.support.touch){var n,i=t.ui.mouse.prototype,o=i._mouseInit;i._touchStart=function(t){var i=this;!n&&i._mouseCapture(t.originalEvent.changedTouches[0])&&(n=!0,i._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},i._touchMove=function(t){n&&(this._touchMoved=!0,e(t,"mousemove"))},i._touchEnd=function(t){n&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),n=!1)},i._mouseInit=function(){var e=this;e.element.bind("touchstart",t.proxy(e,"_touchStart")).bind("touchmove",t.proxy(e,"_touchMove")).bind("touchend",t.proxy(e,"_touchEnd")),o.call(e)}}}(jQuery),function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}(function(t){function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=c),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each(function(){var i=t(this),o=i.data(_);o||(o=new n(this,e),i.data(_,o))})}function n(e,n){function j(e){if(!(st()||t(e.target).closest(n.excludedElements,zt).length>0)){var i,o=e.originalEvent?e.originalEvent:e,r=F?o.touches[0]:o;return qt=w,F?Nt=o.touches.length:e.preventDefault(),Ot=0,Ht=null,Bt=null,At=0,Mt=0,Lt=0,Dt=1,Ut=0,Wt=ht(),Rt=gt(),rt(),!F||Nt===n.fingers||n.fingers===v||R()?(ct(0,r),Qt=Ft(),2==Nt&&(ct(1,o.touches[1]),Mt=Lt=vt(Wt[0].start,Wt[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=O(o,qt))):i=!1,!1===i?(qt=x,O(o,qt),i):(lt(!0),null)}}function S(t){var e=t.originalEvent?t.originalEvent:t;if(qt!==$&&qt!==x&&!at()){var i,o=F?e.touches[0]:e,r=ut(o);if(Vt=Ft(),F&&(Nt=e.touches.length),qt=P,2==Nt&&(0==Mt?(ct(1,e.touches[1]),Mt=Lt=vt(Wt[0].start,Wt[1].start)):(ut(e.touches[1]),Lt=vt(Wt[0].end,Wt[1].end),Bt=wt(Wt[0].end,Wt[1].end)),Dt=yt(Mt,Lt),Ut=Math.abs(Mt-Lt)),Nt===n.fingers||n.fingers===v||!F||R()){if(Ht=xt(r.start,r.end),U(t,Ht),Ot=Pt(r.start,r.end),At=bt(),ft(Ht,Ot),(n.swipeStatus||n.pinchStatus)&&(i=O(e,qt)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var s=_t(this);a=jt(r.end,s)}!n.triggerOnTouchEnd&&a?qt=E(P):n.triggerOnTouchLeave&&!a&&(qt=E($)),qt!=x&&qt!=$||O(e,qt)}}else qt=x,O(e,qt);!1===i&&(qt=x,O(e,qt))}}function k(t){var e=t.originalEvent;return F&&e.touches.length>0?(ot(),!0):(at()&&(Nt=Xt),t.preventDefault(),Vt=Ft(),At=bt(),M()?(qt=x,O(e,qt)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&qt===P?(qt=$,O(e,qt)):!n.triggerOnTouchEnd&&G()?(qt=$,H(e,qt,f)):qt===P&&(qt=x,O(e,qt)),lt(!1),null)}function T(){Nt=0,Vt=0,Qt=0,Mt=0,Lt=0,Dt=1,rt(),lt(!1)}function C(t){var e=t.originalEvent;n.triggerOnTouchLeave&&(qt=E($),O(e,qt))}function I(){zt.unbind(kt,j),zt.unbind(Et,T),zt.unbind(Tt,S),zt.unbind(Ct,k),It&&zt.unbind(It,C),lt(!1)}function E(t){var e=t,i=D(),o=A(),r=M();return!i||r?e=x:!o||t!=P||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!o&&t==$&&n.triggerOnTouchLeave&&(e=x):e=$,e}function O(t,e){var n=void 0;return W()||N()?n=H(t,e,d):(z()||R())&&!1!==n&&(n=H(t,e,h)),nt()&&!1!==n?n=H(t,e,p):it()&&!1!==n?n=H(t,e,g):et()&&!1!==n&&(n=H(t,e,f)),e===x&&T(t),e===$&&(F?0==t.touches.length&&T(t):T(t)),n}function H(e,c,u){var m=void 0;if(u==d){if(zt.trigger("swipeStatus",[c,Ht||null,Ot||0,At||0,Nt]),n.swipeStatus&&(m=n.swipeStatus.call(zt,e,c,Ht||null,Ot||0,At||0,Nt),!1===m))return!1;if(c==$&&q()){if(zt.trigger("swipe",[Ht,Ot,At,Nt]),n.swipe&&(m=n.swipe.call(zt,e,Ht,Ot,At,Nt),!1===m))return!1;switch(Ht){case i:zt.trigger("swipeLeft",[Ht,Ot,At,Nt]),n.swipeLeft&&(m=n.swipeLeft.call(zt,e,Ht,Ot,At,Nt));break;case o:zt.trigger("swipeRight",[Ht,Ot,At,Nt]),n.swipeRight&&(m=n.swipeRight.call(zt,e,Ht,Ot,At,Nt));break;case r:zt.trigger("swipeUp",[Ht,Ot,At,Nt]),n.swipeUp&&(m=n.swipeUp.call(zt,e,Ht,Ot,At,Nt));break;case a:zt.trigger("swipeDown",[Ht,Ot,At,Nt]),n.swipeDown&&(m=n.swipeDown.call(zt,e,Ht,Ot,At,Nt))}}}if(u==h){if(zt.trigger("pinchStatus",[c,Bt||null,Ut||0,At||0,Nt,Dt]),n.pinchStatus&&(m=n.pinchStatus.call(zt,e,c,Bt||null,Ut||0,At||0,Nt,Dt),!1===m))return!1;if(c==$&&B())switch(Bt){case s:zt.trigger("pinchIn",[Bt||null,Ut||0,At||0,Nt,Dt]),n.pinchIn&&(m=n.pinchIn.call(zt,e,Bt||null,Ut||0,At||0,Nt,Dt));break;case l:zt.trigger("pinchOut",[Bt||null,Ut||0,At||0,Nt,Dt]),n.pinchOut&&(m=n.pinchOut.call(zt,e,Bt||null,Ut||0,At||0,Nt,Dt))}}return u==f?c!==x&&c!==$||(clearTimeout(Jt),X()&&!Z()?(Yt=Ft(),Jt=setTimeout(t.proxy(function(){Yt=null,zt.trigger("tap",[e.target]),n.tap&&(m=n.tap.call(zt,e,e.target))},this),n.doubleTapThreshold)):(Yt=null,zt.trigger("tap",[e.target]),n.tap&&(m=n.tap.call(zt,e,e.target)))):u==p?c!==x&&c!==$||(clearTimeout(Jt),Yt=null,zt.trigger("doubletap",[e.target]),n.doubleTap&&(m=n.doubleTap.call(zt,e,e.target))):u==g&&(c!==x&&c!==$||(clearTimeout(Jt),Yt=null,zt.trigger("longtap",[e.target]),n.longTap&&(m=n.longTap.call(zt,e,e.target)))),m}function A(){var t=!0;return null!==n.threshold&&(t=Ot>=n.threshold),t}function M(){var t=!1;return null!==n.cancelThreshold&&null!==Ht&&(t=pt(Ht)-Ot>=n.cancelThreshold),t}function L(){return null===n.pinchThreshold||Ut>=n.pinchThreshold}function D(){var t;return t=!n.maxTimeThreshold||!(At>=n.maxTimeThreshold),t}function U(t,e){if(n.allowPageScroll===c||R())t.preventDefault();else{var s=n.allowPageScroll===u;switch(e){case i:(n.swipeLeft&&s||!s&&n.allowPageScroll!=m)&&t.preventDefault();break;case o:(n.swipeRight&&s||!s&&n.allowPageScroll!=m)&&t.preventDefault();break;case r:(n.swipeUp&&s||!s&&n.allowPageScroll!=b)&&t.preventDefault();break;case a:(n.swipeDown&&s||!s&&n.allowPageScroll!=b)&&t.preventDefault()}}}function B(){var t=Q(),e=V(),n=L();return t&&e&&n}function R(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function z(){return!(!B()||!R())}function q(){var t=D(),e=A(),n=Q(),i=V(),o=M(),r=!o&&i&&n&&e&&t;return r}function N(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function W(){return!(!q()||!N())}function Q(){return Nt===n.fingers||n.fingers===v||!F}function V(){return 0!==Wt[0].end.x}function G(){return!!n.tap}function X(){return!!n.doubleTap}function Y(){return!!n.longTap}function J(){if(null==Yt)return!1;var t=Ft();return X()&&t-Yt<=n.doubleTapThreshold}function Z(){return J()}function K(){return(1===Nt||!F)&&(isNaN(Ot)||0===Ot)}function tt(){return At>n.longTapThreshold&&Ot<y}function et(){return!(!K()||!G())}function nt(){return!(!J()||!X())}function it(){return!(!tt()||!Y())}function ot(){Gt=Ft(),Xt=event.touches.length+1}function rt(){Gt=0,Xt=0}function at(){var t=!1;if(Gt){var e=Ft()-Gt;e<=n.fingerReleaseThreshold&&(t=!0)}return t}function st(){return!(!0!==zt.data(_+"_intouch"))}function lt(t){!0===t?(zt.bind(Tt,S),zt.bind(Ct,k),It&&zt.bind(It,C)):(zt.unbind(Tt,S,!1),zt.unbind(Ct,k,!1),It&&zt.unbind(It,C,!1)),zt.data(_+"_intouch",!0===t)}function ct(t,e){var n=void 0!==e.identifier?e.identifier:0;return Wt[t].identifier=n,Wt[t].start.x=Wt[t].end.x=e.pageX||e.clientX,Wt[t].start.y=Wt[t].end.y=e.pageY||e.clientY,Wt[t]}function ut(t){var e=void 0!==t.identifier?t.identifier:0,n=dt(e);return n.end.x=t.pageX||t.clientX,n.end.y=t.pageY||t.clientY,n}function dt(t){for(var e=0;e<Wt.length;e++)if(Wt[e].identifier==t)return Wt[e]}function ht(){for(var t=[],e=0;e<=5;e++)t.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return t}function ft(t,e){e=Math.max(e,pt(t)),Rt[t].distance=e}function pt(t){if(Rt[t])return Rt[t].distance}function gt(){var t={};return t[i]=mt(i),t[o]=mt(o),t[r]=mt(r),t[a]=mt(a),t}function mt(t){return{direction:t,distance:0}}function bt(){return Vt-Qt}function vt(t,e){var n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+i*i))}function yt(t,e){var n=e/t*1;return n.toFixed(2)}function wt(){return Dt<1?l:s}function Pt(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}function $t(t,e){var n=t.x-e.x,i=e.y-t.y,o=Math.atan2(i,n),r=Math.round(180*o/Math.PI);return r<0&&(r=360-Math.abs(r)),r}function xt(t,e){var n=$t(t,e);return n<=45&&n>=0?i:n<=360&&n>=315?i:n>=135&&n<=225?o:n>45&&n<135?a:r}function Ft(){var t=new Date;return t.getTime()}function _t(e){e=t(e);var n=e.offset(),i={left:n.left,right:n.left+e.outerWidth(),top:n.top,bottom:n.top+e.outerHeight()};return i}function jt(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}var St=F||!n.fallbackToMouseEvents,kt=St?"touchstart":"mousedown",Tt=St?"touchmove":"mousemove",Ct=St?"touchend":"mouseup",It=St?null:"mouseleave",Et="touchcancel",Ot=0,Ht=null,At=0,Mt=0,Lt=0,Dt=1,Ut=0,Bt=0,Rt=null,zt=t(e),qt="start",Nt=0,Wt=null,Qt=0,Vt=0,Gt=0,Xt=0,Yt=0,Jt=null;try{zt.bind(kt,j),zt.bind(Et,T)}catch(e){t.error("events not supported "+kt+","+Et+" on jQuery.swipe")}this.enable=function(){return zt.bind(kt,j),zt.bind(Et,T),zt},this.disable=function(){return I(),zt},this.destroy=function(){return I(),zt.data(_,null),zt},this.option=function(e,i){if(void 0!==n[e]){if(void 0===i)return n[e];n[e]=i}else t.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}var i="left",o="right",r="up",a="down",s="in",l="out",c="none",u="auto",d="swipe",h="pinch",f="tap",p="doubletap",g="longtap",m="horizontal",b="vertical",v="all",y=10,w="start",P="move",$="end",x="cancel",F="ontouchstart"in window,_="TouchSwipe",j={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};t.fn.swipe=function(n){var i=t(this),o=i.data(_);if(o&&"string"==typeof n){if(o[n])return o[n].apply(this,Array.prototype.slice.call(arguments,1));t.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(o||"object"!=typeof n&&n))return e.apply(this,arguments);return i},t.fn.swipe.defaults=j,t.fn.swipe.phases={PHASE_START:w,PHASE_MOVE:P,PHASE_END:$,PHASE_CANCEL:x},t.fn.swipe.directions={LEFT:i,RIGHT:o,UP:r,DOWN:a,IN:s,OUT:l},t.fn.swipe.pageScroll={NONE:c,HORIZONTAL:m,VERTICAL:b,AUTO:u},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:v}}),function(t){"use strict";function e(t,n,i){var o,r=document.createElement("img");if(r.onerror=function(o){return e.onerror(r,o,t,n,i)},r.onload=function(o){return e.onload(r,o,t,n,i)},e.isInstanceOf("Blob",t)||e.isInstanceOf("File",t))o=r._objectURL=e.createObjectURL(t);else{if("string"!=typeof t)return!1;o=t,i&&i.crossOrigin&&(r.crossOrigin=i.crossOrigin)}return o?(r.src=o,r):e.readFile(t,function(t){var e=t.target;e&&e.result?r.src=e.result:n&&n(t)})}function n(t,n){!t._objectURL||n&&n.noRevoke||(e.revokeObjectURL(t._objectURL),delete t._objectURL)}var i=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;e.isInstanceOf=function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},e.transform=function(t,n,i,o,r){i(e.scale(t,n,r),r)},e.onerror=function(t,e,i,o,r){n(t,r),o&&o.call(t,e)},e.onload=function(t,i,o,r,a){n(t,a),r&&e.transform(t,a,r,o,{})},e.transformCoordinates=function(){},e.getTransformedOptions=function(t,e){var n,i,o,r,a=e.aspectRatio;if(!a)return e;for(i in n={},e)e.hasOwnProperty(i)&&(n[i]=e[i]);return n.crop=!0,o=t.naturalWidth||t.width,r=t.naturalHeight||t.height,o/r>a?(n.maxWidth=r*a,n.maxHeight=r):(n.maxWidth=o,n.maxHeight=o/a),n},e.renderImageToCanvas=function(t,e,n,i,o,r,a,s,l,c){return t.getContext("2d").drawImage(e,n,i,o,r,a,s,l,c),t},e.hasCanvasOption=function(t){return t.canvas||t.crop||!!t.aspectRatio},e.scale=function(t,n,i){function o(){var t=Math.max((l||P)/P,(c||$)/$);t>1&&(P*=t,$*=t)}function r(){var t=Math.min((a||P)/P,(s||$)/$);t<1&&(P*=t,$*=t)}n=n||{};var a,s,l,c,u,d,h,f,p,g,m,b=document.createElement("canvas"),v=t.getContext||e.hasCanvasOption(n)&&b.getContext,y=t.naturalWidth||t.width,w=t.naturalHeight||t.height,P=y,$=w;if(b.originalWidth=y,b.originalHeight=w,v&&(n=e.getTransformedOptions(t,n,i),h=n.left||0,f=n.top||0,n.sourceWidth?(u=n.sourceWidth,void 0!==n.right&&void 0===n.left&&(h=y-u-n.right)):u=y-h-(n.right||0),n.sourceHeight?(d=n.sourceHeight,void 0!==n.bottom&&void 0===n.top&&(f=w-d-n.bottom)):d=w-f-(n.bottom||0),P=u,$=d),a=n.maxWidth,s=n.maxHeight,l=n.minWidth,c=n.minHeight,v&&a&&s&&n.crop?(P=a,$=s,m=u/d-a/s,m<0?(d=s*u/a,void 0===n.top&&void 0===n.bottom&&(f=(w-d)/2)):m>0&&(u=a*d/s,void 0===n.left&&void 0===n.right&&(h=(y-u)/2))):((n.contain||n.cover)&&(l=a=a||l,c=s=s||c),n.cover?(r(),o()):(o(),r())),v){if(p=n.pixelRatio,p>1&&(b.style.width=P+"px",b.style.height=$+"px",P*=p,$*=p,b.getContext("2d").scale(p,p)),g=n.downsamplingRatio,g>0&&g<1&&P<u&&$<d)for(;u*g>P;)b.width=u*g,b.height=d*g,e.renderImageToCanvas(b,t,h,f,u,d,0,0,b.width,b.height),u=b.width,d=b.height,t=document.createElement("canvas"),t.width=u,t.height=d,e.renderImageToCanvas(t,b,0,0,u,d,0,0,u,d);return b.width=P,b.height=$,e.transformCoordinates(b,n),e.renderImageToCanvas(b,t,h,f,u,d,0,0,P,$)}return t.width=P,t.height=$,t},e.createObjectURL=function(t){return!!i&&i.createObjectURL(t)},e.revokeObjectURL=function(t){return!!i&&i.revokeObjectURL(t)},e.readFile=function(t,e,n){if(window.FileReader){var i=new FileReader;if(i.onload=i.onerror=e,n=n||"readAsDataURL",i[n])return i[n](t),i}return!1},"function"==typeof define&&define.amd?define(function(){return e}):"object"==typeof module&&module.exports?module.exports=e:t.loadImage=e}(window),function(t){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],t):t("object"==typeof module&&module.exports?require("./load-image"):window.loadImage)}(function(t){"use strict";var e=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);t.blobSlice=e&&function(){var t=this.slice||this.webkitSlice||this.mozSlice;return t.apply(this,arguments)},t.metaDataParsers={jpeg:{65505:[]}},t.parseMetaData=function(e,n,i,o){i=i||{},o=o||{};var r=this,a=i.maxMetaDataSize||262144,s=!(window.DataView&&e&&e.size>=12&&"image/jpeg"===e.type&&t.blobSlice);!s&&t.readFile(t.blobSlice.call(e,0,a),function(e){if(e.target.error)return console.log(e.target.error),void n(o);var a,s,l,c,u=e.target.result,d=new DataView(u),h=2,f=d.byteLength-4,p=h;if(65496===d.getUint16(0)){for(;h<f&&(a=d.getUint16(h),a>=65504&&a<=65519||65534===a);){if(s=d.getUint16(h+2)+2,h+s>d.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(l=t.metaDataParsers.jpeg[a])for(c=0;c<l.length;c+=1)l[c].call(r,d,h,s,o,i);h+=s,p=h}!i.disableImageHead&&p>6&&(u.slice?o.imageHead=u.slice(0,p):o.imageHead=new Uint8Array(u).subarray(0,p))}else console.log("Invalid JPEG file: Missing JPEG marker.");n(o)},"readAsArrayBuffer")||n(o)},t.hasMetaOption=function(t){return t.meta};var n=t.transform;t.transform=function(e,i,o,r,a){t.hasMetaOption(i||{})?t.parseMetaData(r,function(a){n.call(t,e,i,o,r,a)},i,a):n.apply(t,arguments)}}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],t):"object"==typeof module&&module.exports?t(require("./load-image"),require("./load-image-meta")):t(window.loadImage)}(function(t){"use strict";t.ExifMap=function(){return this},t.ExifMap.prototype.map={Orientation:274},t.ExifMap.prototype.get=function(t){return this[t]||this[this.map[t]]},t.getExifThumbnail=function(t,e,n){var i,o,r;if(n&&!(e+n>t.byteLength)){for(i=[],o=0;o<n;o+=1)r=t.getUint8(e+o),i.push((r<16?"0":"")+r.toString(16));return"data:image/jpeg,%"+i.join("%")}console.log("Invalid Exif data: Invalid thumbnail data.")},t.exifTagTypes={1:{getValue:function(t,e){return t.getUint8(e)},size:1},2:{getValue:function(t,e){return String.fromCharCode(t.getUint8(e))},size:1,ascii:!0},3:{getValue:function(t,e,n){return t.getUint16(e,n)},size:2},4:{getValue:function(t,e,n){return t.getUint32(e,n)},size:4},5:{getValue:function(t,e,n){return t.getUint32(e,n)/t.getUint32(e+4,n)},size:8},9:{getValue:function(t,e,n){return t.getInt32(e,n)},size:4},10:{getValue:function(t,e,n){return t.getInt32(e,n)/t.getInt32(e+4,n)},size:8}},t.exifTagTypes[7]=t.exifTagTypes[1],t.getExifValue=function(e,n,i,o,r,a){var s,l,c,u,d,h,f=t.exifTagTypes[o];if(f){if(s=f.size*r,l=s>4?n+e.getUint32(i+8,a):i+8,!(l+s>e.byteLength)){if(1===r)return f.getValue(e,l,a);for(c=[],u=0;u<r;u+=1)c[u]=f.getValue(e,l+u*f.size,a);if(f.ascii){for(d="",u=0;u<c.length&&(h=c[u],"\0"!==h);u+=1)d+=h;return d}return c}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")},t.parseExifTag=function(e,n,i,o,r){var a=e.getUint16(i,o);r.exif[a]=t.getExifValue(e,n,i,e.getUint16(i+2,o),e.getUint32(i+4,o),o)},t.parseExifTags=function(t,e,n,i,o){var r,a,s;if(n+6>t.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(r=t.getUint16(n,i),a=n+2+12*r,!(a+4>t.byteLength)){for(s=0;s<r;s+=1)this.parseExifTag(t,e,n+2+12*s,i,o);return t.getUint32(a,i)}console.log("Invalid Exif data: Invalid directory size.")}},t.parseExifData=function(e,n,i,o,r){if(!r.disableExif){var a,s,l,c=n+10;if(1165519206===e.getUint32(n+4)){if(c+8>e.byteLength)return void console.log("Invalid Exif data: Invalid segment size.");if(0!==e.getUint16(n+8))return void console.log("Invalid Exif data: Missing byte alignment offset.");switch(e.getUint16(c)){case 18761:a=!0;break;case 19789:a=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==e.getUint16(c+2,a))return void console.log("Invalid Exif data: Missing TIFF marker.");s=e.getUint32(c+4,a),o.exif=new t.ExifMap,s=t.parseExifTags(e,c,c+s,a,o),s&&!r.disableExifThumbnail&&(l={exif:{}},s=t.parseExifTags(e,c,c+s,a,l),l.exif[513]&&(o.exif.Thumbnail=t.getExifThumbnail(e,c+l.exif[513],l.exif[514]))),o.exif[34665]&&!r.disableExifSub&&t.parseExifTags(e,c,c+o.exif[34665],a,o),o.exif[34853]&&!r.disableExifGps&&t.parseExifTags(e,c,c+o.exif[34853],a,o)}}},t.metaDataParsers.jpeg[65505].push(t.parseExifData)}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-exif"],t):"object"==typeof module&&module.exports?t(require("./load-image"),require("./load-image-exif")):t(window.loadImage)}(function(t){"use strict";t.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",
|
|
41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},t.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},t.ExifMap.prototype.getText=function(t){var e=this.get(t);switch(t){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[t][e];case"ExifVersion":case"FlashpixVersion":if(!e)return;return String.fromCharCode(e[0],e[1],e[2],e[3]);case"ComponentsConfiguration":if(!e)return;return this.stringValues[t][e[0]]+this.stringValues[t][e[1]]+this.stringValues[t][e[2]]+this.stringValues[t][e[3]];case"GPSVersionID":if(!e)return;return e[0]+"."+e[1]+"."+e[2]+"."+e[3]}return String(e)},function(t){var e,n=t.tags,i=t.map;for(e in n)n.hasOwnProperty(e)&&(i[n[e]]=e)}(t.ExifMap.prototype),t.ExifMap.prototype.getAll=function(){var t,e,n={};for(t in this)this.hasOwnProperty(t)&&(e=this.tags[t],e&&(n[e]=this.getText(e)));return n}}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],t):t("object"==typeof module&&module.exports?require("./load-image"):window.loadImage)}(function(t){"use strict";var e=t.hasCanvasOption,n=t.hasMetaOption,i=t.transformCoordinates,o=t.getTransformedOptions;t.hasCanvasOption=function(n){return!!n.orientation||e.call(t,n)},t.hasMetaOption=function(e){return!0===e.orientation||n.call(t,e)},t.transformCoordinates=function(e,n){i.call(t,e,n);var o=e.getContext("2d"),r=e.width,a=e.height,s=e.style.width,l=e.style.height,c=n.orientation;if(c&&!(c>8))switch(c>4&&(e.width=a,e.height=r,e.style.width=l,e.style.height=s),c){case 2:o.translate(r,0),o.scale(-1,1);break;case 3:o.translate(r,a),o.rotate(Math.PI);break;case 4:o.translate(0,a),o.scale(1,-1);break;case 5:o.rotate(.5*Math.PI),o.scale(1,-1);break;case 6:o.rotate(.5*Math.PI),o.translate(0,-a);break;case 7:o.rotate(.5*Math.PI),o.translate(r,-a),o.scale(-1,1);break;case 8:o.rotate(-.5*Math.PI),o.translate(-r,0)}},t.getTransformedOptions=function(e,n,i){var r,a,s=o.call(t,e,n),l=s.orientation;if(!0===l&&i&&i.exif&&(l=i.exif.get("Orientation")),!l||l>8||1===l)return s;for(a in r={},s)s.hasOwnProperty(a)&&(r[a]=s[a]);switch(r.orientation=l,l){case 2:r.left=s.right,r.right=s.left;break;case 3:r.left=s.right,r.top=s.bottom,r.right=s.left,r.bottom=s.top;break;case 4:r.top=s.bottom,r.bottom=s.top;break;case 5:r.left=s.top,r.top=s.left,r.right=s.bottom,r.bottom=s.right;break;case 6:r.left=s.top,r.top=s.right,r.right=s.bottom,r.bottom=s.left;break;case 7:r.left=s.bottom,r.top=s.right,r.right=s.top,r.bottom=s.left;break;case 8:r.left=s.bottom,r.top=s.left,r.right=s.top,r.bottom=s.right}return s.orientation>4&&(r.maxWidth=s.maxHeight,r.maxHeight=s.maxWidth,r.minWidth=s.minHeight,r.minHeight=s.minWidth,r.sourceWidth=s.sourceHeight,r.sourceHeight=s.sourceWidth),r}}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return t<10?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,i,o,r,a,s=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(r=l.length,n=0;n<r;n+=1)a[n]=str(n,l)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(r=rep.length,n=0;n<r;n+=1)"string"==typeof rep[n]&&(i=rep[n],o=str(i,l),o&&a.push(quote(i)+(gap?": ":":")+o));else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(o=str(i,l),o&&a.push(quote(i)+(gap?": ":":")+o));return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;i<n;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,!e||"function"==typeof e||"object"==typeof e&&"number"==typeof e.length)return str("",{"":t});throw new Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var n,i,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i=walk(o,n),void 0!==i?o[n]=i:delete o[n]);return reviver.call(t,e,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(t,e){"use strict";var n=t.History=t.History||{},i=t.jQuery;if(void 0!==n.Adapter)throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(t,e,n){i(t).bind(e,n)},trigger:function(t,e,n){i(t).trigger(e,n)},extractEventData:function(t,n,i){var o=n&&n.originalEvent&&n.originalEvent[t]||i&&i[t]||e;return o},onDomLoad:function(t){i(t)}},void 0!==n.init&&n.init()}(window),function(t,e){"use strict";var n=t.document,i=t.setTimeout||i,o=t.clearTimeout||o,r=t.setInterval||r,a=t.History=t.History||{};if(void 0!==a.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");a.initHtml4=function(){if(void 0!==a.initHtml4.initialized)return!1;a.initHtml4.initialized=!0,a.enabled=!0,a.savedHashes=[],a.isLastHash=function(t){var e,n=a.getHashByIndex();return e=t===n,e},a.isHashEqual=function(t,e){return t=encodeURIComponent(t).replace(/%25/g,"%"),e=encodeURIComponent(e).replace(/%25/g,"%"),t===e},a.saveHash=function(t){return!a.isLastHash(t)&&(a.savedHashes.push(t),!0)},a.getHashByIndex=function(t){var e=null;return e=void 0===t?a.savedHashes[a.savedHashes.length-1]:t<0?a.savedHashes[a.savedHashes.length+t]:a.savedHashes[t],e},a.discardedHashes={},a.discardedStates={},a.discardState=function(t,e,n){var i,o=a.getHashByState(t);return i={discardedState:t,backState:n,forwardState:e},a.discardedStates[o]=i,!0},a.discardHash=function(t,e,n){var i={discardedHash:t,backState:n,forwardState:e};return a.discardedHashes[t]=i,!0},a.discardedState=function(t){var e,n=a.getHashByState(t);return e=a.discardedStates[n]||!1,e},a.discardedHash=function(t){var e=a.discardedHashes[t]||!1;return e},a.recycleState=function(t){var e=a.getHashByState(t);return a.discardedState(t)&&delete a.discardedStates[e],!0},a.emulated.hashChange&&(a.hashChangeInit=function(){a.checkerFunction=null;var e,i,o,s,l="",c=Boolean(a.getHash());return a.isInternetExplorer()?(e="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",e),i.setAttribute("src","#"),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),o="",s=!1,a.checkerFunction=function(){if(s)return!1;s=!0;var e=a.getHash(),n=a.getHash(i.contentWindow.document);return e!==l?(l=e,n!==e&&(o=n=e,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=a.escapeHash(e)),a.Adapter.trigger(t,"hashchange")):n!==o&&(o=n,c&&""===n?a.back():a.setHash(n,!1)),s=!1,!0}):a.checkerFunction=function(){var e=a.getHash()||"";return e!==l&&(l=e,a.Adapter.trigger(t,"hashchange")),!0},a.intervalList.push(r(a.checkerFunction,a.options.hashChangeInterval)),!0},a.Adapter.onDomLoad(a.hashChangeInit)),a.emulated.pushState&&(a.onHashChange=function(e){var n,i=e&&e.newURL||a.getLocationHref(),o=a.getHashByUrl(i),r=null;return a.isLastHash(o)?(a.busy(!1),!1):(a.doubleCheckComplete(),a.saveHash(o),o&&a.isTraditionalAnchor(o)?(a.Adapter.trigger(t,"anchorchange"),a.busy(!1),!1):(r=a.extractState(a.getFullUrl(o||a.getLocationHref()),!0),a.isLastSavedState(r)?(a.busy(!1),!1):(a.getHashByState(r),n=a.discardedState(r),n?(a.getHashByIndex(-2)===a.getHashByState(n.forwardState)?a.back(!1):a.forward(!1),!1):(a.pushState(r.data,r.title,encodeURI(r.url),!1),!0))))},a.Adapter.bind(t,"hashchange",a.onHashChange),a.pushState=function(e,n,i,o){if(i=encodeURI(i).replace(/%25/g,"%"),a.getHashByUrl(i))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(!1!==o&&a.busy())return a.pushQueue({scope:a,callback:a.pushState,args:arguments,queue:o}),!1;a.busy(!0);var r=a.createStateObject(e,n,i),s=a.getHashByState(r),l=a.getState(!1),c=a.getHashByState(l),u=a.getHash(),d=a.expectedStateId==r.id;return a.storeState(r),a.expectedStateId=r.id,a.recycleState(r),a.setTitle(r),s===c?(a.busy(!1),!1):(a.saveState(r),d||a.Adapter.trigger(t,"statechange"),!a.isHashEqual(s,u)&&!a.isHashEqual(s,a.getShortUrl(a.getLocationHref()))&&a.setHash(s,!1),a.busy(!1),!0)},a.replaceState=function(e,n,i,o){if(i=encodeURI(i).replace(/%25/g,"%"),a.getHashByUrl(i))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(!1!==o&&a.busy())return a.pushQueue({scope:a,callback:a.replaceState,args:arguments,queue:o}),!1;a.busy(!0);var r=a.createStateObject(e,n,i),s=a.getHashByState(r),l=a.getState(!1),c=a.getHashByState(l),u=a.getStateByIndex(-2);return a.discardState(l,r,u),s===c?(a.storeState(r),a.expectedStateId=r.id,a.recycleState(r),a.setTitle(r),a.saveState(r),a.Adapter.trigger(t,"statechange"),a.busy(!1)):a.pushState(r.data,r.title,r.url,!1),!0}),a.emulated.pushState&&a.getHash()&&!a.emulated.hashChange&&a.Adapter.onDomLoad(function(){a.Adapter.trigger(t,"hashchange")})},void 0!==a.init&&a.init()}(window),function(t,e){"use strict";var n=t.console||e,i=t.document,o=t.navigator,r=!1,a=t.setTimeout,s=t.clearTimeout,l=t.setInterval,c=t.clearInterval,u=t.JSON,d=t.alert,h=t.History=t.History||{},f=t.history;try{r=t.sessionStorage,r.setItem("TEST","1"),r.removeItem("TEST")}catch(t){r=!1}if(u.stringify=u.stringify||u.encode,u.parse=u.parse||u.decode,void 0!==h.init)throw new Error("History.js Core has already been loaded...");h.init=function(t){return void 0!==h.Adapter&&(void 0!==h.initCore&&h.initCore(),void 0!==h.initHtml4&&h.initHtml4(),!0)},h.initCore=function(p){if(void 0!==h.initCore.initialized)return!1;if(h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||i.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var t,e=h.intervalList;if(null!=e){for(t=0;t<e.length;t++)c(e[t]);h.intervalList=null}},h.debug=function(){h.options.debug&&h.log.apply(h,arguments)},h.log=function(){var t,e,o,r,a,s=void 0!==n&&void 0!==n.log&&void 0!==n.log.apply,l=i.getElementById("log");for(s?(r=Array.prototype.slice.call(arguments),t=r.shift(),void 0!==n.debug?n.debug.apply(n,[t,r]):n.log.apply(n,[t,r])):t="\n"+arguments[0]+"\n",e=1,o=arguments.length;e<o;++e){if(a=arguments[e],"object"==typeof a&&void 0!==u)try{a=u.stringify(a)}catch(t){}t+="\n"+a+"\n"}return l?(l.value+=t+"\n-----\n",l.scrollTop=l.scrollHeight-l.clientHeight):s||d(t),!0},h.getInternetExplorerMajorVersion=function(){var t=h.getInternetExplorerMajorVersion.cached=void 0!==h.getInternetExplorerMajorVersion.cached?h.getInternetExplorerMajorVersion.cached:function(){for(var t=3,e=i.createElement("div"),n=e.getElementsByTagName("i");(e.innerHTML="<!--[if gt IE "+ ++t+"]><i></i><![endif]-->")&&n[0];);return t>4&&t}();return t},h.isInternetExplorer=function(){var t=h.isInternetExplorer.cached=void 0!==h.isInternetExplorer.cached?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return t},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(t.history&&t.history.pushState&&t.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(o.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(o.userAgent)),hashChange:Boolean(!("onhashchange"in t||"onhashchange"in i)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===o.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===o.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},h.cloneObject=function(t){var e,n;return t?(e=u.stringify(t),n=u.parse(e)):n={},n},h.getRootUrl=function(){var t=i.location.protocol+"//"+(i.location.hostname||i.location.host);return i.location.port&&(t+=":"+i.location.port),t+="/",t},h.getBaseHref=function(){var t=i.getElementsByTagName("base"),e=null,n="";return 1===t.length&&(e=t[0],n=e.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var t=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return t},h.getPageUrl=function(){var t,e=h.getState(!1,!1),n=(e||{}).url||h.getLocationHref();return t=n.replace(/\/+$/,"").replace(/[^\/]+$/,function(t,e,n){return/\./.test(t)?t:t+"/"}),t},h.getBasePageUrl=function(){var t=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(t,e,n){return/[^\/]$/.test(t)?"":t}).replace(/\/+$/,"")+"/";return t},h.getFullUrl=function(t,e){var n=t,i=t.substring(0,1);return e=void 0===e||e,/[a-z]+\:\/\//.test(t)||(n="/"===i?h.getRootUrl()+t.replace(/^\/+/,""):"#"===i?h.getPageUrl().replace(/#.*/,"")+t:"?"===i?h.getPageUrl().replace(/[\?#].*/,"")+t:e?h.getBaseUrl()+t.replace(/^(\.\/)+/,""):h.getBasePageUrl()+t.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(t){var e=t,n=h.getBaseUrl(),i=h.getRootUrl();return h.emulated.pushState&&(e=e.replace(n,"")),e=e.replace(i,"/"),h.isTraditionalAnchor(e)&&(e="./"+e),e=e.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),e},h.getLocationHref=function(t){return t=t||i,t.URL===t.location.href?t.location.href:t.location.href===decodeURIComponent(t.URL)?t.URL:t.location.hash&&decodeURIComponent(t.location.href.replace(/^[^#]+/,""))===t.location.hash?t.location.href:-1==t.URL.indexOf("#")&&-1!=t.location.href.indexOf("#")?t.location.href:t.URL||t.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0);var n=h.getLastSavedState();return!n&&e&&(n=h.createStateObject()),t&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(t){var e,n=h.extractId(t.url);if(!n)if(e=h.getStateString(t),void 0!==h.stateToId[e])n=h.stateToId[e];else if(void 0!==h.store.stateToId[e])n=h.store.stateToId[e];else{for(;n=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),void 0!==h.idToState[n]||void 0!==h.store.idToState[n];);h.stateToId[e]=n,h.idToState[n]=t}return n},h.normalizeState=function(t){var e,n;return t&&"object"==typeof t||(t={}),void 0!==t.normalized?t:(t.data&&"object"==typeof t.data||(t.data={}),e={},e.normalized=!0,e.title=t.title||"",e.url=h.getFullUrl(t.url?t.url:h.getLocationHref()),e.hash=h.getShortUrl(e.url),e.data=h.cloneObject(t.data),e.id=h.getIdByState(e),e.cleanUrl=e.url.replace(/\??\&_suid.*/,""),e.url=e.cleanUrl,n=!h.isEmptyObject(e.data),(e.title||n)&&!0!==h.options.disableSuid&&(e.hash=h.getShortUrl(e.url).replace(/\??\&_suid.*/,""),/\?/.test(e.hash)||(e.hash+="?"),e.hash+="&_suid="+e.id),e.hashedUrl=h.getFullUrl(e.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(e)&&(e.url=e.hashedUrl),e)},h.createStateObject=function(t,e,n){var i={data:t,title:e,url:n};return i=h.normalizeState(i),i},h.getStateById=function(t){t=String(t);var n=h.idToState[t]||h.store.idToState[t]||e;return n},h.getStateString=function(t){var e,n,i;return e=h.normalizeState(t),n={data:e.data,title:t.title,url:t.url},i=u.stringify(n),i},h.getStateId=function(t){var e,n;return e=h.normalizeState(t),n=e.id,n},h.getHashByState=function(t){var e,n;return e=h.normalizeState(t),n=e.hash,n},h.extractId=function(t){var e,n,i;return i=-1!=t.indexOf("#")?t.split("#")[0]:t,n=/(.*)\&_suid=([0-9]+)$/.exec(i),n&&n[1]||t,e=n?String(n[2]||""):"",e||!1},h.isTraditionalAnchor=function(t){var e=!/[\/\?\.]/.test(t);return e},h.extractState=function(t,e){var n,i,o=null;return e=e||!1,n=h.extractId(t),n&&(o=h.getStateById(n)),o||(i=h.getFullUrl(t),n=h.getIdByUrl(i)||!1,n&&(o=h.getStateById(n)),!o&&e&&!h.isTraditionalAnchor(t)&&(o=h.createStateObject(null,null,i))),o},h.getIdByUrl=function(t){var n=h.urlToId[t]||h.store.urlToId[t]||e;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||e},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||e},h.hasUrlDuplicate=function(t){var e,n=!1;return e=h.extractState(t.url),n=e&&e.id!==t.id,n},h.storeState=function(t){return h.urlToId[t.url]=t.id,h.storedStates.push(h.cloneObject(t)),t},h.isLastSavedState=function(t){var e,n,i,o=!1;return h.savedStates.length&&(e=t.id,n=h.getLastSavedState(),i=n.id,o=e===i),o},h.saveState=function(t){return!h.isLastSavedState(t)&&(h.savedStates.push(h.cloneObject(t)),!0)},h.getStateByIndex=function(t){var e=null;return e=void 0===t?h.savedStates[h.savedStates.length-1]:t<0?h.savedStates[h.savedStates.length+t]:h.savedStates[t],e},h.getCurrentIndex=function(){var t=null;return t=h.savedStates.length<1?0:h.savedStates.length-1,t},h.getHash=function(t){var e,n=h.getLocationHref(t);return e=h.getHashByUrl(n),e},h.unescapeHash=function(t){var e=h.normalizeHash(t);return e=decodeURIComponent(e),e},h.normalizeHash=function(t){var e=t.replace(/[^#]*#/,"").replace(/#.*/,"");return e},h.setHash=function(t,e){var n,o;return!1!==e&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:e}),!1):(h.busy(!0),n=h.extractState(t,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==t&&(h.bugs.setHash?(o=h.getPageUrl(),h.pushState(null,null,o+"#"+t,!1)):i.location.hash=t),h)},h.escapeHash=function(e){var n=h.normalizeHash(e);return n=t.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(t){var e=String(t).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return e=h.unescapeHash(e),e},h.setTitle=function(t){var e,n=t.title;n||(e=h.getStateByIndex(0),e&&e.url===t.url&&(n=e.title||h.options.initialTitle));try{i.getElementsByTagName("title")[0].innerHTML=n.replace("<","<").replace(">",">").replace(" & "," & ")}catch(t){}return i.title=n,h},h.queues=[],h.busy=function(t){if(void 0!==t?h.busy.flag=t:void 0===h.busy.flag&&(h.busy.flag=!1),!h.busy.flag){s(h.busy.timeout);var e=function(){var t,n,i;if(!h.busy.flag)for(t=h.queues.length-1;t>=0;--t)n=h.queues[t],0!==n.length&&(i=n.shift(),h.fireQueueItem(i),h.busy.timeout=a(e,h.options.busyDelay))};h.busy.timeout=a(e,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(t){return t.callback.apply(t.scope||h,t.args||[])},h.pushQueue=function(t){return h.queues[t.queue||0]=h.queues[t.queue||0]||[],h.queues[t.queue||0].push(t),h},h.queue=function(t,e){return"function"==typeof t&&(t={callback:t}),void 0!==e&&(t.queue=e),h.busy()?h.pushQueue(t):h.fireQueueItem(t),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(s(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(t){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=a(function(){return h.doubleCheckClear(),h.stateChanged||t(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var e,n=h.extractState(h.getLocationHref());if(!h.isLastSavedState(n))return e=n,e||(e=h.createStateObject()),h.Adapter.trigger(t,"popstate"),h},h.back=function(t){return!1!==t&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:t}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),f.go(-1),!0)},h.forward=function(t){return!1!==t&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:t}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),f.go(1),!0)},h.go=function(t,e){var n;if(t>0)for(n=1;n<=t;++n)h.forward(e);else{if(!(t<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=t;--n)h.back(e)}return h},h.emulated.pushState){var g=function(){};h.pushState=h.pushState||g,h.replaceState=h.replaceState||g}else h.onPopState=function(e,n){var i,o,r=!1,a=!1;return h.doubleCheckComplete(),i=h.getHash(),i?(o=h.extractState(i||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(t,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",e,n)||!1,a=r?h.getStateById(r):h.expectedStateId?h.getStateById(h.expectedStateId):h.extractState(h.getLocationHref()),a||(a=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(a)?(h.busy(!1),!1):(h.storeState(a),h.saveState(a),h.setTitle(a),h.Adapter.trigger(t,"statechange"),h.busy(!1),!0))},h.Adapter.bind(t,"popstate",h.onPopState),h.pushState=function(e,n,i,o){if(h.getHashByUrl(i)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==o&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:o}),!1;h.busy(!0);var r=h.createStateObject(e,n,i);return h.isLastSavedState(r)?h.busy(!1):(h.storeState(r),h.expectedStateId=r.id,f.pushState(r.id,r.title,r.url),h.Adapter.trigger(t,"popstate")),!0},h.replaceState=function(e,n,i,o){if(h.getHashByUrl(i)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==o&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:o}),!1;h.busy(!0);var r=h.createStateObject(e,n,i);return h.isLastSavedState(r)?h.busy(!1):(h.storeState(r),h.expectedStateId=r.id,f.replaceState(r.id,r.title,r.url),h.Adapter.trigger(t,"popstate")),!0};if(r){try{h.store=u.parse(r.getItem("History.store"))||{}}catch(t){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(t,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),r&&(h.onUnload=function(){var t,e,n;try{t=u.parse(r.getItem("History.store"))||{}}catch(e){t={}}for(e in t.idToState=t.idToState||{},t.urlToId=t.urlToId||{},t.stateToId=t.stateToId||{},h.idToState)h.idToState.hasOwnProperty(e)&&(t.idToState[e]=h.idToState[e]);for(e in h.urlToId)h.urlToId.hasOwnProperty(e)&&(t.urlToId[e]=h.urlToId[e]);for(e in h.stateToId)h.stateToId.hasOwnProperty(e)&&(t.stateToId[e]=h.stateToId[e]);h.store=t,h.normalizeStore(),n=u.stringify(t);try{r.setItem("History.store",n)}catch(t){if(t.code!==DOMException.QUOTA_EXCEEDED_ERR)throw t;r.length&&(r.removeItem("History.store"),r.setItem("History.store",n))}},h.intervalList.push(l(h.onUnload,h.options.storeInterval)),h.Adapter.bind(t,"beforeunload",h.onUnload),h.Adapter.bind(t,"unload",h.onUnload)),h.emulated.pushState||(h.bugs.safariPoll&&h.intervalList.push(l(h.safariStatePoll,h.options.safariPollInterval)),"Apple Computer, Inc."!==o.vendor&&"Mozilla"!==(o.appCodeName||"")||(h.Adapter.bind(t,"hashchange",function(){h.Adapter.trigger(t,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(t,"hashchange")})))},(!h.options||!h.options.delayInit)&&h.init()}(window),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery)}(function(t){var e=0;t.ajaxTransport("iframe",function(n){var i,o,r;if(n.async)return{send:function(a,s){i=t('<form style="display:none;"></form>'),i.attr("accept-charset",n.formAcceptCharset),r=/\?/.test(n.url)?"&":"?","DELETE"===n.type?(n.url=n.url+r+"_method=DELETE",n.type="POST"):"PUT"===n.type?(n.url=n.url+r+"_method=PUT",n.type="POST"):"PATCH"===n.type&&(n.url=n.url+r+"_method=PATCH",n.type="POST"),e+=1,o=t('<iframe src="javascript:false;" name="iframe-transport-'+e+'"></iframe>').bind("load",function(){var e,r=t.isArray(n.paramName)?n.paramName:[n.paramName];o.unbind("load").bind("load",function(){var e;try{if(e=o.contents(),!e.length||!e[0].firstChild)throw new Error}catch(t){e=void 0}s(200,"success",{iframe:e}),t('<iframe src="javascript:false;"></iframe>').appendTo(i),window.setTimeout(function(){i.remove()},0)}),i.prop("target",o.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&t.each(n.formData,function(e,n){t('<input type="hidden"/>').prop("name",n.name).val(n.value).appendTo(i)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(e=n.fileInput.clone(),n.fileInput.after(function(t){return e[t]}),n.paramName&&n.fileInput.each(function(e){t(this).prop("name",r[e]||n.paramName)}),i.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),i.submit(),e&&e.length&&n.fileInput.each(function(n,i){var o=t(e[n]);t(i).prop("name",o.prop("name")),o.replaceWith(i)})}),i.append(o).appendTo(document.body)},abort:function(){o&&o.unbind("load").prop("src","javascript".concat(":false;")),i&&i.remove()}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe xml":function(e){var n=e&&e[0];return n&&t.isXMLDoc(n)?n:t.parseXML(n.XMLDocument&&n.XMLDocument.xml||t(n.body).html())},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,function(){function t(t,e){var n,i=document.createElement(t||"div");for(n in e)i[n]=e[n];return i}function e(t){for(var e=1,n=arguments.length;e<n;e++)t.appendChild(arguments[e]);return t}function n(t,e,n,i){var o=["opacity",e,~~(100*t),n,i].join("-"),r=.01+n/i*100,a=Math.max(1-(1-t)/e*(100-r),t),s=u.substring(0,u.indexOf("Animation")).toLowerCase(),l=s&&"-"+s+"-"||""
|
|
;return f[o]||(p.insertRule("@"+l+"keyframes "+o+"{0%{opacity:"+a+"}"+r+"%{opacity:"+t+"}"+(r+.01)+"%{opacity:1}"+(r+e)%100+"%{opacity:"+t+"}100%{opacity:"+a+"}}",p.cssRules.length),f[o]=1),o}function i(t,e){var n,i,o=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<h.length;i++)if(n=h[i]+e,void 0!==o[n])return n;if(void 0!==o[e])return e}function o(t,e){for(var n in e)t.style[i(t,n)||n]=e[n];return t}function r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)void 0===t[i]&&(t[i]=n[i])}return t}function a(t){for(var e={x:t.offsetLeft,y:t.offsetTop};t=t.offsetParent;)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function s(t,e){return"string"==typeof t?t:t[e%t.length]}function l(t){if(void 0===this)return new l(t);this.opts=r(t||{},l.defaults,g)}function c(){function n(e,n){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}p.addRule(".spin-vml","behavior:url(#default#VML)"),l.prototype.lines=function(t,i){function r(){return o(n("group",{coordsize:u+" "+u,coordorigin:-c+" "+-c}),{width:u,height:u})}function a(t,a,l){e(h,e(o(r(),{rotation:360/i.lines*t+"deg",left:~~a}),e(o(n("roundrect",{arcsize:i.corners}),{width:c,height:i.width,left:i.radius,top:-i.width>>1,filter:l}),n("fill",{color:s(i.color,t),opacity:i.opacity}),n("stroke",{opacity:0}))))}var l,c=i.length+i.width,u=2*c,d=2*-(i.width+i.length)+"px",h=o(r(),{position:"absolute",top:d,left:d});if(i.shadow)for(l=1;l<=i.lines;l++)a(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=i.lines;l++)a(l);return e(t,h)},l.prototype.opacity=function(t,e,n,i){var o=t.firstChild;i=i.shadow&&i.lines||0,o&&e+i<o.childNodes.length&&(o=o.childNodes[e+i],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=n))}}var u,d,h=["webkit","Moz","ms","O"],f={},p=(d=t("style",{type:"text/css"}),e(document.getElementsByTagName("head")[0],d),d.sheet||d.styleSheet),g={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:"auto",className:"spinner",top:"auto",left:"auto",position:"relative"};l.defaults={},r(l.prototype,{spin:function(e){this.stop();var n,i,r=this,s=r.opts,l=r.el=o(t(0,{className:s.className}),{position:s.position,width:0,zIndex:s.zIndex}),c=s.radius+s.length+s.width;if(e&&(e.insertBefore(l,e.firstChild||null),i=a(e),n=a(l),o(l,{left:("auto"==s.left?i.x-n.x+(e.offsetWidth>>1):parseInt(s.left,10)+c)+"px",top:("auto"==s.top?i.y-n.y+(e.offsetHeight>>1):parseInt(s.top,10)+c)+"px"})),l.setAttribute("role","progressbar"),r.lines(l,r.opts),!u){var d,h=0,f=(s.lines-1)*(1-s.direction)/2,p=s.fps,g=p/s.speed,m=(1-s.opacity)/(g*s.trail/100),b=g/s.lines;(function t(){h++;for(var e=0;e<s.lines;e++)d=Math.max(1-(h+(s.lines-e)*b)%g*m,s.opacity),r.opacity(l,e*s.direction+f,d,s);r.timeout=r.el&&setTimeout(t,~~(1e3/p))})()}return r},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(i,r){function a(e,n){return o(t(),{position:"absolute",width:r.length+r.width+"px",height:r.width+"px",background:e,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/r.lines*c+r.rotate)+"deg) translate("+r.radius+"px,0)",borderRadius:(r.corners*r.width>>1)+"px"})}for(var l,c=0,d=(r.lines-1)*(1-r.direction)/2;c<r.lines;c++)l=o(t(),{position:"absolute",top:1+~(r.width/2)+"px",transform:r.hwaccel?"translate3d(0,0,0)":"",opacity:r.opacity,animation:u&&n(r.opacity,r.trail,d+c*r.direction,r.lines)+" "+1/r.speed+"s linear infinite"}),r.shadow&&e(l,o(a("rgba(0,0,0,.25)","0 0 4px rgba(0,0,0,.5)"),{top:"2px"})),e(i,e(l,a(s(r.color,c),"0 0 1px rgba(0,0,0,.1)")));return i},opacity:function(t,e,n){e<t.childNodes.length&&(t.childNodes[e].style.opacity=n)}});var m=o(t("group"),{behavior:"url(#default#VML)"});return!i(m,"transform")&&m.adj?c():u=i(m,"animation"),l}),function(t){if("object"==typeof exports)t(require("jquery"),require("spin"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],t);else{if(!window.Spinner)throw new Error("Spin.js not present");t(window.jQuery,window.Spinner)}}(function(t,e){t.fn.spin=function(n,i){return this.each(function(){var o=t(this),r=o.data();r.spinner&&(r.spinner.stop(),delete r.spinner),!1!==n&&(n=t.extend({color:i||o.css("color")},t.fn.spin.presets[n]||n),r.spinner=new e(n).spin(this))})},t.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}),function(t){t.fn.hasScrollBar=function(){var t={},e=this.get(0);return t.vertical=e.scrollHeight>e.clientHeight,t.horizontal=e.scrollWidth>e.clientWidth,t}}(jQuery),function(t){function e(e,n){this.el=t(e),this.options=n||{},this.x=!1!==this.options.x||this.options.forceHorizontal,this.y=!1!==this.options.y||this.options.forceVertical,this.autoHide=!1!==this.options.autoHide,this.padding=null==this.options.padding?2:this.options.padding,this.inner=this.el.find(".antiscroll-inner"),this.inner.css({width:"+="+(this.y?o():0),height:"+="+(this.x?o():0)}),this.refresh()}function n(e){this.pane=e,this.pane.el.append(this.el),this.innerEl=this.pane.inner.get(0),this.dragging=!1,this.enter=!1,this.shown=!1,this.pane.el.mouseenter(t.proxy(this,"mouseenter")),this.pane.el.mouseleave(t.proxy(this,"mouseleave")),this.el.mousedown(t.proxy(this,"mousedown")),this.innerPaneScrollListener=t.proxy(this,"scroll"),this.pane.inner.scroll(this.innerPaneScrollListener),this.innerPaneMouseWheelListener=t.proxy(this,"mousewheel"),this.pane.inner.bind("mousewheel",this.innerPaneMouseWheelListener);var n=this.pane.options.initialDisplay;!1!==n&&(this.show(),this.pane.autoHide&&(this.hiding=setTimeout(t.proxy(this,"hide"),parseInt(n,10)||3e3)))}function i(t,e){function n(){}n.prototype=e.prototype,t.prototype=new n}function o(){if(void 0===r){var e=t('<div class="antiscroll-inner" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;width:100%"></div>');t("body").append(e);var n=t(e).innerWidth(),i=t("div",e).innerWidth();t(e).remove(),r=n-i}return r}var r;t.fn.antiscroll=function(e){return this.each(function(){t(this).data("antiscroll")&&t(this).data("antiscroll").destroy(),t(this).data("antiscroll",new t.Antiscroll(this,e))})},t.Antiscroll=e,e.prototype.refresh=function(){var t=this.inner.get(0).scrollWidth>this.el.width()+(this.y?o():0),e=this.inner.get(0).scrollHeight>this.el.height()+(this.x?o():0);this.x&&(!this.horizontal&&t?this.horizontal=new n.Horizontal(this):this.horizontal&&!t?(this.horizontal.destroy(),this.horizontal=null):this.horizontal&&this.horizontal.update()),this.y&&(!this.vertical&&e?this.vertical=new n.Vertical(this):this.vertical&&!e?(this.vertical.destroy(),this.vertical=null):this.vertical&&this.vertical.update())},e.prototype.destroy=function(){return this.horizontal&&(this.horizontal.destroy(),this.horizontal=null),this.vertical&&(this.vertical.destroy(),this.vertical=null),this},e.prototype.rebuild=function(){return this.destroy(),this.inner.attr("style",""),e.call(this,this.el,this.options),this},n.prototype.destroy=function(){return this.el.remove(),this.pane.inner.unbind("scroll",this.innerPaneScrollListener),this.pane.inner.unbind("mousewheel",this.innerPaneMouseWheelListener),this},n.prototype.mouseenter=function(){this.enter=!0,this.show()},n.prototype.mouseleave=function(){this.enter=!1,this.dragging||this.pane.autoHide&&this.hide()},n.prototype.scroll=function(){this.shown||(this.show(),this.enter||this.dragging||this.pane.autoHide&&(this.hiding=setTimeout(t.proxy(this,"hide"),1500))),this.update()},n.prototype.mousedown=function(e){e.preventDefault(),this.dragging=!0,this.startPageY=e.pageY-parseInt(this.el.css("top"),10),this.startPageX=e.pageX-parseInt(this.el.css("left"),10),this.el[0].ownerDocument.onselectstart=function(){return!1};this.pane;var n=t.proxy(this,"mousemove"),i=this;t(this.el[0].ownerDocument).mousemove(n).mouseup(function(){i.dragging=!1,this.onselectstart=null,t(this).unbind("mousemove",n),i.enter||i.hide()})},n.prototype.show=function(t){!this.shown&&this.update()&&(this.el.addClass("antiscroll-scrollbar-shown"),this.hiding&&(clearTimeout(this.hiding),this.hiding=null),this.shown=!0)},n.prototype.hide=function(){!1!==this.pane.autoHide&&this.shown&&(this.el.removeClass("antiscroll-scrollbar-shown"),this.shown=!1)},n.Horizontal=function(e){this.el=t('<div class="antiscroll-scrollbar antiscroll-scrollbar-horizontal">',e.el),n.call(this,e)},i(n.Horizontal,n),n.Horizontal.prototype.update=function(){var t=this.pane.el.width(),e=t-2*this.pane.padding,n=this.pane.inner.get(0);return this.el.css("width",e*t/n.scrollWidth).css("left",e*n.scrollLeft/n.scrollWidth),t<n.scrollWidth},n.Horizontal.prototype.mousemove=function(t){var e=this.pane.el.width()-2*this.pane.padding,n=t.pageX-this.startPageX,i=this.el.width(),o=this.pane.inner.get(0),r=Math.min(Math.max(n,0),e-i);o.scrollLeft=(o.scrollWidth-this.pane.el.width())*r/(e-i)},n.Horizontal.prototype.mousewheel=function(t,e,n,i){if(n<0&&0==this.pane.inner.get(0).scrollLeft||n>0&&this.innerEl.scrollLeft+Math.ceil(this.pane.el.width())==this.innerEl.scrollWidth)return t.preventDefault(),!1},n.Vertical=function(e){this.el=t('<div class="antiscroll-scrollbar antiscroll-scrollbar-vertical">',e.el),n.call(this,e)},i(n.Vertical,n),n.Vertical.prototype.update=function(){var t=this.pane.el.height(),e=t-2*this.pane.padding,n=this.innerEl,i=e*t/n.scrollHeight;i=i<20?20:i;var o=e*n.scrollTop/n.scrollHeight;if(o+i>e){var r=o+i-e;o=o-r-3}return this.el.css("height",i).css("top",o),t<n.scrollHeight},n.Vertical.prototype.mousemove=function(t){var e=this.pane.el.height(),n=e-2*this.pane.padding,i=t.pageY-this.startPageY,o=this.el.height(),r=this.innerEl,a=Math.min(Math.max(i,0),n-o);r.scrollTop=(r.scrollHeight-e)*a/(n-o)},n.Vertical.prototype.mousewheel=function(t,e,n,i){if(i>0&&0==this.innerEl.scrollTop||i<0&&this.innerEl.scrollTop+Math.ceil(this.pane.el.height())==this.innerEl.scrollHeight)return t.preventDefault(),!1}}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var o,r=e||window.event,a=[].slice.call(arguments,1),s=0,l=0,c=0,u=0,d=0;return e=t.event.fix(r),e.type="mousewheel",r.wheelDelta&&(s=r.wheelDelta),r.detail&&(s=-1*r.detail),r.deltaY&&(c=-1*r.deltaY,s=c),r.deltaX&&(l=r.deltaX,s=-1*l),void 0!==r.wheelDeltaY&&(c=r.wheelDeltaY),void 0!==r.wheelDeltaX&&(l=-1*r.wheelDeltaX),u=Math.abs(s),(!n||u<n)&&(n=u),d=Math.max(Math.abs(c),Math.abs(l)),(!i||d<i)&&(i=d),o=s>0?"floor":"ceil",s=Math[o](s/n),l=Math[o](l/i),c=Math[o](c/i),a.unshift(e,s,l,c),(t.event.dispatch||t.event.handle).apply(this,a)}var n,i,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(t.event.fixHooks)for(var a=o.length;a;)t.event.fixHooks[o[--a]]=t.event.mouseHooks;t.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],e,!1);else this.onmousewheel=null}},t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){t.fn.delayedAction=function(e){var n=t.extend({},{delayedAction:function(){},cancelledAction:function(){},hoverTime:1e3},e);return this.each(function(){var e=t(this);e.hover(function(){e.data("timerId",setTimeout(function(){e.data("hover",!1),n.delayedAction(e)},n.hoverTime)),e.data("hover",!0)},function(){e.data("hover")&&(clearTimeout(e.data("timerId")),n.cancelledAction(e)),e.data("hover",!1)})})}}(jQuery),function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;try{e=window}catch(t){e=self}e.SparkMD5=t()}}(function(t){"use strict";function e(t,e,n,i,o,r){return e=v(v(e,t),v(i,r)),v(e<<o|e>>>32-o,n)}function n(t,n,i,o,r,a,s){return e(n&i|~n&o,t,n,r,a,s)}function i(t,n,i,o,r,a,s){return e(n&o|i&~o,t,n,r,a,s)}function o(t,n,i,o,r,a,s){return e(n^i^o,t,n,r,a,s)}function r(t,n,i,o,r,a,s){return e(i^(n|~o),t,n,r,a,s)}function a(t,e){var a=t[0],s=t[1],l=t[2],c=t[3];a=n(a,s,l,c,e[0],7,-680876936),c=n(c,a,s,l,e[1],12,-389564586),l=n(l,c,a,s,e[2],17,606105819),s=n(s,l,c,a,e[3],22,-1044525330),a=n(a,s,l,c,e[4],7,-176418897),c=n(c,a,s,l,e[5],12,1200080426),l=n(l,c,a,s,e[6],17,-1473231341),s=n(s,l,c,a,e[7],22,-45705983),a=n(a,s,l,c,e[8],7,1770035416),c=n(c,a,s,l,e[9],12,-1958414417),l=n(l,c,a,s,e[10],17,-42063),s=n(s,l,c,a,e[11],22,-1990404162),a=n(a,s,l,c,e[12],7,1804603682),c=n(c,a,s,l,e[13],12,-40341101),l=n(l,c,a,s,e[14],17,-1502002290),s=n(s,l,c,a,e[15],22,1236535329),a=i(a,s,l,c,e[1],5,-165796510),c=i(c,a,s,l,e[6],9,-1069501632),l=i(l,c,a,s,e[11],14,643717713),s=i(s,l,c,a,e[0],20,-373897302),a=i(a,s,l,c,e[5],5,-701558691),c=i(c,a,s,l,e[10],9,38016083),l=i(l,c,a,s,e[15],14,-660478335),s=i(s,l,c,a,e[4],20,-405537848),a=i(a,s,l,c,e[9],5,568446438),c=i(c,a,s,l,e[14],9,-1019803690),l=i(l,c,a,s,e[3],14,-187363961),s=i(s,l,c,a,e[8],20,1163531501),a=i(a,s,l,c,e[13],5,-1444681467),c=i(c,a,s,l,e[2],9,-51403784),l=i(l,c,a,s,e[7],14,1735328473),s=i(s,l,c,a,e[12],20,-1926607734),a=o(a,s,l,c,e[5],4,-378558),c=o(c,a,s,l,e[8],11,-2022574463),l=o(l,c,a,s,e[11],16,1839030562),s=o(s,l,c,a,e[14],23,-35309556),a=o(a,s,l,c,e[1],4,-1530992060),c=o(c,a,s,l,e[4],11,1272893353),l=o(l,c,a,s,e[7],16,-155497632),s=o(s,l,c,a,e[10],23,-1094730640),a=o(a,s,l,c,e[13],4,681279174),c=o(c,a,s,l,e[0],11,-358537222),l=o(l,c,a,s,e[3],16,-722521979),s=o(s,l,c,a,e[6],23,76029189),a=o(a,s,l,c,e[9],4,-640364487),c=o(c,a,s,l,e[12],11,-421815835),l=o(l,c,a,s,e[15],16,530742520),s=o(s,l,c,a,e[2],23,-995338651),a=r(a,s,l,c,e[0],6,-198630844),c=r(c,a,s,l,e[7],10,1126891415),l=r(l,c,a,s,e[14],15,-1416354905),s=r(s,l,c,a,e[5],21,-57434055),a=r(a,s,l,c,e[12],6,1700485571),c=r(c,a,s,l,e[3],10,-1894986606),l=r(l,c,a,s,e[10],15,-1051523),s=r(s,l,c,a,e[1],21,-2054922799),a=r(a,s,l,c,e[8],6,1873313359),c=r(c,a,s,l,e[15],10,-30611744),l=r(l,c,a,s,e[6],15,-1560198380),s=r(s,l,c,a,e[13],21,1309151649),a=r(a,s,l,c,e[4],6,-145523070),c=r(c,a,s,l,e[11],10,-1120210379),l=r(l,c,a,s,e[2],15,718787259),s=r(s,l,c,a,e[9],21,-343485551),t[0]=v(a,t[0]),t[1]=v(s,t[1]),t[2]=v(l,t[2]),t[3]=v(c,t[3])}function s(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function l(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function c(t){var e,n,i,o,r,l,c=t.length,u=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)a(u,s(t.substring(e-64,e)));for(t=t.substring(e-64),n=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(a(u,i),e=0;e<16;e+=1)i[e]=0;return o=8*c,o=o.toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(o[2],16),l=parseInt(o[1],16)||0,i[14]=r,i[15]=l,a(u,i),u}function u(t){var e,n,i,o,r,s,c=t.length,u=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)a(u,l(t.subarray(e-64,e)));for(t=e-64<c?t.subarray(e-64):new Uint8Array(0),n=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t[e]<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(a(u,i),e=0;e<16;e+=1)i[e]=0;return o=8*c,o=o.toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(o[2],16),s=parseInt(o[1],16)||0,i[14]=r,i[15]=s,a(u,i),u}function d(t){var e,n="";for(e=0;e<4;e+=1)n+=y[t>>8*e+4&15]+y[t>>8*e&15];return n}function h(t){var e;for(e=0;e<t.length;e+=1)t[e]=d(t[e]);return t.join("")}function f(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function p(t,e){var n,i=t.length,o=new ArrayBuffer(i),r=new Uint8Array(o);for(n=0;n<i;n++)r[n]=t.charCodeAt(n);return e?r:o}function g(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function m(t,e,n){var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t)),i.set(new Uint8Array(e),t.byteLength),n?i:i.buffer}function b(){this.reset()}var v=function(t,e){return t+e&4294967295},y=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return"5d41402abc4b2a76b9719d911017c592"!==h(c("hello"))&&(v=function(t,e){var n=(65535&t)+(65535&e),i=(t>>16)+(e>>16)+(n>>16);return i<<16|65535&n}),b.prototype.append=function(t){return this.appendBinary(f(t)),this},b.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,n=this._buff.length;for(e=64;e<=n;e+=64)a(this._hash,s(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},b.prototype.end=function(t){var e,n,i=this._buff,o=i.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<o;e+=1)r[e>>2]|=i.charCodeAt(e)<<(e%4<<3);return this._finish(r,o),n=t?this._hash:h(this._hash),this.reset(),n},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},b.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(t,e){var n,i,o,r=e;if(t[r>>2]|=128<<(r%4<<3),r>55)for(a(this._hash,t),r=0;r<16;r+=1)t[r]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,t[14]=i,t[15]=o,a(this._hash,t)},b.hash=function(t,e){return b.hashBinary(f(t),e)},b.hashBinary=function(t,e){var n=c(t);return e?n:h(n)},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(t){var e,n=m(this._buff.buffer,t,!0),i=n.length;for(this._length+=t.byteLength,e=64;e<=i;e+=64)a(this._hash,l(n.subarray(e-64,e)));return this._buff=e-64<i?n.subarray(e-64):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(t){var e,n,i=this._buff,o=i.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<o;e+=1)r[e>>2]|=i[e]<<(e%4<<3);return this._finish(r,o),n=t?this._hash:h(this._hash),this.reset(),n},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var t=b.prototype.getState.call(this);return t.buff=g(t.buff),t},b.ArrayBuffer.prototype.setState=function(t){return t.buff=p(t.buff,!0),b.prototype.setState.call(this,t)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(t,e){var n=u(new Uint8Array(t));return e?n:h(n)},b}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){return function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return o(n||t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){var i=t("matches-selector");e.exports=function(t,e,n){for(var o=n?t:t.parentNode;o&&o!==document;){if(i(o,e))return o;o=o.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function i(t,e,n,i,r){var a=o.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function o(t,e,n,i){return function(n){n.delegateTarget=r(n.target,e,!0),n.delegateTarget&&i.call(t,n)}}var r=t("closest");e.exports=i},{closest:1}],3:[function(t,e,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){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function i(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!s.string(e))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(t))return o(t,e,n);if(s.nodeList(t))return r(t,e,n);if(s.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return l(document.body,t,e,n)}var s=t("./is"),l=t("delegate");e.exports=i},{"./is":3,delegate:2}],5:[function(t,e,n){function i(t,e){if(r)return r.call(t,e);for(var n=t.parentNode.querySelectorAll(e),i=0;i<n.length;++i)if(n[i]==t)return!0;return!1}var o=Element.prototype,r=o.matchesSelector||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;e.exports=i},{}],6:[function(t,e,n){function i(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(t),n.removeAllRanges(),n.addRange(i),e=n.toString()}return e}e.exports=i},{}],7:[function(t,e,n){function i(){}i.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function i(){o.off(t,i),e.apply(n,arguments)}var o=this;return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,o=n.length;o>i;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],o=[];if(i&&e)for(var r=0,a=i.length;a>r;r++)i[r].fn!==e&&i[r].fn._!==e&&o.push(i[r]);return o.length?n[t]=o:delete n[t],this}},e.exports=i},{}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("select"),s=i(a),l=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""},t.prototype.initSelection=function(){if(this.text&&this.target)throw new Error('Multiple attributes declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!this.target)throw new Error('Missing required attributes, use either "target" or "text"');this.selectTarget()}},t.prototype.selectFake=function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){return t.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=s.default(this.fakeElem),this.copyText()},t.prototype.removeFake=function(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function(){this.selectedText=s.default(this.target),this.copyText()},t.prototype.copyText=function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)},t.prototype.handleResult=function(t){t?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function(){this.removeFake()},r(t,[{key:"action",set:function(){var t=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!=typeof t||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');this._target=t}},get:function(){return this._target}}]),t}();n.default=l,e.exports=n.default},{select:6}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}n.__esModule=!0;var s=t("./clipboard-action"),l=i(s),c=t("tiny-emitter"),u=i(c),d=t("good-listener"),h=i(d),f=function(t){function e(n,i){o(this,e),t.call(this),this.resolveOptions(i),this.listenClick(n)}return r(e,t),e.prototype.resolveOptions=function(){var t=arguments.length<=0||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},e.prototype.listenClick=function(t){var e=this;this.listener=h.default(t,"click",function(t){return e.onClick(t)})},e.prototype.onClick=function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),trigger:e,emitter:this})},e.prototype.defaultAction=function(t){return a("action",t)},e.prototype.defaultTarget=function(t){var e=a("target",t);return e?document.querySelector(e):void 0},e.prototype.defaultText=function(t){return a("text",t)},e.prototype.destroy=function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(u.default);n.default=f,e.exports=n.default},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)}); |