File: /home/zwafgyp/locationdebateau/wp-content/plugins/waspthemes-yellow-pencil/editor/js/addons.js
/* ---------------------------------------------------- */
/* RESIZEABLE */
/* ---------------------------------------------------- */
!function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(w){return w.widget("ui.resizable",w.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(t,i){if("hidden"===w(t).css("overflow"))return!1;var e,s=i&&"left"===i?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,e=0<t[s],t[s]=0,e)},_create:function(){var t,i,e,s,n=this,h=this.options;if(this.element.addClass("ui-resizable"),w.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(w("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(w(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=w(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;i<t.length;i++)e=w.trim(t[i]),(s=w("<div class='ui-resizable-handle "+("ui-resizable-"+e)+"'></div>")).css({zIndex:h.zIndex}),"se"===e&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[e]=".ui-resizable-"+e,this.element.append(s);this._renderAxis=function(t){var i,e,s,h;for(i in t=t||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=w(this.handles[i]),this._on(this.handles[i],{mousedown:n._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(e=w(this.handles[i],this.element),h=/sw|ne|nw|se|n|s/.test(i)?e.outerHeight():e.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,h),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){n.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),n.axis=s&&s[1]?s[1]:"se")}),h.autoHide&&(this._handles.hide(),w(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(w(this).removeClass("ui-resizable-autohide"),n._handles.show())}).mouseleave(function(){h.disabled||n.resizing||(w(this).addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){w(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}var i;return this.elementIsWrapper&&(t(this.element),i=this.element,this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var i,e,s=!1;for(i in this.handles)(e=w(this.handles[i])[0])!==t.target&&!w.contains(e,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,e,s,h=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),e=this._num(this.helper.css("top")),h.containment&&(i+=w(h.containment).scrollLeft()||0,e+=w(h.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:e},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:i,top:e},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof h.aspectRatio?h.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=w(".ui-resizable-"+this.axis).css("cursor"),w("body").css("cursor","auto"===s?this.axis+"-resize":s),n.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,e,s=this.originalMousePosition,h=this.axis,n=t.pageX-s.left||0,o=t.pageY-s.top||0,a=this._change[h];return this._updatePrevProperties(),a&&(i=a.apply(this,[t,n,o]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),w.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var i,e,s,h,n,o,a,l=this.options,r=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:r.sizeDiff.height,h=e?0:r.sizeDiff.width,n={width:r.helper.width()-h,height:r.helper.height()-s},o=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,a=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null,l.animate||this.element.css(w.extend(n,{top:a,left:o})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!l.animate&&this._proportionallyResize()),w("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var i,e,s,h,n,o=this.options;n={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||t)&&(i=n.minHeight*this.aspectRatio,s=n.minWidth/this.aspectRatio,e=n.maxHeight*this.aspectRatio,h=n.maxWidth/this.aspectRatio,i>n.minWidth&&(n.minWidth=i),s>n.minHeight&&(n.minHeight=s),e<n.maxWidth&&(n.maxWidth=e),h<n.maxHeight&&(n.maxHeight=h)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var i=this.position,e=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=i.left+(e.width-t.width),t.top=null),"nw"===s&&(t.top=i.top+(e.height-t.height),t.left=i.left+(e.width-t.width)),t},_respectSize:function(t){var i=this._vBoundaries,e=this.axis,s=this._isNumber(t.width)&&i.maxWidth&&i.maxWidth<t.width,h=this._isNumber(t.height)&&i.maxHeight&&i.maxHeight<t.height,n=this._isNumber(t.width)&&i.minWidth&&i.minWidth>t.width,o=this._isNumber(t.height)&&i.minHeight&&i.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,r=/sw|nw|w/.test(e),p=/nw|ne|n/.test(e);return n&&(t.width=i.minWidth),o&&(t.height=i.minHeight),s&&(t.width=i.maxWidth),h&&(t.height=i.maxHeight),n&&r&&(t.left=a-i.minWidth),s&&r&&(t.left=a-i.maxWidth),o&&p&&(t.top=l-i.minHeight),h&&p&&(t.top=l-i.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var i=0,e=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];i<4;i++)e[i]=parseInt(s[i],10)||0,e[i]+=parseInt(h[i],10)||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,i=0,e=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)t=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:e.height()-this.outerDimensions.height||0,width:e.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||w("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,i){return{width:this.originalSize.width+i}},w:function(t,i){var e=this.originalSize;return{left:this.originalPosition.left+i,width:e.width-i}},n:function(t,i,e){var s=this.originalSize;return{top:this.originalPosition.top+e,height:s.height-e}},s:function(t,i,e){return{height:this.originalSize.height+e}},se:function(t,i,e){return w.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},sw:function(t,i,e){return w.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,e]))},ne:function(t,i,e){return w.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},nw:function(t,i,e){return w.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,e]))}},_propagate:function(t,i){w.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),w.ui.plugin.add("resizable","animate",{stop:function(i){var e=w(this).resizable("instance"),t=e.options,s=e._proportionallyResizeElements,h=s.length&&/textarea/i.test(s[0].nodeName),n=h&&e._hasScroll(s[0],"left")?0:e.sizeDiff.height,o=h?0:e.sizeDiff.width,a={width:e.size.width-o,height:e.size.height-n},l=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null,r=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(w.extend(a,r&&l?{top:r,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};s&&s.length&&w(s[0]).css({width:t.width,height:t.height}),e._updateCache(t),e._propagate("resize",i)}})}}),w.ui.plugin.add("resizable","containment",{start:function(){var e,s,t,i,h,n,o,a=w(this).resizable("instance"),l=a.options,r=a.element,p=l.containment,d=p instanceof w?p.get(0):/parent/.test(p)?r.parent().get(0):p;d&&(a.containerElement=w(d),/document/.test(p)||p===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:w(document),left:0,top:0,width:w(document).width(),height:w(document).height()||document.body.parentNode.scrollHeight}):(e=w(d),s=[],w(["Top","Right","Left","Bottom"]).each(function(t,i){s[t]=a._num(e.css("padding"+i))}),a.containerOffset=e.offset(),a.containerPosition=e.position(),a.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},t=a.containerOffset,i=a.containerSize.height,h=a.containerSize.width,n=a._hasScroll(d,"left")?d.scrollWidth:h,o=a._hasScroll(d)?d.scrollHeight:i,a.parentData={element:d,left:t.left,top:t.top,width:n,height:o}))},resize:function(t){var i,e,s,h,n=w(this).resizable("instance"),o=n.options,a=n.containerOffset,l=n.position,r=n._aspectRatio||t.shiftKey,p={top:0,left:0},d=n.containerElement,g=!0;d[0]!==document&&/static/.test(d.css("position"))&&(p=a),l.left<(n._helper?a.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-a.left:n.position.left-p.left),r&&(n.size.height=n.size.width/n.aspectRatio,g=!1),n.position.left=o.helper?a.left:0),l.top<(n._helper?a.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-a.top:n.position.top),r&&(n.size.width=n.size.height*n.aspectRatio,g=!1),n.position.top=n._helper?a.top:0),s=n.containerElement.get(0)===n.element.parent().get(0),h=/relative|absolute/.test(n.containerElement.css("position")),s&&h?(n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top):(n.offset.left=n.element.offset().left,n.offset.top=n.element.offset().top),i=Math.abs(n.sizeDiff.width+(n._helper?n.offset.left-p.left:n.offset.left-a.left)),e=Math.abs(n.sizeDiff.height+(n._helper?n.offset.top-p.top:n.offset.top-a.top)),i+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-i,r&&(n.size.height=n.size.width/n.aspectRatio,g=!1)),e+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-e,r&&(n.size.width=n.size.height*n.aspectRatio,g=!1)),g||(n.position.left=n.prevPosition.left,n.position.top=n.prevPosition.top,n.size.width=n.prevSize.width,n.size.height=n.prevSize.height)},stop:function(){var t=w(this).resizable("instance"),i=t.options,e=t.containerOffset,s=t.containerPosition,h=t.containerElement,n=w(t.helper),o=n.offset(),a=n.outerWidth()-t.sizeDiff.width,l=n.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(h.css("position"))&&w(this).css({left:o.left-s.left-e.left,width:a,height:l}),t._helper&&!i.animate&&/static/.test(h.css("position"))&&w(this).css({left:o.left-s.left-e.left,width:a,height:l})}}),w.ui.plugin.add("resizable","alsoResize",{start:function(){var t=w(this).resizable("instance").options;w(t.alsoResize).each(function(){var t=w(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,e){var i=w(this).resizable("instance"),s=i.options,h=i.originalSize,n=i.originalPosition,o={height:i.size.height-h.height||0,width:i.size.width-h.width||0,top:i.position.top-n.top||0,left:i.position.left-n.left||0};w(s.alsoResize).each(function(){var t=w(this),s=w(this).data("ui-resizable-alsoresize"),h={},i=t.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];w.each(i,function(t,i){var e=(s[i]||0)+(o[i]||0);e&&0<=e&&(h[i]=e||null)}),t.css(h)})},stop:function(){w(this).removeData("resizable-alsoresize")}}),w.ui.plugin.add("resizable","ghost",{start:function(){var t=w(this).resizable("instance"),i=t.options,e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=w(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=w(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),w.ui.plugin.add("resizable","grid",{resize:function(){var t,i=w(this).resizable("instance"),e=i.options,s=i.size,h=i.originalSize,n=i.originalPosition,o=i.axis,a="number"==typeof e.grid?[e.grid,e.grid]:e.grid,l=a[0]||1,r=a[1]||1,p=Math.round((s.width-h.width)/l)*l,d=Math.round((s.height-h.height)/r)*r,g=h.width+p,u=h.height+d,m=e.maxWidth&&e.maxWidth<g,f=e.maxHeight&&e.maxHeight<u,c=e.minWidth&&e.minWidth>g,z=e.minHeight&&e.minHeight>u;e.grid=a,c&&(g+=l),z&&(u+=r),m&&(g-=l),f&&(u-=r),/^(se|s|e)$/.test(o)?(i.size.width=g,i.size.height=u):/^(ne)$/.test(o)?(i.size.width=g,i.size.height=u,i.position.top=n.top-d):/^(sw)$/.test(o)?(i.size.width=g,i.size.height=u,i.position.left=n.left-p):((u-r<=0||g-l<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),0<u-r?(i.size.height=u,i.position.top=n.top-d):(u=r-t.height,i.size.height=u,i.position.top=n.top+h.height-u),0<g-l?(i.size.width=g,i.position.left=n.left-p):(g=l-t.width,i.size.width=g,i.position.left=n.left+h.width-g))}}),w.ui.resizable});
/* ---------------------------------------------------- */
/* CONTEXTMENU */
/* ---------------------------------------------------- */
!function(e,t){function n(e){for(var t,n=e.split(/\s+/),a=[],o=0;t=n[o];o++)t=t[0].toUpperCase(),a.push(t);return a}function a(t){return t.id&&e('label[for="'+t.id+'"]').val()||t.name}function o(n,i,s){return s||(s=0),i.each(function(){var i,c,r=e(this),l=this,u=this.nodeName.toLowerCase();switch("label"==u&&r.find("input, textarea, select").length&&(i=r.text(),r=r.children().first(),l=r.get(0),u=l.nodeName.toLowerCase()),u){case"menu":c={name:r.attr("label"),items:{}},s=o(c.items,r.children(),s);break;case"a":case"button":c={name:r.text(),disabled:!!r.attr("disabled"),callback:function(){r.click()}};break;case"menuitem":case"command":switch(r.attr("type")){case t:case"command":case"menuitem":c={name:r.attr("label"),disabled:!!r.attr("disabled"),callback:function(){r.click()}};break;case"checkbox":c={type:"checkbox",disabled:!!r.attr("disabled"),name:r.attr("label"),selected:!!r.attr("checked")};break;case"radio":c={type:"radio",disabled:!!r.attr("disabled"),name:r.attr("label"),radio:r.attr("radiogroup"),value:r.attr("id"),selected:!!r.attr("checked")};break;default:c=t}break;case"hr":c="-------";break;case"input":switch(r.attr("type")){case"text":c={type:"text",name:i||a(l),disabled:!!r.attr("disabled"),value:r.val()};break;case"checkbox":c={type:"checkbox",name:i||a(l),disabled:!!r.attr("disabled"),selected:!!r.attr("checked")};break;case"radio":c={type:"radio",name:i||a(l),disabled:!!r.attr("disabled"),radio:!!r.attr("name"),value:r.val(),selected:!!r.attr("checked")};break;default:c=t}break;case"select":c={type:"select",name:i||a(l),disabled:!!r.attr("disabled"),selected:r.val(),options:{}},r.children().each(function(){c.options[this.value]=e(this).text()});break;case"textarea":c={type:"textarea",name:i||a(l),disabled:!!r.attr("disabled"),value:r.val()};break;case"label":break;default:c={type:"html",html:r.clone(!0)}}c&&(s++,n["key"+s]=c)}),s}if(e.support.htmlMenuitem="HTMLMenuItemElement"in window,e.support.htmlCommand="HTMLCommandElement"in window,e.support.eventSelectstart="onselectstart"in document.documentElement,!e.ui||!e.ui.widget){var i=e.cleanData;e.cleanData=function(t){for(var n,a=0;null!=(n=t[a]);a++)try{e(n).triggerHandler("remove")}catch(e){}i(t)}}var s=null,c=!1,r=e(window),l=0,u={},d={},m={},p={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:0,reposition:!0,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(t,n,a){var o;if(n||a){if("maintain"===n&&"maintain"===a)o=t.$menu.position();else{var i=e(e("#iframe").contents().get(0)),s=i.find("body");e(document.body).add(s),o={top:a-=i.scrollTop(),left:n}}var c=r.scrollTop()+r.height(),l=r.scrollLeft()+r.width(),u=t.$menu.height(),d=t.$menu.width();o.top+u>c&&(o.top-=u),o.left+d>l&&(o.left-=d),t.$menu.css(o)}else t.determinePosition.call(this,t.$menu)},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:0,show:"show",hide:"hide"},events:{show:e.noop,hide:e.noop},callback:null,items:{}},h={timer:null,pageX:null,pageY:null},f=function(e){for(var t=0,n=e;t=Math.max(t,parseInt(n.css("z-index"),10)||0),(n=n.parent())&&n.length&&!("html body".indexOf(n.prop("nodeName").toLowerCase())>-1););return t},x={abortevent:function(e){e.preventDefault(),e.stopImmediatePropagation()},contextmenu:function(t){var n=e(this);if(t.preventDefault(),t.stopImmediatePropagation(),!("right"!=t.data.trigger&&t.originalEvent||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(s=n,t.data.build){var a=t.data.build(s,t);if(!1===a)return;if(t.data=e.extend(!0,{},p,t.data,a||{}),!t.data.items||e.isEmptyObject(t.data.items))throw window.console&&(console.error||console.log)("No items specified to show in contextMenu"),new Error("No Items specified");t.data.$trigger=s,g.create(t.data)}g.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);s&&s.length&&!s.is(n)&&s.data("contextMenu").$menu.trigger("contextmenu:hide"),2==t.button&&(s=n.data("contextMenuActive",!0))},mouseup:function(t){var n=e(this);n.data("contextMenuActive")&&s&&s.length&&s.is(n)&&!n.hasClass("context-menu-disabled")&&(t.preventDefault(),t.stopImmediatePropagation(),s=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),a=e(t.relatedTarget),o=e(document);a.is(".context-menu-list")||a.closest(".context-menu-list").length||s&&s.length||(h.pageX=t.pageX,h.pageY=t.pageY,h.data=t.data,o.on("mousemove.contextMenuShow",x.mousemove),h.timer=setTimeout(function(){h.timer=null,o.off("mousemove.contextMenuShow"),s=n,n.trigger(e.Event("contextmenu",{data:h.data,pageX:h.pageX,pageY:h.pageY}))},t.data.delay))},mousemove:function(e){h.pageX=e.pageX,h.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(h.timer)}catch(t){}h.timer=null}},layerClick:function(t){var n,a,o=e(this).data("contextMenuRoot"),i=t.button,s=t.pageX,c=t.pageY;t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){var l,u="left"==o.trigger&&0===i||"right"==o.trigger&&2===i;if(document.elementFromPoint&&(o.$layer.hide(),n=document.elementFromPoint(s-r.scrollLeft(),c-r.scrollTop()),o.$layer.show()),o.reposition&&u)if(document.elementFromPoint){if(o.$trigger.is(n)||o.$trigger.has(n).length)return void o.position.call(o.$trigger,o,s,c)}else if(a=o.$trigger.offset(),l=e(window),a.top+=l.scrollTop(),a.top<=t.pageY&&(a.left+=l.scrollLeft(),a.left<=t.pageX&&(a.bottom=a.top+o.$trigger.outerHeight(),a.bottom>=t.pageY&&(a.right=a.left+o.$trigger.outerWidth(),a.right>=t.pageX))))return void o.position.call(o.$trigger,o,s,c);n&&u&&o.$trigger.one("contextmenu:hidden",function(){e(n).contextMenu({x:s,y:c})}),o.$menu.trigger("contextmenu:hide")},1)},keyStop:function(e,t){t.isInput||e.preventDefault(),e.stopPropagation()},key:function(e){var t=s.data("contextMenu")||{};switch(e.keyCode){case 9:case 38:if(x.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(x.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(x.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(x.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;var a=t.$selected.data("contextMenu")||{};if(a.$menu&&t.$selected.hasClass("context-menu-submenu"))return t.$selected=null,a.$selected=null,void a.$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(.disabled, .not-selectable)")[36==e.keyCode?"first":"last"]().trigger("contextmenu:focus"),void e.preventDefault());case 13:if(x.keyStop(e,t),t.isInput){if(t.$selected&&!t.$selected.is("textarea, select"))return void e.preventDefault();break}return void(t.$selected&&t.$selected.trigger("mouseup"));case 32:case 33:case 34:return void x.keyStop(e,t);case 27:return x.keyStop(e,t),void t.$menu.trigger("contextmenu:hide");default:var o=String.fromCharCode(e.keyCode).toUpperCase();if(t.accesskeys[o])return void t.accesskeys[o].$node.trigger(t.accesskeys[o].$menu?"contextmenu:focus":"mouseup")}e.stopPropagation(),t.$selected&&t.$selected.trigger(e)},prevItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{};if(n.$selected){var a=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=a}for(var o=n.$menu.children(),i=n.$selected&&n.$selected.prev().length?n.$selected.prev():o.last(),s=i;i.hasClass("disabled")||i.hasClass("not-selectable");)if((i=i.prev().length?i.prev():o.last()).is(s))return;n.$selected&&x.itemMouseleave.call(n.$selected.get(0),t),x.itemMouseenter.call(i.get(0),t);var c=i.find("input, textarea, select");c.length&&c.focus()},nextItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{};if(n.$selected){var a=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=a}for(var o=n.$menu.children(),i=n.$selected&&n.$selected.next().length?n.$selected.next():o.first(),s=i;i.hasClass("disabled")||i.hasClass("not-selectable");)if((i=i.next().length?i.next():o.first()).is(s))return;n.$selected&&x.itemMouseleave.call(n.$selected.get(0),t),x.itemMouseenter.call(i.get(0),t);var c=i.find("input, textarea, select");c.length&&c.focus()},focusInput:function(){var t=e(this).closest(".context-menu-item"),n=t.data(),a=n.contextMenu,o=n.contextMenuRoot;o.$selected=a.$selected=t,o.isInput=a.isInput=!0},blurInput:function(){var t=e(this).closest(".context-menu-item").data(),n=t.contextMenu;t.contextMenuRoot.isInput=n.isInput=!1},menuMouseenter:function(){e(this).data().contextMenuRoot.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),a=n.data(),o=a.contextMenu,i=a.contextMenuRoot;return i.hovering=!0,t&&i.$layer&&i.$layer.is(t.relatedTarget)&&(t.preventDefault(),t.stopImmediatePropagation()),(o.$menu?o:i).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass("disabled")||n.hasClass("not-selectable")?void(o.$selected=null):void n.trigger("contextmenu:focus")},itemMouseleave:function(t){var n=e(this),a=n.data(),o=a.contextMenu,i=a.contextMenuRoot;return i!==o&&i.$layer&&i.$layer.is(t.relatedTarget)?(i.$selected&&i.$selected.trigger("contextmenu:blur"),t.preventDefault(),t.stopImmediatePropagation(),void(i.$selected=o.$selected=o.$node)):void n.trigger("contextmenu:blur")},itemClick:function(t){var n,a=e(this),o=a.data(),i=o.contextMenu,s=o.contextMenuRoot,c=o.contextMenuKey;if(i.items[c]&&!a.is(".disabled, .context-menu-submenu, .context-menu-separator, .not-selectable")){if(t.preventDefault(),t.stopImmediatePropagation(),e.isFunction(s.callbacks[c])&&Object.prototype.hasOwnProperty.call(s.callbacks,c))n=s.callbacks[c];else{if(!e.isFunction(s.callback))return;n=s.callback}s.$menu.hasClass("dom_contextmenu")?!1!==n.call(s.$trigger,c,s)?s.$menu.trigger("contextmenu:hide"):s.$menu.parent().length&&g.update.call(s.$trigger,s):n.call(s.$trigger,c,s)}},inputClick:function(e){e.stopImmediatePropagation()},hideMenu:function(t,n){var a=e(this).data("contextMenuRoot");g.hide.call(a.$trigger,a,n&&n.force)},focusItem:function(t){t.stopPropagation();var n=e(this),a=n.data(),o=a.contextMenu,i=a.contextMenuRoot;n.addClass("hover").siblings(".hover").trigger("contextmenu:blur"),o.$selected=i.$selected=n,o.$node&&i.positionSubmenu.call(o.$node,o.$menu)},blurItem:function(t){t.stopPropagation();var n=e(this),a=n.data(),o=a.contextMenu;a.contextMenuRoot,n.removeClass("hover"),o.$selected=null}},g={show:function(t,n,a){var o=e(this),i={};return e("#context-menu-layer").trigger("mousedown"),t.$trigger=o,!1===t.events.show.call(o,t)?void(s=null):(g.update.call(o,t),t.position.call(o,t,n,a),t.zIndex&&(i.zIndex=f(o)+t.zIndex),g.layer.call(t.$menu,t,i.zIndex),t.$menu.find("ul").css("zIndex",i.zIndex+1),t.$menu.css(i)[t.animation.show](t.animation.duration,function(){o.trigger("contextmenu:visible")}),o.data("contextMenu",t).addClass("context-menu-active"),e(document).off("keydown.contextMenu").on("keydown.contextMenu",x.key),void(t.autoHide&&e(document).on("mousemove.contextMenuAutoHide",function(e){var n=o.offset();n.right=n.left+o.outerWidth(),n.bottom=n.top+o.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(n,a){var o=e(this);if(n||(n=o.data("contextMenu")||{}),a||!n.events||!1!==n.events.hide.call(o,n)){if(o.removeData("contextMenu").removeClass("context-menu-active"),n.$layer){setTimeout(function(e){return function(){e.remove()}}(n.$layer),10);try{delete n.$layer}catch(e){n.$layer=null}}s=null,n.$menu.find(".hover").trigger("contextmenu:blur"),n.$selected=null,e(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),n.$menu&&n.$menu[n.animation.hide](n.animation.duration,function(){n.build&&(n.$menu.remove(),e.each(n,function(e){switch(e){case"ns":case"selector":case"build":case"trigger":return!0;default:n[e]=t;try{delete n[e]}catch(e){}return!0}})),setTimeout(function(){o.trigger("contextmenu:hidden")},10)})}},create:function(a,o){o===t&&(o=a),a.$menu=e('<ul class="context-menu-list"></ul>').addClass(a.className||"").data({contextMenu:a,contextMenuRoot:o}),e.each(["callbacks","commands","inputs"],function(e,t){a[t]={},o[t]||(o[t]={})}),o.accesskeys||(o.accesskeys={}),e.each(a.items,function(t,i){var s=e('<li class="context-menu-item"></li>').addClass(i.className||""),c=null,r=null;if(s.on("click",e.noop),i.$node=s.data({contextMenu:a,contextMenuRoot:o,contextMenuKey:t}),i.accesskey)for(var l,u=n(i.accesskey),d=0;l=u[d];d++)if(!o.accesskeys[l]){o.accesskeys[l]=i,i._name=i.name.replace(new RegExp("("+l+")","i"),'<span class="context-menu-accesskey">$1</span>');break}if("string"==typeof i)s.addClass("context-menu-separator not-selectable");else if(i.type&&m[i.type])m[i.type].call(s,i,a,o),e.each([a,o],function(n,a){a.commands[t]=i,e.isFunction(i.callback)&&(a.callbacks[t]=i.callback)});else{switch("html"==i.type?s.addClass("context-menu-html not-selectable"):i.type?(c=e("<label></label>").appendTo(s),e("<span></span>").html(i._name||i.name).appendTo(c),s.addClass("context-menu-input"),a.hasTypes=!0,e.each([a,o],function(e,n){n.commands[t]=i,n.inputs[t]=i})):i.items&&(i.type="sub"),i.type){case"text":r=e('<input type="text" value="1" name="" value="">').attr("name","context-menu-input-"+t).val(i.value||"").appendTo(c);break;case"textarea":r=e('<textarea name=""></textarea>').attr("name","context-menu-input-"+t).val(i.value||"").appendTo(c),i.height&&r.height(i.height);break;case"checkbox":r=e('<input type="checkbox" value="1" name="" value="">').attr("name","context-menu-input-"+t).val(i.value||"").prop("checked",!!i.selected).prependTo(c);break;case"radio":r=e('<input type="radio" value="1" name="" value="">').attr("name","context-menu-input-"+i.radio).val(i.value||"").prop("checked",!!i.selected).prependTo(c);break;case"select":r=e('<select name="">').attr("name","context-menu-input-"+t).appendTo(c),i.options&&(e.each(i.options,function(t,n){e("<option></option>").val(t).text(n).appendTo(r)}),r.val(i.selected));break;case"sub":e("<span></span>").html(i._name||i.name).appendTo(s),i.appendTo=i.$node,g.create(i,o),s.data("contextMenu",i).addClass("context-menu-submenu"),i.callback=null;break;case"html":e(i.html).appendTo(s);break;default:e.each([a,o],function(n,a){a.commands[t]=i,e.isFunction(i.callback)&&(a.callbacks[t]=i.callback)}),e("<span></span>").html(i._name||i.name||"").appendTo(s)}i.type&&"sub"!=i.type&&"html"!=i.type&&(r.on("focus",x.focusInput).on("blur",x.blurInput),i.events&&r.on(i.events,a)),i.icon&&s.addClass("icon icon-"+i.icon)}i.$input=r,i.$label=c,s.appendTo(a.$menu),!a.hasTypes&&e.support.eventSelectstart&&s.on("selectstart.disableTextSelect",x.abortevent)}),a.$node||a.$menu.css("display","none").addClass("context-menu-root"),a.$menu.appendTo(a.appendTo||document.body)},resize:function(t,n){t.css({position:"absolute",display:"block"}),t.data("width",Math.ceil(t.width())+1),t.css({position:"static",minWidth:"0px",maxWidth:"100000px"}),t.find("> li > ul").each(function(){g.resize(e(this),!0)}),n||t.find("ul").add(t).css({position:"",display:"",minWidth:"",maxWidth:""}).width(function(){return e(this).data("width")})},update:function(n,a){var o=this;a===t&&(a=n,g.resize(n.$menu)),n.$menu.children().each(function(){var t=e(this),i=t.data("contextMenuKey"),s=n.items[i],c=e.isFunction(s.disabled)&&s.disabled.call(o,i,a)||!0===s.disabled;if(t[c?"addClass":"removeClass"]("disabled"),s.type)switch(t.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&&g.update.call(o,s,a)})},layer:function(t,n){var a=t.$layer=e('<div id="context-menu-layer" style="position:fixed; z-index:'+n+'; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;"></div>').css({height:r.height(),width:r.width(),display:"block"}).data("contextMenuRoot",t).insertBefore(this).on("contextmenu",x.abortevent).on("click",x.layerClick);return e.support.fixedPosition||a.css({position:"absolute",height:e(document).height()}),a}};e.fn.contextMenu=function(n){if(n===t)this.first().trigger("contextmenu");else if(n.x&&n.y)this.first().trigger(e.Event("contextmenu",{pageX:n.x,pageY:n.y}));else if("hide"===n){if(void 0!=this.data("contextMenu")){var a=this.data("contextMenu").$menu;a&&a.trigger("contextmenu:hide")}}else"destroy"===n?e.contextMenu("destroy",{context:this}):e.isPlainObject(n)?(n.context=this,e.contextMenu("create",n)):n?this.removeClass("context-menu-disabled"):n||this.addClass("context-menu-disabled");return this},e.contextMenu=function(n,a){"string"!=typeof n&&(a=n,n="create"),"string"==typeof a?a={selector:a}:a===t&&(a={});var o=e.extend(!0,{},p,a||{}),i=e(document),s=e(document).add(e("#iframe").contents()),r=!1;switch(o.context&&o.context.length?(s=e(o.context).first(),o.context=s.get(0),r=o.context!==document):o.context=document,n){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(l++,o.ns=".contextMenu"+l,r||(u[o.selector]=o.ns),d[o.ns]=o,o.trigger||(o.trigger="right"),c||(i.on({"contextmenu:hide.contextMenu":x.hideMenu,"prevcommand.contextMenu":x.prevItem,"nextcommand.contextMenu":x.nextItem,"contextmenu.contextMenu":x.abortevent,"mouseenter.contextMenu":x.menuMouseenter,"mouseleave.contextMenu":x.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",x.inputClick).on({"mouseup.contextMenu":x.itemClick,"contextmenu:focus.contextMenu":x.focusItem,"contextmenu:blur.contextMenu":x.blurItem,"contextmenu.contextMenu":x.abortevent,"mouseenter.contextMenu":x.itemMouseenter,"mouseleave.contextMenu":x.itemMouseleave},".context-menu-item"),c=!0),s.on("contextmenu"+o.ns,o.selector,o,x.contextmenu),r&&s.on("remove"+o.ns,function(){e(this).contextMenu("destroy")}),o.trigger){case"hover":s.on("mouseenter"+o.ns,o.selector,o,x.mouseenter).on("mouseleave"+o.ns,o.selector,o,x.mouseleave);break;case"left":s.on("click"+o.ns,o.selector,o,x.click)}o.build||g.create(o);break;case"destroy":var m;if(r){var h=o.context;e.each(d,function(t,n){if(n.context!==h)return!0;(m=e(".context-menu-list").filter(":visible")).length&&m.data().contextMenuRoot.$trigger.is(e(n.context).find(n.selector))&&m.trigger("contextmenu:hide",{force:!0});try{d[n.ns].$menu&&d[n.ns].$menu.remove(),delete d[n.ns]}catch(e){d[n.ns]=null}return e(n.context).off(n.ns),!0})}else if(o.selector){if(u[o.selector]){(m=e(".context-menu-list").filter(":visible")).length&&m.data().contextMenuRoot.$trigger.is(o.selector)&&m.trigger("contextmenu:hide",{force:!0});try{d[u[o.selector]].$menu&&d[u[o.selector]].$menu.remove(),delete d[u[o.selector]]}catch(e){d[u[o.selector]]=null}i.off(u[o.selector])}}else i.off(".contextMenu .contextMenuAutoHide"),e.each(d,function(t,n){e(n.context).off(n.ns)}),u={},d={},l=0,c=!1,e("#context-menu-layer, .context-menu-list").remove();break;case"html5":(!e.support.htmlCommand&&!e.support.htmlMenuitem||"boolean"==typeof a&&a)&&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 "'+n+'"')}return this},e.contextMenu.setInputValues=function(n,a){a===t&&(a={}),e.each(n.inputs,function(e,t){switch(t.type){case"text":case"textarea":t.value=a[e]||"";break;case"checkbox":t.selected=!!a[e];break;case"radio":t.selected=(a[t.radio]||"")==t.value;break;case"select":t.selected=a[e]||""}})},e.contextMenu.getInputValues=function(n,a){return a===t&&(a={}),e.each(n.inputs,function(e,t){switch(t.type){case"text":case"textarea":case"select":a[e]=t.$input.val();break;case"checkbox":a[e]=t.$input.prop("checked");break;case"radio":t.$input.prop("checked")&&(a[t.radio]=t.value)}}),a},e.contextMenu.fromMenu=function(t){var n={};return o(n,e(t).children()),n},e.contextMenu.defaults=p,e.contextMenu.types=m,e.contextMenu.handle=x,e.contextMenu.op=g,e.contextMenu.menus=d}(jQuery);
/* ---------------------------------------------------- */
/* CLIPBOARD */
/* ---------------------------------------------------- */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){var o,r,i;!function(a,c){r=[t,n(7)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function(){function t(e){n(this,t),this.resolveOptions(e),this.initSelection()}return i(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.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[e?"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,o.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,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";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"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(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 u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var o,r,i;!function(a,c){r=[t,n(0),n(2),n(1)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n,o){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(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 u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=r(e),s=r(n),f=r(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),p=function(t){function e(t,n){i(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.resolveOptions(n),o.listenClick(t),o}return c(e,t),h(e,[{key:"resolveOptions",value: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,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value: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),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])});
/* ---------------------------------------------------- */
/* AUTO GROW INPUT */
/* ---------------------------------------------------- */
!function(t){var n="oninput"in document.createElement("input")?"input":"keydown";t.fn.autoGrowInput=function(o){var e=t.extend({maxWidth:500,minWidth:20,comfortZone:0},o);return this.each(function(){var i=t(this),a=" ",r=o&&"comfortZone"in o?e.comfortZone:parseInt(i.css("fontSize")),c=t("<span/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:i.css("fontSize"),fontFamily:i.css("fontFamily"),fontWeight:i.css("fontWeight"),letterSpacing:i.css("letterSpacing"),textTransform:i.css("textTransform"),whiteSpace:"nowrap",ariaHidden:!0}).appendTo("body"),s=function(t){if(a!==(a=i.val())||"autogrow"===t.type){a||(a=i.attr("placeholder")||""),c.html(a.replace(/&/g,"&").replace(/\s/g," ").replace(/</g,"<").replace(/>/g,">"));var n=c.width()+r,o="function"==typeof e.maxWidth?e.maxWidth():e.maxWidth;n>o?n=o:n<e.minWidth&&(n=e.minWidth),n!=i.width()&&i.width(n)}};i.on(n+".autogrow autogrow",s),s()}),this}}(jQuery);
/* ---------------------------------------------------- */
/* RAFAEL CARICIO GRADIENT PARSER */
/* ---------------------------------------------------- */
window.GradientParser=function(){var result;function c(a){var c=new Error(b+": "+a);throw c.source=b,c}function d(){var a=e();return b.length>0&&c("Invalid input not EOF"),a}function e(){return t(f)}function f(){return g("linear-gradient",a.linearGradient,i)||g("repeating-linear-gradient",a.repeatingLinearGradient,i)||g("radial-gradient",a.radialGradient,l)||g("repeating-radial-gradient",a.repeatingRadialGradient,l)}function g(b,d,e){return h(d,function(d){var f=e();return f&&(F(a.comma)||c("Missing comma before color stops")),{type:b,orientation:f,colorStops:t(u)}})}function h(b,d){var e=F(b);if(e)return F(a.startCall)||c("Missing ("),result=d(e),F(a.endCall)||c("Missing )"),result}function i(){return j()||k()}function j(){return E("directional",a.sideOrCorner,1)}function k(){return E("angular",a.angleValue,1)}function l(){var c,e,d=m();return d&&(c=[],c.push(d),e=b,F(a.comma)&&(d=m(),d?c.push(d):b=e)),c}function m(){var a=n()||o();if(a)a.at=q();else{var b=p();if(b){a=b;var c=q();c&&(a.at=c)}else{var d=r();d&&(a={type:"default-radial",at:d})}}return a}function n(){var a=E("shape",/^(circle)/i,0);return a&&(a.style=D()||p()),a}function o(){var a=E("shape",/^(ellipse)/i,0);return a&&(a.style=B()||p()),a}function p(){return E("extent-keyword",a.extentKeywords,1)}function q(){if(E("position",/^at/,0)){var a=r();return a||c("Missing positioning value"),a}}function r(){var a=s();if(a.x||a.y)return{type:"position",value:a}}function s(){return{x:B(),y:B()}}function t(b){var d=b(),e=[];if(d)for(e.push(d);F(a.comma);)d=b(),d?e.push(d):c("One extra comma");return e}function u(){var a=v();return a||c("Expected color definition"),a.length=B(),a}function v(){return x()||z()||y()||w()}function w(){return E("literal",a.literalColor,0)}function x(){return E("hex",a.hexColor,1)}function y(){return h(a.rgbColor,function(){return{type:"rgb",value:t(A)}})}function z(){return h(a.rgbaColor,function(){return{type:"rgba",value:t(A)}})}function A(){return F(a.number)[1]}function B(){return E("%",a.percentageValue,1)||C()||D()}function C(){return E("position-keyword",a.positionKeywords,1)}function D(){return E("px",a.pixelValue,1)||E("em",a.emValue,1)}function E(a,b,c){var d=F(b);if(d)return{type:a,value:d[c]}}function F(a){var c,d;return d=/^[\n\r\t\s]+/.exec(b),d&&G(d[0].length),c=a.exec(b),c&&G(c[0].length),c}function G(a){b=b.substr(a)}var a={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},b="";return function(a){return b=a.toString(),d()}}();