",{text:t})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(t,n){var o=this,i=new RegExp("^data-"+n+"-(.*)"),a={};return t&&t.attributes&&e.each(t.attributes,function(){var t=this.name.match(i);if(t){var n=this.value,r=e.camelCase(t[1]);if(e.inArray(r,o.functionAttributes)>=0)n=new Function(n);else try{n=JSON.parse(n)}catch(s){}a[r]=n}}),a},extend:function(t,n){var o=function(){this.constructor=t};return o.prototype=this.prototype,t.prototype=new o,t.__super__=this.prototype,e.extend(t,this,n),t.defaults=t.prototype,t},attach:function(t,n,o){var i=this;"object"!=typeof n||n instanceof e!=!1||o||(o=n,n=void 0),o=e.extend({},o);var a,r=o.namespace||i.defaults.namespace,s=e.extend({},i.defaults,i.readElementConfig(t[0],r),o),c=function(r){var c=e(r.currentTarget),l=e.extend({$source:t,$currentTarget:c},i.readElementConfig(t[0],s.namespace),i.readElementConfig(r.currentTarget,s.namespace),o),u=a||c.data("featherlight-persisted")||new i(n,l);
"shared"===u.persist?a=u:u.persist!==!1&&c.data("featherlight-persisted",u),l.$currentTarget.blur&&l.$currentTarget.blur(),u.open(r)};return t.on(s.openTrigger+"."+s.namespace,s.filter,c),{filter:s.filter,handler:c}},current:function(){var e=this.opened();return e[e.length-1]||null},opened:function(){var t=this;return a(),e.grep(i,function(e){return e instanceof t})},close:function(e){var t=this.current();if(t)return t.close(e)},_onReady:function(){var t=this;if(t.autoBind){var n=e(t.autoBind);n.each(function(){t.attach(e(this))}),e(document).on("click",t.autoBind,function(o){if(!o.isDefaultPrevented()){var i=e(o.currentTarget),a=n.length;if(n=n.add(i),a!==n.length){var r=t.attach(i);(!r.filter||e(o.target).parentsUntil(i,r.filter).length>0)&&r.handler(o)}}})}},_callbackChain:{onKeyUp:function(t,n){return 27===n.keyCode?(this.closeOnEsc&&e.featherlight.close(n),!1):t(n)},beforeOpen:function(t,n){return e(document.documentElement).addClass("with-featherlight"),this._previouslyActive=document.activeElement,this._$previouslyTabbable=e("a, input, select, textarea, iframe, button, iframe, [contentEditable=true]").not("[tabindex]").not(this.$instance.find("button")),this._$previouslyWithTabIndex=e("[tabindex]").not('[tabindex="-1"]'),this._previousWithTabIndices=this._$previouslyWithTabIndex.map(function(t,n){return e(n).attr("tabindex")}),this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr("tabindex",-1),document.activeElement.blur&&document.activeElement.blur(),t(n)},afterClose:function(n,o){var i=n(o),a=this;return this._$previouslyTabbable.removeAttr("tabindex"),this._$previouslyWithTabIndex.each(function(t,n){e(n).attr("tabindex",a._previousWithTabIndices[t])}),this._previouslyActive.focus(),0===t.opened().length&&e(document.documentElement).removeClass("with-featherlight"),i},onResize:function(e,t){return this.resize(this.$content.naturalWidth,this.$content.naturalHeight),e(t)},afterContent:function(e,t){var n=e(t);return this.$instance.find("[autofocus]:not([disabled])").focus(),this.onResize(t),n}}}),e.featherlight=t,e.fn.featherlight=function(e,n){return t.attach(this,e,n),this},e(document).ready(function(){t._onReady()})}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){"use strict";function t(e){for(var t,n=e.split(/\s+/),o=[],i=0;t=n[i];i++)t=t.charAt(0).toUpperCase(),o.push(t);return o}function n(t){return t.id&&e('label[for="'+t.id+'"]').val()||t.name}function o(t,i,a){return a||(a=0),i.each(function(){var i,r,s=e(this),c=this,l=this.nodeName.toLowerCase();switch("label"===l&&s.find("input, textarea, select").length&&(i=s.text(),s=s.children().first(),c=s.get(0),l=c.nodeName.toLowerCase()),l){case"menu":r={name:s.attr("label"),items:{}},a=o(r.items,s.children(),a);break;case"a":case"button":r={name:s.text(),disabled:!!s.attr("disabled"),callback:function(){return function(){s.click()}}()};break;case"menuitem":case"command":switch(s.attr("type")){case void 0:case"command":case"menuitem":r={name:s.attr("label"),disabled:!!s.attr("disabled"),icon:s.attr("icon"),callback:function(){return function(){s.click()}}()};break;case"checkbox":r={type:"checkbox",disabled:!!s.attr("disabled"),name:s.attr("label"),selected:!!s.attr("checked")};break;case"radio":r={type:"radio",disabled:!!s.attr("disabled"),name:s.attr("label"),radio:s.attr("radiogroup"),value:s.attr("id"),selected:!!s.attr("checked")};break;default:r=void 0}break;case"hr":r="-------";break;case"input":switch(s.attr("type")){case"text":r={type:"text",name:i||n(c),disabled:!!s.attr("disabled"),value:s.val()};break;case"checkbox":r={type:"checkbox",name:i||n(c),disabled:!!s.attr("disabled"),selected:!!s.attr("checked")};break;case"radio":r={type:"radio",name:i||n(c),disabled:!!s.attr("disabled"),radio:!!s.attr("name"),value:s.val(),selected:!!s.attr("checked")};break;default:r=void 0}break;case"select":r={type:"select",name:i||n(c),disabled:!!s.attr("disabled"),selected:s.val(),options:{}},s.children().each(function(){r.options[this.value]=e(this).text()});break;case"textarea":r={type:"textarea",name:i||n(c),disabled:!!s.attr("disabled"),value:s.val()};break;case"label":break;default:r={type:"html",html:s.clone(!0)}}r&&(a++,t["key"+a]=r)}),a}e.support.htmlMenuitem="HTMLMenuItemElement"in window,e.support.htmlCommand="HTMLCommandElement"in window,e.support.eventSelectstart="onselectstart"in document.documentElement,e.ui&&e.widget||(e.cleanData=function(t){return function(n){var o,i,a;for(a=0;null!=(i=n[a]);a++)try{o=e._data(i,"events"),o&&o.remove&&e(i).triggerHandler("remove")}catch(r){}t(n)}}(e.cleanData));var i=null,a=!1,r=e(window),s=0,c={},l={},u={},d={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!0,classNames:{hover:"hover",disabled:"disabled",visible:"visible",notSelectable:"not-selectable",icon:"icon",iconEdit:"icon-edit",iconCut:"icon-cut",iconCopy:"icon-copy",iconPaste:"icon-paste",iconDelete:"icon-delete",iconAdd:"icon-add",iconQuit:"icon-quit"},determinePosition:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css("display","none");else{var n=this.offset();n.top+=this.outerHeight(),n.left+=this.outerWidth()/2-t.outerWidth()/2,t.css(n)}},position:function(e,t,n){var o;if(!t&&!n)return void e.determinePosition.call(this,e.$menu);o="maintain"===t&&"maintain"===n?e.$menu.position():{top:n,left:t};var i=r.scrollTop()+r.height(),a=r.scrollLeft()+r.width(),s=e.$menu.outerHeight(),c=e.$menu.outerWidth();o.top+s>i&&(o.top-=s),o.top<0&&(o.top=0),o.left+c>a&&(o.left-=c),o.left<0&&(o.left=0),e.$menu.css(o)},positionSubmenu:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:0,left:this.outerWidth()};t.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{show:e.noop,hide:e.noop},callback:null,items:{}},f={timer:null,pageX:null,pageY:null},h=function(e){for(var t=0,n=e;;)if(t=Math.max(t,parseInt(n.css("z-index"),10)||0),n=n.parent(),!n||!n.length||"html body".indexOf(n.prop("nodeName").toLowerCase())>-1)break;return t},p={abortevent:function(e){e.preventDefault(),e.stopImmediatePropagation()},contextmenu:function(t){var n=e(this);if("right"===t.data.trigger&&(t.preventDefault(),t.stopImmediatePropagation()),!("right"!==t.data.trigger&&"demand"!==t.data.trigger&&t.originalEvent||!(void 0===t.mouseButton||!t.data||"left"==t.data.trigger&&0===t.mouseButton||"right"==t.data.trigger&&2===t.mouseButton)||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(i=n,t.data.build){var o=t.data.build(i,t);if(o===!1)return;if(t.data=e.extend(!0,{},d,t.data,o||{}),!t.data.items||e.isEmptyObject(t.data.items))throw window.console&&(console.error||console.log).call(console,"No items specified to show in contextMenu"),new Error("No Items specified");t.data.$trigger=i,m.create(t.data)}var a=!1;for(var r in t.data.items)if(t.data.items.hasOwnProperty(r)){var s;s=e.isFunction(t.data.items[r].visible)?t.data.items[r].visible.call(e(t.currentTarget),r,t.data):"undefined"==typeof r.visible||t.data.items[r].visible===!0,s&&(a=!0)}a&&m.show.call(n,t.data,t.pageX,t.pageY)}},click:function(t){t.preventDefault(),t.stopImmediatePropagation(),e(this).trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))},mousedown:function(t){var n=e(this);i&&i.length&&!i.is(n)&&i.data("contextMenu").$menu.trigger("contextmenu:hide"),2===t.button&&(i=n.data("contextMenuActive",!0))},mouseup:function(t){var n=e(this);n.data("contextMenuActive")&&i&&i.length&&i.is(n)&&!n.hasClass("context-menu-disabled")&&(t.preventDefault(),t.stopImmediatePropagation(),i=n,n.trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(t){var n=e(this),o=e(t.relatedTarget),a=e(document);o.is(".context-menu-list")||o.closest(".context-menu-list").length||i&&i.length||(f.pageX=t.pageX,f.pageY=t.pageY,f.data=t.data,a.on("mousemove.contextMenuShow",p.mousemove),f.timer=setTimeout(function(){f.timer=null,a.off("mousemove.contextMenuShow"),i=n,n.trigger(e.Event("contextmenu",{data:f.data,pageX:f.pageX,pageY:f.pageY}))},t.data.delay))},mousemove:function(e){f.pageX=e.pageX,f.pageY=e.pageY},mouseleave:function(t){var n=e(t.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(f.timer)}catch(t){}f.timer=null}},layerClick:function(t){var n,o,i=e(this),a=i.data("contextMenuRoot"),s=t.button,c=t.pageX,l=t.pageY;t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){var i,u="left"===a.trigger&&0===s||"right"===a.trigger&&2===s;if(document.elementFromPoint&&a.$layer&&(a.$layer.hide(),n=document.elementFromPoint(c-r.scrollLeft(),l-r.scrollTop()),a.$layer.show()),a.reposition&&u)if(document.elementFromPoint){if(a.$trigger.is(n)||a.$trigger.has(n).length)return void a.position.call(a.$trigger,a,c,l)}else if(o=a.$trigger.offset(),i=e(window),o.top+=i.scrollTop(),o.top<=t.pageY&&(o.left+=i.scrollLeft(),o.left<=t.pageX&&(o.bottom=o.top+a.$trigger.outerHeight(),o.bottom>=t.pageY&&(o.right=o.left+a.$trigger.outerWidth(),o.right>=t.pageX))))return void a.position.call(a.$trigger,a,c,l);n&&u&&a.$trigger.one("contextmenu:hidden",function(){e(n).contextMenu({x:c,y:l,button:s})}),a.$menu.trigger("contextmenu:hide")},50)},keyStop:function(e,t){t.isInput||e.preventDefault(),e.stopPropagation()},key:function(e){var t={};switch(i&&(t=i.data("contextMenu")||{}),e.keyCode){case 9:case 38:if(p.keyStop(e,t),t.isInput){if(9===e.keyCode&&e.shiftKey)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("prevcommand");if(38===e.keyCode&&"checkbox"===t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault()}else if(9!==e.keyCode||e.shiftKey)return void t.$menu.trigger("prevcommand");case 40:if(p.keyStop(e,t),!t.isInput)return void t.$menu.trigger("nextcommand");if(9===e.keyCode)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("nextcommand");if(40===e.keyCode&&"checkbox"===t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault();break;case 37:if(p.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;if(!t.$selected.parent().hasClass("context-menu-root")){var n=t.$selected.parent().parent();return t.$selected.trigger("contextmenu:blur"),void(t.$selected=n)}break;case 39:if(p.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;var o=t.$selected.data("contextMenu")||{};if(o.$menu&&t.$selected.hasClass("context-menu-submenu"))return t.$selected=null,o.$selected=null,void o.$menu.trigger("nextcommand");break;case 35:case 36:return t.$selected&&t.$selected.find("input, textarea, select").length?void 0:((t.$selected&&t.$selected.parent()||t.$menu).children(":not(."+t.classNames.disabled+", ."+t.classNames.notSelectable+")")[36===e.keyCode?"first":"last"]().trigger("contextmenu:focus"),void e.preventDefault());case 13:if(p.keyStop(e,t),t.isInput){if(t.$selected&&!t.$selected.is("textarea, select"))return void e.preventDefault();break}return void("undefined"!=typeof t.$selected&&null!==t.$selected&&t.$selected.trigger("mouseup"));case 32:case 33:case 34:return void p.keyStop(e,t);case 27:return p.keyStop(e,t),void t.$menu.trigger("contextmenu:hide");default:var a=String.fromCharCode(e.keyCode).toUpperCase();if(t.accesskeys&&t.accesskeys[a])return void t.accesskeys[a].$node.trigger(t.accesskeys[a].$menu?"contextmenu:focus":"mouseup")}e.stopPropagation(),"undefined"!=typeof t.$selected&&null!==t.$selected&&t.$selected.trigger(e)},prevItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{},o=e(this).data("contextMenuRoot")||{};if(n.$selected){var i=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=i}for(var a=n.$menu.children(),r=n.$selected&&n.$selected.prev().length?n.$selected.prev():a.last(),s=r;r.hasClass(o.classNames.disabled)||r.hasClass(o.classNames.notSelectable);)if(r=r.prev().length?r.prev():a.last(),r.is(s))return;n.$selected&&p.itemMouseleave.call(n.$selected.get(0),t),p.itemMouseenter.call(r.get(0),t);var c=r.find("input, textarea, select");c.length&&c.focus()},nextItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{},o=e(this).data("contextMenuRoot")||{};if(n.$selected){var i=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=i}for(var a=n.$menu.children(),r=n.$selected&&n.$selected.next().length?n.$selected.next():a.first(),s=r;r.hasClass(o.classNames.disabled)||r.hasClass(o.classNames.notSelectable);)if(r=r.next().length?r.next():a.first(),r.is(s))return;n.$selected&&p.itemMouseleave.call(n.$selected.get(0),t),p.itemMouseenter.call(r.get(0),t);var c=r.find("input, textarea, select");c.length&&c.focus()},focusInput:function(){var t=e(this).closest(".context-menu-item"),n=t.data(),o=n.contextMenu,i=n.contextMenuRoot;i.$selected=o.$selected=t,i.isInput=o.isInput=!0},blurInput:function(){var t=e(this).closest(".context-menu-item"),n=t.data(),o=n.contextMenu,i=n.contextMenuRoot;i.isInput=o.isInput=!1},menuMouseenter:function(){var t=e(this).data().contextMenuRoot;t.hovering=!0},menuMouseleave:function(t){var n=e(this).data().contextMenuRoot;n.$layer&&n.$layer.is(t.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(t){var n=e(this),o=n.data(),i=o.contextMenu,a=o.contextMenuRoot;return a.hovering=!0,t&&a.$layer&&a.$layer.is(t.relatedTarget)&&(t.preventDefault(),t.stopImmediatePropagation()),(i.$menu?i:a).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass(a.classNames.disabled)||n.hasClass(a.classNames.notSelectable)?void(i.$selected=null):void n.trigger("contextmenu:focus")},itemMouseleave:function(t){var n=e(this),o=n.data(),i=o.contextMenu,a=o.contextMenuRoot;return a!==i&&a.$layer&&a.$layer.is(t.relatedTarget)?("undefined"!=typeof a.$selected&&null!==a.$selected&&a.$selected.trigger("contextmenu:blur"),t.preventDefault(),t.stopImmediatePropagation(),void(a.$selected=i.$selected=i.$node)):void n.trigger("contextmenu:blur")},itemClick:function(t){var n,o=e(this),i=o.data(),a=i.contextMenu,r=i.contextMenuRoot,s=i.contextMenuKey;if(a.items[s]&&!o.is("."+r.classNames.disabled+", .context-menu-submenu, .context-menu-separator, ."+r.classNames.notSelectable)){if(t.preventDefault(),t.stopImmediatePropagation(),e.isFunction(r.callbacks[s])&&Object.prototype.hasOwnProperty.call(r.callbacks,s))n=r.callbacks[s];else{if(!e.isFunction(r.callback))return;n=r.callback}n.call(r.$trigger,s,r)!==!1?r.$menu.trigger("contextmenu:hide"):r.$menu.parent().length&&m.update.call(r.$trigger,r)}},inputClick:function(e){e.stopImmediatePropagation()},hideMenu:function(t,n){var o=e(this).data("contextMenuRoot");m.hide.call(o.$trigger,o,n&&n.force)},focusItem:function(t){t.stopPropagation();var n=e(this),o=n.data(),i=o.contextMenu,a=o.contextMenuRoot;n.addClass([a.classNames.hover,a.classNames.visible].join(" ")).siblings().removeClass(a.classNames.visible).filter(a.classNames.hover).trigger("contextmenu:blur"),i.$selected=a.$selected=n,i.$node&&a.positionSubmenu.call(i.$node,i.$menu)},blurItem:function(t){t.stopPropagation();var n=e(this),o=n.data(),i=o.contextMenu,a=o.contextMenuRoot;i.autoHide&&n.removeClass(a.classNames.visible),n.removeClass(a.classNames.hover),i.$selected=null}},m={show:function(t,n,o){var a=e(this),r={};return e("#context-menu-layer").trigger("mousedown"),t.$trigger=a,t.events.show.call(a,t)===!1?void(i=null):(m.update.call(a,t),t.position.call(a,t,n,o),t.zIndex&&(r.zIndex=h(a)+t.zIndex),m.layer.call(t.$menu,t,r.zIndex),t.$menu.find("ul").css("zIndex",r.zIndex+1),t.$menu.css(r)[t.animation.show](t.animation.duration,function(){a.trigger("contextmenu:visible")}),a.data("contextMenu",t).addClass("context-menu-active"),e(document).off("keydown.contextMenu").on("keydown.contextMenu",p.key),void(t.autoHide&&e(document).on("mousemove.contextMenuAutoHide",function(e){var n=a.offset();n.right=n.left+a.outerWidth(),n.bottom=n.top+a.outerHeight(),!t.$layer||t.hovering||e.pageX>=n.left&&e.pageX<=n.right&&e.pageY>=n.top&&e.pageY<=n.bottom||t.$menu.trigger("contextmenu:hide")})))},hide:function(t,n){var o=e(this);if(t||(t=o.data("contextMenu")||{}),n||!t.events||t.events.hide.call(o,t)!==!1){if(o.removeData("contextMenu").removeClass("context-menu-active"),t.$layer){setTimeout(function(e){return function(){e.remove()}}(t.$layer),10);try{delete t.$layer}catch(a){t.$layer=null}}i=null,t.$menu.find("."+t.classNames.hover).trigger("contextmenu:blur"),t.$selected=null,e(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),t.$menu&&t.$menu[t.animation.hide](t.animation.duration,function(){t.build&&(t.$menu.remove(),e.each(t,function(e){switch(e){case"ns":case"selector":case"build":case"trigger":return!0;default:t[e]=void 0;try{delete t[e]}catch(n){}return!0}})),setTimeout(function(){o.trigger("contextmenu:hidden")},10)})}},create:function(n,o){function i(t){var n=e("
");return t._accesskey?(t._beforeAccesskey&&n.append(document.createTextNode(t._beforeAccesskey)),e("
").addClass("context-menu-accesskey").text(t._accesskey).appendTo(n),t._afterAccesskey&&n.append(document.createTextNode(t._afterAccesskey))):n.text(t.name),n}void 0===o&&(o=n),n.$menu=e('').addClass(n.className||"").data({contextMenu:n,contextMenuRoot:o}),e.each(["callbacks","commands","inputs"],function(e,t){n[t]={},o[t]||(o[t]={})}),o.accesskeys||(o.accesskeys={}),e.each(n.items,function(a,r){var s=e('').addClass(r.className||""),c=null,l=null;if(s.on("click",e.noop),"string"==typeof r&&(r={type:"cm_seperator"}),r.$node=s.data({contextMenu:n,contextMenuRoot:o,contextMenuKey:a}),"undefined"!=typeof r.accesskey)for(var d,f=t(r.accesskey),h=0;d=f[h];h++)if(!o.accesskeys[d]){o.accesskeys[d]=r;var v=r.name.match(new RegExp("^(.*?)("+d+")(.*)$","i"));v&&(r._beforeAccesskey=v[1],r._accesskey=v[2],r._afterAccesskey=v[3]);break}if(r.type&&u[r.type])u[r.type].call(s,r,n,o),e.each([n,o],function(t,n){n.commands[a]=r,e.isFunction(r.callback)&&(n.callbacks[a]=r.callback)});else{switch("cm_seperator"===r.type?s.addClass("context-menu-separator "+o.classNames.notSelectable):"html"===r.type?s.addClass("context-menu-html "+o.classNames.notSelectable):r.type?(c=e("
").appendTo(s),i(r).appendTo(c),s.addClass("context-menu-input"),n.hasTypes=!0,e.each([n,o],function(e,t){t.commands[a]=r,t.inputs[a]=r})):r.items&&(r.type="sub"),r.type){case"seperator":break;case"text":l=e('
').attr("name","context-menu-input-"+a).val(r.value||"").appendTo(c);break;case"textarea":l=e('
').attr("name","context-menu-input-"+a).val(r.value||"").appendTo(c),r.height&&l.height(r.height);break;case"checkbox":l=e('
').attr("name","context-menu-input-"+a).val(r.value||"").prop("checked",!!r.selected).prependTo(c);break;case"radio":l=e('
').attr("name","context-menu-input-"+r.radio).val(r.value||"").prop("checked",!!r.selected).prependTo(c);break;case"select":l=e('
').attr("name","context-menu-input-"+a).appendTo(c),r.options&&(e.each(r.options,function(t,n){e(" ").val(t).text(n).appendTo(l)}),l.val(r.selected));break;case"sub":i(r).appendTo(s),r.appendTo=r.$node,m.create(r,o),s.data("contextMenu",r).addClass("context-menu-submenu"),r.callback=null;break;case"html":e(r.html).appendTo(s);break;default:e.each([n,o],function(t,n){n.commands[a]=r,e.isFunction(r.callback)&&(n.callbacks[a]=r.callback)}),i(r).appendTo(s)}r.type&&"sub"!==r.type&&"html"!==r.type&&"cm_seperator"!==r.type&&(l.on("focus",p.focusInput).on("blur",p.blurInput),r.events&&l.on(r.events,n)),r.icon&&(e.isFunction(r.icon)?r._icon=r.icon.call(this,this,s,a,r):r._icon=o.classNames.icon+" "+o.classNames.icon+"-"+r.icon,s.addClass(r._icon))}r.$input=l,r.$label=c,s.appendTo(n.$menu),!n.hasTypes&&e.support.eventSelectstart&&s.on("selectstart.disableTextSelect",p.abortevent)}),n.$node||n.$menu.css("display","none").addClass("context-menu-root"),n.$menu.appendTo(n.appendTo||document.body)},resize:function(t,n){t.css({position:"absolute",display:"block"}),t.data("width",Math.ceil(t.width())),t.css({position:"static",minWidth:"0px",maxWidth:"100000px"}),t.find("> li > ul").each(function(){m.resize(e(this),!0)}),n||t.find("ul").addBack().css({position:"",display:"",minWidth:"",maxWidth:""}).width(function(){return e(this).data("width")})},update:function(t,n){var o=this;void 0===n&&(n=t,m.resize(t.$menu)),t.$menu.children().each(function(){var i,a=e(this),r=a.data("contextMenuKey"),s=t.items[r],c=e.isFunction(s.disabled)&&s.disabled.call(o,r,n)||s.disabled===!0;if(i=e.isFunction(s.visible)?s.visible.call(o,r,n):"undefined"==typeof s.visible||s.visible===!0,a[i?"show":"hide"](),a[c?"addClass":"removeClass"](n.classNames.disabled),e.isFunction(s.icon)&&(a.removeClass(s._icon),s._icon=s.icon.call(this,o,a,r,s),a.addClass(s._icon)),s.type)switch(a.find("input, select, textarea").prop("disabled",c),s.type){case"text":case"textarea":s.$input.val(s.value||"");break;case"checkbox":case"radio":s.$input.val(s.value||"").prop("checked",!!s.selected);break;case"select":s.$input.val(s.selected||"")}s.$menu&&m.update.call(o,s,n)})},layer:function(t,n){var o=t.$layer=e('').css({height:r.height(),width:r.width(),display:"block"}).data("contextMenuRoot",t).insertBefore(this).on("contextmenu",p.abortevent).on("mousedown",p.layerClick);return void 0===document.body.style.maxWidth&&o.css({position:"absolute",height:e(document).height()}),o}};e.fn.contextMenu=function(t){var n=this,o=t;if(this.length>0)if(void 0===t)this.first().trigger("contextmenu");else if(void 0!==t.x&&void 0!==t.y)this.first().trigger(e.Event("contextmenu",{pageX:t.x,pageY:t.y,mouseButton:t.button}));else if("hide"===t){var i=this.first().data("contextMenu")?this.first().data("contextMenu").$menu:null;i&&i.trigger("contextmenu:hide")}else"destroy"===t?e.contextMenu("destroy",{context:this}):e.isPlainObject(t)?(t.context=this,e.contextMenu("create",t)):t?this.removeClass("context-menu-disabled"):t||this.addClass("context-menu-disabled");else e.each(l,function(){this.selector===n.selector&&(o.data=this,e.extend(o.data,{trigger:"demand"}))}),p.contextmenu.call(o.target,o);return this},e.contextMenu=function(t,n){"string"!=typeof t&&(n=t,t="create"),"string"==typeof n?n={selector:n}:void 0===n&&(n={});var o=e.extend(!0,{},d,n||{}),i=e(document),r=i,u=!1;switch(o.context&&o.context.length?(r=e(o.context).first(),o.context=r.get(0),u=o.context!==document):o.context=document,t){case"create":if(!o.selector)throw new Error("No selector specified");if(o.selector.match(/.context-menu-(list|item|input)($|\s)/))throw new Error('Cannot bind to selector "'+o.selector+'" as it contains a reserved className');if(!o.build&&(!o.items||e.isEmptyObject(o.items)))throw new Error("No Items specified");switch(s++,o.ns=".contextMenu"+s,u||(c[o.selector]=o.ns),l[o.ns]=o,o.trigger||(o.trigger="right"),a||(i.on({"contextmenu:hide.contextMenu":p.hideMenu,"prevcommand.contextMenu":p.prevItem,"nextcommand.contextMenu":p.nextItem,"contextmenu.contextMenu":p.abortevent,"mouseenter.contextMenu":p.menuMouseenter,"mouseleave.contextMenu":p.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",p.inputClick).on({"mouseup.contextMenu":p.itemClick,"contextmenu:focus.contextMenu":p.focusItem,"contextmenu:blur.contextMenu":p.blurItem,"contextmenu.contextMenu":p.abortevent,"mouseenter.contextMenu":p.itemMouseenter,"mouseleave.contextMenu":p.itemMouseleave},".context-menu-item"),a=!0),r.on("contextmenu"+o.ns,o.selector,o,p.contextmenu),u&&r.on("remove"+o.ns,function(){e(this).contextMenu("destroy")}),o.trigger){case"hover":r.on("mouseenter"+o.ns,o.selector,o,p.mouseenter).on("mouseleave"+o.ns,o.selector,o,p.mouseleave);break;case"left":r.on("click"+o.ns,o.selector,o,p.click)}o.build||m.create(o);break;case"destroy":var f;if(u){var h=o.context;e.each(l,function(t,n){if(n.context!==h)return!0;f=e(".context-menu-list").filter(":visible"),f.length&&f.data().contextMenuRoot.$trigger.is(e(n.context).find(n.selector))&&f.trigger("contextmenu:hide",{force:!0});try{l[n.ns].$menu&&l[n.ns].$menu.remove(),delete l[n.ns]}catch(o){l[n.ns]=null}return e(n.context).off(n.ns),!0})}else if(o.selector){if(c[o.selector]){f=e(".context-menu-list").filter(":visible"),f.length&&f.data().contextMenuRoot.$trigger.is(o.selector)&&f.trigger("contextmenu:hide",{force:!0});try{l[c[o.selector]].$menu&&l[c[o.selector]].$menu.remove(),delete l[c[o.selector]]}catch(v){l[c[o.selector]]=null}i.off(c[o.selector])}}else i.off(".contextMenu .contextMenuAutoHide"),e.each(l,function(t,n){e(n.context).off(n.ns)}),c={},l={},s=0,a=!1,e("#context-menu-layer, .context-menu-list").remove();break;case"html5":(!e.support.htmlCommand&&!e.support.htmlMenuitem||"boolean"==typeof n&&n)&&e('menu[type="context"]').each(function(){this.id&&e.contextMenu({selector:"[contextmenu="+this.id+"]",items:e.contextMenu.fromMenu(this)})}).css("display","none");break;default:throw new Error('Unknown operation "'+t+'"')}return this},e.contextMenu.setInputValues=function(t,n){void 0===n&&(n={}),e.each(t.inputs,function(e,t){switch(t.type){case"text":case"textarea":t.value=n[e]||"";break;case"checkbox":t.selected=!!n[e];break;case"radio":t.selected=(n[t.radio]||"")===t.value;break;case"select":t.selected=n[e]||""}})},e.contextMenu.getInputValues=function(t,n){return void 0===n&&(n={}),e.each(t.inputs,function(e,t){switch(t.type){case"text":case"textarea":case"select":n[e]=t.$input.val();break;case"checkbox":n[e]=t.$input.prop("checked");break;case"radio":t.$input.prop("checked")&&(n[t.radio]=t.value)}}),n},e.contextMenu.fromMenu=function(t){var n=e(t),i={};return o(i,n.children()),i},e.contextMenu.defaults=d,e.contextMenu.types=u,e.contextMenu.handle=p,e.contextMenu.op=m,e.contextMenu.menus=l});var _extends=Object.assign||function(e){for(var t=1;t-1&&(z(e,t),A(e,o.class_loading)),I(e,t),u(e),j(o.callback_set,e))}var n={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},o=function(e){return _extends({},n,e)},i="data-",a="was-processed",r="ll-timeout",s="true",c=function(e,t){return e.getAttribute(i+t)},l=function(e,t,n){var o=i+t;return null===n?void e.removeAttribute(o):void e.setAttribute(o,n)},u=function(e){return l(e,a,s)},d=function(e){return c(e,a)===s},f=function(e,t){return l(e,r,t)},h=function(e){return c(e,r)},p=function(e){return e.filter(function(e){return!d(e)})},m=function(e,t){return e.filter(function(e){return e!==t})},v=function(e,t){var n,o="LazyLoad::Initialized",i=new e(t);try{n=new CustomEvent(o,{detail:{instance:i}})}catch(a){n=document.createEvent("CustomEvent"),n.initCustomEvent(o,!1,!1,{instance:i})}window.dispatchEvent(n)},g=function(e,t){return t?e.replace(/\.(jpe?g|png)/gi,".webp"):e},y=function(){var e="image/webp",t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL(e).indexOf("data:"+e)},b="undefined"!=typeof window,x=b&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),w=b&&"IntersectionObserver"in window,k=b&&"classList"in document.createElement("p"),$=b&&y(),C=function(e,t,n,o){for(var i,a=0;i=e.children[a];a+=1)if("SOURCE"===i.tagName){var r=c(i,n);T(i,t,r,o)}},T=function(e,t,n,o){n&&e.setAttribute(t,g(n,o))},E=function(e,t){var n=$&&t.to_webp,o=t.data_srcset,i=e.parentNode;i&&"PICTURE"===i.tagName&&C(i,"srcset",o,n);var a=c(e,t.data_sizes);T(e,"sizes",a);var r=c(e,o);T(e,"srcset",r,n);var s=c(e,t.data_src);T(e,"src",s,n)},M=function(e,t){var n=c(e,t.data_src);T(e,"src",n)},_=function(e,t){var n=t.data_src,o=c(e,n);C(e,"src",n),T(e,"src",o),e.load()},O=function(e,t){var n=$&&t.to_webp,o=c(e,t.data_src),i=c(e,t.data_bg);if(o){var a=g(o,n);e.style.backgroundImage='url("'+a+'")'}if(i){var r=g(i,n);e.style.backgroundImage=r}},S={IMG:E,IFRAME:M,VIDEO:_},I=function(e,t){var n=t._settings,o=e.tagName,i=S[o];return i?(i(e,n),t._updateLoadingCount(1),void(t._elements=m(t._elements,e))):void O(e,n)},A=function(e,t){return k?void e.classList.add(t):void(e.className+=(e.className?" ":"")+t)},N=function(e,t){return k?void e.classList.remove(t):void(e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,""))},j=function(e,t){e&&e(t)},D="load",L="loadeddata",P="error",R=function(e,t,n){e.addEventListener(t,n)},F=function(e,t,n){e.removeEventListener(t,n)},H=function(e,t,n){R(e,D,t),R(e,L,t),R(e,P,n)},K=function(e,t,n){F(e,D,t),F(e,L,t),F(e,P,n)},W=function(e,t,n){var o=n._settings,i=t?o.class_loaded:o.class_error,a=t?o.callback_load:o.callback_error,r=e.target;N(r,o.class_loading),A(r,i),j(a,r),n._updateLoadingCount(-1)},z=function(e,t){var n=function i(n){W(n,!0,t),K(e,i,o)},o=function a(o){W(o,!1,t),K(e,n,a)};H(e,n,o)},q=["IMG","IFRAME","VIDEO"],Y=function(e,n,o){t(e,o),n.unobserve(e)},Q=function(e){var t=h(e);t&&(clearTimeout(t),f(e,null))},U=function(e,t,n){var o=n._settings.load_delay,i=h(e);i||(i=setTimeout(function(){Y(e,t,n),Q(e)},o),f(e,i))},X=function(e){return e.isIntersecting||e.intersectionRatio>0},B=function(e){return{root:e.container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}},V=function(e,t){this._settings=o(e),this._setObserver(),this._loadingCount=0,this.update(t)};return V.prototype={_manageIntersection:function(e){var t=this._observer,n=this._settings.load_delay,o=e.target;return n?void(X(e)?U(o,t,this):Q(o)):void(X(e)&&Y(o,t,this))},_onIntersection:function(e){e.forEach(this._manageIntersection.bind(this))},_setObserver:function(){w&&(this._observer=new IntersectionObserver(this._onIntersection.bind(this),B(this._settings)))},_updateLoadingCount:function(e){this._loadingCount+=e,0===this._elements.length&&0===this._loadingCount&&j(this._settings.callback_finish)},update:function(e){var t=this,n=this._settings,o=e||n.container.querySelectorAll(n.elements_selector);return this._elements=p(Array.prototype.slice.call(o)),x||!this._observer?void this.loadAll():void this._elements.forEach(function(e){t._observer.observe(e)})},destroy:function(){var e=this;this._observer&&(this._elements.forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null},load:function(e,n){t(e,this,n)},loadAll:function(){var e=this,t=this._elements;t.forEach(function(t){e.load(t)})}},b&&e(V,window.lazyLoadOptions),V}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery);
}(function(e){var t=e.event.dispatch||e.event.handle,n=e.event.special,o="D"+ +new Date,i="D"+(+new Date+1);n.scrollstart={setup:function(i){var a,r=e.extend({latency:n.scrollstop.latency},i),s=function(e){var n=this,o=arguments;a?clearTimeout(a):(e.type="scrollstart",t.apply(n,o)),a=setTimeout(function(){a=null},r.latency)};e(this).bind("scroll",s).data(o,s)},teardown:function(){e(this).unbind("scroll",e(this).data(o))}},n.scrollstop={latency:250,setup:function(o){var a,r=e.extend({latency:n.scrollstop.latency},o),s=function(e){var n=this,o=arguments;a&&clearTimeout(a),a=setTimeout(function(){a=null,e.type="scrollstop",t.apply(n,o)},r.latency)};e(this).bind("scroll",s).data(i,s)},teardown:function(){e(this).unbind("scroll",e(this).data(i))}}});var bootbox=window.bootbox||function(e,t){function n(e,t){return"undefined"==typeof t&&(t=o),"string"==typeof f[t][e]?f[t][e]:t!=i?n(e,i):e}var o="en",i="en",a=!0,r="static",s="javascript:;",c="",l={},u={},d={};d.setLocale=function(e){for(var t in f)if(t==e)return void(o=e);throw new Error("Invalid locale: "+e)},d.addLocale=function(e,t){"undefined"==typeof f[e]&&(f[e]={});for(var n in t)f[e][n]=t[n]},d.setIcons=function(e){u=e,"object"==typeof u&&null!==u||(u={})},d.setBtnClasses=function(e){l=e,"object"==typeof l&&null!==l||(l={})},d.alert=function(){var e="",t=n("OK"),o=null;switch(arguments.length){case 1:e=arguments[0];break;case 2:e=arguments[0],"function"==typeof arguments[1]?o=arguments[1]:t=arguments[1];break;case 3:e=arguments[0],t=arguments[1],o=arguments[2];break;default:throw new Error("Incorrect number of arguments: expected 1-3")}return d.dialog(e,{label:t,icon:u.OK,"class":l.OK,callback:o},{onEscape:o||!0})},d.confirm=function(){var e="",t=n("CANCEL"),o=n("CONFIRM"),i=null;switch(arguments.length){case 1:e=arguments[0];break;case 2:e=arguments[0],"function"==typeof arguments[1]?i=arguments[1]:t=arguments[1];break;case 3:e=arguments[0],t=arguments[1],"function"==typeof arguments[2]?i=arguments[2]:o=arguments[2];break;case 4:e=arguments[0],t=arguments[1],o=arguments[2],i=arguments[3];break;default:throw new Error("Incorrect number of arguments: expected 1-4")}var a=function(){if("function"==typeof i)return i(!1)},r=function(){if("function"==typeof i)return i(!0)};return d.dialog(e,[{label:t,icon:u.CANCEL,"class":l.CANCEL,callback:a},{label:o,icon:u.CONFIRM,"class":l.CONFIRM,callback:r}],{onEscape:a})},d.prompt=function(){var e="",o=n("CANCEL"),i=n("CONFIRM"),a=null,r="";switch(arguments.length){case 1:e=arguments[0];break;case 2:e=arguments[0],"function"==typeof arguments[1]?a=arguments[1]:o=arguments[1];break;case 3:e=arguments[0],o=arguments[1],"function"==typeof arguments[2]?a=arguments[2]:i=arguments[2];break;case 4:e=arguments[0],o=arguments[1],i=arguments[2],a=arguments[3];break;case 5:e=arguments[0],o=arguments[1],i=arguments[2],a=arguments[3],r=arguments[4];break;default:throw new Error("Incorrect number of arguments: expected 1-5")}var s=e,c=t("");c.append(" ");var f=function(){if("function"==typeof a)return a(null)},h=function(){if("function"==typeof a)return a(c.find("input[type=text]").val())},p=d.dialog(c,[{label:o,icon:u.CANCEL,"class":l.CANCEL,callback:f},{label:i,icon:u.CONFIRM,"class":l.CONFIRM,callback:h}],{header:s,show:!1,onEscape:f});return p.on("shown",function(){c.find("input[type=text]").focus(),c.on("submit",function(e){e.preventDefault(),p.find(".btn-primary").click()})}),p.modal("show"),p},d.dialog=function(n,o,i){function l(e){var t=null;"function"==typeof i.onEscape&&(t=i.onEscape()),t!==!1&&$.modal("hide")}var u="",d=[];i||(i={}),"undefined"==typeof o?o=[]:"undefined"==typeof o.length&&(o=[o]);for(var f=o.length;f--;){var h=null,p=null,m=null,v="",g=null;if("undefined"==typeof o[f].label&&"undefined"==typeof o[f]["class"]&&"undefined"==typeof o[f].callback){var y=0,b=null;for(var x in o[f])if(b=x,++y>1)break;1==y&&"function"==typeof o[f][x]&&(o[f].label=b,o[f].callback=o[f][x])}"function"==typeof o[f].callback&&(g=o[f].callback),o[f]["class"]?m=o[f]["class"]:f==o.length-1&&o.length<=2&&(m="btn-primary"),o[f].link!==!0&&(m="btn "+m),h=o[f].label?o[f].label:"Option "+(f+1),o[f].icon&&(v=" "),p=o[f].href?o[f].href:s,u=""+v+h+" "+u,d[f]=g}var w=[""];if(i.header){var k="";("undefined"==typeof i.headerCloseButton||i.headerCloseButton)&&(k="
× "),w.push("")}w.push("
"),u&&w.push(""),w.push("
");var $=t(w.join("\n")),C="undefined"==typeof i.animate?a:i.animate;C&&$.addClass("fade");var T="undefined"==typeof i.classes?c:i.classes;return T&&$.addClass(T),$.find(".modal-body").html(n),$.on("keyup.dismiss.modal",function(e){27===e.which&&i.onEscape&&l("escape")}),$.on("click","a.close",function(e){e.preventDefault(),l("close")}),$.on("shown",function(){$.find("a.btn-primary:first").focus()}),$.on("hidden",function(e){e.target===this&&$.remove()}),$.on("click",".modal-footer a",function(e){var n=t(this).data("handler"),i=d[n],a=null;"undefined"!=typeof n&&"undefined"!=typeof o[n].href||(e.preventDefault(),"function"==typeof i&&(a=i(e)),a!==!1&&$.modal("hide"))}),t("body").append($),$.modal({backdrop:"undefined"==typeof i.backdrop?r:i.backdrop,keyboard:!1,show:!1}),$.on("show",function(n){t(e).off("focusin.modal")}),"undefined"!=typeof i.show&&i.show!==!0||$.modal("show"),$},d.modal=function(){var e,n,o,i={onEscape:null,keyboard:!0,backdrop:r};switch(arguments.length){case 1:e=arguments[0];break;case 2:e=arguments[0],"object"==typeof arguments[1]?o=arguments[1]:n=arguments[1];break;case 3:e=arguments[0],n=arguments[1],o=arguments[2];break;default:throw new Error("Incorrect number of arguments: expected 1-3")}return i.header=n,o="object"==typeof o?t.extend(i,o):i,d.dialog(e,[],o)},d.hideAll=function(){t(".bootbox").modal("hide")},d.animate=function(e){a=e},d.backdrop=function(e){r=e},d.classes=function(e){c=e};var f={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return d}(document,window.jQuery);window.bootbox=bootbox,function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(e){"use strict";function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=u),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var o=e(this),i=o.data(_);i||(i=new n(this,t),o.data(_,i))})}function n(t,n){function o(t){if(!(le()||e(t.target).closest(n.excludedElements,Ye).length>0)){var o=t.originalEvent?t.originalEvent:t;if(!o.pointerType||"mouse"!=o.pointerType||0!=n.fallbackToMouseEvents){var i,a=o.touches,r=a?a[0]:o;return Qe=w,a?Ue=a.length:n.preventDefaultEvents!==!1&&t.preventDefault(),De=0,Le=null,Pe=null,ze=null,Re=0,Fe=0,He=0,Ke=1,We=0,qe=ve(),se(),de(0,r),!a||Ue===n.fingers||n.fingers===b||z()?(Be=Te(),2==Ue&&(de(1,a[1]),Fe=He=be(Xe[0].start,Xe[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=D(o,Qe))):i=!1,i===!1?(Qe=C,D(o,Qe),i):(n.hold&&(tt=setTimeout(e.proxy(function(){Ye.trigger("hold",[o.target]),n.hold&&(i=n.hold.call(Ye,o,o.target))},this),n.longTapThreshold)),ue(!0),null)}}}function O(e){var t=e.originalEvent?e.originalEvent:e;if(Qe!==$&&Qe!==C&&!ce()){var o,i=t.touches,a=i?i[0]:t,r=fe(a);if(Ve=Te(),i&&(Ue=i.length),n.hold&&clearTimeout(tt),Qe=k,2==Ue&&(0==Fe?(de(1,i[1]),Fe=He=be(Xe[0].start,Xe[1].start)):(fe(i[1]),He=be(Xe[0].end,Xe[1].end),ze=we(Xe[0].end,Xe[1].end)),Ke=xe(Fe,He),We=Math.abs(Fe-He)),Ue===n.fingers||n.fingers===b||!i||z()){if(Le=Ce(r.start,r.end),Pe=Ce(r.last,r.end),K(e,Pe),De=ke(r.start,r.end),Re=ye(),pe(Le,De),o=D(t,Qe),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var s=!0;if(n.triggerOnTouchLeave){var c=Ee(this);s=Me(r.end,c)}!n.triggerOnTouchEnd&&s?Qe=j(k):n.triggerOnTouchLeave&&!s&&(Qe=j($)),Qe!=C&&Qe!=$||D(t,Qe)}}else Qe=C,D(t,Qe);o===!1&&(Qe=C,D(t,Qe))}}function S(e){var t=e.originalEvent?e.originalEvent:e,o=t.touches;if(o){if(o.length&&!ce())return re(t),!0;if(o.length&&ce())return!0}return ce()&&(Ue=Ze),Ve=Te(),Re=ye(),R()||!P()?(Qe=C,D(t,Qe)):n.triggerOnTouchEnd||n.triggerOnTouchEnd===!1&&Qe===k?(n.preventDefaultEvents!==!1&&e.cancelable!==!1&&e.preventDefault(),Qe=$,D(t,Qe)):!n.triggerOnTouchEnd&&V()?(Qe=$,L(t,Qe,p)):Qe===k&&(Qe=C,D(t,Qe)),ue(!1),null}function I(){Ue=0,Ve=0,Be=0,Fe=0,He=0,Ke=1,se(),ue(!1)}function A(e){var t=e.originalEvent?e.originalEvent:e;n.triggerOnTouchLeave&&(Qe=j($),D(t,Qe))}function N(){Ye.off(Se,o),Ye.off(je,I),Ye.off(Ie,O),Ye.off(Ae,S),Ne&&Ye.off(Ne,A),ue(!1)}function j(e){var t=e,o=H(),i=P(),a=R();return!o||a?t=C:!i||e!=k||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==$&&n.triggerOnTouchLeave&&(t=C):t=$,t}function D(e,t){var n,o=e.touches;return(U()||Q())&&(n=L(e,t,f)),(q()||z())&&n!==!1&&(n=L(e,t,h)),ie()&&n!==!1?n=L(e,t,m):ae()&&n!==!1?n=L(e,t,v):oe()&&n!==!1&&(n=L(e,t,p)),t===C&&I(e),t===$&&(o?o.length||I(e):I(e)),n}function L(t,o,u){var d;if(u==f){if(Ye.trigger("swipeStatus",[o,Le||null,De||0,Re||0,Ue,Xe,Pe]),n.swipeStatus&&(d=n.swipeStatus.call(Ye,t,o,Le||null,De||0,Re||0,Ue,Xe,Pe),d===!1))return!1;if(o==$&&Y()){if(clearTimeout(et),clearTimeout(tt),Ye.trigger("swipe",[Le,De,Re,Ue,Xe,Pe]),n.swipe&&(d=n.swipe.call(Ye,t,Le,De,Re,Ue,Xe,Pe),d===!1))return!1;switch(Le){case i:Ye.trigger("swipeLeft",[Le,De,Re,Ue,Xe,Pe]),n.swipeLeft&&(d=n.swipeLeft.call(Ye,t,Le,De,Re,Ue,Xe,Pe));break;case a:Ye.trigger("swipeRight",[Le,De,Re,Ue,Xe,Pe]),n.swipeRight&&(d=n.swipeRight.call(Ye,t,Le,De,Re,Ue,Xe,Pe));break;case r:Ye.trigger("swipeUp",[Le,De,Re,Ue,Xe,Pe]),n.swipeUp&&(d=n.swipeUp.call(Ye,t,Le,De,Re,Ue,Xe,Pe));break;case s:Ye.trigger("swipeDown",[Le,De,Re,Ue,Xe,Pe]),n.swipeDown&&(d=n.swipeDown.call(Ye,t,Le,De,Re,Ue,Xe,Pe))}}}if(u==h){if(Ye.trigger("pinchStatus",[o,ze||null,We||0,Re||0,Ue,Ke,Xe]),n.pinchStatus&&(d=n.pinchStatus.call(Ye,t,o,ze||null,We||0,Re||0,Ue,Ke,Xe),d===!1))return!1;if(o==$&&W())switch(ze){case c:Ye.trigger("pinchIn",[ze||null,We||0,Re||0,Ue,Ke,Xe]),n.pinchIn&&(d=n.pinchIn.call(Ye,t,ze||null,We||0,Re||0,Ue,Ke,Xe));break;case l:Ye.trigger("pinchOut",[ze||null,We||0,Re||0,Ue,Ke,Xe]),n.pinchOut&&(d=n.pinchOut.call(Ye,t,ze||null,We||0,Re||0,Ue,Ke,Xe))}}return u==p?o!==C&&o!==$||(clearTimeout(et),clearTimeout(tt),G()&&!ee()?(Je=Te(),et=setTimeout(e.proxy(function(){Je=null,Ye.trigger("tap",[t.target]),n.tap&&(d=n.tap.call(Ye,t,t.target))},this),n.doubleTapThreshold)):(Je=null,Ye.trigger("tap",[t.target]),n.tap&&(d=n.tap.call(Ye,t,t.target)))):u==m?o!==C&&o!==$||(clearTimeout(et),clearTimeout(tt),Je=null,Ye.trigger("doubletap",[t.target]),n.doubleTap&&(d=n.doubleTap.call(Ye,t,t.target))):u==v&&(o!==C&&o!==$||(clearTimeout(et),Je=null,Ye.trigger("longtap",[t.target]),n.longTap&&(d=n.longTap.call(Ye,t,t.target)))),d}function P(){var e=!0;return null!==n.threshold&&(e=De>=n.threshold),e}function R(){var e=!1;return null!==n.cancelThreshold&&null!==Le&&(e=me(Le)-De>=n.cancelThreshold),e}function F(){return null===n.pinchThreshold||We>=n.pinchThreshold}function H(){var e;return e=!n.maxTimeThreshold||!(Re>=n.maxTimeThreshold)}function K(e,t){if(n.preventDefaultEvents!==!1)if(n.allowPageScroll===u)e.preventDefault();else{var o=n.allowPageScroll===d;switch(t){case i:(n.swipeLeft&&o||!o&&n.allowPageScroll!=g)&&e.preventDefault();break;case a:(n.swipeRight&&o||!o&&n.allowPageScroll!=g)&&e.preventDefault();break;case r:(n.swipeUp&&o||!o&&n.allowPageScroll!=y)&&e.preventDefault();break;case s:(n.swipeDown&&o||!o&&n.allowPageScroll!=y)&&e.preventDefault();break;case u:}}}function W(){var e=X(),t=B(),n=F();return e&&t&&n}function z(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function q(){return!(!W()||!z())}function Y(){var e=H(),t=P(),n=X(),o=B(),i=R(),a=!i&&o&&n&&t&&e;return a}function Q(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function U(){return!(!Y()||!Q())}function X(){return Ue===n.fingers||n.fingers===b||!T}function B(){return 0!==Xe[0].end.x}function V(){return!!n.tap}function G(){return!!n.doubleTap}function Z(){return!!n.longTap}function J(){if(null==Je)return!1;var e=Te();return G()&&e-Je<=n.doubleTapThreshold}function ee(){return J()}function te(){return(1===Ue||!T)&&(isNaN(De)||Den.longTapThreshold&&De=0?i:n<=360&&n>=315?i:n>=135&&n<=225?a:n>45&&n<135?s:r}function Te(){var e=new Date;return e.getTime()}function Ee(t){t=e(t);var n=t.offset(),o={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return o}function Me(e,t){return e.x>t.left&&e.xt.top&&e.y0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,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[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"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(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":a(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=s})},{select:5}],8:[function(t,n,o){!function(i,a){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],a);else if("undefined"!=typeof o)a(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var r={exports:{}};a(r,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=r.exports}}(this,function(e,t,n,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var l=i(t),u=i(n),d=i(o),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===f(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d["default"])(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l["default"]({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return c("action",e)}},{key:"defaultTarget",value:function(e){var t=c("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return c("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(u["default"]);e.exports=p})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){e.preventDefault();var n=e.originalEvent.changedTouches[0],o=document.createEvent("MouseEvents");o.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(o)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,o=e.ui.mouse.prototype,i=o._mouseInit,a=o._mouseDestroy;o._touchStart=function(e){var o=this;!n&&o._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,o._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},o._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},o._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},o._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},o._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),a.call(t)}}}(jQuery);