source: main/trunk/model-interfaces-dev/whakatohea/iframe/Tīpuna-WMTB_files/main-membership-site.js@ 33835

Last change on this file since 33835 was 33835, checked in by davidb, 4 years ago

Supporting iframe files now located within interface area

File size: 100.8 KB
Line 
1publishedWBJP([15],{0:function(e,t,i){e.exports=i(614)},33:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){var t=0,i=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,o;for(o=0;(n=i[o])!=null;o++){try{s=e._data(n,"events");if(s&&s.remove){e(n).triggerHandler("remove")}}catch(e){}}t(i)}}(e.cleanData);e.widget=function(t,i,s){var n,o,r,a,l={},h=t.split(".")[0];t=t.split(".")[1];n=h+"-"+t;if(!s){s=i;i=e.Widget}e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)};e[h]=e[h]||{};o=e[h][t];r=e[h][t]=function(e,t){if(!this._createWidget){return new r(e,t)}if(arguments.length){this._createWidget(e,t)}};e.extend(r,o,{version:s.version,_proto:e.extend({},s),_childConstructors:[]});a=new i;a.options=e.widget.extend({},a.options);e.each(s,function(t,s){if(!e.isFunction(s)){l[t]=s;return}l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t=this._super,i=this._superApply,o;this._super=e;this._superApply=n;o=s.apply(this,arguments);this._super=t;this._superApply=i;return o}}()});r.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:r,namespace:h,widgetName:t,widgetFullName:n});if(o){e.each(o._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,r,i._proto)});delete o._childConstructors}else{i._childConstructors.push(r)}e.widget.bridge(t,r);return r};e.widget.extend=function(t){var s=i.call(arguments,1),n=0,o=s.length,r,a;for(;n<o;n++){for(r in s[n]){a=s[n][r];if(s[n].hasOwnProperty(r)&&a!==undefined){if(e.isPlainObject(a)){t[r]=e.isPlainObject(t[r])?e.widget.extend({},t[r],a):e.widget.extend({},a)}else{t[r]=a}}}}return t};e.widget.bridge=function(t,s){var n=s.prototype.widgetFullName||t;e.fn[t]=function(o){var r=typeof o==="string",a=i.call(arguments,1),l=this;if(r){this.each(function(){var i,s=e.data(this,n);if(o==="instance"){l=s;return false}if(!s){return e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+o+"'")}if(!e.isFunction(s[o])||o.charAt(0)==="_"){return e.error("no such method '"+o+"' for "+t+" widget instance")}i=s[o].apply(s,a);if(i!==s&&i!==undefined){l=i&&i.jquery?l.pushStack(i.get()):i;return false}})}else{if(a.length){o=e.widget.extend.apply(null,[o].concat(a))}this.each(function(){var t=e.data(this,n);if(t){t.option(o||{});if(t._init){t._init()}}else{e.data(this,n,new s(o,this))}})}return l}};e.Widget=function(){};e.Widget._childConstructors=[];e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(i,s){s=e(s||this.defaultElement||this)[0];this.element=e(s);this.uuid=t++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=e();this.hoverable=e();this.focusable=e();if(s!==this){e.data(s,this.widgetFullName,this);this._on(true,this.element,{remove:function(e){if(e.target===s){this.destroy()}}});this.document=e(s.style?s.ownerDocument:s.document||s);this.window=e(this.document[0].defaultView||this.document[0].parentWindow)}this.options=e.widget.extend({},this.options,this._getCreateOptions(),i);this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s=t,n,o,r;if(arguments.length===0){return e.widget.extend({},this.options)}if(typeof t==="string"){s={};n=t.split(".");t=n.shift();if(n.length){o=s[t]=e.widget.extend({},this.options[t]);for(r=0;r<n.length-1;r++){o[n[r]]=o[n[r]]||{};o=o[n[r]]}t=n.pop();if(arguments.length===1){return o[t]===undefined?null:o[t]}o[t]=i}else{if(arguments.length===1){return this.options[t]===undefined?null:this.options[t]}s[t]=i}}this._setOptions(s);return this},_setOptions:function(e){var t;for(t in e){this._setOption(t,e[t])}return this},_setOption:function(e,t){this.options[e]=t;if(e==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!t);if(t){this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(t,i,s){var n,o=this;if(typeof t!=="boolean"){s=i;i=t;t=false}if(!s){s=i;i=this.element;n=this.widget()}else{i=n=e(i);this.bindings=this.bindings.add(i)}e.each(s,function(s,r){function a(){if(!t&&(o.options.disabled===true||e(this).hasClass("ui-state-disabled"))){return}return(typeof r==="string"?o[r]:r).apply(o,arguments)}if(typeof r!=="string"){a.guid=r.guid=r.guid||a.guid||e.guid++}var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,u=l[2];if(u){n.delegate(u,h,a)}else{i.bind(h,a)}})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;t.unbind(i).undelegate(i);this.bindings=e(this.bindings.not(t).get());this.focusable=e(this.focusable.not(t).get());this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return(typeof e==="string"?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,o,r=this.options[t];s=s||{};i=e.Event(i);i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase();i.target=this.element[0];o=i.originalEvent;if(o){for(n in o){if(!(n in i)){i[n]=o[n]}}}this.element.trigger(i,s);return!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===false||i.isDefaultPrevented())}};e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,o){if(typeof n==="string"){n={effect:n}}var r,a=!n?t:n===true||typeof n==="number"?i:n.effect||i;n=n||{};if(typeof n==="number"){n={duration:n}}r=!e.isEmptyObject(n);n.complete=o;if(n.delay){s.delay(n.delay)}if(r&&e.effects&&e.effects.effect[a]){s[t](n)}else if(a!==t&&s[a]){s[a](n.duration,n.easing,o)}else{s.queue(function(i){e(this)[t]();if(o){o.call(s[0])}i()})}}});return e.widget})},49:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){e.ui=e.ui||{};e.extend(e.ui,{version:"1.11.4",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.fn.extend({scrollParent:function(t){var i=this.css("position"),s=i==="absolute",n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);if(s&&t.css("position")==="static"){return false}return n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return i==="fixed"||!o.length?e(this[0].ownerDocument||document):o},uniqueId:function(){var e=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+ ++e}})}}(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){e(this).removeAttr("id")}})}});function t(t,s){var n,o,r,a=t.nodeName.toLowerCase();if("area"===a){n=t.parentNode;o=n.name;if(!t.href||!o||n.nodeName.toLowerCase()!=="map"){return false}r=e("img[usemap='#"+o+"']")[0];return!!r&&i(r)}return(/^(input|select|textarea|button|object)$/.test(a)?!t.disabled:"a"===a?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return e.css(this,"visibility")==="hidden"}).length}e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}});if(!e("<a>").outerWidth(1).jquery){e.each(["Width","Height"],function(t,i){var s=i==="Width"?["Left","Right"]:["Top","Bottom"],n=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function r(t,i,n,o){e.each(s,function(){i-=parseFloat(e.css(t,"padding"+this))||0;if(n){i-=parseFloat(e.css(t,"border"+this+"Width"))||0}if(o){i-=parseFloat(e.css(t,"margin"+this))||0}});return i}e.fn["inner"+i]=function(t){if(t===undefined){return o["inner"+i].call(this)}return this.each(function(){e(this).css(n,r(this,t)+"px")})};e.fn["outer"+i]=function(t,s){if(typeof t!=="number"){return o["outer"+i].call(this,t)}return this.each(function(){e(this).css(n,r(this,t,true,s)+"px")})}})}if(!e.fn.addBack){e.fn.addBack=function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}if(e("<a>").data("a-b","a").removeData("a-b").data("a-b")){e.fn.removeData=function(t){return function(i){if(arguments.length){return t.call(this,e.camelCase(i))}else{return t.call(this)}}}(e.fn.removeData)}e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());e.fn.extend({focus:function(t){return function(i,s){return typeof i==="number"?this.each(function(){var t=this;setTimeout(function(){e(t).focus();if(s){s.call(t)}},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(t!==undefined){return this.css("zIndex",t)}if(this.length){var i=e(this[0]),s,n;while(i.length&&i[0]!==document){s=i.css("position");if(s==="absolute"||s==="relative"||s==="fixed"){n=parseInt(i.css("zIndex"),10);if(!isNaN(n)&&n!==0){return n}}i=i.parent()}}return 0}});e.ui.plugin={add:function(t,i,s){var n,o=e.ui[t].prototype;for(n in s){o.plugins[n]=o.plugins[n]||[];o.plugins[n].push([i,s[n]])}},call:function(e,t,i,s){var n,o=e.plugins[t];if(!o){return}if(!s&&(!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)){return}for(n=0;n<o.length;n++){if(e.options[o[n][0]]){o[n][1].apply(e.element,i)}}}}})},65:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1),i(33)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){var t=false;e(document).mouseup(function(){t=false});return e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){if(true===e.data(i.target,t.widgetName+".preventClickEvent")){e.removeData(i.target,t.widgetName+".preventClickEvent");i.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(i){if(t){return}this._mouseMoved=false;this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var s=this,n=i.which===1,o=typeof this.options.cancel==="string"&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:false;if(!n||o||!this._mouseCapture(i)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(i)&&this._mouseDelayMet(i)){this._mouseStarted=this._mouseStart(i)!==false;if(!this._mouseStarted){i.preventDefault();return true}}if(true===e.data(i.target,this.widgetName+".preventClickEvent")){e.removeData(i.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(e){return s._mouseMove(e)};this._mouseUpDelegate=function(e){return s._mouseUp(e)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);i.preventDefault();t=true;return true},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button){return this._mouseUp(t)}else if(!t.which){return this._mouseUp(t)}}if(t.which||t.button){this._mouseMoved=true}if(this._mouseStarted){this._mouseDrag(t);return t.preventDefault()}if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==false;this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)}return!this._mouseStarted},_mouseUp:function(i){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(i.target===this._mouseDownEvent.target){e.data(i.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(i)}t=false;return false},_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 true}})})},150:function(e,t,i){var s,n;!(s=[i(6),i(7),i(21)],n=function(e,t,i){var s=t.Marionette.ItemView.extend({dialog:{title:"",cancelXThin:true,size:"580x300",dialogClass:"wsite-page-memberpage wsite-theme-light"},templateHelpers:function(){var e=this;return{logoutUrl:function(){return window._W.stl("javascript.membership.site.views.DeniedView_1",e.originUrl+"/app/member/logout")}}},render:function(){},initialize:function(){var s=this;i.membership.RPC.Member.getOriginUrl().done(function(e){s.originUrl=e.data.location});if(s.options.modal){s.template=e.compile("{{> membership/denied}}");s.render=t.Marionette.ItemView.prototype.render}else{s.bindUIElements()}}});return s}.apply(t,s),n!==undefined&&(e.exports=n))},151:function(e,t,i){var s,n;!(s=[i(2),i(6),i(7),i(21),i(56),i(226),i(176)],n=function(e,t,i,s,n,o,r){var a=i.Marionette.ItemView.extend({render:function(){},ui:{loginSection:".login-section",loginLink:".login-link",loginTitle:".login-title",loginEmail:'input[name="login-email"]',loginPassword:'input[name="login-password"]',loginError:".login-error",loginForm:"#membership-login-form",resetPwLink:".reset-password",signupSection:".signup-section",signupLink:".signup-link",signupTitle:".signup-title",signupConsent:".signup-consent",signupName:'input[name="signup-name"]',signupEmail:'input[name="signup-email"]',signupPassword:'input[name="signup-password"]',signupError:".signup-error",signupForm:"#membership-signup-form",signupSubmit:".register",redirect:".redirect",signupResponseMessage:".signup-response-message",buttonArea:".button-area",caretLogin:".caret-login",caretSignup:".caret-signup"},dialog:{title:"",cancelXThin:true,size:"580x360",dialogClass:"wsite-page-memberpage wsite-theme-light"},events:{"submit @ui.loginForm":"tryLogin","click @ui.signupSubmit":"tryRegister","submit @ui.signupSubmit":"tryRegister","click @ui.signupLink":"showSignup","click @ui.loginLink":"showLogin","click @ui.resetPwLink":"switchToResetPassword","change @ui.signupConsent":"onConsentChange"},triggers:{"click .okay-btn":"dialog:close"},templateHelpers:function(){var t=this;return{allow_signup:function(){return!!(window._W&&e.allowMemberRegistration)},redirect:function(){return t.redirect}}},initialize:function(e){var s=this;s.showLoginFirst=e.showLoginFirst;s.redirect=e.redirect;if(s.options.modal){s.template=t.compile("{{> membership/login-signup}}");s.render=i.Marionette.ItemView.prototype.render}else{s.bindUIElements();s.onShow()}},onShow:function(){var t=this;if(window._W&&e.allowMemberRegistration&&!t.showLoginFirst){t.showSignup()}else{t.showLogin()}},blurInputs:function(){var e=this;this.$el.find(".placeholder").focus().blur()},showSignup:function(){var e=this;e.$el.parents(".ui-dialog").css({"min-height":"415px","max-height":"400px",height:"420px"});e.ui.loginSection.hide();e.ui.signupSection.show();e.blurInputs();e.ui.signupPassword.blur();var t=e.ui.signupTitle.width();var i=e.ui.loginLink.width();var s=t-i;var n=t/2-s/2+10;e.ui.caretSignup.css("left",n+"px")},showLogin:function(){var e=this;e.$el.parents(".ui-dialog").css({"min-height":"360px","max-height":"360px",height:"360px"});e.ui.loginSection.show();e.ui.signupSection.hide();e.blurInputs();e.ui.loginPassword.blur();var t=e.ui.loginTitle.width();var i=e.ui.signupLink.width();var s=t-i;var n=t/2-i-s/2-10;e.ui.caretLogin.css("left",n+"px")},tryLogin:function(t){var i=this;i.bindUIElements();if(t){t.preventDefault()}i.ui.loginError.html("");var n=i.ui.loginEmail.val();var o=i.ui.loginPassword.val();if(n&&o){s.membership.RPC.Member.validate_user(n,o).done(function(e){if(!e.success){i.ui.loginError.html(e.message);i.ui.loginError.show();return}i.trySession(e.data)}).fail(function(e){if(!e.success){i.ui.loginError.html(e.message);i.ui.loginError.show()}})}else{i.ui.loginError.html(e.stl("javascript.membership.site.views.LoginSignupView_1"));i.ui.loginError.show()}},tryRegister:function(t){var i=this;if(t){t.preventDefault()}if(!i.ui.signupConsent.prop("checked")){i.ui.signupError.html(e.stl("javascript.membership.site.views.LoginSignupView_1"));i.ui.signupError.show();return}var n=i.ui.signupName.val();if(n.length>0&&!o.isNameValid(n)){i.ui.signupError.html(e.stl("javascript.membership.site.views.LoginSignupView_3"));i.ui.signupError.show();return}s.membership.RPC.Member.register_member(i.ui.signupEmail.val(),n,i.ui.signupPassword.val(),i.ui.signupPassword.val(),i.ui.signupConsent.prop("checked")).done(function(t){if(t.success){i.trySession(t.data)}else{if(t.data&&t.data.type=="pendingApproval"){i.ui.signupTitle.html(t.data.title);i.ui.signupForm.hide();i.ui.signupResponseMessage.html(t.message);i.ui.signupResponseMessage.show();if(i.options.modal){i.ui.buttonArea.append('<button class="btn btn-info btn-com okay-btn" style="margin-top: 30px;">'+e.stl("javascript.membership.site.views.LoginSignupView_2")+"</button>")}else{s.membership.RPC.Member.getOriginUrl().done(function(e){i.ui.buttonArea.append('<a a href="'+e.data.location+'">Click here to go home</a>')})}return}else{i.ui.signupError.html(t.message);i.ui.signupError.show();return}}}).fail(function(e){i.ui.signupError.html(e);i.ui.signupError.show()})},trySession:function(e){var t=this;s.membership.RPC.Member.validate_session(e).done(function(t){if(t){s.membership.RPC.Member.getRedirectUrl(e).done(function(e){window.location=e.data.location})}})},onConsentChange:function(){var e=this;var t=e.ui.signupConsent.prop("checked");e.ui.signupSubmit.prop("disabled",!t);e.ui.signupSubmit.toggleClass("btn-info",t)},switchToResetPassword:function(e){var t=this;if(t.options.modal){if(e){e.preventDefault()}t.trigger("dialog:close");s.vent.trigger("membership:resetPassword:show")}}});return a}.apply(t,s),n!==undefined&&(e.exports=n))},152:function(e,t,i){var s,n;!(s=[i(2),i(1),i(6),i(7),i(21)],n=function(e,t,i,s,n){var o=s.Marionette.ItemView.extend({render:function(){},ui:{email:'input[name="email"]',password:'input[name="password"]',password_confirmation:'input[name="password2"]',email_submit:".email-submit",reset_submit:".reset-submit",email_form:"#membership-email-form",form:"div.form",token:'input[name="access_token"]',message:".message",error:".error",buttonArea:".button-area",okayBtn:".okay-btn"},dialog:{title:"",cancelXThin:true,size:"580x330",dialogClass:"wsite-page-memberpage wsite-theme-light"},events:{"click @ui.email_submit":"submitEmailForm","click @ui.reset_submit":"submitResetForm"},initialize:function(){var e=this;t(e.ui.reset_submit).attr("disabled",false);if(e.options.modal){e.template=i.compile("{{> membership/reset-password}}");e.render=s.Marionette.ItemView.prototype.render;e.templateHelpers={ask_email:true};e.triggers={"click @ui.okayBtn":"dialog:close"}}else{e.bindUIElements()}},submitEmailForm:function(t){t.preventDefault();var i=this.ui.email.val(),s=this;if(i){n.membership.RPC.Member.send_reset_password_email(i).done(function(t){if(t){s.ui.email_form.hide();s.ui.message.html(t.message);s.ui.message.show();s.$el.parents(".ui-dialog").css({"min-height":"290px","max-height":"290px",height:"290px"});if(s.options.modal){s.ui.buttonArea.append('<button class="btn btn-info btn-com okay-btn" style="margin-top: 30px;">'+e.stl("javascript.membership.site.views.ResetPasswordView_1")+"</button>")}}})}},submitResetForm:function(t){t.preventDefault();var i=this.ui.token.val(),s=this.ui.password.val(),o=this.ui.password_confirmation.val(),r=this;r.ui.error.html("");if(s&&o){n.membership.RPC.Member.set_password(i,s,o).done(function(t){if(t&&t.success){r.ui.form.hide();r.ui.message.html(e.stl("javascript.membership.site.views.ResetPasswordView_2"));r.ui.message.show()}else{r.ui.error.html(t.message)}})}else{r.ui.error.html(e.stl("javascript.membership.site.views.ResetPasswordView_3"))}}});return o}.apply(t,s),n!==undefined&&(e.exports=n))},158:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1),i(49),i(33)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",s="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",n=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},o=function(t){var i=t.name,s=t.form,n=e([]);if(i){i=i.replace(/'/g,"\\'");if(s){n=e(s).find("[name='"+i+"'][type=radio]")}else{n=e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})}}return n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,n);if(typeof this.options.disabled!=="boolean"){this.options.disabled=!!this.element.prop("disabled")}else{this.element.prop("disabled",this.options.disabled)}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var s=this,r=this.options,a=this.type==="checkbox"||this.type==="radio",l=!a?"ui-state-active":"";if(r.label===null){r.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html()}this._hoverable(this.buttonElement);this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(r.disabled){return}if(this===t){e(this).addClass("ui-state-active")}}).bind("mouseleave"+this.eventNamespace,function(){if(r.disabled){return}e(this).removeClass(l)}).bind("click"+this.eventNamespace,function(e){if(r.disabled){e.preventDefault();e.stopImmediatePropagation()}});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});if(a){this.element.bind("change"+this.eventNamespace,function(){s.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled){return false}})}else if(this.type==="radio"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled){return false}e(this).addClass("ui-state-active");s.buttonElement.attr("aria-pressed","true");var t=s.element[0];o(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")})}else{this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(r.disabled){return false}e(this).addClass("ui-state-active");t=this;s.document.one("mouseup",function(){t=null})}).bind("mouseup"+this.eventNamespace,function(){if(r.disabled){return false}e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(r.disabled){return false}if(t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER){e(this).addClass("ui-state-active")}}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(t){if(t.keyCode===e.ui.keyCode.SPACE){e(this).click()}})}}this._setOption("disabled",r.disabled);this._resetButton()},_determineButtonType:function(){var e,t,i;if(this.element.is("[type=checkbox]")){this.type="checkbox"}else if(this.element.is("[type=radio]")){this.type="radio"}else if(this.element.is("input")){this.type="input"}else{this.type="button"}if(this.type==="checkbox"||this.type==="radio"){e=this.element.parents().last();t="label[for='"+this.element.attr("id")+"']";this.buttonElement=e.find(t);if(!this.buttonElement.length){e=e.length?e.siblings():this.element.siblings();this.buttonElement=e.filter(t);if(!this.buttonElement.length){this.buttonElement=e.find(t)}}this.element.addClass("ui-helper-hidden-accessible");i=this.element.is(":checked");if(i){this.buttonElement.addClass("ui-state-active")}this.buttonElement.prop("aria-pressed",i)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(i+" ui-state-active "+s).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}},_setOption:function(e,t){this._super(e,t);if(e==="disabled"){this.widget().toggleClass("ui-state-disabled",!!t);this.element.prop("disabled",!!t);if(t){if(this.type==="checkbox"||this.type==="radio"){this.buttonElement.removeClass("ui-state-focus")}else{this.buttonElement.removeClass("ui-state-focus ui-state-active")}}return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");if(t!==this.options.disabled){this._setOption("disabled",t)}if(this.type==="radio"){o(this.element[0]).each(function(){if(e(this).is(":checked")){e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true")}else{e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}})}else if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true")}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var t=this.buttonElement.removeClass(s),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,o=n.primary&&n.secondary,r=[];if(n.primary||n.secondary){if(this.options.text){r.push("ui-button-text-icon"+(o?"s":n.primary?"-primary":"-secondary"))}if(n.primary){t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>")}if(n.secondary){t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>")}if(!this.options.text){r.push(o?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){t.attr("title",e.trim(i))}}}else{r.push("ui-button-text-only")}t.addClass(r.join(" "))}});e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){if(e==="disabled"){this.buttons.button("option",e,t)}this._super(e,t)},refresh:function(){var t=this.element.css("direction")==="rtl",i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button();s.button("refresh");this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});return e.ui.button})},159:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1),i(49),i(33),i(158),i(160),i(65),i(163),i(164)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){return e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:true,buttons:[],closeOnEscape:true,closeText:"Close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;if(i<0){e(this).css("top",t.top-i)}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions:{maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();if(this.options.draggable&&e.fn.draggable){this._makeDraggable()}if(this.options.resizable&&e.fn.resizable){this._makeResizable()}this._isOpen=false;this._trackFocus()},_init:function(){if(this.options.autoOpen){this.open()}},_appendTo:function(){var t=this.options.appendTo;if(t&&(t.jquery||t.nodeType)){return e(t)}return this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(true,true).remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}e=t.parent.children().eq(t.index);if(e.length&&e[0]!==this.element[0]){e.before(this.element)}else{t.parent.append(this.element)}},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(!this._isOpen||this._trigger("beforeClose",t)===false){return}this._isOpen=false;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length){try{i=this.document[0].activeElement;if(i&&i.nodeName.toLowerCase()!=="body"){
2e(i).blur()}}catch(e){}}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=false,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),o=Math.max.apply(null,n);if(o>=+this.uiDialog.css("z-index")){this.uiDialog.css("z-index",o+1);s=true}if(s&&!i){this._trigger("focus",t)}return s},open:function(){var t=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable()}return}this._isOpen=true;this.opener=e(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,true);if(this.overlay){this.overlay.css("z-index",this.uiDialog.css("z-index")-1)}this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")});this._makeFocusTarget();this._trigger("open")},_focusTabbable:function(){var e=this._focusedElement;if(!e){e=this.element.find("[autofocus]")}if(!e.length){e=this.element.find(":tabbable")}if(!e.length){e=this.uiDialogButtonPane.find(":tabbable")}if(!e.length){e=this.uiDialogTitlebarClose.filter(":tabbable")}if(!e.length){e=this.uiDialog}e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);if(!i){this._focusTabbable()}}t.preventDefault();i.call(this);this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE){t.preventDefault();this.close(t);return}if(t.keyCode!==e.ui.keyCode.TAB||t.isDefaultPrevented()){return}var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");if((t.target===n[0]||t.target===this.uiDialog[0])&&!t.shiftKey){this._delay(function(){s.focus()});t.preventDefault()}else if((t.target===s[0]||t.target===this.uiDialog[0])&&t.shiftKey){this._delay(function(){n.focus()});t.preventDefault()}},mousedown:function(e){if(this._moveToTop(e)){this._focusTabbable()}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(t){if(!e(t.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.focus()}}});this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:false}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault();this.close(e)}});t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(t);this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){if(!this.options.title){e.html("&#160;")}e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if(e.isEmptyObject(i)||e.isArray(i)&&!i.length){this.uiDialog.removeClass("ui-dialog-buttons");return}e.each(i,function(i,s){var n,o;s=e.isFunction(s)?{click:s,text:i}:s;s=e.extend({type:"button"},s);n=s.click;s.click=function(){n.apply(t.element[0],arguments)};o={icons:s.icons,text:s.showText};delete s.icons;delete s.showText;e("<button></button>",s).button(o).appendTo(t.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var t=this,i=this.options;function s(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,n){e(this).addClass("ui-dialog-dragging");t._blockFrames();t._trigger("dragStart",i,s(n))},drag:function(e,i){t._trigger("drag",e,s(i))},stop:function(n,o){var r=o.offset.left-t.document.scrollLeft(),a=o.offset.top-t.document.scrollTop();i.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(a>=0?"+":"")+a,of:t.window};e(this).removeClass("ui-dialog-dragging");t._unblockFrames();t._trigger("dragStop",n,s(o))}})},_makeResizable:function(){var t=this,i=this.options,s=i.resizable,n=this.uiDialog.css("position"),o=typeof s==="string"?s:"n,e,s,w,se,sw,ne,nw";function r(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(i,s){e(this).addClass("ui-dialog-resizing");t._blockFrames();t._trigger("resizeStart",i,r(s))},resize:function(e,i){t._trigger("resize",e,r(i))},stop:function(s,n){var o=t.uiDialog.offset(),a=o.left-t.document.scrollLeft(),l=o.top-t.document.scrollTop();i.height=t.uiDialog.height();i.width=t.uiDialog.width();i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(l>=0?"+":"")+l,of:t.window};e(this).removeClass("ui-dialog-resizing");t._unblockFrames();t._trigger("resizeStop",s,r(n))}}).css("position",n)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget();this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);if(i!==-1){t.splice(i,1)}},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");if(!e){e=[];this.document.data("ui-dialog-instances",e)}return e},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");if(!e){this.uiDialog.show()}this.uiDialog.position(this.options.position);if(!e){this.uiDialog.hide()}},_setOptions:function(t){var i=this,s=false,n={};e.each(t,function(e,t){i._setOption(e,t);if(e in i.sizeRelatedOptions){s=true}if(e in i.resizableRelatedOptions){n[e]=t}});if(s){this._size();this._position()}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",n)}},_setOption:function(e,t){var i,s,n=this.uiDialog;if(e==="dialogClass"){n.removeClass(this.options.dialogClass).addClass(t)}if(e==="disabled"){return}this._super(e,t);if(e==="appendTo"){this.uiDialog.appendTo(this._appendTo())}if(e==="buttons"){this._createButtons()}if(e==="closeText"){this.uiDialogTitlebarClose.button({label:""+t})}if(e==="draggable"){i=n.is(":data(ui-draggable)");if(i&&!t){n.draggable("destroy")}if(!i&&t){this._makeDraggable()}}if(e==="position"){this._position()}if(e==="resizable"){s=n.is(":data(ui-resizable)");if(s&&!t){n.resizable("destroy")}if(s&&typeof t==="string"){n.resizable("option","handles",t)}if(!s&&t!==false){this._makeResizable()}}if(e==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))}},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(s.minWidth>s.width){s.width=s.minWidth}e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight();t=Math.max(0,s.minHeight-e);i=typeof s.maxHeight==="number"?Math.max(0,s.maxHeight-e):"none";if(s.height==="auto"){this.element.css({minHeight:t,maxHeight:i,height:"auto"})}else{this.element.height(Math.max(0,s.height-e))}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_allowInteraction:function(t){if(e(t.target).closest(".ui-dialog").length){return true}return!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(!this.options.modal){return}var t=true;this._delay(function(){t=false});if(!this.document.data("ui-dialog-overlays")){this._on(this.document,{focusin:function(e){if(t){return}if(!this._allowInteraction(e)){e.preventDefault();this._trackingInstances()[0]._focusTabbable()}}})}this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)},_destroyOverlay:function(){if(!this.options.modal){return}if(this.overlay){var e=this.document.data("ui-dialog-overlays")-1;if(!e){this.document.unbind("focusin").removeData("ui-dialog-overlays")}else{this.document.data("ui-dialog-overlays",e)}this.overlay.remove();this.overlay=null}}})})},160:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1),i(49),i(65),i(33)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"){this._setPositionRelative()}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._setHandleClassName();this._mouseInit()},_setOption:function(e,t){this._super(e,t);if(e==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;this._blurActiveElement(t);if(this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(t);if(!this.handle){return false}this._blockFrames(i.iframeFix===true?"iframe":i.iframeFix);return true},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_blurActiveElement:function(t){var i=this.document[0];if(!this.handleElement.is(t.target)){return}try{if(i.activeElement&&i.activeElement.nodeName.toLowerCase()!=="body"){e(i.activeElement).blur()}}catch(e){}},_mouseStart:function(t){var i=this.options;this.helper=this._createHelper(t);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if(e.ui.ddmanager){e.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=this.helper.parents().filter(function(){return e(this).css("position")==="fixed"}).length>0;this.positionAbs=this.element.offset();this._refreshOffsets(t);this.originalPosition=this.position=this._generatePosition(t,false);this.originalPageX=t.pageX;this.originalPageY=t.pageY;i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt);this._setContainment();if(this._trigger("start",t)===false){this._clear();return false}this._cacheHelperProportions();if(e.ui.ddmanager&&!i.dropBehaviour){e.ui.ddmanager.prepareOffsets(this,t)}this._normalizeRightBottom();this._mouseDrag(t,true);if(e.ui.ddmanager){e.ui.ddmanager.dragStart(this,t)}return true},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:false,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(t,true);this.positionAbs=this._convertPositionTo("absolute");if(!i){var s=this._uiHash();if(this._trigger("drag",t,s)===false){this._mouseUp({});return false}this.position=s.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(e.ui.ddmanager){e.ui.ddmanager.drag(this,t)}return false},_mouseStop:function(t){var i=this,s=false;if(e.ui.ddmanager&&!this.options.dropBehaviour){s=e.ui.ddmanager.drop(this,t)}if(this.dropped){s=this.dropped;this.dropped=false}if(this.options.revert==="invalid"&&!s||this.options.revert==="valid"&&s||this.options.revert===true||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)){e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(i._trigger("stop",t)!==false){i._clear()}})}else{if(this._trigger("stop",t)!==false){this._clear()}}return false},_mouseUp:function(t){this._unblockFrames();if(e.ui.ddmanager){e.ui.ddmanager.dragStop(this,t)}if(this.handleElement.is(t.target)){this.element.focus()}return e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):i.helper==="clone"?this.element.clone().removeAttr("id"):this.element;if(!n.parents("body").length){n.appendTo(i.appendTo==="parent"?this.element[0].parentNode:i.appendTo)}if(s&&n[0]===this.element[0]){this._setPositionRelative()}if(n[0]!==this.element[0]&&!/(fixed|absolute)/.test(n.css("position"))){n.css("position","absolute")}return n},_setPositionRelative:function(){if(!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}},_adjustOffsetFromHelper:function(t){if(typeof t==="string"){t=t.split(" ")}if(e.isArray(t)){t={left:+t[0],top:+t[1]||0}}if("left"in t){this.offset.click.left=t.left+this.margins.left}if("right"in t){this.offset.click.left=this.helperProportions.width-t.right+this.margins.left}if("top"in t){this.offset.click.top=t.top+this.margins.top}if("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(),i=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])){t.left+=this.scrollParent.scrollLeft();t.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){t={top:0,left:0}}return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){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?this.scrollParent.scrollTop():0),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(!t?this.scrollParent.scrollLeft():0)}},_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,i,s,n=this.options,o=this.document[0];this.relativeContainer=null;if(!n.containment){this.containment=null;return}if(n.containment==="window"){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()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment==="document"){this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment.constructor===Array){this.containment=n.containment;return}if(n.containment==="parent"){n.containment=this.helper[0].parentNode}i=e(n.containment);s=i[0];if(!s){return}t=/(scroll|auto)/.test(i.css("overflow"));this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relativeContainer=i},_convertPositionTo:function(e,t){if(!t){t=this.position}var i=e==="absolute"?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-(this.cssPosition==="fixed"?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-(this.cssPosition==="fixed"?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,h=e.pageY;if(!a||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(t){if(this.containment){if(this.relativeContainer){s=this.relativeContainer.offset();i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]}else{i=this.containment}if(e.pageX-this.offset.click.left<i[0]){l=i[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<i[1]){h=i[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>i[2]){l=i[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>i[3]){h=i[3]+this.offset.click.top}}if(r.grid){n=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY;h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n;o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX;l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o}if(r.axis==="y"){l=this.originalPageX}if(r.axis==="x"){h=this.originalPageY}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_normalizeRightBottom:function(){if(this.options.axis!=="y"&&this.helper.css("right")!=="auto"){this.helper.width(this.helper.width());this.helper.css("right","auto")}if(this.options.axis!=="x"&&this.helper.css("bottom")!=="auto"){this.helper.height(this.helper.height());this.helper.css("bottom","auto")}},_trigger:function(t,i,s){s=s||this._uiHash();e.ui.plugin.call(this,t,[i,s,this],true);if(/^(drag|start|stop)/.test(t)){this.positionAbs=this._convertPositionTo("absolute");s.offset=this.positionAbs}return e.Widget.prototype._trigger.call(this,t,i,s)},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,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[];e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");if(i&&!i.options.disabled){s.sortables.push(i);i.refreshPositions();i._trigger("activate",t,n)}})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=false;e.each(s.sortables,function(){var e=this;if(e.isOver){e.isOver=0;s.cancelHelperRemoval=true;e.cancelHelperRemoval=false;e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")};e._mouseStop(t);e.options.helper=e.options._helper}else{e.cancelHelperRemoval=true;e._trigger("deactivate",t,n)}})},drag:function(t,i,s){e.each(s.sortables,function(){var n=false,o=this;o.positionAbs=s.positionAbs;o.helperProportions=s.helperProportions;o.offset.click=s.offset.click;if(o._intersectsWith(o.containerCache)){n=true;e.each(s.sortables,function(){this.positionAbs=s.positionAbs;this.helperProportions=s.helperProportions;this.offset.click=s.offset.click;if(this!==o&&this._intersectsWith(this.containerCache)&&e.contains(o.element[0],this.element[0])){n=false}return n})}if(n){if(!o.isOver){o.isOver=1;s._parent=i.helper.parent();o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",true);o.options._helper=o.options.helper;o.options.helper=function(){return i.helper[0]};t.target=o.currentItem[0];o._mouseCapture(t,true);o._mouseStart(t,true,true);o.offset.click.top=s.offset.click.top;o.offset.click.left=s.offset.click.left;o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left;o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top;s._trigger("toSortable",t);s.dropped=o.element;e.each(s.sortables,function(){this.refreshPositions()});s.currentItem=s.element;o.fromOutside=s}if(o.currentItem){o._mouseDrag(t);i.position=o.position}}else{if(o.isOver){o.isOver=0;o.cancelHelperRemoval=true;o.options._revert=o.options.revert;o.options.revert=false;o._trigger("out",t,o._uiHash(o));o._mouseStop(t,true);o.options.revert=o.options._revert;o.options.helper=o.options._helper;if(o.placeholder){o.placeholder.remove()}i.helper.appendTo(s._parent);s._refreshOffsets(t);i.position=s._generatePosition(t,true);s._trigger("fromSortable",t);s.dropped=false;e.each(s.sortables,function(){this.refreshPositions()})}}})}});e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),o=s.options;if(n.css("cursor")){o._cursor=n.css("cursor")}n.css("cursor",o.cursor)},stop:function(t,i,s){var n=s.options;if(n._cursor){e("body").css("cursor",n._cursor)}}});e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),o=s.options;if(n.css("opacity")){o._opacity=n.css("opacity")}n.css("opacity",o.opacity)},stop:function(t,i,s){var n=s.options;if(n._opacity){e(i.helper).css("opacity",n._opacity)}}});e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){if(!i.scrollParentNotHidden){i.scrollParentNotHidden=i.helper.scrollParent(false)}if(i.scrollParentNotHidden[0]!==i.document[0]&&i.scrollParentNotHidden[0].tagName!=="HTML"){i.overflowOffset=i.scrollParentNotHidden.offset()}},drag:function(t,i,s){var n=s.options,o=false,r=s.scrollParentNotHidden[0],a=s.document[0];if(r!==a&&r.tagName!=="HTML"){if(!n.axis||n.axis!=="x"){if(s.overflowOffset.top+r.offsetHeight-t.pageY<n.scrollSensitivity){r.scrollTop=o=r.scrollTop+n.scrollSpeed}else if(t.pageY-s.overflowOffset.top<n.scrollSensitivity){r.scrollTop=o=r.scrollTop-n.scrollSpeed}}if(!n.axis||n.axis!=="y"){if(s.overflowOffset.left+r.offsetWidth-t.pageX<n.scrollSensitivity){r.scrollLeft=o=r.scrollLeft+n.scrollSpeed}else if(t.pageX-s.overflowOffset.left<n.scrollSensitivity){r.scrollLeft=o=r.scrollLeft-n.scrollSpeed}}}else{if(!n.axis||n.axis!=="x"){if(t.pageY-e(a).scrollTop()<n.scrollSensitivity){o=e(a).scrollTop(e(a).scrollTop()-n.scrollSpeed)}else if(e(window).height()-(t.pageY-e(a).scrollTop())<n.scrollSensitivity){o=e(a).scrollTop(e(a).scrollTop()+n.scrollSpeed)}}if(!n.axis||n.axis!=="y"){if(t.pageX-e(a).scrollLeft()<n.scrollSensitivity){o=e(a).scrollLeft(e(a).scrollLeft()-n.scrollSpeed)}else if(e(window).width()-(t.pageX-e(a).scrollLeft())<n.scrollSensitivity){o=e(a).scrollLeft(e(a).scrollLeft()+n.scrollSpeed)}}}if(o!==false&&e.ui.ddmanager&&!n.dropBehaviour){e.ui.ddmanager.prepareOffsets(s,t)}}});e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[];e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();if(this!==s.element[0]){s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})}})},drag:function(t,i,s){var n,o,r,a,l,h,u,f,p,c,d=s.options,g=d.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,b=i.offset.top,w=b+s.helperProportions.height;for(p=s.snapElements.length-1;p>=0;p--){l=s.snapElements[p].left-s.margins.left;h=l+s.snapElements[p].width;u=s.snapElements[p].top-s.margins.top;f=u+s.snapElements[p].height;if(v<l-g||m>h+g||w<u-g||b>f+g||!e.contains(s.snapElements[p].item.ownerDocument,s.snapElements[p].item)){if(s.snapElements[p].snapping){s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[p].item}))}s.snapElements[p].snapping=false;continue}if(d.snapMode!=="inner"){n=Math.abs(u-w)<=g;o=Math.abs(f-b)<=g;r=Math.abs(l-v)<=g;a=Math.abs(h-m)<=g;if(n){i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top}if(o){i.position.top=s._convertPositionTo("relative",{top:f,left:0}).top}if(r){i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left}if(a){i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left}}c=n||o||r||a;if(d.snapMode!=="outer"){n=Math.abs(u-b)<=g;o=Math.abs(f-w)<=g;r=Math.abs(l-m)<=g;a=Math.abs(h-v)<=g;if(n){i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top}if(o){i.position.top=s._convertPositionTo("relative",{top:f-s.helperProportions.height,left:0}).top}if(r){i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left}if(a){i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left}}if(!s.snapElements[p].snapping&&(n||o||r||a||c)){s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[p].item}))}s.snapElements[p].snapping=n||o||r||a||c}}});e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,o=s.options,r=e.makeArray(e(o.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});if(!r.length){return}n=parseInt(e(r[0]).css("zIndex"),10)||0;e(r).each(function(t){e(this).css("zIndex",n+t)});this.css("zIndex",n+r.length)}});e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),o=s.options;if(n.css("zIndex")){o._zIndex=n.css("zIndex")}n.css("zIndex",o.zIndex)},stop:function(t,i,s){var n=s.options;if(n._zIndex){e(i.helper).css("zIndex",n._zIndex)}}});return e.ui.draggable})},163:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){(function(){e.ui=e.ui||{};var t,i,s=Math.max,n=Math.abs,o=Math.round,r=/left|center|right/,a=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,u=/%$/,f=e.fn.position;function p(e,t,i){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?i/100:1)]}function c(t,i){return parseInt(e.css(t,i),10)||0}function d(t){var i=t[0];if(i.nodeType===9){return{width:t.width(),height:t.height(),offset:{top:0,left:0}}}if(e.isWindow(i)){return{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}}if(i.preventDefault){return{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}}return{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.position={scrollbarWidth:function(){if(t!==undefined){return t}var i,s,n=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];e("body").append(n);i=o.offsetWidth;n.css("overflow","scroll");s=o.offsetWidth;if(i===s){s=n[0].clientWidth}n.remove();return t=i-s},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n=i==="scroll"||i==="auto"&&t.width<t.element[0].scrollWidth,o=s==="scroll"||s==="auto"&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&i[0].nodeType===9;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}};e.fn.position=function(t){if(!t||!t.of){return f.apply(this,arguments)}t=e.extend({},t);var u,g,m,v,b,w,_=e(t.of),y=e.position.getWithinInfo(t.within),x=e.position.getScrollInfo(y),z=(t.collision||"flip").split(" "),C={};w=d(_);if(_[0].preventDefault){t.at="left top"}g=w.width;m=w.height;v=w.offset;b=e.extend({},v);e.each(["my","at"],function(){var e=(t[this]||"").split(" "),i,s;if(e.length===1){e=r.test(e[0])?e.concat(["center"]):a.test(e[0])?["center"].concat(e):["center","center"]}e[0]=r.test(e[0])?e[0]:"center";e[1]=a.test(e[1])?e[1]:"center";i=l.exec(e[0]);s=l.exec(e[1]);C[this]=[i?i[0]:0,s?s[0]:0];t[this]=[h.exec(e[0])[0],h.exec(e[1])[0]]});if(z.length===1){z[1]=z[0]}if(t.at[0]==="right"){b.left+=g}else if(t.at[0]==="center"){b.left+=g/2}if(t.at[1]==="bottom"){b.top+=m}else if(t.at[1]==="center"){b.top+=m/2}u=p(C.at,g,m);b.left+=u[0];b.top+=u[1];return this.each(function(){var r,a,l=e(this),h=l.outerWidth(),f=l.outerHeight(),d=c(this,"marginLeft"),w=c(this,"marginTop"),P=h+d+c(this,"marginRight")+x.width,D=f+w+c(this,"marginBottom")+x.height,T=e.extend({},b),E=p(C.my,l.outerWidth(),l.outerHeight());if(t.my[0]==="right"){T.left-=h}else if(t.my[0]==="center"){T.left-=h/2}if(t.my[1]==="bottom"){T.top-=f}else if(t.my[1]==="center"){T.top-=f/2}T.left+=E[0];T.top+=E[1];if(!i){T.left=o(T.left);T.top=o(T.top)}r={marginLeft:d,marginTop:w};e.each(["left","top"],function(i,s){if(e.ui.position[z[i]]){e.ui.position[z[i]][s](T,{targetWidth:g,
3targetHeight:m,elemWidth:h,elemHeight:f,collisionPosition:r,collisionWidth:P,collisionHeight:D,offset:[u[0]+E[0],u[1]+E[1]],my:t.my,at:t.at,within:y,elem:l})}});if(t.using){a=function(e){var i=v.left-T.left,o=i+g-h,r=v.top-T.top,a=r+m-f,u={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:l,left:T.left,top:T.top,width:h,height:f},horizontal:o<0?"left":i>0?"right":"center",vertical:a<0?"top":r>0?"bottom":"middle"};if(g<h&&n(i+o)<g){u.horizontal="center"}if(m<f&&n(r+a)<m){u.vertical="middle"}if(s(n(i),n(o))>s(n(r),n(a))){u.important="horizontal"}else{u.important="vertical"}t.using.call(this,e,u)}}l.offset(e.extend(T,{using:a}))})};e.ui.position={fit:{left:function(e,t){var i=t.within,n=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,r=e.left-t.collisionPosition.marginLeft,a=n-r,l=r+t.collisionWidth-o-n,h;if(t.collisionWidth>o){if(a>0&&l<=0){h=e.left+a+t.collisionWidth-o-n;e.left+=a-h}else if(l>0&&a<=0){e.left=n}else{if(a>l){e.left=n+o-t.collisionWidth}else{e.left=n}}}else if(a>0){e.left+=a}else if(l>0){e.left-=l}else{e.left=s(e.left-r,e.left)}},top:function(e,t){var i=t.within,n=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,r=e.top-t.collisionPosition.marginTop,a=n-r,l=r+t.collisionHeight-o-n,h;if(t.collisionHeight>o){if(a>0&&l<=0){h=e.top+a+t.collisionHeight-o-n;e.top+=a-h}else if(l>0&&a<=0){e.top=n}else{if(a>l){e.top=n+o-t.collisionHeight}else{e.top=n}}}else if(a>0){e.top+=a}else if(l>0){e.top-=l}else{e.top=s(e.top-r,e.top)}}},flip:{left:function(e,t){var i=t.within,s=i.offset.left+i.scrollLeft,o=i.width,r=i.isWindow?i.scrollLeft:i.offset.left,a=e.left-t.collisionPosition.marginLeft,l=a-r,h=a+t.collisionWidth-o-r,u=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,f=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,p=-2*t.offset[0],c,d;if(l<0){c=e.left+u+f+p+t.collisionWidth-o-s;if(c<0||c<n(l)){e.left+=u+f+p}}else if(h>0){d=e.left-t.collisionPosition.marginLeft+u+f+p-r;if(d>0||n(d)<h){e.left+=u+f+p}}},top:function(e,t){var i=t.within,s=i.offset.top+i.scrollTop,o=i.height,r=i.isWindow?i.scrollTop:i.offset.top,a=e.top-t.collisionPosition.marginTop,l=a-r,h=a+t.collisionHeight-o-r,u=t.my[1]==="top",f=u?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,p=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,c=-2*t.offset[1],d,g;if(l<0){g=e.top+f+p+c+t.collisionHeight-o-s;if(g<0||g<n(l)){e.top+=f+p+c}}else if(h>0){d=e.top-t.collisionPosition.marginTop+f+p+c-r;if(d>0||n(d)<h){e.top+=f+p+c}}}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments);e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments);e.ui.position.fit.top.apply(this,arguments)}}};(function(){var t,s,n,o,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(a?"div":"body");n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(a){e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"})}for(r in n){t.style[r]=n[r]}t.appendChild(l);s=a||document.documentElement;s.insertBefore(t,s.firstChild);l.style.cssText="position: absolute; left: 10.7432222px;";o=e(l).offset().left;i=o>10&&o<11;t.innerHTML="";s.removeChild(t)})()})();return e.ui.position})},164:function(e,t,i){var s,n,o;(function(r){if(true){!(n=[i(1),i(49),i(65),i(33)],s=r,o=typeof s==="function"?s.apply(t,n):s,o!==undefined&&(e.exports=o))}else{r(jQuery)}})(function(e){e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if(e(t).css("overflow")==="hidden"){return false}var s=i&&i==="left"?"scrollLeft":"scrollTop",n=false;if(t[s]>0){return true}t[s]=1;n=t[s]>0;t[s]=0;return n},_create:function(){var t,i,s,n,o,r=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{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"});this._handles=e();if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}t=this.handles.split(",");this.handles={};for(i=0;i<t.length;i++){s=e.trim(t[i]);o="ui-resizable-"+s;n=e("<div class='ui-resizable-handle "+o+"'></div>");n.css({zIndex:a.zIndex});if("se"===s){n.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[s]=".ui-resizable-"+s;this.element.append(n)}}this._renderAxis=function(t){var i,s,n,o;t=t||this.element;for(i in this.handles){if(this.handles[i].constructor===String){this.handles[i]=this.element.children(this.handles[i]).first().show()}else if(this.handles[i].jquery||this.handles[i].nodeType){this.handles[i]=e(this.handles[i]);this._on(this.handles[i],{mousedown:r._mouseDown})}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){s=e(this.handles[i],this.element);o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth();n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");t.css(n,o);this._proportionallyResize()}this._handles=this._handles.add(this.handles[i])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.mouseover(function(){if(!r.resizing){if(this.className){n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}r.axis=n&&n[1]?n[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(a.disabled){return}e(this).removeClass("ui-resizable-autohide");r._handles.show()}).mouseleave(function(){if(a.disabled){return}if(!r.resizing){e(this).addClass("ui-resizable-autohide");r._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){i(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);i(this.originalElement);return this},_mouseCapture:function(t){var i,s,n=false;for(i in this.handles){s=e(this.handles[i])[0];if(s===t.target||e.contains(s,t.target)){n=true}}return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,o=this.options,r=this.element;this.resizing=true;this._renderProxy();i=this._num(this.helper.css("left"));s=this._num(this.helper.css("top"));if(o.containment){i+=e(o.containment).scrollLeft()||0;s+=e(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:i,top:s};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:i,top:s};this.originalMousePosition={left:t.pageX,top:t.pageY};this.aspectRatio=typeof o.aspectRatio==="number"?o.aspectRatio:this.originalSize.width/this.originalSize.height||1;n=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",n==="auto"?this.axis+"-resize":n);r.addClass("ui-resizable-resizing");this._propagate("start",t);return true},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,o=this.axis,r=t.pageX-n.left||0,a=t.pageY-n.top||0,l=this._change[o];this._updatePrevProperties();if(!l){return false}i=l.apply(this,[t,r,a]);this._updateVirtualBoundaries(t.shiftKey);if(this._aspectRatio||t.shiftKey){i=this._updateRatio(i,t)}i=this._respectSize(i,t);this._updateCache(i);this._propagate("resize",t);s=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!e.isEmptyObject(s)){this._updatePrevProperties();this._trigger("resize",t,this.ui());this._applyChanges()}return false},_mouseStop:function(t){this.resizing=false;var i,s,n,o,r,a,l,h=this.options,u=this;if(this._helper){i=this._proportionallyResizeElements;s=i.length&&/textarea/i.test(i[0].nodeName);n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height;o=s?0:u.sizeDiff.width;r={width:u.helper.width()-o,height:u.helper.height()-n};a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null;l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null;if(!h.animate){this.element.css(e.extend(r,{top:l,left:a}))}u.helper.height(u.size.height);u.helper.width(u.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",t);if(this._helper){this.helper.remove()}return false},_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={};if(this.position.top!==this.prevPosition.top){e.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){e.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){e.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){e.height=this.size.height+"px"}this.helper.css(e);return e},_updateVirtualBoundaries:function(e){var t,i,s,n,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:Infinity,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:Infinity};if(this._aspectRatio||e){t=o.minHeight*this.aspectRatio;s=o.minWidth/this.aspectRatio;i=o.maxHeight*this.aspectRatio;n=o.maxWidth/this.aspectRatio;if(t>o.minWidth){o.minWidth=t}if(s>o.minHeight){o.minHeight=s}if(i<o.maxWidth){o.maxWidth=i}if(n<o.maxHeight){o.maxHeight=n}}this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset();if(this._isNumber(e.left)){this.position.left=e.left}if(this._isNumber(e.top)){this.position.top=e.top}if(this._isNumber(e.height)){this.size.height=e.height}if(this._isNumber(e.width)){this.size.width=e.width}},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;if(this._isNumber(e.height)){e.width=e.height*this.aspectRatio}else if(this._isNumber(e.width)){e.height=e.width/this.aspectRatio}if(s==="sw"){e.left=t.left+(i.width-e.width);e.top=null}if(s==="nw"){e.top=t.top+(i.height-e.height);e.left=t.left+(i.width-e.width)}return e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,h=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);if(o){e.width=t.minWidth}if(r){e.height=t.minHeight}if(s){e.width=t.maxWidth}if(n){e.height=t.maxHeight}if(o&&h){e.left=a-t.minWidth}if(s&&h){e.left=a-t.maxWidth}if(r&&u){e.top=l-t.minHeight}if(n&&u){e.top=l-t.maxHeight}if(!e.width&&!e.height&&!e.left&&e.top){e.top=null}else if(!e.width&&!e.height&&!e.top&&e.left){e.left=null}return e},_getPaddingPlusBorderDimensions:function(e){var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];for(;t<4;t++){i[t]=parseInt(s[t],10)||0;i[t]+=parseInt(n[t],10)||0}return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var e,t=0,i=this.helper||this.element;for(;t<this._proportionallyResizeElements.length;t++){e=this._proportionallyResizeElements[t];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(e)}e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset();if(this._helper){this.helper=this.helper||e("<div style='overflow:hidden;'></div>");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]);t!=="resize"&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),r=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,u&&h?{top:u,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};if(n&&n.length){e(n[0]).css({width:s.width,height:s.height})}i._updateCache(s);i._propagate("resize",t)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,o,r,a,l=e(this).resizable("instance"),h=l.options,u=l.element,f=h.containment,p=f instanceof e?f.get(0):/parent/.test(f)?u.parent().get(0):f;if(!p){return}l.containerElement=e(p);if(/document/.test(f)||f===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}}else{t=e(p);i=[];e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=l._num(t.css("padding"+s))});l.containerOffset=t.offset();l.containerPosition=t.position();l.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]};s=l.containerOffset;n=l.containerSize.height;o=l.containerSize.width;r=l._hasScroll(p,"left")?p.scrollWidth:o;a=l._hasScroll(p)?p.scrollHeight:n;l.parentData={element:p,left:s.left,top:s.top,width:r,height:a}}},resize:function(t){var i,s,n,o,r=e(this).resizable("instance"),a=r.options,l=r.containerOffset,h=r.position,u=r._aspectRatio||t.shiftKey,f={top:0,left:0},p=r.containerElement,c=true;if(p[0]!==document&&/static/.test(p.css("position"))){f=l}if(h.left<(r._helper?l.left:0)){r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-f.left);if(u){r.size.height=r.size.width/r.aspectRatio;c=false}r.position.left=a.helper?l.left:0}if(h.top<(r._helper?l.top:0)){r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top);if(u){r.size.width=r.size.height*r.aspectRatio;c=false}r.position.top=r._helper?l.top:0}n=r.containerElement.get(0)===r.element.parent().get(0);o=/relative|absolute/.test(r.containerElement.css("position"));if(n&&o){r.offset.left=r.parentData.left+r.position.left;r.offset.top=r.parentData.top+r.position.top}else{r.offset.left=r.element.offset().left;r.offset.top=r.element.offset().top}i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-f.left:r.offset.left-l.left));s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-f.top:r.offset.top-l.top));if(i+r.size.width>=r.parentData.width){r.size.width=r.parentData.width-i;if(u){r.size.height=r.size.width/r.aspectRatio;c=false}}if(s+r.size.height>=r.parentData.height){r.size.height=r.parentData.height-s;if(u){r.size.width=r.size.height*r.aspectRatio;c=false}}if(!c){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"),i=t.options,s=t.containerOffset,n=t.containerPosition,o=t.containerElement,r=e(t.helper),a=r.offset(),l=r.outerWidth()-t.sizeDiff.width,h=r.outerHeight()-t.sizeDiff.height;if(t._helper&&!i.animate&&/relative/.test(o.css("position"))){e(this).css({left:a.left-n.left-s.left,width:l,height:h})}if(t._helper&&!i.animate&&/static/.test(o.css("position"))){e(this).css({left:a.left-n.left-s.left,width:l,height:h})}}});e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,o=s.originalSize,r=s.originalPosition,a={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},o=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(s[t]||0)+(a[t]||0);if(i&&i>=0){n[t]=i||null}});t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost==="string"?i.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");if(t.ghost){t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})}},stop:function(){var t=e(this).resizable("instance");if(t.ghost&&t.helper){t.helper.get(0).removeChild(t.ghost.get(0))}}});e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis,l=typeof s.grid==="number"?[s.grid,s.grid]:s.grid,h=l[0]||1,u=l[1]||1,f=Math.round((n.width-o.width)/h)*h,p=Math.round((n.height-o.height)/u)*u,c=o.width+f,d=o.height+p,g=s.maxWidth&&s.maxWidth<c,m=s.maxHeight&&s.maxHeight<d,v=s.minWidth&&s.minWidth>c,b=s.minHeight&&s.minHeight>d;s.grid=l;if(v){c+=h}if(b){d+=u}if(g){c-=h}if(m){d-=u}if(/^(se|s|e)$/.test(a)){i.size.width=c;i.size.height=d}else if(/^(ne)$/.test(a)){i.size.width=c;i.size.height=d;i.position.top=r.top-p}else if(/^(sw)$/.test(a)){i.size.width=c;i.size.height=d;i.position.left=r.left-f}else{if(d-u<=0||c-h<=0){t=i._getPaddingPlusBorderDimensions(this)}if(d-u>0){i.size.height=d;i.position.top=r.top-p}else{d=u-t.height;i.size.height=d;i.position.top=r.top+o.height-d}if(c-h>0){i.size.width=c;i.position.left=r.left-f}else{c=h-t.width;i.size.width=c;i.position.left=r.left+o.width-c}}}});return e.ui.resizable})},172:function(e,t,i){var s,n;!(s=[i(1),i(7),i(3),i(159)],n=function(e,t,i){return t.Marionette.Region.extend({defaults:{title:"Default Title",closeOnEscape:true,draggable:false,modal:true,resizable:false,position:{my:"center",at:"center",of:window}},constructor:function(){i.extend(this,t.Events)},el:"#dialog-region",dialogClass:"popup-modal",onShow:function(e){var t=i.extend({},e.dialog);this.view=e;this.dialogOptions=i.result(e,"dialog");this.$el.dialog(this.getDefaultOptions(this.dialogOptions,e));this.updateDialogCss(e);if(t.titleIcon){this.createTitleIcon(t.titleIcon)}this.namespace=".dialog-"+Math.floor(Math.random()*1e6+1);this.setupBindings(e);i.result(this.view.options,"onShow")},onClose:function(){i.result(this.view.options,"onClose");this.stopListening();e("body").off("keydown"+this.namespace);e("body").off("click"+this.namespace);e(window).off("resize"+this.namespace)},updateDialogCss:function(t){var i=this.$el.find(".dialog-body");if(i.length){var s=i.height();var n=i.parent().height();var o=e(window).height()-170;if(s>n&&o>n){o=n-30}this.$el.addClass("hasBody");i.css({maxHeight:this.$el.outerHeight()-this.$el.find(".dialog-footer").outerHeight()})}else{this.$el.removeClass("hasBody")}if(t&&this.dialogOptions&&this.dialogOptions.size){var r=this.dialogOptions.size.split("x");if(r.length==2){var a=this.$el.parent();var l=r[0]+"px";var h=r[1]+"px";a.css({width:l,minWidth:l,maxWidth:l,height:h,minHeight:h,maxHeight:h,left:(e(window).width()-r[0])/2,top:(e(window).height()-r[1])/2})}}if(t&&this.dialogOptions&&this.dialogOptions.enableScrolling){$dialogContent=e(".ui-dialog-content div:first");$dialogContent.css({"max-height":r[1]-e(".ui-dialog-titlebar").height(),"padding-bottom":0})}},setupBindings:function(t){this.listenTo(t,"render",function(){this.updateView(t);this.updateDialogCss(t)});if(this.previousView){this.listenTo(t,"dialog:close",this.restoreMainView)}else{this.listenTo(t,"dialog:close",this.closeDialog)}this.listenTo(t,"dialog:update:css",this.updateDialogCss);this.$el.dialog("option",{close:i.bind(this.closeDialog,this)});this.listenTo(t,"dialog:update:buttons",this.createFooter);this.listenTo(t,"dialog:update:title",this.updateDialogTitle);this.listenTo(t,"dialog:reposition",this.reposition);e("body").on("keydown"+this.namespace,i.bind(this.handleKeydown,this));e("body").on("click"+this.namespace,".ui-widget-overlay",i.bind(this.handleBackgroundClick,this));var s=i.bind(this.reposition,this);e(window).on("resize"+this.namespace,i.throttle(s,100))},reposition:function(e){var t=this;t.$el.dialog({position:t.defaults.position})},closeDialog:function(){this.close();this.$el.dialog("destroy")},cancelDialog:function(e){if(e){e.preventDefault()}if(typeof this.view.dialogCancel=="function"){this.view.dialogCancel()}else{this.closeDialog();if(this.previousView){this.previousView.close();this.previousView=null}}},handleKeydown:function(e){if(e.which==27&&this.$el.dialog("option","closeOnEscape")){if(e){e.preventDefault()}this.cancelDialog(e)}},handleBackgroundClick:function(){if(this.dialogOptions&&(this.dialogOptions.cancelAll||this.dialogOptions.cancelBg)){this.cancelDialog()}},getDefaultOptions:function(e,t){this.updateView(t);e=e||{};if(e.buttons){this.updateView(t)}e.dialogClass=i.compact(["w-ui",e.dialogClass,this.dialogClass]).join(" ");e=i.defaults(e,this.defaults);e=i.omit(e,"buttons");return e},updateView:function(e){if(e.dialog){var t=i.isFunction(e.dialog)?e.dialog():e.dialog;if(t.cancelX||t.cancelAll){this.createCancelX(e)}if(t.cancelXThin){this.createCancelXThin(e)}if(t.buttons){this.createFooter(t.buttons,e)}e.bindUIElements()}},createCancelX:function(e){if(!e.$el.find("a.close-x").length){e.$el.prepend('<a autofocus href="#"></a>');e.$el.prepend('<a href="#" class="close-x w-icon-delete"></a>');e.events=e.events||{};e.events["click a.close-x"]=i.bind(this.cancelDialog,this);e.delegateEvents()}},createCancelXThin:function(e){if(!e.$el.find("a.close-x").length){e.$el.prepend('<a autofocus href="#"></a>');e.$el.prepend('<a href="#" class="close-x close-x-thin">&times;</a>');e.events=e.events||{};e.events["click a.close-x"]=i.bind(this.cancelDialog,this);e.delegateEvents()}},createFooter:function(t,i){var i=i||this.currentView,s;if(this.$el.find(".dialog-footer").length){s=this.$el.find(".dialog-footer").empty()}else{s=e('<div class="dialog-footer" />')}s=this.createButtonFooter(s,t);s.append(i.$el.find(".footer"));i.$el.append(s)},createButtonFooter:function(e,t){i.each(t,function(t){if(t.group&&t.buttons){e.append(this.createButtonGroup(t))}else if(t.html||t.text){e.append(this.createButton(t))}},this);return e},createButtonGroup:function(t){var s=e('<div class="'+t.group+'"/>');i.each(t.buttons,function(e){s.append(this.createButton(e))},this);return s},createButton:function(t){var i=t.type||"button",s=e(document.createElement(i));if(t.text){s.text(t.text)}else if(t.html){s.html(t.html)}s.addClass(t.className||"");return s},createTitleIcon:function(t){var i=e("<span/>",{class:"icon"}).addClass(t);this.$el.dialog("widget").find(".ui-dialog-title").append(i)},updateDialogTitle:function(e){this.$el.dialog("option","title",e)},showSecondaryDialog:function(e,s){this.ensureEl();var n=this.$el.parent();var o=e.isClosed||i.isUndefined(e.$el);var r=e!==this.currentView;s=s!==null&&typeof s==="object"?s:{};if(r){if(this.$el.find(">div").length==1){var a=["width","minWidth","maxWidth","height","minHeight","maxHeight","left","top"];var l={};i.each(a,function(e){l[e]=n.css(e)});this.previousCss=l;this.previousView=this.currentView;this.$el.find(">div").hide()}else{this.close()}}e.render();if(r||o){this.$el.append(e.el)}this.currentView=e;if(s.silentReplace){return}t.Marionette.triggerMethod.call(this,"show",e);t.Marionette.triggerMethod.call(e,"show")},restoreMainView:function(e){e=e!==null&&typeof e==="object"?e:{};if(this.previousView){this.currentView.close();this.$el.find(">div").show();if(!e.silentReplace){t.Marionette.triggerMethod.call(this,"show",this.previousView);t.Marionette.triggerMethod.call(this.previousView,"reloadDialog");t.Marionette.triggerMethod.call(this.previousView,"show")}this.$el.parent().css(this.previousCss);this.currentView=this.previousView;this.previousView=null}}})}.apply(t,s),n!==undefined&&(e.exports=n))},176:function(e,t,i){(function(e){(function(e,t,i){var s=Object.prototype.toString.call(e.operamini)=="[object OperaMini]";var n="placeholder"in t.createElement("input")&&!s;var o="placeholder"in t.createElement("textarea")&&!s;var r=i.fn;var a=i.valHooks;var l=i.propHooks;var h;var u;if(n&&o){u=r.placeholder=function(){return this};u.input=u.textarea=true}else{u=r.placeholder=function(){var e=this;e.filter((n?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":p,"blur.placeholder":c}).data("placeholder-enabled",true).trigger("blur.placeholder");return e};u.input=n;u.textarea=o;h={get:function(e){var t=i(e);var s=t.data("placeholder-password");if(s){return s[0].value}return t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var s=i(e);var n=s.data("placeholder-password");if(n){return n[0].value=t}if(!s.data("placeholder-enabled")){return e.value=t}if(t==""){e.value=t;if(e!=d()){c.call(e)}}else if(s.hasClass("placeholder")){p.call(e,true,t)||(e.value=t)}else{e.value=t}return s}};if(!n){a.input=h;l.value=h}if(!o){a.textarea=h;l.value=h}i(function(){i(t).delegate("form","submit.placeholder",function(){var e=i(".placeholder",this).each(p);setTimeout(function(){e.each(c)},10)})});i(e).bind("beforeunload.placeholder",function(){i(".placeholder").each(function(){this.value=""})})}function f(e){var t={};var s=/^jQuery\d+$/;i.each(e.attributes,function(e,i){if(i.specified&&!s.test(i.name)){t[i.name]=i.value}});return t}function p(e,t){var s=this;var n=i(s);if(s.value==n.attr("placeholder")&&n.hasClass("placeholder")){if(n.data("placeholder-password")){n=n.hide().next().show().attr("id",n.removeAttr("id").data("placeholder-id"));if(e===true){return n[0].value=t}n.focus()}else{s.value="";n.removeClass("placeholder");s==d()&&s.select()}}}function c(){var e;var t=this;var s=i(t);var n=this.id;if(t.value==""){if(t.type=="password"){if(!s.data("placeholder-textinput")){try{e=s.clone().attr({type:"text"})}catch(t){e=i("<input>").attr(i.extend(f(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":s,"placeholder-id":n}).bind("focus.placeholder",p);s.data({"placeholder-textinput":e,"placeholder-id":n}).before(e)}s=s.removeAttr("id").hide().prev().attr("id",n).show()}s.addClass("placeholder");s[0].value=s.attr("placeholder")}else{s.removeClass("placeholder")}}function d(){try{return t.activeElement}catch(e){}}})(this,document,e)}).call(t,i(1))},223:function(e,t,i){var s,n;!(s=[i(2),i(7),i(21),i(172),i(151),i(150),i(224),i(225),i(152)],n=function(e,t,i,s,n,o,r,a,l){i.addRegions({dialogRegion:s});i.module("membership",function(s){var h={views:{login:n,denied:o,logout:r,set_password:a,reset_password:l,register:n},initialize:function(){window.initMembershipModels();s.RPC=e.Membership.RPC;s.vent=new t.Wreqr.EventAggregator;s.initialized=true},setupViewIfMembership:function(){var t=this;if(window.scope&&window.scope.namespace=="Membership"){if(window.location.protocol!=="https:"){var s=window.location.pathname.replace(/^\/apps\/member\//,"");if(t.views[s]===undefined){s="login"}if(s!=="login"){s=s+window.location.search}e.Membership.RPC.Member.getSecureMemberUrl().done(function(e){window.location=e.data.location+"/"+s})}var n=t.views[window.scope.view];new n({el:i.contentRegion.el,signup:window.scope.view=="register"})}}};if(window.initMembershipModels){h.initialize()}else{var u=function(e){h.initialize();h.setupViewIfMembership()};if(document.createEvent&&document.addEventListener){document.addEventListener("membershipModelsInitialized",u,false)}else{document.documentElement.initMembershipModels=0;document.documentElement.attachEvent("onpropertychange",function(e){if(e.propertyName=="initMembershipModels"){u()}})}}s.on("start",function(){if(s.initialized){h.setupViewIfMembership()}})});return i.membership}.apply(t,s),n!==undefined&&(e.exports=n));
4},224:function(e,t,i){var s,n;!(s=[i(1),i(7)],n=function(e,t){var i=t.Marionette.ItemView.extend({render:function(){}});return i}.apply(t,s),n!==undefined&&(e.exports=n))},225:function(e,t,i){var s,n;!(s=[i(2),i(7),i(21)],n=function(e,t,i){var s=t.Marionette.ItemView.extend({render:function(){},ui:{password:"input[name='password']",password_confirmation:"input[name='password_confirmation']",submit:".membership-form-submit",token:"input[name='access_token']",form:"#membership-set-password-form",success_message:".success-msg",error:".error"},events:{"click @ui.submit":"setPassword"},initialize:function(){this.bindUIElements()},setPassword:function(t){t.preventDefault();var s=this.ui.token.val(),n=this.ui.password.val(),o=this.ui.password_confirmation.val(),r=this;r.ui.error.html("");if(n&&o){i.membership.RPC.Member.set_password(s,n,o).done(function(e){if(e&&e.success){r.ui.form.hide();r.ui.success_message.show()}else{r.ui.error.html(e.message)}})}else{r.ui.error.html(e.utl("javascript.membership.site.views.SetPasswordView_1"))}}});return s}.apply(t,s),n!==undefined&&(e.exports=n))},226:function(e,t,i){var s,n;!(s=[],n=function(){var e={isNameValid:function(e){var t=/[!$%^&*_+|~=`{}\[\]:";<>?.\/]/gi;return e.match(t)===null}};return e}.apply(t,s),n!==undefined&&(e.exports=n))},601:function(e,t,i){var s,n;!(s=[i(1),i(6),i(7),i(21),i(56)],n=function(e,t,i,s,n){var o=i.Marionette.ItemView.extend({template:t.compile("{{> membership/account}}"),dialog:{title:"",cancelXThin:true,size:"580x380",dialogClass:"wsite-page-memberpage wsite-theme-light"},events:{"click .accessible-page":"browseToPage"},triggers:{"click .okay-btn":"dialog:close"},templateHelpers:{has_pages:function(){return this.accessible_pages&&this.accessible_pages.length||this.is_owner}},browseToPage:function(t){var i=e(t.currentTarget).children("a").attr("href");window.location=i},initialize:function(e){var t=this;t.render=i.Marionette.ItemView.prototype.render}});return o}.apply(t,s),n!==undefined&&(e.exports=n))},614:function(e,t,i){var s,n;!(s=[i(2),i(1),i(7),i(21),i(223),i(151),i(150),i(152),i(601)],n=function(e,t,i,s,n,o,r,a,l){t(document).ready(function(){if(t("body").hasClass("wsite-mobile")&&t("#member-login").length==0){t("ul.wsite-menu-default").append('<li id="member-login"><a href="#" id="wsite-nav-login-a"></a></li>')}s.membership.secureLocation="";s.membership.RPC.Member.get_session_details().done(function(i){if(i.data.logged_in){t("#member-login a").text(e.stl("javascript.accountText")).attr("href","#account")}else{var n=e.allowMemberRegistration?e.stl("javascript.loginRegisterText"):e.stl("javascript.loginText");t("#member-login a").text(n)}if(window.refreshPublishedFlyoutMenus){window.refreshPublishedFlyoutMenus()}if(e.mobile_navigation){e.mobile_navigation.resizeMenu()}s.membership.logged_in=i.data.logged_in;s.membership.page_ids=i.data.page_ids;s.membership.secureLocation=i.data.secure_location?i.data.secure_location:"";t("body").on("click",'a[data-membership-required="1"]',function(e){var i=t(e.currentTarget);var n=i.parent("li").attr("id").replace(/\D/g,"");var o=i.attr("href");var r=i.parent("li").attr("id")=="active";if(s.membership.logged_in){if(!(s.membership.page_ids=="all"||s.membership.page_ids.indexOf(n)!=-1||r)){e.preventDefault();s.vent.trigger("membership:denied:show")}}else{e.preventDefault();s.vent.trigger("membership:login:show",o)}});t("#member-login a").on("click",function(e){if(!s.membership.logged_in){e.preventDefault();e.stopPropagation();s.vent.trigger("membership:register:show")}})});if(window.inPreview){var n=e.allowMemberRegistration?e.stl("javascript.loginRegisterText"):e.stl("javascript.loginText");t("#member-login a").text(n);s.membership.logged_in=false;t("body").on("click",'a[data-membership-required="1"]',function(e){var i=t(e.currentTarget);var n=i.parent("li").attr("id").replace(/\D/g,"");var o=i.attr("href");var r=i.parent("li").attr("id")=="active";if(s.membership.logged_in){if(!(s.membership.page_ids=="all"||s.membership.page_ids.indexOf(n)!=-1||r)){e.preventDefault();s.vent.trigger("membership:denied:show")}}else{e.preventDefault();s.vent.trigger("membership:login:show",o)}});t("#member-login a").on("click",function(e){if(!s.membership.logged_in){e.preventDefault();e.stopPropagation();s.vent.trigger("membership:register:show")}})}new(i.Router.extend({routes:{register:function(){s.vent.trigger("membership:register:show")},login:function(){s.vent.trigger("membership:login:show")},resetPassword:function(){s.vent.trigger("membership:resetPassword:show")},account:function(){s.membership.RPC.Member.get_account_information().done(function(e){if(e.success){var t=new i.Model(e.data);s.vent.trigger("membership:account:show",t)}else{s.vent.trigger("membership:login:show")}})},denied:function(){s.vent.trigger("membership:denied:show")},"*path":function(){s.vent.trigger("membership:dialog:close")}}}));function h(e,t,n){s.dialogRegion.show(new e({modal:true,redirect:n,onClose:function(){i.history.navigate("")},onShow:function(){i.history.navigate(t)}}))}var u;function f(n){if(window.inPreview){t("#member-login a, #preview-login a").on("click",function(e){f(1);e.preventDefault();e.stopPropagation()});if(u!="loggedin"){if(n){var o=e.allowMemberRegistration?e.stl("javascript.loginRegisterText"):e.stl("javascript.loginText");t("#member-login a").text(o);t("#member-login a").attr("id","preview-login");s.vent.trigger("membership:login:show")}t("#preview-membership-link").remove();t(".btn-forward").after("<p id='preview-membership-link'><a id='toggle-membership'>Toggle to Logged In</a></p>");u="loggedin"}else if(u=="loggedin"){if(n){t("#member-login a").text(e.stl("javascript.accountText")).attr("href","#account");var r={accessible_pages:[{page_id:"",title:"Sample Page",url:""}]};var r=new i.Model(r);s.vent.trigger("membership:account:show",r);t("#preview-membership-link").remove();t(".logout-link").after("<p id='preview-membership-link'><a id='toggle-membership'>Toggle to Logged Out</a></p>")}u="loggedout"}t("#toggle-membership").on("click",function(e){f(true)})}}function p(e){if(e){document.cookie="_redirectLocation="+e}window.location.href=s.membership.secureLocation+"/apps/member/login"}s.vent.on({"membership:resetPassword:show":function(){h(a,"resetPassword")},"membership:denied:show":function(){h(r,"denied")},"membership:register:show":function(t){if(window.location.protocol!=="https:"){p(t);return}if(e.allowMemberRegistration){h(o,"register",t);f()}else{s.vent.trigger("membership:login:show")}},"membership:login:show":function(e){if(window.location.protocol!=="https:"){p(e);return}s.dialogRegion.show(new o({modal:true,redirect:e,showLoginFirst:true,onClose:function(){if(!window.inPreview){i.history.navigate("")}},onShow:function(){i.history.navigate("login");f()}}))},"membership:account:show":function(e){s.dialogRegion.show(new l({modal:true,model:e,onClose:function(){if(!window.inPreview){i.history.navigate("")}},onShow:function(){i.history.navigate("account")}}))},"membership:dialog:close":function(){if(s.dialogRegion.currentView){s.dialogRegion.currentView.trigger("dialog:close")}}});if(!i.History.started){i.history.start()}})}.apply(t,s),n!==undefined&&(e.exports=n))}});
Note: See TracBrowser for help on using the repository browser.