YUI.add("button-group",function(e,t){function s(){s.superclass.constructor.apply(this,arguments)}var n="contentBox",r="click",i=e.ButtonCore.CLASS_NAMES;e.ButtonGroup=e.extend(s,e.Widget,{renderUI:function(){this.getButtons().plug(e.Plugin.Button)},bindUI:function(){var t=this,i=t.get(n);i.delegate(r,t._handleClick,e.ButtonGroup.BUTTON_SELECTOR,t),t.after("disabledChange",t._afterDisabledChange)},_afterDisabledChange:function(t){this.getButtons().each(t.newVal?e.ButtonCore.prototype.disable:e.ButtonCore.prototype.enable)},getButtons:function(){var t=this.get(n);return t.all(e.ButtonGroup.BUTTON_SELECTOR)},getSelectedButtons:function(){var e=this,t=[],n=e.getButtons(),r=s.CLASS_NAMES.SELECTED;return n.each(function(e){e.hasClass(r)&&t.push(e)}),t},getSelectedValues:function(){var t=this.getSelectedButtons(),n=[],r;return e.Array.each(t,function(e){r=e.getContent(),n.push(r)}),n},_handleClick:function(e){var t=this,n=e.target.ancestor("."+s.CLASS_NAMES.BUTTON,!0),r=t.get("type"),i=s.CLASS_NAMES.SELECTED,o=n.hasClass(i),u;r==="checkbox"?(n.toggleClass(i,!o),t.fire("selectionChange",{originEvent:e})):r==="radio"&&!o&&(u=t.getButtons(),u.removeClass(i),n.addClass(i),t.fire("selectionChange",{originEvent:e}))}},{NAME:"buttongroup",ATTRS:{type:{writeOnce:"initOnly",value:"radio"}},CLASS_NAMES:i,BUTTON_SELECTOR:"button, input[type=button], input[type=reset], input[type=submit], input[type=radio], input[type=checkbox]"})},"patched-v3.18.1",{requires:["button-plugin","cssbutton","widget"]}); YUI.add("aui-button-core",function(e,t){var n={BUTTON:e.getClassName("btn"),BUTTON_DEFAULT:e.getClassName("btn","default"),BUTTON_GROUP:e.getClassName("btn","group"),DISABLED:e.getClassName("disabled"),LABEL:e.getClassName("label"),PRIMARY:e.getClassName("btn","primary"),SELECTED:e.getClassName("active"),TOGGLE:e.getClassName("togglebtn")},r=function(e){e&&e.domType&&this._domTypeValidator(e.domType)&&this._setEarlyButtonDomType(e.domType)};r.ATTRS={cssClass:{validator:e.Lang.isString,value:""},discardDefaultButtonCssClasses:{validator:e.Lang.isBoolean,value:!1,writeOnce:!0},domType:{validator:"_domTypeValidator",writeOnce:!0},icon:{},iconElement:{valueFn:function(){return e.Node.create(this.ICON_TEMPLATE)}},iconAlign:{validator:e.Lang.isString,value:"left"}},r.HTML_PARSER={iconElement:"span"},r.getTypedButtonTemplate=function(t,n){return e.Lang.sub(t,{type:' type="'+n+'"'})},r.prototype={ICON_TEMPLATE:"",TEMPLATE:"",initializer:function(){this.before(this.renderButtonExtUI,this,"renderUI"),this.after(this.syncButtonExtUI,this,"syncUI"),this.after({iconChange:this._afterIconChange,iconAlignChange:this._afterIconAlignChange})},renderButtonExtUI:function(){var e=this.get("cssClass");this.get("discardDefaultButtonCssClasses")||(e=[e,n.BUTTON_DEFAULT,n.BUTTON].join(" "),this.set("cssClass",e))},syncButtonExtUI:function(){this._uiSetIcon(this.get("icon")),this._setButtonRole()},_afterIconAlignChange:function(e){this._uiSetIconAlign(e.newVal)},_afterIconChange:function(e){this._uiSetIcon(e.newVal)},_domTypeValidator:function(e){return e.toLowerCase()==="button"||e.toLowerCase()==="submit"},_setButtonRole:function(){this.get("boundingBox").setAttribute("role","button")},_setEarlyButtonDomType:function(t){this.BOUNDING_TEMPLATE=e.ButtonExt.getTypedButtonTemplate(r.prototype.TEMPLATE,t)},_uiSetIcon:function(e){e&&(this.get("iconElement").set("className",e),this._uiSetIconAlign(this.get("iconAlign")))},_uiSetIconAlign:function(t){var n=this.getNode().one(e.ButtonExt.HTML_PARSER.iconElement);n||(n=this.get("iconElement")),e.Button.syncIconUI(this.get("boundingBox"),n,t)}},e.ButtonExt=r,e.ButtonCore.CLASS_NAMES=n;var i=e.Button;i.NAME="aui-button",i.CSS_PREFIX="aui-button",i.CLASS_NAMES=n,e.Button=e.Base.create(i.NAME,i,[r,e.WidgetCssClass,e.WidgetToggle],{},{getWidgetLazyConstructorFromNodeData:function(e){var t=e.getData("widgetConstructor")||{};return t.boundingBox=e,t.render=!0,t},hasWidgetLazyConstructorData:function(e){return e.getData("widgetConstructor")!==undefined},setWidgetLazyConstructorNodeData:function(e,t){e.setData("widgetConstructor",t)},syncIconUI:function(t,n,r){var i=0,s=e.config.doc.createTextNode(" ");r==="right"&&(i=null),t.insert(s,i),t.insert(n,i)}});var s=e.ToggleButton;s.NAME="togglebtn",s.CSS_PREFIX=n.TOGGLE,s.CLASS_NAMES=n,e.ToggleButton=e.Base.create(s.NAME,s,[r,e.WidgetCssClass],{},{});var o=e.ButtonGroup;o.NAME="btngroup",o.CSS_PREFIX=n.BUTTON_GROUP,o.CLASS_NAMES=n,e.mix(o.prototype,{CONTENT_TEMPLATE:null,initializer:function(){this.after("selectionChange",this._afterSelectionChange)},renderUI:function(){var t=this.get("boundingBox"),n=this.get("type");this.getButtons().each(function(t){!t.button&&!e.instanceOf(e.Widget.getByNode(t),e.Button)&&(t.addClass(e.ButtonCore.CLASS_NAMES.BUTTON_DEFAULT),t.setAttribute("role","option"),e.Button.hasWidgetLazyConstructorData(t)?(new e.Button(e.Button.getWidgetLazyConstructorFromNodeData(t)),e.Button.setWidgetLazyConstructorNodeData(t,null)):t.plug(e.Plugin.Button))}),t.setAttrs({"aria-multiselectable":n==="checkbox"?!0:!1,role:"listbox"}),this.syncAriaSelected(this.getButtons())},item:function(t){var n,r;return r=this.getButtons().item(t),n=e.Widget.getByNode(r),e.instanceOf(n,i)?n:r},select:function(e){return this.toggleSelect(e,!0)},syncAriaSelected:function(t){var n;t.each(function(t){n=t.hasClass(e.ButtonGroup.CLASS_NAMES.SELECTED),t.setAttribute("aria-selected",n)})},toggleSelect:function(t,n){var r=this.getButtons(),i=this,s=this.get("type");e.Lang.isUndefined(t)&&(t=r.getDOMNodes()),e.Lang.isArray(t)||(t=e.Array(t)),e.Array.each(t,function(t){e.Lang.isNumber(t)&&(t=r.item(t)),t=e.one(t);if(s==="checkbox")if(t.hasClass(e.ButtonGroup.CLASS_NAMES.SELECTED)){if(n===!0)return}else if(n===!1)return;i._handleClick({target:t})})},unselect:function(e){return this.toggleSelect(e,!1)},_afterSelectionChange:function(){this.syncAriaSelected(this.getButtons())}},!0)},"3.0.3-deprecated.62",{requires:["button","button-group","button-plugin","aui-component","aui-widget-cssclass","aui-widget-toggle"],skinnable:!0}); YUI.add("aui-toolbar",function(e,t){var n=e.Lang.isFunction,r=e.getClassName("btn"),i=e.getClassName("btn","default"),s=e.getClassName("btn","group"),o=e.getClassName("btn","group","checkbox"),u=e.getClassName("btn","group","radio"),a=e.getClassName("btn","group","vertical"),f=e.getClassName("btn","toolbar","button");e.Toolbar=e.Component.create({NAME:"btn-toolbar",ATTRS:{children:{validator:e.Lang.isArray},toolbarRenderer:{valueFn:function(){return new e.ToolbarRenderer}}},UI_ATTRS:["children"],isSupportedWidget:function(t){return e.instanceOf(t,e.Button)||e.instanceOf(t,e.ToggleButton)||e.instanceOf(t,e.ButtonGroup)},prototype:{CONTENT_TEMPLATE:null,TEMPLATES:{button:'',icon:'',group:'
'},bindUI:function(){var e=this.get("boundingBox");e.delegate(["click","mousemove","focus"],this._onUserInitInteraction,"."+f+", ."+r,this)},add:function(t,n){var r=this.get("boundingBox"),i=this.get("toolbarRenderer");r.insert(i.render(e.Array(t)),n)},clear:function(){var e=this.get("boundingBox");e.get("children").remove()},getEnclosingWidget:function(t){return e.instanceOf(t,e.EventFacade)&&(t=t.domEvent?t.domEvent.target:t.target),e.Widget.getByNode(t)},item:function(t){var n=this.get("boundingBox").get("children").item(t),r;return this._initEnclosingWidgetIfNeeded(n),r=this.getEnclosingWidget(n),e.Toolbar.isSupportedWidget(r)?r:n},remove:function(e){var t=this.get("boundingBox");return t.get("children").item(e).remove()},_initEnclosingWidgetIfNeeded:function(t,n){var i,l,c,h,p,d;if(!t||t.getData("enclosingWidgetInitialized"))return;t.setData("enclosingWidgetInitialized",!0),l=e.Widget.getByNode(t),c=e.instanceOf(l,e.Button),h=e.instanceOf(l,e.ButtonGroup);if(c||h)return;i=t.ancestor("."+f+", ."+r,!0),i&&(e.Button.hasWidgetLazyConstructorData(t)?(new e.Button(e.Button.getWidgetLazyConstructorFromNodeData(t)),e.Button.setWidgetLazyConstructorNodeData(t,null)):t.plug(e.Plugin.Button)),p=t.ancestor("."+s+", "+a,!0),p&&(p.hasClass(o)?d="checkbox":p.hasClass(u)&&(d="radio"),d&&new e.ButtonGroup({boundingBox:p,type:d,render:!0})),n&&n.type==="focus"&&t.focus()},_onUserInitInteraction:function(e){var t=e.currentTarget;this._initEnclosingWidgetIfNeeded(t,e)},_uiSetChildren:function(e){if(!e)return;this.clear(),this.add(e)}}});var l=function(){};l.prototype={TEMPLATES:{button:e.Button.prototype.TEMPLATE,group:'',icon:''},RENDERER:{button:function(t){var n,s,o,u,a,l=t.value;a=l.domType||"button";if(e.instanceOf(l,e.Button)||e.instanceOf(l,e.ToggleButton))return l.get("boundingBox");if(e.UA.mobile&&e.UA.touchEnabled)return n=(new e.Button(l)).render(),l.title&&n.get("boundingBox").setAttribute("title",l.title),n.get("boundingBox");s=e.one(l.boundingBox||l.srcNode);if(s)try{s.setAttribute("type",a)}catch(c){}else s=e.Node.create(e.ButtonExt.getTypedButtonTemplate(this.TEMPLATES.button,a));return o=[f,l.cssClass],l.discardDefaultButtonCssClasses||o.push(r,i),s.addClass(o.join(" ")),l.id&&s.setAttribute("id",l.id),l.labelHTML&&s.append(l.labelHTML),l.label&&s.append(l.label),l.icon&&(u=e.Lang.sub(this.TEMPLATES.icon,{cssClass:l.icon}),e.Button.syncIconUI(s,u,l.iconAlign)),l.title&&s.setAttribute("title",l.title),e.Button.setWidgetLazyConstructorNodeData(s,l),s},group:function(t){var n,r=this,i=t.value,f,l=t.groupType,c=t.orientation,h=[];return e.instanceOf(i,e.ButtonGroup)?i.get("boundingBox"):(l==="checkbox"?h.push(o):l==="radio"&&h.push(u),c==="vertical"?h.push(a):h.push(s),f=e.Node.create(e.Lang.sub(r.TEMPLATES.group,{cssClass:h.join(" ")})),e.Array.each(i,function(t,s){n=r.renderNode(t),f.appendChild(n),e.Toolbar.isSupportedWidget(t)||e.Button.setWidgetLazyConstructorNodeData(n,i[s])}),f)}},render:function(t){var n,r=this;if(!t)return;return n=e.one(e.config.doc).invoke("createDocumentFragment"),e.Array.each(t,function(e){n.appendChild(r.renderNode(e))}),n},renderNode:function(t){var r,i;if(e.Toolbar.isSupportedWidget(t))return t.render().get("boundingBox");r=this._getChildRenderHints(t),i=this.RENDERER[r.renderer];if(n(i))return i.call(this,r)},_getChildRenderHints:function(t){var n=null,r="normal",i;return e.instanceOf(t,e.Button)?i="button":e.instanceOf(t,e.ButtonGroup)?i="group":e.Lang.isArray(t)?(i="group",n=e.Lang.isString(t[0])?t.shift():null,r=e.Lang.isString(t[0])?t.shift():"normal"):i="button",{groupType:n,orientation:r,renderer:i,value:t}}},e.ToolbarRenderer=l},"3.0.3-deprecated.62",{requires:["arraylist","arraylist-add","aui-component","aui-button-core"]}); YUI.add("aui-widget-toolbars",function(e,t){var n=e.WidgetStdMod,r=function(){};r.ATTRS={toolbars:{},toolbarPosition:{value:{body:n.AFTER,footer:n.AFTER,header:n.BEFORE}},toolbarCssClass:{value:{body:"",footer:"",header:""}}},r.prototype={toolbars:null,initializer:function(){var t=this;t.toolbars={},e.after(t._syncUIToolbars,t,"syncUI"),t.after("toolbarsChange",t._afterToolbarsChange)},addToolbar:function(t,n){var r=this;return n=r.getToolbarSection(n),r.removeToolbar(n),e.instanceOf(t,e.Toolbar)||(t=new e.Toolbar({cssClass:this.get("toolbarCssClass."+n)||"",children:t,render:r.getStdModNode(n,!0)})),t.addTarget(r),r.toolbars[n]=t,r.setStdModContent(n,t.get("boundingBox"),r.get("toolbarPosition."+n)),r._syncPrimaryButtonUI(),t},getToolbar:function(e){var t=this;return t.toolbars[t.getToolbarSection(e)]},getToolbarSection:function(e){return e||n.FOOTER},removeToolbar:function(e){var t=this,n=t.toolbars[t.getToolbarSection(e)];return n&&n.destroy(),n},_syncPrimaryButtonUI:function(){var t=this,n=t.get("boundingBox").one("."+e.ButtonCore.CLASS_NAMES.PRIMARY);n&&n.focus().focus()},_syncUIToolbars:function(){var e=this;e._uiSetToolbars(this.get("toolbars"))},_uiSetToolbars:function(t){var n=this;e.each(t,e.bind(n.addToolbar,n))}},e.WidgetToolbars=r},"3.0.3-deprecated.62",{requires:["widget-stdmod","aui-toolbar"]}); YUI.add("event-flick",function(e,t){var n=e.Event._GESTURE_MAP,r={start:n.start,end:n.end,move:n.move},i="start",s="end",o="move",u="ownerDocument",a="minVelocity",f="minDistance",l="preventDefault",c="_fs",h="_fsh",p="_feh",d="_fmh",v="nodeType";e.Event.define("flick",{on:function(e,t,n){var s=e.on(r[i],this._onStart,this,e,t,n);t[h]=s},detach:function(e,t,n){var r=t[h],i=t[p];r&&(r.detach(),t[h]=null),i&&(i.detach(),t[p]=null)},processArgs:function(t){var n=t.length>3?e.merge(t.splice(3,1)[0]):{};return a in n||(n[a]=this.MIN_VELOCITY),f in n||(n[f]=this.MIN_DISTANCE),l in n||(n[l]=this.PREVENT_DEFAULT),n},_onStart:function(t,n,i,a){var f=!0,l,h,m,g=i._extra.preventDefault,y=t;t.touches&&(f=t.touches.length===1,t=t.touches[0]),f&&(g&&(!g.call||g(t))&&y.preventDefault(),t.flick={time:(new Date).getTime()},i[c]=t,l=i[p],m=n.get(v)===9?n:n.get(u),l||(l=m.on(r[s],e.bind(this._onEnd,this),null,n,i,a),i[p]=l),i[d]=m.once(r[o],e.bind(this._onMove,this),null,n,i,a))},_onMove:function(e,t,n,r){var i=n[c];i&&i.flick&&(i.flick.time=(new Date).getTime())},_onEnd:function(e,t,n,r){var i=(new Date).getTime(),s=n[c],o=!!s,u=e,h,p,v,m,g,y,b,w,E=n[d];E&&(E.detach(),delete n[d]),o&&(e.changedTouches&&(e.changedTouches.length===1&&e.touches.length===0?u=e.changedTouches[0]:o=!1),o&&(m=n._extra,v=m[l],v&&(!v.call||v(e))&&e.preventDefault(),h=s.flick.time,i=(new Date).getTime(),p=i-h,g=[u.pageX-s.pageX,u.pageY-s.pageY],m.axis?w=m.axis:w=Math.abs(g[0])>=Math.abs(g[1])?"x":"y",y=g[w==="x"?0:1],b=p!==0?y/p:0,isFinite(b)&&Math.abs(y)>=m[f]&&Math.abs(b)>=m[a]&&(e.type="flick",e.flick={time:p,distance:y,velocity:b,axis:w,start:s},r.fire(e)),n[c]=null))},MIN_VELOCITY:0,MIN_DISTANCE:0,PREVENT_DEFAULT:!1})},"patched-v3.18.1",{requires:["node-base","event-touch","event-synthetic"]}); YUI.add("event-valuechange",function(e,t){var n="_valuechange",r="value",i="nodeName",s,o={POLL_INTERVAL:50,TIMEOUT:1e4,_poll:function(t,r){var i=t._node,s=r.e,u=t._data&&t._data[n],a=0,f,l,c,h,p,d;if(!i||!u){o._stopPolling(t);return}l=u.prevVal,h=u.nodeName,u.isEditable?c=i.innerHTML:h==="input"||h==="textarea"?c=i.value:h==="select"&&(p=i.options[i.selectedIndex],c=p.value||p.text),c!==l&&(u.prevVal=c,f={_event:s,currentTarget:s&&s.currentTarget||t,newVal:c,prevVal:l,target:s&&s.target||t},e.Object.some(u.notifiers,function(e){var t=e.handle.evt,n;a!==1?e.fire(f):t.el===d&&e.fire(f),n=t&&t._facade?t._facade.stopped:0,n>a&&(a=n,a===1&&(d=t.el));if(a===2)return!0}),o._refreshTimeout(t))},_refreshTimeout:function(e,t){if(!e._node)return;var r=e.getData(n);o._stopTimeout(e),r.timeout=setTimeout(function(){o._stopPolling(e,t)},o.TIMEOUT)},_startPolling:function(t,s,u){var a,f;if(!t.test("input,textarea,select")&&!(f=o._isEditable(t)))return;a=t.getData(n),a||(a={nodeName:t.get(i).toLowerCase(),isEditable:f,prevVal:f?t.getDOMNode().innerHTML:t.get(r)},t.setData(n,a)),a.notifiers||(a.notifiers={});if(a.interval){if(!u.force){a.notifiers[e.stamp(s)]=s;return}o._stopPolling(t,s)}a.notifiers[e.stamp(s)]=s,a.interval=setInterval(function(){o._poll(t,u)},o.POLL_INTERVAL),o._refreshTimeout(t,s)},_stopPolling:function(t,r){if(!t._node)return;var i=t.getData(n)||{};clearInterval(i.interval),delete i.interval,o._stopTimeout(t),r?i.notifiers&&delete i.notifiers[e.stamp(r)]:i.notifiers={}},_stopTimeout:function(e){var t=e.getData(n)||{};clearTimeout(t.timeout),delete t.timeout},_isEditable:function(e){var t=e._node;return t.contentEditable==="true"||t.contentEditable===""},_onBlur:function(e,t){o._stopPolling(e.currentTarget,t)},_onFocus:function(e,t){var s=e.currentTarget,u=s.getData(n);u||(u={isEditable:o._isEditable(s),nodeName:s.get(i).toLowerCase()},s.setData(n,u)),u.prevVal=u.isEditable?s.getDOMNode().innerHTML:s.get(r),o._startPolling(s,t,{e:e})},_onKeyDown:function(e,t){o._startPolling(e.currentTarget,t,{e:e})},_onKeyUp:function(e,t){(e.charCode===229||e.charCode===197)&&o._startPolling(e.currentTarget,t,{e:e,force:!0})},_onMouseDown:function(e,t){o._startPolling(e.currentTarget,t,{e:e})},_onSubscribe:function(t,s,u,a){var f,l,c,h,p;l={blur:o._onBlur,focus:o._onFocus,keydown:o._onKeyDown,keyup:o._onKeyUp,mousedown:o._onMouseDown},f=u._valuechange={};if(a)f.delegated=!0,f.getNodes=function(){return h=t.all("input,textarea,select").filter(a),p=t.all('[contenteditable="true"],[contenteditable=""]').filter(a),h.concat(p)},f.getNodes().each(function(e){e.getData(n)||e.setData(n,{nodeName:e.get(i).toLowerCase(),isEditable:o._isEditable(e),prevVal:c?e.getDOMNode().innerHTML:e.get(r)})}),u._handles=e.delegate(l,t,a,null,u);else{c=o._isEditable(t);if(!t.test("input,textarea,select")&&!c)return;t.getData(n)||t.setData(n,{nodeName:t.get(i).toLowerCase(),isEditable:c,prevVal:c?t.getDOMNode().innerHTML:t.get(r)}),u._handles=t.on(l,null,null,u)}},_onUnsubscribe:function(e,t,n){var r=n._valuechange;n._handles&&n._handles.detach(),r.delegated?r.getNodes().each(function(e){o._stopPolling(e,n)}):o._stopPolling(e,n)}};s={detach:o._onUnsubscribe,on:o._onSubscribe,delegate:o._onSubscribe,detachDelegate:o._onUnsubscribe,publishConfig:{emitFacade:!0}},e.Event.define("valuechange",s),e.Event.define("valueChange",s),e.ValueChange=o},"patched-v3.18.1",{requires:["event-focus","event-synthetic"]}); YUI.add("event-tap",function(e,t){function a(t,n){n=n||e.Object.values(u),e.Array.each(n,function(e){var n=t[e];n&&(n.detach(),t[e]=null)})}var n=e.config.doc,r=e.Event._GESTURE_MAP,i=r.start,s="tap",o=/pointer/i,u={START:"Y_TAP_ON_START_HANDLE",END:"Y_TAP_ON_END_HANDLE",CANCEL:"Y_TAP_ON_CANCEL_HANDLE"};e.Event.define(s,{publishConfig:{preventedFn:function(e){var t=e.target.once("click",function(e){e.preventDefault()});setTimeout(function(){t.detach()},100)}},processArgs:function(e,t){if(!t){var n=e[3];return e.splice(3,1),n}},on:function(e,t,n){t[u.START]=e.on(i,this._start,this,e,t,n)},detach:function(e,t,n){a(t)},delegate:function(t,n,r,s){n[u.START]=e.delegate(i,function(e){this._start(e,t,n,r,!0)},t,s,this)},detachDelegate:function(e,t,n){a(t)},_start:function(e,t,n,i,s){var a={canceled:!1,eventType:e.type},f=n.preventMouse||!1;if(e.button&&e.button===3)return;if(e.touches&&e.touches.length!==1)return;a.node=s?e.currentTarget:t,e.touches?a.startXY=[e.touches[0].pageX,e.touches[0].pageY]:a.startXY=[e.pageX,e.pageY],e.touches?(n[u.END]=t.once("touchend",this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once("touchcancel",this.detach,this,t,n,i,s,a),n.preventMouse=!0):a.eventType.indexOf("mouse")!==-1&&!f?(n[u.END]=t.once("mouseup",this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once("mousecancel",this.detach,this,t,n,i,s,a)):a.eventType.indexOf("mouse")!==-1&&f?n.preventMouse=!1:o.test(a.eventType)&&(n[u.END]=t.once(r.end,this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once(r.cancel,this.detach,this,t,n,i,s,a))},_end:function(e,t,n,r,i,o){var f=o.startXY,l,c,h=15;n._extra&&n._extra.sensitivity>=0&&(h=n._extra.sensitivity),e.changedTouches?(l=[e.changedTouches[0].pageX,e.changedTouches[0].pageY],c=[e.changedTouches[0].clientX,e.changedTouches[0].clientY]):(l=[e.pageX,e.pageY],c=[e.clientX,e.clientY]),Math.abs(l[0]-f[0])<=h&&Math.abs(l[1]-f[1])<=h&&(e.type=s,e.pageX=l[0],e.pageY=l[1],e.clientX=c[0],e.clientY=c[1],e.currentTarget=o.node,r.fire(e)),a(n,[u.END,u.CANCEL])}})},"patched-v3.18.1",{requires:["node-base","event-base","event-touch","event-synthetic"]}); YUI.add("dd-ddm",function(e,t){e.mix(e.DD.DDM,{_pg:null,_debugShim:!1,_activateTargets:function(){},_deactivateTargets:function(){},_startDrag:function(){this.activeDrag&&this.activeDrag.get("useShim")&&(this._shimming=!0,this._pg_activate(),this._activateTargets())},_endDrag:function(){e.later(0,this,this._pg_deactivate),this._deactivateTargets()},_pg_deactivate:function(){this._pg.setStyle("display","none")},_pg_activate:function(){this._pg||this._createPG();var e=this.activeDrag.get("activeHandle"),t="auto";e&&(t=e.getStyle("cursor")),t==="auto"&&(t=this.get("dragCursor")),this._pg_size(),this._pg.setStyles({top:0,left:0,display:"block",opacity:this._debugShim?".5":"0",cursor:t})},_pg_size:function(){if(this.activeDrag){var t=e.one("body"),n=t.get("docHeight"),r=t.get("docWidth");this._pg.setStyles({height:n+"px",width:r+"px"})}},_createPG:function(){var t=e.Node.create(""),n=e.one("body"),r;t.setStyles({top:"0",left:"0",position:"absolute",zIndex:"99999",overflow:"hidden",backgroundColor:"red",display:"none",height:"5px",width:"5px"}),t.set("id",e.stamp(t)),t.addClass(e.DD.DDM.CSS_PREFIX+"-shim"),n.prepend(t),this._pg=t,this._pg.on("mousemove",e.throttle(e.bind(this._move,this),this.get("throttleTime"))),this._pg.on("mouseup",e.bind(this._end,this)),r=e.one("win"),e.on("window:resize",e.bind(this._pg_size,this)),r.on("scroll",e.bind(this._pg_size,this))}},!0)},"patched-v3.18.1",{requires:["dd-ddm-base","event-resize"]}); YUI.add("dd-ddm-drop",function(e,t){e.mix(e.DD.DDM,{_noShim:!1,_activeShims:[],_hasActiveShim:function(){return this._noShim?!0:this._activeShims.length},_addActiveShim:function(e){this._activeShims.push(e)},_removeActiveShim:function(t){var n=[];e.Array.each(this._activeShims,function(e){e._yuid!==t._yuid&&n.push(e)}),this._activeShims=n},syncActiveShims:function(t){e.later(0,this,function(t){var n=t?this.targets:this._lookup();e.Array.each(n,function(e){e.sizeShim.call(e)},this)},t)},mode:0,POINT:0,INTERSECT:1,STRICT:2,useHash:!0,activeDrop:null,validDrops:[],otherDrops:{},targets:[],_addValid:function(e){return this.validDrops.push(e),this},_removeValid:function(t){var n=[];return e.Array.each(this.validDrops,function(e){e!==t&&n.push(e)}),this.validDrops=n,this},isOverTarget:function(e){if(this.activeDrag&&e){var t=this.activeDrag.mouseXY,n,r=this.activeDrag.get("dragMode"),i,s=e.shim;if(t&&this.activeDrag){i=this.activeDrag.region;if(r===this.STRICT)return this.activeDrag.get("dragNode").inRegion(e.region,!0,i);if(e&&e.shim)return r===this.INTERSECT&&this._noShim?(n=i||this.activeDrag.get("node"),e.get("node").intersect(n,e.region).inRegion):(this._noShim&&(s=e.get("node")),s.intersect({top:t[1],bottom:t[1],left:t[0],right:t[0]},e.region).inRegion)}}return!1},clearCache:function(){this.validDrops=[],this.otherDrops={},this._activeShims=[]},_activateTargets:function(){this._noShim=!0,this.clearCache(),e.Array.each(this.targets,function(e){e._activateShim([]),e.get("noShim")===!0&&(this._noShim=!1)},this),this._handleTargetOver()},getBestMatch:function(t,n){var r=null,i=0,s;return e.Object.each(t,function(e){var t=this.activeDrag.get("dragNode").intersect(e.get("node"));e.region.area=t.area,t.inRegion&&t.area>i&&(i=t.area,r=e)},this),n?(s=[],e.Object.each(t,function(e){e!==r&&s.push(e)},this),[r,s]):r},_deactivateTargets:function(){var t=[],n,r=this.activeDrag,i=this.activeDrop;r&&i&&this.otherDrops[i]?(r.get("dragMode")?(n=this.getBestMatch(this.otherDrops,!0),i=n[0],t=n[1]):(t=this.otherDrops,delete t[i]),r.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),i&&(i.fire("drop:hit",{drag:r,drop:i,others:t}),r.fire("drag:drophit",{drag:r,drop:i,others:t}))):r&&r.get("dragging")&&(r.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),r.fire("drag:dropmiss",{pageX:r.lastXY[0],pageY:r.lastXY[1]})),this.activeDrop=null,e.Array.each(this.targets,function(e){e._deactivateShim([])},this)},_dropMove:function(){this._hasActiveShim()?this._handleTargetOver():e.Object.each(this.otherDrops,function(e){e._handleOut.apply(e,[])})},_lookup:function(){if(!this.useHash||this._noShim)return this.validDrops;var t=[];return e.Array.each(this.validDrops,function(e){e.shim&&e.shim.inViewportRegion(!1,e.region)&&t.push(e)}),t},_handleTargetOver:function(){var t=this._lookup();e.Array.each(t,function(e){e._handleTargetOver.call(e)},this)},_regTarget:function(e){this.targets.push(e)},_unregTarget:function(t){var n=[],r;e.Array.each(this.targets,function(e){e!==t&&n.push(e)},this),this.targets=n,r=[],e.Array.each(this.validDrops,function(e){e!==t&&r.push(e)}),this.validDrops=r},getDrop:function(t){var n=!1,r=e.one(t);return r instanceof e.Node&&e.Array.each(this.targets,function(e){r.compareTo(e.get("node"))&&(n=e)}),n}},!0)},"patched-v3.18.1",{requires:["dd-ddm"]}); YUI.add("dd-drop",function(e,t){var n="node",r=e.DD.DDM,i="offsetHeight",s="offsetWidth",o="drop:over",u="drop:enter",a="drop:exit",f=function(){this._lazyAddAttrs=!1,f.superclass.constructor.apply(this,arguments),e.on("domready",e.bind(function(){e.later(100,this,this._createShim)},this)),r._regTarget(this)};f.NAME="drop",f.ATTRS={node:{setter:function(t){var n=e.one(t);return n||e.error("DD.Drop: Invalid Node Given: "+t),n}},groups:{value:["default"],getter:function(){return this._groups?e.Object.keys(this._groups):(this._groups={},[])},setter:function(t){return this._groups=e.Array.hash(t),t}},padding:{value:"0",setter:function(e){return r.cssSizestoObject(e)}},lock:{value:!1,setter:function(e){return e?this.get(n).addClass(r.CSS_PREFIX+"-drop-locked"):this.get(n).removeClass(r.CSS_PREFIX+"-drop-locked"),e}},bubbles:{setter:function(e){return this.addTarget(e),e}},useShim:{value:!0,setter:function(t){return e.DD.DDM._noShim=!t,t}}},e.extend(f,e.Base,{_bubbleTargets:e.DD.DDM,addToGroup:function(e){return this._groups[e]=!0,this},removeFromGroup:function(e){return delete this._groups[e],this},_createEvents:function(){var t=[o,u,a,"drop:hit"];e.Array.each(t,function(e){this.publish(e,{type:e,emitFacade:!0,preventable:!1,bubbles:!0,queuable:!1,prefix:"drop"})},this)},_valid:null,_groups:null,shim:null,region:null,overTarget:null,inGroup:function(t){this._valid=!1;var n=!1;return e.Array.each(t,function(e){this._groups[e]&&(n=!0,this._valid=!0)},this),n},initializer:function(){e.later(100,this,this._createEvents);var t=this.get(n),i;t.get("id")||(i=e.stamp(t),t.set("id",i)),t.addClass(r.CSS_PREFIX+"-drop"),this.set("groups",this.get("groups"))},destructor:function(){r._unregTarget(this),this.shim&&this.shim!==this.get(n)&&(this.shim.detachAll(),this.shim.remove(),this.shim=null),this.get(n).removeClass(r.CSS_PREFIX+"-drop"),this.detachAll()},_deactivateShim:function(){if(!this.shim)return!1;this.get(n).removeClass(r.CSS_PREFIX+"-drop-active-valid"),this.get(n).removeClass(r.CSS_PREFIX+"-drop-active-invalid"),this.get(n).removeClass(r.CSS_PREFIX+"-drop-over"),this.get("useShim")&&this.shim.setStyles({top:"-999px",left:"-999px",zIndex:"1"}),this.overTarget=!1},_activateShim:function(){if(!r.activeDrag)return!1;if(this.get(n)===r.activeDrag.get(n))return!1;if(this.get("lock"))return!1;var e=this.get(n);this.inGroup(r.activeDrag.get("groups"))?(e.removeClass(r.CSS_PREFIX+"-drop-active-invalid"),e.addClass(r.CSS_PREFIX+"-drop-active-valid"),r._addValid(this),this.overTarget=!1,this.get("useShim")||(this.shim=this.get(n)),this.sizeShim()):(r._removeValid(this),e.removeClass(r.CSS_PREFIX+"-drop-active-valid"),e.addClass(r.CSS_PREFIX+"-drop-active-invalid"))},sizeShim:function(){if(!r.activeDrag)return!1;if(this.get(n)===r.activeDrag.get(n))return!1;if(this.get("lock"))return!1;if(!this.shim)return e.later(100,this,this.sizeShim),!1;var t=this.get(n),o=t.get(i),u=t.get(s),a=t.getXY(),f=this.get("padding"),l,c,h;u=u+f.left+f.right,o=o+f.top+f.bottom,a[0]=a[0]-f.left,a[1]=a[1]-f.top,r.activeDrag.get("dragMode")===r.INTERSECT&&(l=r.activeDrag,c=l.get(n).get(i),h=l.get(n).get(s),o+=c,u+=h,a[0]=a[0]-(h-l.deltaXY[0]),a[1]=a[1]-(c-l.deltaXY[1])),this.get("useShim")&&this.shim.setStyles({height:o+"px",width:u+"px",top:a[1]+"px",left:a[0]+"px"}),this.region={0:a[0],1:a[1],area:0,top:a[1],right:a[0]+u,bottom:a[1]+o,left:a[0]}},_createShim:function(){if(!r._pg){e.later(10,this,this._createShim);return}if(this.shim)return;var t=this.get("node");this.get("useShim")&&(t=e.Node.create(''),t.setStyles({height:this.get(n).get(i)+"px",width:this.get(n).get(s)+"px",backgroundColor:"yellow",opacity:".5",zIndex:"1",overflow:"hidden",top:"-900px",left:"-900px",position:"absolute"}),r._pg.appendChild(t),t.on("mouseover",e.bind(this._handleOverEvent,this)),t.on("mouseout",e.bind(this._handleOutEvent,this))),this.shim=t},_handleTargetOver:function(){r.isOverTarget(this)?(this.get(n).addClass(r.CSS_PREFIX+"-drop-over"),r.activeDrop=this,r.otherDrops[this]=this,this.overTarget?(r.activeDrag.fire("drag:over",{drop:this,drag:r.activeDrag}),this.fire(o,{drop:this,drag:r.activeDrag})):r.activeDrag.get("dragging")&&(this.overTarget=!0,this.fire(u,{drop:this,drag:r.activeDrag}),r.activeDrag.fire("drag:enter",{drop:this,drag:r.activeDrag}),r.activeDrag.get(n).addClass(r.CSS_PREFIX+"-drag-over"))):this._handleOut()},_handleOverEvent:function(){this.shim.setStyle("zIndex","999"),r._addActiveShim(this)},_handleOutEvent:function(){this.shim.setStyle("zIndex","1"),r._removeActiveShim(this)},_handleOut:function(e){(!r.isOverTarget(this)||e)&&this.overTarget&&(this.overTarget=!1,e||r._removeActiveShim(this),r.activeDrag&&(this.get(n).removeClass(r.CSS_PREFIX+"-drop-over"),r.activeDrag.get(n).removeClass(r.CSS_PREFIX+"-drag-over"),this.fire(a,{drop:this,drag:r.activeDrag}),r.activeDrag.fire("drag:exit",{drop:this,drag:r.activeDrag}),delete r.otherDrops[this]))}}),e.DD.Drop=f},"patched-v3.18.1",{requires:["dd-drag","dd-ddm-drop"]}); YUI.add("dd-drop-plugin",function(e,t){var n=function(e){e.node=e.host,n.superclass.constructor.apply(this,arguments)};n.NAME="dd-drop-plugin",n.NS="drop",e.extend(n,e.DD.Drop),e.namespace("Plugin"),e.Plugin.Drop=n},"patched-v3.18.1",{requires:["dd-drop"]}); YUI.add("dd-delegate",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="container",i="nodes",s=e.Node.create("