!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClipboardJS=t():e.ClipboardJS=t()}(this,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var i,o,a,r;r=function(e,t){"use strict";var n,i=(n=t)&&n.__esModule?n:{default:n};var o="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};var a=function(){function e(e,t){for(var n=0;n0&&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"!==(void 0===e?"undefined":o(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=r},o=[e,n(7)],void 0===(a="function"==typeof(i=r)?i.apply(t,o):i)||(e.exports=a)},function(e,t,n){var i=n(6),o=n(5);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i0&&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"===l(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,r.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 o.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 d("action",e)}},{key:"defaultTarget",value:function(e){var t=d("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return d("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}();function d(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=c},o=[e,n(0),n(2),n(1)],void 0===(a="function"==typeof(i=r)?i.apply(t,o):i)||(e.exports=a)},function(e,t){var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}e.exports=function(e,t){for(;e&&e.nodeType!==n;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){var i=n(4);function o(e,t,n,o,a){var r=function(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}.apply(this,arguments);return e.addEventListener(n,r,a),{destroy:function(){e.removeEventListener(n,r,a)}}}e.exports=function(e,t,n,i,a){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return o(e,t,n,i,a)}))}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}}])}),function(){"use strict";function e(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),i=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),o=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){s(window,e)},e.unblockUI=function(e){l(window,e)},e.growlUI=function(t,n,i,o){var a=e('
');t&&a.append("

"+t+"

"),n&&a.append("

"+n+"

"),void 0===i&&(i=3e3);var r=function(t){t=t||{},e.blockUI({message:a,fadeIn:void 0!==t.fadeIn?t.fadeIn:700,fadeOut:void 0!==t.fadeOut?t.fadeOut:1e3,timeout:void 0!==t.timeout?t.timeout:i,centerY:!1,showOverlay:!1,onUnblock:o,css:e.blockUI.defaults.growlCSS})};r();a.css("opacity");a.mouseover(function(){r({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var n=e.extend({},e.blockUI.defaults,t||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,s(this,t)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){l(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var a=null,r=[];function s(s,u){var d,f,g=s==window,_=u&&void 0!==u.message?u.message:void 0;if(!(u=e.extend({},e.blockUI.defaults,u||{})).ignoreIfBlocked||!e(s).data("blockUI.isBlocked")){if(u.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,u.overlayCSS||{}),d=e.extend({},e.blockUI.defaults.css,u.css||{}),u.onOverlayClick&&(u.overlayCSS.cursor="pointer"),f=e.extend({},e.blockUI.defaults.themedCSS,u.themedCSS||{}),_=void 0===_?u.message:_,g&&a&&l(window,{fadeOut:0}),_&&"string"!=typeof _&&(_.parentNode||_.jquery)){var m=_.jquery?_[0]:_,v={};e(s).data("blockUI.history",v),v.el=m,v.parent=m.parentNode,v.display=m.style.display,v.position=m.style.position,v.parent&&v.parent.removeChild(m)}e(s).data("blockUI.onUnblock",u.onUnblock);var y,b,x,w,C=u.baseZ;y=n||u.forceIframe?e(''):e(''),b=u.theme?e(''):e(''),u.theme&&g?(w='"):u.theme?(w='"):w=g?'':'',x=e(w),_&&(u.theme?(x.css(f),x.addClass("ui-widget-content")):x.css(d)),u.theme||b.css(u.overlayCSS),b.css("position",g?"fixed":"absolute"),(n||u.forceIframe)&&y.css("opacity",0);var k=[y,b,x],S=e(g?"body":s);e.each(k,function(){this.appendTo(S)}),u.theme&&u.draggable&&e.fn.draggable&&x.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var I=o&&(!e.support.boxModel||e("object,embed",g?null:s).length>0);if(i||I){if(g&&u.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(i||!e.support.boxModel)&&!g)var T=p(s,"borderTopWidth"),D=p(s,"borderLeftWidth"),E=T?"(0 - "+T+")":0,A=D?"(0 - "+D+")":0;e.each(k,function(e,t){var n=t[0].style;if(n.position="absolute",e<2)g?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+u.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),g?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),A&&n.setExpression("left",A),E&&n.setExpression("top",E);else if(u.centerY)g&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!u.centerY&&g){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(u.css&&u.css.top?parseInt(u.css.top,10):0)+') + "px"';n.setExpression("top",i)}})}if(_&&(u.theme?x.find(".ui-widget-content").append(_):x.append(_),(_.jquery||_.nodeType)&&e(_).show()),(n||u.forceIframe)&&u.showOverlay&&y.show(),u.fadeIn){var O=u.onBlock?u.onBlock:t,P=u.showOverlay&&!_?O:t,B=_?O:t;u.showOverlay&&b._fadeIn(u.fadeIn,P),_&&x._fadeIn(u.fadeIn,B)}else u.showOverlay&&b.show(),_&&x.show(),u.onBlock&&u.onBlock.bind(x)();if(c(1,s,u),g?(a=x[0],r=e(u.focusableElements,a),u.focusInput&&setTimeout(h,20)):function(e,t,n){var i=e.parentNode,o=e.style,a=(i.offsetWidth-e.offsetWidth)/2-p(i,"borderLeftWidth"),r=(i.offsetHeight-e.offsetHeight)/2-p(i,"borderTopWidth");t&&(o.left=a>0?a+"px":"0");n&&(o.top=r>0?r+"px":"0")}(x[0],u.centerX,u.centerY),u.timeout){var M=setTimeout(function(){g?e.unblockUI(u):e(s).unblock(u)},u.timeout);e(s).data("blockUI.timeout",M)}}}function l(t,n){var i,o,s=t==window,l=e(t),d=l.data("blockUI.history"),h=l.data("blockUI.timeout");h&&(clearTimeout(h),l.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),c(0,t,n),null===n.onUnblock&&(n.onUnblock=l.data("blockUI.onUnblock"),l.removeData("blockUI.onUnblock")),o=s?e("body").children().filter(".blockUI").add("body > .blockUI"):l.find(">.blockUI"),n.cursorReset&&(o.length>1&&(o[1].style.cursor=n.cursorReset),o.length>2&&(o[2].style.cursor=n.cursorReset)),s&&(a=r=null),n.fadeOut?(i=o.length,o.stop().fadeOut(n.fadeOut,function(){0==--i&&u(o,d,n,t)})):u(o,d,n,t)}function u(t,n,i,o){var a=e(o);if(!a.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.el.style.cursor="default",n.parent&&n.parent.appendChild(n.el),a.removeData("blockUI.history")),a.data("blockUI.static")&&a.css("position","static"),"function"==typeof i.onUnblock&&i.onUnblock(o,i);var r=e(document.body),s=r.width(),l=r[0].style.width;r.width(s-1).width(s),r[0].style.width=l}}function c(t,n,i){var o=n==window,r=e(n);if((t||(!o||a)&&(o||r.data("blockUI.isBlocked")))&&(r.data("blockUI.isBlocked",t),o&&i.bindEvents&&(!t||i.showOverlay))){var s="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(s,i,d):e(document).unbind(s,d)}}function d(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&a&&t.data.constrainTabKey){var n=r,i=!t.shiftKey&&t.target===n[n.length-1],o=t.shiftKey&&t.target===n[0];if(i||o)return setTimeout(function(){h(o)},10),!1}var s=t.data,l=e(t.target);return l.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),l.parents("div."+s.blockMsgClass).length>0||0===l.parents().children().filter("div.blockUI").length}function h(e){if(r){var t=r[!0===e?r.length-1:0];t&&t.focus()}}function p(t,n){return parseInt(e.css(t,n),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){var t=/\+/g;function n(e){return o.raw?e:encodeURIComponent(e)}function i(n,i){var a=o.raw?n:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),o.json?JSON.parse(e):e}catch(e){}}(n);return e.isFunction(i)?i(a):a}var o=e.cookie=function(t,a,r){if(arguments.length>1&&!e.isFunction(a)){if("number"==typeof(r=e.extend({},o.defaults,r)).expires){var s=r.expires,l=r.expires=new Date;l.setMilliseconds(l.getMilliseconds()+864e5*s)}return document.cookie=[n(t),"=",function(e){return n(o.json?JSON.stringify(e):String(e))}(a),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}for(var u,c=t?void 0:{},d=document.cookie?document.cookie.split("; "):[],h=0,p=d.length;h0||navigator.msMaxTouchPoints>0),supportFileApi:!!t&&(t.FileReader&&t.File&&t.FileList&&t.Blob),wheelEnm:a,urlUtil:function(e,i){return i=(e={href:t.location.href,param:t.location.search,referrer:n.referrer,pathname:t.location.pathname,hostname:t.location.hostname,port:t.location.port}).href.split(/[\?#]/),e.param=e.param.replace("?",""),e.url=i[0],e.href.search("#")>-1&&(e.hashdata=_.last(i)),i=null,e.baseUrl=_.left(e.href,"?").replace(e.pathname,""),e},getError:function(e,t,n){return g.errorMsg&&g.errorMsg[e]?{className:e,errorCode:t,methodName:n,msg:g.errorMsg[e][t]}:{className:e,errorCode:t,methodName:n}}}}(),f.util=_=function(){var m=Object.prototype.toString;function v(e,t){if(S(e))return[];var n=void 0,i=0,o=e.length;if(void 0===o||"function"==typeof e){for(n in e)if(void 0!==e[n]&&!1===t.call(e[n],n,e[n]))break}else for(;i0&&(t+=","),t+=y(e[n]);t+="]"}else if(f.util.isObject(e)){t+="{";var o=[];v(e,function(e,t){o.push('"'+e+'": '+y(t))}),t+=o.join(", "),t+="}"}else t=f.util.isString(e)?'"'+e+'"':f.util.isNumber(e)?e:f.util.isUndefined(e)?"undefined":f.util.isFunction(e)?'"{Function}"':e;return t}function b(e){return"[object Object]"==m.call(e)}function x(e){return"[object Array]"==m.call(e)}function w(e){return"function"==typeof e}function C(e){return"[object String]"==m.call(e)}function k(e){return"[object Number]"==m.call(e)}function S(e){return null==e||""===e}function I(e,t){return void 0===e||void 0===t?"":C(t)?e.indexOf(t)>-1?e.substr(0,e.indexOf(t)):"":k(t)?e.substr(0,t):""}function T(e,t){return void 0===e||void 0===t?"":(e=""+e,C(t)?e.lastIndexOf(t)>-1?e.substr(e.lastIndexOf(t)+1):"":k(t)?e.substr(e.length-t):"")}function D(e){return e.replace(o,"ms-").replace(a,function(e,t){return t.toUpperCase()})}function E(e){return D(e).replace(r,function(e,t){return"-"+t.toLowerCase()})}function A(e,t){var n,i,o,a=(""+e).split(s);return i=Number(a[0].replace(/,/g,""))<0||"-0"==a[0],o=0,a[0]=a[0].replace(l,""),a[1]?(a[1]=a[1].replace(u,""),o=Number(a[0]+"."+a[1])||0):o=Number(a[0])||0,n=i?-o:o,v(t,function(e,t){var i,o;"round"==e&&(n=k(t)?t<0?+(Math.round(n+"e-"+Math.abs(t))+"e+"+Math.abs(t)):+(Math.round(n+"e+"+t)+"e-"+t):Math.round(n)),"floor"==e&&(n=Math.floor(n)),"ceil"==e?n=Math.ceil(n):"money"==e?n=function(e){var t=""+n;if(isNaN(t)||""==t)return"";var i=t.split(".");i[0]+=".";do{i[0]=i[0].replace(c,"$1,$2")}while(c.test(i[0]));return i.length>1?i.join(""):i[0].split(".")[0]}():"abs"==e?n=Math.abs(Number(n)):"byte"==e&&(i="KB",(o=Number(n)/1024)/1024>1&&(i="MB",o/=1024),o/1024>1&&(i="GB",o/=1024),n=A(o,{round:1})+i)}),n}function O(e,t,n,i,o,a){var r;return new Date,t<0&&(t=0),void 0===i&&(i=12),void 0===o&&(o=0),r=new Date(Date.UTC(e,t,n||1,i,o,a||0)),0==t&&1==n&&r.getUTCHours()+r.getTimezoneOffset()/60<0?r.setUTCHours(0):r.setUTCHours(r.getUTCHours()+r.getTimezoneOffset()/60),r}function P(e,t){var n,i,o,a,r,s,l,u,c,d,h,p,f,_,m,v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,k=void 0,S=void 0,I=void 0,D=void 0,E=void 0;if(C(e))if(0==e.length)e=new Date;else if(e.length>15)/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i.test(e)||/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i.test(e)?e=new Date(e):(v=(D=(k=e.split(/ /g))[0].split(/\D/g))[0],y=parseFloat(D[1]),b=parseFloat(D[2]),S=(I=k[1]||"09:00").substring(0,5).split(":"),x=parseFloat(S[0]),w=parseFloat(S[1]),"AM"!==T(I,2)&&"PM"!==T(I,2)||(x+=12),e=O(v,y-1,b,x,w));else if(14==e.length)E=e.replace(/\D/g,""),e=O(E.substr(0,4),E.substr(4,2)-1,A(E.substr(6,2)),A(E.substr(8,2)),A(E.substr(10,2)),A(E.substr(12,2)));else if(e.length>7)E=e.replace(/\D/g,""),e=O(E.substr(0,4),E.substr(4,2)-1,A(E.substr(6,2)));else if(e.length>4)E=e.replace(/\D/g,""),e=O(E.substr(0,4),E.substr(4,2)-1,1);else{if(e.length>2)return O((E=e.replace(/\D/g,"")).substr(0,4),E.substr(4,2)-1,1);e=new Date}return void 0===t||void 0===e?e:("add"in t&&(e=function(e,t){var n=void 0,i=void 0,o=void 0,a=void 0;return void 0!==t.d?e.setTime(e.getTime()+864e5*t.d):void 0!==t.m?(n=e.getFullYear(),i=e.getMonth(),o=e.getDate(),(a=B(n+=parseInt(t.m/12),i+=t.m%12))=t||n<0||d&&e-u>=a}function g(){var e=Date.now();if(f(e))return _(e);s=setTimeout(g,function(e){var n=e-u,i=t-(e-l);return d?Math.min(i,a-n):i}(e))}function _(e){return s=void 0,h&&i?p(e):(i=o=void 0,r)}function m(){for(var e=Date.now(),n=f(e),a=arguments.length,h=Array(a),_=0;_\&\"]/gm,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case'"':return""";default:return e}}):""}function z(e){return"[object String]"!=m.call(e)?e:e?e.replace(/(<)|(>)|(&)|(")/gm,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case""":return'"';default:return e}}):""}return{alert:function(e){return t.alert(y(e)),e},each:v,map:function(e,t){if(S(e))return[];var n=void 0,i=0,o=e.length,a=[],r=void 0;if(b(e)){for(n in e)if(void 0!==e[n]){if(r=void 0,!1===(r=t.call(e[n],n,e[n])))break;a.push(r)}}else for(;i0&&(void 0===t[i]||!1!==(o=n.call(e,o,t[--i]))););return o},filter:function(e,t){if(S(e))return[];var n,i=0,o=e.length,a=[];if(b(e))for(n in e)void 0!==e[n]&&t.call(e[n],n,e[n])&&a.push(e[n]);else for(;i7&&P(e)instanceof Date)return!0;if((e=e.replace(/\D/g,"")).length>7){var n=e.substr(4,2),i=e.substr(6,2);(e=P(e)).getMonth()==n-1&&e.getDate()==i&&(t=!0)}}return t},stopEvent:function(e){e||(e=window.event);return e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1},selectRange:V,debounce:L,throttle:function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),L(e,t,{leading:i,maxWait:t,trailing:o})},escapeHtml:H,unescapeHtml:z,string:function(e){return new function(e){this.value=e,this.toString=function(){return this.value},this.format=function(){for(var e=[],t=0,n=arguments.length;t.5?l/(2-a-r):l/(a+r),a){case e:i=(t-n)/l+(t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=u(e,360),t=u(t,100),n=u(n,100),0===t)i=o=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=r(l,s,e+1/3),o=r(l,s,e),a=r(l,s,e-1/3)}return{r:255*i,g:255*o,b:255*a}}return new function(t){this._originalValue=t,t=function(e){var t=void 0;return(t=a.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=a.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=a.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=a.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=a.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=a.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=a.hex8.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:parseInt(t[4]/255,16),format:"hex8"}:(t=a.hex6.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),format:"hex"}:(t=a.hex4.exec(e))?{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),a:parseInt(t[4]+""+t[4],16),format:"hex8"}:!!(t=a.hex3.exec(e))&&{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),format:"hex"}}(t),this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a||1,this._format=t.format,this._hex=l(this.r)+l(this.g)+l(this.b),this.getHexValue=function(){return this._hex},this.lighten=function(t){t=0===t?0:t||10;var n,i=c(this.r,this.g,this.b);return i.l+=t/100,i.l=Math.min(1,Math.max(0,i.l)),i.h=360*i.h,e("rgba("+s((n=d(i.h,r(i.s),r(i.l))).r)+", "+s(n.g)+", "+s(n.b)+", "+this.a+")")},this.darken=function(t){t=0===t?0:t||10;var n,i=c(this.r,this.g,this.b);return i.l-=t/100,i.l=Math.min(1,Math.max(0,i.l)),i.h=360*i.h,e("rgba("+s((n=d(i.h,r(i.s),r(i.l))).r)+", "+s(n.g)+", "+s(n.b)+", "+this.a+")")},this.getBrightness=function(){return(299*this.r+587*this.g+114*this.b)/1e3},this.isDark=function(){return this.getBrightness()<128},this.isLight=function(){return!this.isDark()},this.getHsl=function(){var e=c(this.r,this.g,this.b);return e.l=Math.min(1,Math.max(0,e.l)),e.h=360*e.h,{h:e.h,s:e.s,l:e.l}}}(t)}}}(),"object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)?module.exports=f:e.ax5=f}).call("undefined"!=typeof window?window:void 0),ax5.def={},ax5.info.errorMsg.ax5dialog={501:"Duplicate call error"},ax5.info.errorMsg.ax5picker={401:"Can not find target element",402:"Can not find boundID",501:"Can not find content key"},ax5.info.errorMsg["single-uploader"]={460:"There are no files to be uploaded.",461:"There is no uploaded files."},ax5.info.errorMsg.ax5calendar={401:"Can not find target element"},ax5.info.errorMsg.ax5formatter={401:"Can not find target element",402:"Can not find boundID",501:"Can not find pattern"},ax5.info.errorMsg.ax5menu={501:"Can not find menu item"},ax5.info.errorMsg.ax5select={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},ax5.info.errorMsg.ax5combobox={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},function(){"use strict";var e,t,n,i,o,a,r=/^\s*|\s*$/g;(Object.keys||(Object.keys=(e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),i=(n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(o){if("object"!==(void 0===o?"undefined":_typeof(o))&&("function"!=typeof o||null===o))throw new TypeError("type err");var a,r,s=[];for(a in o)e.call(o,a)&&s.push(a);if(t)for(r=0;r>>0;if("function"!=typeof e)throw TypeError();var i,o=arguments[1];for(i=0;in));i+=1);return e.removeRule(0),r};document.querySelectorAll=function(e){return t(e,1/0)},document.querySelector=function(e){return t(e,1)[0]||null}}}(),String.prototype.trim||(String.prototype.trim=function(){return this.replace(r,"")}),window.JSON||(window.JSON={parse:function(e){return new Function("","return "+e)()},stringify:(a=/["]/g,o=function(e){var t,n,i;switch(t=void 0===e?"undefined":_typeof(e)){case"string":return'"'+e.replace(a,'\\"')+'"';case"number":case"boolean":return e.toString();case"undefined":return"undefined";case"function":return'""';case"object":if(!e)return"null";if(t="",e.splice){for(n=0,i=e.length;n=9)return!1;var e=Array.prototype.splice;Array.prototype.splice=function(){var t=Array.prototype.slice.call(arguments);return void 0===t[1]&&(t[1]=this.length-t[0]),e.apply(this,t)}}(),function(){var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){if(n=void 0!==n?n:this.length,"[object Array]"===Object.prototype.toString.call(this))return e.call(this,t,n);var i,o,a=[],r=this.length,s=t||0;s=s>=0?s:Math.max(0,r+s);var l="number"==typeof n?Math.min(n,r):r;if(n<0&&(l=r+n),(o=l-s)>0)if(a=new Array(o),this.charAt)for(i=0;i":">",'"':""","'":"'","/":"/"};var c=/\s*/,d=/\s+/,h=/\s*=/,p=/\s*\}/,f=/#|\^|\/|>|\{|&|=|!/;function g(e){this.string=e,this.tail=e,this.pos=0}function _(e,t){this.view=e,this.cache={".":this.view,"@each":function(){var e=[];for(var t in this)e.push({"@key":t,"@value":this[t]});return e}},this.parent=t}function m(){this.cache={}}g.prototype.eos=function(){return""===this.tail},g.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},g.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},_.prototype.push=function(e){return new _(e,this)},_.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var o,r,s=this,l=!1;s;){if(e.indexOf(".")>0)for(t=s.view,o=e.split("."),r=0;null!=t&&r0?o[o.length-1][4]:n;break;default:i.push(t)}return n}(function(e){for(var t,n,i=[],o=0,a=e.length;o"===a?r=this.renderPartial(o,t,n,i):"&"===a?r=this.unescapedValue(o,t):"name"===a?r=this.escapedValue(o,t):"text"===a&&(r=this.rawValue(o)),void 0!==r&&(s+=r);return s},m.prototype.renderSection=function(e,t,o,a){var r=this,s="",l=t.lookup(e[1]);if(l){if(n(l))for(var u=0,c=l.length;u"'\/]/g,function(e){return u[e]})},e.Scanner=g,e.Context=_,e.Writer=m}),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"mask"},function(){var i,o=this;this.instanceId=ax5.getGuid(),this.config={theme:"",target:jQuery(document.body).get(0),animateTime:250},this.maskContent="",this.status="off",i=this.config;var a=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),e=null,t=null,!0},r=function(e){this.maskContent=e};this.init=function(){this.onStateChanged=i.onStateChanged,this.onClick=i.onClick,this.config.content&&r.call(this,this.config.content)},this.open=function(e){"on"===this.status&&this.close(),e&&e.content&&r.call(this,e.content),e&&void 0===e.templateName&&(e.templateName="defaultMask"),o.maskConfig=jQuery.extend(!0,{},this.config,e);var t=o.maskConfig,i=t.target,s=jQuery(i),l="ax-mask-"+ax5.getGuid(),u=void 0,c={},d={},h=t.templateName,p=function(e){return void 0===e.templateName&&(e.templateName="defaultMask"),n.tmpl.get.call(this,e.templateName,e)}({theme:t.theme,maskId:l,body:this.maskContent,templateName:h});return jQuery(document.body).append(p),i&&i!==jQuery(document.body).get(0)&&(c={position:t.position||"absolute",left:s.offset().left,top:s.offset().top,width:s.outerWidth(),height:s.outerHeight()},s.addClass("ax-masking"),jQuery(window).on("resize.ax5mask-"+this.instanceId,function(e){this.align()}.bind(this))),void 0!==o.maskConfig.zIndex&&(c["z-index"]=o.maskConfig.zIndex),this.$mask=u=jQuery("#"+l),this.$target=s,this.status="on",u.css(c),t.onClick&&u.on("click",function(e){d={self:o,state:"open",type:"click"},o.maskConfig.onClick.call(d,d)}),a.call(this,null,{self:this,state:"open"}),e=null,t=null,i=null,s=null,l=null,u=null,c=null,d=null,h=null,p=null,this},this.close=function(e){if(this.$mask){var t=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};e?setTimeout(function(){t.call(this)}.bind(this),e):t.call(this)}return this},this.fadeOut=function(){return this.$mask&&(this.$mask.addClass("fade-out"),setTimeout(function(){(function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)}).call(this)}.bind(this),i.animateTime)),this},this.align=function(){if(this.maskConfig&&this.maskConfig.target&&this.maskConfig.target!==jQuery(document.body).get(0))try{var e={position:this.maskConfig.position||"absolute",left:this.$target.offset().left,top:this.$target.offset().top,width:this.$target.outerWidth(),height:this.$target.outerHeight()};this.$mask.css(e)}catch(e){}return this},this.pullRequest=function(){console.log("test pullRequest01"),console.log("test pullRequest02")},this.main=function(){e.mask_instance=e.mask_instance||[],e.mask_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}),n=ax5.ui.mask}(),function(){var e=ax5.ui.mask;e.tmpl={defaultMask:function(e){return'\n
\n
\n
\n
\n {{{body}}}\n
\n
\n
\n '},get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"modal"},function(){var i,o=this,a={mousedown:ax5.info.supportTouch?"touchstart":"mousedown",mousemove:ax5.info.supportTouch?"touchmove":"mousemove",mouseup:ax5.info.supportTouch?"touchend":"mouseup"},r=function(e){var t=e;return"changedTouches"in e&&e.changedTouches&&(t=e.changedTouches[0]),{clientX:t.clientX,clientY:t.clientY}};this.instanceId=ax5.getGuid(),this.config={id:"ax5-modal-"+this.instanceId,position:{left:"center",top:"middle",margin:10},minimizePosition:"bottom-right",clickEventName:"ontouchstart"in document.documentElement?"touchstart":"click",theme:"default",width:300,height:400,closeToEsc:!0,disableDrag:!1,disableResize:!1,animateTime:250,iframe:!1},this.activeModal=null,this.watingModal=!1,this.$={},i=this.config;var s=function(e,t){var n={resize:function(t){e&&e.onResize?e.onResize.call(t,t):this.onResize&&this.onResize.call(t,t)},move:function(){}};return t.state in n&&n[t.state].call(this,t),e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),!0},l=function(e,i){var l=void 0;jQuery(document.body).append(function(e,t){var i={modalId:e,theme:t.theme,header:t.header,fullScreen:t.fullScreen?"fullscreen":"",styles:"",iframe:t.iframe,iframeLoadingMsg:t.iframeLoadingMsg,disableResize:t.disableResize};return t.zIndex&&(i.styles+="z-index:"+t.zIndex+";"),t.absolute&&(i.styles+="position:absolute;"),i.iframe&&"string"==typeof i.iframe.param&&(i.iframe.param=ax5.util.param(i.iframe.param)),n.tmpl.get.call(this,"content",i,{})}.call(this,e.id,e)),this.activeModal=jQuery("#"+e.id),this.$={root:this.activeModal,header:this.activeModal.find('[data-modal-els="header"]'),body:this.activeModal.find('[data-modal-els="body"]')},e.iframe?(this.$["iframe-wrap"]=this.activeModal.find('[data-modal-els="iframe-wrap"]'),this.$.iframe=this.activeModal.find('[data-modal-els="iframe"]'),this.$["iframe-form"]=this.activeModal.find('[data-modal-els="iframe-form"]'),this.$["iframe-loading"]=this.activeModal.find('[data-modal-els="iframe-loading"]')):this.$["body-frame"]=this.activeModal.find('[data-modal-els="body-frame"]'),this.align(),l={self:this,id:e.id,theme:e.theme,width:e.width,height:e.height,state:"open",$:this.$},e.iframe&&(this.$["iframe-wrap"].css({height:e.height}),this.$.iframe.css({height:e.height}),this.$["iframe-form"].attr({method:e.iframe.method}),this.$["iframe-form"].attr({target:e.id+"-frame"}),this.$["iframe-form"].attr({action:e.iframe.url}),this.$.iframe.on("load",function(){l.state="load",e.iframeLoadingMsg&&this.$["iframe-loading"].hide(),s.call(this,e,l)}.bind(this)),e.iframeLoadingMsg||this.$.iframe.show(),this.$["iframe-form"].submit()),i&&i.call(l,l),this.watingModal||s.call(this,e,l),e.closeToEsc&&jQuery(window).bind("keydown.ax-modal",function(e){c.call(this,e||window.event)}.bind(this)),jQuery(window).bind("resize.ax-modal",function(e){this.align(null,e||window.event)}.bind(this)),this.$.header.off(a.mousedown).off("dragstart").on(a.mousedown,function(n){var i=t.findParentNode(n.target,function(e){if(e.getAttribute("data-modal-header-btn"))return!0});e.isFullScreen||i||1==e.disableDrag||(o.mousePosition=r(n),h.on.call(o)),i&&u.call(o,n||window.event,e)}).on("dragstart",function(e){return t.stopEvent(e.originalEvent),!1}),this.activeModal.off(a.mousedown).off("dragstart").on(a.mousedown,"[data-ax5modal-resizer]",function(t){if(e.disableDrag||e.isFullScreen)return!1;o.mousePosition=r(t),p.on.call(o,this.getAttribute("data-ax5modal-resizer"))}).on("dragstart",function(e){return t.stopEvent(e.originalEvent),!1})},u=function(e,n,i,o,a){var r=void 0;e.srcElement&&(e.target=e.srcElement),(o=t.findParentNode(e.target,function(e){if(e.getAttribute("data-modal-header-btn"))return!0}))&&(r={self:this,key:a=o.getAttribute("data-modal-header-btn"),value:n.header.btns[a],dialogId:n.id,btnTarget:o},n.header.btns[a].onClick&&n.header.btns[a].onClick.call(r,a)),r=null,n=null,o=null,a=null},c=function(e){e.keyCode==ax5.info.eventKeys.ESC&&this.close()},d={"top-left":function(){this.align({left:"left",top:"top"})},"top-right":function(){this.align({left:"right",top:"top"})},"bottom-left":function(){this.align({left:"left",top:"bottom"})},"bottom-right":function(){this.align({left:"right",top:"bottom"})},"center-middle":function(){this.align({left:"center",top:"middle"})}},h={on:function(){var e=this.activeModal.css("z-index"),t=this.activeModal.offset(),n={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()};jQuery(window).width(),jQuery(window).height(),jQuery(document).scrollLeft(),jQuery(document).scrollTop(),o.__dx=0,o.__dy=0,o.resizerBg=jQuery('
'),o.resizer=jQuery('
'),o.resizerBg.css({zIndex:e}),o.resizer.css({left:t.left,top:t.top,width:n.width,height:n.height,zIndex:e+1}),jQuery(document.body).append(o.resizerBg).append(o.resizer),o.activeModal.addClass("draged"),jQuery(document.body).on(a.mousemove+".ax5modal-move-"+this.instanceId,function(e){o.resizer.css(function(e){return o.__dx=e.clientX-o.mousePosition.clientX,o.__dy=e.clientY-o.mousePosition.clientY,{left:t.left+o.__dx,top:t.top+o.__dy}}(e))}).on(a.mouseup+".ax5modal-move-"+this.instanceId,function(e){h.off.call(o)}).on("mouseleave.ax5modal-move-"+this.instanceId,function(e){h.off.call(o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(){this.activeModal.removeClass("draged"),function(){var e=this.resizer.offset();this.modalConfig.absolute||(e.left-=jQuery(document).scrollLeft(),e.top-=jQuery(document).scrollTop()),this.activeModal.css(e),this.modalConfig.left=e.left,this.modalConfig.top=e.top,e=null}.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,jQuery(document.body).off(a.mousemove+".ax5modal-move-"+this.instanceId).off(a.mouseup+".ax5modal-move-"+this.instanceId).off("mouseleave.ax5modal-move-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart"),s.call(this,o.modalConfig,{self:this,state:"move"})}},p={on:function(e){var t=this.activeModal.css("z-index"),n=this.activeModal.offset(),i={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()},r=(jQuery(window).width(),jQuery(window).height(),jQuery(document).scrollLeft(),jQuery(document).scrollTop(),{top:function(e){return l>i.height-o.__dy&&(o.__dy=i.height-l),e.shiftKey?(l>i.height-2*o.__dy&&(o.__dy=(i.height-l)/2),{left:n.left,top:n.top+o.__dy,width:i.width,height:i.height-2*o.__dy}):e.altKey?(l>i.height-2*o.__dy&&(o.__dy=(i.height-l)/2),{left:n.left+o.__dy,top:n.top+o.__dy,width:i.width-2*o.__dy,height:i.height-2*o.__dy}):{left:n.left,top:n.top+o.__dy,width:i.width,height:i.height-o.__dy}},bottom:function(e){return l>i.height+o.__dy&&(o.__dy=-i.height+l),e.shiftKey?(l>i.height+2*o.__dy&&(o.__dy=(-i.height+l)/2),{left:n.left,top:n.top-o.__dy,width:i.width,height:i.height+2*o.__dy}):e.altKey?(l>i.height+2*o.__dy&&(o.__dy=(-i.height+l)/2),{left:n.left-o.__dy,top:n.top-o.__dy,width:i.width+2*o.__dy,height:i.height+2*o.__dy}):{left:n.left,top:n.top,width:i.width,height:i.height+o.__dy}},left:function(e){return s>i.width-o.__dx&&(o.__dx=i.width-s),e.shiftKey?(s>i.width-2*o.__dx&&(o.__dx=(i.width-s)/2),{left:n.left+o.__dx,top:n.top,width:i.width-2*o.__dx,height:i.height}):e.altKey?(s>i.width-2*o.__dx&&(o.__dx=(i.width-s)/2),{left:n.left+o.__dx,top:n.top+o.__dx,width:i.width-2*o.__dx,height:i.height-2*o.__dx}):{left:n.left+o.__dx,top:n.top,width:i.width-o.__dx,height:i.height}},right:function(e){return s>i.width+o.__dx&&(o.__dx=-i.width+s),e.shiftKey?(s>i.width+2*o.__dx&&(o.__dx=(-i.width+s)/2),{left:n.left-o.__dx,top:n.top,width:i.width+2*o.__dx,height:i.height}):e.altKey?(s>i.width+2*o.__dx&&(o.__dx=(-i.width+s)/2),{left:n.left-o.__dx,top:n.top-o.__dx,width:i.width+2*o.__dx,height:i.height+2*o.__dx}):{left:n.left,top:n.top,width:i.width+o.__dx,height:i.height}},"top-left":function(e){return s>i.width-o.__dx&&(o.__dx=i.width-s),l>i.height-o.__dy&&(o.__dy=i.height-l),e.shiftKey||e.altKey?(l>i.height-2*o.__dy&&(o.__dy=(i.height-l)/2),s>i.width-2*o.__dx&&(o.__dx=(i.width-s)/2),{left:n.left+o.__dx,top:n.top+o.__dy,width:i.width-2*o.__dx,height:i.height-2*o.__dy}):(l>i.height-2*o.__dy&&(o.__dy=(i.height-l)/2),s>i.width-2*o.__dx&&(o.__dx=(i.width-s)/2),{left:n.left+o.__dx,top:n.top+o.__dy,width:i.width-o.__dx,height:i.height-o.__dy})},"top-right":function(e){return s>i.width+o.__dx&&(o.__dx=-i.width+s),l>i.height-o.__dy&&(o.__dy=i.height-l),e.shiftKey||e.altKey?(l>i.height-2*o.__dy&&(o.__dy=(i.height-l)/2),s>i.width+2*o.__dx&&(o.__dx=(-i.width+s)/2),{left:n.left-o.__dx,top:n.top+o.__dy,width:i.width+2*o.__dx,height:i.height-2*o.__dy}):{left:n.left,top:n.top+o.__dy,width:i.width+o.__dx,height:i.height-o.__dy}},"bottom-left":function(e){return s>i.width-o.__dx&&(o.__dx=i.width-s),l>i.height+o.__dy&&(o.__dy=-i.height+l),e.shiftKey||e.altKey?(s>i.width-2*o.__dx&&(o.__dx=(i.width-s)/2),l>i.height+2*o.__dy&&(o.__dy=(-i.height+l)/2),{left:n.left+o.__dx,top:n.top-o.__dy,width:i.width-2*o.__dx,height:i.height+2*o.__dy}):{left:n.left+o.__dx,top:n.top,width:i.width-o.__dx,height:i.height+o.__dy}},"bottom-right":function(e){return s>i.width+o.__dx&&(o.__dx=-i.width+s),l>i.height+o.__dy&&(o.__dy=-i.height+l),e.shiftKey||e.altKey?(s>i.width+2*o.__dx&&(o.__dx=(-i.width+s)/2),l>i.height+2*o.__dy&&(o.__dy=(-i.height+l)/2),{left:n.left-o.__dx,top:n.top-o.__dy,width:i.width+2*o.__dx,height:i.height+2*o.__dy}):{left:n.left,top:n.top,width:i.width+o.__dx,height:i.height+o.__dy}}}),s=100,l=100,u={top:"row-resize",bottom:"row-resize",left:"col-resize",right:"col-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"};o.__dx=0,o.__dy=0,o.resizerBg=jQuery('
'),o.resizer=jQuery('
'),o.resizerBg.css({zIndex:t,cursor:u[e]}),o.resizer.css({left:n.left,top:n.top,width:i.width,height:i.height,zIndex:t+1,cursor:u[e]}),jQuery(document.body).append(o.resizerBg).append(o.resizer),o.activeModal.addClass("draged"),jQuery(document.body).bind(a.mousemove+".ax5modal-resize-"+this.instanceId,function(t){o.resizer.css(function(t){return o.__dx=t.clientX-o.mousePosition.clientX,o.__dy=t.clientY-o.mousePosition.clientY,r[e](t)}(t))}).bind(a.mouseup+".ax5modal-resize-"+this.instanceId,function(e){p.off.call(o)}).bind("mouseleave.ax5modal-resize-"+this.instanceId,function(e){p.off.call(o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").bind("selectstart",!1)},off:function(){this.activeModal.removeClass("draged"),function(){var e=this.resizer.offset();jQuery.extend(e,{width:this.resizer.width(),height:this.resizer.height()}),this.modalConfig.absolute||(e.left-=jQuery(document).scrollLeft(),e.top-=jQuery(document).scrollTop()),this.activeModal.css(e),this.modalConfig.left=e.left,this.modalConfig.top=e.top,this.modalConfig.width=e.width,this.modalConfig.height=e.height,this.$.body.css({height:e.height-this.modalConfig.headerHeight}),this.modalConfig.iframe&&(this.$["iframe-wrap"].css({height:e.height-this.modalConfig.headerHeight}),this.$.iframe.css({height:e.height-this.modalConfig.headerHeight})),e=null}.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,s.call(this,o.modalConfig,{self:this,state:"resize"}),jQuery(document.body).unbind(a.mousemove+".ax5modal-resize-"+this.instanceId).unbind(a.mouseup+".ax5modal-resize-"+this.instanceId).unbind("mouseleave.ax5modal-resize-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").unbind("selectstart")}};this.init=function(){this.onStateChanged=i.onStateChanged,this.onResize=i.onResize},this.open=function(e,t,n){return void 0===n&&(n=0),this.activeModal?n<3?(this.watingModal=!0,setTimeout(function(){this.open(e,t,n+1)}.bind(this),i.animateTime)):this.watingModal=!1:(e=o.modalConfig=jQuery.extend(!0,{},i,e),l.call(this,e,t),this.watingModal=!1),this},this.close=function(e){var n=void 0,a=void 0;return this.activeModal&&(n=o.modalConfig,this.activeModal.addClass("destroy"),jQuery(window).unbind("keydown.ax-modal"),jQuery(window).unbind("resize.ax-modal"),setTimeout(function(){if(n.iframe){var i=this.$.iframe;if(i){var o=i.get(0),r=o.contentDocument?o.contentDocument:o.contentWindow.document;try{$(r.body).children().each(function(){$(this).remove()})}catch(e){}r.innerHTML="",i.attr("src","about:blank").remove(),window.CollectGarbage&&window.CollectGarbage()}}this.activeModal.remove(),this.activeModal=null,this.watingModal||s.call(this,n,{self:this,state:"close"}),e&&t.isFunction(e.callback)&&(a={self:this,id:n.id,theme:n.theme,width:n.width,height:n.height,state:"close",$:this.$},e.callback.call(a,a))}.bind(this),i.animateTime)),this.minimized=!1,this},this.minimize=function(e){if(!0!==this.minimized){var t=o.modalConfig;void 0===e&&(e=i.minimizePosition),this.minimized=!0,this.$.body.hide(),o.modalConfig.originalHeight=t.height,o.modalConfig.height=0,d[e].call(this),s.call(this,t,{self:this,state:"minimize"})}return this},this.restore=function(){var e=o.modalConfig;return this.minimized&&(this.minimized=!1,this.$.body.show(),o.modalConfig.height=o.modalConfig.originalHeight,o.modalConfig.originalHeight=void 0,this.align({left:"center",top:"middle"}),s.call(this,e,{self:this,state:"restore"})),this},this.css=function(e){return this.activeModal&&!o.fullScreen&&(this.activeModal.css(e),void 0!==e.width&&(o.modalConfig.width=e.width),void 0!==e.height&&(o.modalConfig.height=e.height),this.align()),this},this.setModalConfig=function(e){return o.modalConfig=jQuery.extend({},o.modalConfig,e),this.align(),this},this.align=function(e,n){if(!this.activeModal)return this;var i,a=o.modalConfig,r={width:a.width,height:a.height};return(a.isFullScreen=void 0!==(i=a.fullScreen)&&(t.isFunction(i)?i():void 0))?(a.header&&this.$.header.show(),a.header?(a.headerHeight=this.$.header.outerHeight(),r.height+=a.headerHeight):a.headerHeight=0,r.width=jQuery(window).width(),r.height=a.height,r.left=0,r.top=0):(a.header&&this.$.header.show(),e&&jQuery.extend(!0,a.position,e),a.header?(a.headerHeight=this.$.header.outerHeight(),r.height+=a.headerHeight):a.headerHeight=0,"left"==a.position.left?r.left=a.position.margin||0:"right"==a.position.left?r.left=jQuery(window).width()-r.width-(a.position.margin||0):"center"==a.position.left?r.left=jQuery(window).width()/2-r.width/2:r.left=a.position.left||0,"top"==a.position.top?r.top=a.position.margin||0:"bottom"==a.position.top?r.top=jQuery(window).height()-r.height-(a.position.margin||0):"middle"==a.position.top?r.top=jQuery(window).height()/2-r.height/2:r.top=a.position.top||0,r.left<0&&(r.left=0),r.top<0&&(r.top=0),a.absolute&&(r.top+=jQuery(window).scrollTop(),r.left+=jQuery(window).scrollLeft())),this.activeModal.css(r),this.$.body.css({height:r.height-(a.headerHeight||0)}),a.iframe&&(this.$["iframe-wrap"].css({height:r.height-a.headerHeight}),this.$.iframe.css({height:r.height-a.headerHeight})),this},this.main=function(){e.modal_instance=e.modal_instance||[],e.modal_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}),n=ax5.ui.modal}(),function(){var e=ax5.ui.modal;e.tmpl={content:function(){return' \n
\n {{#header}}\n
\n {{{title}}}\n {{#btns}}\n
\n {{#@each}}\n \n {{/@each}}\n
\n {{/btns}}\n
\n {{/header}}\n
\n {{#iframe}}\n
\n
{{{iframeLoadingMsg}}}
\n \n
\n
\n \n {{#param}}\n {{#@each}}\n \n {{/@each}}\n {{/param}}\n
\n {{/iframe}}\n {{^iframe}}\n
\n {{/iframe}}\n
\n {{^disableResize}}\n
\n
\n
\n
\n
\n
\n
\n
\n {{/disableResize}}\n
\n '},get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(e){e(["jquery"],function(e){return function(){var t,n,i,o=0,a={error:"error",info:"info",success:"success",warning:"warning"},r={clear:function(n,i){var o=d();t||s(o);l(n,o,i)||function(n){for(var i=t.children(),o=i.length-1;o>=0;o--)l(e(i[o]),n)}(o)},remove:function(n){var i=d();t||s(i);if(n&&0===e(":focus",n).length)return void h(n);t.children().length&&t.remove()},error:function(e,t,n){return c({type:a.error,iconClass:d().iconClasses.error,message:e,optionsOverride:n,title:t})},getContainer:s,info:function(e,t,n){return c({type:a.info,iconClass:d().iconClasses.info,message:e,optionsOverride:n,title:t})},options:{},subscribe:function(e){n=e},success:function(e,t,n){return c({type:a.success,iconClass:d().iconClasses.success,message:e,optionsOverride:n,title:t})},version:"2.1.2",warning:function(e,t,n){return c({type:a.warning,iconClass:d().iconClasses.warning,message:e,optionsOverride:n,title:t})}};return r;function s(n,i){return n||(n=d()),(t=e("#"+n.containerId)).length?t:(i&&(t=function(n){return(t=e("
").attr("id",n.containerId).addClass(n.positionClass).attr("aria-live","polite").attr("role","alert")).appendTo(e(n.target)),t}(n)),t)}function l(t,n,i){var o=!(!i||!i.force)&&i.force;return!(!t||!o&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function u(e){n&&n(e)}function c(n){var a=d(),r=n.iconClass||a.iconClass;if(void 0!==n.optionsOverride&&(a=e.extend(a,n.optionsOverride),r=n.optionsOverride.iconClass||r),!function(e,t){if(e.preventDuplicates){if(t.message===i)return!0;i=t.message}return!1}(a,n)){o++,t=s(a,!0);var l=null,c=e("
"),p=e("
"),f=e("
"),g=e("
"),_=e(a.closeHtml),m={intervalId:null,hideEta:null,maxHideTime:null},v={toastId:o,state:"visible",startTime:new Date,options:a,map:n};return n.iconClass&&c.addClass(a.toastClass).addClass(r),n.title&&(p.append(a.escapeHtml?y(n.title):n.title).addClass(a.titleClass),c.append(p)),n.message&&(f.append(a.escapeHtml?y(n.message):n.message).addClass(a.messageClass),c.append(f)),a.closeButton&&(_.addClass("toast-close-button").attr("role","button"),c.prepend(_)),a.progressBar&&(g.addClass("toast-progress"),c.prepend(g)),a.newestOnTop?t.prepend(c):t.append(c),c.hide(),c[a.showMethod]({duration:a.showDuration,easing:a.showEasing,complete:a.onShown}),a.timeOut>0&&(l=setTimeout(b,a.timeOut),m.maxHideTime=parseFloat(a.timeOut),m.hideEta=(new Date).getTime()+m.maxHideTime,a.progressBar&&(m.intervalId=setInterval(C,10))),function(){c.hover(w,x),!a.onclick&&a.tapToDismiss&&c.click(b);a.closeButton&&_&&_.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&!0!==e.cancelBubble&&(e.cancelBubble=!0),b(!0)});a.onclick&&c.click(function(e){a.onclick(e),b()})}(),u(v),a.debug&&console&&console.log(v),c}function y(e){return null==e&&(e=""),new String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function b(t){var n=t&&!1!==a.closeMethod?a.closeMethod:a.hideMethod,i=t&&!1!==a.closeDuration?a.closeDuration:a.hideDuration,o=t&&!1!==a.closeEasing?a.closeEasing:a.hideEasing;if(!e(":focus",c).length||t)return clearTimeout(m.intervalId),c[n]({duration:i,easing:o,complete:function(){h(c),a.onHidden&&"hidden"!==v.state&&a.onHidden(),v.state="hidden",v.endTime=new Date,u(v)}})}function x(){(a.timeOut>0||a.extendedTimeOut>0)&&(l=setTimeout(b,a.extendedTimeOut),m.maxHideTime=parseFloat(a.extendedTimeOut),m.hideEta=(new Date).getTime()+m.maxHideTime)}function w(){clearTimeout(l),m.hideEta=0,c.stop(!0,!0)[a.showMethod]({duration:a.showDuration,easing:a.showEasing})}function C(){var e=(m.hideEta-(new Date).getTime())/m.maxHideTime*100;g.width(e+"%")}}function d(){return e.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',newestOnTop:!0,preventDuplicates:!1,progressBar:!1},r.options)}function h(e){t||(t=s()),e.is(":visible")||(e.remove(),e=null,0===t.children().length&&(t.remove(),i=void 0))}}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}),function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,i,o="function"==typeof Map?new Map:(n=[],i=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return i[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),i.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),i.splice(t,1))}}),a=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){a=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,i=null,r=null,s=function(){e.clientWidth!==i&&d()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function c(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",i=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function d(){c();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),i="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this);case"biznum":var n,i,o,a=new Array(1,3,7,1,3,7,1,3,5,1),r=0,s=this.replace(/-/gi,"");for(n=0;n<=7;n++)r+=a[n]*s.charAt(n);return i=(i="0"+a[8]*s.charAt(8)).substring(i.length-2,i.length),o=(10-(r+=Math.floor(i.charAt(0))+Math.floor(i.charAt(1)))%10)%10,Math.floor(s.charAt(9))==o&&s.replace(/(\d{3})(\d{2})(\d{5})/,"$1-$2-$3");case"uniqid":return/^[a-z][a-z0-9_]{2,19}$/g.test(this)}},Number.prototype.numberFormat=function(){if(0==this)return 0;for(var e=/(^[+-]?\d+)(\d{3})/,t=this+"";e.test(t);)t=t.replace(e,"$1,$2");return t},String.prototype.numberFormat=function(){return isNaN(parseFloat(this))?"0":parseFloat(this).numberFormat()},String.prototype.unNumberFormat=function(){var e=this;if("number"==typeof e)return e;e=(e=(""+e).replace(/,/gi,"")).replace(/(^\s*)|(\s*$)/g,"");var t=new Number(e);return isNaN(t)?e:t},Number.prototype.unNumberFormat=function(){return this},Date.prototype.dateFormat=function(e){if(!this.valueOf())return" ";if(!e)return this;var t=["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],n=["일","월","화","수","목","금","토"],i=this;return e.replace(/(yyyy|yy|MM|dd|E|hh|mm|ss|a\/p)/gi,function(e){switch(e){case"yyyy":return i.getFullYear();case"yy":return(i.getFullYear()%1e3).zf(2);case"MM":return(i.getMonth()+1).zf(2);case"dd":return i.getDate().zf(2);case"E":return t[i.getDay()];case"e":return n[i.getDay()];case"HH":return i.getHours().zf(2);case"hh":return((h=i.getHours()%12)?h:12).zf(2);case"mm":return i.getMinutes().zf(2);case"ss":return i.getSeconds().zf(2);case"a/p":return i.getHours()<12?"오전":"오후";default:return e}})},String.prototype.string=function(e){for(var t="",n=0;n++0&&e.on("submit",function(){$.blockUI({css:{width:"25px",top:"49%",left:"49%",border:"0px none",backgroundColor:"transparent",cursor:"wait"},message:'로딩중',baseZ:1e4,overlayCSS:{opacity:0}})})}),$(function(){$(document).ajaxError(function(e,t,n){var i="알수없는 오류가 발생하였습니다.";void 0!==t.responseJSON&&void 0!==t.responseJSON.message?i=t.responseJSON.message:500==t.status?i="서버 코드 오류가 발생하였습니다.\n관리자에게 문의하세요":401==t.status&&(i="해당 명령을 실행할 권한이 없습니다."),toastr.error(i,"오류 발생")}).ajaxStart(function(){$.blockUI({css:{width:"25px",top:"49%",left:"49%",border:"0px none",backgroundColor:"transparent",cursor:"wait"},message:'로딩중',baseZ:1e4,overlayCSS:{opacity:0}})}).ajaxComplete(function(){$.unblockUI()})}),$(function(){$(document).on("change","[data-checkbox]",function(){var e=$(this),t=null!=e.data("checkbox-all"),n=e.data("checkbox"),i=e.prop("checked"),o=t?e:$('[data-checkbox="'+n+'"][data-checkbox-all]');t?$('[data-checkbox="'+n+'"]').prop("checked",i):o.prop("checked",$('[data-checkbox="'+n+'"]').not("[data-checkbox-all]").length==$('[data-checkbox="'+n+'"]:checked').not("[data-checkbox-all]").length)})}),$(function(){$(document).on("keypress","[data-number-format]",function(e){$(this).val($(this).val().trim().unNumberFormat().numberFormat())})}),$(function(){$(document).on("keypress","[data-number-only]",function(e){8!=e.which&&0!=e.which&&45!=e.which&&(e.which<48||e.which>57)&&e.preventDefault()})}),$(function(){$(document).on("keyup","textarea[data-autosize]",function(e){autosize($(this))}),$("textarea[data-autosize]").keyup()}),$(function(){$("body").on("keypress",'[data-regex="phone-number"]',function(e){8!=e.which&&0!=e.which&&45!=e.which&&(e.which<48||e.which>57)&&e.preventDefault()}).on("blur",'[data-regex="phone-number"]',function(e){if(""!=$(this).val()){var t=$(this).val().regex("phone");if(!1===t)return toastr.error("유효하지 않은 전화번호 입니다."),$(this).val(""),void $(this).focus();$(this).val(t)}}),$("body").on("blur",'[data-regex="tel-number"]',function(e){if(""!=$(this).val()){var t=$(this).val().regex("tel");if(!1===t)return toastr.error("유효하지 않은 전화번호 입니다."),$(this).val(""),void $(this).focus();$(this).val(t)}}),$("body").on("blur",'[data-regex="email-address"]',function(e){""!=$(this).val()&&($(this).val().regex("email")||(toastr.error("유효하지 않은 이메일주소 입니다."),$(this).val(""),$(this).focus()))})}),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',i=function(t){e(t).on("click.bs.dropdown",this.toggle)};function o(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function a(i){i&&3===i.which||(e(t).remove(),e(n).each(function(){var t=e(this),n=o(t),a={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&e.contains(n[0],i.target)||(n.trigger(i=e.Event("hide.bs.dropdown",a)),i.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",a)))))}))}i.VERSION="3.3.7",i.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var i=o(n),r=i.hasClass("open");if(a(),!r){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",a);var s={relatedTarget:this};if(i.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},i.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var a=o(i),r=a.hasClass("open");if(!r&&27!=t.which||r&&27==t.which)return 27==t.which&&a.find(n).trigger("focus"),i.trigger("click");var s=a.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var l=s.index(t.target);38==t.which&&l>0&&l--,40==t.which&&l',onClick:function(){APP.MODAL.callback()}}}}});return{open:function(e){e=$.extend(!0,{},t,e),$(document.body).addClass("modalOpened"),this.modalCallback=e.callback,this.modalSendData=e.sendData,APP.modal.open(e)},css:function(t){t=$.extend(!0,{},e,t),APP.modal.css(t)},align:function(e){APP.modal.align(e)},close:function(e){APP.modal.close(),setTimeout(function(){$(document.body).removeClass("modalOpened")},500)},minimize:function(){APP.modal.minimize()},maximize:function(){APP.modal.maximize()},callback:function(e){this.modalCallback&&this.modalCallback(e),this.close(e)},modalCallback:{},getData:function(){if(this.modalSendData)return this.modalSendData()}}}(),APP.MODAL2=function(){var e={width:400,height:400,position:{left:"center",top:"middle"}},t=$.extend(!0,{},e,{iframeLoadingMsg:"",iframe:{method:"get",url:"#"},closeToEsc:!0,onStateChanged:function(){"open"===this.state?APP.MASK2.open():"close"===this.state&&APP.MASK2.close()},animateTime:100,zIndex:2001,absolute:!0,fullScreen:!1,header:{title:"새로운 윈도우",btns:{close:{label:'',onClick:function(){APP.MODAL2.callback()}}}}});return{open:function(e){e=$.extend(!0,{},t,e),$(document.body).addClass("modalOpened"),this.modalCallback=e.callback,this.modalSendData=e.sendData,APP.modal2.open(e)},css:function(t){t=$.extend(!0,{},e,t),APP.modal2.css(t)},align:function(e){APP.modal2.align(e)},close:function(e){APP.modal2.close(),setTimeout(function(){$(document.body).removeClass("modalOpened")},500)},minimize:function(){APP.modal2.minimize()},maximize:function(){APP.modal2.maximize()},callback:function(e){this.modalCallback&&this.modalCallback(e),this.close(e)},modalCallback:{},getData:function(){if(this.modalSendData)return this.modalSendData()}}}(),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){e.ui=e.ui||{};e.ui.version="1.12.1";var t,n=0,i=Array.prototype.slice;e.cleanData=(t=e.cleanData,function(n){var i,o,a;for(a=0;null!=(o=n[a]);a++)try{(i=e._data(o,"events"))&&i.remove&&e(o).triggerHandler("remove")}catch(e){}t(n)}),e.widget=function(t,n,i){var o,a,r,s={},l=t.split(".")[0],u=l+"-"+(t=t.split(".")[1]);return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][u.toLowerCase()]=function(t){return!!e.data(t,u)},e[l]=e[l]||{},o=e[l][t],a=e[l][t]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(r=new n).options=e.widget.extend({},r.options),e.each(i,function(t,i){e.isFunction(i)?s[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,a=this._superApply;return this._super=e,this._superApply=o,t=i.apply(this,arguments),this._super=n,this._superApply=a,t}}():s[t]=i}),a.prototype=e.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||t},s,{constructor:a,namespace:l,widgetName:t,widgetFullName:u}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,a,n._proto)}),delete o._childConstructors):n._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var n,o,a=i.call(arguments,1),r=0,s=a.length;r",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,a,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},i=t.split("."),t=i.shift(),i.length){for(o=r[t]=e.widget.extend({},this.options[t]),a=0;a
"),a=o.children()[0];return e("body").append(o),n=a.offsetWidth,o.css("overflow","scroll"),n===(i=a.offsetWidth)&&(i=o[0].clientWidth),o.remove(),t=n-i},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===n||"auto"===n&&t.width0?"right":"center",vertical:c<0?"top":l>0?"bottom":"middle"};hn(i(l),i(c))?d.important="horizontal":d.important="vertical",t.using.call(this,e,d)}),r.offset(e.extend(S,{using:a}))})},e.ui.position={fit:{left:function(e,t){var i,o=t.within,a=o.isWindow?o.scrollLeft:o.offset.left,r=o.width,s=e.left-t.collisionPosition.marginLeft,l=a-s,u=s+t.collisionWidth-r-a;t.collisionWidth>r?l>0&&u<=0?(i=e.left+l+t.collisionWidth-r-a,e.left+=l-i):e.left=u>0&&l<=0?a:l>u?a+r-t.collisionWidth:a:l>0?e.left+=l:u>0?e.left-=u:e.left=n(e.left-s,e.left)},top:function(e,t){var i,o=t.within,a=o.isWindow?o.scrollTop:o.offset.top,r=t.within.height,s=e.top-t.collisionPosition.marginTop,l=a-s,u=s+t.collisionHeight-r-a;t.collisionHeight>r?l>0&&u<=0?(i=e.top+l+t.collisionHeight-r-a,e.top+=l-i):e.top=u>0&&l<=0?a:l>u?a+r-t.collisionHeight:a:l>0?e.top+=l:u>0?e.top-=u:e.top=n(e.top-s,e.top)}},flip:{left:function(e,t){var n,o,a=t.within,r=a.offset.left+a.scrollLeft,s=a.width,l=a.isWindow?a.scrollLeft:a.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,d=u+t.collisionWidth-s-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?((n=e.left+h+p+f+t.collisionWidth-s-r)<0||n0&&((o=e.left-t.collisionPosition.marginLeft+h+p+f-l)>0||i(o)0&&((n=e.top-t.collisionPosition.marginTop+h+p+f-l)>0||i(n)0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!t.disabled)&&(s=e(t).closest("fieldset")[0])&&(r=!s.disabled):r="a"===l&&t.href||n,r&&e(t).is(":visible")&&function(e){var t=e.css("visibility");for(;"inherit"===t;)e=e.parent(),t=e.css("visibility");return"hidden"!==t}(e(t)))},e.extend(e.expr[":"],{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}});e.ui.focusable,e.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):e(this[0].form)},e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout(function(){var n=t.data("ui-form-reset-instances");e.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===e.fn.jquery.substring(0,3)&&(e.each(["Width","Height"],function(t,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function r(t,n,o,a){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,o&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}e.fn["inner"+n]=function(t){return void 0===t?a["inner"+n].call(this):this.each(function(){e(this).css(o,r(this,t)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(o,r(this,t,!0,i)+"px")})}}),e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.ui.escapeSelector=(a=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,function(e){return e.replace(a,"\\$1")}),e.fn.labels=function(){var t,n,i,o,a;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),(i=this.attr("id"))&&(a=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),n="label[for='"+e.ui.escapeSelector(i)+"']",o=o.add(a.find(n).addBack(n))),this.pushStack(o))},e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&a.length?a:e(this[0].ownerDocument||document)},e.extend(e.expr[":"],{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}}),e.fn.extend({uniqueId:(r=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++r)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var a,r,s=!1;e(document).on("mouseup",function(){s=!1});e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,o=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),s=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.ui.plugin={add:function(t,n,i){var o,a=e.ui[t].prototype;for(o in i)a.plugins[o]=a.plugins[o]||[],a.plugins[o].push([n,i[o]])},call:function(e,t,n,i){var o,a=e.plugins[t];if(a&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;o0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("
").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=e.ui.safeActiveElement(this.document[0]);e(t.target).closest(n).length||e.ui.safeBlur(n)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==n._trigger("stop",t)&&n._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper),o=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,o=this.options,a=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(i=(n=e(o.containment))[0])&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=o.containment:this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,o,a,r=this.options,s=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,u=n?o-this.offset.click.top>=n[1]||o-this.offset.click.top>n[3]?o:o-this.offset.click.top>=n[1]?o-r.grid[1]:o+r.grid[1]:o,a=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=n?a-this.offset.click.left>=n[0]||a-this.offset.click.left>n[2]?a:a-this.offset.click.left>=n[0]?a-r.grid[0]:a+r.grid[0]:a),"y"===r.axis&&(l=this.originalPageX),"x"===r.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var o=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,o))})},stop:function(t,n,i){var o=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){this.isOver?(this.isOver=0,i.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(t),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",t,o))})},drag:function(t,n,i){e.each(i.sortables,function(){var o=!1,a=this;a.positionAbs=i.positionAbs,a.helperProportions=i.helperProportions,a.offset.click=i.offset.click,a._intersectsWith(a.containerCache)&&(o=!0,e.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(o=!1),o})),o?(a.isOver||(a.isOver=1,i._parent=n.helper.parent(),a.currentItem=n.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return n.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=i.offset.click.top,a.offset.click.left=i.offset.click.left,a.offset.parent.left-=i.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=i.offset.parent.top-a.offset.parent.top,i._trigger("toSortable",t),i.dropped=a.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,a.fromOutside=i),a.currentItem&&(a._mouseDrag(t),n.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var o=e("body"),a=i.options;o.css("cursor")&&(a._cursor=o.css("cursor")),o.css("cursor",a.cursor)},stop:function(t,n,i){var o=i.options;o._cursor&&e("body").css("cursor",o._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var o=e(n.helper),a=i.options;o.css("opacity")&&(a._opacity=o.css("opacity")),o.css("opacity",a.opacity)},stop:function(t,n,i){var o=i.options;o._opacity&&e(n.helper).css("opacity",o._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var o=i.options,a=!1,r=i.scrollParentNotHidden[0],s=i.document[0];r!==s&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+r.offsetHeight-t.pageY=0;h--)u=(l=i.snapElements[h].left-i.margins.left)+i.snapElements[h].width,d=(c=i.snapElements[h].top-i.margins.top)+i.snapElements[h].height,mu+g||yd+g||!e.contains(i.snapElements[h].item.ownerDocument,i.snapElements[h].item)?(i.snapElements[h].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(o=Math.abs(c-y)<=g,a=Math.abs(d-v)<=g,r=Math.abs(l-m)<=g,s=Math.abs(u-_)<=g,o&&(n.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),a&&(n.position.top=i._convertPositionTo("relative",{top:d,left:0}).top),r&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u}).left)),p=o||a||r||s,"outer"!==f.snapMode&&(o=Math.abs(c-v)<=g,a=Math.abs(d-y)<=g,r=Math.abs(l-_)<=g,s=Math.abs(u-m)<=g,o&&(n.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),a&&(n.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top),r&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u-i.helperProportions.width}).left)),!i.snapElements[h].snapping&&(o||a||r||s||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=o||a||r||s||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var o,a=i.options,r=e.makeArray(e(a.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});r.length&&(o=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each(function(t){e(this).css("zIndex",o+t)}),this.css("zIndex",o+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var o=e(n.helper),a=i.options;o.css("zIndex")&&(a._zIndex=o.css("zIndex")),o.css("zIndex",a.zIndex)},stop:function(t,n,i){var o=i.options;o._zIndex&&e(n.helper).css("zIndex",o._zIndex)}});e.ui.draggable;e.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(n.scope),n.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t=t&&e=c&&r<=h||l>=c&&l<=h||rh)&&(a>=u&&a<=d||s>=u&&s<=d||ad);default:return!1}}}();e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var i,o,a=e.ui.ddmanager.droppables[t.options.scope]||[],r=n?n.type:null,s=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(i=0;i0||(t[o]=1,i=t[o]>0,t[o]=0,i)},_create:function(){var t,n=this.options,i=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("
").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,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",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(t),this._proportionallyResize()),this._setupHandles(),n.autoHide&&e(this.element).on("mouseenter",function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,n,i,o,a,r=this.options,s=this;if(this.handles=r.handles||(e(".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=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n"),this._addClass(a,"ui-resizable-handle "+o),a.css({zIndex:r.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(a);this._renderAxis=function(t){var n,i,o,a;for(n in t=t||this.element,this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=e(this.handles[n]),this._on(this.handles[n],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(this.handles[n],this.element),a=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),o=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(o,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){s.resizing||(this.className&&(a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=a&&a[1]?a[1]:"se")}),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var n,i,o=!1;for(n in this.handles)((i=e(this.handles[n])[0])===t.target||e.contains(i,t.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(t){var n,i,o,a=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),a.containment&&(n+=e(a.containment).scrollLeft()||0,i+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,o=this.originalMousePosition,a=this.axis,r=t.pageX-o.left||0,s=t.pageY-o.top||0,l=this._change[a];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[t,r,s]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var n,i,o,a,r,s,l,u=this.options;return this._helper&&(o=(i=(n=this._proportionallyResizeElements).length&&/textarea/i.test(n[0].nodeName))&&this._hasScroll(n[0],"left")?0:this.sizeDiff.height,a=i?0:this.sizeDiff.width,r={width:this.helper.width()-a,height:this.helper.height()-o},s=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,l=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,u.animate||this.element.css(e.extend(r,{top:l,left:s})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!u.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._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 e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,i,o,a,r=this.options;a={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,i=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),i>a.minHeight&&(a.minHeight=i),ne.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,s=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return a&&(e.width=t.minWidth),r&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),o&&(e.height=t.maxHeight),a&&u&&(e.left=s-t.minWidth),i&&u&&(e.left=s-t.maxWidth),r&&c&&(e.top=l-t.minHeight),o&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],o=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(i[t])||0,n[t]+=parseFloat(o[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,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}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),i=n.options,o=n._proportionallyResizeElements,a=o.length&&/textarea/i.test(o[0].nodeName),r=a&&n._hasScroll(o[0],"left")?0:n.sizeDiff.height,s=a?0:n.sizeDiff.width,l={width:n.size.width-s,height:n.size.height-r},u=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,c=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,c&&u?{top:c,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};o&&o.length&&e(o[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,o,a,r,s,l=e(this).resizable("instance"),u=l.options,c=l.element,d=u.containment,h=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;h&&(l.containerElement=e(h),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(h),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){n[e]=l._num(t.css("padding"+i))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},i=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=l._hasScroll(h,"left")?h.scrollWidth:a,s=l._hasScroll(h)?h.scrollHeight:o,l.parentData={element:h,left:i.left,top:i.top,width:r,height:s}))},resize:function(t){var n,i,o,a,r=e(this).resizable("instance"),s=r.options,l=r.containerOffset,u=r.position,c=r._aspectRatio||t.shiftKey,d={top:0,left:0},h=r.containerElement,p=!0;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),u.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-d.left),c&&(r.size.height=r.size.width/r.aspectRatio,p=!1),r.position.left=s.helper?l.left:0),u.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,p=!1),r.position.top=r._helper?l.top:0),o=r.containerElement.get(0)===r.element.parent().get(0),a=/relative|absolute/.test(r.containerElement.css("position")),o&&a?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),n=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-d.left:r.offset.left-l.left)),i=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-d.top:r.offset.top-l.top)),n+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-n,c&&(r.size.height=r.size.width/r.aspectRatio,p=!1)),i+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-i,c&&(r.size.width=r.size.height*r.aspectRatio,p=!1)),p||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,o=t.containerPosition,a=t.containerElement,r=e(t.helper),s=r.offset(),l=r.outerWidth()-t.sizeDiff.width,u=r.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(a.css("position"))&&e(this).css({left:s.left-o.left-i.left,width:l,height:u}),t._helper&&!n.animate&&/static/.test(a.css("position"))&&e(this).css({left:s.left-o.left-i.left,width:l,height:u})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance").options;e(t.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,n){var i=e(this).resizable("instance"),o=i.options,a=i.originalSize,r=i.originalPosition,s={height:i.size.height-a.height||0,width:i.size.width-a.width||0,top:i.position.top-r.top||0,left:i.position.left-r.left||0};e(o.alsoResize).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),o={},a=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var n=(i[t]||0)+(s[t]||0);n&&n>=0&&(o[t]=n||null)}),t.css(o)})},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==e.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),i=n.options,o=n.size,a=n.originalSize,r=n.originalPosition,s=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,u=l[0]||1,c=l[1]||1,d=Math.round((o.width-a.width)/u)*u,h=Math.round((o.height-a.height)/c)*c,p=a.width+d,f=a.height+h,g=i.maxWidth&&i.maxWidthp,v=i.minHeight&&i.minHeight>f;i.grid=l,m&&(p+=u),v&&(f+=c),g&&(p-=u),_&&(f-=c),/^(se|s|e)$/.test(s)?(n.size.width=p,n.size.height=f):/^(ne)$/.test(s)?(n.size.width=p,n.size.height=f,n.position.top=r.top-h):/^(sw)$/.test(s)?(n.size.width=p,n.size.height=f,n.position.left=r.left-d):((f-c<=0||p-u<=0)&&(t=n._getPaddingPlusBorderDimensions(this)),f-c>0?(n.size.height=f,n.position.top=r.top-h):(f=c-t.height,n.size.height=f,n.position.top=r.top+a.height-f),p-u>0?(n.size.width=p,n.position.left=r.left-d):(p=u-t.width,n.size.width=p,n.position.left=r.left+a.width-p))}});e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var n=e(this),i=n.offset(),o={left:i.left-t.elementPos.left,top:i.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:n,left:o.left,top:o.top,right:o.left+n.outerWidth(),bottom:o.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=e("
"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var n=this,i=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().addBack().each(function(){var i,o=e.data(this,"selectable-item");if(o)return i=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),n._removeClass(o.$element,i?"ui-unselecting":"ui-selected")._addClass(o.$element,i?"ui-selecting":"ui-unselecting"),o.unselecting=!i,o.selecting=i,o.selected=i,i?n._trigger("selecting",t,{selecting:o.element}):n._trigger("unselecting",t,{unselecting:o.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,i=this,o=this.options,a=this.opos[0],r=this.opos[1],s=t.pageX,l=t.pageY;return a>s&&(n=s,s=a,a=n),r>l&&(n=l,l=r,r=n),this.helper.css({left:a,top:r,width:s-a,height:l-r}),this.selectees.each(function(){var n=e.data(this,"selectable-item"),u=!1,c={};n&&n.element!==i.element[0]&&(c.left=n.left+i.elementPos.left,c.right=n.right+i.elementPos.left,c.top=n.top+i.elementPos.top,c.bottom=n.bottom+i.elementPos.top,"touch"===o.tolerance?u=!(c.left>s||c.rightl||c.bottoma&&c.rightr&&c.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&e=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,o=!1,a=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,a.widgetName+"-item")===a)return i=e(this),!1}),e.data(t.target,a.widgetName+"-item")===a&&(i=e(t.target)),!!i&&(!(this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(o=!0)}),!o))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,i){var o,a,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",r.cursor),this.storedStylesheet=e("").appendTo(a)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,o,a,r=this.options,s=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;n--)if(o=(i=this.items[n]).item[0],(a=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===a?"next":"prev"]()[0]===o||e.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,o=this.placeholder.offset(),a=this.options.axis,r={};a&&"x"!==a||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,o=i+this.helperProportions.height,a=e.left,r=a+e.width,s=e.top,l=s+e.height,u=this.offset.click.top,c=this.offset.click.left,d="x"===this.options.axis||i+u>s&&i+ua&&t+ce[this.floating?"width":"height"]?p:a0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n,i,o,a,r=[],s=[],l=this._connectWith();if(l&&t)for(n=l.length-1;n>=0;n--)for(i=(o=e(l[n],this.document[0])).length-1;i>=0;i--)(a=e.data(o[i],this.widgetFullName))&&a!==this&&!a.options.disabled&&s.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);function u(){r.push(this)}for(s.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=s.length-1;n>=0;n--)s[n][0].each(u);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;n--)for(i=(o=e(h[n],this.document[0])).length-1;i>=0;i--)(a=e.data(o[i],this.widgetFullName))&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(n=d.length-1;n>=0;n--)for(r=d[n][1],i=0,u=(s=d[n][0]).length;i=0;n--)(i=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=o.outerWidth(),i.height=o.outerHeight()),a=o.offset(),i.left=a.left,i.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)a=this.containers[n].element.offset(),this.containers[n].containerCache.left=a.left,this.containers[n].containerCache.top=a.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,i=(t=t||this).options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),o=e("<"+i+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("",t.document[0]).appendTo(o)):"tr"===i?t._createTrPlaceholder(t.currentItem,o):"img"===i&&o.attr("src",t.currentItem.attr("src")),n||o.css("visibility","hidden"),o},update:function(e,o){n&&!i.forcePlaceholderSize||(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e(" ",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,o,a,r,s,l,u,c,d,h=null,p=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],p=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,a=null,r=(c=h.floating||this._isFloating(this.currentItem))?"left":"top",s=c?"width":"height",d=c?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[r],u=!1,t[d]-l>this.items[i][s]/2&&(u=!0),Math.abs(t[d]-l)this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(n=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-o.grid[1]:n+o.grid[1]:n,i=this.originalPageX+Math.round((a-this.originalPageX)/o.grid[0])*o.grid[0],a=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-o.grid[0]:i+o.grid[0]:i)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:s.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:s.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}for(this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||i.push(o("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(o("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,n,i=this.options.icons;i&&(t=e(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,o=this.headers.index(t.target),a=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:a=this.headers[(o+1)%i];break;case n.LEFT:case n.UP:a=this.headers[(o-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:a=this.headers[0];break;case n.END:a=this.headers[i-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),e(a).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,o=this.element.parent();this.active=this._findActive(n.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),o=i.uniqueId().attr("id");t.attr("aria-controls",o),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(t=o.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){var n=e(this).is(":visible");n||e(this).show(),t=Math.max(t,e(this).css("height","").height()),n||e(this).hide()}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var n,i,o=this.options,a=this.active,r=e(t.currentTarget),s=r[0]===a[0],l=s&&o.collapsible,u=l?e():r.next(),c=a.next(),d={oldHeader:a,oldPanel:c,newHeader:l?e():r,newPanel:u};t.preventDefault(),s&&!o.collapsible||!1===this._trigger("beforeActivate",t,d)||(o.active=!l&&this.headers.index(r),this.active=s?e():r,this._toggle(d),this._removeClass(a,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.activeHeader)._addClass(n,null,o.icons.header)),s||(this._removeClass(r,"ui-accordion-header-collapsed")._addClass(r,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.header)._addClass(i,null,o.icons.activeHeader)),this._addClass(r.next(),"ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,o,a,r=this,s=0,l=e.css("box-sizing"),u=e.length&&(!t.length||e.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var n=e(t.target),i=e(e.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var n=e(t.target).closest(".ui-menu-item"),i=e(t.currentTarget);n[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){!e.contains(this.element[0],e.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var n,i,o,a,r=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,i=this.previousFilter||"",a=!1,o=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),o===i?a=!0:o=i+o,n=this._filterMenuItems(o),(n=a&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n).length||(o=String.fromCharCode(t.keyCode),n=this._filterMenuItems(o)),n.length?(this.focus(t,n),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n,i,o,a=this,r=this.options.icons.submenu,s=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=s.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev(),i=e("").data("ui-menu-submenu-caret",!0);a._addClass(i,"ui-menu-icon","ui-icon "+r),n.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",n.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),(t=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=e(this);a._isDivider(t)&&a._addClass(t,"ui-menu-divider","ui-widget-content")}),o=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,i,o;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,i,o,a,r,s;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,o=t.offset().top-this.activeMenu.offset().top-n-i,a=this.activeMenu.scrollTop(),r=this.activeMenu.height(),s=t.outerHeight(),o<0?this.activeMenu.scrollTop(a+o):o+s>r&&this.activeMenu.scrollTop(a+o-r+s))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(t){var n,i,o;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i-o<0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var n,i,o;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i+o>0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,n,i,o=this.element[0].nodeName.toLowerCase(),a="textarea"===o,r="input"===o;this.isMultiLine=a||!r&&this._isContentEditable(this.element),this.valueMethod=this.element[a||r?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return t=!0,i=!0,void(n=!0);t=!1,i=!1,n=!1;var a=e.ui.keyCode;switch(o.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",o);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",o);break;case a.UP:t=!0,this._keyEvent("previous",o);break;case a.DOWN:t=!0,this._keyEvent("next",o);break;case a.ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case a.TAB:this.menu.active&&this.menu.select(o);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(i){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var o=e.ui.keyCode;switch(i.keyCode){case o.PAGE_UP:this._move("previousPage",i);break;case o.PAGE_DOWN:this._move("nextPage",i);break;case o.UP:this._keyEvent("previous",i);break;case o.DOWN:this._keyEvent("next",i)}}},input:function(e){if(i)return i=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=e("