card-mod-defaults 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,173 @@
1
+ // jquery-ui.min.js
2
+ /*! jQuery UI - v1.12.1 - 2016-09-14
3
+ * http://jqueryui.com
4
+ * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+ !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(f.inline?f.dpDiv.parent()[0]:f.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){for(var s in t.extend(e,i),i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{(s=t._data(n,"events"))&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0],l=h+"-"+(e=e.split(".")[1]);return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?void(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(r[e]=s)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n&&a.widgetEventPrefix||e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a))!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(s=e.split(".")).shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),e===(i=o.offsetWidth)&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:!s&&!n?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(0>(i=t.left+d+p+f+e.collisionWidth-r-o)||a(c)>i)&&(t.left+=d+p+f):u>0&&(((s=t.left-e.collisionPosition.marginLeft+d+p+f-h)>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];0>c?(0>(s=t.top+d+p+f+e.collisionHeight-r-o)||a(c)>s)&&(t.top+=d+p+f):u>0&&(((i=t.top-e.collisionPosition.marginTop+d+p+f-h)>0||u>a(i))&&(t.top+=d+p+f))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return 1>6*(i=(i+1)%1)?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(f(c,n instanceof l?function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}:function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?((n=l(c(d)))[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&((o=r.exec(n))&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)"string"==typeof n[i=n[s]]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){return{el:t(this),start:e(this)}}),(o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})})(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(n[1])||0,right:"auto"===n[2]?i:parseFloat(n[2]),bottom:"auto"===n[3]?s:parseFloat(n[3]),left:parseFloat(n[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),!1===t.uiBackCompat||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):!1===a?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,
7
+ height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&((n={opacity:1})[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),(n={})[m]=o;d>v;v++)(s={})[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&((s={opacity:0})[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o="show"===e.mode,a=e.direction||"left",r="up"===a||"down"===a?"top":"left",h="up"===a||"left"===a?"-=":"+=",l="+="===h?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===r?"outerHeight":"outerWidth"](!0)/2,c[r]=h+s,o&&(n.css(c),c[r]=l+s,c.opacity=1),n.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){v.push(this),v.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(v).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f="show"===e.mode,g=p.show().css("visibility","hidden").offset(),m=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),v=[];for(o=0;u>o;o++)for(h=g.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=g.left+a*m,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*m,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,height:_,left:r+(f?l*m:0),top:h+(f?c*_:0),opacity:f?0:1}).animate({left:r+(f?0:l*m),top:h+(f?0:c*_),opacity:f?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,u=t.effects.createPlaceholder(s),d=s.cssClip(),p={clip:t.extend({},d)},f={clip:t.extend({},d)},g=[d[l[0]],d[l[1]]],m=s.queue().length;h&&(r=parseInt(h[1],10)/100*g[a?0:1]),p.clip[l[0]]=r,f.clip[l[0]]=r,f.clip[l[1]]=0,o&&(s.cssClip(f.clip),u&&u.css(t.effects.clipToBox(f)),f.clip=d),s.queue(function(i){u&&u.animate(t.effects.clipToBox(p),c,e.easing).animate(t.effects.clipToBox(f),c,e.easing),i()}).animate(p,c,e.easing).animate(f,c,e.easing).queue(i),t.effects.unshift(s,m,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a=o||"hide"===n,r=2*(e.times||5)+(a?1:0),h=e.duration/r,l=0,c=1,u=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),l=1);r>c;c++)s.animate({opacity:l},h,e.easing),l=1-l;s.animate({opacity:l},h,e.easing),s.queue(i),t.effects.unshift(s,u,r+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(o=(n=i.parentNode).name,!(!i.href||!o||"map"!==n.nodeName.toLowerCase())&&((a=t("img[usemap='#"+o+"']")).length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled)&&((h=t(i).closest("fieldset")[0])&&(r=!h.disabled)):r="a"===l&&i.href||s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(s=this.attr("id"))&&(o=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c={oldHeader:o,oldPanel:o.next(),newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||!1===this._trigger("beforeActivate",e,c)||(n.active=!h&&this.headers.index(a),this.active=r?t():a,this._toggle(c),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o=this,a=this.options.icons.submenu,r=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=r.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);o._addClass(s,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=r.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=t(this);o._isDivider(e)&&o._addClass(e,"ui-menu-divider","ui-widget-content")}),n=(s=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(s,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return 0>(i=t(this)).offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),
8
+ this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),void((s=i.item.attr("aria-label")||n.value)&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion))))},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var f,g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?((o=e.element.find(n)).each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o||n[s]("instance")),i.push(h[0])}}))):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this).data("ui-controlgroup-data");i&&i[e]&&i[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+t.ui.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(this).form().length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e)):void this.refresh()):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?void this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}}),t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;n="div"===(s=e.nodeName.toLowerCase())||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(o=this._newInst(t(e),n)).settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),("focus"===(s=this._get(i,"showOn"))||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(d=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),f===n&&(f=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&((s=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&((s=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&((n={})[i]=s),void(l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return(n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv))[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),(i=t.datepicker._get(o,"onSelect"))?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(n){}return!0},_showDatepicker:function(e){var s,n,o,r,h,l,c;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e)||(s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(o=(n=t.datepicker._get(s,"beforeShow"))?n.apply(e,[e,s]):{})&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return!(r|="fixed"===t(this).css("position"))}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s)))},_updateDatepicker:function(e){this.maxRows=4,f=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},
9
+ _hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,(o=this._get(a,"onClose"))&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((o=this._getInst(a[0])).selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),(s=this._get(o,"onSelect"))?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?""+i:i+""))return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{"+("y"===t?s:1)+","+s+"}"),o=i.substring(h).match(n);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":g=(r=new Date(w("@"))).getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":g=(r=new Date((w("!")-this._ticksTo1970)/1e4)).getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;!((o=this._getDaysInMonth(g,m-1))>=_);)m++,_-=o;if((r=this._daylightSavingAdjust(new Date(g,m-1,_))).getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=null==i||""===i?s:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)}(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return(o=o&&"Invalid Date"==""+o?s:o)&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)0>--Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M=(w+c)%7]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X&&this.maxRows>z?this.maxRows:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(tt,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],L=(F=A.getMonth()!==Z)&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}++Z>11&&(Z=0,tt++),x+=T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+"</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var m=!1;t(document).on("mouseup",function(){m=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!m){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(s&&!n&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),m=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,m=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),void((s=(i=t(n.containment))[0])&&(e=/(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),(e?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,(e?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))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY
10
+ ;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(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]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),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",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=(h=s.snapElements[d].left-s.margins.left)+s.snapElements[d].width,u=(c=s.snapElements[d].top-s.margins.top)+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0||(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)n="ui-resizable-"+(e=t.trim(s[i])),o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(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(""),e.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.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(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:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(n=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,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:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{
11
+ click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((s=o.is(":data(ui-draggable)"))&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((n=o.is(":data(ui-resizable)"))&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),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&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&_(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var _=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&_(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=_(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n})).length&&((s=t(o[0]).droppable("instance")).greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return!1===t?void this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));(n>i||n===i&&(e===l._lastChangedValue||l.values(e)===c.min))&&(n=i,o=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),r=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()}
12
+ ;return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&(!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=!this._animateOff&&r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=(h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())*100,c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),!0===h.options.range&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==r&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=(s=this.items[i]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!!(s&&n)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(n=(o=t(l[s],this.document[0])).length-1;n>=0;n--)(a=t.data(o[n],this.widgetFullName))&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=(n=t(d[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],s=0,l=(r=u[i][0]).length;l>s;s++)(h=t(r[s])).data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,s,n,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,a=(c=d.floating||this._isFloating(this.currentItem))?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,
13
+ i.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return i=t-(e=null!==s.min?s.min:0),t=e+(i=Math.round(i/s.step)*s.step),t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i))):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),void this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void r(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=!!this.tabs.length&&0)),!1!==e&&(-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0)),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s!==this.options.active&&s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?void this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(a=(n=s.hash).substring(1),o=e.element.find(e._sanitizeSelector(n))):(n="#"+(a=h.attr("aria-controls")||t({}).uniqueId()[0].id),(o=e.element.find(n)).length||(o=e._createPanel(a)).insertAfter(e.panels[i-1]||e.tablist),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),!0===e||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget).closest("li"),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():this._getPanelForTab(n),h=s.length?this._getPanelForTab(s):t(),l={oldTab:s,oldPanel:h,newTab:a?t():n,newPanel:r};e.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||!1===this._trigger("beforeActivate",e,l)||(i.active=!a&&this.tabs.index(n),this.active=o?t():n,this.xhr&&this.xhr.abort(),h.length||r.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(n),e),this._toggle(e,l))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),(s=t.trim(s.join(" ")))?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):void((i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}))&&this._open(e,t,i))},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(s);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),(h=t("<div>").html(a.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void n.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
14
+ // jquery.ui.autocomplete.html.js
15
+ /*
16
+ * jQuery UI Autocomplete HTML Extension
17
+ *
18
+ * Copyright 2010, Scott González (http://scottgonzalez.com)
19
+ * Dual licensed under the MIT or GPL Version 2 licenses.
20
+ *
21
+ * http://github.com/scottgonzalez/jquery-ui-extensions
22
+ */
23
+ !function(t){function e(e,i){var o=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(e){return o.test(t("<div>").html(e.label||e.value||e).text())})}var i=t.ui.autocomplete.prototype,o=i._initSource;t.extend(i,{_initSource:function(){this.options.html&&t.isArray(this.options.source)?this.source=function(t,i){i(e(this.options.source,t.term))}:o.call(this)},_renderItem:function(e,i){return t("<li></li>").data("item.autocomplete",i).append(t("<a></a>")[this.options.html?"html":"text"](i.label)).appendTo(e)}})}(jQuery);
24
+ // jquery.autosize.js
25
+ /*!
26
+ Autosize 1.18.13
27
+ license: MIT
28
+ http://www.jacklmoore.com/autosize
29
+ */
30
+ !function(e){var t,o={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},i=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],n=e('<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>').data("autosize",!0)[0];n.style.lineHeight="99px","99px"===e(n).css("lineHeight")&&i.push("lineHeight"),n.style.lineHeight="",e.fn.autosize=function(s){return this.length?(s=e.extend({},o,s||{}),n.parentNode!==document.body&&e(document.body).append(n),this.each(function(){function o(){var t,o=!!window.getComputedStyle&&window.getComputedStyle(u,null);o?(0!==(t=u.getBoundingClientRect().width)&&"number"==typeof t||(t=parseInt(o.width,10)),e.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(e,i){t-=parseInt(o[i],10)})):t=p.width(),n.style.width=Math.max(t,0)+"px"}function a(){var a={};if(t=u,n.className=s.className,n.id=s.id,d=parseInt(p.css("maxHeight"),10),e.each(i,function(e,t){a[t]=p.css(t)}),e(n).css(a).attr("wrap",p.attr("wrap")),o(),window.chrome){var r=u.style.width;u.style.width="0px";u.offsetWidth;u.style.width=r}}function r(){var e,i;t!==u?a():o(),!u.value&&s.placeholder?n.value=p.attr("placeholder")||"":n.value=u.value,n.value+=s.append||"",n.style.overflowY=u.style.overflowY,i=parseInt(u.style.height,10),n.scrollTop=0,n.scrollTop=9e4,e=n.scrollTop,d&&e>d?(u.style.overflowY="scroll",e=d):(u.style.overflowY="hidden",e<c&&(e=c)),i!==(e+=w)&&(u.style.height=e+"px",f&&s.callback.call(u,u),p.trigger("autosize.resized"))}function l(){clearTimeout(h),h=setTimeout(function(){var e=p.width();e!==g&&(g=e,r())},parseInt(s.resizeDelay,10))}var d,c,h,u=this,p=e(u),w=0,f=e.isFunction(s.callback),z={height:u.style.height,overflow:u.style.overflow,overflowY:u.style.overflowY,wordWrap:u.style.wordWrap,resize:u.style.resize},g=p.width(),y=p.css("resize");p.data("autosize")||(p.data("autosize",!0),"border-box"!==p.css("box-sizing")&&"border-box"!==p.css("-moz-box-sizing")&&"border-box"!==p.css("-webkit-box-sizing")||(w=p.outerHeight()-p.height()),c=Math.max(parseInt(p.css("minHeight"),10)-w||0,p.height()),p.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),"vertical"===y?p.css("resize","none"):"both"===y&&p.css("resize","horizontal"),"onpropertychange"in u?"oninput"in u?p.on("input.autosize keyup.autosize",r):p.on("propertychange.autosize",function(){"value"===event.propertyName&&r()}):p.on("input.autosize",r),!1!==s.resizeDelay&&e(window).on("resize.autosize",l),p.on("autosize.resize",r),p.on("autosize.resizeIncludeStyle",function(){t=null,r()}),p.on("autosize.destroy",function(){t=null,clearTimeout(h),e(window).off("resize",l),p.off("autosize").off(".autosize").css(z).removeData("autosize")}),r())})):this}}(jQuery||$);
31
+ // jquery.fileupload.js
32
+ /*
33
+ * jQuery File Upload Plugin
34
+ * https://github.com/blueimp/jQuery-File-Upload
35
+ *
36
+ * Copyright 2010, Sebastian Tschan
37
+ * https://blueimp.net
38
+ *
39
+ * Licensed under the MIT license:
40
+ * https://opensource.org/licenses/MIT
41
+ */
42
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(e){"use strict";function t(t){var i="dragover"===t;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&-1!==e.inArray("Files",r.types)&&!1!==this._trigger(t,e.Event(t,{delegatedEvent:n}))&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}var i;e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||e('<input type="file"/>').prop("disabled")),e.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:undefined,fileInput:undefined,replaceFileInput:!0,paramName:undefined,singleFileUploads:!0,limitMultiFileUploads:undefined,limitMultiFileUploadSize:undefined,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:undefined,forceIframeTransport:!1,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:!0,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:undefined,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,i){return t=this.messages[t]||t.toString(),i&&e.each(i,function(e,i){t=t.replace("{"+e+"}",i)}),t},formData:function(e){return e.serializeArray()},add:function(t,i){if(t.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&e(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_promisePipe:(i=e.fn.jquery.split("."),Number(i[0])>1||Number(i[1])>7?"then":"pipe"),_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,i){var n=e-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(t-this.loaded)*(1e3/n)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var i;return"function"===e.type(t.formData)?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(i=[],e.each(t.formData,function(e,t){i.push({name:e,value:t})}),i):[]},_getTotal:function(t){var i=0;return e.each(t,function(e,t){i+=t.size||1}),i},_initProgressObject:function(t){var i={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,i):t._progress=i},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)Object.prototype.hasOwnProperty.call(e._response,t)&&delete e._response[t];else e._response={}},_onProgress:function(t,i){if(t.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time<i.progressInterval&&t.loaded!==t.total)return;i._time=r,n=Math.floor(t.loaded/t.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(r,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(r,n,i.bitrateInterval),this._trigger("progress",e.Event("progress",{delegatedEvent:t}),i),this._trigger("progressall",e.Event("progressall",{delegatedEvent:t}),this._progress)}},_initProgressListener:function(t){var i=this,n=t.xhr?t.xhr():e.ajaxSettings.xhr();n.upload&&(e(n.upload).on("progress",function(e){var n=e.originalEvent;e.lengthComputable=n.lengthComputable,e.loaded=n.loaded,e.total=n.total,i._onProgress(e,t)}),t.xhr=function(){return n})},_deinitProgressListener:function(t){var i=t.xhr?t.xhr():e.ajaxSettings.xhr();i.upload&&e(i.upload).off("progress")},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_getUniqueFilename:function(e,t){return t[e=String(e)]?(e=e.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/,function(e,t,i){return" ("+(t?Number(t)+1:1)+")"+(i||"")}),this._getUniqueFilename(e,t)):(t[e]=!0,e)},_initXHRData:function(t){var i,n=this,r=t.files[0],s=t.multipart||!e.support.xhrFileUpload,o="array"===e.type(t.paramName)?t.paramName[0]:t.paramName;t.headers=e.extend({},t.headers),t.contentRange&&(t.headers["Content-Range"]=t.contentRange),s&&!t.blob&&this._isInstanceOf("File",r)||(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(r.uploadName||r.name)+'"'),s?e.support.xhrFormDataFileUpload&&(t.postMessage?(i=this._getFormData(t),t.blob?i.push({name:o,value:t.blob}):e.each(t.files,function(n,r){i.push({name:"array"===e.type(t.paramName)&&t.paramName[n]||o,value:r})})):(n._isInstanceOf("FormData",t.formData)?i=t.formData:(i=new FormData,e.each(this._getFormData(t),function(e,t){i.append(t.name,t.value)})),t.blob?i.append(o,t.blob,r.uploadName||r.name):e.each(t.files,function(r,s){if(n._isInstanceOf("File",s)||n._isInstanceOf("Blob",s)){var a=s.uploadName||s.name;t.uniqueFilenames&&(a=n._getUniqueFilename(a,t.uniqueFilenames)),i.append("array"===e.type(t.paramName)&&t.paramName[r]||o,s,a)}})),t.data=i):(t.contentType=r.type||"application/octet-stream",t.data=t.blob||r),t.blob=null},_initIframeSettings:function(t){var i=e("<a></a>").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&i&&i!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var i=e(t.fileInput),n=t.paramName;return n?e.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var t=e(this),i=t.prop("name")||"files[]",r=(t.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var i=e.extend({},this.options,t);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,i,n){var r=e.Deferred(),s=r.promise();return i=i||this.options.context||s,!0===t?r.resolveWith(i,n):!1===t&&r.rejectWith(i,n),s.abort=r.promise,this._enhancePromise(s)},_addConvenienceMethods:function(t,i){var n=this,r=function(t){return e.Deferred().resolveWith(n,t).promise()};i.process=function(t,s){return(t||s)&&(i._processQueue=this._processQueue=(this._processQueue||r([this]))[n._promisePipe](function(){return i.errorThrown?e.Deferred().rejectWith(n,[i]).promise():r(arguments)})[n._promisePipe](t,s)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",e.Event("submit",{delegatedEvent:t}),this)&&n._onSend(t,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),i=t&&t.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(t,i){t.uploadedBytes=t.uploadedBytes||0;var n,r,s=this,o=t.files[0],a=o.size,l=t.uploadedBytes,p=t.maxChunkSize||a,u=this._blobSlice,d=e.Deferred(),f=d.promise();return!(!(this._isXHRUpload(t)&&u&&(l||("function"===e.type(p)?p(t):p)<a))||t.data)&&(!!i||(l>=a?(o.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",o.error])):(r=function(){var i=e.extend({},t),f=i._progress.loaded;i.blob=u.call(o,l,l+("function"===e.type(p)?p(i):p),o.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,s._trigger("chunkbeforesend",null,i),s._initXHRData(i),s._initProgressListener(i),n=(!1!==s._trigger("chunksend",null,i)&&e.ajax(i)||s._getXHRPromise(!1,i.context)).done(function(n,o,p){l=s._getUploadedBytes(p)||l+i.chunkSize,f+i.chunkSize-i._progress.loaded&&s._onProgress(e.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),t.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=o,i.jqXHR=p,s._trigger("chunkdone",null,i),s._trigger("chunkalways",null,i),l<a?r():d.resolveWith(i.context,[n,o,p])}).fail(function(e,t,n){i.jqXHR=e,i.textStatus=t,i.errorThrown=n,s._trigger("chunkfail",null,i),s._trigger("chunkalways",null,i),d.rejectWith(i.context,[e,t,n])}).always(function(){s._deinitProgressListener(i)})},this._enhancePromise(f),f.abort=function(){return n.abort()},r(),f)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,i,n,r){var s=r._progress.total,o=r._response;r._progress.loaded<s&&this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:s,total:s}),r),o.result=r.result=t,o.textStatus=r.textStatus=i,o.jqXHR=r.jqXHR=n,this._trigger("done",null,r)},_onFail:function(e,t,i,n){var r=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),r.jqXHR=n.jqXHR=e,r.textStatus=n.textStatus=t,r.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(e,t,i,n){this._trigger("always",null,n)},_onSend:function(t,i){i.submit||this._addConvenienceMethods(t,i);var n,r,s,o,a=this,l=a._getAJAXSettings(i),p=function(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,n=n||((r||!1===a._trigger("send",e.Event("send",{delegatedEvent:t}),l))&&a._getXHRPromise(!1,l.context,r)||a._chunkedUpload(l)||e.ajax(l)).done(function(e,t,i){a._onDone(e,t,i,l)}).fail(function(e,t,i){a._onFail(e,t,i,l)}).always(function(e,t,i){if(a._deinitProgressListener(l),a._onAlways(e,t,i,l),a._sending-=1,a._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var n=a._slots.shift();n;){if("pending"===a._getDeferredState(n)){n.resolve();break}n=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(t,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(s=e.Deferred(),this._slots.push(s),o=s[a._promisePipe](p)):(this._sequence=this._sequence[a._promisePipe](p,p),o=this._sequence),o.abort=function(){return r=[undefined,"abort","abort"],n?n.abort():(s&&s.rejectWith(l.context,r),p())},this._enhancePromise(o)):p()},_onAdd:function(t,i){var n,r,s,o,a=this,l=!0,p=e.extend({},this.options,i),u=i.files,d=u.length,f=p.limitMultiFileUploads,h=p.limitMultiFileUploadSize,c=p.limitMultiFileUploadSizeOverhead,g=0,_=this._getParamName(p),m=0;if(!d)return!1;if(h&&u[0].size===undefined&&(h=undefined),(p.singleFileUploads||f||h)&&this._isXHRUpload(p))if(p.singleFileUploads||h||!f)if(!p.singleFileUploads&&h)for(s=[],n=[],o=0;o<d;o+=1)g+=u[o].size+c,(o+1===d||g+u[o+1].size+c>h||f&&o+1-m>=f)&&(s.push(u.slice(m,o+1)),(r=_.slice(m,o+1)).length||(r=_),n.push(r),m=o+1,g=0);else n=_;else for(s=[],n=[],o=0;o<d;o+=f)s.push(u.slice(o,o+f)),(r=_.slice(o,o+f)).length||(r=_),n.push(r);else s=[u],n=[_];return i.originalFiles=u,e.each(s||u,function(r,o){var p=e.extend({},i);return p.files=s?o:[o],p.paramName=n[r],a._initResponseObject(p),a._initProgressObject(p),a._addConvenienceMethods(t,p),l=a._trigger("add",e.Event("add",{delegatedEvent:t}),p)}),l},_replaceFileInput:function(t){var i=t.fileInput,n=i.clone(!0),r=i.is(document.activeElement);t.fileInputClone=n,e("<form></form>").append(n)[0].reset(),i.after(n).detach(),r&&n.trigger("focus"),e.cleanData(i.off("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===i[0]?n[0]:t}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,i){var n,r=this,s=e.Deferred(),o=[],a=function(e){e&&!e.entry&&(e.entry=t),s.resolve([e])},l=function(e){r._handleFileTreeEntries(e,i+t.name+"/").done(function(e){s.resolve(e)}).fail(a)},p=function(){n.readEntries(function(e){e.length?(o=o.concat(e),p()):l(o)},a)};return i=i||"",t.isFile?t._file?(t._file.relativePath=i,s.resolve(t._file)):t.file(function(e){e.relativePath=i,s.resolve(e)},a):t.isDirectory?(n=t.createReader(),p()):s.resolve([]),s.promise()},_handleFileTreeEntries:function(t,i){var n=this;return e.when.apply(e,e.map(t,function(e){return n._handleFileTreeEntry(e,i)}))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){var i=(t=t||{}).items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(e.map(i,function(e){var t;return e.webkitGetAsEntry?((t=e.webkitGetAsEntry())&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){var i,n,r=(t=e(t)).prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if((i=e.makeArray(t.prop("files"))).length)i[0].name===undefined&&i[0].fileName&&e.each(i,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(n=t.prop("value")))return e.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return e.Deferred().resolve(i).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var i=this,n={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",e.Event("change",{delegatedEvent:t}),n)&&i._onAdd(t,n)})},_onPaste:function(t){var i=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(e.each(i,function(e,t){var i=t.getAsFile&&t.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",e.Event("paste",{delegatedEvent:t}),n)&&this._onAdd(t,n))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var i=this,n=t.dataTransfer,r={};n&&n.files&&n.files.length&&(t.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,!1!==i._trigger("drop",e.Event("drop",{delegatedEvent:t}),r)&&i._onAdd(t,r)}))},_onDragOver:t("dragover"),_onDragEnter:t("dragenter"),_onDragLeave:t("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(t,i){var n=-1!==e.inArray(t,this._specialOptions);n&&this._destroyEventHandlers(),this._super(t,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;t.fileInput===undefined?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),i=t.pop();return t.shift(),new RegExp(t.join("/"),i)},_isRegExpOption:function(t,i){return"url"!==t&&"string"===e.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var t=this,i=this.options,n=this.element.data();e.each(this.element[0].attributes,function(e,r){var s,o=r.name.toLowerCase();/^data-/.test(o)&&(o=o.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),s=n[o],t._isRegExpOption(o,s)&&(s=t._getRegExp(s)),i[o]=s)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,n,r=this,s=e.Deferred(),o=s.promise();return o.abort=function(){return n=!0,i?i.abort():(s.reject(null,"abort","abort"),o)},this._getFileInputFiles(t.fileInput).always(function(e){n||(e.length?(t.files=e,(i=r._onSend(null,t)).then(function(e,t,i){s.resolve(e,t,i)},function(e,t,i){s.reject(e,t,i)})):s.reject())}),this._enhancePromise(o)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})});
43
+ // jquery.iframe-transport.js
44
+ /*
45
+ * jQuery Iframe Transport Plugin
46
+ * https://github.com/blueimp/jQuery-File-Upload
47
+ *
48
+ * Copyright 2011, Sebastian Tschan
49
+ * https://blueimp.net
50
+ *
51
+ * Licensed under the MIT license:
52
+ * https://opensource.org/licenses/MIT
53
+ */
54
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery)}(function(e){"use strict";var t=0,r=e,n="parseJSON";"JSON"in window&&"parse"in JSON&&(r=JSON,n="parse"),e.ajaxTransport("iframe",function(r){if(r.async){var n,a,o,i=r.initialIframeSrc||"javascript:false;";return{send:function(p,f){(n=e('<form style="display:none;"></form>')).attr("accept-charset",r.formAcceptCharset),o=/\?/.test(r.url)?"&":"?","DELETE"===r.type?(r.url=r.url+o+"_method=DELETE",r.type="POST"):"PUT"===r.type?(r.url=r.url+o+"_method=PUT",r.type="POST"):"PATCH"===r.type&&(r.url=r.url+o+"_method=PATCH",r.type="POST"),a=e('<iframe src="'+i+'" name="iframe-transport-'+(t+=1)+'"></iframe>').on("load",function(){var t,o=e.isArray(r.paramName)?r.paramName:[r.paramName];a.off("load").on("load",function(){var t;try{if(!(t=a.contents()).length||!t[0].firstChild)throw new Error}catch(r){t=undefined}f(200,"success",{iframe:t}),e('<iframe src="'+i+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",a.prop("name")).prop("action",r.url).prop("method",r.type),r.formData&&e.each(r.formData,function(t,r){e('<input type="hidden"/>').prop("name",r.name).val(r.value).appendTo(n)}),r.fileInput&&r.fileInput.length&&"POST"===r.type&&(t=r.fileInput.clone(),r.fileInput.after(function(e){return t[e]}),r.paramName&&r.fileInput.each(function(t){e(this).prop("name",o[t]||r.paramName)}),n.append(r.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),r.fileInput.removeAttr("form")),window.setTimeout(function(){n.submit(),t&&t.length&&r.fileInput.each(function(r,n){var a=e(t[r]);e(n).prop("name",a.prop("name")).attr("form",a.attr("form")),a.replaceWith(n)})},0)}),n.append(a).appendTo(document.body)},abort:function(){a&&a.off("load").prop("src",i),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&r[n](e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var r=t&&t[0];return r&&e.isXMLDoc(r)?r:e.parseXML(r.XMLDocument&&r.XMLDocument.xml||e(r.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})});
55
+
56
+ // decko.js.coffee
57
+ (function(){window.decko={rootUrl:"",path:function(n){return n.match(/^\/|:\/\//)?n:decko.rootUrl+n},editors:{init:{},content:{},add:function(n,o,t){return decko.editors.init[n]=o,decko.editors.content[n]=t}},warn:function(n){if("undefined"!=typeof console&&null!==console)return console.log(n)},snakeCase:function(n){return n.replace(/([a-z])([A-Z])/g,function(n){return n[0]+"_"+n[1].toLowerCase()})}},$(window).ready(function(){return $("body").on("click","._confirm",function(){return confirm($(this).data("confirm-msg")||"Are you sure?")})})}).call(this);
58
+ // decko_jquery.js.coffee
59
+ (function(){jQuery.fn.extend({findCard:function(n){return this.find("[data-card-id='"+n+"']")},isMain:function(){return this.slot().parent("#main")[0]},cardMark:function(){return this.data("cardId")?"~"+this.data("cardId"):this.data("cardName")},isMainOrMainModal:function(){var n;return(n=$(this)).closest(".modal")[0]&&(n=n.slotOrigin("modal")),n&&n.isMain()},notify:function(n,i){var a,t,d;return(t=(d=this.slot(i)).find(".card-notice"))[0]||(t=$('<div class="card-notice"></div>'),(a=d.find(".card-form"))[0]?$(a[0]).append(t):d.append(t)),t.html(n),t.show("blind")}})}).call(this);
60
+ // slot.js.coffee
61
+ (function(){var t,o,s;decko.slot={path:function(t,s,e){var l;return l=o(s),null!=e&&(l.slotter_mode=e),decko.path(t)+(t.match(/\?/)?"&":"?")+$.param(l)},ready:function(t){return $("document").ready(function(){return $("body").on("decko.slot.ready",".card-slot",function(o,s){return o.stopPropagation(),null!=s?t.call(this,$(this),$(s)):t.call(this,$(this))})})},destroy:function(t){return $("document").ready(function(){return $("body").on("decko.slot.destroy",".card-slot, ._modal-slot",function(o){return o.stopPropagation(),t.call(this,$(this))})})}},jQuery.fn.extend({isSlot:function(){return $(this).hasClass("card-slot")},triggerSlotReady:function(t){return this.isSlot()&&this.trigger("decko.slot.ready",t),this.find(".card-slot").trigger("decko.slot.ready",t)},slot:function(t,o){return null==t&&(t="success"),null==o&&(o="replace"),"modal"===o?this.modalSlot():this._slotSelect("slot-"+t+"-selector")||this._slotSelect("slot-selector")||this.closest(".card-slot")},slotUrl:function(){var t;return t=$(this),decko.slot.path(t.cardMark()+"/"+t.data("slot").view)},slotFind:function(t){switch(t){case"modal-origin":return this.slotOrigin("modal");case"overlay-origin":return this.slotOrigin("overlay");default:return s(this.closest(t),this.closest(".card-slot"),t)}},slotClear:function(){return this.trigger("decko.slot.destroy"),this.empty()},slotOrigin:function(t){var o,s;return s=this.closest("[data-"+t+"-origin-slot-id]").data(t+"-origin-slot-id"),(o=$("[data-slot-id="+s+"]")).length>0?o:decko.warn("couldn't find origin with slot id "+s)},slotReload:function(t){return this.each(function(){return $(this)._slotReloadSingle(t)})},startLoading:function(){},stopLoading:function(){},slotUpdate:function(t,o){return o||(o="replace"),this.slotContent(t,o,$(this))},slotContent:function(t,o,s){var e;return"string"==typeof(e=$(t).length>0&&$(t)||t)?this.slot("success",o)._slotFillOrReplace(e,s):(e.hasClass("_overlay")?o="overlay":e.hasClass("_modal")&&(o="modal"),this.slot("success",o)._slotContentFromElement(e,o,s)),e},_slotContentFromElement:function(t,o,s){var e;return"overlay"===o?this.addOverlay(t,s):t.hasClass("_modal-slot")||"modal"===o?t.showAsModal(s):((e=this.data("slot-id"))&&t.attr("data-slot-id",e),this.trigger("decko.slot.destroy"),this._slotFillOrReplace(t,s),decko.contentLoaded(t,s))},_slotFillOrReplace:function(t,o){return this.hasClass("_fixed-slot")?this.html(t):this.replaceWith(t),decko.contentLoaded(this,o)},_slotSelect:function(t){var o,s;if(o=this.data(t))return(s=this.slotFind(o))&&s[0]&&s},_slotReloadSingle:function(t){var o;return o=$(this),null==t&&(t=o.slotUrl()),o.addClass("slotter"),o.data("url",t),o.data("remote",!0),o.attr("href",t),this[0].href=t,$.rails.handleRemote(o),o.startLoading()}}),o=function(o){var s,e,l;return e={},null!=(s=$("#main").children(".card-slot").data("cardName"))&&(e.main=s),o&&(o.isMain()&&(e.is_main=!0),null!=(l=o.data("slot"))&&(t(l,e,"slot"),l.type&&(e.type=l.type))),e},t=function(o,s,e){return $.each(o,function(o,l){var n;return n=e+"["+decko.snakeCase(o)+"]","items"===o?t(l,s,n):s[n]=l})},s=function(t,o,s){for(;0===t.length&&o.length>0;)t=$(o).find(s),o=$(o).parent().closest(".card-slot");return 0===t.length?$(s):t}}).call(this);
62
+ // slotter.js.coffee
63
+ (function(){$(window).ready(function(){return $("body").on("ajax:send",".slotter",function(){var t;return(t=$(this).slot()).hideErrorResponse(),t.startLoading()}),$("body").on("ajax:success",".slotter",function(t,o){return $(this).slotterSuccess(t,o)}),$("body").on("ajax:error",".slotter",function(t,o){return $(this).showErrorResponse(o.status,o.responseText)}),$("body").on("ajax:complete",".slotter",function(){return $(this).slot().stopLoading()}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("click",'[data-bs-dismiss="overlay"]',function(){return $(this).slotFind(".card-slot._overlay").removeOverlay()}),$("body").on("click","._close-overlay-on-success",function(){return $(this).closeOnSuccess("overlay")}),$("body").on("click","._close-modal-on-success",function(){return $(this).closeOnSuccess("modal")}),$("body").on("click","._close-on-success",function(){return $(this).closeOnSuccess()}),$("body").on("click","._update-origin",function(){return $(this).closest(".slotter").data("slotter-mode","update-origin")}),$("body").on("submit","form.slotter",function(){var t;if((t=$(this)).data("main-success")&&t.isMainOrMainModal())return t.mainSuccess()}),$("body").on("ajax:beforeSend",".slotter",function(t,o,s){return $(this).slotterBeforeSend(s)}),$("body").on("ajax:beforeSend",".card-slot",function(t){return t.stopPropagation()}),$("body").on("ajax:send",".card-slot",function(t){return t.stopPropagation()})}),jQuery.fn.extend({mainSuccess:function(){var t;return t=$(this),$.each(t.data("main-success"),function(o,s){var e,i;return i="[name=success\\["+o+"\\]]",(e=t.find(i))[0]||(e=$('<input type="hidden" name="success['+o+']"/>'),t.append(e)),e.val(s)})},slotterSuccess:function(t,o){var s,e,i;if(this.hasClass("slotter")){if(!t.slotSuccessful)return this.showSuccessResponse(o,this.data("slotter-mode")),this.hasClass("_close-overlay")&&this.removeOverlay(),this.hasClass("_close-modal")&&this.closest(".modal").modal("hide"),this.hasClass("card-paging-link")&&(i=this.slot().offset().top,$("body").scrollTop(i)),this.data("update-foreign-slot")&&(s=this.slotFind(this.data("update-foreign-slot")),e=this.data("update-foreign-slot-url"),s.slotReload(e)),this.data("original-slotter-mode")&&this.attr("data-slotter-mode",this.data("original-slotter-mode")),this.data("original-slot-selector")&&this.attr("data-slot-selector",this.data("original-slot-selector")),t.slotSuccessful=!0}else console.log("warning: slotterSuccess called on non-slotter element "+this)},showSuccessResponse:function(t,o){if(t.redirect)return window.location=t.redirect;if(t.reload)return window.location.reload(!0);switch(o){case"silent-success":break;case"update-modal-origin":return this.updateModalOrigin();case"update-origin":return this.updateOrigin();default:return this.slotUpdate(t,o)}},showErrorResponse:function(t,o){return 403===t?$(o).showAsModal($(this)):900===t?$(o).showAsModal($(this)):(this.notify(o,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):void 0)},hideErrorResponse:function(){return $(this).find(".card-notice").hide()},updateModalOrigin:function(){return this.overlaySlot()?this.slotOrigin("overlay").updateOrigin():this.closest("#modal-container")[0]?this.updateOrigin():void 0},updateOrigin:function(){var t,o;if(null!=(o=this.overlaySlot()?"overlay":this.closest("#modal-container")[0]?"modal":void 0))return(t=this.slotOrigin(o))&&null!=t[0]?t.slotReload():void 0},registerAsOrigin:function(t,o){return o.hasClass("_modal-slot")&&(o=o.find(".modal-body")),o.attr("data-"+t+"-origin-slot-id",this.slot().data("slot-id"))},closeOnSuccess:function(t){var o;return o=this.closest(".slotter"),null==t&&(t=this.isInOverlay()?"overlay":"modal"),o.addClass("_close-"+t)},slotterBeforeSend:function(t){var o;if(o=this.slotterMode(),!t.noSlotParams&&!t.url.match(/home_view/)&&"modal"!==o&&"override"!==o)return t.url=decko.slot.path(t.url,this.slot(),o)},slotterMode:function(){var t;if(null!=(t=this.data("slotter-mode"))&&(!t.match(/origin/)||this.slotOrigin()))return t}})}).call(this);
64
+ // slot_ready.js.coffee
65
+ (function(){decko.slot.ready(function(a){return a.find("card-view-placeholder").each(function(){var a;if(!(a=$(this)).data("loading"))return a.data("loading",!0),$.get(a.data("url"),function(e){return a.replaceWith(e)})}),a.find("._disappear").delay(5e3).animate({height:0},1e3,function(){return $(this).hide()})})}).call(this);
66
+ // clicks_and_hovers.js.coffee
67
+ (function(){var t,o;$(window).ready(function(){return $("body").on("click",".submitter",function(){return $(this).closest("form").submit()}),$("body").on("click","button.redirecter",function(){return window.location=$(this).attr("href")}),$("body").on("click",".render-error-link",function(t){return $(this).closest(".render-error").find(".render-error-message").show(),t.preventDefault()}),$(document).on("click","._stop_propagation",function(t){return t.stopPropagation()}),$("body").on("click","._prevent_default",function(t){return t.preventDefault()}),$("body").on("mouseenter","a[data-hover-text]",function(){var t;return t=$(this).text(),$(this).data("original-text",t),$(this).text($(this).data("hover-text"))}),$("body").on("mouseleave","a[data-hover-text]",function(){return $(this).text($(this).data("original-text"))}),$("body").on("mouseenter","[hover_content]",function(){return $(this).attr("hover_restore",$(this).html()),$(this).html($(this).attr("hover_content"))}),$("body").on("mouseleave","[hover_content]",function(){return $(this).html($(this).attr("hover_restore"))})}),decko.slot.ready(function(t){if(o())return t.find("._show-on-hover").removeClass("_show-on-hover")}),o=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)||t()},t=function(t){return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}}).call(this);
68
+ // pointer_config.js.coffee
69
+ (function(){var t,n;$.extend(decko.editors.content,{"select.pointer-select":function(){return n(this.val())},"select.pointer-multiselect":function(){return n(this.val())},".pointer-radio-list":function(){return n(this.find("input:checked").val())},".pointer-list-ul":function(){return n(this.find("input").map(function(){return $(this).val()}))},".pointer-link-list-ul":function(){return decko.linkListContent(this.find(".input-group"))},"._nest-list-ul":function(){return decko.nestListContent(this.find(".input-group"))},".pointer-checkbox-list":function(){return n(this.find("input:checked").map(function(){return $(this).val()}))},".pointer-select-list":function(){return n(this.find(".pointer-select select").map(function(){return $(this).val()}))},"._filtered-list":function(){return n(this.find("._filtered-list-item").map(function(){return $(this).data("cardName")}))},"._pointer-list":function(){return n(this.find("._pointer-item").map(function(){return $(this).val()}))},"._click-select-editor":function(){return n(this.find("._select-item.selected").map(function(){return $($(this).find("[data-card-name]")[0]).data("cardName")}))},"._click-multiselect-editor":function(){return n(this.find("._select-item.selected").map(function(){return $($(this).find("[data-card-name]")[0]).data("cardName")}))},".perm-editor":function(){return t(this)}}),$.extend(decko.editors.init,{".pointer-list-editor":function(){return this.sortable({handle:".handle",cancel:""}),decko.initPointerList(this.find("input"))},"._filtered-list":function(){return this.sortable({handle:"._handle",cancel:""})}}),$.extend(decko,{initPointerList:function(t){return decko.initAutoCardPlete(t)},pointerContent:function(t){return $.makeArray(t).join("\n")},linkListContent:function(t){var n,i;return i=t.map(function(){var t,n;return n=$(this).find("input._reference").val(),(t=$(this).find("input._title").val()).length>0&&(n+="|"+t),n}),n=$.map($.makeArray(i),function(t){if(t)return"[["+t+"]]"}),$.makeArray(n).join("\n")},nestListContent:function(t){var n,i;return i=t.map(function(){var t,n;return n=$(this).find("input._reference").val(),(t=$(this).find("input._nest-options").val()).length>0&&(n+="|"+t),n}),n=$.map($.makeArray(i),function(t){if(t)return"{{"+t+"}}"}),$.makeArray(n).join("\n")}}),n=function(t){return decko.pointerContent(t)},t=function(t){var i,e;return t.find("#inherit").is(":checked")?"_left":(i=t.find(".perm-group input:checked").map(function(){return $(this).val()}),e=t.find(".perm-indiv input").map(function(){return $(this).val()}),n($.makeArray(i).concat($.makeArray(e))))}}).call(this);
70
+ // pointer_list_editor.js.coffee
71
+ (function(){$(window).ready(function(){return $("body").on("click","._pointer-item-add",function(t){return decko.addPointerItem(this),t.preventDefault()}),$("body").on("keydown",".pointer-item-text",function(t){if("Enter"===t.key)return decko.addPointerItem(this),t.preventDefault()}),$("body").on("keyup",".pointer-item-text",function(){return decko.updateAddItemButton(this)}),$("body").on("click",".pointer-item-delete",function(){var t,e;return(e=(t=$(this).closest("li")).closest("ul")).find(".pointer-li").length>1?t.remove():t.find("input").val(""),decko.updateAddItemButton(e)})}),decko.slot.ready(function(t){return t.find(".pointer-list-editor").each(function(){return decko.updateAddItemButton(this)})}),$.extend(decko,{addPointerItem:function(t){var e,n;return(n=$(t).slot()).trigger("decko.slot.destroy"),(e=decko.nextPointerInput(decko.lastPointerItem(t))).val(""),n.trigger("decko.slot.ready"),decko.initializeEditors(n),e.first().focus(),decko.updateAddItemButton(t),decko.initPointerList(e)},nextPointerInput:function(t){var e,n,o,i,d,r;for(e=!0,n=0,d=(i=t.find("input")).length;n<d;n++)o=i[n],e=e&&""===$(o).val();return e?i:(r=t.clone(),t.after(r),r.attr("data-index",parseInt(t.attr("data-index")+1)),r.trigger("decko.item.added"),r.find("input"))},lastPointerItem:function(t){return $(t).closest(".content-editor").find(".pointer-li:last")},updateAddItemButton:function(t){var e,n;return e=$(t).closest(".content-editor").find("._pointer-item-add"),n=""===decko.lastPointerItem(t).find("input").val(),e.prop("disabled",n)}})}).call(this);
72
+ // autocomplete.js.coffee
73
+ (function(){decko.slot.ready(function(e){return e.find("._autocomplete").each(function(){return decko.initAutoCardPlete($(this))})}),decko.initAutoCardPlete=function(e){var t,n;if(t=e.data("options-card"))return n=t+".json?view=name_match",e.autocomplete({source:decko.slot.path(n)})},decko.select2Autocomplete={init:function(e,t,n){var o;return o=$.extend({},this._defaults(e),t),n&&$.extend(o.ajax,n),e.select2(o)},_defaults:function(e){return{multiple:!1,width:"100%!important",minimumInputLength:0,maximumSelectionSize:1,placeholder:e.attr("placeholder"),escapeMarkup:function(e){return e},ajax:{delay:200,cache:!0,url:decko.path(":search.json"),processResults:function(e){return{results:e}},data:function(e){return{query:{keyword:e.term},view:"complete"}}}}}}}).call(this);
74
+ // search_box.js.coffee
75
+ (function(){$(window).ready(function(){var t,o;return o=$("._search-box"),t=new decko.searchBox(o),o.data("searchBox",t),t.init()}),decko.searchBox=function(){function t(t){this.box=t,this.sourcepath=this.box.data("completepath"),this.originalpath=this.sourcepath,this.config={source:this.sourcepath,select:this.select}}return t.prototype.init=function(){return this.box.autocomplete(this.config,{html:!0})},t.prototype.select=function(t,o){var e;if(e=o.item.url)return window.location=e},t.prototype.form=function(){return this.box.closest("form")},t.prototype.keyword=function(){return this.keywordBox().val()},t.prototype.keywordBox=function(){return this.form().find("#query_keyword")},t}()}).call(this);
76
+ // rules.js.coffee
77
+ (function(){decko.slot.ready(function(t){return t.find("._setting-filter").each(function(){return decko.filterRulesByCategory($(this).closest(".card-slot"),$(this).find("input._setting-category:checked").attr("id"))})}),$.extend(decko,{filterRulesByCategory:function(t,i){return $(t).find("._setting-list ._setting-group").each(function(){var t,n,e;return e=(t=$(this)).find("._rule-item"),n=0,e.each(function(){var t,e;return e=(t=$(this)).parent().is("li")?t.parent():t,t.hasClass("_category-"+i)?e.show():(e.hide(),n+=1)}),n===e.length?t.hide():(t.show(),t.find("._count").html(e.length-n))})}}),$(window).ready(function(){return $("body").on("click",".perm-vals input",function(){return $(this).slot().find("#inherit").attr("checked",!1)}),$("body").on("click",".perm-editor #inherit",function(){var t;return(t=$(this).slot()).find(".perm-group input:checked").attr("checked",!1),t.find(".perm-indiv input").val("")}),$("body").on("click","._rule-submit-button",function(){var t,i;return(t=(i=$(this).closest("form")).find("._set-editor input:checked")).val()?!t.attr("warning")||confirm(t.attr("warning")):(i.find("._set-editor").addClass("warning"),$(this).notify("To what Set does this Rule apply?"),!1)}),$("body").on("click","input._setting-category",function(){var t;return t=$(this).attr("id"),decko.filterRulesByCategory($(this).closest(".card-slot"),t)})})}).call(this);
78
+ // autosave.js.coffee
79
+ (function(){jQuery.fn.extend({autosave:function(){var t,a,e,r,n;if(r=this.slot(),!this.attr("no-autosave")){if((e=this.closest(".form-group"))[0]){if(!(a=e.data("cardId")))return;": "+e.data("cardName")}else a=r.data("cardId"),"";if(a)return n=decko.path("update/~"+a),t=$("#edit_card_"+a).serializeArray().reduce(function(t,a){return t[a.name]=a.value,t},{draft:"true","success[view]":"blank"}),$.ajax(n,{data:t,type:"POST"})}}}),$(window).ready(function(){return $("body").on("change",".autosave .d0-card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)})})}).call(this);
80
+ // board.js.coffee
81
+ (function(){decko.slot.ready(function(e,t){var a;if(e.updateBoard(!1,t),1===(a=e.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(a[0]).click()}),jQuery.fn.extend({updateBoard:function(e,t){if(null==e&&(e=!1),this.closest(".board").length>0)return this.data("breadcrumb")?this.updateBreadcrumb():t&&$(t).data("breadcrumb")&&$(t).updateBreadcrumb(),e?$(".board-pills > .nav-item > .nav-link.active").removeClass("active"):void 0},updateBreadcrumb:function(){var e;return(e=$(".modal-header ._board-breadcrumb li:last-child")).text(this.data("breadcrumb")),e.attr("class","breadcrumb-item active "+this.data("breadcrumb-class"))}}),$(window).ready(function(){return $("body").on("select2:select","._close-rule-overlay-on-select",function(){return $(".overlay-container > ._overlay.card-slot.overlay_rule-view.RULE").removeOverlay()}),$("body").on("click","._update-history-pills",function(){return $(this).closest(".slotter").data("update-foreign-slot",".card-slot.history_tab-view")})})}).call(this);
82
+ // components.js.coffee
83
+ (function(){var t;t=null,$(window).ready(function(){return $("body").on("change","._submit-on-change",function(t){return $(t.target).closest("form").submit(),!1}),$("body").on("input","._submit-after-typing",function(e){return $(e.target).closest("form").slot().find(".autosubmit-success-notification").remove(),t&&clearTimeout(t),t=setTimeout(function(){return $(e.target).closest("form").submit(),t=null},1e3)}),$("body").on("keydown","._submit-after-typing",function(e){if(13===e.which)return t&&clearTimeout(t),t=null,$(e.target).closest("form").submit(),!1}),$("body").on("change","._edit-item",function(t){var e;return(e=$(t.target)).attr("name",e.is(":checked")?"add_item":"drop_item"),$(t.target).closest("form").submit(),!1})})}).call(this);
84
+ // doubleclick.js.coffee
85
+ (function(){var t,n,r,i;$(window).ready(function(){var n;if(n={off:!1,on:!0,signed_in:decko.currentUserId},function(){return n[decko.doubleClick]}())return $("body").on("dblclick","div",function(){return t($(this))&&i($(this)),!1})}),t=function(t){return![".nodblclick",".d0-card-header",".card-editor"].some(function(n){return t.closest(n)[0]})&&null==t.slot().find(".card-editor")[0]},i=function(t){var i,e,d,o;return d=t.slot(),(i=n(d))?i.click():(e=r(d),o=decko.path("~"+d.data("cardId")+"?view="+e),d.slotReload(o))},n=function(t){var n;return!!(n=t.find(".edit-link").filter(function(n,r){return $(r).slot().data("slotId")===t.data("slotId")}))[0]&&$(n[0])},r=function(t){switch(t.data("slot").edit){case"inline":return"edit_inline";case"full":return"board";default:return"edit"}}}).call(this);
86
+ // editor.js.coffee
87
+ (function(){decko.editors.init.textarea=function(){return $(this).autosize()},$.extend(decko,{contentLoaded:function(t,n){var e;return decko.initializeEditors(t),null!=(e=n.attr("notify-success"))&&t.notify(e,"success"),t.triggerSlotReady(n)},initializeEditors:function(t,n){return null==n&&(n=decko.editors.init),$.each(n,function(n,e){return $.each(t.find(n),function(){return e.call($(this))})})}}),jQuery.fn.extend({contentField:function(){return this.closest(".card-editor").find(".d0-card-content")},setContentFieldsFromMap:function(t){var n;return null==t&&(t=decko.editors.content),n=$(this),$.each(t,function(t,e){return n.setContentFields(t,e)})},setContentFields:function(t,n){return $.each(this.find(t),function(){return $(this).setContentField(n)})},setContentField:function(t){var n,e,i;if(e=(n=this.contentField()).val(),i=t.call(this),n.val(i),e!==i)return n.change()}}),$(window).ready(function(){return setTimeout(function(){return decko.initializeEditors($("body > :not(.modal)"))},10),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".d0-card-content").attr("no-autosave","true"),!0})}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4)}).call(this);
88
+ // name_editor.js.coffee
89
+ (function(){var n,e;e=null,$(window).ready(function(){return $("body").on("keyup",".name-editor input",function(a){var t;return e&&clearTimeout(e),t=$(this),13===a.which?(n(t),e=null):e=setTimeout(function(){return n(t),e=null},400)})}),decko.pingName=function(n,e){return $.getJSON(decko.path(""),{format:"json",view:"status","card[name]":n},e)},n=function(n){var e;return e=n.val(),decko.pingName(e,function(a){var t,r,l,u,i,s,o;return n.val()!==e?null:(o=a.status)?(t=n.parent(),(u=(l=n.closest("fieldset").find("legend")).find(".name-messages"))[0]||(u=$('<span class="name-messages"></span>'),l.append(null!=u)),t.removeClass("real-name virtual-name known-name"),s=n.slot().data("cardId"),"unknown"===o||s&&parseInt(s)===a.id?u.html(""):(t.addClass(o+"-name known-name"),i="virtual"===o?"in virtual":"already in",r=decko.path(a.url_key),u.html("\"<a href='"+r+"'>"+e+'</a>" '+i+" use"))):void 0})}}).call(this);
90
+ // tooltip.js.coffee
91
+ (function(){$(function(){var t;return t=document.querySelectorAll('[data-bs-toggle="tooltip"]'),$.map(t,function(t){return new bootstrap.Tooltip(t)})})}).call(this);
92
+ // type_editor.js.coffee
93
+ (function(){var t;$(window).ready(function(){return $("body").on("change","._live-type-field",function(){var a;return a=$(this),t(a),a.data("params",a.closest("form").serialize()),a.data("url",a.attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()})}),t=function(t,a){var e;if(null==a&&(a=null),(e=t.closest(".slotter")).length&&(e.attr("data-slotter-mode")&&(e.attr("data-original-slotter-mode",e.attr("data-slotter-mode")),e.attr("data-slotter-mode",a)),e.attr("data-slot-selector")))return e.attr("data-original-slot-selector",e.attr("data-slot-selector")),e.removeAttr("data-slot-selector")}}).call(this);
94
+ // toggle_visibility.js.coffee
95
+ (function(){$(function(){return $("body").on("click","._toggle-pw-visibility",function(){var i,t;return i=$("._pw-input"),t=$("._pw-text-area"),"password"===i.prop("type")?(i.prop("type","text"),t.find("i").text("visibility")):(i.prop("type","password"),t.find("i").text("visibility_off"))})})}).call(this);
96
+ // upload.js.coffee
97
+ (function(){var e;decko.editors.init[".file-upload"]=function(){return decko.upload_file(this)},$.extend(decko,{upload_file:function(e){var t;return $(e).on("fileuploadsubmit",function(e,t){var r,i,a;return i=(r=$(this)).siblings(".attachment_card_name:first").attr("name"),a=r.siblings("#attachment_type_id").val(),t.formData={"card[type_id]":a,attachment_upload:i}}),t=$(e).closest("form").attr("action").indexOf("update")>-1?"card/update/"+$(e).siblings("#file_card_name").val():"card/create",$(e).fileupload({url:decko.path(t),dataType:"html",done:decko.doneFile,add:decko.chooseFile,progressall:decko.progressallFile})},chooseFile:function(e,t){var r;return t.form.find("button[type=submit]").attr("disabled",!0),r=$(this).closest(".card-editor"),$("#progress").show(),r.append('<input type="hidden" class="extra_upload_param" value="true" name="attachment_upload">'),r.append('<input type="hidden" class="extra_upload_param" value="preview_editor" name="view">'),t.submit(),r.find(".choose-file").hide(),r.find(".extra_upload_param").remove()},progressallFile:function(e,t){var r;return r=parseInt(t.loaded/t.total*100,10),$("#progress .progress-bar").css("width",r+"%")},doneFile:function(e,t){return $(this).closest(".card-editor").find(".chosen-file").replaceWith(t.result),t.form.find("button[type=submit]").attr("disabled",!1)}}),$(window).ready(function(){return $("body").on("click",".cancel-upload",function(){var e;return(e=$(this).closest(".card-editor")).find(".choose-file").show(),e.find(".chosen-file").empty(),e.find(".progress").show(),e.find("#progress .progress-bar").css("width","0%"),e.find("#progress").hide()}),$("body").on("submit","form",function(){return e(this,!0)}),$("body").on("ajax:complete","form",function(){return e(this,!1)})}),e=function(e,t){var r;if((r=$(e).find(".file-upload[type=file]"))[0])return r.prop("disabled",t)}}).call(this);
98
+ // decko_ace_config.js.coffee
99
+ (function(){var e;decko.editors.add(".ace-editor-textarea",function(){return decko.initAce($(this))},function(){return e(this[0])}),$.extend(decko,{setAceConfig:function(e){var t;return t=function(){try{return $.parseJSON(e)}catch(t){return{}}},decko.aceConfig=t()},configAceEditor:function(e,t){var i;return i={showGutter:!0,theme:"ace/theme/github",printMargin:!1,tabSize:2,useSoftTabs:!0,maxLines:30,minLines:10},e.setOptions(i),e.session.setMode("ace/mode/"+t)},initAce:function(e){var t,i,n;(n=e.attr("data-ace-mode"))?(t=$("<div>",{position:"absolute",width:"auto",height:e.height()}).insertBefore(e),e.css("visibility","hidden"),e.css("height","0px"),(i=ace.edit(t[0])).getSession().setValue(e.val()),decko.configAceEditor(i,n),e.data("ace",i)):e.autosize()}}),e=function(e){var t;return t=$(e).siblings(".ace_editor"),ace.edit(t[0]).getSession().getValue()}}).call(this);
100
+ // bar_and_box.js.coffee
101
+ (function(){var a,n;$(function(){return $(document).on("click","._card-link",function(t){var r;return"on"===(r=$(this)).data("skip")?r.data("skip",null):n(t)?window.open(a(r),"_tab_"+Math.floor(1e3*Math.random())):r.closest("._card-link-modal")[0]?r.find("._modal-page-link").trigger("click"):window.location=a(r)}),$("body").on("shown.bs.collapse",".bar > .collapse",function(){var a;return(a=$(this).find("> .d0-card-body > .card-slot-stub")).slotReload(a.data("stubUrl")),a.removeClass("card-slot-stub")})}),n=function(a){return a.metaKey},a=function(a){return decko.path(a.data("cardLinkUrl")||a.data("cardLinkName"))},decko.slot.ready(function(a){return a.find("._card-link a, ._card-link ._card-link-clickable").on("click",function(a){var n;return(n=$(this)).hasClass("_over-card-link")||n.closest("._over-card-link")[0]?n.closest("._card-link").data("skip","on"):a.preventDefault()})})}).call(this);
102
+ // click_select.js.coffee
103
+ (function(){$(window).ready(function(){return $("body").on("click","._click-multiselect-editor ._select-item",function(e){return $(this).closest("._select-item").toggleClass("selected"),e.stopPropagation()}),$("body").on("click","._click-select-editor ._select-item",function(e){return $(this).closest("._click-select-editor").find(".selected").removeClass("selected"),$(this).closest("._select-item").addClass("selected"),e.stopPropagation()})})}).call(this);
104
+ // bootstrap.bundle.js
105
+ /*!
106
+ * Bootstrap v5.1.3 (https://getbootstrap.com/)
107
+ * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
108
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
109
+ */
110
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,function(){"use strict";function t(t,e){return e&&`${e}::${ie++}`||t.uidEvent||ie++}function e(e){const i=t(e);return e.uidEvent=i,ee[i]=ee[i]||{},ee[i]}function i(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&re.off(t,n.type,e),e.apply(t,[n])}}function n(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&re.off(t,s.type,e,i),i.apply(r,[s]);return null}}function s(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function o(t,e,i){const n="string"==typeof e,s=n?i:e;let o=c(t);return oe.has(o)||(o=t),[n,s,o]}function r(r,a,l,c,h){if("string"!=typeof a||!r)return;if(l||(l=c,c=null),se.test(a)){const t=t=>(function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)});c?c=t(c):l=t(l)}const[d,u,f]=o(a,l,c),p=e(r),g=p[f]||(p[f]={}),m=s(g,u,d?l:null);if(m)return void(m.oneOff=m.oneOff&&h);const _=t(u,a.replace(Zt,"")),v=d?n(r,l,c):i(r,l);v.delegationSelector=d?l:null,v.originalHandler=u,v.oneOff=h,v.uidEvent=_,g[_]=v,r.addEventListener(f,v,d)}function a(t,e,i,n,o){const r=s(e[i],n,o);r&&(t.removeEventListener(i,r,Boolean(o)),delete e[i][r.uidEvent])}function l(t,e,i,n){const s=e[i]||{};Object.keys(s).forEach(o=>{if(o.includes(n)){const n=s[o];a(t,e,i,n.originalHandler,n.delegationSelector)}})}function c(t){return t=t.replace(Jt,""),ne[t]||t}function h(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function d(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function u(t){return t?(t.nodeName||"").toLowerCase():null}function f(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function p(t){return t instanceof f(t).Element||t instanceof Element}function g(t){return t instanceof f(t).HTMLElement||t instanceof HTMLElement}function m(t){return"undefined"!=typeof ShadowRoot&&(t instanceof f(t).ShadowRoot||t instanceof ShadowRoot)}function _(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];g(s)&&u(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})}function v(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});g(n)&&u(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}}function b(t){return t.split("-")[0]}function y(t){var e=t.getBoundingClientRect(),i=1,n=1;return{width:e.width/i,height:e.height/n,top:e.top/n,right:e.right/i,bottom:e.bottom/n,left:e.left/i,x:e.left/i,y:e.top/n}}function w(t){var e=y(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function E(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&m(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function A(t){return f(t).getComputedStyle(t)}function T(t){return["table","td","th"].indexOf(u(t))>=0}function O(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function C(t){return"html"===u(t)?t:t.assignedSlot||t.parentNode||(m(t)?t.host:null)||O(t)}function $(t){return g(t)&&"fixed"!==A(t).position?t.offsetParent:null}function k(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&g(t)&&"fixed"===A(t).position)return null;for(var i=C(t);g(i)&&["html","body"].indexOf(u(i))<0;){var n=A(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function L(t){for(var e=f(t),i=$(t);i&&T(i)&&"static"===A(i).position;)i=$(i);return i&&("html"===u(i)||"body"===u(i)&&"static"===A(i).position)?e:i||k(t)||e}function x(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function D(t,e,i){return dn(t,un(e,i))}function S(){return{top:0,right:0,bottom:0,left:0}}function N(t){return Object.assign({},S(),t)}function I(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}function P(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=b(i.placement),l=x(a),c=[zi,Wi].indexOf(a)>=0?"height":"width";if(o&&r){var h=pn(s.padding,i),d=w(o),u="y"===l?Bi:zi,f="y"===l?Ri:Wi,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=L(o),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,y=h[u],E=_-d[c]-h[f],A=_/2-d[c]/2+v,T=D(y,A,E),O=l;i.modifiersData[n]=((e={})[O]=T,e.centerOffset=T-A,e)}}function j(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&E(e.elements.popper,n)&&(e.elements.arrow=n)}function M(t){return t.split("-")[1]}function H(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:fn(fn(e*n)/n)||0,y:fn(fn(i*n)/n)||0}}function B(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=!0===h?H(r):"function"==typeof h?h(r):r,u=d.x,p=void 0===u?0:u,g=d.y,m=void 0===g?0:g,_=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),b=zi,y=Bi,w=window;if(c){var E=L(i),T="clientHeight",C="clientWidth";E===f(i)&&"static"!==A(E=O(i)).position&&"absolute"===a&&(T="scrollHeight",C="scrollWidth"),E=E,s!==Bi&&(s!==zi&&s!==Wi||o!==Vi)||(y=Ri,m-=E[T]-n.height,m*=l?1:-1),s!==zi&&(s!==Bi&&s!==Ri||o!==Vi)||(b=Wi,p-=E[C]-n.width,p*=l?1:-1)}var $,k=Object.assign({position:a},c&&mn);return l?Object.assign({},k,(($={})[y]=v?"0":"",$[b]=_?"0":"",$.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",$)):Object.assign({},k,((e={})[y]=v?m+"px":"",e[b]=_?p+"px":"",e.transform="",e))}function R(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:b(e.placement),variation:M(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,B(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,B(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}function W(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=f(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,vn)}),a&&l.addEventListener("resize",i.update,vn),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,vn)}),a&&l.removeEventListener("resize",i.update,vn)}}function z(t){return t.replace(/left|right|bottom|top/g,function(t){return yn[t]})}function q(t){return t.replace(/start|end/g,function(t){return wn[t]})}function F(t){var e=f(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function U(t){return y(O(t)).left+F(t).scrollLeft}function V(t){var e=f(t),i=O(t),n=e.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,a=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=n.offsetLeft,a=n.offsetTop)),{width:s,height:o,x:r+U(t),y:a}}function K(t){var e,i=O(t),n=F(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=dn(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=dn(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+U(t),l=-n.scrollTop;return"rtl"===A(s||i).direction&&(a+=dn(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function X(t){var e=A(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Y(t){return["html","body","#document"].indexOf(u(t))>=0?t.ownerDocument.body:g(t)&&X(t)?t:Y(C(t))}function Q(t,e){var i;void 0===e&&(e=[]);var n=Y(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=f(n),r=s?[o].concat(o.visualViewport||[],X(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Q(C(r)))}function G(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Z(t){var e=y(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function J(t,e){return e===Xi?G(V(t)):g(e)?Z(e):G(K(O(t)))}function tt(t){var e=Q(C(t)),i=["absolute","fixed"].indexOf(A(t).position)>=0&&g(t)?L(t):t;return p(i)?e.filter(function(t){return p(t)&&E(t,i)&&"body"!==u(t)}):[]}function et(t,e,i){var n="clippingParents"===e?tt(t):[].concat(e),s=[].concat(n,[i]),o=s[0],r=s.reduce(function(e,i){var n=J(t,i);return e.top=dn(n.top,e.top),e.right=un(n.right,e.right),e.bottom=un(n.bottom,e.bottom),e.left=dn(n.left,e.left),e},J(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function it(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?b(s):null,r=s?M(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Bi:e={x:a,y:i.y-n.height};break;case Ri:e={x:a,y:i.y+i.height};break;case Wi:e={x:i.x+i.width,y:l};break;case zi:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?x(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Ui:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Vi:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function nt(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.boundary,r=void 0===o?Ki:o,a=i.rootBoundary,l=void 0===a?Xi:a,c=i.elementContext,h=void 0===c?Yi:c,d=i.altBoundary,u=void 0!==d&&d,f=i.padding,g=void 0===f?0:f,m=N("number"!=typeof g?g:I(g,Fi)),_=h===Yi?Qi:Yi,v=t.rects.popper,b=t.elements[u?_:h],w=et(p(b)?b:b.contextElement||O(t.elements.popper),r,l),E=y(t.elements.reference),A=it({reference:E,element:v,strategy:"absolute",placement:s}),T=G(Object.assign({},v,A)),C=h===Yi?T:E,$={top:w.top-C.top+m.top,bottom:C.bottom-w.bottom+m.bottom,left:w.left-C.left+m.left,right:C.right-w.right+m.right},k=t.modifiersData.offset;if(h===Yi&&k){var L=k[s];Object.keys($).forEach(function(t){var e=[Wi,Ri].indexOf(t)>=0?1:-1,i=[Bi,Ri].indexOf(t)>=0?"y":"x";$[t]+=L[i]*e})}return $}function st(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Zi:l,h=M(n),d=h?a?Gi:Gi.filter(function(t){return M(t)===h}):Fi,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=nt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[b(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}function ot(t){if(b(t)===qi)return[];var e=z(t);return[q(t),e,q(e)]}function rt(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,_=b(m),v=l||(_===m||!p?[z(m)]:ot(m)),y=[m].concat(v).reduce(function(t,i){return t.concat(b(i)===qi?st(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)},[]),w=e.rects.reference,E=e.rects.popper,A=new Map,T=!0,O=y[0],C=0;C<y.length;C++){var $=y[C],k=b($),L=M($)===Ui,x=[Bi,Ri].indexOf(k)>=0,D=x?"width":"height",S=nt(e,{placement:$,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),N=x?L?Wi:zi:L?Ri:Bi;w[D]>E[D]&&(N=z(N));var I=z(N),P=[];if(o&&P.push(S[k]<=0),a&&P.push(S[N]<=0,S[I]<=0),P.every(function(t){return t})){O=$,T=!1;break}A.set($,P)}if(T)for(var j=function(t){var e=y.find(function(e){var i=A.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return O=e,"break"},H=p?3:1;H>0;H--){if("break"===j(H))break}e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}}function at(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function lt(t){return[Bi,Wi,Ri,zi].some(function(e){return t[e]>=0})}function ct(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=nt(e,{elementContext:"reference"}),a=nt(e,{altBoundary:!0}),l=at(r,n),c=at(a,s,o),h=lt(l),d=lt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}function ht(t,e,i){var n=b(t),s=[zi,Bi].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[zi,Wi].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function dt(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=Zi.reduce(function(t,i){return t[i]=ht(i,e.rects,o),t},{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}function ut(t){var e=t.state,i=t.name;e.modifiersData[i]=it({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}function ft(t){return"x"===t?"y":"x"}function pt(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,g=void 0===p?0:p,m=nt(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=b(e.placement),v=M(e.placement),y=!v,E=x(_),A=ft(E),T=e.modifiersData.popperOffsets,O=e.rects.reference,C=e.rects.popper,$="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,k={x:0,y:0};if(T){if(o||a){var N="y"===E?Bi:zi,I="y"===E?Ri:Wi,P="y"===E?"height":"width",j=T[E],H=T[E]+m[N],B=T[E]-m[I],R=f?-C[P]/2:0,W=v===Ui?O[P]:C[P],z=v===Ui?-C[P]:-O[P],q=e.elements.arrow,F=f&&q?w(q):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:S(),V=U[N],K=U[I],X=D(0,O[P],F[P]),Y=y?O[P]/2-R-X-V-$:W-X-V-$,Q=y?-O[P]/2+R+X+K+$:z+X+K+$,G=e.elements.arrow&&L(e.elements.arrow),Z=G?"y"===E?G.clientTop||0:G.clientLeft||0:0,J=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,tt=T[E]+Y-J-Z,et=T[E]+Q-J;if(o){var it=D(f?un(H,tt):H,j,f?dn(B,et):B);T[E]=it,k[E]=it-j}if(a){var st="x"===E?Bi:zi,ot="x"===E?Ri:Wi,rt=T[A],at=rt+m[st],lt=rt-m[ot],ct=D(f?un(at,tt):at,rt,f?dn(lt,et):lt);T[A]=ct,k[A]=ct-rt}}e.modifiersData[n]=k}}function gt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mt(t){return t!==f(t)&&g(t)?gt(t):F(t)}function _t(t){var e=t.getBoundingClientRect(),i=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return 1!==i||1!==n}function vt(t,e,i){void 0===i&&(i=!1);var n=g(e);g(e)&&_t(e);var s=O(e),o=y(t),r={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!i)&&(("body"!==u(e)||X(s))&&(r=mt(e)),g(e)?((a=y(e)).x+=e.clientLeft,a.y+=e.clientTop):s&&(a.x=U(s))),{x:o.left+r.scrollLeft-a.x,y:o.top+r.scrollTop-a.y,width:o.width,height:o.height}}function bt(t){function e(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var s=i.get(t);s&&e(s)}}),s.push(t)}var i=new Map,n=new Set,s=[];return t.forEach(function(t){i.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||e(t)}),s}function yt(t){var e=bt(t);return cn.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}function wt(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=undefined,i(t())})})),e}}function Et(t){var e=t.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{});return Object.keys(e).map(function(t){return e[t]})}function At(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Tt(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?$n:s;return function(t,e,i){function s(){a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n}),r=function(){};l.push(o||r)}})}function r(){l.forEach(function(t){return t()}),l=[]}void 0===i&&(i=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},$n,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var l="function"==typeof i?i(a.options):i;r(),a.options=Object.assign({},o,a.options,l),a.scrollParents={reference:p(t)?Q(t):t.contextElement?Q(t.contextElement):[],popper:Q(e)};var c=yt(Et([].concat(n,a.options.modifiers)));return a.orderedModifiers=c.filter(function(t){return t.enabled}),s(),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(At(e,i)){a.rects={reference:vt(e,L(i),"fixed"===a.options.strategy),popper:w(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:wt(function(){return new Promise(function(t){h.forceUpdate(),t(a)})}),destroy:function(){r(),c=!0}};return At(t,e)?(h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h):h}}function Ot(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(let t=0,i=s.length;t<i;t++){const i=s[t],n=i.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){i.remove();continue}const o=[].concat(...i.attributes),r=[].concat(e["*"]||[],e[n]||[]);o.forEach(t=>{Co(t,r)||i.removeAttribute(t.nodeName)})}return n.body.innerHTML}const Ct=1e6,$t=1e3,kt="transitionend",Lt=t=>null===t||t===undefined?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),xt=t=>{do{t+=Math.floor(Math.random()*Ct)}while(document.getElementById(t));return t},Dt=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},St=t=>{const e=Dt(t);return e&&document.querySelector(e)?e:null},Nt=t=>{const e=Dt(t);return e?document.querySelector(e):null},It=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(i))*$t):0},Pt=t=>{t.dispatchEvent(new Event(kt))},jt=t=>!(!t||"object"!=typeof t)&&("undefined"!=typeof t.jquery&&(t=t[0]),"undefined"!=typeof t.nodeType),Mt=t=>jt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Ht=(t,e,i)=>{Object.keys(i).forEach(n=>{const s=i[n],o=e[n],r=o&&jt(o)?"element":Lt(o);if(!new RegExp(s).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)})},Bt=t=>!(!jt(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),Rt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||("undefined"!=typeof t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),Wt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Wt(t.parentNode):null},zt=()=>{},qt=t=>{t.offsetHeight},Ft=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},Ut=[],Vt=t=>{"loading"===document.readyState?(Ut.length||document.addEventListener("DOMContentLoaded",()=>{Ut.forEach(t=>t())}),Ut.push(t)):t()},Kt=()=>"rtl"===document.documentElement.dir,Xt=t=>{Vt(()=>{const e=Ft();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=(()=>(e.fn[i]=n,t.jQueryInterface))}})},Yt=t=>{"function"==typeof t&&t()},Qt=(t,e,i=!0)=>{if(!i)return void Yt(t);const n=5,s=It(e)+n;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener(kt,r),Yt(t))};e.addEventListener(kt,r),setTimeout(()=>{o||Pt(e)},s)},Gt=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},Zt=/[^.]*(?=\..*)\.|.*/,Jt=/\..*/,te=/::\d+$/,ee={};let ie=1;const ne={mouseenter:"mouseover",mouseleave:"mouseout"},se=/^(mouseenter|mouseleave)/i,oe=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]),re={on(t,e,i,n){r(t,e,i,n,!1)},one(t,e,i,n){r(t,e,i,n,!0)},off(t,i,n,s){if("string"!=typeof i||!t)return;const[r,c,h]=o(i,n,s),d=h!==i,u=e(t),f=i.startsWith(".");if(void 0!==c){if(!u||!u[h])return;return void a(t,u,h,c,r?n:null)}f&&Object.keys(u).forEach(e=>{l(t,u,e,i.slice(1))});const p=u[h]||{};Object.keys(p).forEach(e=>{const n=e.replace(te,"");if(!d||i.includes(n)){const i=p[e];a(t,u,h,i.originalHandler,i.delegationSelector)}})},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Ft(),s=c(e),o=e!==s,r=oe.has(s);let a,l=!0,h=!0,d=!1,u=null;return o&&n&&(a=n.Event(e,i),n(t).trigger(a),l=!a.isPropagationStopped(),h=!a.isImmediatePropagationStopped(),d=a.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents")).initEvent(s,l,!0):u=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach(t=>{Object.defineProperty(u,t,{get:()=>i[t]})}),d&&u.preventDefault(),h&&t.dispatchEvent(u),u.defaultPrevented&&void 0!==a&&a.preventDefault(),u}},ae=new Map,le={set(t,e,i){ae.has(t)||ae.set(t,new Map);const n=ae.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>ae.has(t)&&ae.get(t).get(e)||null,remove(t,e){if(!ae.has(t))return;const i=ae.get(t);i["delete"](e),0===i.size&&ae["delete"](t)}},ce="5.1.3";class he{constructor(t){(t=Mt(t))&&(this._element=t,le.set(this._element,this.constructor.DATA_KEY,this))}dispose(){le.remove(this._element,this.constructor.DATA_KEY),re.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,i=!0){Qt(t,e,i)}static getInstance(t){return le.get(Mt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return ce}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const de=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;re.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Rt(this))return;const s=Nt(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},ue="alert",fe=`.${"bs.alert"}`,pe=`close${fe}`,ge=`closed${fe}`,me="fade",_e="show";class ve extends he{static get NAME(){return ue}close(){if(re.trigger(this._element,pe).defaultPrevented)return;this._element.classList.remove(_e);const t=this._element.classList.contains(me);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),re.trigger(this._element,ge),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=ve.getOrCreateInstance(this);if("string"==typeof t){if(e[t]===undefined||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}de(ve,"close"),Xt(ve);const be="button",ye="active",we='[data-bs-toggle="button"]',Ee=`click${`.${"bs.button"}`}${".data-api"}`;class Ae extends he{static get NAME(){return be}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(ye))}static jQueryInterface(t){return this.each(function(){const e=Ae.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}re.on(document,Ee,we,t=>{t.preventDefault();const e=t.target.closest(we);Ae.getOrCreateInstance(e).toggle()}),Xt(Ae);const Te={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${d(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${d(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=h(t.dataset[i])}),e},getDataAttribute:(t,e)=>h(t.getAttribute(`data-bs-${d(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},Oe=3,Ce={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==Oe;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(", ");return this.find(e,t).filter(t=>!Rt(t)&&Bt(t))}},$e="carousel",ke=`.${"bs.carousel"}`,Le=".data-api",xe=500,De=40,Se={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Ne={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Ie="next",Pe="prev",je="left",Me="right",He={["ArrowLeft"]:Me,["ArrowRight"]:je},Be=`slide${ke}`,Re=`slid${ke}`,We=`keydown${ke}`,ze=`mouseenter${ke}`,qe=`mouseleave${ke}`,Fe=`touchstart${ke}`,Ue=`touchmove${ke}`,Ve=`touchend${ke}`,Ke=`pointerdown${ke}`,Xe=`pointerup${ke}`,Ye=`dragstart${ke}`,Qe=`load${ke}${Le}`,Ge=`click${ke}${Le}`,Ze="carousel",Je="active",ti="slide",ei="carousel-item-end",ii="carousel-item-start",ni="carousel-item-next",si="carousel-item-prev",oi="pointer-event",ri=".active",ai=".active.carousel-item",li=".carousel-item",ci=".carousel-item img",hi=".carousel-item-next, .carousel-item-prev",di=".carousel-indicators",ui="[data-bs-target]",fi="[data-bs-slide], [data-bs-slide-to]",pi='[data-bs-ride="carousel"]',gi="touch",mi="pen";class _i extends he{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=Ce.findOne(di,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Se}static get NAME(){return $e}next(){this._slide(Ie)}nextWhenVisible(){!document.hidden&&Bt(this._element)&&this.next()}prev(){this._slide(Pe)}pause(t){t||(this._isPaused=!0),Ce.findOne(hi,this._element)&&(Pt(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=Ce.findOne(ai,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void re.one(this._element,Re,()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const i=t>e?Ie:Pe;this._slide(i,this._items[t])}_getConfig(t){return t={...Se,...Te.getDataAttributes(this._element),..."object"==typeof t?t:{}},Ht($e,t,Ne),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=De)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?Me:je)}_addEventListeners(){this._config.keyboard&&re.on(this._element,We,t=>this._keydown(t)),"hover"===this._config.pause&&(re.on(this._element,ze,t=>this.pause(t)),re.on(this._element,qe,t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&(t.pointerType===mi||t.pointerType===gi),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},n=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),xe+this._config.interval))};Ce.find(ci,this._element).forEach(t=>{re.on(t,Ye,t=>t.preventDefault())}),this._pointerEvent?(re.on(this._element,Ke,t=>e(t)),re.on(this._element,Xe,t=>n(t)),this._element.classList.add(oi)):(re.on(this._element,Fe,t=>e(t)),re.on(this._element,Ue,t=>i(t)),re.on(this._element,Ve,t=>n(t)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=He[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?Ce.find(li,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===Ie;return Gt(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),n=this._getItemIndex(Ce.findOne(ai,this._element));return re.trigger(this._element,Be,{relatedTarget:t,direction:e,from:n,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=Ce.findOne(ri,this._indicatorsElement);e.classList.remove(Je),e.removeAttribute("aria-current");const i=Ce.find(ui,this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add(Je),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||Ce.findOne(ai,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){
111
+ const i=this._directionToOrder(t),n=Ce.findOne(ai,this._element),s=this._getItemIndex(n),o=e||this._getItemByOrder(i,n),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===Ie,c=l?ii:ei,h=l?ni:si,d=this._orderToDirection(i);if(o&&o.classList.contains(Je))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,d).defaultPrevented)return;if(!n||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const u=()=>{re.trigger(this._element,Re,{relatedTarget:o,direction:d,from:s,to:r})};if(this._element.classList.contains(ti)){o.classList.add(h),qt(o),n.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add(Je),n.classList.remove(Je,h,c),this._isSliding=!1,setTimeout(u,0)};this._queueCallback(t,n,!0)}else n.classList.remove(Je),o.classList.add(Je),this._isSliding=!1,u();a&&this.cycle()}_directionToOrder(t){return[Me,je].includes(t)?Kt()?t===je?Pe:Ie:t===je?Ie:Pe:t}_orderToDirection(t){return[Ie,Pe].includes(t)?Kt()?t===Pe?je:Me:t===Pe?Me:je:t}static carouselInterface(t,e){const i=_i.getOrCreateInstance(t,e);let{_config:n}=i;"object"==typeof e&&(n={...n,...e});const s="string"==typeof e?e:n.slide;if("number"==typeof e)i.to(e);else if("string"==typeof s){if("undefined"==typeof i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each(function(){_i.carouselInterface(this,t)})}static dataApiClickHandler(t){const e=Nt(this);if(!e||!e.classList.contains(Ze))return;const i={...Te.getDataAttributes(e),...Te.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),_i.carouselInterface(e,i),n&&_i.getInstance(e).to(n),t.preventDefault()}}re.on(document,Ge,fi,_i.dataApiClickHandler),re.on(window,Qe,()=>{const t=Ce.find(pi);for(let e=0,i=t.length;e<i;e++)_i.carouselInterface(t[e],_i.getInstance(t[e]))}),Xt(_i);const vi="collapse",bi="bs.collapse",yi=`.${bi}`,wi={toggle:!0,parent:null},Ei={toggle:"boolean",parent:"(null|element)"},Ai=`show${yi}`,Ti=`shown${yi}`,Oi=`hide${yi}`,Ci=`hidden${yi}`,$i=`click${yi}${".data-api"}`,ki="show",Li="collapse",xi="collapsing",Di="collapsed",Si=`:scope .${Li} .${Li}`,Ni="collapse-horizontal",Ii="width",Pi="height",ji=".collapse.show, .collapse.collapsing",Mi='[data-bs-toggle="collapse"]';class Hi extends he{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const i=Ce.find(Mi);for(let t=0,e=i.length;t<e;t++){const e=i[t],n=St(e),s=Ce.find(n).filter(t=>t===this._element);null!==n&&s.length&&(this._selector=n,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return wi}static get NAME(){return vi}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=Ce.find(Si,this._config.parent);e=Ce.find(ji,this._config.parent).filter(e=>!t.includes(e))}const i=Ce.findOne(this._selector);if(e.length){const n=e.find(t=>i!==t);if((t=n?Hi.getInstance(n):null)&&t._isTransitioning)return}if(re.trigger(this._element,Ai).defaultPrevented)return;e.forEach(e=>{i!==e&&Hi.getOrCreateInstance(e,{toggle:!1}).hide(),t||le.set(e,bi,null)});const n=this._getDimension();this._element.classList.remove(Li),this._element.classList.add(xi),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(xi),this._element.classList.add(Li,ki),this._element.style[n]="",re.trigger(this._element,Ti)},o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(s,this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(re.trigger(this._element,Oi).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,qt(this._element),this._element.classList.add(xi),this._element.classList.remove(Li,ki);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],i=Nt(e);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(xi),this._element.classList.add(Li),re.trigger(this._element,Ci)};this._element.style[t]="",this._queueCallback(i,this._element,!0)}_isShown(t=this._element){return t.classList.contains(ki)}_getConfig(t){return(t={...wi,...Te.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=Mt(t.parent),Ht(vi,t,Ei),t}_getDimension(){return this._element.classList.contains(Ni)?Ii:Pi}_initializeChildren(){if(!this._config.parent)return;const t=Ce.find(Si,this._config.parent);Ce.find(Mi,this._config.parent).filter(e=>!t.includes(e)).forEach(t=>{const e=Nt(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(t=>{e?t.classList.remove(Di):t.classList.add(Di),t.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each(function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=Hi.getOrCreateInstance(this,e);if("string"==typeof t){if("undefined"==typeof i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}re.on(document,$i,Mi,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=St(this);Ce.find(e).forEach(t=>{Hi.getOrCreateInstance(t,{toggle:!1}).toggle()})}),Xt(Hi);var Bi="top",Ri="bottom",Wi="right",zi="left",qi="auto",Fi=[Bi,Ri,Wi,zi],Ui="start",Vi="end",Ki="clippingParents",Xi="viewport",Yi="popper",Qi="reference",Gi=Fi.reduce(function(t,e){return t.concat([e+"-"+Ui,e+"-"+Vi])},[]),Zi=[].concat(Fi,[qi]).reduce(function(t,e){return t.concat([e,e+"-"+Ui,e+"-"+Vi])},[]),Ji="beforeRead",tn="read",en="afterRead",nn="beforeMain",sn="main",on="afterMain",rn="beforeWrite",an="write",ln="afterWrite",cn=[Ji,tn,en,nn,sn,on,rn,an,ln];const hn={name:"applyStyles",enabled:!0,phase:"write",fn:_,effect:v,requires:["computeStyles"]};var dn=Math.max,un=Math.min,fn=Math.round,pn=function(t,e){return N("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:I(t,Fi))};const gn={name:"arrow",enabled:!0,phase:"main",fn:P,effect:j,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var mn={top:"auto",right:"auto",bottom:"auto",left:"auto"};const _n={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:R,data:{}};var vn={passive:!0};const bn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:W,data:{}};var yn={left:"right",right:"left",bottom:"top",top:"bottom"},wn={start:"end",end:"start"};const En={name:"flip",enabled:!0,phase:"main",fn:rt,requiresIfExists:["offset"],data:{_skip:!1}},An={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ct},Tn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dt},On={name:"popperOffsets",enabled:!0,phase:"read",fn:ut,data:{}},Cn={name:"preventOverflow",enabled:!0,phase:"main",fn:pt,requiresIfExists:["offset"]};var $n={placement:"bottom",modifiers:[],strategy:"absolute"},kn=Tt(),Ln=Tt({defaultModifiers:[bn,On,_n,hn]}),xn=Tt({defaultModifiers:[bn,On,_n,hn,Tn,En,Cn,gn,An]});const Dn=Object.freeze({__proto__:null,popperGenerator:Tt,detectOverflow:nt,createPopperBase:kn,createPopper:xn,createPopperLite:Ln,top:Bi,bottom:Ri,right:Wi,left:zi,auto:qi,basePlacements:Fi,start:Ui,end:Vi,clippingParents:Ki,viewport:Xi,popper:Yi,reference:Qi,variationPlacements:Gi,placements:Zi,beforeRead:Ji,read:tn,afterRead:en,beforeMain:nn,main:sn,afterMain:on,beforeWrite:rn,write:an,afterWrite:ln,modifierPhases:cn,applyStyles:hn,arrow:gn,computeStyles:_n,eventListeners:bn,flip:En,hide:An,offset:Tn,popperOffsets:On,preventOverflow:Cn}),Sn="dropdown",Nn=`.${"bs.dropdown"}`,In=".data-api",Pn="Escape",jn="Space",Mn="Tab",Hn="ArrowUp",Bn="ArrowDown",Rn=2,Wn=new RegExp(`${Hn}|${Bn}|${Pn}`),zn=`hide${Nn}`,qn=`hidden${Nn}`,Fn=`show${Nn}`,Un=`shown${Nn}`,Vn=`click${Nn}${In}`,Kn=`keydown${Nn}${In}`,Xn=`keyup${Nn}${In}`,Yn="show",Qn="dropup",Gn="dropend",Zn="dropstart",Jn="navbar",ts='[data-bs-toggle="dropdown"]',es=".dropdown-menu",is=".navbar-nav",ns=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",ss=Kt()?"top-end":"top-start",os=Kt()?"top-start":"top-end",rs=Kt()?"bottom-end":"bottom-start",as=Kt()?"bottom-start":"bottom-end",ls=Kt()?"left-start":"right-start",cs=Kt()?"right-start":"left-start",hs={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},ds={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class us extends he{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return hs}static get DefaultType(){return ds}static get NAME(){return Sn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Rt(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(re.trigger(this._element,Fn,t).defaultPrevented)return;const e=us.getParentFromElement(this._element);this._inNavbar?Te.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(is)&&[].concat(...document.body.children).forEach(t=>re.on(t,"mouseover",zt)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Yn),this._element.classList.add(Yn),re.trigger(this._element,Un,t)}hide(){if(Rt(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){re.trigger(this._element,zn,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>re.off(t,"mouseover",zt)),this._popper&&this._popper.destroy(),this._menu.classList.remove(Yn),this._element.classList.remove(Yn),this._element.setAttribute("aria-expanded","false"),Te.removeDataAttribute(this._menu,"popper"),re.trigger(this._element,qn,t))}_getConfig(t){if(t={...this.constructor.Default,...Te.getDataAttributes(this._element),...t},Ht(Sn,t,this.constructor.DefaultType),"object"==typeof t.reference&&!jt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Sn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===Dn)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:jt(this._config.reference)?e=Mt(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=xn(e,this._menu,i),n&&Te.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Yn)}_getMenuElement(){return Ce.next(this._element,es)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains(Gn))return ls;if(t.classList.contains(Zn))return cs;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Qn)?e?os:ss:e?as:rs}_detectNavbar(){return null!==this._element.closest(`.${Jn}`)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Ce.find(ns,this._menu).filter(Bt);i.length&&Gt(i,e,t===Bn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t&&(t.button===Rn||"keyup"===t.type&&t.key!==Mn))return;const e=Ce.find(ts);for(let i=0,n=e.length;i<n;i++){const n=us.getInstance(e[i]);if(!n||!1===n._config.autoClose)continue;if(!n._isShown())continue;const s={relatedTarget:n._element};if(t){const e=t.composedPath(),i=e.includes(n._menu);if(e.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(t.target)&&("keyup"===t.type&&t.key===Mn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(s.clickEvent=t)}n._completeHide(s)}}static getParentFromElement(t){return Nt(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===jn||t.key!==Pn&&(t.key!==Bn&&t.key!==Hn||t.target.closest(es)):!Wn.test(t.key))return;const e=this.classList.contains(Yn);if(!e&&t.key===Pn)return;if(t.preventDefault(),t.stopPropagation(),Rt(this))return;const i=this.matches(ts)?this:Ce.prev(this,ts)[0],n=us.getOrCreateInstance(i);if(t.key!==Pn)return t.key===Hn||t.key===Bn?(e||n.show(),void n._selectMenuItem(t)):void(e&&t.key!==jn||us.clearMenus());n.hide()}}re.on(document,Kn,ts,us.dataApiKeydownHandler),re.on(document,Kn,es,us.dataApiKeydownHandler),re.on(document,Vn,us.clearMenus),re.on(document,Xn,us.clearMenus),re.on(document,Vn,ts,function(t){t.preventDefault(),us.getOrCreateInstance(this).toggle()}),Xt(us);const fs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ps=".sticky-top";class gs{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",e=>e+t),this._setElementAttributes(fs,"paddingRight",e=>e+t),this._setElementAttributes(ps,"marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t)[e];t.style[e]=`${i(Number.parseFloat(s))}px`};this._applyManipulationCallback(t,s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(fs,"paddingRight"),this._resetElementAttributes(ps,"marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&Te.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=Te.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(Te.removeDataAttribute(t,e),t.style[e]=i)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){jt(t)?e(t):Ce.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const ms={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},_s={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},vs="backdrop",bs="fade",ys="show",ws=`mousedown.bs.${vs}`;class Es{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&qt(this._getElement()),this._getElement().classList.add(ys),this._emulateAnimation(()=>{Yt(t)})):Yt(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(ys),this._emulateAnimation(()=>{this.dispose(),Yt(t)})):Yt(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(bs),this._element=t}return this._element}_getConfig(t){return(t={...ms,..."object"==typeof t?t:{}}).rootElement=Mt(t.rootElement),Ht(vs,t,_s),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),re.on(this._getElement(),ws,()=>{Yt(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(re.off(this._element,ws),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){Qt(t,this._getElement(),this._config.isAnimated)}}const As={trapElement:null,autofocus:!0},Ts={trapElement:"element",autofocus:"boolean"},Os="focustrap",Cs=`.${"bs.focustrap"}`,$s=`focusin${Cs}`,ks=`keydown.tab${Cs}`,Ls="Tab",xs="forward",Ds="backward";class Ss{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),re.off(document,Cs),re.on(document,$s,t=>this._handleFocusin(t)),re.on(document,ks,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,re.off(document,Cs))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const n=Ce.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===Ds?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===Ls&&(this._lastTabNavDirection=t.shiftKey?Ds:xs)}_getConfig(t){return t={...As,..."object"==typeof t?t:{}},Ht(Os,t,Ts),t}}const Ns="modal",Is=`.${"bs.modal"}`,Ps="Escape",js={backdrop:!0,keyboard:!0,focus:!0},Ms={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Hs=`hide${Is}`,Bs=`hidePrevented${Is}`,Rs=`hidden${Is}`,Ws=`show${Is}`,zs=`shown${Is}`,qs=`resize${Is}`,Fs=`click.dismiss${Is}`,Us=`keydown.dismiss${Is}`,Vs=`mouseup.dismiss${Is}`,Ks=`mousedown.dismiss${Is}`,Xs=`click${Is}${".data-api"}`,Ys="modal-open",Qs="fade",Gs="show",Zs="modal-static",Js=".modal.show",to=".modal-dialog",eo=".modal-body",io='[data-bs-toggle="modal"]';class no extends he{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=Ce.findOne(to,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new gs}static get Default(){return js}static get NAME(){return Ns}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;re.trigger(this._element,Ws,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Ys),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),re.on(this._dialog,Ks,()=>{re.one(this._element,Vs,t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;if(re.trigger(this._element,Hs).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Gs),re.off(this._element,Fs),re.off(this._dialog,Ks),this._queueCallback(()=>this._hideModal(),this._element,t)}dispose(){[window,this._dialog].forEach(t=>re.off(t,Is)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Es({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ss({trapElement:this._element})}_getConfig(t){return t={...js,...Te.getDataAttributes(this._element),..."object"==typeof t?t:{}},Ht(Ns,t,Ms),t}_showElement(t){const e=this._isAnimated(),i=Ce.findOne(eo,this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&qt(this._element),this._element.classList.add(Gs);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,re.trigger(this._element,zs,{relatedTarget:t})};this._queueCallback(n,this._dialog,e)}_setEscapeEvent(){this._isShown?re.on(this._element,Us,t=>{this._config.keyboard&&t.key===Ps?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Ps||this._triggerBackdropTransition()}):re.off(this._element,Us)}_setResizeEvent(){this._isShown?re.on(window,qs,()=>this._adjustDialog()):re.off(window,qs)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Ys),this._resetAdjustments(),this._scrollBar.reset(),re.trigger(this._element,Rs)})}_showBackdrop(t){re.on(this._element,Fs,t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(Qs)}_triggerBackdropTransition(){if(re.trigger(this._element,Bs).defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,n=e>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||t.contains(Zs)||(n||(i.overflowY="hidden"),t.add(Zs),this._queueCallback(()=>{t.remove(Zs),n||this._queueCallback(()=>{i.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!Kt()||i&&!t&&Kt())&&(this._element.style.paddingLeft=`${e}px`),(i&&!t&&!Kt()||!i&&t&&Kt())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=no.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}re.on(document,Xs,io,function(t){const e=Nt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),re.one(e,Ws,t=>{t.defaultPrevented||re.one(e,Rs,()=>{Bt(this)&&this.focus()})});const i=Ce.findOne(Js);i&&no.getInstance(i).hide(),no.getOrCreateInstance(e).toggle(this)}),de(no),Xt(no);const so="offcanvas",oo=`.${"bs.offcanvas"}`,ro=".data-api",ao=`load${oo}${ro}`,lo="Escape",co={backdrop:!0,keyboard:!0,scroll:!1},ho={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},uo="show",fo="offcanvas-backdrop",po=".offcanvas.show",go=`show${oo}`,mo=`shown${oo}`,_o=`hide${oo}`,vo=`hidden${oo}`,bo=`click${oo}${ro}`,yo=`keydown.dismiss${oo}`,wo='[data-bs-toggle="offcanvas"]';class Eo extends he{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return so}static get Default(){return co}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(re.trigger(this._element,go,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new gs).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(uo);const e=()=>{this._config.scroll||this._focustrap.activate(),re.trigger(this._element,mo,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(re.trigger(this._element,_o).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(uo),this._backdrop.hide();const t=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new gs).reset(),re.trigger(this._element,vo)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...co,...Te.getDataAttributes(this._element),..."object"==typeof t?t:{}},Ht(so,t,ho),t}_initializeBackDrop(){return new Es({className:fo,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ss({trapElement:this._element})}_addEventListeners(){re.on(this._element,yo,t=>{this._config.keyboard&&t.key===lo&&this.hide()})}static jQueryInterface(t){return this.each(function(){const e=Eo.getOrCreateInstance(this,t);if("string"==typeof t){if(e[t]===undefined||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}re.on(document,bo,wo,function(t){const e=Nt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Rt(this))return;re.one(e,vo,()=>{Bt(this)&&this.focus()});const i=Ce.findOne(po);i&&i!==e&&Eo.getInstance(i).hide(),Eo.getOrCreateInstance(e).toggle(this)}),re.on(window,ao,()=>Ce.find(po).forEach(t=>Eo.getOrCreateInstance(t).show())),de(Eo),Xt(Eo);const Ao=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),To=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Oo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Co=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!Ao.has(i)||Boolean(To.test(t.nodeValue)||Oo.test(t.nodeValue));const n=e.filter(t=>t instanceof RegExp);for(let t=0,e=n.length;t<e;t++)if(n[t].test(i))return!0;return!1},$o={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ko="tooltip",Lo=`.${"bs.tooltip"}`,xo="bs-tooltip",Do=new Set(["sanitize","allowList","sanitizeFn"]),So={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},No={AUTO:"auto",TOP:"top",RIGHT:Kt()?"left":"right",BOTTOM:"bottom",LEFT:Kt()?"right":"left"},Io={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:$o,popperConfig:null},Po={HIDE:`hide${Lo}`,HIDDEN:`hidden${Lo}`,SHOW:`show${Lo}`,SHOWN:`shown${Lo}`,INSERTED:`inserted${Lo}`,CLICK:`click${Lo}`,FOCUSIN:`focusin${Lo}`,FOCUSOUT:`focusout${Lo}`,MOUSEENTER:`mouseenter${Lo}`,MOUSELEAVE:`mouseleave${Lo}`},jo="fade",Mo="show",Ho="show",Bo="out",Ro=".tooltip-inner",Wo=`.${"modal"}`,zo="hide.bs.modal",qo="hover",Fo="focus",Uo="click",Vo="manual";class Ko extends he{constructor(t,e){if(void 0===Dn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Io}static get NAME(){return ko}static get Event(){return Po}static get DefaultType(){return So}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Mo))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),re.off(this._element.closest(Wo),zo,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=re.trigger(this._element,this.constructor.Event.SHOW),e=Wt(this._element),i=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Ro).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),s=xt(this.constructor.NAME);n.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&n.classList.add(jo);const o="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,r=this._getAttachment(o);this._addAttachmentClass(r);const{container:a}=this._config;le.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(n),re.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=xn(this._element,n,this._getPopperConfig(r)),n.classList.add(Mo);const l=this._resolvePossibleFunction(this._config.customClass);l&&n.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{re.on(t,"mouseover",zt)});const c=()=>{const t=this._hoverState;this._hoverState=null,re.trigger(this._element,this.constructor.Event.SHOWN),t===Bo&&this._leave(null,this)},h=this.tip.classList.contains(jo);this._queueCallback(c,this.tip,h)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Ho&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),re.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(re.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Mo),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>re.off(t,"mouseover",zt)),this._activeTrigger[Uo]=!1,this._activeTrigger[Fo]=!1,this._activeTrigger[qo]=!1;const i=this.tip.classList.contains(jo);this._queueCallback(e,this.tip,i),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(jo,Mo),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Ro)}_sanitizeAndSetContent(t,e,i){const n=Ce.findOne(i,t);e||!n?this.setElementContent(n,e):n.remove()}setElementContent(t,e){if(null!==t)return jt(e)?(e=Mt(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Ot(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t
112
+ }_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return No[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)re.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if(t!==Vo){const e=t===qo?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===qo?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;re.on(this._element,e,this._config.selector,t=>this._enter(t)),re.on(this._element,i,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=(()=>{this._element&&this.hide()}),re.on(this._element.closest(Wo),zo,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?Fo:qo]=!0),e.getTipElement().classList.contains(Mo)||e._hoverState===Ho?e._hoverState=Ho:(clearTimeout(e._timeout),e._hoverState=Ho,e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{e._hoverState===Ho&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?Fo:qo]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Bo,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{e._hoverState===Bo&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=Te.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{Do.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:Mt(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Ht(ko,t,this.constructor.DefaultType),t.sanitize&&(t.template=Ot(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_getBasicClassPrefix(){return xo}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each(function(){const e=Ko.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Xt(Ko);const Xo="popover",Yo=`.${"bs.popover"}`,Qo="bs-popover",Go={...Ko.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Zo={...Ko.DefaultType,content:"(string|element|function)"},Jo={HIDE:`hide${Yo}`,HIDDEN:`hidden${Yo}`,SHOW:`show${Yo}`,SHOWN:`shown${Yo}`,INSERTED:`inserted${Yo}`,CLICK:`click${Yo}`,FOCUSIN:`focusin${Yo}`,FOCUSOUT:`focusout${Yo}`,MOUSEENTER:`mouseenter${Yo}`,MOUSELEAVE:`mouseleave${Yo}`},tr=".popover-header",er=".popover-body";class ir extends Ko{static get Default(){return Go}static get NAME(){return Xo}static get Event(){return Jo}static get DefaultType(){return Zo}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tr),this._sanitizeAndSetContent(t,this._getContent(),er)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Qo}static jQueryInterface(t){return this.each(function(){const e=ir.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Xt(ir);const nr="scrollspy",sr=`.${"bs.scrollspy"}`,or={offset:10,method:"auto",target:""},rr={offset:"number",method:"string",target:"(string|element)"},ar=`activate${sr}`,lr=`scroll${sr}`,cr=`load${sr}${".data-api"}`,hr="dropdown-item",dr="active",ur='[data-bs-spy="scroll"]',fr=".nav, .list-group",pr=".nav-link",gr=".nav-item",mr=".list-group-item",_r=`${pr}, ${mr}, .${hr}`,vr=".dropdown",br=".dropdown-toggle",yr="offset",wr="position";class Er extends he{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,re.on(this._scrollElement,lr,()=>this._process()),this.refresh(),this._process()}static get Default(){return or}static get NAME(){return nr}refresh(){const t=this._scrollElement===this._scrollElement.window?yr:wr,e="auto"===this._config.method?t:this._config.method,i=e===wr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Ce.find(_r,this._config.target).map(t=>{const n=St(t),s=n?Ce.findOne(n):null;if(s){const t=s.getBoundingClientRect();if(t.width||t.height)return[Te[e](s).top+i,n]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){re.off(this._scrollElement,sr),super.dispose()}_getConfig(t){return(t={...or,...Te.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=Mt(t.target)||document.documentElement,Ht(nr,t,rr),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;){this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&("undefined"==typeof this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}}_activate(t){this._activeTarget=t,this._clear();const e=_r.split(",").map(e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`),i=Ce.findOne(e.join(","),this._config.target);i.classList.add(dr),i.classList.contains(hr)?Ce.findOne(br,i.closest(vr)).classList.add(dr):Ce.parents(i,fr).forEach(t=>{Ce.prev(t,`${pr}, ${mr}`).forEach(t=>t.classList.add(dr)),Ce.prev(t,gr).forEach(t=>{Ce.children(t,pr).forEach(t=>t.classList.add(dr))})}),re.trigger(this._scrollElement,ar,{relatedTarget:t})}_clear(){Ce.find(_r,this._config.target).filter(t=>t.classList.contains(dr)).forEach(t=>t.classList.remove(dr))}static jQueryInterface(t){return this.each(function(){const e=Er.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}re.on(window,cr,()=>{Ce.find(ur).forEach(t=>new Er(t))}),Xt(Er);const Ar="tab",Tr=`.${"bs.tab"}`,Or=`hide${Tr}`,Cr=`hidden${Tr}`,$r=`show${Tr}`,kr=`shown${Tr}`,Lr=`click${Tr}${".data-api"}`,xr="dropdown-menu",Dr="active",Sr="fade",Nr="show",Ir=".dropdown",Pr=".nav, .list-group",jr=".active",Mr=":scope > li > .active",Hr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Br=".dropdown-toggle",Rr=":scope > .dropdown-menu .active";class Wr extends he{static get NAME(){return Ar}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Dr))return;let t;const e=Nt(this._element),i=this._element.closest(Pr);if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?Mr:jr;t=(t=Ce.find(e,i))[t.length-1]}const n=t?re.trigger(t,Or,{relatedTarget:this._element}):null;if(re.trigger(this._element,$r,{relatedTarget:t}).defaultPrevented||null!==n&&n.defaultPrevented)return;this._activate(this._element,i);const s=()=>{re.trigger(t,Cr,{relatedTarget:this._element}),re.trigger(this._element,kr,{relatedTarget:t})};e?this._activate(e,e.parentNode,s):s()}_activate(t,e,i){const n=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?Ce.children(e,jr):Ce.find(Mr,e))[0],s=i&&n&&n.classList.contains(Sr),o=()=>this._transitionComplete(t,n,i);n&&s?(n.classList.remove(Nr),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove(Dr);const t=Ce.findOne(Rr,e.parentNode);t&&t.classList.remove(Dr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Dr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),qt(t),t.classList.contains(Sr)&&t.classList.add(Nr);let n=t.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains(xr)){const e=t.closest(Ir);e&&Ce.find(Br,e).forEach(t=>t.classList.add(Dr)),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each(function(){const e=Wr.getOrCreateInstance(this);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}re.on(document,Lr,Hr,function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Rt(this))return;Wr.getOrCreateInstance(this).show()}),Xt(Wr);const zr="toast",qr=`.${"bs.toast"}`,Fr=`mouseover${qr}`,Ur=`mouseout${qr}`,Vr=`focusin${qr}`,Kr=`focusout${qr}`,Xr=`hide${qr}`,Yr=`hidden${qr}`,Qr=`show${qr}`,Gr=`shown${qr}`,Zr="fade",Jr="hide",ta="show",ea="showing",ia={animation:"boolean",autohide:"boolean",delay:"number"},na={animation:!0,autohide:!0,delay:5e3};class sa extends he{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ia}static get Default(){return na}static get NAME(){return zr}show(){if(re.trigger(this._element,Qr).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Zr);const t=()=>{this._element.classList.remove(ea),re.trigger(this._element,Gr),this._maybeScheduleHide()};this._element.classList.remove(Jr),qt(this._element),this._element.classList.add(ta),this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ta))return;if(re.trigger(this._element,Xr).defaultPrevented)return;const t=()=>{this._element.classList.add(Jr),this._element.classList.remove(ea),this._element.classList.remove(ta),re.trigger(this._element,Yr)};this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ta)&&this._element.classList.remove(ta),super.dispose()}_getConfig(t){return t={...na,...Te.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},Ht(zr,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){re.on(this._element,Fr,t=>this._onInteraction(t,!0)),re.on(this._element,Ur,t=>this._onInteraction(t,!1)),re.on(this._element,Vr,t=>this._onInteraction(t,!0)),re.on(this._element,Kr,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=sa.getOrCreateInstance(this,t);if("string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return de(sa),Xt(sa),{Alert:ve,Button:Ae,Carousel:_i,Collapse:Hi,Dropdown:us,Modal:no,Offcanvas:Eo,Popover:ir,ScrollSpy:Er,Tab:Wr,Toast:sa,Tooltip:Ko}});
113
+ // decko_modal.js.coffee
114
+ (function(){decko.slot.ready(function(t){return t.find(".modal.fade").on("loaded.bs.modal",function(){return $(this).trigger("decko.slot.ready")}),t.find("[data-toggle='modal']").off("click").on("click",function(t){var o,e,r;return t.preventDefault(),t.stopPropagation(),e=(o=$(this)).attr("href"),r=o.data("target"),$(r).modal("show"),$.ajax({url:e,type:"GET",success:function(t){return $(r+" .modal-content").html(t),$(r).trigger("loaded.bs.modal")},error:function(t){return $(r+" .modal-content").html(t.responseText),$(r).trigger("loaded.bs.modal")}}),!1})})}).call(this);
115
+ // decko_popover.js.coffee
116
+ (function(){$(window).ready(function(){return $("body").on("show.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover").removeClass("_show-on-hover").addClass("_show-on-hover-disabled")}),$("body").on("hide.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover-disabled").removeClass("_show-on-hover-disabled").addClass("_show-on-hover")})}),decko.slot.ready(function(o){return o.find('[data-tooltip="true"]').tooltip(),o.find('[data-bs-toggle="popover"]').popover({html:!0})})}).call(this);
117
+ // script_load_select2.js.coffee
118
+ (function(){var t;$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(t){return t.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(t){return t.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var n,i,o,c;if(0!==e.length){if(e.length>1){for(o=[],n=0,i=e.length;n<i;n++)c=e[n],o.push(t($(c)));return o}return t(e)}},uniqSelect2Id:function(t){return $("[data-select2-id="+t+"]").length>0?decko.uniqSelect2Id(t+"1"):t}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var t;if(""!==(t=$(this).val()))return window.location=decko.path(escape(t))}),$("body").on("select2:select","._submit-on-select",function(t){return $(t.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(t,e){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(t,e),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}}),t=function(t){var e;return e={dropdownAutoWidth:"true",width:"auto",dropdownParent:t.parent()},t.attr("id",decko.uniqSelect2Id(t.attr("id"))),t.hasClass("tags")&&(e.tags="true"),t.data("placeholder")&&(e.placeholder=t.data("placeholder")),null!=t.data("minimum-results-for-search")&&(e.minimumResultsForSearch=t.data("minimum-results-for-search")),t.data("options-card")&&(e.ajax={delay:200,cache:!0,url:decko.path(t.data("options-card")),processResults:function(t){return{results:t}},data:function(e){return{term:e.term,format:"json",view:t.data("options-view")||"name_match",slot:{items:{view:t.data("options-item-view")||"select2_option"}}}}},e.templateResult=function(t){return t.html?$(t.html):t.text}),t.select2(e)}}).call(this);
119
+ // bootstrap-colorpicker.min.js
120
+ /*!
121
+ * Bootstrap Colorpicker v2.5.2
122
+ * https://itsjavi.com/bootstrap-colorpicker/
123
+ */
124
+ !function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(o,i,r,s,a){this.fallbackValue=r?"string"==typeof r?this.parse(r):r:null,this.fallbackFormat=s||"rgba",this.hexNumberSignPrefix=!0===a,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=i||{},this.colors=t.extend({},e.webColors,this.predefinedColors),o&&("undefined"!=typeof o.h?this.value=o:this.setColor(String(o))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:"undefined"!=typeof t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,o,i){var r,s,a,n,l;return 0===arguments.length&&(t=this.value.h,e=this.value.s,o=this.value.b,i=this.value.a),t=(t*=360)%360/60,r=s=a=o-(l=o*e),r+=[l,n=l*(1-Math.abs(t%2-1)),0,0,n,l][t=~~t],s+=[n,l,l,n,0,0][t],a+=[0,0,n,l,l,n][t],{r:Math.round(255*r),g:Math.round(255*s),b:Math.round(255*a),a:i}},toHex:function(t,e,o,i,r){arguments.length<=1&&(e=this.value.h,o=this.value.s,i=this.value.b,r=this.value.a);var s="#",a=this.toRGB(e,o,i,r);return this.rgbaIsTransparent(a)?"transparent":(t||(s=this.hexNumberSignPrefix?"#":""),s+((1<<24)+(parseInt(a.r)<<16)+(parseInt(a.g)<<8)+parseInt(a.b)).toString(16).slice(1))},toHSL:function(t,e,o,i){0===arguments.length&&(t=this.value.h,e=this.value.s,o=this.value.b,i=this.value.a);var r=t,s=(2-e)*o,a=e*o;return a/=s>0&&s<=1?s:2-s,s/=2,a>1&&(a=1),{h:isNaN(r)?0:r,s:isNaN(a)?0:a,l:isNaN(s)?0:s,a:isNaN(i)?0:i}},toAlias:function(t,e,o,i){var r,s=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,o,i),a="alias"===this.origFormat?s:this.toString(!1,this.origFormat);for(var n in this.colors)if((r=this.colors[n].toLowerCase().trim())===s||r===a)return n;return!1},RGBtoHSB:function(t,e,o,i){var r,s,a,n;return t/=255,e/=255,o/=255,r=((r=0===(n=(a=Math.max(t,e,o))-Math.min(t,e,o))?null:a===t?(e-o)/n:a===e?(o-t)/n+2:(t-e)/n+4)+360)%6*60/360,s=0===n?0:n/a,{h:this._sanitizeNumber(r),s:s,b:a,a:this._sanitizeNumber(i)}},HueToRGB:function(t,e,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?t+(e-t)*o*6:2*o<1?e:3*o<2?t+(e-t)*(2/3-o)*6:t},HSLtoRGB:function(t,e,o,i){var r;e<0&&(e=0);var s=2*o-(r=o<=.5?o*(1+e):o+e-o*e),a=t+1/3,n=t,l=t-1/3;return[Math.round(255*this.HueToRGB(s,r,a)),Math.round(255*this.HueToRGB(s,r,n)),Math.round(255*this.HueToRGB(s,r,l)),this._sanitizeNumber(i)]},parse:function(e){if("string"!=typeof e)return this.fallbackValue;if(0===arguments.length)return!1;var o,i,r=this,s=!1,a="undefined"!=typeof this.colors[e];return a&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,n){var l=n.re.exec(e);return!(o=l&&n.parse.apply(r,[l]))||(s={},i=a?"alias":n.format?n.format:r.getValidFallbackFormat(),(s=i.match(/hsla?/)?r.RGBtoHSB.apply(r,r.HSLtoRGB.apply(r,o)):r.RGBtoHSB.apply(r,o))instanceof Object&&(s.format=i),!1)}),s},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,o,i){i=i||!1;var r=!1;switch(o=o||this.origFormat||this.fallbackFormat){case"rgb":return r=this.toRGB(),this.rgbaIsTransparent(r)?"transparent":"rgb("+r.r+","+r.g+","+r.b+")";case"rgba":return"rgba("+(r=this.toRGB()).r+","+r.g+","+r.b+","+r.a+")";case"hsl":return r=this.toHSL(),"hsl("+Math.round(360*r.h)+","+Math.round(100*r.s)+"%,"+Math.round(100*r.l)+"%)";case"hsla":return r=this.toHSL(),"hsla("+Math.round(360*r.h)+","+Math.round(100*r.s)+"%,"+Math.round(100*r.l)+"%,"+r.a+")";case"hex":return this.toHex(t);case"alias":return!1===(r=this.toAlias())?this.toString(t,this.getValidFallbackFormat()):i&&!(r in e.webColors)&&r in this.predefinedColors?this.predefinedColors[r]:r;default:return r}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return"undefined"!=typeof this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var o={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div><div class="colorpicker-selectors"></div></div>',align:"right",customClass:null,colorSelectors:null},i=function(e,i){this.element=t(e).addClass("colorpicker-element"),this.options=t.extend(!0,{},o,this.element.data(),i),this.component=this.options.component,this.component=!1!==this.component&&this.element.find(this.component),this.component&&0===this.component.length&&(this.component=!1),this.container=!0===this.options.container?this.element:this.options.container,this.container=!1!==this.container&&t(this.container),this.input=this.element.is("input")?this.element:!!this.options.input&&this.element.find(this.options.input),this.input&&0===this.input.length&&(this.input=!1),this.color=this.createColor(!1!==this.options.color?this.options.color:this.getValue()),this.format=!1!==this.options.format?this.options.format:this.color.origFormat,!1!==this.options.color&&(this.updateInput(this.color),this.updateData(this.color)),this.disabled=!1;var r=this.picker=t(this.options.template);if(this.options.customClass&&r.addClass(this.options.customClass),this.options.inline?r.addClass("colorpicker-inline colorpicker-visible"):r.addClass("colorpicker-hidden"),this.options.horizontal&&r.addClass("colorpicker-horizontal"),-1===["rgba","hsla","alias"].indexOf(this.format)&&!1!==this.options.format&&"transparent"!==this.getValue()||r.addClass("colorpicker-with-alpha"),"right"===this.options.align&&r.addClass("colorpicker-right"),!0===this.options.inline&&r.addClass("colorpicker-no-arrow"),this.options.colorSelectors){var s=this,a=s.picker.find(".colorpicker-selectors");a.length>0&&(t.each(this.options.colorSelectors,function(e,o){var i=t("<i />").addClass("colorpicker-selectors-color").css("background-color",o).data("class",e).data("alias",e);i.on("mousedown.colorpicker touchstart.colorpicker",function(e){e.preventDefault(),s.setValue("alias"===s.format?t(this).data("alias"):t(this).css("background-color"))}),a.append(i)}),a.show().addClass("colorpicker-visible"))}r.on("mousedown.colorpicker touchstart.colorpicker",t.proxy(function(t){t.target===t.currentTarget&&t.preventDefault()},this)),r.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",t.proxy(this.mousedown,this)),r.appendTo(this.container?this.container:t("body")),!1!==this.input&&(this.input.on({"keyup.colorpicker":t.proxy(this.keyup,this)}),this.input.on({"change.colorpicker":t.proxy(this.change,this)}),!1===this.component&&this.element.on({"focus.colorpicker":t.proxy(this.show,this)}),!1===this.options.inline&&this.element.on({"focusout.colorpicker":t.proxy(this.hide,this)})),!1!==this.component&&this.component.on({"click.colorpicker":t.proxy(this.show,this)}),!1===this.input&&!1===this.component&&this.element.on({"click.colorpicker":t.proxy(this.show,this)}),!1!==this.input&&!1!==this.component&&"color"===this.input.attr("type")&&this.input.on({"click.colorpicker":t.proxy(this.show,this),"focus.colorpicker":t.proxy(this.show,this)}),this.update(),t(t.proxy(function(){this.element.trigger("create")},this))};i.Color=e,i.prototype={constructor:i,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker","color").off(".colorpicker"),!1!==this.input&&this.input.off(".colorpicker"),!1!==this.component&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(!1!==this.options.inline||this.options.container)return!1;var t=this.container&&this.container[0]!==window.document.body?"position":"offset",e=this.component||this.element,o=e[t]();"right"===this.options.align&&(o.left-=this.picker.outerWidth()-e.outerWidth()),this.picker.css({top:o.top+e.outerHeight(),left:o.left})},show:function(e){this.isDisabled()||(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),t(window).on("resize.colorpicker",t.proxy(this.reposition,this)),!e||this.hasInput()&&"color"!==this.input.attr("type")||e.stopPropagation&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!this.component&&this.input||!1!==this.options.inline||t(window.document).on({"mousedown.colorpicker":t.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}))},hide:function(e){return(void 0===e||!e.target||!(t(e.currentTarget).parents(".colorpicker").length>0||t(e.target).parents(".colorpicker").length>0))&&(this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),t(window).off("resize.colorpicker",this.reposition),t(window.document).off({"mousedown.colorpicker":this.hide}),this.update(),void this.element.trigger({type:"hidePicker",color:this.color}))},updateData:function(t){return t=t||this.color.toString(!1,this.format),this.element.data("color",t),t},updateInput:function(t){return t=t||this.color.toString(!1,this.format),!1!==this.input&&(this.input.prop("value",t),this.input.trigger("change")),t},updatePicker:function(t){void 0!==t&&(this.color=this.createColor(t));var e=!1===this.options.horizontal?this.options.sliders:this.options.slidersHorz,o=this.picker.find("i");if(0!==o.length)return!1===this.options.horizontal?(e=this.options.sliders,o.eq(1).css("top",e.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",e.alpha.maxTop*(1-this.color.value.a))):(e=this.options.slidersHorz,o.eq(1).css("left",e.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",e.alpha.maxLeft*(1-this.color.value.a))),o.eq(0).css({top:e.saturation.maxTop-this.color.value.b*e.saturation.maxTop,left:this.color.value.s*e.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(!0,this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(!0)),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(!0,this.format)),t},updateComponent:function(t){var e;if(e=void 0!==t?this.createColor(t):this.color,!1!==this.component){var o=this.component.find("i").eq(0);o.length>0?o.css({backgroundColor:e.toString(!0,this.format)}):this.component.css({backgroundColor:e.toString(!0,this.format)})}return e.toString(!1,this.format)},update:function(t){var e;return!1===this.getValue(!1)&&!0!==t||(e=this.updateComponent(),this.updateInput(e),this.updateData(e),this.updatePicker()),e},setValue:function(t){this.color=this.createColor(t),this.update(!0),this.element.trigger({type:"changeColor",color:this.color,value:t})},createColor:function(t){return new e(t||null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(t){var e;return t=void 0===t?this.options.fallbackColor:t,void 0!==(e=this.hasInput()?this.input.val():this.element.data("color"))&&""!==e&&null!==e||(e=t),e},hasInput:function(){return!1!==this.input},isDisabled:function(){return this.disabled},disable:function(){return this.hasInput()&&this.input.prop("disabled",!0),this.disabled=!0,this.element.trigger({type:"disable",color:this.color,value:this.getValue()}),!0},enable:function(){return this.hasInput()&&this.input.prop("disabled",!1),this.disabled=!1,this.element.trigger({type:"enable",color:this.color,value:this.getValue()}),!0},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e){!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches&&(e.pageX=e.originalEvent.touches[0].pageX,e.pageY=e.originalEvent.touches[0].pageY),e.stopPropagation(),e.preventDefault();var o=t(e.target).closest("div"),i=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!o.is(".colorpicker")){if(o.is(".colorpicker-saturation"))this.currentSlider=t.extend({},i.saturation);else if(o.is(".colorpicker-hue"))this.currentSlider=t.extend({},i.hue);else{if(!o.is(".colorpicker-alpha"))return!1;this.currentSlider=t.extend({},i.alpha)}var r=o.offset();this.currentSlider.guide=o.find("i")[0].style,this.currentSlider.left=e.pageX-r.left,this.currentSlider.top=e.pageY-r.top,this.mousePointer={left:e.pageX,top:e.pageY},t(window.document).on({"mousemove.colorpicker":t.proxy(this.mousemove,this),"touchmove.colorpicker":t.proxy(this.mousemove,this),"mouseup.colorpicker":t.proxy(this.mouseup,this),"touchend.colorpicker":t.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(t){!t.pageX&&!t.pageY&&t.originalEvent&&t.originalEvent.touches&&(t.pageX=t.originalEvent.touches[0].pageX,t.pageY=t.originalEvent.touches[0].pageY),t.stopPropagation(),t.preventDefault();var e=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((t.pageX||this.mousePointer.left)-this.mousePointer.left))),o=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((t.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=e+"px",this.currentSlider.guide.top=o+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,e/this.currentSlider.maxLeft),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,o/this.currentSlider.maxTop),!1!==this.options.format||"setAlpha"!==this.currentSlider.callTop&&"setAlpha"!==this.currentSlider.callLeft||(1!==this.color.value.a?(this.format="rgba",this.color.origFormat="rgba"):(this.format="hex",this.color.origFormat="hex")),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(e){return e.stopPropagation(),e.preventDefault(),t(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup}),!1},change:function(t){this.keyup(t)},keyup:function(t){38===t.keyCode?(this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0)):40===t.keyCode?(this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0)):(this.color=this.createColor(this.input.val()),this.color.origFormat&&!1===this.options.format&&(this.format=this.color.origFormat),!1!==this.getValue(!1)&&(this.updateData(),this.updateComponent(),this.updatePicker())),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}},t.colorpicker=i,t.fn.colorpicker=function(e){var o=Array.prototype.slice.call(arguments,1),r=1===this.length,s=null,a=this.each(function(){var r=t(this),a=r.data("colorpicker");a||(a=new i(this,"object"==typeof e?e:{}),r.data("colorpicker",a)),"string"==typeof e?t.isFunction(a[e])?s=a[e].apply(a,o):(o.length&&(a[e]=o[0]),s=a[e]):s=r});return r?s:a},t.fn.colorpicker.constructor=i});
125
+ // script_colorpicker.js.coffee
126
+ (function(){decko.slot.ready(function(){return $(".colorpicker-component").colorpicker()})}).call(this);
127
+ // follow.js.coffee
128
+ (function(){$(window).ready(function(){return $("body").on("click",".btn-item",function(){return $(this).find("i").html("hourglass_full")}),$("body").on("mouseenter",".btn-item-delete",function(){return $(this).find("i").html("remove"),$(this).addClass("btn-danger").removeClass("btn-primary")}),$("body").on("mouseleave",".btn-item-delete",function(){return $(this).find("i").html("check"),$(this).addClass("btn-primary").removeClass("btn-danger")}),$("body").on("submit",".edit-view.SELF-Xfollow_default .card-form",function(){var n;if((n=$(this).find(".confirm_update_all-view")).is(":hidden"))return $(this).find(".follow-updater").show(),n.show("blind"),!1})})}).call(this);
129
+ // tab.js.coffee
130
+ (function(){$(window).ready(function(){return $("body").on("show.bs.tab","a",function(){var t;if(!($(this).closest(".tab-content").length>0))return t=$(this).data("tabName"),window.history.pushState("tab","","?tab="+t)}),$("body").on("show.bs.tab",'a.load[data-bs-toggle="tab"][data-url]',function(t){var a,n,o,e,r;return n=(e=$(t.target)).attr("href"),r=e.data("url"),e.removeClass("load"),o=$(n),(a=o.closest(".tab-panel").children(".tab-content")).startLoading(!0),$.ajax({url:r,success:function(t){return o.append(t),decko.contentLoaded(o,$(this))},complete:function(){return a.stopLoading(!0)}})})})}).call(this);
131
+ // layout.js.coffee
132
+ (function(){var a,e,t,s,o,i,n;i=function(){var e;if(e=$("body > footer").first(),$("body > article, body > aside").wrapAll("<div class='"+a()+"'/>"),$("body > div > article, body > div > aside").wrapAll('<div class="row row-offcanvas">'),e)return $("body").append(e)},n=function(a,e){return"<div class='container'><div class='row "+e+"'>"+a+"</div></div>"},a=function(){return $("body").hasClass("fluid")?"container-fluid":"container"},o=function(a){return"<button class='offcanvas-toggle btn btn-secondary d-sm-none' data-toggle='offcanvas-"+a+"'><i class='material-icons'>chevron_"+("left"===a?"right":"left")+"</i></button>"},t=function(a){return"both"===a?n(o("left")+o("right"),"flex-row justify-content-between"):"left"===a?n(o("left"),"flex-row"):n(o("right"),"flex-row-reverse")},s=function(a){var e,s;return e=$("body > article").first(),s=$("body > aside").first(),e.addClass("col-xs-12 col-sm-9"),s.addClass("col-xs-6 col-sm-3 sidebar-offcanvas sidebar-offcanvas-"+a),"left"===a?$("body").append(s).append(e):$("body").append(e).append(s),i(),e.prepend(t(a))},e=function(){var a,e,s,o,n;return a=$("body > article").first(),e=$("body > aside").first(),s=$($("body > aside")[1]),a.addClass("col-xs-12 col-sm-6"),o="col-xs-6 col-sm-3 sidebar-offcanvas",e.addClass(o+" sidebar-offcanvas-left"),s.addClass(o+" sidebar-offcanvas-right"),$("body").append(e).append(a).append(s),i(),n=t("both"),a.prepend(n)},$.fn.extend({toggleText:function(a,e){return this.text(this.text()===e?a:e),this}}),$(window).ready(function(){switch(!1){case!$("body").hasClass("right-sidebar"):s("right");break;case!$("body").hasClass("left-sidebar"):s("left");break;case!$("body").hasClass("two-sidebar"):e()}return $('[data-toggle="offcanvas-left"]').click(function(){return $(".row-offcanvas").removeClass("right-active").toggleClass("left-active"),$(this).find("i.material-icons").toggleText("chevron_left","chevron_right")}),$('[data-toggle="offcanvas-right"]').click(function(){return $(".row-offcanvas").removeClass("left-active").toggleClass("right-active"),$(this).find("i.material-icons").toggleText("chevron_left","chevron_right")})})}).call(this);
133
+ // modal.js.coffee
134
+ (function(){var o,d;$(window).ready(function(){return $("body").on("hidden.bs.modal",function(){return decko.removeModal()}),$("body").on("show.bs.modal","._modal-slot",function(d){var a;return a=$(d.relatedTarget),o($(this),a),$(this).modal("handleUpdate"),decko.contentLoaded($(d.target),a)}),$("._modal-slot").each(function(){return d($(this)),o($(this))}),$("body").on("click",".submit-modal",function(){return $(this).closest(".modal-content").find("form").submit()})}),d=function(o){var d;if((d=o.find(".modal-content")).length>0&&d.html().length>0)return $("#main > .card-slot").registerAsOrigin("modal",o),o.modal("show")},o=function(o,d){var a,l;if(l=o.find(".modal-dialog"),null!=(a=null!=d?d.data("modal-class"):o.data("modal-class"))&&null!=l)return l.addClass(a)},jQuery.fn.extend({showAsModal:function(o){var d;return null!=o&&(d=this.modalify(o)),$("body > ._modal-slot").is(":visible")?this.addModal(d,o):($("body > ._modal-slot")[0]?($("._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot").replaceWith(d)):$("body").append(d),o.registerAsOrigin("modal",d),d.modal("show",o))},addModal:function(d,a){var l;return"modal-replace"===a.data("slotter-mode")?(o(d,a),l=d.find(".modal-dialog"),d.adoptModalOrigin(),$("._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot > .modal-dialog").replaceWith(l),decko.contentLoaded(l,a)):(decko.pushModal(d),a.registerAsOrigin("modal",d),d.modal("show",a))},adoptModalOrigin:function(){var o;return o=$("body > ._modal-slot .card-slot[data-modal-origin-slot-id]").data("modal-origin-slot-id"),this.find(".modal-body .card-slot").attr("data-modal-origin-slot-id",o)},modalSlot:function(){var o;return(o=$("#modal-container")).length>0?o:decko.createModalSlot()},modalify:function(o){var d;return null!=o.data("modal-body")&&this.find(".modal-body").append(o.data("modal-body")),this.hasClass("_modal-slot")?this:((d=$("<div/>",{id:"modal-container","class":"modal fade _modal-slot"})).append($("<div/>",{"class":"modal-dialog modal-dialog-centered"}).append($("<div/>",{"class":"modal-content"}).append(this))),d)}}),$.extend(decko,{createModalSlot:function(){var o;return o=$("<div/>",{id:"modal-container","class":"modal fade _modal-slot"}),$("body").append(o),o},removeModal:function(){return $("._modal-stack")[0]?decko.popModal():($("._modal-slot").trigger("decko.slot.destroy"),$(".modal-dialog").empty())},pushModal:function(o){var d;return(d=$("body > ._modal-slot")).removeAttr("id"),d.removeClass("_modal-slot").addClass("_modal-stack").removeClass("modal").addClass("background-modal"),o.insertBefore(d),$(".modal-backdrop").removeClass("show")},popModal:function(){return $(".modal-backdrop").addClass("show"),$("body > ._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot").remove(),$($("._modal-stack")[0]).addClass("_modal-slot").removeClass("_modal-stack").attr("id","modal-container").addClass("modal").removeClass("background-modal"),$(document.body).addClass("modal-open")}})}).call(this);
135
+ // overlay.js.coffee
136
+ (function(){jQuery.fn.extend({overlaySlot:function(){var e;return null!=(e=this.closest(".card-slot._overlay"))[0]?e:null!=(e=this.closest(".overlay-container").find("._overlay"))[0]&&$(e[0])},addOverlay:function(e,a){return this.parent().hasClass("overlay-container")?$(e).hasClass("_stack-overlay")?this.before(e):($("._overlay-origin").removeClass("_overlay-origin"),this.replaceOverlay(e)):(this.parent().hasClass("_overlay-container-placeholder")?this.parent().addClass("overlay-container"):this.wrapAll('<div class="overlay-container">'),this.addClass("_bottomlay-slot"),this.before(e)),a.registerAsOrigin("overlay",e),decko.contentLoaded(e,a)},replaceOverlay:function(e){return this.overlaySlot().trigger("decko.slot.destroy"),this.overlaySlot().replaceWith(e),$(".board-sidebar .tab-pane:not(.active) .board-pills > .nav-item > .nav-link.active").removeClass("active")},isInOverlay:function(){return this.closest(".card-slot._overlay").length},removeOverlay:function(){var e;if(e=this.overlaySlot())return e.removeOverlaySlot()},removeOverlaySlot:function(){var e;return this.trigger("decko.slot.destroy"),1===this.siblings().length&&(e=$(this.siblings()[0])).hasClass("_bottomlay-slot")&&(e.parent().hasClass("_overlay-container-placeholder")?e.parent().removeClass("overlay-container"):e.unwrap(),e.removeClass("_bottomlay-slot").updateBoard(!0,e)),this.remove()}})}).call(this);
137
+ // recaptcha.js.coffee
138
+ (function(){var t,a,n;$(window).ready(function(){return $("body").on("submit","form.slotter",function(t){var n;if("on"===(n=$(this)).data("recaptcha"))return a(n,t)})}),a=function(t,a){var e;return null==(e=t.find("input._recaptcha-token"))[0]?e.val("recaptcha-token-field-missing"):e.hasClass("_token-updated")?e.removeClass("_token-updated"):"undefined"==typeof grecaptcha||null===grecaptcha?e.val("grecaptcha-undefined"):n(t,a)},n=function(a,n){var e;return null==(e=a.find("input._recaptcha-token"))[0]?e.val("recaptcha-token-field-missing"):"undefined"==typeof grecaptcha||null===grecaptcha?e.val("grecaptcha-undefined"):(n&&n.stopPropagation(),t(a,n,e),!1)},t=function(t,a,n){var e,c;return c=n.data("site-key"),e=n.data("action"),grecaptcha.execute(c,{action:e}).then(function(e){if(n.val(e),n.addClass("_token-updated"),a)return t.submit()})}}).call(this);
139
+ // image_editor.js.coffee
140
+ (function(){decko.slot.ready(function(e){var t,n;if(null!=(n=e.data("slot"))&&null!=n.show&&n.show.includes("preview_redirect")&&(e.closest(".tab-panel").find(".tab-li-preview a").tab("show"),nest.updateImagePreview(e)),e.hasClass("modal_nest_image-view")&&(t=e.find("._image-card-select")).length>0)return decko.imageComplete.init(t),nest.updateImageName(e.find(".new_image-view .new_fields-view .submit-button"))}),$(document).ready(function(){return $("body").on("select2:select","._image-name",function(){return nest.updateImagePreview(this)}),$("body").on("select2:select","._image-view-select",function(){return nest.updateImagePreview(this)}),$("body").on("select2:select","._image-size-select",function(){return nest.updateImagePreview(this)}),$("body").on("click",".new_image-view .new_fields-view .submit-button",function(){return nest.updateImageName($(this))})}),decko.imageComplete={init:function(e){return decko.select2Autocomplete.init(e,this._options(e),{data:function(e){return{term:e.term,view:"image_complete"}}})},_options:function(e){return{dropdownParent:e.parent()}}},window.nest||(window.nest={}),$.extend(nest,{updateImageName:function(e){var t,n,i;return t=e.slot().data("cardName"),n=e.closest(".tab-content").find("._image-name"),i=new Option(t,t,!0,!0),n.append(i),n.val(t),n.trigger("change")},updateImagePreview:function(e){var t,n,i,a,s,o;return t=(s=$(e).closest(".tab-content")).find("._image-name").val(),o=s.find("._image-view-select").val(),i=s.find("._image-size-select").val(),s.closest("._nest-editor").find("._nest-preview").val("{{ "+t+" | view: "+o+"; size: "+i+" }}"),a=s.find(".tab-pane-preview > .card-slot"),n=t+"?view="+o+"&size="+i,$(a).slotReload(n)}})}).call(this);
141
+ // link_editor.js.coffee
142
+ (function(){$(document).ready(function(){return $("body").on("click","button._link-apply",function(){return link.applyLink($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))})}),window.link||(window.link={}),$(document).ready(function(){return $("body").on("click","._link-field-toggle",function(){return $(this).is(":checked")?link.addPlus():link.removePlus()}),$("body").on("input","input._link-target",function(){return link.targetChanged()}),$("body").on("input","input._link-title",function(){return link.titleChanged()})}),$.extend(link,{openLinkEditor:function(n){var i;return null==i&&(i=nest.editParams(n,"[[","]]")),nest.openEditorForTm(n,i,"link_editor","modal_link_editor")},applyLink:function(n,i,e){return nest.applySnippet("link",n,i,e)},target:function(){return link.evalFieldOption($("input._link-target").val())},title:function(){return $("input._link-title").val()},titleChanged:function(){var n;return n=$("._link-preview").val().replace(/^\[\[[^\]]*/,"[["+link.target()+"|"+link.title()),link.updatePreview(n)},targetChanged:function(){var n;return n=$("._link-preview").val().replace(/^\[\[[^\]|]*/,"[["+link.target()),link.updatePreview(n)},evalFieldOption:function(n){return link.isField()?"+"+n:n},isField:function(){return $("._link-field-toggle").is(":checked")},addPlus:function(){var n;return n=$("._link-preview").val().replace(/^\[\[\+?/,"[[+"),link.updatePreview(n),$(".input-group.hide-prefix").removeClass("hide-prefix").addClass("show-prefix")},removePlus:function(){var n;return n=$("._link-preview").val().replace(/^\[\[\+?/,"[["),link.updatePreview(n),$(".input-group.show-prefix").removeClass("show-prefix").addClass("hide-prefix")},updatePreview:function(n){return null==n&&(n="[["+link.target()+"|"+link.title()+"]]"),$("._link-preview").val(n)}})}).call(this);
143
+ // nest_editor.js.coffee
144
+ (function(){var t,e,n,o,r,a,i,s;$(document).ready(function(){return $("body").on("click","button._nest-apply",function(){return null!=$(this).data("index")?nest.applyNestToNestListEditor($(this).data("index")):nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._image_nest-apply",function(){return nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._change-create-to-update",function(){var t;return t=$(this).closest("form").find("#success_tinymce_id").val(),n(t)}),$("body").on("click","button._open-nest-editor",function(){var t,e,n,o;return o=(e=$(this).closest("._nest-form")).find("._reference").val(),n=e.find("._nest-options").val(),t=encodeURIComponent("{{"+o+"|"+n+"}}"),nest.openNestEditorForSlot($(this).closest(".card-slot"),$(this).closest(".slotter"),"index="+e.data("index")+"&tm_snippet_raw="+t)})}),window.nest||(window.nest={}),$.extend(nest,{openNestEditor:function(t,e){return null==e&&(e=nest.editParams(t)),this.openEditorForTm(t,e,"nest_editor","modal_nest_editor")},openNestEditorForSlot:function(t,n,o){var r;return r=e(t[0]),i(r,"nest_editor","modal_nest_editor",n,o)},openEditorForTm:function(n,o,r,a){var s,d,l,c;return o+="&tinymce_id="+n.id,l=$("#"+n.id).closest(".card-slot"),d=$("#"+n.id).closest(".card-editor"),c=$("#"+n.id),0===(s=t(d[0])||e(l[0])).length&&(s=":update"),i(s,r,a,c,o)},openImageEditor:function(t){var e;return null==e&&(e=nest.editParams(t,"{{","}}",!1)),this.openEditorForTm(t,e,"nest_image","modal_nest_image")},insertNest:function(t,e){return t.insertContent(e)},editParams:function(t,e,n,o){var a,i,s,d,l,c,u,p,f;return null==e&&(e="{{"),null==n&&(n="}}"),null==o&&(o=!0),null==(p=t.selection.getSel())||null==p.anchorNode?r(0):(f=p.anchorNode.data)?(u=p.anchorOffset,i=f.substr(0,u),a=f.substr(u),(s={before:{close:i.lastIndexOf(n),open:i.lastIndexOf(e)},after:{close:a.indexOf(n),open:a.indexOf(e)}}).before.open>s.before.close&&-1!==s.after.close&&(-1===s.after.open||s.after.close<s.after.open)?(c=s.before.open,null==d&&(l=s.after.close+u+2-c,d=f.substr(c,l)),o?r(c,d):r(c+l)):r(u)):r(p.anchorOffset)},applyNestToTinymceEditor:function(t,e,n){return nest.applySnippet("nest",t,e,n)},applyNestToNestListEditor:function(t){var e;return(e=$("._nest-form[data-index='"+t+"']")).find("._reference").val(nest.name()),e.find("._nest-options").val(nest.options()),decko.updateAddItemButton(e)},applySnippet:function(t,e,n,r){var i,s,d;return i=$("._"+t+"-preview").val(),s=tinymce.get(e),null!=n?a(s,n,r,i):(s.insertContent(i),d=o(s,i),$("button._"+t+"-apply").attr("data-tm-snippet-start",d)),$("button._"+t+"-apply").attr("data-tm-snippet-size",i.length)},updatePreview:function(t){var e;return null==t&&(t="{{ "+nest.name()+"|"+nest.options()+" }}"),(e=$("._nest-preview")).val(t),e.data("nest-options",nest.options()),e.data("reference",nest.name())}}),e=function(t){return t?$(t).attr("data-card-link-name"):":update"},t=function(t){if(t)return $(t).attr("data-card-id")&&"~"+$(t).attr("card-id")||$(t).attr("data-card-link-name")},n=function(t){var e,n;return n=(e=$("#"+t).closest("form")).attr("action").replace("card/create","card/update"),e.attr("action",n)},i=function(t,e,n,o,r){var a;return a=$(".board-sidebar > ._overlay-container-placeholder > .card-slot"),a=$($(".card-slot")[0]),s(o,a,"modal",t,n,r)},r=function(t,e){var n;return n="",null!=t&&(n+="&tm_snippet_start="+t),null!=e&&e.length>0&&(n+="&tm_snippet_raw="+encodeURIComponent(e)),n},s=function(t,e,n,o,r,a){var i;return null==a&&(a=""),i="/"+o+"?view="+r+"&"+a,$.ajax({url:i,success:function(o){return e.slotContent(o,n,t)}})},o=function(t,e){return t.selection.getSel().anchorOffset-e.length},a=function(t,e,n,o){var r,a;return null!=(r=t.selection.getSel())&&null!=r.anchorNode&&null!=r.anchorNode.data?(null==n&&(n=0),a=""+(a=r.anchorNode.data).substr(0,e)+o+a.substr(e+n),r.anchorNode.data=a):t.insertContent(o)}}).call(this);
145
+ // nest_editor_name.js.coffee
146
+ (function(){var e;e=null,$(document).ready(function(){var t;return t=!1,$("body").on("click","._nest-field-toggle",function(){return $(this).is(":checked")?nest.addPlus():nest.removePlus(),t?nest.addPlus():nest.removePlus(),t=!t}),$("body").on("input","input._nest-name",function(t){if(nest.nameChanged(),13!==t.which)return e&&clearTimeout(e),e=setTimeout(function(){return nest.updateNameRelatedTabs()},700)}),$("body").on("keydown","input._nest-name",function(t){if(13===t.which)return e&&clearTimeout(e),nest.updateNameRelatedTabs()})}),$.extend(nest,{name:function(){return nest.evalFieldOption($("input._nest-name").val())},nameChanged:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{[^}|]*/,"{{"+nest.name()),nest.updatePreview(e)},evalFieldOption:function(e){return nest.isField()?"+"+e:e},isField:function(){return $(".show-prefix > ._field-indicator").length>0},addPlus:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{\+?/,"{{+"),nest.updatePreview(e),$(".input-group.hide-prefix").removeClass("hide-prefix").addClass("show-prefix")},removePlus:function(){var e;return e=$("._nest-preview").val().replace(/^\{\{\+?/,"{{"),nest.updatePreview(e),$(".input-group.show-prefix").removeClass("show-prefix").addClass("hide-prefix")},rulesTabSlot:function(){return $("._nest-editor .tab-pane-rules > .card-slot")},contentTabSlot:function(){return $("._nest-editor .tab-pane-content > .card-slot")},tabPanel:function(){return $("._nest-editor .tab-panel")},emptyNameAlert:function(e){return e?$("._empty-nest-name-alert").removeClass("d-none"):$("._empty-nest-name-alert:not(.d-none)").addClass("d-none")},updateNameRelatedTabs:function(){return nest.name().length>0?nest.tabPanel().show():nest.tabPanel().hide(),nest.updateRulesTab(),nest.updateContentTab()},updateContentTab:function(){var e,t;if((e=nest.contentTabSlot()).length>0)return t=decko.path(nest.fullName()+"?view=nest_content"),nest.updateNameDependentSlot(e,t)},updateRulesTab:function(){var e,t;return e=nest.rulesTabSlot(),t=decko.path(nest.setNameForRules()+"?view=nest_rules"),nest.updateNameDependentSlot(e,t)},updateNameDependentSlot:function(e,t){var n;return null!=(n=$("input._nest-name").val())&&n.length>0?(nest.emptyNameAlert(!1),e.slotReload(t)):(e.slotClear(),nest.emptyNameAlert(!0))},fullName:function(){var e,t;return t=(e=$("input._nest-name")).val(),nest.isField()&&e.attr("data-left-name")?e.attr("data-left-name")+"+"+t:t},setNameForRules:function(){var e,t;return t=(e=$("input._nest-name")).val(),nest.isField()?e.attr("data-left-type")?e.attr("data-left-type")+"+"+t+"+*type plus right":t+"+*right":t+"+*self"}})}).call(this);
147
+ // nest_editor_options.js.coffee
148
+ (function(){$(document).ready(function(){return $("body").on("keyup","input._nest-option-value",function(){return nest.updatePreview()}),$("body").on("select2:select","._nest-option-value",function(){return nest.updatePreview()}),$("body").on("select2:select","._nest-option-name",function(){return nest.toggleOptionName($(this).closest("._options-select"),$(this).val(),!0),nest.setOptionValueField($(this),$(this).val()),nest.updatePreview()}),$("body").on("select2:selecting","._nest-option-name",function(){return nest.toggleOptionName($(this).closest("._options-select"),$(this).val(),!1)}),$("body").on("select2:select","._nest-option-name._new-row",function(){var e,t;return $(this).closest(".input-group").find(".d-none").removeClass("d-none"),(e=$(this).closest("._nest-option-row")).find("._nest-option-value").removeAttr("disabled"),t=e.parent().find("._nest-option-row._template"),$(this).removeClass("_new-row"),nest.addRow(t)}),$("body").on("click","._configure-items-button",function(){return nest.addItemsOptions($(this))}),$("body").on("click","button._nest-delete-option",function(){return nest.removeRow($(this).closest("._nest-option-row"))})}),$.extend(nest,{crypt:function(e){var t,a,n,o;return n="dig",o=function(e){return e.split("").map(function(e){return e.charCodeAt(0)})},a=function(e){return("0"+Number(e).toString(16)).substr(-2)},t=function(e){return o(n).reduce(function(e,t){return e^t},e)},e.split("").map(o).map(t).map(a).join("")},decrypt:function(e){var t,a,n;return a="dig",n=function(e){return e.split("").map(function(e){return e.charCodeAt(0)})},t=function(e){return n(a).reduce(function(e,t){return e^t},e)},e.match(/.{1,2}/g).map(function(e){return parseInt(e,16)}).map(t).map(function(e){return String.fromCharCode(e)}).join("")},story:{6:"2e030d4a0e0f0f1a0f184b",7:"2e0f0f1a0f184b",8:"220b040d4a03044a1e020f180f",9:"2d054a0e0f0f1a0f184b",10:"2f1c0f044a0e0f0f1a0f184b",11:"3d020b1e4a0e054a13051f4a0f121a0f091e4a1e054a0c03040e4a0e051d044a1e020f180f55",12:"290b010f55",13:"2b0603090f55",14:"380b0808031e1955",15:"3e020f180f4a03194a04051e0203040d4a0e051d044a1e020f180f4a081f1e4a080605050e464a1e050306464a1e0f0b18194a0b040e4a191d0f0b1e4b",16:"2e054a13051f4a0104051d4a1e020b1e4a220f18040b040e054a2905181e0f104a1f190f0e4a2e0f0901054a080b09014a03044a5b5f58594a1e054a02030e0f4a2b101e0f094a0d05060e55",17:"2e054a13051f4a0104051d4a1e020b1e4a2b1e060b041e03194a190b04014a080f090b1f190f4a031e4a0d051e4a1e180b1a1a0f0e4a03044a0b4a191f08031e0f074a0605051a55",18:"22051a0f4a13051f4d180f4a020b1c03040d4a0c1f044b",19:"234a190f0f4a1905070f1e0203040d4a19020304134b",20:"23194a031e4a0d05060e554b",21:"2e030b0705040e1955",22:"2502464a04054b4a33051f4a02031e4a180509014a08051e1e05074b",23:"391e0306064a0e030d0d03040d55",24:"33051f4a0e05044d1e4a0d031c0f4a1f1a4a0f0b19030613464a0e054a13051f55",25:"220b1c0f4a13051f4a1e18030f0e4a1e020f4a1a0309010b120f55",26:"25184a0e13040b07031e0f55",27:"2e030d4a05184a04051e4a1e054a0e030d464a1e020b1e4a03194a1e020f4a1b1f0f191e03050444",28:"2c050e03054a0f180d054a191f07",29:"23194a031e4a070f4a05184a03194a031e4a0d0f1e1e03040d4a02051e1e0f1855",30:"2b180f044d1e4a13051f4a0b0c180b030e4a050c4a070b0d070b55",31:"25184a080b0618050d1955",32:"2e054a13051f4a0104051d4a1e020b1e4a1e020f4a270b0d040b4a290b181e0b4a1d0b194a1d18031e1e0f044a1d031e024a2e0f090105554a270b13080f4a1e020f4a0518030d03040b064a0e180b0c1e4a03194a0e051d044a1e020f180f44",33:"2e054a13051f4a0104051d4a1e020b1e4a1e020f4a5b5b1e024a290507070b040e070f041e4a0d051e4a0605191e4a080f090b1f190f4a050c4a0b4a2e0f0901054a081f0d55",34:"210f0f1a4a0e030d0d03040d",35:"270b13080f4a13051f4d06064a0c03040e4a031e",36:"3d020b1e4a1d0306064a031e4a190b1355",37:"33051f4a19020b06064a020504051f184a13051f184a1902051c0f0655",38:"220b1c0f4a13051f4a1e02051f0d021e4a0b08051f1e4a02051d4a13051f4a1d0306064a0d0f1e4a051f1e4a050c4a020f180f55",39:"234a02051a0f4a13051f4a0818051f0d021e4a0b4a060b0e0e0f1844",40:"210f0f1a4a0e030d0d03040d464a234d06064a190f0f4a13051f4a05044a1e020f4a051e020f184a19031e0f44",41:""},encryptStory:function(e){var t,a;return a="",t=6,e.forEach(function(e){return console.log(e),a+=t+': "'+nest.crypt(e)+'",\n',t+=1}),console.log(a)},showTemplate:function(e){return e.removeClass("_template")},addRow:function(e){var t,a;return t=e.clone(!1),e.after(t),a=e.find("select._nest-option-name"),decko.initSelect2(a),nest.showTemplate(e)},removeRow:function(e){var t;return t=e.find("._nest-option-name").val(),nest.toggleOptionName(e.closest("._options-select"),t,!1),e.remove(),nest.updatePreview()},addItemsOptions:function(e){var t,a,n,o,f,i;return o=(t=e.closest("._configure-items")).clone(!0),(a=t.parent().find("._configure-items").length)>5?(i=nest.decrypt(nest.story[a]),e.replaceWith("<label>Sub"+"sub".repeat(a-2)+"item options</label>")):(n=(i=e.text()).substr(4),e.replaceWith($("<label>"+(n.charAt(0).toUpperCase()+n.slice(1))+"</label>")),i=i.replace("item","subitem")),nest.showTemplate(t.find("._options-select._template")),f=t.find("._nest-option-row._template"),nest.addRow(f),o.find("._configure-items-button").text(i),t.after(o),nest.updatePreview()},options:function(){var e,t,a,n,o,f,i;for(o=[],i=$("._view-select").val(),a=0,n=(f=$("._options-select:not(._template")).length;a<n;a++)e=f[a],t=nest.extractOptions($(e),i),i=null,o.push(t);return o.map(function(e){return nest.toNestSyntax(e)}).join("|")},extractOptions:function(e,t){var a,n,o,f,i;for(o={},null!=t&&t.length>0&&(o.view=[t]),a=0,n=(f=e.find("._nest-option-row:not(.template)")).length;a<n;a++)i=f[a],nest.addOption(o,$(i));return o},addOption:function(e,t){var a,n;if(null!=(n=t.find("._nest-option-value").val())&&n.length>0)return null!=e[a=t.find("._nest-option-name").val()]?e[a].push(n):e[a]=[n]},toggleOptionName:function(e,t,a){var n,o,f,i,r;if(null==t||0===t.length||"show"===t||"hide"===t)return!0;for(i=[],n=0,o=(f=e.find("._nest-option-name")).length;n<o;n++)r=f[n],$(r).val()!==t?i.push($(r).find("option[value="+t+"]").attr("disabled",a)):i.push(void 0);return i},setOptionValueField:function(e,t){var a,n,o,f,i;return 0===(n=(o=(a=$(e).closest("._nest-option-row")).closest("._nest-options").find("._templates")).find("._nest-option-template-"+t)).length&&(n=o.find("._nest-option-template-default")),(f=a.find("._nest-option-value-col")).empty(),i=n.clone(!0),decko.initSelect2(i.find("select")),f.append(i)},toNestSyntax:function(e){var t,a,n;for(t in a=[],e)n=e[t],a.push(t+": "+n.join(", "));return a.join("; ")}})}).call(this);
149
+ // nest_editor_rules.js.coffee
150
+ (function(){}).call(this);
151
+ // script_tinymce.js
152
+ /**
153
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
154
+ * Licensed under the LGPL or a commercial license.
155
+ * For LGPL see License.txt in the project root for license information.
156
+ * For commercial licenses see https://www.tiny.cloud/
157
+ *
158
+ * Version: 5.10.7 (2022-12-06)
159
+ */
160
+ !function(){"use strict";function e(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}function t(e){return Og(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e.eq(t[o],n[o]))return!1;return!0})}function n(e){return Og(function(n,r){var o,i,a,u=Object.keys(n),s=Object.keys(r);if(i=t(Bg),a=function(e){return t=o,Array.prototype.slice.call(e).sort(t);var t},!Og(function(e,t){return i.eq(a(e),a(t))}).eq(u,s))return!1;for(var c=u.length,l=0;l<c;l++){var f=u[l];if(!e.eq(n[f],r[f]))return!1}return!0})}function r(e){return function(t){return r=typeof(n=t),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}}function o(e){return function(t){return typeof t===e}}function i(e){return function(t){return e===t}}function a(e){return null==e}function u(e){return!a(e)}function s(){}function c(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}}function l(e,t){return function(n){return e(t(n))}}function f(e){return function(){return e}}function d(e){return e}function m(e,t){return e===t}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}function p(e){return function(t){return!e(t)}}function h(e){return e()}function v(e){e()}function b(){return $g}function y(e){return e()}function C(e,t){return Yg.call(e,t)}function x(e,t){return-1<C(e,t)}function w(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function S(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function E(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function k(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}function N(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}}function _(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function A(e,t,n){return k(e,function(e,r){n=t(n,e,r)}),n}function R(e,t,n){return E(e,function(e,r){n=t(n,e,r)}),n}function D(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return Kg.some(i);if(n(i,r))break}return Kg.none()}function T(e,t){return D(e,t,Vg)}function O(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return Kg.some(n);return Kg.none()}function B(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Mg(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);Gg.apply(t,e[n])}return t}(S(e,t))}function P(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0}function L(e){var t=Xg.call(e,0);return t.reverse(),t}function I(e,t){return _(e,function(e){return!x(t,e)})}function M(e,t){var n=Xg.call(e,0);return n.sort(t),n}function F(e,t){return 0<=t&&t<e.length?Kg.some(e[t]):Kg.none()}function U(e){return F(e,0)}function z(e){return F(e,e.length-1)}function H(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return Kg.none()}function j(e,t){for(var n=Qg(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function V(e,t){return ep(e,function(e,n){return{k:n,v:t(e,n)}})}function q(e){return function(t,n){e[n]=t}}function $(e,t,n,r){return j(e,function(e,o){(t(e,o)?n:r)(e,o)}),1}function W(e,t){var n={};return $(e,t,q(n),s),n}function K(e,t){return tp(e,t)?Kg.from(e[t]):Kg.none()}function X(e,t){return tp(e,t)&&void 0!==e[t]&&null!==e[t]}function Y(e,t,n){var r,o;if(!e)return!1;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return!1}else for(r in e)if(tp(e,r)&&!1===t.call(n,e[r],r,e))return!1;return!0}function G(e,t){var n=[];return Y(e,function(r,o){n.push(t(r,o,e))}),n}function J(e,t){var n=[];return Y(e,function(r,o){t&&!t(r,o,e)||n.push(r)}),n}function Q(e,t){if(e)for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Z(e,t,n,r){for(var o=zg(n)?e[0]:n,i=0;i<e.length;i++)o=t.call(r,o,e[i],i);return o}function ee(e,t,n){for(var r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1}function te(e){return e[e.length-1]}function ne(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function re(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}}function oe(e,t){var n=String(t).toLowerCase();return T(e,function(e){return e.search(n)})}function ie(e,t){return-1!==e.indexOf(t)}function ae(e){return function(t){return t.replace(e,"")}}function ue(e){return 0<e.length}function se(e){return!ue(e)}function ce(e){return function(t){return ie(t,e)}}function le(e){return window.matchMedia(e).matches}function fe(e){return null==e?"":(""+e).replace(Op,"")}function de(e,t){return t?!("array"!==t||!np(e))||typeof e===t:void 0!==e}function me(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n}function ge(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function pe(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount}function he(e,t){return e.dom===t.dom}function ve(e,t){return wp().browser.isIE()?(n=e.dom,r=t.dom,o=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(n.compareDocumentPosition(r)&o)):(i=e.dom)!==(a=t.dom)&&i.contains(a);var n,r,o,i,a}function be(){return op(0,0)}function ye(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isEdge:t("Edge"),isChrome:t("Chrome"),isIE:t("IE"),isOpera:t("Opera"),isFirefox:t(dp),isSafari:t("Safari")}}function Ce(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isWindows:t(pp),isiOS:t("iOS"),isAndroid:t(hp),isOSX:t("OSX"),isLinux:t("Linux"),isSolaris:t(vp),isFreeBSD:t(bp),isChromeOS:t(yp)}}function xe(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}function we(e){return e.dom.nodeName.toLowerCase()}function Se(e){return e.dom.nodeType}function Ee(e){return function(t){return Se(t)===e}}function ke(e){return Lp.fromDom(e.dom.ownerDocument)}function Ne(e){return Fp(e)?e:ke(e)}function _e(e){return Lp.fromDom(Ne(e).dom.defaultView)}function Ae(e){return Kg.from(e.dom.parentNode).map(Lp.fromDom)}function Re(e){return Kg.from(e.dom.previousSibling).map(Lp.fromDom)}function De(e){return Kg.from(e.dom.nextSibling).map(Lp.fromDom)}function Te(e){return L(me(e,Re))}function Oe(e){return me(e,De)}function Be(e,t){var n=e.dom.childNodes;return Kg.from(n[t]).map(Lp.fromDom)}function Pe(e){return Be(e,0)}function Le(e){return Be(e,e.dom.childNodes.length-1)}function Ie(e){return e.dom.childNodes.length}function Me(e){return Up(e)&&u(e.dom.host)}function Fe(e){return Me(e)?e:function(){var t=Ne(e).dom.head;if(null==t)throw new Error("Head is not available yet");return Lp.fromDom(t)}()}function Ue(e){return Lp.fromDom(e.dom.host)}function ze(e,t){Ae(e).each(function(n){n.dom.insertBefore(t.dom,e.dom)})}function He(e,t){De(e).fold(function(){Ae(e).each(function(e){qp(e,t)})},function(e){ze(e,t)})}function je(e,t){Pe(e).fold(function(){qp(e,t)},function(n){e.dom.insertBefore(t.dom,n.dom)})}function Ve(e,t){E(t,function(t){qp(e,t)})}function qe(e){e.dom.textContent="",E(zp(e),function(e){$p(e)})}function $e(e){var t,n=zp(e);0<n.length&&(t=e,E(n,function(e){ze(t,e)})),$p(e)}function We(e,t){return void 0!==e?e:void 0!==t?t:0}function Ke(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Xp(n,r)}function Xe(e,t,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(e,t)}function Ye(e,t){wp().browser.isSafari()&&Hg(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)}function Ge(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}}function Je(e){var t=void 0===e?window:e,n=t.document,r=Ke(Lp.fromDom(n)),o=void 0===t?window:t;return(wp().browser.isFirefox()?Kg.none():Kg.from(o.visualViewport)).fold(function(){var e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Ge(r.left,r.top,n,o)},function(e){return Ge(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)})}function Qe(e){return function(t){return!!t&&t.nodeType===e}}function Ze(e){return e&&!Object.getPrototypeOf(e)}function et(e){var t=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var n=e.nodeName.toLowerCase();return x(t,n)}return!1}}function tt(e,t){var n=t.toLowerCase().split(" ");return function(t){if(Gp(t))for(var r=0;r<n.length;r++){var o=t.ownerDocument.defaultView.getComputedStyle(t,null);if((o?o.getPropertyValue(e):null)===n[r])return!0}return!1}}function nt(e){return function(t){return Gp(t)&&t.hasAttribute(e)}}function rt(e){return Gp(e)&&e.hasAttribute("data-mce-bogus")}function ot(e){return Gp(e)&&"TABLE"===e.tagName}function it(e){return function(t){if(Gp(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}function at(e,t,n){return void 0===n&&(n=m),e.exists(function(e){return n(e,t)})}function ut(e,t,n){return e.isSome()&&t.isSome()?Kg.some(n(e.getOrDie(),t.getOrDie())):Kg.none()}function st(e){return void 0!==e.style&&Hg(e.style.getPropertyValue)}function ct(e,t,n){if(!(Lg(n)||Ug(n)||jg(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}function lt(e,t,n){ct(e.dom,t,n)}function ft(e,t){var n=e.dom;j(t,function(e,t){ct(n,t,e)})}function dt(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n}function mt(e,t){return Kg.from(dt(e,t))}function gt(e,t){e.dom.removeAttribute(t)}function pt(e,t){var n=e.dom;j(t,function(e,t){!function(e,t,n){if(!Lg(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);st(e)&&e.style.setProperty(t,n)}(n,t,e)})}function ht(e,t){var n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||Wp(e)?r:sh(n,t)}function vt(e,t){var n=e.dom,r=sh(n,t);return Kg.from(r).filter(function(e){return 0<e.length})}function bt(e){var t={},n=e.dom;if(st(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}function yt(e){return T(e,Ip)}function Ct(e,t){return e.children&&x(e.children,t)}function xt(e){setTimeout(function(){throw e},0)}function wt(e){return ph(function(){return new dh(e)})}function St(e){if(!Mg(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return E(e,function(r,o){var i=Qg(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!Mg(u))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,n)},match:function(e){var r=Qg(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!P(t,function(e){return x(r,e)}))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}}),n}function Et(e){return e.fold(d,d)}function kt(e,t,n,r,o){return e(n,r)?Kg.some(n):Hg(o)&&o(n)?Kg.none():t(n,r,o)}function Nt(e,t,n){for(var r=e.dom,o=Hg(n)?n:Vg;r.parentNode;){r=r.parentNode;var i=Lp.fromDom(r);if(t(i))return Kg.some(i);if(o(i))break}return Kg.none()}function _t(e,t,n){return kt(function(e,t){return t(e)},Nt,e,t,n)}function At(e,t,n){return Nt(e,function(e){return ge(e,t)},n)}function Rt(e,t){return n=t,pe(r=void 0===e?document:e.dom)?Kg.none():Kg.from(r.querySelector(n)).map(Lp.fromDom);var n,r}function Dt(e,t,n){return kt(ge,At,e,t,n)}function Tt(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function Ot(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function Bt(e,t){function n(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];clearTimeout(r),r=Tt(function(){e.apply(this,n)},t)}var r;return n.stop=function(){clearTimeout(r)},n}function Pt(e,t){function n(n,r,o){function c(e,t){for(var n=e.length;n--;)e[n]();p.status=t,p.passed=[],p.failed=[],m&&(m.onload=null,m.onerror=null,m=null)}function f(){return c(p.passed,2),0}function d(){return c(p.failed,3)}var m,g=Pp._addCacheSuffix(n),p=K(a,g).getOrThunk(function(){return{id:"mce-u"+i++,passed:[],failed:[],count:0}});(a[g]=p).count++;var h,v,b,y=function(){var t=y;!function(){for(var t=e.styleSheets,n=t.length;n--;){var r=t[n].ownerNode;if(r&&r.id===m.id)return f(),1}}()&&(Date.now()-v<l?zh.setTimeout(t):d())};r&&p.passed.push(r),o&&p.failed.push(o),1!==p.status&&(2!==p.status?3!==p.status?(p.status=1,ft(h=Lp.fromTag("link",s.dom),{rel:"stylesheet",type:"text/css",id:p.id}),v=Date.now(),t.contentCssCors&&lt(h,"crossOrigin","anonymous"),t.referrerPolicy&&lt(h,"referrerpolicy",t.referrerPolicy),(m=h.dom).onload=y,m.onerror=d,b=h,qp(Fe(u),b),lt(h,"href",g)):d():f())}function r(e){return wt(function(t){n(e,c(t,f(bh.value(e))),c(t,f(bh.error(e))))})}function o(e){var t=Pp._addCacheSuffix(e);K(a,t).each(function(e){var n;0==--e.count&&(delete a[t],n=e.id,Rt(Fe(u),"#"+n).each($p))})}void 0===t&&(t={});var i=0,a={},u=Lp.fromDom(e),s=Ne(u),l=t.maxLoadTime||5e3;return{load:n,loadAll:function(e,t,n){var o,i=S(e,r);o=i,wt(function(e){var t=[],n=0;0===o.length?e([]):E(o,function(r,i){var a;r.get((a=i,function(r){t[a]=r,++n>=o.length&&e(t)}))})}).get(function(e){var r=N(e,function(e){return e.isValue()});0<r.fail.length?n(r.fail.map(Et)):t(r.pass.map(Et))})},unload:o,unloadAll:function(e){E(e,function(e){o(e)})},_setReferrerPolicy:function(e){t.referrerPolicy=e}}}function Lt(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}function It(e){var t;return function(n){return t=t||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(e,qg),tp(t,we(n))}}function Mt(e){return Ip(e)&&!qh(e)}function Ft(e){return Ip(e)&&"br"===we(e)}function Ut(e){return rv(e)&&(e=e.parentNode),nv(e)&&e.hasAttribute("data-mce-caret")}function zt(e){return rv(e)&&ev(e.data)}function Ht(e){return Ut(e)||zt(e)}function jt(e){return e.firstChild!==e.lastChild||!nh(e.firstChild)}function Vt(e){var t=e.container();return!!Qp(t)&&(t.data.charAt(e.offset())===Zh||e.isAtStart()&&zt(t.previousSibling))}function qt(e){var t=e.container();return!!Qp(t)&&(t.data.charAt(e.offset()-1)===Zh||e.isAtEnd()&&zt(t.nextSibling))}function $t(e){return e&&e.hasAttribute("data-mce-caret")?(rt(n=(t=e.getElementsByTagName("br"))[t.length-1])&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n}function Wt(e){return Ut(e.startContainer)}function Kt(e){return!mv(e)&&(cv(e)?!lv(e.parentNode):fv(e)||sv(e)||dv(e)||gv(e))}function Xt(e,t){return Kt(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(gv(e))return!1;if(av(e))return!0}return!0}(e,t)}function Yt(e){return pv.test(e)}function Gt(e,t){return Kt(e)&&!1===(a=t,Qp(i=e)&&Yt(i.data)&&!1===(n=i,r=Lp.fromDom(a),At(Lp.fromDom(n),"pre,code",g(he,r)).isSome()))||Gp(o=e)&&"A"===o.nodeName&&!o.hasAttribute("href")&&(o.hasAttribute("name")||o.hasAttribute("id"))||hv(e);var n,r,o,i,a}function Jt(e,t){return function(e,t){var n=0;if(Gt(e,e))return!1;var r=e.firstChild;if(!r)return!0;var o=new jh(r,e);do{if(t){if(bv(r)){r=o.next(!0);continue}if(vv(r)){r=o.next();continue}}if(nh(r))n++,r=o.next();else{if(Gt(r,e))return!1;r=o.next()}}while(r);return n<=1}(e.dom,t=void 0===t||t)}function Qt(e,t){return u(e)&&(Gt(e,t)||Mt(Lp.fromDom(e)))}function Zt(e){return"span"===e.nodeName.toLowerCase()&&"bookmark"===e.getAttribute("data-mce-type")}function en(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Nv[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}}function tn(e,t){return e.replace(t?xv:wv,function(e){return Nv[e]||e})}function nn(e,t){return e.replace(t?xv:wv,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Nv[e]||"&#"+e.charCodeAt(0)+";"})}function rn(e,t,n){return n=n||Av,e.replace(t?xv:wv,function(e){return Nv[e]||n[e]||e})}function on(e,t){return(e=Pp.trim(e))?e.split(t||" "):[]}function an(e,t){var n=Ov(e," ",Ov(e.toUpperCase()," "));return Pv(n,t)}function un(e){return an("td th li dt dd figcaption caption details summary",e.getTextBlockElements())}function sn(e,t){var n;return e&&(n={},Bv(e="string"==typeof e?{"*":e}:e,function(e,r){n[r]=n[r.toUpperCase()]=("map"===t?Ov:Lv)(e,/[, ]/)})),n}function cn(e){function t(t,n,r){var o=e[t];return o?o=Ov(o,/[, ]/,Ov(o.toUpperCase(),/[, ]/)):(o=Dv[t])||(o=an(n,r),Dv[t]=o),o}function n(e,t,n){function r(e,t){for(var n={},r=0,o=e.length;r<o;r++)n[e[r]]=t||{};return n}var o,i;t=t||"","string"==typeof(n=n||[])&&(n=on(n));for(var a=on(e),u=a.length;u--;)i={attributes:r(o=on([d,t].join(" "))),attributesOrder:o,children:r(n,Tv)},b[a[u]]=i}function r(e,t){for(var n,r,o,i=on(e),a=i.length,u=on(t);a--;)for(n=b[i[a]],r=0,o=u.length;r<o;r++)n.attributes[u[r]]={},n.attributesOrder.push(u[r])}function o(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function i(e){var t,n,r,i,a,u,s,c,l,f,d,m,g,p,h,v,b,C,w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,E=/[*?+]/;if(e){var k=on(e,",");for(y["@"]&&(v=y["@"].attributes,b=y["@"].attributesOrder),t=0,n=k.length;t<n;t++)if(a=w.exec(k[t])){if(p=a[1],l=a[2],h=a[3],c=a[5],u={attributes:m={},attributesOrder:g=[]},"#"===p&&(u.paddEmpty=!0),"-"===p&&(u.removeEmpty=!0),"!"===a[4]&&(u.removeEmptyAttrs=!0),v&&(j(v,function(e,t){m[t]=e}),g.push.apply(g,b)),c)for(r=0,i=(c=on(c,"|")).length;r<i;r++)(a=S.exec(c[r]))&&(s={},d=a[1],f=a[2].replace(/[\\:]:/g,":"),p=a[3],C=a[4],"!"===d&&(u.attributesRequired=u.attributesRequired||[],u.attributesRequired.push(f),s.required=!0),"-"!==d?(p&&("="===p&&(u.attributesDefault=u.attributesDefault||[],u.attributesDefault.push({name:f,value:C}),s.defaultValue=C),":"===p&&(u.attributesForced=u.attributesForced||[],u.attributesForced.push({name:f,value:C}),s.forcedValue=C),"<"===p&&(s.validValues=Ov(C,"?"))),E.test(f)?(u.attributePatterns=u.attributePatterns||[],s.pattern=o(f),u.attributePatterns.push(s)):(m[f]||g.push(f),m[f]=s)):(delete m[f],g.splice(Iv(g,f),1)));v||"@"!==l||(v=m,b=g),h&&(u.outputName=l,y[h]=u),E.test(l)?(u.pattern=o(l),x.push(u)):y[l]=u}}}function a(e){y={},x=[],i(e),Bv(E,function(e,t){C[t]=e.children})}function u(e){var t=/^(~)?(.+)$/;e&&(Dv.text_block_elements=Dv.block_elements=null,Bv(on(e,","),function(e){var n,r=t.exec(e),o="~"===r[1],i=o?"span":"div",a=r[2];C[a]=C[i],w[a]=i,o||(I[a.toUpperCase()]={},I[a]={}),y[a]||(n=y[i],delete(n=Pv({},n)).removeEmptyAttrs,delete n.removeEmpty,y[a]=n),Bv(C,function(e,t){e[i]&&(C[t]=e=Pv({},C[t]),e[a]=e[i])})}))}function s(t){var n=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;Dv[e.schema]=null,t&&Bv(on(t,","),function(e){var t,r,o=n.exec(e);o&&(r=o[1],t=r?C[o[2]]:C[o[2]]={"#comment":{}},t=C[o[2]],Bv(on(o[3],"|"),function(e){"-"===r?delete t[e]:t[e]={}}))})}function c(e){var t,n=y[e];if(n)return n;for(t=x.length;t--;)if((n=x[t]).pattern.test(e))return n}var l,d,m,g,p,h,v,b,y={},C={},x=[],w={},S={},E=(l=(e=e||{}).schema,b={},Dv[l]||(d="id accesskey class dir lang style tabindex title role",m="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",g="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==l&&(d+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",m+=" article aside details dialog figure main header footer hgroup section nav",g+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==l&&(d+=" xml:lang",g=[g,v="acronym applet basefont big font strike tt"].join(" "),Bv(on(v),function(e){n(e,"",g)}),m=[m,h="center dir isindex noframes"].join(" "),p=[m,g].join(" "),Bv(on(h),function(e){n(e,"",p)})),p=p||[m,g].join(" "),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",p),n("address dt dd div caption","",p),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",g),n("blockquote","cite",p),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",p),n("dl","","dt dd"),n("a","href target rel media hreflang type",g),n("q","cite",g),n("ins del","cite datetime",p),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",p),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",[p,"param"].join(" ")),n("param","name value"),n("map","name",[p,"area"].join(" ")),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"===l?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",p),n("th","colspan rowspan headers scope abbr",p),n("form","accept-charset action autocomplete enctype method name novalidate target",p),n("fieldset","disabled form name",[p,"legend"].join(" ")),n("label","form for",g),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===l?p:g),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",[p,"li"].join(" ")),n("noscript","",p),"html4"!==l&&(n("wbr"),n("ruby","",[g,"rt rp"].join(" ")),n("figcaption","",p),n("mark rt rp summary bdi","",g),n("canvas","width height",p),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[p,"track source"].join(" ")),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[p,"track source"].join(" ")),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",[g,"option"].join(" ")),n("article section nav aside main header footer","",p),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",[p,"figcaption"].join(" ")),n("time","datetime",g),n("dialog","open",p),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",g),n("progress","value max",g),n("meter","value min max low high optimum",g),n("details","open",[p,"summary"].join(" ")),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==l&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!==l&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("img","loading"),r("iframe","sandbox seamless allowfullscreen loading")),Bv(on("a form meter progress dfn"),function(e){b[e]&&delete b[e].children[e]}),delete b.caption.children.table,delete b.script,Dv[l]=b));!1===e.verify_html&&(e.valid_elements="*[*]");var k=sn(e.valid_styles),N=sn(e.invalid_styles,"map"),_=sn(e.valid_classes,"map"),A=t("whitespace_elements","pre script noscript style textarea video audio iframe object code"),R=t("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),D=t("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),T=t("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),O="td th iframe video audio object script code",B=t("non_empty_elements",O+" pre",D),P=t("move_caret_before_on_enter_elements",O+" table",D),L=t("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),I=t("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",L),M=t("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");Bv((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){S[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?a(e.valid_elements):(Bv(E,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},C[t]=e.children}),"html5"!==e.schema&&Bv(on("strong/b em/i"),function(e){var t=on(e,"/");y[t[1]].outputName=t[0]}),Bv(M,function(t,n){y[n]&&(e.padd_empty_block_inline_children&&(y[n].paddInEmptyBlock=!0),y[n].removeEmpty=!0)}),Bv(on("ol ul blockquote a table tbody"),function(e){y[e]&&(y[e].removeEmpty=!0)}),Bv(on("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){y[e].paddEmpty=!0}),Bv(on("span"),function(e){y[e].removeEmptyAttrs=!0})),u(e.custom_elements),s(e.valid_children),i(e.extended_valid_elements),s("+ol[ul|ol],+ul[ul|ol]"),Bv({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){y[t]&&(y[t].parentsRequired=on(e))}),e.invalid_elements&&Bv(Lv(e.invalid_elements),function(e){y[e]&&delete y[e]}),c("span")||i("span[!data-mce-type|*]");var F=f(k),U=f(N),z=f(_),H=f(T),V=f(I),q=f(L),$=f(M),W=f(D),K=f(R),X=f(B),Y=f(P),G=f(A),J=f(S),Q=f(w);return{children:C,elements:y,getValidStyles:F,getValidClasses:z,getBlockElements:V,getInvalidStyles:U,getShortEndedElements:W,getTextBlockElements:q,getTextInlineElements:$,getBoolAttrs:H,getElementRule:c,getSelfClosingElements:K,getNonEmptyElements:X,getMoveCaretBeforeOnEnterElements:Y,getWhiteSpaceElements:G,getSpecialElements:J,isValidChild:function(e,t){var n=C[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=c(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:Q,addValidElements:i,setValidElements:a,addCustomElements:u,addValidChildren:s}}function ln(e,t,n,r){function o(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+o(t)+o(n)+o(r)}function fn(e,t){var n,r,o=this,i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,u=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,c={},l=Jh;e=e||{},t&&(n=t.getValidStyles(),r=t.getInvalidStyles());for(var f=("\\\" \\' \\; \\: ; : "+l).split(" "),d=0;d<f.length;d++)c[f[d]]=l+d,c[l+d]=f[d];return{toHex:function(e){return e.replace(i,ln)},parse:function(t){function n(e,t,n){var r=E[e+"-top"+t];if(r){var o=E[e+"-right"+t];if(o){var i=E[e+"-bottom"+t];if(i){var a=E[e+"-left"+t];if(a){var u=[r,o,i,a];for(d=u.length-1;d--&&u[d]===u[d+1];);-1<d&&n||(E[e+t]=-1===d?u[0]:u.join(" "),delete E[e+"-top"+t],delete E[e+"-right"+t],delete E[e+"-bottom"+t],delete E[e+"-left"+t])}}}}}function r(e){var t,n=E[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return;return E[e]=n[0],1}}function f(e){return C=!0,c[e]}function m(e,t){return C&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t?e:e.replace(/\\([\'\";:])/g,"$1")}function g(e){return String.fromCharCode(parseInt(e.slice(1),16))}function p(e){return e.replace(/\\[0-9a-f]+/gi,g)}function h(t,n,r,o,i,a){if(i=i||a)return"'"+(i=m(i)).replace(/\'/g,"\\'")+"'";if(n=m(n||r||o),!e.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return"url('"+(n=k?k.call(N,n,"style"):n).replace(/\'/g,"\\'")+"')"}var v,b,y,C,x,w,S,E={},k=e.url_converter,N=e.url_converter_scope||o;if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});v=u.exec(t);)u.lastIndex=v.index+v[0].length,b=v[1].replace(s,"").toLowerCase(),y=v[2].replace(s,""),b&&y&&(b=p(b),y=p(y),-1===b.indexOf(l)&&-1===b.indexOf('"')&&(e.allow_script_urls||"behavior"!==b&&!/expression\s*\(|\/\*|\*\//.test(y))&&("font-weight"===b&&"700"===y?y="bold":"color"!==b&&"background-color"!==b||(y=y.toLowerCase()),y=(y=y.replace(i,ln)).replace(a,h),E[b]=C?m(y,!0):y));n("border","",!0),n("border","-width"),n("border","-color"),n("border","-style"),n("padding",""),n("margin",""),w="border-style",S="border-color",r(x="border-width")&&r(w)&&r(S)&&(E.border=E[x]+" "+E[w]+" "+E[S],delete E[x],delete E[w],delete E[S]),"medium none"===E.border&&delete E.border,"none"===E["border-image"]&&delete E["border-image"]}return E},serialize:function(e,t){function o(t){var r,o=n[t];if(o)for(var a=0,u=o.length;a<u;a++)t=o[a],(r=e[t])&&(i+=(0<i.length?" ":"")+t+": "+r+";")}var i="";return t&&n?(o("*"),o(t)):j(e,function(e,n){
161
+ var o;!e||r&&((o=r["*"])&&o[n]||(o=r[t])&&o[n])||(i+=(0<i.length?" ":"")+n+": "+e+";")}),i}}}function dn(e){return e instanceof Event||Hg(e.initEvent)}function mn(e,t,n,r){var o,i,s=function(e){var t,n=null!=r?r:{};for(t in e)tp(Mv,t)||(n[t]=e[t]);return u(n.composedPath)&&(n.composedPath=function(){return e.composedPath()}),n}(t);return s.type=e,a(s.target)&&(s.target=null!==(o=s.srcElement)&&void 0!==o?o:n),(a((i=t).preventDefault)||dn(i))&&(s.preventDefault=function(){s.defaultPrevented=!0,s.isDefaultPrevented=qg,Hg(t.preventDefault)?t.preventDefault():dn(t)&&(t.returnValue=!1)},s.stopPropagation=function(){s.cancelBubble=!0,s.isPropagationStopped=qg,Hg(t.stopPropagation)?t.stopPropagation():dn(t)&&(t.cancelBubble=!0)},s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=qg,s.stopPropagation()},s.isDefaultPrevented!==qg&&s.isDefaultPrevented!==Vg&&(s.isDefaultPrevented=!0===s.defaultPrevented?qg:Vg,s.isPropagationStopped=!0===s.cancelBubble?qg:Vg,s.isImmediatePropagationStopped=Vg)),s}function gn(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function pn(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function hn(e,t){var n,r,o,i,a=mn(e.type,e,document,t);return u(i=e)&&Fv.test(i.type)&&zg(e.pageX)&&!zg(e.clientX)&&(r=(n=a.target.ownerDocument||document).documentElement,o=n.body,a.pageX=e.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),a.pageY=e.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),zg(a.metaKey)&&(a.metaKey=!1),a}function vn(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}function bn(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function yn(){function e(n,r){return t.push(n+" ")>wh.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function Cn(e){return e[zv]=!0,e}function xn(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function wn(e){return Cn(function(t){return t=+t,Cn(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function Sn(e){return e&&typeof e.getElementsByTagName!=Xv&&e}function En(){}function kn(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Nn(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Vv++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,s,c=[jv,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if((u=(s=t[zv]||(t[zv]={}))[r])&&u[0]===jv&&u[1]===i)return c[2]=u[2];if((s[r]=c)[2]=e(t,n,a))return!0}}}function _n(e){return 1<e.length?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function An(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function Rn(e){return void 0!==e}function Dn(e){return"string"==typeof e}function Tn(e,t){var n,r=(t=t||xb).createElement("div"),o=t.createDocumentFragment();for(r.innerHTML=e;n=r.firstChild;)o.appendChild(n);return o}function On(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function Bn(e,t,n){var r,o;return t=Ib(t)[0],e.each(function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)}),e}function Pn(e,t){return new Ib.fn.init(e,t)}function Ln(e){return null==e?"":(""+e).replace(Pb,"")}function In(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e}function Mn(e,t){var n=[];return In(e,function(e,r){t(r,e)&&n.push(r)}),n}function Fn(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof Ib&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&Ib(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r}function Un(e,t,n,r){var o=[];for(r instanceof Ib&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&Ib(e).is(r))break}o.push(e)}return o}function zn(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null}function Hn(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName)||null;t.attr("data-mce-style",r)}function jn(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o}function Vn(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}function qn(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function $n(){return K(Wb,Kb.get())}function Wn(){function e(){return n.get().each(t)}var t,n,r=(t=s,n=qn(Kg.none()),{clear:function(){e(),n.set(Kg.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(t){e(),n.set(Kg.some(t))}});return rp(rp({},r),{on:function(e){return r.get().each(e)}})}function Kn(e,t){var n=null;return{cancel:function(){Fg(n)||(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];Fg(n)&&(n=setTimeout(function(){n=null,e.apply(null,r)},t))}}}function Xn(e,t){function n(){Fg(r)||(clearTimeout(r),r=null)}var r=null;return{cancel:n,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n(),r=setTimeout(function(){r=null,e.apply(null,o)},t)}}}function Yn(e,t){var n=dt(e,t);return void 0===n||""===n?[]:n.split(" ")}function Gn(e){return void 0!==e.dom.classList}function Jn(e,t){var n,r,o;Gn(e)?e.dom.classList.add(t):(r=t,o=Yn(n=e,"class").concat([r]),lt(n,"class",o.join(" ")))}function Qn(e,t){return Gn(e)&&e.dom.classList.contains(t)}function Zn(e,t){return pe(n=void 0===e?document:e.dom)?[]:S(n.querySelectorAll(t),Lp.fromDom);var n}function er(e,t){function n(e,t){return(n=e.dom)&&n.hasAttribute&&n.hasAttribute(t)?Kg.some(dt(e,t)):Kg.none();var n}var r=e.selection.getRng(),o=Lp.fromDom(r.startContainer),i=Lp.fromDom(e.getBody()),a=t.fold(function(){return"."+Jb()},function(e){return"["+Qb()+'="'+e+'"]'});return Dt(Be(o,r.startOffset).getOr(o),a,function(e){return he(e,i)}).bind(function(t){return n(t,""+Zb()).bind(function(r){return n(t,""+Qb()).map(function(t){var n=ey(e,r);return{uid:r,name:t,elements:n}})})})}function tr(e){function t(){return{listeners:[],previous:Wn()}}function n(e,t){r(e,function(e){return t(e),e})}function r(e,n){var r=o.get(),i=n(K(r,e).getOrThunk(t));r[e]=i,o.set(r)}var o=qn({}),i=Xn(function(){var t=o.get();E(M(Qg(t)),function(t){r(t,function(r){var o=r.previous.get();return er(e,Kg.some(t)).fold(function(){var e;o.isSome()&&(n(e=t,function(t){E(t.listeners,function(t){return t(!1,e)})}),r.previous.clear())},function(e){var t,i,a,u=e.uid,s=e.name,c=e.elements;at(o,u)||(i=u,a=c,n(t=s,function(e){E(e.listeners,function(e){return e(!0,t,{uid:i,nodes:S(a,function(e){return e.dom})})})}),r.previous.set(u))}),{previous:r.previous,listeners:r.listeners}})})},30);return e.on("remove",function(){i.cancel()}),e.on("NodeChange",function(){i.throttle()}),{addListener:function(e,t){r(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}}function nr(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++ty+String(t)}function rr(e,t){var n,r,o=ke(e).dom,i=Lp.fromDom(o.createDocumentFragment());Ve(i,(n=t,(r=(o||document).createElement("div")).innerHTML=n,zp(Lp.fromDom(r)))),qe(e),qp(e,i)}function or(e,t){return Lp.fromDom(e.dom.cloneNode(t))}function ir(e){return or(e,!1)}function ar(e){return or(e,!0)}function ur(e,t,n){function r(e){for(var t;(t=o[e]())&&!Qp(t)&&!n(t););return Kg.from(t).filter(Qp)}void 0===n&&(n=Vg);var o=new jh(e,t);return{current:function(){return Kg.from(o.current()).filter(Qp)},next:function(){return r("next")},prev:function(){return r("prev")},prev2:function(){return r("prev2")}}}function sr(e,t){var n=t||function(t){return e.isBlock(t)||nh(t)||ih(t)},r=function(e,t,n,o){if(Qp(e)){var i=o(e,t,e.data);if(-1!==i)return Kg.some({container:e,offset:i})}return n().bind(function(e){return r(e.container,e.offset,n,o)})};return{backwards:function(e,t,o,i){var a=ur(e,i,n);return r(e,t,function(){return a.prev().map(function(e){return{container:e,offset:e.length}})},o).getOrNull()},forwards:function(e,t,o,i){var a=ur(e,i,n);return r(e,t,function(){return a.next().map(function(e){return{container:e,offset:0}})},o).getOrNull()}}}function cr(e){return e?{left:ny(e.left),top:ny(e.top),bottom:ny(e.bottom),right:ny(e.right),width:ny(e.width),height:ny(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function lr(e,t){return e=cr(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e}function fr(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function dr(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&fr(t.top-e.bottom,e,t)}function mr(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&fr(t.bottom-e.top,e,t)}function gr(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function pr(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function hr(e,t){if(Gp(e)&&e.hasChildNodes()){var n=e.childNodes;return n[(r=n.length-1,Math.min(Math.max(t,0),r))]}return e;var r}function vr(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&ry.test(e)}function br(e){return"createRange"in e?e.createRange():Hb.DOM.createRng()}function yr(e){return e&&/[\r\n\t ]/.test(e)}function Cr(e){return e.setStart&&e.setEnd}function xr(e){var t=e.startContainer,n=e.startOffset;if(yr(e.toString())&&cy(t.parentNode)&&Qp(t)){var r=t.data;return yr(r[n-1])||yr(r[n+1])?1:void 0}}function wr(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom}function Sr(e,t){var n=lr(e,t);return n.width=1,n.right=n.left+1,n}function Er(e,t){Qp(t)&&0===t.data.length&&e.remove(t)}function kr(e,t,n){var r,o,i,a,u,s,c;th(n)?(i=e,a=t,s=Kg.from((u=n).firstChild),c=Kg.from(u.lastChild),a.insertNode(u),s.each(function(e){return Er(i,e.previousSibling)}),c.each(function(e){return Er(i,e.nextSibling)})):(r=e,t.insertNode(o=n),Er(r,o.previousSibling),Er(r,o.nextSibling))}function Nr(e){return function(t){return e===t}}function _r(e){var t,n,r,o;return(by(e)?"text()":e.nodeName.toLowerCase())+"["+(r=ee(n=wy(xy(t=e)),Nr(t),t),o=Z(n=n.slice(0,r+1),function(e,t,r){return by(t)&&by(n[r-1])&&e++,e},0),ee(n=J(n,et([t.nodeName])),Nr(t),t)-o)+"]"}function Ar(e,t){var n,r,o,i=[],a=t.container(),u=t.offset();return by(a)?n=function(e,t){for(;(e=e.previousSibling)&&by(e);)t+=e.data.length;return t}(a,u):(u>=(r=a.childNodes).length?(n="after",u=r.length-1):n="before",a=r[u]),i.push(_r(a)),o=J(function(e,t){var n=[];for(t=t.parentNode;t!==e;t=t.parentNode)n.push(t);return n}(e,a),p(rt)),(i=i.concat(G(o,_r))).reverse().join("/")+","+n}function Rr(e,t){if(!t)return null;var n=t.split(","),r=n[0].split("/"),o=1<n.length?n[1]:"before",i=Z(r,function(e,t){var n,r,o,i,a=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return a?("text()"===a[1]&&(a[1]="#text"),n=e,r=a[1],o=parseInt(a[2],10),(i=J(i=J(i=wy(n),function(e,t){return!by(e)||!by(i[t-1])}),et([r])))[o]):null},e);return i?by(i)?function(e,t){for(var n,r=e,o=0;by(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!by(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return by(e)&&t>e.data.length&&(t=e.data.length),py(e,t)}(i,parseInt(o,10)):(o="after"===o?Cy(i)+1:Cy(i),py(i.parentNode,o)):null}function Dr(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(Qp(a)?s.push(n?function(e,t,n){for(var r=e(t.data.slice(0,n)).length,o=t.previousSibling;o&&Qp(o);o=o.previousSibling)r+=e(o.data).length;return r}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s}function Tr(e,t,n){var r=0;return Pp.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r}function Or(e,t){var n,r=t?"start":"end",o=e[r+"Container"],i=e[r+"Offset"];Gp(o)&&"TR"===o.nodeName&&(o=(n=o.childNodes)[Math.min(t?i:i-1,n.length-1)])&&(i=t?0:o.childNodes.length,e["set"+(t?"Start":"End")](o,i))}function Br(e){return Or(e,!0),Or(e,!1),e}function Pr(e,t){var n;return Gp(e)&&(e=hr(e,t),Sy(e))?e:Ht(e)?(n=(e=Qp(e)&&Ut(e)?e.parentNode:e).previousSibling,Sy(n)?n:(n=e.nextSibling,Sy(n)?n:void 0)):void 0}function Lr(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Sy(r)||"IMG"===o)return{name:o,index:Tr(n.dom,o,r)};var a,u,s,c,l,f,d,m=Pr((a=i).startContainer,a.startOffset)||Pr(a.endContainer,a.endOffset);return m?{name:o=m.tagName,index:Tr(n.dom,o,m)}:(f=(s=n).dom,(d={}).start=Dr(f,u=e,c=t,l=i,!0),s.isCollapsed()||(d.end=Dr(f,u,c,l,!1)),Wt(l)&&(d.isFakeCaret=!0),d)}function Ir(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)}function Mr(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Tr(n,u,a)};var s=Br(r.cloneRange());return i||(s.collapse(!1),kr(n,s,Ir(n,o+"_end",t))),(r=Br(r)).collapse(!0),kr(n,r,Ir(n,o+"_start",t)),e.moveToBookmark({id:o,keep:!0}),{id:o}}function Fr(e,t,n){var r=e.getParam(t,n);return-1===r.indexOf("=")?r:K(e.getParam(t,"","hash"),e.id).getOr(n)}function Ur(e){return e.getParam("content_security_policy","")}function zr(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t}function Hr(e){return e.getParam("forced_root_block_attrs",{})}function jr(e){return e.getParam("automatic_uploads",!0,"boolean")}function Vr(e){return e.getParam("icons","","string")}function qr(e){return e.getParam("referrer_policy","","string")}function $r(e){return e.getParam("language","en","string")}function Wr(e){return e.getParam("indent_use_margin",!1)}function Kr(e){var t=e.getParam("font_css",[]);return Mg(t)?t:S(t.split(","),up)}function Xr(e){var t=e.getParam("object_resizing");return!1!==t&&!Tp.iOS&&(Lg(t)?t:"table,img,figure.image,div,video,iframe")}function Yr(e){return e.getParam("event_root")}function Gr(e){return e.getParam("theme")}function Jr(e){return!1!==e.getParam("inline_boundaries")}function Qr(e){return e.getParam("plugins","","string")}function Zr(e){var t=e.parentNode;t&&t.removeChild(e)}function eo(e){var t=tv(e);return{count:e.length-t.length,text:t}}function to(e){for(var t;-1!==(t=e.data.lastIndexOf(Zh));)e.deleteData(t,1)}function no(e,t){return Ay(e),t}function ro(e,t){var n,r=t.container(),o=(-1===(n=C(Jg(r.childNodes),e))?Kg.none():Kg.some(n)).map(function(e){return e<t.offset()?py(r,t.offset()-1):t}).getOr(t);return Ay(e),o}function oo(e,t){return py.isTextPosition(t)?(r=t,_y(n=e)&&r.container()===n?(a=eo((o=n).data.substr(0,(i=r).offset())),u=eo(o.data.substr(i.offset())),0<(a.text+u.text).length?(to(o),py(o,i.offset()-a.count)):i):no(n,r)):(s=e,((c=t).container()===s.parentNode?ro:no)(s,c));var n,r,o,i,a,u,s,c}function io(e,t,n){var r,o,i,a=lr(t.getBoundingClientRect(),n),u="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(i=e.getBoundingClientRect(),o=e.scrollLeft-i.left,e.scrollTop-i.top);a.left+=o,a.right+=o,a.top+=u,a.bottom+=u,a.width=1;var s=t.offsetWidth-t.clientWidth;return 0<s&&(n&&(s*=-1),a.left+=s,a.right+=s),a}function ao(e,t,n,r){function o(){!function(){for(var e=Zn(Lp.fromDom(t),"*[contentEditable=false],video,audio,embed,object"),n=0;n<e.length;n++){var r,o=e[n].dom,i=o.previousSibling;iv(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(r.length-1,1)),i=o.nextSibling,ov(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(0,1))}}(),a&&(Ay(a),a=null),u.on(function(e){Ib(e.caret).remove(),u.clear()}),i&&(zh.clearInterval(i),i=void 0)}var i,a,u=Wn(),s=zr(e),c=0<s.length?s:"p";return{show:function(e,s){var l;if(o(),Oy(s))return null;if(!n(s))return a=function(e,t){var n=e.ownerDocument.createTextNode(Zh),r=e.parentNode;if(t){if(o=e.previousSibling,rv(o)){if(Ht(o))return o;if(iv(o))return o.splitText(o.data.length-1)}r.insertBefore(n,e)}else{var o=e.nextSibling;if(rv(o)){if(Ht(o))return o;if(ov(o))return o.splitText(1),o}e.nextSibling?r.insertBefore(n,e.nextSibling):r.appendChild(n)}return n}(s,e),l=s.ownerDocument.createRange(),By(a.nextSibling)?(l.setStart(a,0),l.setEnd(a,0)):(l.setStart(a,1),l.setEnd(a,1)),l;a=function(e,t,n){var r,o=t.ownerDocument.createElement(e);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((r=document.createElement("br")).setAttribute("data-mce-bogus","1"),r));var i=t.parentNode;return n?i.insertBefore(o,t):t.nextSibling?i.insertBefore(o,t.nextSibling):i.appendChild(o),o}(c,s,e);var f=io(t,s,e);Ib(a).css("top",f.top);var d=Ib('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(rp({},f)).appendTo(t)[0];return u.set({caret:d,element:s,before:e}),e&&Ib(d).addClass("mce-visual-caret-before"),i=zh.setInterval(function(){r()?Ib("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):Ib("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")},500),(l=s.ownerDocument.createRange()).setStart(a,0),l.setEnd(a,0),l},hide:o,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){u.on(function(e){var n=io(t,e.element,e.before);Ib(e.caret).css(rp({},n))})},destroy:function(){return zh.clearInterval(i)}}}function uo(){return Ry.isIE()||Ry.isEdge()||Ry.isFirefox()}function so(e){return By(e)||ot(e)&&uo()}function co(e,t){for(var n;n=e(t);)if(!Fy(n))return n;return null}function lo(e,t,n,r,o){var i=new jh(e,r),a=Py(e)||Fy(e);if(t<0){if(a&&n(e=co(i.prev.bind(i),!0)))return e;for(;e=co(i.prev.bind(i),o);)if(n(e))return e}if(0<t){if(a&&n(e=co(i.next.bind(i),!0)))return e;for(;e=co(i.next.bind(i),o);)if(n(e))return e}return null}function fo(e,t){for(;e&&e!==t;){if(Iy(e))return e;e=e.parentNode}return null}function mo(e,t,n){return fo(e.container(),n)===fo(t.container(),n)}function go(e,t){if(!t)return null;var n=t.container(),r=t.offset();return Uy(n)?n.childNodes[r+e]:null}function po(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function ho(e,t,n){for(var r,o,i=e?"previousSibling":"nextSibling";n&&n!==t;){var a=n[i];if(My(a)&&(a=a[i]),Py(a)||Ly(a)){if(o=n,fo(a,r=t)===fo(o,r))return a;break}if(zy(a))break;n=n.parentNode}return null}function vo(e,t,n){var r,o=g(ho,!0,t),i=g(ho,!1,t),a=n.startContainer,u=n.startOffset;if(Ut(a)){var s=(a=Uy(a)?a:a.parentNode).getAttribute("data-mce-caret");if("before"===s&&so(r=a.nextSibling))return Hy(r);if("after"===s&&so(r=a.previousSibling))return jy(r)}if(!n.collapsed)return n;if(Qp(a)){if(My(a)){if(1===e){if(r=i(a))return Hy(r);if(r=o(a))return jy(r)}if(-1===e){if(r=o(a))return jy(r);if(r=i(a))return Hy(r)}return n}if(iv(a)&&u>=a.data.length-1)return 1===e&&(r=i(a))?Hy(r):n;if(ov(a)&&u<=1)return-1===e&&(r=o(a))?jy(r):n;if(u===a.data.length)return(r=i(a))?Hy(r):n;if(0===u)return(r=o(a))?jy(r):n}return n}function bo(e,t){return Kg.from(go(e?0:-1,t)).filter(Py)}function yo(e,t,n){var r=vo(e,t,n);return-1===e?py.fromRangeStart(r):py.fromRangeEnd(r)}function Co(e){return Kg.from(e.getNode()).map(Lp.fromDom)}function xo(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function wo(e,t){var n=mo(e,t);return!(n||!nh(e.getNode()))||n}function So(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function Eo(e,t){if(0<e){if(Gy(t.previousSibling)&&!Ky(t.previousSibling))return py.before(t);if(Ky(t))return py(t,0)}if(e<0){if(Gy(t.nextSibling)&&!Ky(t.nextSibling))return py.after(t);if(Ky(t))return py(t,t.data.length)}return e<0&&!Yy(t)?py.after(t):py.before(t)}function ko(e){return{next:function(t){return Qy(hy.Forwards,t,e)},prev:function(t){return Qy(hy.Backwards,t,e)}}}function No(e){return py.isTextPosition(e)?0===e.offset():Kt(e.getNode())}function _o(e){if(py.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Kt(e.getNode(!0))}function Ao(e,t){return!py.isTextPosition(e)&&!py.isTextPosition(t)&&e.getNode()===t.getNode(!0)}function Ro(e,t,n){return Zy(e,t,n).bind(function(r){return mo(n,r,t)&&(o=n,i=r,e?!Ao(o,i)&&(py.isTextPosition(a=o)||!nh(a.getNode()))&&_o(o)&&No(i):!Ao(i,o)&&No(o)&&_o(i))?Zy(e,t,r):Kg.some(r);var o,i,a})}function Do(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return Qp(u)?Kg.some(py(u,e?0:u.data.length)):u?Kt(u)?Kg.some(e?py.before(u):nh(a=u)?py.before(a):py.after(a)):(r=t,o=u,i=(n=e)?py.before(o):py.after(o),Zy(n,r,i)):Kg.none()}function To(e){return Gp(e)&&e.id===iC}function Oo(e,t){for(;t&&t!==e;){if(t.id===iC)return t;t=t.parentNode}return null}function Bo(e){return Pp.isArray(e.start)}function Po(e,t){return Gp(t)&&e.isBlock(t)&&!t.innerHTML&&!Tp.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t}function Lo(e,t,n){return!1===t.hasChildNodes()&&Oo(e,t)&&(o=n,i=(r=t).ownerDocument.createTextNode(Zh),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),1);var r,o,i}function Io(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,Lo(c,i,r))return 1;if(s[o]>u.length-1)return Lo(c,i,r)||function(e){return oC(i).fold(Vg,function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0})}(r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return 1}function Mo(e){return Qp(e)&&0<e.data.length}function Fo(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,o="start"===t?l?c.hasChildNodes()?(r=c.firstChild,1):Mo(c.nextSibling)?(r=c.nextSibling,0):Mo(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)+1):e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,1):Mo(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)):e.nodeIndex(c),u=r,s=o,!l){for(a=c.previousSibling,i=c.nextSibling,Pp.each(Pp.grep(c.childNodes),function(e){Qp(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&Qp(a)&&!Tp.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),u=a,s=o)}return Kg.some(py(u,s))}return Kg.none()}function Uo(e,t){(function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,g=e.dom;if(t){if(Bo(t))return d=t,m=(f=g).createRng(),Io(f,!0,d,m)&&Io(f,!1,d,m)?Kg.some(m):Kg.none();if(Lg(t.start))return Kg.some((s=t,c=(u=g).createRng(),l=Rr(u.getRoot(),s.start),c.setStart(l.container(),l.offset()),l=Rr(u.getRoot(),s.end),c.setEnd(l.container(),l.offset()),c));if(tp(t,"id"))return ut(a=Fo(o=g,"start",i=t),Fo(o,"end",i).or(a),function(e,t){var n=o.createRng();return n.setStart(Po(o,e.container()),e.offset()),n.setEnd(Po(o,t.container()),t.offset()),n});if(tp(t,"name"))return n=g,Kg.from(n.select((r=t).name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(tp(t,"rng"))return Kg.some(t.rng)}return Kg.none()})(e,t).each(function(t){e.setRng(t)})}function zo(e){return Gp(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}function Ho(e){return""!==e&&-1!==" \f\n\r\t\x0B".indexOf(e)}function jo(e){return!Ho(e)&&!uC(e)}function Vo(e){return e.nodeType}function qo(e,t,n){var r,o=n.startOffset,i=n.startContainer;if((i!==n.endContainer||!(r=i.childNodes[o])||!/^(IMG)$/.test(r.nodeName))&&Gp(i)){var a=i.childNodes,u=void 0;o<a.length?(i=a[o],u=new jh(i,e.getParent(i,e.isBlock))):(i=a[a.length-1],(u=new jh(i,e.getParent(i,e.isBlock))).next(!0));for(var s=u.current();s;s=u.next())if(Qp(s)&&!sC(s))return n.setStart(s,0),t.setRng(n),0}}function $o(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(Gp(e)||!sC(e))return e}}function Wo(e,t){return Vo(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]}function Ko(e,t,n){return e.schema.isValidChild(t,n)}function Xo(e,t){return Hg(e)?e=e(t):u(t)&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function Yo(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()}function Go(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),""+("fontFamily"===n?t.replace(/[\'\"]/g,"").replace(/,\s+/g,","):t)}function Jo(e,t,n){return Go(e,e.getStyle(t,n),n)}function Qo(e,t){var n;return e.getParent(t,function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n}),n}function Zo(e,t,n){return e.getParents(t,n,e.getRoot())}function ei(e,t){return w(e.formatter.get(t),function(e){function t(e){return 1<e.length&&"%"===e.charAt(0)}return w(["styles","attributes"],function(n){return K(e,n).exists(function(e){var n,r;return w(Mg(e)?e:(n=d,r=[],j(e,function(e,t){r.push(n(e,t))}),r),t)})})})}function ti(e){return X(e,"block")}function ni(e){return X(e,"selector")}function ri(e){return X(e,"inline")}function oi(e){return ni(e)&&!1!==e.expand&&!ri(e)}function ii(e,t){for(var n=t;n;){if(Gp(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t}function ai(e,t,n,r){for(var o=t.data,i=n;e?0<=i:i<o.length;e?i--:i++)if(r(o.charAt(i)))return e?i+1:i;return-1}function ui(e,t,n){return ai(e,t,n,function(e){return uC(e)||Ho(e)})}function si(e,t,n){return ai(e,t,n,jo)}function ci(e,t,n,r,o,i){function a(t,n,r){var i=sr(e),a=o?i.backwards:i.forwards;return Kg.from(a(t,n,function(e,t){return cC(e.parentNode)?-1:r(o,u=e,t)},s))}var u,s=e.getParent(n,e.isBlock)||t;return a(n,r,ui).bind(function(e){return i?a(e.container,e.offset+(o?-1:0),si):Kg.some(e)}).orThunk(function(){return u?Kg.some({container:u,offset:o?0:u.length}):Kg.none()})}function li(e,t,n,r,o){Qp(r)&&se(r.data)&&r[o]&&(r=r[o]);for(var i=lC(e,r),a=0;a<i.length;a++)for(var s=0;s<t.length;s++){var c=t[s];if((!u(c.collapsed)||c.collapsed===n.collapsed)&&ni(c)&&e.is(i[a],c.selector))return i[a]}return r}function fi(e,t,n,r){var o,i=n,a=e.dom,u=a.getRoot(),s=t[0];if((i=ti(s)?s.wrapper?null:a.getParent(n,s.block,u):i)||(o=a.getParent(n,"LI,TD,TH"),i=a.getParent(Qp(n)?n.parentNode:n,function(t){return t!==u&&dC(e,t)},o)),!(i=i&&ti(s)&&s.wrapper&&lC(a,i,"ul,ol").reverse()[0]||i))for(i=n;i[r]&&!a.isBlock(i[r])&&!Yo(i=i[r],"br"););return i||n}function di(e,t,n,r,o){var i,a=n,u=o?"previousSibling":"nextSibling",s=e.getRoot();if(Qp(n)&&!fC(n)&&(o?0<r:r<n.data.length))return n;for(;;){if(!t[0].block_expand&&e.isBlock(a))return a;for(var c=a[u];c;c=c[u]){var l=Qp(c)&&!mC(e,s,c,u);if(!cC(c)&&(!nh(i=c)||!i.getAttribute("data-mce-bogus")||i.nextSibling)&&!fC(c,l))return a}if(a===s||a.parentNode===s){n=a;break}a=a.parentNode}return n}function mi(e){return cC(e.parentNode)||cC(e)}function gi(e,t,n,r){void 0===r&&(r=!1);var o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset,s=e.dom,c=n[0];return Gp(o)&&o.hasChildNodes()&&(o=hr(o,i),Qp(o)&&(i=0)),Gp(a)&&a.hasChildNodes()&&(a=hr(a,t.collapsed?u:u-1),Qp(a)&&(u=a.nodeValue.length)),o=ii(s,o),a=ii(s,a),mi(o)&&(o=cC(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,Qp(o)&&(i=t.collapsed?o.length:0)),mi(a)&&(a=cC(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,Qp(a)&&(u=t.collapsed?0:a.length)),t.collapsed&&(ci(s,e.getBody(),o,i,!0,r).each(function(e){var t=e.container,n=e.offset;o=t,i=n}),ci(s,e.getBody(),a,u,!1,r).each(function(e){var t=e.container,n=e.offset;a=t,u=n})),(ri(c)||c.block_expand)&&(ri(c)&&Qp(o)&&0!==i||(o=di(s,n,o,i,!0)),ri(c)&&Qp(a)&&u!==a.nodeValue.length||(a=di(s,n,a,u,!1))),oi(c)&&(o=li(s,n,t,o,"previousSibling"),a=li(s,n,t,a,"nextSibling")),(ti(c)||ni(c))&&(o=fi(e,n,o,"previousSibling"),a=fi(e,n,a,"nextSibling"),ti(c)&&(s.isBlock(o)||(o=di(s,n,o,i,!0)),s.isBlock(a)||(a=di(s,n,a,u,!1)))),Gp(o)&&(i=s.nodeIndex(o),o=o.parentNode),Gp(a)&&(u=s.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}}function pi(e,t,n){function r(e){var t=e[0];Qp(t)&&t===s&&u>=t.data.length&&e.splice(0,1);var n=e[e.length-1];return 0===c&&0<e.length&&n===l&&Qp(n)&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r}function i(t,n){return e.getParent(t,function(e){return e.parentNode===n},n)}function a(e,t,i){var a=i?"nextSibling":"previousSibling",u=e;for(u.parentNode;u&&u!==t;u=s){var s=u.parentNode,c=o(u===e?u:u[a],a);c.length&&(i||c.reverse(),n(r(c)))}}var u=t.startOffset,s=hr(t.startContainer,u),c=t.endOffset,l=hr(t.endContainer,c-1);if(s===l)return n(r([s]));var f=e.findCommonAncestor(s,l);if(e.isChildOf(s,l))return a(s,f,!0);if(e.isChildOf(l,s))return a(l,f);var d=i(s,f)||s,m=i(l,f)||l;a(s,d,!0);var g=o(d===s?d:d.nextSibling,"nextSibling",m===l?m.nextSibling:m);g.length&&n(r(g)),a(l,m)}function hi(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t}function vi(e,t){var n=Zn(t,"td[data-mce-selected],th[data-mce-selected]");return 0<n.length?n:_(B(e,function(e){var t=pr(e);return t?[Lp.fromDom(t)]:[]}),Yh)}function bi(e){return vi(hi(e.selection.getSel()),Lp.fromDom(e.getBody()))}function yi(e,t){return At(e,"table",t)}function Ci(e,t){return ut((o=t.startContainer,i=t.startOffset,Qp(o)?0===i?Kg.some(Lp.fromDom(o)):Kg.none():Kg.from(o.childNodes[i]).map(Lp.fromDom)),(n=t.endContainer,r=t.endOffset,Qp(n)?r===n.data.length?Kg.some(Lp.fromDom(n)):Kg.none():Kg.from(n.childNodes[r-1]).map(Lp.fromDom)),function(t,n){var r=T(gC(e),g(he,t)),o=T(pC(e),g(he,n));return r.isSome()&&o.isSome()}).getOr(!1);var n,r,o,i}function xi(e,t,n,r){var o=n,i=new jh(n,o),a=W(e.schema.getMoveCaretBeforeOnEnterElements(),function(e,t){return!x(["td","th","table"],t.toLowerCase())});do{if(Qp(n)&&0!==Pp.trim(n.nodeValue).length)return r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length),0;if(a[n.nodeName])return r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n),0}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))}function wi(e){var t=e.selection.getSel();return t&&0<t.rangeCount}function Si(e,t){var n=bi(e);0<n.length?E(n,function(n){var r=n.dom,o=e.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),t(o,!0)}):t(e.selection.getRng(),!1)}function Ei(e,t,n){var r=Mr(e,t);n(r),e.moveToBookmark(r)}function ki(e){return hC.get(e)}function Ni(e,t,n,r){var o=t.uid,i=void 0===o?nr("mce-annotation"):o,a=function(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}(t,["uid"]),u=Lp.fromTag("span",e);Jn(u,Jb()),lt(u,""+Zb(),i),lt(u,""+Qb(),n);var s,c=r(i,a),l=c.attributes,f=c.classes,d=void 0===f?[]:f;return ft(u,void 0===l?{}:l),s=u,E(d,function(e){Jn(s,e)}),u}function _i(e,t,n,r,o){function i(){c.clear()}function a(e){E(e,l)}var u=[],s=Ni(e.getDoc(),o,n,r),c=Wn(),l=function(t){var n,r,o,l,f,d;switch(o=e,f="span",d=we(l=t),Ae(l).fold(function(){return"skipping"},function(e){return"br"===d||Mp(n=l)&&ki(n)===Zh?"valid":Ip(t=l)&&Qn(t,Jb())?"existing":To(l.dom)?"caret":Ko(o,f,d)&&Ko(o,we(e),f)?"valid":"invalid-child";var t,n})){case"invalid-child":i(),a(zp(t)),i();break;case"valid":ze(n=t,r=c.get().getOrThunk(function(){var e=ir(s);return u.push(e),c.set(e),e})),qp(r,n)}};return pi(e.dom,t,function(e){i(),a(S(e,Lp.fromDom))}),u}function Ai(e){var t,n,r,o=(t={},{register:function(e,n){t[e]={name:e,settings:n}},lookup:function(e){return K(t,e).map(function(e){return e.settings})}});r=o,(n=e).on("init",function(){n.serializer.addNodeFilter("span",function(e){E(e,function(e){Kg.from(e.attr(Qb())).bind(r.lookup).each(function(t){!1===t.persistent&&e.unwrap()})})})});var i=tr(e);return{register:function(e,t){o.register(e,t)},annotate:function(t,n){o.lookup(t).each(function(r){var o,i,a,u;i=t,a=r,u=n,
162
+ (o=e).undoManager.transact(function(){var e,t,n,r,s=o.selection,c=s.getRng(),l=0<bi(o).length;c.collapsed&&!l&&(n=gi(e=o,t=c,[{inline:"span"}]),t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)),s.getRng().collapsed&&!l?(rr(r=Ni(o.getDoc(),u,i,a.decorate),Qh),s.getRng().insertNode(r.dom),s.select(r.dom)):Ei(s,!1,function(){Si(o,function(e){_i(o,e,i,a.decorate,u)})})})})},annotationChanged:function(e,t){i.addListener(e,t)},remove:function(t){er(e,Kg.some(t)).each(function(e){E(e.elements,$e)})},getAll:function(t){var n,r,o;return V((n=t,r=Zn(Lp.fromDom(e.getBody()),"["+Qb()+'="'+n+'"]'),o={},E(r,function(e){var t=dt(e,Zb()),n=K(o,t).getOr([]);o[t]=n.concat([e])}),o),function(e){return S(e,function(e){return e.dom})})}}}function Ri(e){return{getBookmark:g(aC,e),moveToBookmark:g(Uo,e)}}function Di(e){return fv(e)||!!gv(t=e)&&!0!==R(Jg(t.getElementsByTagName("*")),function(e,t){return e||av(t)},!1);var t}function Ti(e,t){for(;t&&t!==e;){if(oh(t)||ih(t))return t;t=t.parentNode}return null}function Oi(e,t,n){if(!n.collapsed){if(Tp.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Gp(r))return w(r.getClientRects(),function(n){return gr(n,e,t)})}return w(n.getClientRects(),function(n){return gr(n,e,t)})}}function Bi(e,t,n){return e.fire(t,n)}function Pi(e,t,n,r){return e.fire("FormatApply",{format:t,node:n,vars:r})}function Li(e,t,n,r){return e.fire("FormatRemove",{format:t,node:n,vars:r})}function Ii(e,t){function n(e){return e&&("IMG"===e.nodeName||t.dom.is(e,"figure.image"))}function o(e){return uh(e)||O.hasClass(e,"mce-preview-object")}function i(e){var r=e.target;!function(e,t){if("longpress"!==e.type&&0!==e.type.indexOf("touch"))return n(e.target)&&!Oi(e.clientX,e.clientY,t);var r=e.touches[0];return n(e.target)&&!Oi(r.clientX,r.clientY,t)}(e,t.selection.getRng())||e.isDefaultPrevented()||t.selection.select(r)}function a(e){return O.is(e,"figure.image")?[e.querySelector("img")]:O.hasClass(e,"mce-preview-object")&&u(e.firstElementChild)?[e,e.firstElementChild]:[e]}function s(e){var n=Xr(t);return!!n&&"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&(O.hasClass(e,"mce-preview-object")?ge(Lp.fromDom(e.firstElementChild),n):ge(Lp.fromDom(e),n))}function c(e,n,r){u(r)&&E(a(e),function(e){e.style[n]||!t.schema.isValid(e.nodeName.toLowerCase(),n)?O.setStyle(e,n,r):O.setAttrib(e,n,""+r)})}function l(e,t,n){c(e,"width",t),c(e,"height",n)}function f(e){var r,i,a,u,s,c,f=e.screenX-C,d=e.screenY-x;_=f*b[2]+w,A=d*b[3]+S,_=_<5?5:_,A=A<5?5:A,((n(p)||o(p))&&!1!==t.getParam("resize_img_proportional",!0,"boolean")?!vC.modifierPressed(e):vC.modifierPressed(e))&&(I(f)>I(d)?(A=M(_*k),_=M(A/k)):(_=M(A/k),A=M(_*k))),l(h,_,A),r=b.startPos.x+f,i=b.startPos.y+d,O.setStyles(v,{left:r=0<r?r:0,top:i=0<i?i:0,display:"block"}),v.innerHTML=_+" &times; "+A,b[2]<0&&h.clientWidth<=_&&O.setStyle(h,"left",void 0+(w-_)),b[3]<0&&h.clientHeight<=A&&O.setStyle(h,"top",void 0+(S-A)),(f=F.scrollWidth-R)+(d=F.scrollHeight-D)!=0&&O.setStyles(v,{left:r-f,top:i-d}),N||(a=p,u=w,s=S,c="corner-"+b.name,t.fire("ObjectResizeStart",{target:a,width:u,height:s,origin:c}),N=!0)}function d(n){function r(e,t){if(e)do{if(e===t)return 1}while(e=e.parentNode)}var o;N||t.removed||(B(O.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute(T)}),o="mousedown"===n.type?n.target:e.getNode(),r(o=O.$(o).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],F)&&(g(),r(e.getStart(!0),o)&&r(e.getEnd(!0),o))?H(o):V())}function m(e){return bC(Ti(t.getBody(),e))}function g(){try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(r){}}var p,h,v,b,y,C,x,w,S,k,N,_,A,R,D,T="data-mce-selected",O=t.dom,B=Pp.each,P=t.getDoc(),L=document,I=Math.abs,M=Math.round,F=t.getBody(),U={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},z=function(){var e,n,r,o,i=N;N=!1,i&&(c(p,"width",_),c(p,"height",A)),O.unbind(P,"mousemove",f),O.unbind(P,"mouseup",z),L!==P&&(O.unbind(L,"mousemove",f),O.unbind(L,"mouseup",z)),O.remove(h),O.remove(v),O.remove(y),H(p),i&&(e=p,n=_,r=A,o="corner-"+b.name,t.fire("ObjectResized",{target:e,width:n,height:r,origin:o}),O.setAttrib(p,"style",O.getAttrib(p,"style"))),t.nodeChanged()},H=function(e){q();var n=O.getPos(e,F),r=n.x,i=n.y,u=e.getBoundingClientRect(),c=u.width||u.right-u.left,d=u.height||u.bottom-u.top;p!==e&&(V(),p=e,_=A=0);var m=t.fire("ObjectSelected",{target:e}),g=O.getAttrib(p,T,"1");s(e)&&!m.isDefaultPrevented()?B(U,function(e,t){var n=O.get("mceResizeHandle"+t);n&&O.remove(n),n=O.add(F,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===Tp.ie&&(n.contentEditable=!1),O.bind(n,"mousedown",function(n){var u,s,m;n.stopImmediatePropagation(),n.preventDefault(),u=n,m=a(p)[0],C=u.screenX,x=u.screenY,w=m.clientWidth,S=m.clientHeight,k=S/w,(b=e).name=t,b.startPos={x:c*e[0]+r,y:d*e[1]+i},R=F.scrollWidth,D=F.scrollHeight,y=O.add(F,"div",{"class":"mce-resize-backdrop","data-mce-bogus":"all"}),O.setStyles(y,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),h=o(s=p)?O.create("img",{src:Tp.transparentSrc}):s.cloneNode(!0),O.addClass(h,"mce-clonedresizable"),O.setAttrib(h,"data-mce-bogus","all"),h.contentEditable="false",O.setStyles(h,{left:r,top:i,margin:0}),l(h,c,d),h.removeAttribute(T),F.appendChild(h),O.bind(P,"mousemove",f),O.bind(P,"mouseup",z),L!==P&&(O.bind(L,"mousemove",f),O.bind(L,"mouseup",z)),v=O.add(F,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},w+" &times; "+S)}),e.elm=n,O.setStyles(n,{left:c*e[0]+r-n.offsetWidth/2,top:d*e[1]+i-n.offsetHeight/2})}):V(),O.getAttrib(p,T)||p.setAttribute(T,g)},V=function(){q(),p&&p.removeAttribute(T),j(U,function(e,t){var n=O.get("mceResizeHandle"+t);n&&(O.unbind(n),O.remove(n))})},q=function(){j(U,function(e){e.elm&&(O.unbind(e.elm),delete e.elm)})};return t.on("init",function(){var e;g(),(Tp.browser.isIE()||Tp.browser.isEdge())&&(t.on("mousedown click",function(e){var n=e.target,r=n.nodeName;N||!/^(TABLE|IMG|HR)$/.test(r)||m(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())}),O.bind(F,"mscontrolselect",e=function(e){function n(e){zh.setEditorTimeout(t,function(){return t.selection.select(e)})}if(m(e.target)||uh(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))}),t.on("remove",function(){return O.unbind(F,"mscontrolselect",e)}));var n=zh.throttle(function(e){t.composing||d(e)});t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",n),t.on("keyup compositionend",function(e){p&&"TABLE"===p.nodeName&&n(e)}),t.on("hide blur",V),t.on("contextmenu longpress",i,!0)}),t.on("remove",q),{isResizable:s,showResizeRect:H,hideResizeRect:V,updateResizeRect:d,destroy:function(){p=h=y=null}}}function Mi(e){return oh(e)||ih(e)}function Fi(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(s.caretRangeFromPoint)r=s.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=function(e,t,n){var r,o=n.elementFromPoint(e,t),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),0<(r=(r=Pp.toArray(i.getClientRects())).sort(function(e,n){return(e=Math.abs(Math.max(e.top-t,e.bottom-t)))-Math.abs(Math.max(n.top-t,n.bottom-t))})).length){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch(e){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,ih(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Mi))?null:i}return r}function Ui(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function zi(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)}function Hi(e){return e&&"TABLE"===e.nodeName}function ji(e,t,n){for(var r=new jh(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(nh(t))return 1}function Vi(e,t,n,r,o){var i,a,u=e.getRoot(),s=e.schema.getNonEmptyElements(),c=e.getParent(o.parentNode,e.isBlock)||u;if(r&&nh(o)&&t&&e.isEmpty(c))return Kg.some(py(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new jh(o,c);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,Ht(l=a)&&!1===zi(l,f,To)))return Kg.none();if(Qp(a)&&0<a.nodeValue.length)return!1===zi(a,u,function(e){return"A"===e.nodeName})?Kg.some(py(a,r?a.nodeValue.length:0)):Kg.none();if(e.isBlock(a)||s[a.nodeName.toLowerCase()])return Kg.none();i=a}return n&&i?Kg.some(py(i,0)):Kg.none()}function qi(e,t,n,r){var o,i=e.getRoot(),a=!1,u=r[(n?"start":"end")+"Container"],s=r[(n?"start":"end")+"Offset"],c=Gp(u)&&s===u.childNodes.length,l=e.schema.getNonEmptyElements(),f=n;if(Ht(u))return Kg.none();if(Gp(u)&&s>u.childNodes.length-1&&(f=!1),eh(u)&&(u=i,s=0),u===i){if(f&&(d=u.childNodes[0<s?s-1:0])){if(Ht(d))return Kg.none();if(l[d.nodeName]||Hi(d))return Kg.none()}if(u.hasChildNodes()){if(s=Math.min(!f&&0<s?s-1:s,u.childNodes.length-1),u=u.childNodes[s],s=Qp(u)&&c?u.data.length:0,!t&&u===i.lastChild&&Hi(u))return Kg.none();if(function(e,t){for(;t&&t!==e;){if(ih(t))return 1;t=t.parentNode}}(i,u)||Ht(u))return Kg.none();if(u.hasChildNodes()&&!1===Hi(u)){var d=u,m=new jh(u,i);do{if(ih(d)||Ht(d)){a=!1;break}if(Qp(d)&&0<d.nodeValue.length){s=f?0:d.nodeValue.length,u=d,a=!0;break}if(l[d.nodeName.toLowerCase()]&&(!(o=d)||!/^(TD|TH|CAPTION)$/.test(o.nodeName))){s=e.nodeIndex(d),u=d.parentNode,f||s++,a=!0;break}}while(d=f?m.next():m.prev())}}}return t&&(Qp(u)&&0===s&&Vi(e,c,t,!0,u).each(function(e){u=e.container(),s=e.offset(),a=!0}),Gp(u)&&(!(d=(d=u.childNodes[s])||u.childNodes[s-1])||!nh(d)||d.previousSibling&&"A"===d.previousSibling.nodeName||ji(e,d,!1)||ji(e,d,!0)||Vi(e,c,t,!0,d).each(function(e){u=e.container(),s=e.offset(),a=!0}))),f&&!t&&Qp(u)&&s===u.nodeValue.length&&Vi(e,c,t,!1,u).each(function(e){u=e.container(),s=e.offset(),a=!0}),a?Kg.some(py(u,s)):Kg.none()}function $i(e,t){var n=t.collapsed,r=t.cloneRange(),o=py.fromRangeStart(t);return qi(e,n,!0,r).each(function(e){n&&py.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||qi(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Ui(t,r)?Kg.none():Kg.some(r)}function Wi(e,t){return e.splitText(t)}function Ki(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Qp(t)?0<n&&n<t.nodeValue.length&&(t=(r=Wi(t,n)).previousSibling,n<o?(t=r=Wi(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Qp(t)&&0<n&&n<t.nodeValue.length&&(t=Wi(t,n),n=0),Qp(r)&&0<o&&o<r.nodeValue.length&&(o=(r=Wi(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}}function Xi(e){return{walk:function(t,n){return pi(e,t,n)},split:Ki,normalize:function(t){return $i(e,t).fold(Vg,function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}function Yi(e){var t=CC(e);if(t<=0||null===t){var n=ht(e,yC);return parseFloat(n)||0}return t}function Gi(e,t){return R(t,function(t,n){var r=ht(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o},0)}function Ji(e){return"textarea"===we(e)}function Qi(e,t){var n=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return Xp(n.offsetLeft,n.offsetTop);var i=We(null==r?void 0:r.pageYOffset,o.scrollTop),a=We(null==r?void 0:r.pageXOffset,o.scrollLeft),u=We(o.clientTop,n.clientTop),s=We(o.clientLeft,n.clientLeft);return Yp(e).translate(a-s,i-u)}(e),r=wC.get(e);return{element:e,bottom:n.top+r,height:r,pos:n,cleanup:t}}function Zi(e,t,n,r){NC(e,function(){return kC(e,t,n,r)},n)}function ea(e,t,n,r,o){var i={elm:r.element.dom,alignToTop:o};e.fire("ScrollIntoView",i).isDefaultPrevented()||(n(t,Ke(t).top,r,o),e.fire("AfterScrollIntoView",i))}function ta(e,t,n,r){ea(e,Lp.fromDom(e.getDoc()),n,Qi(Lp.fromDom(t),s),r)}function na(e,t,n,r){var o,i=e.pos;n?Xe(i.left,i.top,r):(o=i.top-t+e.height,Xe(i.left,o,r))}function ra(e,t,n,r,o){var i=n+t,a=r.pos.top,u=r.bottom,s=n<=u-a;a<t?na(r,n,!1!==o,e):i<a?na(r,n,s?!1!==o:!0===o,e):i<u&&!s&&na(r,n,!0===o,e)}function oa(e,t,n,r){ra(e,t,e.dom.defaultView.innerHeight,n,r)}function ia(e,t,n,r){ra(e,t,e.dom.defaultView.innerHeight,n,r);var o,i,a,u,s,c,l,f=(o=n.element,u=Ke(Lp.fromDom(document)),a=(i=EC).owner(o),s=SC(i,a),c=Yp(o),l=A(s,function(e,t){var n=Yp(t);return{left:e.left+n.left,top:e.top+n.top}},{left:0,top:0}),Xp(l.left+c.left+u.left,l.top+c.top+u.top)),d=Je(window);f.top<d.y?Ye(n.element,!1!==r):f.top>d.bottom&&Ye(n.element,!0===r)}function aa(e,t,n){return Zi(e,oa,t,n)}function ua(e,t,n){return ta(e,t,oa,n)}function sa(e,t,n){return Zi(e,ia,t,n)}function ca(e,t,n){return ta(e,t,ia,n)}function la(e,t,n){(e.inline?aa:sa)(e,t,n)}function fa(e){var t=Vp(e).dom;return e.dom===t.activeElement}function da(e){return void 0===e&&(e=Lp.fromDom(document)),Kg.from(e.dom.activeElement).map(Lp.fromDom)}function ma(e,t){var n=Mp(t)?ki(t).length:zp(t).length+1;return n<e?n:e<0?0:e}function ga(e){return DC.range(e.start,ma(e.soffset,e.start),e.finish,ma(e.foffset,e.finish))}function pa(e,t){return!Ze(t.dom)&&(ve(e,t)||he(e,t))}function ha(e){return function(t){return pa(e,t.start)&&pa(e,t.finish)}}function va(e){return!0===e.inline||TC.isIE()}function ba(e){return DC.range(Lp.fromDom(e.startContainer),e.startOffset,Lp.fromDom(e.endContainer),e.endOffset)}function ya(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),Kg.some(t)}catch(e){return Kg.none()}}function Ca(e){var t,n,r=va(e)?((n=_e(t=Lp.fromDom(e.getBody())).dom.getSelection())&&0!==n.rangeCount?Kg.from(n.getRangeAt(0)):Kg.none()).map(ba).filter(ha(t)):Kg.none();e.bookmark=r.isSome()?r:e.bookmark}function xa(e){return(e.bookmark||Kg.none()).bind(function(t){return n=Lp.fromDom(e.getBody()),Kg.from(t).filter(ha(n)).map(ga);var n}).bind(ya)}function wa(e){var t=Kn(function(){Ca(e)},0);e.on("init",function(){function n(){o.throttle()}var r,o,i,a,u,s;e.inline&&(r=e,o=t,Hb.DOM.bind(document,"mouseup",n),r.on("remove",function(){Hb.DOM.unbind(document,"mouseup",n)})),i=e,a=t,wp().browser.isIE()?(s=i).on("focusout",function(){Ca(s)}):(u=a,i.on("mouseup touchend",function(){u.throttle()})),i.on("keyup NodeChange",function(e){"nodechange"===e.type&&e.selectionChange||Ca(i)})}),e.on("remove",function(){t.cancel()})}function Sa(e,t){var n=e.getParam("custom_ui_selector","","string");return null!==BC.getParent(t,function(t){return OC.isEditorUIElement(t)||!!n&&e.dom.is(t,n)})}function Ea(e,t){var n=t.editor;wa(n),n.on("focusin",function(){var t=e.focusedEditor;t!==n&&(t&&t.fire("blur",{focusedEditor:n}),e.setActive(n),(e.focusedEditor=n).fire("focus",{blurredEditor:t}),n.focus(!0))}),n.on("focusout",function(){zh.setEditorTimeout(n,function(){var t=e.focusedEditor;Sa(n,function(e){try{return da(Vp(Lp.fromDom(e.getElement()))).fold(function(){return document.body},function(e){return e.dom})}catch(e){return document.body}}(n))||t!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),xC||(xC=function(t){var n=e.activeEditor;n&&function(e){if(jp()&&u(e.target)){var t=Lp.fromDom(e.target);if(Ip(t)&&u(t.dom.shadowRoot)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return U(n)}}return Kg.from(e.target)}(t).each(function(t){t.ownerDocument===document&&(t===document.body||Sa(n,t)||e.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))})},BC.bind(document,"focusin",xC))}function ka(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(BC.unbind(document,"focusin",xC),xC=null)}function Na(e,t){var n,r;n=Lp.fromDom(e.getBody()),((r=t).collapsed?Kg.from(hr(r.startContainer,r.startOffset)).map(Lp.fromDom):Kg.none()).bind(function(e){return Xh(e)?Kg.some(e):!1===ve(n,e)?Kg.some(n):Kg.none()}).bind(function(e){return rC(e.dom)}).fold(function(){e.selection.normalize()},function(t){return e.selection.setRng(t.toRange())})}function _a(e){if(e.setActive)try{e.setActive()}catch(r){e.focus()}else e.focus()}function Aa(e){return e.inline?(r=e.getBody())&&(fa(t=Lp.fromDom(r))||da(Vp(n=t)).filter(function(e){return n.dom.contains(e.dom)}).isSome()):e.iframeElement&&fa(Lp.fromDom(e.iframeElement));var t,n,r}function Ra(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return Kg.from(i).map(Lp.fromDom).map(function(e){return r&&t.collapsed?e:Be(e,o(e,a)).getOr(e)}).bind(function(e){return Ip(e)?Kg.some(e):Ae(e).filter(Ip)}).map(function(e){return e.dom}).getOr(e)}function Da(e,t,n){return Ra(e,t,!0,n,function(e,t){return Math.min(Ie(e),t)})}function Ta(e,t,n){return Ra(e,t,!1,n,function(e,t){return 0<t?t-1:t})}function Oa(e,t){for(var n=e;e&&Qp(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}function Ba(e,t){return S(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})}function Pa(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}}function La(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t}function Ia(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}function Ma(e,t){return e.replace(t.re,function(e){return K(t.uris,e).getOr(e)})}function Fa(e,t){e=FC(e),this.settings=t||{};var n,r,o,i,a=this.settings.base_uri,u=this;/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)?u.source=e:(n=0===e.indexOf("//"),0!==e.indexOf("/")||n||(e=(a&&a.protocol||"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(r=this.settings.base_uri?this.settings.base_uri.path:new Fa(document.location.href).directory,e=this.settings.base_uri&&""==this.settings.base_uri.protocol?"//mce_host"+u.toAbsPath(r,e):(o=/([^#?]*)([#?]?.*)/.exec(e),(a&&a.protocol||"http")+"://mce_host"+u.toAbsPath(r,o[1])+o[2])),e=e.replace(/@@/g,"(mce_at)"),i=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),MC(UC,function(e,t){var n=(n=i[t])&&n.replace(/\(mce_at\)/g,"@@");u[e]=n}),a&&(u.protocol||(u.protocol=a.protocol),u.userInfo||(u.userInfo=a.userInfo),u.port||"mce_host"!==u.host||(u.port=a.port),u.host&&"mce_host"!==u.host||(u.host=a.host),u.source=""),n&&(u.protocol=""))}function Ua(e,t,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=e.getShortEndedElements(),a=1,u=n;0!==a;)for(r.lastIndex=u;;){var s=r.exec(t);if(null===s)return u;if("!"===s[1]){u=ap(s[2],"--")?$C(t,!1,s.index+"!--".length):$C(t,!0,s.index+1);break}o.lastIndex=r.lastIndex;var c=o.exec(t);if(!Fg(c)&&c.index===r.lastIndex){"/"===s[1]?--a:tp(i,s[2])||(a+=1),u=r.lastIndex+c[0].length;break}}return u}function za(e,t){function n(n,s){void 0===s&&(s="html");for(var m,g,p,h,v,b,y,C,x,w,S,E,k,N,_,A,R,D,T,O=n.html,B=0,P=[],L=0,I=Rv.decode,M=Pp.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),F="html"===s?0:1,U=function(e){for(var t,n=P.length;n--&&P[n].name!==e;);if(0<=n){for(t=P.length-1;n<=t;t--)(e=P[t]).valid&&l(e.name);P.length=n}},z=function(e,t){return u(Ma(e,n),t)},H=function(t){""!==t&&(">"===t.charAt(0)&&(t=" "+t),e.allow_conditional_comments||"[if"!==t.substr(0,3).toLowerCase()||(t=" "+t),i(Ma(t,n)))},j=function(e,t){var n=e||"",r=!ap(n,"--"),o=$C(O,r,t);return e=O.substr(t,o-t),H(r?n+e:e),o+1},V=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),q=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,$=t.getShortEndedElements(),W=e.self_closing_elements||t.getSelfClosingElements(),K=t.getBoolAttrs(),X=e.validate,Y=e.remove_internals,G=e.fix_self_closing,J=t.getSpecialElements(),Q=O+">";m=V.exec(Q);){var Z=m[0];if(B<m.index&&z(I(O.substr(B,m.index-B))),g=m[7])U(g=":"===(g=g.toLowerCase()).charAt(0)?g.substr(1):g);else if(g=m[8]){if(m.index+Z.length>O.length){z(I(O.substr(m.index))),B=m.index+Z.length;continue}x=(g=":"===(g=g.toLowerCase()).charAt(0)?g.substr(1):g)in $,G&&W[g]&&0<P.length&&P[P.length-1].name===g&&U(g);var ee=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null}(q,m[9]);if(null!==ee){if("all"===ee){B=Ua(t,O,V.lastIndex),V.lastIndex=B;continue}S=!1}if(!X||(w=t.getElementRule(g))){if(S=!0,X&&(N=w.attributes,_=w.attributePatterns),(k=m[9])?((C=-1!==k.indexOf("data-mce-type"))&&Y&&(S=!1),(h=[]).map={},k.replace(q,function(t,i,a,u,s){return function(t,i,a,u,s){var c;if(a=Ma((i=i.toLowerCase())in K?i:I(a||u||s||""),n),X&&!C&&0==(0===(c=i).indexOf("data-")||0===c.indexOf("aria-"))){var l=N[i];if(!l&&_){for(var f=_.length;f--&&!(l=_[f]).pattern.test(i););-1===f&&(l=null)}if(!l)return;if(l.validValues&&!(a in l.validValues))return}("name"===i||"id"===i)&&t in VC&&(a in r||a in o)||M[i]&&!jC.isDomSafe(a,t,e)||C&&(i in M||0===i.indexOf("on"))||(h.map[i]=a,h.push({name:i,value:a}))}(g,i,a,u,s),""})):(h=[]).map={},X&&!C){if(A=w.attributesRequired,R=w.attributesDefault,D=w.attributesForced,w.removeEmptyAttrs&&!h.length&&(S=!1),D)for(v=D.length;v--;)y=(E=D[v]).name,"{$uid}"===(T=E.value)&&(T="mce_"+L++),h.map[y]=T,h.push({name:y,value:T});if(R)for(v=R.length;v--;)(y=(E=R[v]).name)in h.map||("{$uid}"===(T=E.value)&&(T="mce_"+L++),h.map[y]=T,h.push({name:y,value:T}));if(A){for(v=A.length;v--&&!(A[v]in h.map););-1===v&&(S=!1)}if(E=h.map["data-mce-bogus"]){if("all"===E){B=Ua(t,O,V.lastIndex),V.lastIndex=B;continue}S=!1}}S&&c(g,h,x)}else S=!1;if(p=J[g]){p.lastIndex=B=m.index+Z.length,B=(m=p.exec(O))?(S&&(b=O.substr(B,m.index-B)),m.index+m[0].length):(b=O.substr(B),O.length),S&&(0<b.length&&z(b,!0),l(g)),V.lastIndex=B;continue}x||(k&&k.indexOf("/")===k.length-1?S&&l(g):P.push({name:g,valid:S}))}else if(g=m[1])H(g);else if(g=m[2]){if(!(1==F||e.preserve_cdata||0<P.length&&t.isValidChild(P[P.length-1].name,"#cdata"))){B=j("",m.index+2),V.lastIndex=B;continue}a(g)}else if(g=m[3])d(g);else{if((g=m[4])||"<!"===Z){B=j(g,m.index+Z.length),V.lastIndex=B;continue}if(g=m[5]){if(1!=F){B=j("?",m.index+2),V.lastIndex=B;continue}f(g,m[6])}}B=m.index+Z.length}for(B<O.length&&z(I(O.substr(B))),v=P.length-1;0<=v;v--)(g=P[v]).valid&&l(g.name)}void 0===t&&(t=cn()),e=e||{};var r=qC(),o=r.createElement("form");!1!==e.fix_self_closing&&(e.fix_self_closing=!0);var i=e.comment||s,a=e.cdata||s,u=e.text||s,c=e.start||s,l=e.end||s,f=e.pi||s,d=e.doctype||s;return{parse:function(e,t){void 0===t&&(t="html"),n(function(e){for(var t,n=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=nr("img"),a=0,u=0;t=n.exec(e);){var s=t[0],c=i+"_"+u++;o[c]=s,a<t.index&&r.push(e.substr(a,t.index-a)),r.push(c),a=t.index+s.length}var l=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:e,re:l}:(a<e.length&&r.push(e.substr(a)),{prefix:i,uris:o,html:r.join(""),re:l})}(e),t)}}}function Ha(e,t){for(var n,r,o,i,a=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,u=e.schema,s=(n=e.getTempAttrs(),r=t,o=new RegExp(["\\s?("+n.join("|")+')="[^"]+"'].join("|"),"gi"),r.replace(o,"")),c=u.getShortEndedElements();i=a.exec(s);){var l=a.lastIndex,f=i[0].length,d=c[i[1]]?l:za.findEndTag(u,s,l);s=s.substring(0,l-f)+s.substring(d);a.lastIndex=l-f}return tv(s)}function ja(e){return{compare:function(t,n){function r(t){var n={};return KC(e.getAttribs(t),function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))}),n}function o(e,t){var n,r;for(r in e)if(tp(e,r)){if(void 0===(n=t[r]))return;if(e[r]!==n)return;delete t[r]}for(r in t)if(tp(t,r))return;return 1}return t.nodeName===n.nodeName&&!(!o(r(t),r(n))||!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))||zo(t)||zo(n))}}}function Va(e){var t=[],n=(e=e||{}).indent,r=XC(e.indent_before||""),o=XC(e.indent_after||""),i=Rv.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="html"===e.element_format;return{start:function(e,u,s){var c,l,f,d;if(n&&r[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n"),t.push("<",e),u)for(c=0,l=u.length;c<l;c++)f=u[c],t.push(" ",f.name,'="',i(f.value,!0),'"');t[t.length]=!s||a?">":" />",s&&n&&o[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n")},end:function(e){var r;t.push("</",e,">"),n&&o[e]&&0<t.length&&0<(r=t[t.length-1]).length&&"\n"!==r&&t.push("\n")},text:function(e,n){0<e.length&&(t[t.length]=n?e:i(e))},cdata:function(e){t.push("<![CDATA[",e,"]]>")},comment:function(e){t.push("<!--",e,"-->")},pi:function(e,r){r?t.push("<?",e," ",i(r),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:function(e){t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}}function qa(e,t){void 0===t&&(t=cn());var n=Va(e);return(e=e||{}).validate=!("validate"in e)||e.validate,{serialize:function(r){var o=e.validate,i={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;a(e),e=e.next;);}};n.reset();var a=function(e){var r=i[e.type];if(r)r(e);else{var u=e.name,s=e.shortEnded,c=e.attributes;if(o&&c&&1<c.length){var l=[];l.map={};var f=t.getElementRule(e.name);if(f){for(var d=0,m=f.attributesOrder.length;d<m;d++)(g=f.attributesOrder[d])in c.map&&(p=c.map[g],l.map[g]=p,l.push({name:g,value:p}));var g,p;for(d=0,m=c.length;d<m;d++)(g=c[d].name)in l.map||(p=c.map[g],l.map[g]=p,l.push({name:g,value:p}));c=l}}if(n.start(e.name,c,s),!s){if(e=e.firstChild)for(;a(e),e=e.next;);n.end(u)}}};return 1!==r.type||e.inner?i[11](r):a(r),n.getContent()}}}function $a(e,t){return Qg(e.parseStyle(e.getAttrib(t,"style")))}function Wa(e,t,n){return Kg.from(n.container()).filter(Qp).exists(function(r){var o=e?0:-1;return t(r.data.charAt(n.offset()+o))})}function Ka(e){var t=e.container();return Qp(t)&&(0===t.data.length||ev(t.data)&&Ri.isBookmarkNode(t.parentNode))}function Xa(e,t){return function(n){return Kg.from(go(e?0:-1,n)).filter(t).isSome()}}function Ya(e){return rh(e)&&"block"===ht(Lp.fromDom(e),"display")}function Ga(e){return ih(e)&&!(Gp(t=e)&&"all"===t.getAttribute("data-mce-bogus"));var t}function Ja(e){qe(e),qp(e,Lp.fromHtml('<br data-mce-bogus="1">'))}function Qa(e){Le(e).each(function(t){Re(t).each(function(n){qh(e)&&Ft(t)&&qh(n)&&$p(t)})})}function Za(e,t){return o=Vg,ve(r=t,n=e)?function(e,t){for(var n=Hg(t)?t:Vg,r=e.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Lp.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(n,function(e){return o(e)||he(e,r)}).slice(0,-1):[];var n,r,o}function eu(e,t){return[e].concat(Za(e,t))}function tu(e,t,n){return eC(e,t,n,Ka)}function nu(e,t){return T(eu(Lp.fromDom(t.container()),e),qh)}function ru(e,t,n){return tu(e,t.dom,n).forall(function(e){return nu(t,n).fold(function(){return!1===mo(e,n,t.dom)},function(r){return!1===mo(e,n,t.dom)&&ve(r,Lp.fromDom(e.container()))})})}function ou(e,t,n){return nu(t,n).fold(function(){return tu(e,t.dom,n).forall(function(e){return!1===mo(e,n,t.dom)})},function(t){return tu(e,t.dom,n).isNone()})}function iu(e){return Co(e).exists(Ft)}function au(e,t,n){var r=U(_(eu(Lp.fromDom(n.container()),t),qh)).getOr(t);return Zy(e,r.dom,n).filter(iu)}function uu(e,t){return Co(t).exists(Ft)||au(!0,e,t).isSome()}function su(e,t){return Kg.from(t.getNode(!0)).map(Lp.fromDom).exists(Ft)||au(!1,e,t).isSome()}function cu(e){return py.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()}function lu(e,t){return U(_(eu(Lp.fromDom(t.container()),e),qh)).getOr(e)}function fu(e,t){return cu(t)?ZC(t):ZC(t)||nC(lu(e,t).dom,t).exists(ZC)}function du(e,t){return cu(t)?QC(t):QC(t)||tC(lu(e,t).dom,t).exists(QC)}function mu(e){return Co(e).bind(function(e){return _t(e,Ip)}).exists(function(e){return x(["pre","pre-wrap"],ht(e,"white-space"))})}function gu(e,t){return!mu(t)&&(sx(e,t)||lx(e,t)||su(e,t)||fu(e,t))}function pu(e,t){return!mu(t)&&(cx(e,t)||fx(e,t)||uu(e,t)||du(e,t))}function hu(e,t){return gu(e,t)||pu(e,(r=(n=t).container(),o=n.offset(),Qp(r)&&o<r.data.length?py(r,o+1):n));var n,r,o}function vu(e,t){return uC(e.charAt(t))}function bu(e){var t=e.container();return Qp(t)&&ie(t.data,Qh)}function yu(e,t){return Kg.some(t).filter(bu).bind(function(t){var n,r,o,i,a,u,s,c,l,f=t.container(),d=e,m=(a=f).data,g=py(a,0);return(!vu(m,0)||hu(d,g)?(c=(u=f).data,(l=S(s=c.split(""),function(e,t){return uC(e)&&0<t&&t<s.length-1&&jo(s[t-1])&&jo(s[t+1])?" ":e}).join(""))!==c&&(u.data=l,1)):(a.data=" "+m.slice(1),1))||(n=e,o=(r=f).data,i=py(r,o.length-1),vu(o,o.length-1)&&!hu(n,i)&&(r.data=o.slice(0,-1)+" ",1))?Kg.some(t):Kg.none()})}function Cu(e){var t=Lp.fromDom(e.getBody());e.selection.isCollapsed()&&yu(t,py.fromRangeStart(e.selection.getRng())).each(function(t){e.selection.setRng(t.toRange())})}function xu(e,t,n){var r,o,i,a,u,s,c,l;0!==n&&(o=Nt(r=Lp.fromDom(e),qh).getOr(r),i=e.data.slice(t,t+n),a=t+n>=e.data.length&&pu(o,py(e,e.data.length)),u=0===t&&gu(o,py(e,0)),e.replaceData(t,n,(c=u,l=a,R(s=i,function(e,t){return Ho(t)||uC(t)?e.previousCharIsSpace||""===e.str&&c||e.str.length===s.length-1&&l?{previousCharIsSpace:!1,str:e.str+Qh}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str)))}function wu(e,t){var n=e.data.slice(t);xu(e,t,n.length-sp(n).length)}function Su(e,t){var n=e.data.slice(0,t),r=n.length-cp(n).length;xu(e,t-r,r)}function Eu(e,t,n,r){void 0===r&&(r=!0);var o=cp(e.data).length,i=r?e:t,a=r?t:e;return r?i.appendData(a.data):i.insertData(0,a.data),$p(Lp.fromDom(a)),n&&wu(i,o),i}function ku(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===py.isTextPosition(n)&&o===r.parentNode&&i>py.before(r).offset()?py(t.container(),t.offset()-1):t;var n,r,o,i}function Nu(e){return Kt(e.previousSibling)?Kg.some((t=e.previousSibling,Qp(t)?py(t,t.data.length):py.after(t))):e.previousSibling?oC(e.previousSibling):Kg.none();var t}function _u(e){return Kt(e.nextSibling)?Kg.some((t=e.nextSibling,Qp(t)?py(t,0):py.before(t))):e.nextSibling?rC(e.nextSibling):Kg.none();var t}function Au(e,t){return Nu(t).orThunk(function(){return _u(t)}).orThunk(function(){return n=e,o=py.before((r=t).previousSibling||r.parentNode),nC(n,o).fold(function(){return tC(n,py.after(r))},Kg.some);var n,r,o})}function Ru(e,t){return _u(t).orThunk(function(){return Nu(t)}).orThunk(function(){return tC(n=e,py.after(r=t)).fold(function(){return nC(n,py.before(r))},Kg.some);var n,r})}function Du(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})}function Tu(e,t){return t&&tp(e.schema.getBlockElements(),we(t))}function Ou(e){if(Jt(e)){var t=Lp.fromHtml('<br data-mce-bogus="1">');return qe(e),qp(e,t),Kg.some(py.before(t.dom))}return Kg.none()}function Bu(e,t,n,r){void 0===r&&(r=!0);var o,i,a,u,s,c,l,f,d,m,p,h,v=(t?Ru:Au)(e.getBody(),h=n.dom).map(g(ku,h)),b=Nt(n,g(Tu,e),(o=e.getBody(),function(e){return e.dom===o})),y=(u=v,i=a=n,s=tp(e.schema.getTextInlineElements(),we(i)),m=Re(a).filter(Mp),p=De(a).filter(Mp),$p(a),l=p,f=u,d=function(e,t,n){var r=e.dom,o=t.dom,i=r.data.length;return Eu(r,o,s),n.container()===o?py(r,i):n},((c=m).isSome()&&l.isSome()&&f.isSome()?Kg.some(d(c.getOrDie(),l.getOrDie(),f.getOrDie())):Kg.none()).orThunk(function(){return s&&(m.each(function(e){return Su(e.dom,e.dom.length)}),p.each(function(e){return wu(e.dom,0)})),u}));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):b.bind(Ou).fold(function(){r&&Du(e,t,y)},function(n){r&&Du(e,t,Kg.some(n))})}function Pu(e){return Zn(e,"td,th")}function Lu(e,t){return{start:e,end:t}}function Iu(e,t){return Dt(Lp.fromDom(e),"td,th",t)}function Mu(e){return!he(e.start,e.end)}function Fu(e,t){return yi(e.start,t).bind(function(n){return yi(e.end,t).bind(function(e){return he(n,e)?Kg.some(n):Kg.none()})})}function Uu(e){return function(t){return Fu(t,e).map(function(e){return{rng:t,table:e,cells:Pu(e)}})}}
163
+ function zu(e,t,n,r){if(n.collapsed||!e.forall(Mu))return Kg.none();if(t.isSameTable){var o=e.bind(Uu(r));return Kg.some({start:o,end:o})}var i,a,u=Iu(n.startContainer,r),s=Iu(n.endContainer,r),c=u.bind((a=r,function(e){return yi(e,a).bind(function(t){return z(Pu(t)).map(function(t){return Lu(e,t)})})})).bind(Uu(r)),l=s.bind((i=r,function(e){return yi(e,i).bind(function(t){return U(Pu(t)).map(function(t){return Lu(t,e)})})})).bind(Uu(r));return Kg.some({start:c,end:l})}function Hu(e,t){return O(e,function(e){return he(e,t)})}function ju(e){return ut(Hu(e.cells,e.rng.start),Hu(e.cells,e.rng.end),function(t,n){return e.cells.slice(t,n+1)})}function Vu(e,t){var n=t.startTable,r=t.endTable,o=e.cloneRange();return n.each(function(e){return o.setStartAfter(e.dom)}),r.each(function(e){return o.setEndBefore(e.dom)}),o}function qu(e,t){function n(e){return yi(Lp.fromDom(e),f)}var r,o,i,a,u,s,c,l,f,d,m,g,p,h,v,b,y=(r=e,function(e){return he(r,e)}),C=ut(Iu((o=t).startContainer,i=y),Iu(o.endContainer,i),Lu),x=(f=y,{startTable:d=n((l=t).startContainer),endTable:m=n(l.endContainer),isStartInTable:g=d.isSome(),isEndInTable:p=m.isSome(),isSameTable:h=ut(d,m,he).getOr(!1),isMultiTable:!h&&g&&p});return v=t,b=y,C.exists(function(e){return!Mu(t=e)&&Fu(t,b).exists(function(e){var t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})&&Ci(e.start,v);var t})?C.map(function(e){return gx.singleCellTable(t,e.start)}):x.isMultiTable?zu(C,s=x,c=t,y).bind(function(e){var t=e.start,n=e.end,r=t.bind(ju).getOr([]),o=n.bind(ju).getOr([]);if(0<r.length&&0<o.length){var i=Vu(c,s);return Kg.some(gx.multiTable(r,o,i))}return Kg.none()}):zu(C,a=x,u=t,y).bind(function(e){var t=e.start,n=e.end;return t.or(n)}).bind(function(e){var t=a.isSameTable,n=ju(e).getOr([]);if(t&&e.cells.length===n.length)return Kg.some(gx.fullTable(e.table));if(0<n.length){if(t)return Kg.some(gx.partialTable(n,Kg.none()));var r=Vu(u,a);return Kg.some(gx.partialTable(n,Kg.some(rp(rp({},a),{rng:r}))))}return Kg.none()})}function $u(e){return E(e,function(e){gt(e,"contenteditable"),Ja(e)}),0}function Wu(e,t,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(t.dom.lastChild)):(o.setStartBefore(t.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),hx(e,o,t,!1)}function Ku(e){var t=bi(e),n=Lp.fromDom(e.selection.getNode());ah(n.dom)&&Jt(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),1<t.length&&w(t,function(e){return he(e,n)})&&lt(n,"data-mce-selected","1")}function Xu(e,t,n){var r=e.selection.getRng();return $u(n.bind(function(n){var o,i,a,u=n.rng,s=n.isStartInTable,c=(o=s?u.endContainer:u.startContainer,Kg.from(e.dom.getParent(o,e.dom.isBlock)).map(Lp.fromDom));u.deleteContents(),i=e,a=s,c.filter(Jt).each(function(e){a?$p(e):(Ja(e),i.selection.setCursorLocation(e.dom,0))});var l=s?t[0]:t[t.length-1];return Wu(e,l,r,s),Jt(l)?Kg.none():Kg.some(s?t.slice(1):t.slice(0,-1))}).getOr(t)),Ku(e),!0}function Yu(e,t,n,r){var o=e.selection.getRng(),i=t[0],a=n[n.length-1];Wu(e,i,o,!0),Wu(e,a,o,!1);var u=Jt(i)?t:t.slice(1),s=Jt(a)?n:n.slice(0,-1);return $u(u.concat(s)),r.deleteContents(),Ku(e),!0}function Gu(e,t){return Bu(e,!1,t),!0}function Ju(e,t){return T(eu(t,e),Yh)}function Qu(e,t){return(e?ox:ix)(t)}function Zu(e,t,n){var r=Lp.fromDom(e.getBody());return vx(r,n).fold(function(){return o=e,i=t,a=r,u=n,s=py.fromRangeStart(o.selection.getRng()),Ju(a,u).bind(function(e){return Jt(e)?bx(o,e):(t=a,n=e,r=s,Ro(i,o.getBody(),r).bind(function(e){return Ju(t,Lp.fromDom(e.getNode())).map(function(e){return!1===he(e,n)})}));var t,n,r}).getOr(!1)||(l=t,f=py.fromRangeStart((c=e).selection.getRng()),Qu(l,f)||Zy(l,c.getBody(),f).exists(function(e){return Qu(l,e)}));var o,i,a,u,s,c,l,f},function(n){return l=t,f=r,d=n,m=py.fromRangeStart((c=e).selection.getRng()),(Jt(d)?bx(c,d):(i=f,u=d,s=m,Ro(a=l,(o=c).getBody(),s).bind(function(e){return r=a,c=s,l=e,rC((n=u).dom).bind(function(e){return oC(n.dom).map(function(t){return r?c.isEqual(e)&&l.isEqual(t):c.isEqual(t)&&l.isEqual(e)})}).getOr(!0)?bx(o,u):(t=u,vx(i,Lp.fromDom(e.getNode())).map(function(e){return!1===he(e,t)}));var t,n,r,c,l}).or(Kg.some(!0)))).getOr(!1);var o,i,a,u,s,c,l,f,d,m})}function es(e,t){var n,r,o,i,a,u,s,c,l=Lp.fromDom(e.selection.getStart(!0)),f=bi(e);return e.selection.isCollapsed()&&0===f.length?Zu(e,t,l):(r=l,o=f,i=Lp.fromDom((n=e).getBody()),a=n.selection.getRng(),0!==o.length?Xu(n,o,Kg.none()):(u=n,c=a,vx(s=i,r).fold(function(){return e=u,qu(s,c).map(function(t){return t.fold(g(hx,e),g(Gu,e),g(Xu,e),g(Yu,e))});var e},function(e){return bx(u,e)}).getOr(!1)))}function ts(e){return e.collapsed?e:(t=e,n=py.fromRangeStart(t),r=py.fromRangeEnd(t),o=t.commonAncestorContainer,Zy(!1,o,r).map(function(e){return!mo(n,r,o)&&mo(n,e,o)?(i=n.container(),a=n.offset(),u=e.container(),s=e.offset(),(c=document.createRange()).setStart(i,a),c.setEnd(u,s),c):t;var i,a,u,s,c}).getOr(t));var t,n,r,o}function ns(e,t){var n,r,o,i,a,u=t.firstChild,s=t.lastChild;return u&&"meta"===u.name&&(u=u.next),r=s=s&&"mce_marker"===s.attr("id")?s.prev:s,o=(n=e).getNonEmptyElements(),r&&(r.isEmpty(o)||(i=r,n.getBlockElements()[i.name]&&i.firstChild&&i.firstChild===i.lastChild&&("br"===(a=i.firstChild).name||a.value===Qh)))&&(s=s.prev),u&&u===s&&("ul"===u.name||"ol"===u.name)}function rs(e){return 0<e.length&&(!(r=e[e.length-1]).firstChild||(t=r)&&t.firstChild&&t.firstChild===t.lastChild&&((n=t.firstChild).data===Qh||nh(n)))?e.slice(0,-1):e;var t,n,r}function os(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null}function is(e,t){var n=py.after(e),r=ko(t).prev(n);return r?r.toRange():null}function as(e,t,n,r){function o(e){var r=py.fromRangeStart(n),o=ko(t.getRoot()),i=1===e?o.prev(r):o.next(r);return!i||os(t,i.getNode())!==D}var i,a,u,s,c,l,f,d,m,g,p,h,v,b,y,C,x,w,S,E,k,N,A,R=(i=t,c=e.serialize(r),u=(a=i.createFragment(c)).firstChild,s=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),D=os(t,n.startContainer),T=rs(_(R.firstChild.childNodes,function(e){return"LI"===e.nodeName})),O=t.getRoot();return o(1)?(S=O,A=(w=D).parentNode,Pp.each(T,function(e){A.insertBefore(e,w)}),E=S,k=py.before(w),(N=ko(E).next(k))?N.toRange():null):o(2)?(l=D,d=O,t.insertAfter((f=T).reverse(),l),is(f[0],d)):(g=T,p=O,h=m=D,b=(v=n).cloneRange(),y=v.cloneRange(),b.setStartBefore(h),y.setEndAfter(h),C=[b.cloneContents(),y.cloneContents()],(x=m.parentNode).insertBefore(C[0],m),Pp.each(g,function(e){x.insertBefore(e,m)}),x.insertBefore(C[1],m),x.removeChild(m),is(g[g.length-1],p))}function us(e,t,n){var r,o,i,a,s=e.selection,c=e.dom;/^ | $/.test(t)&&(r=c,o=s.getRng(),i=t,i=gu(a=Lp.fromDom(r.getRoot()),py.fromRangeStart(o))?i.replace(/^ /,"&nbsp;"):i.replace(/^&nbsp;/," "),t=i=pu(a,py.fromRangeEnd(o))?i.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):i.replace(/&nbsp;(<br( \/)?>)?$/," "));var l=e.parser,f=n.merge,d=qa({validate:e.getParam("validate")},e.schema),m='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',g=e.fire("BeforeSetContent",{content:t,format:"html",selection:!0,paste:n.paste});if(g.isDefaultPrevented())e.fire("SetContent",{content:g.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=g.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,m);var p,h,v=(p=s.getRng()).startContainer||(p.parentElement?p.parentElement():null),b=e.getBody();v===b&&s.isCollapsed()&&c.isBlock(b.firstChild)&&(h=b.firstChild)&&!e.schema.getShortEndedElements()[h.nodeName]&&c.isEmpty(b.firstChild)&&((p=c.createRng()).setStart(b.firstChild,0),p.setEnd(b.firstChild,0),s.setRng(p)),s.isCollapsed()||function(e){var t=e.dom,n=ts(e.selection.getRng());e.selection.setRng(n);var r,o=t.getParent(n.startContainer,yx),i=n;null!==(r=o)&&r===t.getParent(i.endContainer,yx)&&Ci(Lp.fromDom(r),i)?hx(e,n,Lp.fromDom(o)):e.getDoc().execCommand("Delete",!1,null)}(e);var y,C,x,S,E,k,N,A,R,D,T,O,B,L,I={context:(z=s.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},M=l.parse(t,I);if(!0===n.paste&&ns(e.schema,M)&&os(c,z))return p=as(d,c,s.getRng(),M),s.setRng(p),void e.fire("SetContent",g);if(function(){for(var e=M;e=e.walk();)1===e.type&&e.attr("data-mce-fragment","1")}(),"mce_marker"===(U=M.lastChild).attr("id"))for(var F=U,U=U.prev;U;U=U.walk(!0))if(3===U.type||!c.isBlock(U.name)){e.schema.isValidChild(U.parent.name,"span")&&U.parent.insert(F,U,"br"===U.name);break}if(e._selectionOverrides.showBlockCaretContainer(z),I.invalid){e.selection.setContent(m);var z=s.getNode(),H=e.getBody();for(9===z.nodeType?z=U=H:U=z;U!==H;)U=(z=U).parentNode;t=z===H?H.innerHTML:c.getOuterHTML(z),t=d.serialize(l.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return d.serialize(M)}))),z===H?c.setHTML(H,t):c.setOuterHTML(z,t)}else y=e,C=t=d.serialize(M),"all"===(x=z).getAttribute("data-mce-bogus")?x.parentNode.insertBefore(y.dom.createFragment(C),x):(S=x.firstChild,E=x.lastChild,!S||S===E&&"BR"===S.nodeName?y.dom.setHTML(x,C):y.selection.setContent(C));N=f,D=(k=e).schema.getTextInlineElements(),T=k.dom,N&&(A=k.getBody(),R=ja(T),Pp.each(T.select("*[data-mce-fragment]"),function(e){if(u(D[e.nodeName.toLowerCase()])&&P($a(T,e),function(e){return!YC.has(e)}))for(var t=e.parentNode;u(t)&&t!==A&&!function(e,t,n){function r(r){var o=e.getStyle(t,r),i=e.getStyle(n,r);return ue(o)&&ue(i)&&o!==i}var o=$a(e,t),i=$a(e,n);return w(o,function(e){function t(t){return w(t,function(t){return t===e})}return t(i)||!t(JC)?r(e):w(_(i,function(e){return w(JC,function(t){return ap(e,t)})}),r)})}(T,e,t);t=t.parentNode)if(R.compare(t,e)){T.remove(e,!0);break}})),function(e,t){var n,r=e.dom,o=e.selection;if(t){o.scrollIntoView(t);var i=Ti(e.getBody(),t);if("false"===r.getContentEditable(i))return r.remove(t),o.select(i);var a,u=r.createRng(),s=t.previousSibling;Qp(s)?(u.setStart(s,s.nodeValue.length),Tp.ie||(a=t.nextSibling,Qp(a)&&(s.appendData(a.data),a.parentNode.removeChild(a)))):(u.setStartBefore(t),u.setEndBefore(t));var c=r.getParent(t,r.isBlock);r.remove(t),c&&r.isEmpty(c)&&(e.$(c).empty(),u.setStart(c,0),u.setEnd(c,0),yx(c)||c.getAttribute("data-mce-fragment")||!(n=function(t){var n=py.fromRangeStart(t);if(n=ko(e.getBody()).next(n))return n.toRange()}(u))?r.add(c,r.create("br",{"data-mce-bogus":"1"})):(u=n,r.remove(c))),o.setRng(u)}}(e,c.get("mce_marker")),O=e.getBody(),Pp.each(O.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),B=c,L=s.getStart(),Kg.from(B.getParent(L,"td,th")).map(Lp.fromDom).each(Qa),e.fire("SetContent",g),e.addVisual()}}function ss(e){return e instanceof IC}function cs(e,t,n){var r;e.dom.setHTML(e.getBody(),t),!0!==n&&Aa(r=e)&&rC(r.getBody()).each(function(e){var t=e.getNode(),n=ot(t)?rC(t).getOr(e):e;r.selection.setRng(n.toRange())})}function ls(e,t,n){var r,o=(r=t,rp(rp({format:"html"},n),{set:!0,content:ss(r)?"":r})),i=n.no_events?o:e.fire("BeforeSetContent",o);return ss(t)||(t=i.content),Kg.from(e.getBody()).fold(f(t),function(n){return ss(t)?function(e,t,n,r){var o,i,a;o=e.parser.getNodeFilters(),i=e.parser.getAttributeFilters(),a=n,E(function(e,t){var n,r,o={},i={},u=[];for(n in a.firstChild&&Cx(a.firstChild,function(n){E(e,function(e){e.name===n.name&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})}),E(t,function(e){"string"==typeof n.attr(e.name)&&(i[e.name]?i[e.name].nodes.push(n):i[e.name]={filter:e,nodes:[n]})})}),o)tp(o,n)&&u.push(o[n]);for(r in i)tp(i,r)&&u.push(i[r]);return u}(o,i),function(e){E(e.filter.callbacks,function(t){t(e.nodes,e.filter.name,{})})});var u=qa({validate:e.validate},e.schema).serialize(n);return r.content=Gh(Lp.fromDom(t))?u:Pp.trim(u),cs(e,r.content,r.no_selection),r.no_events||e.fire("SetContent",r),n}(e,n,t,i):(r=e,o=n,u=i,0===(a=t).length||/^\s+$/.test(a)?(s='<br data-mce-bogus="1">',"TABLE"===o.nodeName?a="<tr><td>"+s+"</td></tr>":/^(UL|OL)$/.test(o.nodeName)&&(a="<li>"+s+"</li>"),cs(r,a=(c=zr(r))&&r.schema.isValidChild(o.nodeName.toLowerCase(),c.toLowerCase())?(a=s,r.dom.createHTML(c,Hr(r),a)):a||'<br data-mce-bogus="1">',u.no_selection),r.fire("SetContent",u)):("raw"!==u.format&&(a=qa({validate:r.validate},r.schema).serialize(r.parser.parse(a,{isRootContent:!0,insert:!0}))),u.content=Gh(Lp.fromDom(o))?a:Pp.trim(a),cs(r,u.content,u.no_selection),u.no_events||r.fire("SetContent",u)),u.content);var r,o,a,u,s,c})}function fs(e){return Hg(e)?e:Vg}function ds(e,t,n){var r=t(e),o=fs(n);return r.orThunk(function(){return o(e)?Kg.none():function(t){for(var n=e.dom,r=fs(o);n.parentNode;){n=n.parentNode;var i=Lp.fromDom(n),a=t(i);if(a.isSome())return a;if(r(i))break}return Kg.none()}(t)})}function ms(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(ni(i)&&!1===i.inherit&&e.dom.is(t,i.selector))return 1}}function gs(e,t,n,r,o){var i=e.dom.getRoot();return t!==i&&(t=e.dom.getParent(t,function(t){return!!ms(e,t,n)||t.parentNode===i||!!wx(e,t,n,r,!0)}),!!wx(e,t,n,r,o))}function ps(e,t,n){return!!xx(t,n.inline)||!!xx(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)}function hs(e,t,n,r,o,i){var u=n[r];if(Hg(n.onmatch))return n.onmatch(t,n,r);if(u)if(zg(u.length)){for(var s in u)if(tp(u,s)){var c="attributes"===r?e.getAttrib(t,s):Jo(e,t,s),l=Xo(u[s],i),f=a(c)||se(c);if(!f||!a(l)){if(o&&f&&!n.exact)return;if((!o||n.exact)&&!xx(c,Go(e,l,s)))return}}}else for(var d=0;d<u.length;d++)if("attributes"===r?e.getAttrib(t,u[d]):Jo(e,t,u[d]))return 1;return 1}function vs(e,t,n,r,o){if(r)return gs(e,r,t,n,o);if(gs(e,r=e.selection.getNode(),t,n,o))return!0;var i=e.selection.getStart();return!(i===r||!gs(e,i,t,n,o))}function bs(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Sx||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length}function ys(e){if(e){var t=new jh(e,e);for(e=t.current();e;e=t.next())if(Qp(e))return e}return null}function Cs(e){var t=Lp.fromTag("span");return ft(t,{id:Ex,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&qp(t,Lp.fromText(Sx)),t}function xs(e,t,n){void 0===n&&(n=!0);var r,o,i,a,u,s,c,l,f=e.dom,d=e.selection;bs(t)?Bu(e,!1,Lp.fromDom(t),n):(r=d.getRng(),o=f.getParent(t,f.isBlock),i=r.startContainer,a=r.startOffset,u=r.endContainer,s=r.endOffset,(l=ys(t))&&l.nodeValue.charAt(0)===Sx&&l.deleteData(0,1),c=l,f.remove(t,!0),i===c&&0<a&&r.setStart(c,a-1),u===c&&0<s&&r.setEnd(c,s-1),o&&f.isEmpty(o)&&Ja(Lp.fromDom(o)),d.setRng(r))}function ws(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)xs(e,t,n);else if(!(t=Oo(e.getBody(),o.getStart())))for(;t=r.get(Ex);)xs(e,t,!1)}function Ss(e,t){return e.appendChild(t),t}function Es(e,t){var n=A(e,function(e,t){return Ss(e,t.cloneNode(!1))},t);return Ss(n,n.ownerDocument.createTextNode(Sx))}function ks(e,t,r,o,i,a){var u,s,c=e.formatter,l=e.dom,f=_(Qg(c.get()),function(e){return e!==o&&!ie(e,"removeformat")});if(0<_((u=e,s=r,R(f,function(e,t){var n=ei(u,t);return u.formatter.matchNode(s,t,{},n)?e.concat([t]):e},[])),function(t){function r(e){return W(e,function(e,t){return w(u,function(e){return e===t})})}return a=o,u=["inline","block","selector","attributes","styles","classes"],!w((i=e).formatter.get(t),function(e){var t=r(e);return w(i.formatter.get(a),function(e){var o,i=r(e),a=t,u=i;return n(o=void 0===o?Pg:o).eq(a,u)})});var i,a,u}).length){var d=r.cloneNode(!1);return l.add(t,d),c.remove(o,i,d,a),l.remove(d),Kg.some(d)}return Kg.none()}function Ns(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,p,h,v,b,y,C=e.dom,x=e.selection,w=[],S=x.getRng(),k=S.startContainer,N=S.startOffset,A=k;for(3===k.nodeType&&(N!==k.nodeValue.length&&(o=!0),A=A.parentNode);A;){if(wx(e,A,t,n,r)){i=A;break}A.nextSibling&&(o=!0),w.push(A),A=A.parentNode}i&&(o?(a=x.getBookmark(),S.collapse(!0),u=Ki(gi(e,S,e.formatter.get(t),!0)),e.formatter.remove(t,n,u,r),x.moveToBookmark(a)):(s=Oo(e.getBody(),i),d=c=Cs(!1).dom,(h=(p=e.dom).getParent(m=null!==s?s:i,g(Wo,e)))&&p.isEmpty(h)?m.parentNode.replaceChild(d,m):(b=Zn(v=Lp.fromDom(m),"br"),y=_(function(){for(var e=[],t=v.dom;t;)e.push(Lp.fromDom(t)),t=t.lastChild;return e}().slice(-1),Ft),b.length===y.length&&E(y,$p),p.isEmpty(m)?m.parentNode.replaceChild(d,m):p.insertAfter(d,m)),l=ks(e,c,i,t,n,r),f=Es(w.concat(l.toArray()),c),xs(e,s,!1),x.setCursorLocation(f,1),C.isEmpty(i)&&C.remove(i)))}function _s(e,t){var n=e.schema.getTextInlineElements();return tp(n,we(t))&&!To(t.dom)&&!rt(t.dom)}function As(e){return Gp(e)&&!zo(e)&&!To(e)&&!rt(e)}function Rs(e,t){for(var n=e;n;n=n[t]){if(Qp(n)&&ue(n.data))return e;if(Gp(n)&&!zo(n))return n}return e}function Ds(e,t,n){var r=ja(e);if(t&&n&&(t=Rs(t,"previousSibling"),n=Rs(n,"nextSibling"),r.compare(t,n))){for(var o=t.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling;t.appendChild(i)}return e.remove(n),Pp.each(Pp.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n}function Ts(e,t,n,r){var o;r&&!1!==t.merge_siblings&&Ds(e,o=Ds(e,$o(r),r),$o(o,!0))}function Os(e,t){return function(n){return!(!n||!Jo(e,n,t))}}function Bs(e,t,n){return function(r){var o,i;e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),o=e,"SPAN"===(i=r).nodeName&&0===o.getAttribs(i).length&&o.remove(i,!0)}}function Ps(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)}function Ls(e,t,n){var r,o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"];return Gp(o)&&(r=o.childNodes.length-1,!n&&i&&i--,o=o.childNodes[r<i?r:i]),Qp(o)&&n&&i>=o.nodeValue.length&&(o=new jh(o,e.getBody()).next()||o),Qp(o)&&!n&&0===i&&new jh(o,e.getBody()).prev()||o}function Is(e,t){var n=t?"firstChild":"lastChild";if(/^(TR|TH|TD)$/.test(e.nodeName)&&e[n]){var r=e[n];return"TR"===e.nodeName&&r[n]||r}return e}function Ms(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o}function Fs(e,t,n,r,o){var i=Lp.fromDom(t),a=Lp.fromDom(e.create(r,o));return Ve(a,(n?Oe:Te)(i)),n?(ze(i,a),je(a,i)):(He(i,a),qp(a,i)),a.dom}function Us(e,t,n,r){var o=$o(t,n,r);return a(o)||"BR"===o.nodeName||e.isBlock(o)}function zs(e,t,n,r,o){var i,a,u=e.dom,s=u,c=r;if(!(ri(a=t)&&Mx(c,a.inline)||ti(a)&&Mx(c,a.block)||ni(a)&&Gp(c)&&s.is(c,a.selector)||t.links&&"A"===r.nodeName))return Px.keep();var l,f,d,m,g,p,h,v,b=r;if(ri(t)&&"all"===t.remove&&Mg(t.preserve_attributes)){var y=_(u.getAttribs(b),function(e){return x(t.preserve_attributes,e.name.toLowerCase())});if(u.removeAllAttribs(b),E(y,function(e){return u.setAttrib(b,e.name,e.value)}),0<y.length)return Px.rename("span")}if("all"!==t.remove){Ix(t.styles,function(e,r){e=Go(u,Xo(e,n),r+""),jg(r)&&(r=e,o=null),!t.remove_similar&&o&&!Mx(Jo(u,o,r),e)||u.setStyle(b,r,""),i=!0}),i&&""===u.getAttrib(b,"style")&&(b.removeAttribute("style"),b.removeAttribute("data-mce-style")),Ix(t.attributes,function(e,r){var i;if(e=Xo(e,n),jg(r)&&(r=e,o=null),t.remove_similar||!o||Mx(u.getAttrib(o,r),e))if("class"===r&&(e=u.getAttrib(b,r))&&(i="",E(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)}),i))u.setAttrib(b,r,i);else{if(Lx.test(r)&&b.removeAttribute("data-mce-"+r),"style"===r&&et(["li"])(b)&&"none"===u.getStyle(b,"list-style-type"))return b.removeAttribute(r),void u.setStyle(b,"list-style-type","none");"class"===r&&b.removeAttribute("className"),b.removeAttribute(r)}}),Ix(t.classes,function(e){e=Xo(e,n),o&&!u.hasClass(o,e)||u.removeClass(b,e)});for(var C=u.getAttribs(b),w=0;w<C.length;w++){var S=C[w].nodeName;if(0!==S.indexOf("_")&&0!==S.indexOf("data-"))return Px.keep()}}return"none"!==t.remove?(l=e,d=t,p=(f=b).parentNode,h=l.dom,v=zr(l),ti(d)&&(v?p===h.getRoot()&&(d.list_block&&Mx(f,d.list_block)||E(Jg(f.childNodes),function(e){Ko(l,v,e.nodeName.toLowerCase())?m?m.appendChild(e):(m=Ms(h,e,v),h.setAttribs(m,l.settings.forced_root_block_attrs)):m=null})):h.isBlock(f)&&!h.isBlock(p)&&(Us(h,f,!1)||Us(h,f.firstChild,!0,!0)||f.insertBefore(h.create("br"),f.firstChild),Us(h,f,!0)||Us(h,f.lastChild,!1,!0)||f.appendChild(h.create("br")))),ni(g=d)&&ri(g)&&at(K(g,"mixed"),!0)&&!Mx(d.inline,f)||h.remove(f,!0),Px.removed()):Px.keep()}function Hs(e,t,n,r,o){return zs(e,t,n,r,o).fold(Vg,function(t){return e.dom.rename(r,t),!0},qg)}function js(e,t,n,r,o){function i(r){var i,a,u,s,c,l=(a=t,u=n,s=o,E(Zo((i=e).dom,r.parentNode).reverse(),function(e){var t;c||"_start"===e.id||"_end"===e.id||(t=wx(i,e,a,u,s))&&!1!==t.split&&(c=e)}),c);return function(e,t,n,r,o,i,a,u){var s,c,l=e.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){for(var g=l.clone(m,!1),p=0;p<t.length&&null!==(g=function(e,t,n){return zs(e,t,u,n,n).fold(f(n),function(t){return e.dom.createFragment().appendChild(n),e.dom.rename(n,t)},f(null))}(e,t[p],g));p++);g&&(s&&g.appendChild(s),c=c||g,s=g)}!i||a.mixed&&l.isBlock(n)||(r=l.split(n,r)),s&&(o.parentNode.insertBefore(s,o),c.appendChild(o),ri(a)&&Ts(l,a,0,s))}return r}(e,d,l,r,r,!0,m,n)}function a(t){return w(d,function(r){return Hs(e,r,n,t,t)})}function s(e){var t,n=p.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return zo(t=r)&&Gp(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),Qp(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),p.remove(n,!0),r}function c(t){var n=gi(e,t,d,t.collapsed);if(m.split){if(n=Ki(n),(o=Ls(e,n,!0))!==(a=Ls(e,n))){if(o=Is(o,!0),a=Is(a,!1),Ps(p,o,a)){var r=Kg.from(o.firstChild).getOr(o);return i(Fs(p,r,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void s(!0)}if(Ps(p,a,o))return r=Kg.from(a.lastChild).getOr(a),i(Fs(p,r,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void s(!1);var o=Ms(p,o,"span",{id:"_start","data-mce-type":"bookmark"}),a=Ms(p,a,"span",{id:"_end","data-mce-type":"bookmark"}),u=p.createRng();u.setStartAfter(o),u.setEndBefore(a),pi(p,u,function(e){E(e,function(e){zo(e)||zo(e.parentNode)||i(e)})}),i(o),i(a),o=s(!0),a=s()}else o=a=i(o);n.startContainer=o.parentNode||o,n.startOffset=p.nodeIndex(o),n.endContainer=a.parentNode||a,n.endOffset=p.nodeIndex(a)+1}pi(p,n,function(e){E(e,v)})}var l,d=e.formatter.get(t),m=d[0],g=!0,p=e.dom,h=e.selection,v=function(t){var n=!0,r=!1;Gp(t)&&p.getContentEditable(t)&&(n=g,g="true"===p.getContentEditable(t),r=!0);var o,i,s=Jg(t.childNodes);if(g&&!r&&(o=a(t)||w(d,function(e){return ps(p,t,e)}),i=t.parentNode,!o&&u(i)&&oi(m)&&a(i)),m.deep&&s.length){for(var c=0;c<s.length;c++)v(s[c]);r&&(g=n)}E(["underline","line-through","overline"],function(n){Gp(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&Qo(p,t.parentNode)===n&&Hs(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,t)})};if(r)return Vo(r)?((l=p.createRng()).setStartBefore(r),l.setEndAfter(r),c(l)):c(r),void Li(e,t,r,n);if("false"!==p.getContentEditable(h.getNode()))h.isCollapsed()&&ri(m)&&!bi(e).length?Ns(e,t,n,o):(Ei(h,!0,function(){Si(e,c)}),ri(m)&&vs(e,t,n,h.getStart())&&qo(p,h,h.getRng()),e.nodeChanged()),Li(e,t,r,n);else{r=h.getNode();for(var b=0;b<d.length&&(!d[b].ceFalseOverride||!Hs(e,d[b],n,r,r));b++);Li(e,t,r,n)}}function Vs(e){return Gp(e)&&!zo(e)&&!To(e)&&!rt(e)}function qs(e){return tp(e,"vars")}function $s(e,t,n,r,o){return D(t,function(t){var i=e.formatter.matchNode(t,n,null!=o?o:{},r);return!zg(i)},function(t){return ms(e,t,n)||!r&&u(e.formatter.matchNode(t,n,o,!0))})}function Ws(e,t){var n=null!=t?t:Hx(e);return _(Zo(e.dom,n),function(e){return Gp(e)&&!rt(e)})}function Ks(e,t,n,r,o,i){var a,u,s,c,l,f,d,m,g;return null===t.get()&&(u=e,(a=t).set({}),u.on("NodeChange",function(e){jx(u,e.element,a.get())}),u.on("FormatApply FormatRemove",function(e){var t=Kg.from(e.node).map(function(e){return Vo(e)?e:e.startContainer}).bind(function(e){return Gp(e)?Kg.some(e):Kg.from(e.parentElement)}).getOrThunk(function(){return Hx(u)});jx(u,t,a.get())})),s=e,l=n,f=r,d=o,m=i,g=(c=t).get(),E(l.split(","),function(e){function t(){var t=Ws(s);return $s(s,t,e,d,m).isSome()}var n,r=K(g,e).getOrThunk(function(){var t={withSimilar:{state:qn(!1),similar:!0,callbacks:[]},withoutSimilar:{state:qn(!1),similar:!1,callbacks:[]},withVars:[]};return g[e]=t});zg(m)?((n=d?r.withSimilar:r.withoutSimilar).callbacks.push(f),1===n.callbacks.length&&n.state.set(t())):r.withVars.push({state:qn(t()),similar:d,vars:m,callback:f})}),c.set(g),{unbind:function(){var e,o=n,i=r,a=(e=t).get();E(o.split(","),function(e){return K(a,e).each(function(t){a[e]={withSimilar:rp(rp({},t.withSimilar),{callbacks:_(t.withSimilar.callbacks,function(e){return e!==i})}),withoutSimilar:rp(rp({},t.withoutSimilar),{callbacks:_(t.withoutSimilar.callbacks,function(e){return e!==i})}),withVars:_(t.withVars,function(e){return e.callback!==i})}})}),e.set(a)}}}function Xs(e,t){var n=(t||document).createDocumentFragment();return E(e,function(e){n.appendChild(e.dom)}),Lp.fromDom(n)}function Ys(e,t,n){return{element:e,width:t,rows:n}}function Gs(e,t){return{element:e,cells:t}}function Js(e,t){var n=parseInt(dt(e,t),10);return isNaN(n)?1:n}function Qs(e){return R(e,function(e,t){return t.cells.length>e?t.cells.length:e},0)}function Zs(e,t){for(var n=e.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(he(o[i],t))return Kg.some({x:i,y:r});return Kg.none()}function ec(e,t,n,r,o){for(var i=[],a=e.rows,u=n;u<=o;u++){var s=a[u].cells,c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(Gs(a[u].element,c))}return i}function tc(e){var t=Ys(ir(e),0,[]);return E(Zn(e,"tr"),function(e,n){E(Zn(e,"td,th"),function(r,o){!function(e,t,n,r,o){for(var i=Js(o,"rowspan"),a=Js(o,"colspan"),u=e.rows,s=n;s<n+i;s++){u[s]||(u[s]=Gs(ar(r),[]));for(var c=t;c<t+a;c++)u[s].cells[c]=s===n&&c===t?o:ir(o)}}(t,function(e,t,n){for(;r=t,((o=e.rows)[n]?o[n].cells:[])[r];)t++;var r,o;return t}(t,o,n),n,e,r)})}),Ys(t.element,Qs(t.rows),t.rows)}function nc(e,t){var n,r,o,i=Lp.fromDom(t.commonAncestorContainer),a=eu(i,e),u=_(a,function(e){return Mt(e)||Vh(e)}),s=(o=t,T(r=a,function(e){return"li"===we(e)&&Ci(e,o)}).fold(f([]),function(){return T(r,function(e){return"ul"===we(e)||"ol"===we(e)}).map(function(e){var t=Lp.fromTag(we(e));return pt(t,W(bt(e),function(e,t){return ap(t,"list-style")})),[Lp.fromTag("li"),t]}).getOr([])}));return S(u.concat(s.length?s:Kh(n=i)?Ae(n).filter(Wh).fold(f([]),function(e){return[n,e]}):Wh(n)?[n]:[]),ir)}function rc(){return Xs([])}function oc(e,t){return At(t[0],"table",g(he,e)).bind(function(e){var n,r,o=t[0],i=t[t.length-1],a=tc(e);return r=i,Zs(n=a,o).bind(function(e){return Zs(n,r).map(function(t){return r=n,o=e.x,i=e.y,a=t.x,s=i<(u=t.y)?ec(r,o,i,a,u):ec(r,o,u,a,i),Ys(r.element,Qs(s),s);var r,o,i,a,u,s})}).map(function(e){return Xs([(n=S((t=e).rows,function(e){var t=S(e.cells,function(e){var t=ar(e);return gt(t,"colspan"),gt(t,"rowspan"),t}),n=ir(e.element);return Ve(n,t),n}),r=ir(t.element),Ve(o=Lp.fromTag("tbody"),n),qp(r,o),r)]);var t,n,r,o})}).getOrThunk(rc)}function ic(e,t){var n,r,o,i,a,u,s,c=vi(t,e);return 0<c.length?oc(e,c):(n=e,0<(r=t).length&&r[0].collapsed?rc():(o=n,i=r[0],a=Lp.fromDom(i.cloneContents()),s=R(u=nc(o,i),function(e,t){return qp(t,e),t},a),0<u.length?Xs([s]):s))}function ac(e,t){return 0<=t&&t<e.length&&Ho(e.charAt(t))}function uc(e,t){var n=tv(e.innerText);return t?n.replace(/^[ \f\n\r\t\v]+/,""):n}function sc(e){return Gp(e)?e.outerHTML:Qp(e)?Rv.encodeRaw(e.data,!1):Zp(e)?"<!--"+e.data+"-->":""}function cc(e,t){var n=0;E(e,function(e){var r,o,i,a,u,s,c,l;0===e[0]?n++:1===e[0]?(a=t,u=e[1],s=n,l=function(e){var t,n=document.createElement("div"),r=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r}(u),a.hasChildNodes()&&s<a.childNodes.length?(c=a.childNodes[s]).parentNode.insertBefore(l,c):a.appendChild(l),n++):2===e[0]&&(o=n,(r=t).hasChildNodes()&&o<r.childNodes.length&&(i=r.childNodes[o]).parentNode.removeChild(i))})}function lc(e){var t,n=B((t=e.getBody(),_(S(Jg(t.childNodes),sc),function(e){return 0<e.length})),function(t){var n=Ha(e.serializer,t);return 0<n.length?[n]:[]}),r=n.join("");return-1!==r.indexOf("</iframe>")?{type:"fragmented",fragments:n,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:r,bookmark:null,beforeBookmark:null}}function fc(e,t,n){function r(e,t,n,r){for(var o=e;o-t<r&&o<n&&s[o]===c[o-t];)++o;return{start:e,end:o,diag:t}}var o,i,a,s,c,l,f,d,m,g,p,h=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?(o=t.fragments,i=e.getBody(),a=S(Jg(i.childNodes),sc),cc((c=o,l=(s=a).length+c.length+2,f=new Array(l),d=new Array(l),m=function(e,t,n,r,o){var i=g(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&s[a]===c[u]?(o.push([0,s[a]]),++a,++u):r-n<t-e?(o.push([2,s[a]]),++a):(o.push([1,c[u]]),++u);else{m(e,i.start,n,i.start-i.diag,o);for(var l=i.start;l<i.end;++l)o.push([0,s[l]]);m(i.end,t,i.end-i.diag,r,o)}},g=function(e,t,n,o){var i=t-e,a=o-n;if(0==i||0==a)return null;var u,l,m,g,p,h=i-a,v=a+i,b=(v%2==0?v:1+v)/2;for(f[1+b]=e,d[1+b]=t+1,u=0;u<=b;++u){for(l=-u;l<=u;l+=2){for(m=l+b,l===-u||l!==u&&f[m-1]<f[m+1]?f[m]=f[m+1]:f[m]=f[m-1]+1,p=(g=f[m])-e+n-l;g<t&&p<o&&s[g]===c[p];)f[m]=++g,++p;if(h%2!=0&&h-u<=l&&l<=h+u&&d[m-h]<=f[m])return r(d[m-h],l+e-n,t,o)}for(l=h-u;l<=h+u;l+=2){for(m=l+b-h,l===h-u||l!==h+u&&d[m+1]<=d[m-1]?d[m]=d[m+1]-1:d[m]=d[m-1],p=(g=d[m]-1)-e+n-l;e<=g&&n<=p&&s[g]===c[p];)d[m]=g--,p--;if(h%2==0&&-u<=l&&l<=u&&d[m]<=f[m+h])return r(d[m],l+e-n,t,o)}}},p=[],m(0,s.length,0,c.length,p),p),i)):e.setContent(t.content,{format:"raw",no_selection:!u(h)||!Bo(h)||!h.isFakeCaret}),e.selection.moveToBookmark(h)}function dc(e){return"fragmented"===e.type?e.fragments.join(""):e.content}function mc(e){var t=Lp.fromTag("body",Vx());return rr(t,dc(e)),E(Zn(t,"*[data-mce-bogus]"),$e),t.dom.innerHTML}function gc(e,t){return!(!e||!t)&&(r=t,dc(e)===dc(r)||(n=t,mc(e)===mc(n)));var n,r}function pc(e){return 0===e.get()}function hc(e,t,n){pc(n)&&(e.typing=t)}function vc(e,t){e.typing&&(hc(e,!1,t),e.add())}function bc(e){return{undoManager:{beforeChange:function(t,n){var r=e,o=n;pc(t)&&o.set(Ey(r.selection))},add:function(t,n,r,o,i,a){return function(e,t,n,r,o,i,a){var u=lc(e);if(i=Pp.extend(i=i||{},u),!1===pc(r)||e.removed)return null;var s=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:s,originalEvent:a}).isDefaultPrevented())return null;if(s&&gc(s,i))return null;t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e});var c=e.getParam("custom_undo_redo_levels",0,"number");if(c&&t.data.length>c){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=Ey(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var f={level:i,lastLevel:s,originalEvent:a};return 0<n.get()?(e.setDirty(!0),e.fire("AddUndo",f),e.fire("change",f)):e.fire("AddUndo",f),i}(e,t,n,r,o,i,a)},undo:function(t,n,r){return o=e,a=n,u=r,(i=t).typing&&(i.add(),i.typing=!1,hc(i,!1,a)),0<u.get()&&(u.set(u.get()-1),fc(o,s=i.data[u.get()],!0),o.setDirty(!0),o.fire("Undo",{level:s})),s;var o,i,a,u,s},redo:function(t,n){return r=e,i=n,(o=t).get()<i.length-1&&(o.set(o.get()+1),fc(r,a=i[o.get()],!1),r.setDirty(!0),r.fire("Redo",{level:a})),a;var r,o,i,a},clear:function(t,n){var r,o=e,i=n;(r=t).data=[],i.set(0),r.typing=!1,o.fire("ClearUndos")},reset:function(e){var t;(t=e).clear(),t.add()},hasUndo:function(t,n){return r=e,o=t,0<n.get()||o.typing&&o.data[0]&&!gc(lc(r),o.data[0]);var r,o},hasRedo:function(e,t){return n=e,t.get()<n.data.length-1&&!n.typing;var n},transact:function(e,t,n){return o=n,vc(r=e,t),r.beforeChange(),r.ignore(o),r.add();var r,o},ignore:function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},extra:function(t,n,r,o){var i,a,u=e,s=n,c=o;(i=t).transact(r)&&(a=i.data[s.get()].bookmark,fc(u,i.data[s.get()-1],!0),i.transact(c)&&(i.data[s.get()-1].beforeBookmark=a))}},formatter:{match:function(t,n,r,o){return vs(e,t,n,r,o)},matchAll:function(t,n){return o=t,i=n,a=[],u={},s=(r=e).selection.getStart(),r.dom.getParent(s,function(e){for(var t=0;t<o.length;t++){var n=o[t];!u[n]&&wx(r,e,n,i)&&(u[n]=!0,a.push(n))}},r.dom.getRoot()),a;var r,o,i,a,u,s},matchNode:function(t,n,r,o){return wx(e,t,n,r,o)},canApply:function(t){return function(e){var n=e.formatter.get(t),r=e.dom;if(n)for(var o=Zo(r,e.selection.getStart()),i=n.length-1;0<=i;i--){var a=n[i];if(!ni(a)||u(a.defaultBlock))return!0;for(var s=o.length-1;0<=s;s--)if(r.is(o[s],a.selector))return!0}return!1}(e)},closest:function(t){function n(e){return he(e,Lp.fromDom(r.getBody()))}return r=e,o=t,Kg.from(r.selection.getStart(!0)).bind(function(e){return ds(Lp.fromDom(e),function(e){return H(o,function(t){return wx(r,e.dom,n=t)?Kg.some(n):Kg.none();var n})},n)}).getOrNull();var r,o},apply:function(t,n,r){return zx(e,t,n,r)},remove:function(t,n,r,o){return js(e,t,n,r,o)},toggle:function(t,n,r){var o,i=t,a=n,u=r,s=(o=e).formatter.get(i);(!vs(o,i,a,u)||"toggle"in s[0]&&!s[0].toggle?zx:js)(o,i,a,u)},formatChanged:function(t,n,r,o,i){return Ks(e,t,n,r,o,i)}},editor:{getContent:function(t,n){return r=e,o=t,i=n,
164
+ Kg.from(r.getBody()).fold(f("tree"===o.format?new IC("body",11):""),function(e){return t=r,a=e,u=i,d=rp(rp({},n=o),{format:u,get:!0,getInner:!0}),g="raw"===(m=n.no_events?d:t.fire("BeforeGetContent",d)).format?Pp.trim(WC(t.serializer,a.innerHTML)):"text"===m.format?t.dom.isEmpty(a)?"":tv(a.innerText||a.textContent):"tree"===m.format?t.serializer.serialize(a,m):(c=(s=t).serializer.serialize(a,m),l=zr(s),f=new RegExp("^(<"+l+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+l+">[\r\n]*|<br \\/>[\r\n]*)$"),c.replace(f,"")),x(["text","tree"],m.format)||Gh(Lp.fromDom(a))?m.content=g:m.content=Pp.trim(g),(m.no_events?m:t.fire("GetContent",m)).content;var t,n,a,u,s,c,l,f,d,m,g});var r,o,i},setContent:function(t,n){return ls(e,t,n)},insertContent:function(t,n){return us(e,t,n)},addVisual:function(t){var n,r=t,o=(n=e).dom,i=u(r)?r:n.getBody();zg(n.hasVisual)&&(n.hasVisual=n.getParam("visual",!0,"boolean")),E(o.select("table,a",i),function(e){switch(e.nodeName){case"TABLE":var t=n.getParam("visual_table_class","mce-item-table","string"),r=o.getAttrib(e,"border");r&&"0"!==r||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t);break;case"A":var i,a;o.getAttrib(e,"href")||(i=o.getAttrib(e,"name")||e.id,a=n.getParam("visual_anchor_class","mce-item-anchor","string"),i&&n.hasVisual?o.addClass(e,a):o.removeClass(e,a))}}),n.fire("VisualAid",{element:r,hasVisual:n.hasVisual})}},selection:{getContent:function(t,n){return function(e,t,n){var r,o=(r=t,rp(rp({},n=void 0===n?{}:n),{format:r,get:!0,selection:!0})),i=e.fire("BeforeGetContent",o);if(i.isDefaultPrevented())return e.fire("GetContent",i),i.content;if("text"===i.format)return d=e,Kg.from(d.selection.getRng()).map(function(e){var t=Kg.from(d.dom.getParent(e.commonAncestorContainer,d.dom.isBlock)),n=d.getBody(),r=t.map(function(e){return e.nodeName}).getOr("div").toLowerCase(),o=Tp.browser.isIE()&&"pre"!==r,i=d.dom.add(n,r,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),a=uc(i,o),u=tv(i.textContent);if(d.dom.remove(i),ac(u,0)||ac(u,u.length-1)){var s=uc(t.getOr(n),o),c=s.indexOf(a);return-1===c?a:(ac(s,c-1)?" ":"")+a+(ac(s,c+a.length)?" ":"")}return a}).getOr("");i.getInner=!0;var a,u,s,c,l,f,d,m=(u=i,s=(a=e).selection.getRng(),c=a.dom.create("body"),l=Ba(a,hi(a.selection.getSel())),(f=u.contextual?ic(Lp.fromDom(a.getBody()),l).dom:s.cloneContents())&&c.appendChild(f),a.selection.serializer.serialize(c,u));return"tree"===i.format?m:(i.content=e.selection.isCollapsed()?"":m,e.fire("GetContent",i),i.content)}(e,t,n)}},raw:{getModel:function(){return Kg.none()}}}}function yc(e){return tp(e.plugins,"rtc")}function Cc(e){var t=e;return K(e.plugins,"rtc").bind(function(e){return Kg.from(e.setup)}).fold(function(){return t.rtcInstance=bc(e),Kg.none()},function(e){var n,r;return t.rtcInstance=(n=f(null),r=f(""),{undoManager:{beforeChange:s,add:n,undo:n,redo:n,clear:s,reset:s,hasUndo:Vg,hasRedo:Vg,transact:n,ignore:s,extra:s},formatter:{match:Vg,matchAll:f([]),matchNode:f(void 0),canApply:Vg,closest:r,apply:s,remove:s,toggle:s,formatChanged:f({unbind:s})},editor:{getContent:r,setContent:r,insertContent:s,addVisual:s},selection:{getContent:r},raw:{getModel:f(Kg.none())}}),Kg.some(function(){return e().then(function(e){function n(e){return Ig(e)?e:{}}return t.rtcInstance=(r=e.undoManager,o=e.formatter,i=e.editor,a=e.selection,u=e.raw,{undoManager:{beforeChange:r.beforeChange,add:r.add,undo:r.undo,redo:r.redo,clear:r.clear,reset:r.reset,hasUndo:r.hasUndo,hasRedo:r.hasRedo,transact:function(e,t,n){return r.transact(n)},ignore:function(e,t){return r.ignore(t)},extra:function(e,t,n,o){return r.extra(n,o)}},formatter:{match:function(e,t,r,i){return o.match(e,n(t),i)},matchAll:o.matchAll,matchNode:o.matchNode,canApply:function(e){return o.canApply(e)},closest:function(e){return o.closest(e)},apply:function(e,t){return o.apply(e,n(t))},remove:function(e,t){return o.remove(e,n(t))},toggle:function(e,t){return o.toggle(e,n(t))},formatChanged:function(e,t,n,r,i){return o.formatChanged(t,n,r,i)}},editor:{getContent:function(e){return i.getContent(e)},setContent:function(e,t){return i.setContent(e,t)},insertContent:function(e){return i.insertContent(e)},addVisual:i.addVisual},selection:{getContent:function(e,t){return a.getContent(t)}},raw:{getModel:function(){return Kg.some(u.getRawModel())}}}),e.rtc.isRemote;var r,o,i,a,u})})})}function xc(e){return e.rtcInstance||bc(e)}function wc(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")}function Sc(e){return 0===e.dom.length?($p(e),Kg.none()):Kg.some(e)}function Ec(e,t,n,r){e.bind(function(e){return(r?Su:wu)(e.dom,r?e.dom.length:0),t.filter(Mp).map(function(t){var o=n,i=r,a=e.dom,u=t.dom,s=(i?a:u).length;i?(Eu(a,u,!1,!i),o.setStart(u,s)):(Eu(u,a,!1,!i),o.setEnd(u,s))})}).orThunk(function(){var e=r;return t.filter(function(e){return Ri.isBookmarkNode(e.dom)}).bind(e?De:Re).or(t).filter(Mp).map(function(e){var t,n=r;Ae(t=e).each(function(e){var r=t.dom;n&&gu(e,py(r,0))?wu(r,0):!n&&pu(e,py(r,r.length))&&Su(r,r.length)})})})}function kc(e,t,n){var r,o=(r=t,rp(rp({format:"html"},n=void 0===n?{}:n),{set:!0,selection:!0,content:r})),i=o;if(!o.no_events){var a=e.fire("BeforeSetContent",o);if(a.isDefaultPrevented())return void e.fire("SetContent",a);i=a}i.content=function(e,t){if("raw"===t.format)return t.content;var n=e.selection.getRng(),r=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=e.parser.parse(t.content,rp(rp({isRootContent:!0,forced_root_block:!1},o),t));return qa({validate:e.validate},e.schema).serialize(i)}(e,i);var u=e.selection.getRng();!function(e,t){var n=Kg.from(t.firstChild).map(Lp.fromDom),r=Kg.from(t.lastChild).map(Lp.fromDom);e.deleteContents(),e.insertNode(t);var o=n.bind(Re).filter(Mp).bind(Sc),i=r.bind(De).filter(Mp).bind(Sc);Ec(o,n,e,!0),Ec(i,r,e,!1),e.collapse(!1)}(u,u.createContextualFragment(i.content)),e.selection.setRng(u),la(e,u),i.no_events||e.fire("SetContent",i)}function Nc(e,t,n){var r;e&&tp(e,t)&&(0===(r=_(e[t],function(e){return e!==n})).length?delete e[t]:e[t]=r)}function _c(e){return e.select}function Ac(e){return e&&e.ownerDocument&&ve(Lp.fromDom(e.ownerDocument),Lp.fromDom(e))}function Rc(e,t,n,r){function o(e,t){return kc(r,e,t)}function i(){var t=s(),n=null==t?void 0:t.anchorNode,r=null==t?void 0:t.focusNode;if(!t||!n||!r||Ze(n)||Ze(r))return!0;var o=e.createRng();o.setStart(n,t.anchorOffset),o.collapse(!0);var i=e.createRng();return i.setStart(r,t.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0}function a(e){var t=b();t.collapse(!!e),y(t)}function s(){return t.getSelection?t.getSelection():t.document.selection}function c(e,t){return T(t,function(t){return m.is(t,e)})}function l(e){return m.getParents(e,null,m.getRoot())}var f,d,m,g,p,h,v=function(e,t){return p||(p={},h={},g.on("NodeChange",function(e){var t=e.element,n=l(t),r={};Pp.each(p,function(e,t){c(t,n).each(function(o){h[t]||(E(e,function(e){e(!0,{node:o,selector:t,parents:n})}),h[t]=e),r[t]=e})}),Pp.each(h,function(e,o){r[o]||(delete h[o],Pp.each(e,function(e){e(!1,{node:t,selector:o,parents:n})}))})})),p[e]||(p[e]=[]),p[e].push(t),c(e,l(g.selection.getStart())).each(function(){h[e]=p[e]}),{unbind:function(){Nc(p,e,t),Nc(h,e,t)}}},b=function(){function n(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}}var o,i,a,u=t.document;if(void 0!==r.bookmark&&!1===Aa(r)){var c=xa(r);if(c.isSome())return c.map(function(e){return Ba(r,[e])[0]}).getOr(u.createRange())}try{(o=s())&&!Ze(o.anchorNode)&&(i=0<o.rangeCount?o.getRangeAt(0):(o.createRange?o:u).createRange(),i=Ba(r,[i])[0])}catch(n){}return(i=i||(u.createRange?u.createRange():u.body.createTextRange())).setStart&&9===i.startContainer.nodeType&&i.collapsed&&(a=e.getRoot(),i.setStart(a,0),i.setEnd(a,0)),f&&d&&(0===n(i.START_TO_START,i,f)&&0===n(i.END_TO_END,i,f)?i=d:d=f=null),i},y=function(e,t){var n;if((o=e)&&(_c(o)||Ac(o.startContainer)&&Ac(o.endContainer))){var o,i=_c(e)?e:null;if(i){d=null;try{i.select()}catch(e){}}else{var a=s();if(e=r.fire("SetSelectionRange",{range:e,forward:t}).range,a){d=e;try{a.removeAllRanges(),a.addRange(e)}catch(e){}!1===t&&a.extend&&(a.collapse(e.endContainer,e.endOffset),a.extend(e.startContainer,e.startOffset)),f=0<a.rangeCount?a.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!a.setBaseAndExtent||Tp.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(n=e.startContainer.childNodes[e.startOffset])&&"IMG"===n.tagName&&(a.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),a.anchorNode===e.startContainer&&a.focusNode===e.endContainer||a.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},C={bookmarkManager:null,controlSelection:null,dom:m=e,win:t,serializer:n,editor:g=r,collapse:a,setCursorLocation:function(t,n){var o=e.createRng();u(t)&&u(n)?(o.setStart(t,n),o.setEnd(t,n),y(o),a(!1)):(xi(e,o,r.getBody(),!0),y(o))},getContent:function(e){return n=(t=void 0===(t=e)?{}:t).format||"html",o=t,wc(r).selection.getContent(n,o);var t,n,o},setContent:o,getBookmark:function(e,t){return x.getBookmark(e,t)},moveToBookmark:function(e){return x.moveToBookmark(e)},select:function(t,n){var r=e,o=n;return Kg.from(t).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(xi(r,n,e,!0),xi(r,n,e,!1)),n}).each(y),t},isCollapsed:function(){var e=b(),t=s();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:i,setNode:function(t){return o(e.getOuterHTML(t)),t},getNode:function(){return function(e,t){if(!t)return e;var n=t.startContainer,r=t.endContainer,o=t.startOffset,i=t.endOffset,a=t.commonAncestorContainer;return!t.collapsed&&(n===r&&i-o<2&&n.hasChildNodes()&&(a=n.childNodes[o]),3===n.nodeType&&3===r.nodeType&&(n=n.length===o?Oa(n.nextSibling,!0):n.parentNode,r=0===i?Oa(r.previousSibling,!1):r.parentNode,n&&n===r))?n:a&&3===a.nodeType?a.parentNode:a}(r.getBody(),b())},getSel:s,setRng:y,getRng:b,getStart:function(e){return Da(r.getBody(),b(),e)},getEnd:function(e){return Ta(r.getBody(),b(),e)},getSelectedBlocks:function(t,n){return function(e,t,n,r){var o=[],i=e.getRoot();if(n=e.getParent(n||Da(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Ta(i,t,t.collapsed),e.isBlock),n&&n!==i&&o.push(n),n&&r&&n!==r)for(var a,u=new jh(n,i);(a=u.next())&&a!==r;)e.isBlock(a)&&o.push(a);return r&&n!==r&&r!==i&&o.push(r),o}(e,b(),t,n)},normalize:function(){var t=b();if(1<hi(s()).length||!wi(r))return t;var n=$i(e,t);return n.each(function(e){y(e,i())}),n.getOr(t)},selectorChanged:function(e,t){return v(e,t),C},selectorChangedWithUnbind:v,getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){u(e)?(r.inline?ua:ca)(r,e,t):la(r,b(),t)},placeCaretAt:function(e,t){return y(Fi(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=b();return e.collapsed?py.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=f=d=null,w.destroy()}},x=Ri(C),w=Ii(C,r);return C.bookmarkManager=x,C.controlSelection=w,C}function Dc(e,t){var n,r,o,i,a=fn();t.convert_fonts_to_spans&&(r=e,o=a,i=Pp.explode(t.font_size_legacy_values),r.addNodeFilter("font",function(e){E(e,function(e){var t,n=o.parse(e.attr("style")),r=e.attr("color"),a=e.attr("face"),u=e.attr("size");r&&(n.color=r),a&&(n["font-family"]=a),u&&(n["font-size"]=i[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",o.serialize(n)),t=e,E(["color","face","size"],function(e){t.attr(e,null)})})})),n=a,e.addNodeFilter("strike",function(e){E(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})}function Tc(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return{type:t=r?r[1]:t,data:n[1]}}function Oc(e,t){var n;try{n=atob(t)}catch(e){return Kg.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return Kg.some(new Blob([r],{type:e}))}function Bc(e){return 0===e.indexOf("blob:")?(t=e,new Uh(function(e,n){function r(){n("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")}try{var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){200===o.status?e(o.response):r()},o.onerror=r,o.send()}catch(e){r()}})):0===e.indexOf("data:")?(n=e,new Uh(function(e){var t=Tc(n);Oc(t.type,t.data).fold(function(){return e(new Blob([]))},e)})):null;var t,n}function Pc(e){return(e||"blobid")+qx++}function Lc(e,t){var n={};return{findAll:function(r,o){o=o||qg;var i=S(_(r?Jg(r.getElementsByTagName("img")):[],function(t){var n=t.src;return Tp.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&n&&n!==Tp.transparentSrc&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&o(t):0===n.indexOf("data:")&&o(t))}),function(e){if(void 0!==n[e.src])return new Uh(function(t){n[e.src].then(function(n){return"string"==typeof n?n:void t({image:e,blobInfo:n.blobInfo})})});var r=new Uh(function(n,r){var o,i,a,u,s,c,l,f,d;o=t,a=n,u=r,0!==(i=e).src.indexOf("blob:")?(c=(s=Tc(i.src)).data,l=s.type,f=c,(d=o.getByData(f,l))?a({image:i,blobInfo:d}):Bc(i.src).then(function(e){d=o.create(Pc(),e,f),o.add(d),a({image:i,blobInfo:d})},function(e){u(e)})):(d=o.getByUri(i.src))?a({image:i,blobInfo:d}):Bc(i.src).then(function(e){var t=e;new Uh(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}).then(function(t){f=Tc(t).data,d=o.create(Pc(),e,f),o.add(d),a({image:i,blobInfo:d})})},function(e){u(e)})}).then(function(e){return delete n[e.image.src],e})["catch"](function(t){return delete n[e.src],t});return n[e.src]=r});return Uh.all(i)}}}function Ic(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new IC("br",1)).shortEnded=!0:r.empty().append(new IC("#text",3)).value=Qh}function Mc(e,t,n,r){return r.isEmpty(t,n,function(t){return(n=e.getElementRule(t.name))&&n.paddEmpty;var n})}function Fc(e,t){function n(e){var t,n,r=e.attr("src");(t=e).attr("src")===Tp.transparentSrc||u(t.attr("data-mce-placeholder"))||u(e.attr("data-mce-bogus"))||((n=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(r))?Kg.some({type:n[1],data:decodeURIComponent(n[2])}):Kg.none()).filter(function(){return function(e,t){if(t.images_dataimg_filter){var n=new Image;return n.src=e.attr("src"),j(e.attributes.map,function(e,t){n.setAttribute(t,e)}),t.images_dataimg_filter(n)}return!0}(e,o)}).bind(function(e){var t=e.type,n=e.data;return Kg.from(i.getByData(n,t)).orThunk(function(){return Oc(t,n).map(function(e){var t=i.create(Pc(),e,n);return i.add(t),t})})}).each(function(t){e.attr("src",t.blobUri())})}var r,o,i,a=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(e,n,r){var o,i,u,s,c,l,f,d,m=e.length,g=Pp.extend({},a.getBlockElements()),p=a.getNonEmptyElements(),h=a.getWhiteSpaceElements();for(g.body=1,o=0;o<m;o++)if(u=(i=e[o]).parent,g[i.parent.name]&&i===u.lastChild){for(c=i.prev;c;){if("span"!==(l=c.name)||"bookmark"!==c.attr("data-mce-type")){"br"===l&&(i=null);break}c=c.prev}i&&(i.remove(),Mc(a,p,h,u)&&(f=a.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&Ic(t,r,g,u)))}else{for(s=i;u&&u.firstChild===s&&u.lastChild===s&&!g[(s=u).name];)u=u.parent;s===u&&!0!==t.padd_empty_with_br&&((d=new IC("#text",3)).value=Qh,i.replace(d))}}),e.addAttributeFilter("href",function(e){var n,r,o=e.length;if(!t.allow_unsafe_link_target)for(;o--;){var i=e[o];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",(r=void 0,r=(n=i.attr("rel"))?Pp.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r,o=e.length;o--;)"ul"!==(r=(n=e[o]).parent).name&&"ol"!==r.name||(n.prev&&"li"===n.prev.name?n.prev.append(n):((t=new IC("li",1)).attr("style","list-style-type: none"),n.wrap(t)))}),t.validate&&a.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t=a.getValidClasses(),n=e.length;n--;){for(var r=e[n],o=r.attr("class").split(" "),i="",u=0;u<o.length;u++){var s=o[u],c=!1,l=t["*"];l&&l[s]&&(c=!0),l=t[r.name],(c=!(c||!l||!l[s])||c)&&(i&&(i+=" "),i+=s)}i.length||(i=null),r.attr("class",i)}}),r=e,(i=(o=t).blob_cache)&&r.addAttributeFilter("src",function(e){return E(e,n)})}function Uc(e,t){function n(e){var t=e.name;t in r&&((u=i[t])?u.push(e):i[t]=[e]);for(var n=o.length;n--;){var u,s=o[n].name;s in e.attributes.map&&((u=a[s])?u.push(e):a[s]=[e])}return e}void 0===t&&(t=cn());var r={},o=[],i={},a={};(e=e||{}).validate=!("validate"in e)||e.validate,e.root_name=e.root_name||"body";var s={schema:t,addAttributeFilter:function(e,t){Kx(Xx(e),function(e){for(var n=0;n<o.length;n++)if(o[n].name===e)return void o[n].callbacks.push(t);o.push({name:e,callbacks:[t]})})},getAttributeFilters:function(){return[].concat(o)},addNodeFilter:function(e,t){Kx(Xx(e),function(e){var n=r[e];n||(r[e]=n=[]),n.push(t)})},getNodeFilters:function(){var e,t=[];for(e in r)tp(r,e)&&t.push({name:e,callbacks:r[e]});return t},filterNode:n,parse:function(s,c){function l(e){for(var n=t.getBlockElements(),r=e.prev;r&&3===r.type;){var o=r.value.replace(D,"");if(0<o.length)return r.value=o,0;var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var a=r.prev;r.remove(),r=a}}function f(e,t){var n,o=new IC(e,t);return e in r&&((n=i[e])?n.push(o):i[e]=[o]),o}var d,m,g,p,h,v,b,y,C=[];c=c||{},i={},a={};var x=Yx(Wx("script,style,head,html,body,title,meta,param"),t.getBlockElements()),w=un(t),S=t.getNonEmptyElements(),E=t.children,k=e.validate,N=("forced_root_block"in c?c:e).forced_root_block,_=!1===N?"":!0===N?"p":N,A=t.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,T=/[ \t\r\n]+/g,O=/^[ \t\r\n]+$/,B=tp(A,c.context)||tp(A,e.root_name),P=za({validate:k,document:e.document,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(t.getSelfClosingElements()),cdata:function(e){y.append(f("#cdata",4)).value=e},text:function(e,t){var n,r;B||(e=e.replace(T," "),(r=y.lastChild)&&(tp(x,r.name)||"br"===r.name)&&(e=e.replace(R,""))),0!==e.length&&((n=f("#text",3)).raw=!!t,y.append(n).value=e)},comment:function(e){y.append(f("#comment",8)).value=e},pi:function(e,t){y.append(f(e,7)).value=t,l(y)},doctype:function(e){y.append(f("#doctype",10)).value=e,l(y)},start:function(e,n,r){var i=k?t.getElementRule(e):{};if(i){var u=f(i.outputName||e,1);u.attributes=n,u.shortEnded=r,y.append(u);var s=E[y.name];s&&E[u.name]&&!s[u.name]&&C.push(u);for(var c=o.length;c--;){var d=o[c].name;d in n.map&&((v=a[d])?v.push(u):a[d]=[u])}x[e]&&l(u),r||(y=u),!B&&A[e]&&(B=!0)}},end:function(n){var r,o,i,a,s=k?t.getElementRule(n):{};if(s){if(x[n]&&!B){if((r=y.firstChild)&&3===r.type)if(0<(o=r.value.replace(R,"")).length)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,0!==o.length&&!O.test(o)||(r.remove(),r=i),r=i;if((r=y.lastChild)&&3===r.type)if(0<(o=r.value.replace(D,"")).length)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,0!==o.length&&!O.test(o)||(r.remove(),r=i),r=i}B&&A[n]&&(B=!1);var l=Mc(t,S,A,y),f=y.parent;s.paddInEmptyBlock&&l&&function(){for(var e=y;u(e);){if(e.name in w)return Mc(t,S,A,e);e=e.parent}}()?Ic(e,c,x,y):s.removeEmpty&&l?x[y.name]?y.empty().remove():y.unwrap():s.paddEmpty&&($x(a=y,"#text")&&a.firstChild.value===Qh||l)&&Ic(e,c,x,y),y=f}}},t),L=y=new IC(c.context||e.root_name,11);if(P.parse(s,c.format),k&&C.length&&(c.context?c.invalid=!0:function(e){for(var r=Wx("tr,td,th,tbody,thead,tfoot,table"),o=t.getNonEmptyElements(),i=t.getWhiteSpaceElements(),a=t.getTextBlockElements(),u=t.getSpecialElements(),s=function(e,n){if(void 0===n&&(n=e.parent),u[e.name])e.empty().remove();else{for(var r=0,o=e.children();r<o.length;r++){var i=o[r];t.isValidChild(n.name,i.name)||s(i,n)}e.unwrap()}},c=0;c<e.length;c++){var l,f=e[c],d=void 0,m=void 0;if(f.parent&&!f.fixed)if(a[f.name]&&"li"===f.parent.name){for(var g=f.next;g&&a[g.name];)g.name="li",g.fixed=!0,f.parent.insert(g,f.parent),g=g.next;f.unwrap()}else{var p=[f];for(d=f.parent;d&&!t.isValidChild(d.name,f.name)&&!r[d.name];d=d.parent)p.push(d);if(d&&1<p.length)if(t.isValidChild(d.name,f.name)){p.reverse();for(var h=l=n(p[0].clone()),v=0;v<p.length-1;v++){t.isValidChild(h.name,p[v].name)?(m=n(p[v].clone()),h.append(m)):m=h;for(var b=p[v].firstChild;b&&b!==p[v+1];){var y=b.next;m.append(b),b=y}h=m}Mc(t,o,i,l)?d.insert(f,p[0],!0):(d.insert(l,p[0],!0),d.insert(f,l)),d=p[0],(Mc(t,o,i,d)||$x(d,"br"))&&d.empty().remove()}else s(f);else f.parent&&("li"!==f.name?t.isValidChild(f.parent.name,"div")&&t.isValidChild("div",f.name)?f.wrap(n(new IC("div",1))):s(f):!(g=f.prev)||"ul"!==g.name&&"ol"!==g.name?!(g=f.next)||"ul"!==g.name&&"ol"!==g.name?f.wrap(n(new IC("ul",1))):g.insert(f,g.firstChild,!0):g.append(f))}}}(C)),_&&("body"===L.name||c.isRootContent)&&function(){function n(e){e&&((r=e.firstChild)&&3===r.type&&(r.value=r.value.replace(R,"")),(r=e.lastChild)&&3===r.type&&(r.value=r.value.replace(D,"")))}var r=L.firstChild,o=null;if(t.isValidChild(L.name,_.toLowerCase())){for(;r;){var i=r.next;3===r.type||1===r.type&&"p"!==r.name&&!x[r.name]&&!r.attr("data-mce-type")?(o||((o=f(_,1)).attr(e.forced_root_block_attrs),L.insert(o,r)),o.append(r)):(n(o),o=null),r=i}n(o)}}(),!c.invalid){for(b in i)if(tp(i,b)){for(v=r[b],p=(d=i[b]).length;p--;)d[p].parent||d.splice(p,1);for(m=0,g=v.length;m<g;m++)v[m](d,b,c)}for(m=0,g=o.length;m<g;m++)if((v=o[m]).name in a){for(p=(d=a[v.name]).length;p--;)d[p].parent||d.splice(p,1);for(p=0,h=v.callbacks.length;p<h;p++)v.callbacks[p](d,v.name,c)}}return L}};return Fc(s,e),e.inline_styles&&Dc(s,e),s}function zc(e,t,n){-1===Pp.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))}function Hc(e,t){var n=["data-mce-selected"],r=t&&t.dom?t.dom:Hb.DOM,o=t&&t.schema?t.schema:cn(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs;var i,a=Uc(e,o),u=e,s=r;return(i=a).addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length;n--;){var r=e[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(t,null)}}),i.addAttributeFilter("src,href,style",function(e,t){for(var n="data-mce-"+t,r=u.url_converter,o=u.url_converter_scope,i=e.length;i--;){var a=e[i],c=a.attr(n);void 0!==c?(a.attr(t,0<c.length?c:null),a.attr(n,null)):(c=a.attr(t),"style"===t?c=s.serializeStyle(s.parseStyle(c),a.name):r&&(c=r.call(o,c,t,a.name)),a.attr(t,0<c.length?c:null))}}),i.addAttributeFilter("class",function(e){for(var t=e.length;t--;){var n,r=e[t];r.attr("class")&&(n=r.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),r.attr("class",0<n.length?n:null))}}),i.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length;r--;){var o=e[r];"bookmark"!==o.attr("data-mce-type")||n.cleanup||(Kg.from(o.firstChild).exists(function(e){return!ev(e.value)})?o.unwrap():o.remove())}}),i.addNodeFilter("noscript",function(e){for(var t=e.length;t--;){var n=e[t].firstChild;n&&(n.value=Rv.decode(n.value))}}),i.addNodeFilter("script,style",function(e,t){for(var n=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},r=e.length;r--;){var o,i=e[r],a=i.firstChild?i.firstChild.value:"";"script"===t?((o=i.attr("type"))&&i.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===u.element_format&&0<a.length&&(i.firstChild.value="// <![CDATA[\n"+n(a)+"\n// ]]>")):"xhtml"===u.element_format&&0<a.length&&(i.firstChild.value="<!--\n"+n(a)+"\n-->")}}),i.addNodeFilter("#comment",function(e){for(var t=e.length;t--;){var n=e[t];u.preserve_cdata&&0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=s.decode(n.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}}),i.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length;n--;){var r=e[n];7===r.type?r.remove():1===r.type&&("input"!==t||r.attr("type")||r.attr("type","text"))}}),i.addAttributeFilter("data-mce-type",function(e){E(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(i.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),i.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:o,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:function(n,i){function u(e){return e&&"br"===e.name}var s,c,l,f,d,m,g,p,h,v,b,y,C,x,w,S,E,k,N,_,A,R,D,T,O,B,P,L,I,M=rp({format:"html"},i=void 0===i?{}:i),F=(y=n,D=C=M,s=(b=t)&&b.hasEventListeners("PreProcess")&&!D.no_events?(w=C,_=(x=b).dom,A=y.cloneNode(!0),(R=document.implementation).createHTMLDocument&&(E=R.createHTMLDocument(""),Pp.each("BODY"===A.nodeName?A.childNodes:[A],function(e){E.body.appendChild(E.importNode(e,!0))}),A="BODY"!==A.nodeName?E.body.firstChild:E.body,S=_.doc,_.doc=E),k=x,N=rp(rp({},w),{node:A}),k.fire("PreProcess",N),S&&(_.doc=S),A):y,l=tv((c=M).getInner?s.innerHTML:r.getOuterHTML(s)),c.selection||Gh(Lp.fromDom(s))?l:Pp.trim(l)),U=(f=a,d=F,g=(m=M).selection?rp({forced_root_block:!1},m):m,!u(v=(p=f.parse(d,g)).lastChild)||u(h=v.prev)&&(v.remove(),h.remove()),p);return"tree"===M.format?U:(T=t,O=M,B=U,I=qa(e,o).serialize(B),O.no_events||!T?I:(P=T,L=rp(rp({},O),{content:I}),P.fire("PostProcess",L).content))},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:g(zc,a,n),getTempAttrs:f(n),getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters}}function jc(e,t){var n=Hc(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}}function Vc(e,t,n){return r=n=void 0===n?{}:n,xc(e).editor.setContent(t,r);var r}function qc(e){return Kg.from(e).each(function(e){return e.destroy()})}function $c(e,t){function n(e){return tp(c,e)}var r,o,i,a,u,s,c,l=(r=e,o=_(Qx,function(e){return tp(r,e)}),!1!==(i=r.forced_root_block)&&""!==i||o.push("forced_root_block (false only)"),M(o)),f=(c=Pp.makeMap(t.plugins," "),M(ne(ne([],_(Zx,n),!0),B(ew,function(e){return n(e)?[e+" (moving to premium)"]:[]}),!0))),d=0<f.length,m=0<l.length,g="mobile"===t.theme;(d||m||g)&&(a=g?"\n\nThemes:\n- mobile":"",u=d?"\n\nPlugins:\n- "+f.join("\n- "):"",s=m?"\n\nSettings:\n- "+l.join("\n- "):"",console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+a+u+s))}function Wc(e){var t=Mg(e)?e.join(" "):e;return _(S(Lg(t)?t.split(" "):[],up),function(e){return 0<e.length})}function Kc(e,t){return tp(e.sections(),t)}function Xc(e,t){return K(e,"toolbar_mode").orThunk(function(){return K(e,"toolbar_drawer").map(function(e){return!1===e?"wrap":e})}).getOr(t)}function Yc(e,t,n,r){var o,i,a,u,s,c,l,f,d=Wc(n.forced_plugins),m=Wc(r.plugins),p=Kc(o=t,"mobile")?o.sections().mobile:{},h=(u=t,s=m,c=p.plugins?Wc(p.plugins):m,i=(a=e)&&(f=(l=u).sections(),Kc(l,"mobile")&&"mobile"===f.mobile.theme)?_(c,g(x,iw)):a&&Kc(u,"mobile")?c:s,[].concat(Wc(d)).concat(Wc(i)));if(Tp.browser.isIE()&&x(h,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return Pp.extend(r,{plugins:h.join(" ")})}function Gc(e,t,n,r,o){var i,a,u,s,c,l,d,m,g=e?{mobile:(i=t,a={resize:!1,toolbar_mode:Xc(o.mobile||{},"scrolling"),toolbar_sticky:!1},rp(rp(rp({},aw),a),i?{menubar:!1}:{}))}:{},p=(c=["mobile"],$(Jx(g,o),function(e,t){return x(c,t)},q(l={}),q(d={})),{sections:f((m={t:l,f:d}).t),settings:f(m.f)}),h=Pp.extend(n,r,p.settings(),e&&Kc(p,"mobile")?function(e){void 0===e&&(e={});var t=K(p.sections(),"mobile").getOr({});return Pp.extend({},e,t)}():{},{validate:!0,external_plugins:(u=r,s=p.settings().external_plugins||{},u&&u.external_plugins?Pp.extend({},u.external_plugins,s):s)});return Yc(e,p,r,h)}function Jc(e,t,n){return Kg.from(t.settings[n]).filter(e)}function Qc(e,t){return t.dom[e]}function Zc(e,t){return parseInt(ht(t,e),10)}function el(e,t,n){var r,o,i,a,u,s,c=Lp.fromDom(e.getBody()),l=e.inline?c:Lp.fromDom(Ne(c).dom.documentElement),f=(r=e.inline,i=t,a=n,u=(o=l).dom.getBoundingClientRect(),{x:i-(r?u.left+o.dom.clientLeft+fw(o):0),y:a-(r?u.top+o.dom.clientTop+lw(o):0)}),d=f.x,m=f.y,g=sw(s=l),p=cw(s);return 0<=d&&0<=m&&d<=g&&m<=p}function tl(e){function t(){function t(){throw new Error("Theme did not provide a NotificationManager implementation.")}var n=e.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:t,close:t,reposition:t,getArgs:t}}function n(){return Kg.from(u[0])}function r(){0<u.length&&t().reposition(u)}function o(e){O(u,function(t){return t===e}).each(function(e){u.splice(e,1)})}function i(i,a){if(void 0===a&&(a=!0),!e.removed&&(c=(s=e).inline?s.getBody():s.getContentAreaContainer(),Kg.from(c).map(Lp.fromDom).map(Wp).getOr(!1)))return a&&e.fire("BeforeOpenNotification",{notification:i}),T(u,function(e){return!((n=t().getArgs(e)).type!==i.type||n.text!==i.text||n.progressBar||n.timeout||i.progressBar||i.timeout);var n}).getOrThunk(function(){e.editorManager.setActive(e);var a=t().open(i,function(){o(a),r(),n().fold(function(){return e.focus()},function(e){return Lp.fromDom(e.getEl()).dom.focus()})});return u.push(a),r(),e.fire("OpenNotification",{notification:rp({},a)}),a});var s,c}var a,u=[],s=f(u);return(a=e).on("SkinLoaded",function(){var e=a.getParam("service_message");e&&i({text:e,type:"warning",timeout:0},!1),r()}),a.on("show ResizeEditor ResizeWindow NodeChange",function(){zh.requestAnimationFrame(r)}),a.on("remove",function(){E(u.slice(),function(e){t().close(e)})}),{open:i,close:function(){n().each(function(e){t().close(e),o(e),r()})},getNotifications:s}}function nl(e){function t(){function t(){throw new Error("Theme did not provide a WindowManager implementation.")}var n=e.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:t,openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}}function n(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t?t.apply(e,n):void 0}}function r(t){e.fire("CloseWindow",{dialog:t}),0===(i=_(i,function(e){return e!==t})).length&&e.focus()}function o(t){e.editorManager.setActive(e),Ca(e);var n,r=t();return n=r,i.push(n),e.fire("OpenWindow",{dialog:n}),r}var i=[];return e.on("remove",function(){E(i,function(e){t().close(e)})}),{open:function(e,n){return o(function(){return t().open(e,n,r)})},openUrl:function(e){return o(function(){return t().openUrl(e,r)})},alert:function(e,r,o){var i=t();i.alert(e,n(o||i,r))},confirm:function(e,r,o){var i=t();i.confirm(e,n(o||i,r))},close:function(){Kg.from(i[i.length-1]).each(function(e){t().close(e),r(e)})}}}function rl(e,t){e.notificationManager.open({type:"error",text:t})}function ol(e,t){e._skinLoaded?rl(e,t):e.on("SkinLoaded",function(){rl(e,t)})}function il(e,t,n){Bi(e,t,{message:n}),console.error(n)}function al(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t}function ul(e,t,n){il(e,"PluginLoadError",al("plugin",t,n))}function sl(e){var t,n;e.contentCSS=e.contentCSS.concat(gw(e,(n=(t=e).getParam("content_css"),Lg(n)?S(n.split(","),up):Mg(n)?n:!1===n||t.inline?[]:["default"])),gw(e,Kr(e)))}function cl(){function e(e,t){return{status:e,resultUri:t}}function t(e){return e in n}var n={};return{hasBlobUri:t,getResultUri:function(e){var t=n[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===n[e].status},isUploaded:function(e){return!!t(e)&&2===n[e].status},markPending:function(t){
165
+ n[t]=e(1,null)},markUploaded:function(t,r){n[t]=e(2,r)},removeFailed:function(e){delete n[e]},destroy:function(){n={}}}}function ll(e){function t(){return Math.round(4294967295*Math.random()).toString(36)}return e+pw+++"s"+(new Date).getTime().toString(36)+t()+t()+t()}function fl(){function e(e){return T(r,e).getOrUndefined()}function t(e){if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var t=e.id||ll("blobid"),n=e.name||t,r=e.blob;return{id:f(t),name:f(n),filename:f(e.filename||n+"."+({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[r.type.toLowerCase()]||"dat")),blob:f(r),base64:f(e.base64),blobUri:f(e.blobUri||URL.createObjectURL(r)),uri:f(e.uri)}}function n(t){return e(function(e){return e.id()===t})}var r=[];return{create:function(e,n,r,o,i){if(Lg(e))return t({id:e,name:o,filename:i,blob:n,base64:r});if(Ig(e))return t(e);throw new Error("Unknown input type")},add:function(e){n(e.id())||r.push(e)},get:n,getByUri:function(t){return e(function(e){return e.blobUri()===t})},getByData:function(t,n){return e(function(e){return e.base64()===t&&e.blob().type===n})},findFirst:e,removeByUri:function(e){r=_(r,function(t){return t.blobUri()!==e||void URL.revokeObjectURL(t.blobUri())})},destroy:function(){E(r,function(e){URL.revokeObjectURL(e.blobUri())}),r=[]}}}function dl(e,t){function n(e,n,r,o){var i=new XMLHttpRequest;i.open("POST",t.url),i.withCredentials=t.credentials,i.upload.onprogress=function(e){o(e.loaded/e.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,o,a;i.status<200||300<=i.status?r("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?n((o=t.basePath,a=e.location,o?o.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+i.responseText)};var a=new FormData;a.append("file",e.blob(),e.filename()),i.send(a)}function r(e,t){return{url:t,blobInfo:e,status:!0}}function o(e,t,n){return{url:"",blobInfo:e,status:!1,error:{message:t,options:n}}}function i(e,t){Pp.each(a[e],function(e){e(t)}),delete a[e]}var a={};return!1===Hg(t.handler)&&(t.handler=n),{upload:function(u,s){return t.url||t.handler!==n?(c=u,l=s,c=Pp.grep(u,function(t){return!e.isUploaded(t.blobUri())}),Uh.all(Pp.map(c,function(n){return e.isPending(n.blobUri())?(f=n.blobUri(),new Uh(function(e){a[f]=a[f]||[],a[f].push(e)})):(u=n,s=t.handler,c=l,e.markPending(u.blobUri()),new Uh(function(t){var a;try{var l=function(){a&&a.close()};s(u,function(n){l(),e.markUploaded(u.blobUri(),n),i(u.blobUri(),r(u,n)),t(r(u,n))},function(n,r){var a=r||{};l(),e.removeFailed(u.blobUri()),i(u.blobUri(),o(u,n,a)),t(o(u,n,a))},function(e){e<0||100<e||Kg.from(a).orThunk(function(){return Kg.from(c).map(h)}).each(function(t){(a=t).progressBar.value(e)})})}catch(n){t(o(u,n.message,{}))}}));var u,s,c,f}))):new Uh(function(e){e([])});var c,l}}}function ml(e){return function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}}function gl(e,t){return dl(t,{url:e.getParam("images_upload_url","","string"),basePath:e.getParam("images_upload_base_path","","string"),credentials:e.getParam("images_upload_credentials",!1,"boolean"),handler:e.getParam("images_upload_handler",null,"function")})}function pl(e){function t(t){return function(n){return e.selection?t(n):[]}}function n(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e}function r(e,t,r){return n(e=n(e,'src="'+t+'"','src="'+r+'"'+(r===Tp.transparentSrc?' data-mce-placeholder="1"':"")),'data-mce-src="'+t+'"','data-mce-src="'+r+'"')}function o(t,n){E(e.undoManager.data,function(e){"fragmented"===e.type?e.fragments=S(e.fragments,function(e){return r(e,t,n)}):e.content=r(e.content,t,n)})}function i(n){return c=c||gl(e,g),v().then(t(function(r){var i=S(r,function(e){return e.blobInfo});return c.upload(i,ml(e)).then(t(function(t){var i=[],a=S(t,function(t,n){var a,u,s,c,l=r[n].blobInfo,f=r[n].image;return t.status&&e.getParam("images_replace_blob_uris",!0,"boolean")?(m.removeByUri(f.src),yc(e)||(u=f,s=t.url,c=e.convertURL(s,"src"),o(u.src,s),e.$(u).attr({src:e.getParam("images_reuse_filename",!1,"boolean")?s+(-1===s.indexOf("?")?"?":"&")+(new Date).getTime():s,"data-mce-src":c}))):t.error&&(t.error.options.remove&&(o(f.getAttribute("src"),Tp.transparentSrc),i.push(f)),a=t.error.message,ol(e,Xb.translate(["Failed to upload image: {0}",a]))),{element:f,status:t.status,uploadUri:t.url,blobInfo:l}});return 0<a.length&&h.fireIfChanged(),0<i.length&&(yc(e)?console.error("Removing images on failed uploads is currently unsupported for RTC"):e.undoManager.transact(function(){E(i,function(t){e.dom.remove(t),m.removeByUri(t.src)})})),n&&n(a),a}))}))}function a(t){if(jr(e))return i(t)}function u(t){return!1!==P(p,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||e.getParam("images_dataimg_filter",qg,"function")(t))}function s(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=g.getResultUri(n);if(r)return'src="'+r+'"';var o=(o=m.getByUri(n))||R(e.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null);return o?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':t})}var c,l,f,d,m=fl(),g=cl(),p=[],h=(d=qn(null),(f=e).on("change AddUndo",function(e){d.set(rp({},e.level))}),{fireIfChanged:function(){var e=f.undoManager.data;z(e).filter(function(e){return!gc(d.get(),e)}).each(function(t){f.setDirty(!0),f.fire("change",{level:t,lastLevel:F(e,e.length-2).getOrNull()})})}}),v=function(){return(l=l||Lc(g,m)).findAll(e.getBody(),u).then(t(function(t){return t=_(t,function(t){return"string"!=typeof t||void ol(e,t)}),yc(e)||E(t,function(e){o(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))};return e.on("SetContent",function(){(jr(e)?a:v)()}),e.on("RawSaveContent",function(e){e.content=s(e.content)}),e.on("GetContent",function(e){e.source_view||"raw"===e.format||"tree"===e.format||(e.content=s(e.content))}),e.on("PostRender",function(){e.parser.addNodeFilter("img",function(e){E(e,function(e){var t,n=e.attr("src");m.getByUri(n)||(t=g.getResultUri(n))&&e.attr("src",t)})})}),{blobCache:m,addFilter:function(e){p.push(e)},uploadImages:i,uploadImagesAuto:a,scanForImages:v,destroy:function(){m.destroy(),g.destroy(),l=c=null}}}function hl(e,t){function n(e){o="string"==typeof e?{name:e,classes:[],attrs:{}}:e;var t,n=vw.create(o.name),r=n;return(t=o).classes.length&&vw.addClass(r,t.classes.join(" ")),vw.setAttribs(r,t.attrs),n}var r,o,i,a=t&&t.schema||cn({}),u=function(e,t,r){var o,i,s,c,l,f,d,m=0<t.length&&t[0],g=m&&m.name,p=(c=g,l="string"!=typeof(s=e)?s.nodeName.toLowerCase():s,!(!(d=(f=a.getElementRule(l))&&f.parentsRequired)||!d.length)&&(c&&-1!==Pp.inArray(d,c)?c:d[0]));if(p)g===p?(i=t[0],t=t.slice(1)):i=p;else if(m)i=t[0],t=t.slice(1);else if(!r)return e;return i&&(o=n(i)).appendChild(e),r&&(o||(o=vw.create("div")).appendChild(e),Pp.each(r,function(t){var r=n(t);o.insertBefore(r,e)})),u(o,t,i&&i.siblings)};return e&&e.length?(r=n(o=e[0]),(i=vw.create("div")).appendChild(u(r,e.slice(1),o.siblings)),i):""}function vl(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=Pp.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==Pp.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}var a;return"["!==o||(a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/))&&(n.attrs[a[1]]=a[2]),""})),n.name=t||"div",n}function bl(e,t){function n(e){return e.replace(/%(\w+)/g,"")}var r,o,i="",a=(o=e.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),Lg(o)?o:"");if(""===a)return"";if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}if("preview"in t){var u=K(t,"preview");if(at(u,!1))return"";a=u.getOr(a)}var s,c=t.block||t.inline||"span",l=(s=t.selector)&&"string"==typeof s?(s=(s=s.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Pp.map(s.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Pp.map(e.split(/(?:~\+|~|\+)/),vl),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[],f=l.length?(l[0].name||(l[0].name=c),c=t.selector,hl(l,e)):hl([c],e),d=vw.select(c,f)[0]||f.firstChild;return hw(t.styles,function(e,t){var r=n(e);r&&vw.setStyle(d,t,r)}),hw(t.attributes,function(e,t){var r=n(e);r&&vw.setAttrib(d,t,r)}),hw(t.classes,function(e){var t=n(e);vw.hasClass(d,t)||vw.addClass(d,t)}),e.fire("PreviewFormats"),vw.setStyles(f,{position:"absolute",left:-65535}),e.getBody().appendChild(f),r=vw.getStyle(e.getBody(),"fontSize",!0),r=/px$/.test(r)?parseInt(r,10):0,hw(a.split(" "),function(t){var n=vw.getStyle(d,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=vw.getStyle(e.getBody(),t,!0),"#ffffff"===vw.toHex(n).toLowerCase())||"color"===t&&"#000000"===vw.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===r)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*r+"px"}"border"===t&&n&&(i+="padding:0 2px;"),i+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),vw.remove(f),i}function yl(e){var t,n,r,o,i,a,s=(o={},(i=function(e,t){e&&(Lg(e)?(E(t=Mg(t)?t:[t],function(e){zg(e.deep)&&(e.deep=!ni(e)),zg(e.split)&&(e.split=!ni(e)||ri(e)),zg(e.remove)&&ni(e)&&!ri(e)&&(e.remove="none"),ni(e)&&ri(e)&&(e.mixed=!0,e.block_expand=!0),Lg(e.classes)&&(e.classes=e.classes.split(/\s+/))}),o[e]=t):j(e,function(e,t){i(t,e)}))})((n=(t=e).dom,r={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(e){return Gp(e)&&e.hasAttribute("href")},onformat:function(e,t,r){Pp.each(r,function(t,r){n.setAttrib(e,r,t)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(e){var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]},Pp.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),function(e){r[e]={block:e,remove:"all"}}),r)),i(t.getParam("formats")),{get:function(e){return u(e)?o[e]:o},has:function(e){return tp(o,e)},register:i,unregister:function(e){return e&&o[e]&&delete o[e],o}}),c=qn(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(e),(a=e).on("mouseup keydown",function(e){var t=a,n=e.keyCode,r=t.selection,o=t.getBody();ws(t,null,!1),8!==n&&46!==n||!r.isCollapsed()||r.getStart().innerHTML!==Sx||ws(t,Oo(o,r.getStart())),37!==n&&39!==n||ws(t,Oo(o,r.getStart()))}),{get:s.get,has:s.has,register:s.register,unregister:s.unregister,apply:function(t,n,r){var o=t,i=n,a=r;wc(e).formatter.apply(o,i,a)},remove:function(t,n,r,o){var i=t,a=n,u=r,s=o;wc(e).formatter.remove(i,a,u,s)},toggle:function(t,n,r){var o=t,i=n,a=r;wc(e).formatter.toggle(o,i,a)},match:function(t,n,r,o){return i=t,a=n,u=r,s=o,wc(e).formatter.match(i,a,u,s);var i,a,u,s},closest:function(t){return n=t,wc(e).formatter.closest(n);var n},matchAll:function(t,n){return r=t,o=n,wc(e).formatter.matchAll(r,o);var r,o},matchNode:function(t,n,r,o){return i=t,a=n,u=r,s=o,wc(e).formatter.matchNode(i,a,u,s);var i,a,u,s},canApply:function(t){return n=t,wc(e).formatter.canApply(n);var n},formatChanged:function(t,n,r,o){return i=c,a=t,u=n,s=r,l=o,wc(e).formatter.formatChanged(i,a,u,s,l);var i,a,u,s,l},getCssText:g(bl,e)}}function Cl(e){switch(e.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return 1;default:return}}function xl(e){function t(e){hc(o,!1,i),o.add({},e)}var n,r,o,i,a,u=Wn(),s=qn(0),c=qn(0),l={data:[],typing:!1,beforeChange:function(){var t=s,n=u;wc(e).undoManager.beforeChange(t,n)},add:function(t,n){return r=l,o=c,i=s,a=u,f=t,d=n,wc(e).undoManager.add(r,o,i,a,f,d);var r,o,i,a,f,d},undo:function(){return t=l,n=s,r=c,wc(e).undoManager.undo(t,n,r);var t,n,r},redo:function(){return t=c,n=l.data,wc(e).undoManager.redo(t,n);var t,n},clear:function(){var t=l,n=c;wc(e).undoManager.clear(t,n)},reset:function(){var t=l;wc(e).undoManager.reset(t)},hasUndo:function(){return t=l,n=c,wc(e).undoManager.hasUndo(t,n);var t,n},hasRedo:function(){return t=l,n=c,wc(e).undoManager.hasRedo(t,n);var t,n},transact:function(t){return n=l,r=s,o=t,wc(e).undoManager.transact(n,r,o);var n,r,o},ignore:function(t){var n=s,r=t;wc(e).undoManager.ignore(n,r)},extra:function(t,n){var r=l,o=c,i=t,a=n;wc(e).undoManager.extra(r,o,i,a)}};return yc(e)||(o=l,i=s,a=qn(!1),(r=e).on("init",function(){o.add()}),r.on("BeforeExecCommand",function(e){Cl(e.command)||(vc(o,i),o.beforeChange())}),r.on("ExecCommand",function(e){Cl(e.command)||t(e)}),r.on("ObjectResizeStart cut",function(){o.beforeChange()}),r.on("SaveContent ObjectResized blur",t),r.on("dragend",t),r.on("keyup",function(e){var n=e.keyCode;e.isDefaultPrevented()||((33<=n&&n<=36||37<=n&&n<=40||45===n||e.ctrlKey)&&(t(),r.nodeChanged()),46!==n&&8!==n||r.nodeChanged(),a.get()&&o.typing&&!1===gc(lc(r),o.data[0])&&(!1===r.isDirty()&&(r.setDirty(!0),r.fire("change",{level:o.data[0],lastLevel:null})),r.fire("TypingUndo"),a.set(!1),r.nodeChanged()))}),r.on("keydown",function(e){var n,r=e.keyCode;e.isDefaultPrevented()||(33<=r&&r<=36||37<=r&&r<=40||45===r?o.typing&&t(e):(n=e.ctrlKey&&!e.altKey||e.metaKey,!(r<16||20<r)||224===r||91===r||o.typing||n||(o.beforeChange(),hc(o,!0,i),o.add({},e),a.set(!0))))}),r.on("mousedown",function(e){o.typing&&t(e)}),r.on("input",function(e){e.inputType&&("insertReplacementText"===e.inputType||"insertText"===e.inputType&&null===e.data||"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType)&&t(e)}),r.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||r.nodeChanged()})),(n=e).addShortcut("meta+z","","Undo"),n.addShortcut("meta+y,meta+shift+z","","Redo"),l}function wl(e){return"keydown"===e.type||"keyup"===e.type}function Sl(e){var t=e.keyCode;return t===vC.BACKSPACE||t===vC.DELETE}function El(e,t){return ge(Lp.fromDom(t),e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string"))}function kl(e,t,n){var r,o,i=(r=e,o=t,_(Hb.DOM.getParents(n.container(),"*",o),r));return Kg.from(i[i.length-1])}function Nl(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?zt(n)?Qp(n.nextSibling)?py(n.nextSibling,0):py.after(n):Vt(t)?py(n,r+1):t:zt(n)?Qp(n.previousSibling)?py(n.previousSibling,n.previousSibling.data.length):py.before(n):qt(t)?py(n,r-1):t}function _l(e){return $h(e)||Kh(e)}function Al(e,t){return ve(e,t)?_t(t,_l,(n=e,function(e){return he(n,Lp.fromDom(e.dom.parentNode))})):Kg.none();var n}function Rl(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),r=(n=(t=e).getBody()).firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))}function Dl(e,t){return{from:e,to:t}}function Tl(e,t){return Al(Lp.fromDom(e),Lp.fromDom(t.container())).map(function(e){return{block:e,position:t}})}function Ol(e){var t,n=O(t=zp(e),qh).fold(f(t),function(e){return t.slice(0,e)});return E(n,$p),n}function Bl(e,t){return T(eu(t,e).reverse(),function(e){return Jt(e)}).each($p)}function Pl(e,t,n,r){if(Jt(n))return Ja(n),rC(n.dom);0===_(Te(r),function(e){return!Jt(e)}).length&&Jt(t)&&ze(r,Lp.fromTag("br"));var o=nC(n.dom,py.before(r.dom));return E(Ol(t),function(e){ze(r,e)}),Bl(e,t),o}function Ll(e,t,n){if(Jt(n))return $p(n),Jt(t)&&Ja(t),rC(t.dom);var r=oC(n.dom);return E(Ol(t),function(e){qp(n,e)}),Bl(e,t),r}function Il(e,t){Do(e,t.dom).map(function(e){return e.getNode()}).map(Lp.fromDom).filter(Ft).each($p)}function Ml(e,t,n){return Il(!0,t),Il(!1,n),(ve(o=n,r=t)?(i=eu(r,o),Kg.from(i[i.length-1])):Kg.none()).fold(g(Ll,e,t,n),g(Pl,e,t,n));var r,o,i}function Fl(e,t,n,r){return t?Ml(e,r,n):Ml(e,n,r)}function Ul(e,t){var n,r,o,i,a,u,s,c=Lp.fromDom(e.getBody()),l=(n=c.dom,r=t,((o=e.selection.getRng()).collapsed?(a=r,u=Tl(i=n,py.fromRangeStart(o)),s=u.bind(function(e){return Zy(a,i,e.position).bind(function(e){return Tl(i,e).map(function(e){return t=i,n=a,nh((r=e).position.getNode())&&!1===Jt(r.block)?Do(!1,r.block.dom).bind(function(e){return e.isEqual(r.position)?Zy(n,t,e).bind(function(e){return Tl(t,e)}):Kg.some(r)}).getOr(r):r;var t,n,r})})}),ut(u,s,Dl).filter(function(e){return!1===he(e.from.block,e.to.block)&&Ae((n=e).from.block).bind(function(e){return Ae(n.to.block).filter(function(t){return he(e,t)})}).isSome()&&!1===ih((t=e).from.block.dom)&&!1===ih(t.to.block.dom);var t,n})):Kg.none()).bind(function(e){return Fl(c,t,e.from.block,e.to.block)}));return l.each(function(t){e.selection.setRng(t.toRange())}),l.isSome()}function zl(e,t){var n=Lp.fromDom(t),r=g(he,e);return Nt(n,Yh,r).isSome()}function Hl(e){var t,n,r,o,i,a,u,s,c,l,f=Lp.fromDom(e.getBody());return a=e.selection.getRng(),c=nC((i=f).dom,py.fromRangeStart(a)).isNone(),l=tC(i.dom,py.fromRangeEnd(a)).isNone(),!zl(u=i,(s=a).startContainer)&&!zl(u,s.endContainer)&&c&&l?((o=e).setContent(""),o.selection.setCursorLocation(),!0):(t=f,n=e.selection,r=n.getRng(),ut(Al(t,Lp.fromDom(r.startContainer)),Al(t,Lp.fromDom(r.endContainer)),function(e,o){return!1===he(e,o)&&(r.deleteContents(),Fl(t,!0,e,o).each(function(e){n.setRng(e.toRange())}),!0)}).getOr(!1))}function jl(e){return!e.selection.isCollapsed()&&Hl(e)}function Vl(e,t,n,r,o){return Kg.from(t._selectionOverrides.showCaret(e,n,r,o))}function ql(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?Kg.none():Kg.some(((r=(n=t).ownerDocument.createRange()).selectNode(n),r))}function $l(e,t,n){var r=vo(1,e.getBody(),t),o=py.fromRangeStart(r),i=o.getNode();if(By(i))return Vl(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(By(a))return Vl(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return Ew(e)||Sw(e)});return By(u)?Vl(1,e,u,!1,n):Kg.none()}function Wl(e,t,n){return t.collapsed?$l(e,t,n).getOr(t):t}function Kl(e){return ax(e)||nx(e)}function Xl(e){return ux(e)||rx(e)}function Yl(e,t,n,r,o,i){var a,u;return Vl(r,e,i.getNode(!o),o,!0).each(function(n){var r;t.collapsed?(r=t.cloneRange(),o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()):t.deleteContents(),e.selection.setRng(n)}),a=e.dom,Qp(u=n)&&0===u.data.length&&a.remove(u),!0}function Gl(e,t){var n=e.selection.getRng();if(!Qp(n.commonAncestorContainer))return!1;var r=t?hy.Forwards:hy.Backwards,o=ko(e.getBody()),i=g(xo,t?o.next:o.prev),a=t?Kl:Xl,u=yo(r,e.getBody(),n),s=Nl(t,i(u));if(!s||!wo(u,s))return!1;if(a(s))return Yl(e,n,u.getNode(),r,t,s);var c=i(s);return!!(c&&a(c)&&wo(s,c))&&Yl(e,n,u.getNode(),r,t,c)}function Jl(e,t,n){return Zy(t,e,n).bind(function(r){function o(e){return Mt(Lp.fromDom(e))&&!mo(l,f,s)}return d=r.getNode(),Yh(Lp.fromDom(d))||Kh(Lp.fromDom(d))||(s=e,f=r,bo(!(c=t),l=n).fold(function(){return bo(c,f).fold(Vg,o)},o))?Kg.none():t&&ih(r.getNode())||!1===t&&ih(r.getNode(!0))?(i=e,a=n,u=r.getNode(!1===t),Al(Lp.fromDom(i),Lp.fromDom(a.getNode())).map(function(e){return Jt(e)?kw.remove(e.dom):kw.moveToElement(u)}).orThunk(function(){return Kg.some(kw.moveToElement(u))})):t&&ux(n)||!1===t&&ax(n)?Kg.some(kw.moveToPosition(r)):Kg.none();var i,a,u,s,c,l,f,d})}function Ql(e,t){return Kg.from(Ti(e.getBody(),t))}function Zl(e,t){var n=e.selection.getNode();return Ql(e,n).filter(ih).fold(function(){return l=e.getBody(),d=vo((f=t)?1:-1,l,e.selection.getRng()),m=py.fromRangeStart(d),g=Lp.fromDom(l),(!1===f&&ux(m)?Kg.some(kw.remove(m.getNode(!0))):f&&ax(m)?Kg.some(kw.remove(m.getNode())):!1===f&&ax(m)&&su(g,m)?dx(g,m).map(function(e){return kw.remove(e.getNode())}):f&&ux(m)&&uu(g,m)?mx(g,m).map(function(e){return kw.remove(e.getNode())}):(n=l,r=f,s=(o=m).getNode(!1===(u=r)),c=u?"after":"before",Gp(s)&&s.getAttribute("data-mce-caret")===c?(a=o.getNode(!1===(i=r)),(i&&ih(a.nextSibling)?Kg.some(kw.moveToElement(a.nextSibling)):!1===i&&ih(a.previousSibling)?Kg.some(kw.moveToElement(a.previousSibling)):Kg.none()).fold(function(){return Jl(n,r,o)},Kg.some)):Jl(n,r,o).bind(function(e){return t=n,r=o,e.fold(function(e){return Kg.some(kw.remove(e))},function(e){return Kg.some(kw.moveToElement(e))},function(e){return mo(r,e,t)?Kg.none():Kg.some(kw.moveToPosition(e))});var t,r}))).exists(function(n){return n.fold(function(e){return a._selectionOverrides.hideFakeCaret(),Bu(a,u,Lp.fromDom(e)),!0},(i=u=t,function(e){var t=i?py.before(e):py.after(e);return o.selection.setRng(t.toRange()),!0}),(r=o=a=e,function(e){return r.selection.setRng(e.toRange()),!0}));var r,o,i,a,u});var n,r,o,i,a,u,s,c,l,f,d,m,g},qg)}function ef(e,t){var n=e.selection.getNode();return!(!ih(n)||ah(n))&&Ql(e,n.parentNode).filter(ih).fold(function(){return E(Zn(Lp.fromDom(e.getBody()),".mce-offscreen-selection"),$p),Bu(e,t,Lp.fromDom(e.selection.getNode())),Rl(e),!0},qg)}function tf(e){var t,n=e.dom,r=e.selection,o=Ti(e.getBody(),r.getNode());return oh(o)&&n.isBlock(o)&&n.isEmpty(o)&&(t=n.create("br",{"data-mce-bogus":"1"}),n.setHTML(o,""),o.appendChild(t),r.setRng(py.before(t).toRange())),!0}function nf(e,t){return(e.selection.isCollapsed()?Zl:ef)(e,t)}function rf(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,o=py.fromRangeStart(n.selection.getRng()),Zy(r,n.getBody(),o).filter(function(e){return(r?ex:tx)(e)}).bind(function(e){return Kg.from(go(r?0:-1,e))}).exists(function(e){return n.selection.select(e),!0}));var n,r,o}function of(e){return Nw(e)&&e.data[0]===Zh}function af(e){return Nw(e)&&e.data[e.data.length-1]===Zh}function uf(e){return e.ownerDocument.createTextNode(Zh)}function sf(e,t){return(e?function(e){if(Nw(e.previousSibling))return af(e.previousSibling)||e.previousSibling.appendData(Zh),e.previousSibling;if(Nw(e))return of(e)||e.insertData(0,Zh),e;var t=uf(e);return e.parentNode.insertBefore(t,e),t}:function(e){if(Nw(e.nextSibling))return of(e.nextSibling)||e.nextSibling.insertData(0,Zh),e.nextSibling;if(Nw(e))return af(e)||e.appendData(Zh),e;var t=uf(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t})(t)}function cf(e,t){return Qp(e.container())?sf(t,e.container()):sf(t,e.getNode())}function lf(e,t){var n=t.get();return n&&e.container()===n&&zt(n)}function ff(e,t){return t.fold(function(t){Ay(e.get());var n=_w(t);return e.set(n),Kg.some(py(n,n.length-1))},function(t){return rC(t).map(function(t){if(lf(t,e))return py(e.get(),1);Ay(e.get());var n=cf(t,!0);return e.set(n),py(n,1)})},function(t){return oC(t).map(function(t){if(lf(t,e))return py(e.get(),e.get().length-1);Ay(e.get());var n=cf(t,!1);return e.set(n),py(n,n.length-1)})},function(t){Ay(e.get());var n=Aw(t);return e.set(n),Kg.some(py(n,1))})}function df(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return Kg.none()}function mf(e,t){return fo(t,e)||e}function gf(e,t,n){var r=xw(n),o=mf(t,r.container());return kl(e,o,r).fold(function(){return tC(o,r).bind(g(kl,e,o)).map(function(e){return Rw.before(e)})},Kg.none)}function pf(e,t){return null===Oo(e,t)}function hf(e,t,n){return kl(e,t,n).filter(g(pf,t))}function vf(e,t,n){var r=ww(n);return hf(e,t,r).bind(function(e){return nC(e,r).isNone()?Kg.some(Rw.start(e)):Kg.none()})}function bf(e,t,n){var r=xw(n);return hf(e,t,r).bind(function(e){return tC(e,r).isNone()?Kg.some(Rw.end(e)):Kg.none()})}function yf(e,t,n){var r=ww(n),o=mf(t,r.container());return kl(e,o,r).fold(function(){return nC(o,r).bind(g(kl,e,o)).map(function(e){return Rw.after(e)})},Kg.none)}function Cf(e){return!1===(t=Dw(e),"rtl"===Hb.DOM.getStyle(t,"direction",!0)||(n=t.textContent,Cw.test(n)));var t,n}function xf(e,t,n){return df([gf,vf,bf,yf],[e,t,n]).filter(Cf)}function wf(e){return e.fold(f("before"),f("start"),f("end"),f("after"))}function Sf(e){return e.fold(Rw.before,Rw.before,Rw.after,Rw.after)}function Ef(e){return e.fold(Rw.start,Rw.start,Rw.end,Rw.end)}function kf(e,t,n,r,o,i){return ut(kl(t,n,r),kl(t,n,o),function(t,r){return t!==r&&(a=r,u=fo(t,o=n),s=fo(a,o),u&&u===s)?Rw.after(e?t:r):i;var o,a,u,s}).getOr(i)}function Nf(e,t){return e.fold(qg,function(e){return r=t,!(wf(n=e)===wf(r)&&Dw(n)===Dw(r));var n,r})}function _f(e,t){return e?t.fold(c(Kg.some,Rw.start),Kg.none,c(Kg.some,Rw.after),Kg.none):t.fold(Kg.none,c(Kg.some,Rw.before),Kg.none,c(Kg.some,Rw.end))}function Af(e,t,n,r){var o=Nl(e,r),i=xf(t,n,o);return xf(t,n,o).bind(g(_f,e)).orThunk(function(){return a=t,u=n,s=i,c=Nl(o=e,r),Zy(o,u,c).map(g(Nl,o)).fold(function(){return s.map(Sf)},function(e){return xf(a,u,e).map(g(kf,o,a,u,c,e)).filter(g(Nf,s))}).filter(Cf);var o,a,u,s,c})}function Rf(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error||r.log).apply(r,ne([e],t,!1))}function Df(e,t,n){var r=e?1:-1;return t.setRng(py(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}function Tf(e,t){return e===hy.Backwards?L(t):t}function Of(e,t,n,r){for(var o,i,a,u,s=ko(n),c=r,l=[];c;){var f=(a=s,u=c,t===hy.Forwards?a.next(u):a.prev(u));if(!f)break;if(nh(f.getNode(!1)))return t===hy.Forwards?{positions:Tf(t,l).concat([f]),breakType:Dx.Br,breakAt:Kg.some(f)}:{positions:Tf(t,l),breakType:Dx.Br,breakAt:Kg.some(f)};if(f.isVisible()){if(e(c,f)){var d=(o=c,nh((i=f).getNode(t===hy.Forwards))?Dx.Br:!1===mo(o,i)?Dx.Block:Dx.Wrap);return{positions:Tf(t,l),breakType:d,breakAt:Kg.some(f)}}l.push(f),c=f}else c=f}return{positions:Tf(t,l),breakType:Dx.Eol,breakAt:Kg.none()}}function Bf(e,t,n,r){return t(n,r).breakAt.map(function(r){var o=t(n,r).positions;return e===hy.Backwards?o.concat(r):[r].concat(o)}).getOr([])}function Pf(e,t){return R(e,function(e,n){return e.fold(function(){return Kg.some(n)},function(r){return ut(U(r.getClientRects()),U(n.getClientRects()),function(e,o){var i=Math.abs(t-e.left);return Math.abs(t-o.left)<=i?n:r}).or(e)})},Kg.none())}function Lf(e,t){return U(t.getClientRects()).bind(function(t){return Pf(e,t.left)})}function If(e){function t(t){return S(t,function(t){var n=cr(t);return n.node=e,n})}if(Gp(e))return t(e.getClientRects());if(Qp(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}}function Mf(e){return B(e,If)}function Ff(e,t,n,r,o,i){function a(r){var i=Mf([r]);-1===e&&(i=i.reverse());for(var a=0;a<i.length;a++){var l=i[a];if(!n(l,c)){if(0<s.length&&t(l,te(s))&&u++,l.line=u,o(l))return!0;s.push(l)}}}var u=0,s=[],c=te(i.getClientRects());if(!c)return s;var l=i.getNode();return a(l),function(e,t,n,r){for(;r=lo(r,e,Xt,t);)if(n(r))return}(e,r,a,l),s}function Uf(e){return function(t){return t.line>e}}function zf(e){return function(t){return t.line===e}}function Hf(e,t){return Math.abs(e.left-t)}function jf(e,t){return Math.abs(e.right-t)}function Vf(e,t){return e>=t.left&&e<=t.right}function qf(e,t){return e>=t.top&&e<=t.bottom}function $f(e,t,n){return void 0===n&&(n=qg),Z(e,function(e,r){if(Vf(t,r))return n(r)?r:e;if(Vf(t,e))return n(e)?e:r;var o=Math.min(Hf(e,t),jf(e,t)),i=Math.min(Hf(r,t),jf(r,t));return i===o&&X(r,"node")&&Hw(r.node)||i<o?r:e})}function Wf(e,t,n,r,o){var i=jw(r,e,Xt,t,!o);do{if(!i||n(i))return}while(i=jw(i,e,Xt,t))}function Kf(e,t,n){function r(e){return!ot(e.node)&&!uh(e.node)}var o,i,a;return(a=$f(_(Mf(_(Jg(e.getElementsByTagName("*")),so)),g(qf,n)),t,r))&&(a=$f(function(e,t,n){function r(e,n){var r=_(Mf([n]),function(n){return!e(n,t)});return o=o.concat(r),0===r.length}void 0===n&&(n=!0);var o=[];return o.push(t),Wf(Tw.Up,e,g(r,dr),t.node,n),Wf(Tw.Down,e,g(r,mr),t.node,n),o}(e,a,r(a)),t,r))&&so(a.node)?{node:(o=a).node,before:Hf(o,i=t)<jf(o,i)}:null}function Xf(e,t){e.selection.setRng(t),la(e,e.selection.getRng())}function Yf(e,t,n){return Kg.some(Wl(e,t,n))}function Gf(e,t,n,r,o,i){var a=t===hy.Forwards,u=ko(e.getBody()),s=g(xo,a?u.next:u.prev),c=a?r:o;if(!n.collapsed){var l=pr(n);if(i(l))return Vl(t,e,l,t===hy.Backwards,!1)}var f=yo(t,e.getBody(),n);if(c(f))return ql(e,f.getNode(!a));var d=Nl(a,s(f)),m=Wt(n);if(!d)return m?Kg.some(n):Kg.none();if(c(d))return Vl(t,e,d.getNode(!a),a,!1);var p=s(d);return p&&c(p)&&wo(d,p)?Vl(t,e,p.getNode(!a),a,!1):m?Yf(e,d.toRange(),!1):Kg.none()}function Jf(e,t,n,r,o,i){var a=yo(t,e.getBody(),n),u=te(a.getClientRects()),s=t===Tw.Down;if(!u)return Kg.none();var c,l=_((s?zw:Uw)(e.getBody(),Uf(1),a),zf(1)),f=u.left,d=$f(l,f);if(d&&i(d.node)){var m=Math.abs(f-d.left),g=Math.abs(f-d.right);return Vl(t,e,d.node,m<g,!1)}if(c=r(a)?a.getNode():o(a)?a.getNode(!0):pr(n)){var p=function(e,t,n,r){function o(e){return te(e.getClientRects())}var i,a,u,s=ko(t),c=[],l=0,f=1===e?(i=s.next,a=mr,u=dr,py.after(r)):(i=s.prev,a=dr,u=mr,py.before(r)),d=o(f);do{if(f.isVisible()){var m=o(f);if(!u(m,d)){0<c.length&&a(m,te(c))&&l++;var g=cr(m);if(g.position=f,g.line=l,n(g))return c;c.push(g)}}}while(f=i(f));return c}(t,e.getBody(),Uf(1),c),h=$f(_(p,zf(1)),f);if(h)return Yf(e,h.position.toRange(),!1);if(h=te(_(p,zf(0))))return Yf(e,h.position.toRange(),!1)}return 0===l.length?Vw(e,s).filter(s?o:r).map(function(t){return Wl(e,t.toRange(),!1)}):Kg.none()}function Qf(e,t,n){return Vw(e,t).filter(n).exists(function(t){
166
+ return e.selection.setRng(t.toRange()),!0})}function Zf(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}function ed(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")}function td(e,t,n){return ff(t,n).map(function(t){return Zf(e,t),n})}function nd(e,t,n){return!!Jr(e)&&(o=t,i=n,a=(r=e).getBody(),u=py.fromRangeStart(r.selection.getRng()),Af(i,g(El,r),a,u).bind(function(e){return td(r,o,e)}).isSome());var r,o,i,a,u}function rd(e,t){return!!Jr(t)&&(n=e,o=(r=t).selection.getRng(),i=n?py.fromRangeEnd(o):py.fromRangeStart(o),!!Hg(r.selection.getSel().modify)&&(n&&Vt(i)?Df(!0,r.selection,i):!(n||!qt(i))&&Df(!1,r.selection,i)));var n,r,o,i}function od(e){var t=qn(null),n=g(El,e);return e.on("NodeChange",function(r){var o,i,a,u,s,c,l,f,d,m,p,h,v;!Jr(e)||Tp.browser.isIE()&&r.initial||(s=n,c=e.dom,l=r.parents,E(I(f=_(S(Zn(Lp.fromDom(c.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(e){return e.dom}),s),d=_(l,s)),g(ed,!1)),E(I(d,f),g(ed,!0)),p=t,(m=e).selection.isCollapsed()&&!0!==m.composing&&p.get()&&(h=py.fromRangeStart(m.selection.getRng()),py.isTextPosition(h)&&!1===(Vt(v=h)||qt(v))&&(Zf(m,oo(p.get(),h)),p.set(null))),o=n,i=e,a=t,u=r.parents,i.selection.isCollapsed()&&E(_(u,o),function(){var e=py.fromRangeStart(i.selection.getRng());xf(o,i.getBody(),e).bind(function(e){return td(i,a,e)})}))}),t}function id(e,t,n){if(Jr(e)){var r=Vw(e,t).getOrThunk(function(){var n=e.selection.getRng();return t?py.fromRangeEnd(n):py.fromRangeStart(n)});return xf(g(El,e),e.getBody(),r).exists(function(t){var r=Sf(t);return ff(n,r).exists(function(t){return Zf(e,t),!0})})}return!1}function ad(e,t){return function(n){return ff(t,n).exists(function(t){return Zf(e,t),!0})}}function ud(e,t,n,r){var o=e.getBody(),i=g(El,e);e.undoManager.ignore(function(){var a,u,s;e.selection.setRng((a=n,u=r,(s=document.createRange()).setStart(a.container(),a.offset()),s.setEnd(u.container(),u.offset()),s)),e.execCommand("Delete"),xf(i,o,py.fromRangeStart(e.selection.getRng())).map(Ef).map(ad(e,t))}),e.nodeChanged()}function sd(e,t,n){if(e.selection.isCollapsed()&&Jr(e)){var r=py.fromRangeStart(e.selection.getRng());return i=t,a=n,u=r,s=(o=e).getBody(),c=fo(u.container(),s)||s,l=g(El,o),(d=xf(l,c,u)).bind(function(e){return a?e.fold(f(Kg.some(Ef(e))),Kg.none,f(Kg.some(Sf(e))),Kg.none):e.fold(Kg.none,f(Kg.some(Sf(e))),Kg.none,f(Kg.some(Ef(e))))}).map(ad(o,i)).getOrThunk(function(){var e=Ro(a,c,u),t=e.bind(function(e){return xf(l,c,e)});return ut(d,t,function(){return kl(l,c,u).exists(function(e){return!!ut(rC(t=e),oC(t),function(e,n){var r=Nl(!0,e),o=Nl(!1,n);return tC(t,r).forall(function(e){return e.isEqual(o)})}).getOr(!0)&&(Bu(o,a,Lp.fromDom(e)),!0);var t})}).orThunk(function(){return t.bind(function(){return e.map(function(e){return a?ud(o,i,u,e):ud(o,i,e,u),!0})})}).getOr(!1)})}var o,i,a,u,s,c,l,d;return!1}function cd(e){return 1===Ie(e)}function ld(e,t){var n,r=Lp.fromDom(e.getBody()),o=Lp.fromDom(e.selection.getStart()),i=_(O(n=eu(o,r),qh).fold(f(n),function(e){return n.slice(0,e)}),cd);return z(i).exists(function(n){var r,o,a,u,s,c,l,f,d,m=py.fromRangeStart(e.selection.getRng()),p=t,h=m,v=n.dom;return!(!ut(rC(v),oC(v),function(e,t){var n=Nl(!0,e),r=Nl(!1,t),o=Nl(!1,h);return p?tC(v,o).exists(function(e){return e.isEqual(r)&&h.isEqual(n)}):nC(v,o).exists(function(e){return e.isEqual(n)&&h.isEqual(r)})}).getOr(!0)||To((r=n).dom)&&bs(r.dom)||(o=t,u=n,0===(d=S(_(i,g(_s,a=e)),function(e){return e.dom})).length?Bu(a,o,u):(c=u.dom,f=Es(d,(l=Cs(!1)).dom),ze(Lp.fromDom(c),l),$p(Lp.fromDom(c)),s=py(f,0),a.selection.setRng(s.toRange())),0))})}function fd(e,t){return!!e.selection.isCollapsed()&&ld(e,t)}function dd(e,t,n){return e._selectionOverrides.hideFakeCaret(),Bu(e,t,Lp.fromDom(n)),!0}function md(e,t){return e.selection.isCollapsed()?(i=e,u=(a=t)?nx:rx,s=a?hy.Forwards:hy.Backwards,c=yo(s,i.getBody(),i.selection.getRng()),u(c)?dd(i,a,c.getNode(!a)):Kg.from(Nl(a,c)).filter(function(e){return u(e)&&wo(c,e)}).exists(function(e){return dd(i,a,e.getNode(!a))})):(r=t,o=(n=e).selection.getNode(),!!uh(o)&&dd(n,r,o));var n,r,o,i,a,u,s,c}function gd(e){var t=parseInt(e,10);return isNaN(t)?0:t}function pd(e,t){return(e||"table"===we(t)?"margin":"padding")+("rtl"===ht(t,"direction")?"-right":"-left")}function hd(e){var t,n=Ww(e);return!e.mode.isReadOnly()&&(1<n.length||(t=e,P(n,function(e){var n=vt(e,pd(Wr(t),e)).map(gd).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&0<n})))}function vd(e){return Wh(e)||Kh(e)}function bd(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=e.getParam("indentation","40px","string"),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=Wr(e),c=zr(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),E(Ww(e),function(e){var r,o=n,i=t,c=u,l=a,f=e.dom,d=pd(s,Lp.fromDom(f));"outdent"===i?(r=Math.max(0,gd(f.style[d])-c),o.setStyle(f,d,r?r+l:"")):(r=gd(f.style[d])+c+l,o.setStyle(f,d,r))})}function yd(e){if(e.selection.isCollapsed()&&hd(e)){var t=e.dom,n=e.selection.getRng(),r=py.fromRangeStart(n),o=t.getParent(n.startContainer,t.isBlock);if(null!==o&&sx(Lp.fromDom(o),r))return bd(e,"outdent"),!0}return!1}function Cd(e,t){e.getDoc().execCommand(t,!1,null)}function xd(e){return void 0===e.touches||1!==e.touches.length?Kg.none():Kg.some(e.touches[0])}function wd(e,t){return tp(e,t.nodeName)}function Sd(e){var t,n,r,o=e.dom,i=e.selection,a=e.schema,u=a.getBlockElements(),s=i.getStart(),c=e.getBody(),l=zr(e);if(s&&Gp(s)&&l){var f=c.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&(d=u,m=c,g=s,!w(Za(Lp.fromDom(g),Lp.fromDom(m)),function(e){return wd(d,e.dom)}))){var d,m,g,p,h,v=i.getRng(),b=v.startContainer,y=v.startOffset,C=v.endContainer,x=v.endOffset,S=Aa(e);for(s=c.firstChild;s;)p=u,Qp(h=s)||Gp(h)&&!wd(p,h)&&!zo(h)?function(e,t){if(Qp(t)){if(0===t.nodeValue.length)return 1;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||wd(e,t.nextSibling)))return 1}}(u,s)?(s=(n=s).nextSibling,o.remove(n)):(t||(t=o.create(l,Hr(e)),s.parentNode.insertBefore(t,s),r=!0),s=(n=s).nextSibling,t.appendChild(n)):(t=null,s=s.nextSibling);r&&S&&(v.setStart(b,y),v.setEnd(C,x),i.setRng(v),e.nodeChanged())}}}function Ed(e,t){t.hasAttribute("data-mce-caret")&&($t(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))}function kd(e,t){var n=Rt(Lp.fromDom(e.getBody()),"*[data-mce-caret]").map(function(e){return e.dom}).getOrNull();if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Ed(e,n)):void(jt(n)&&(Ed(e,n),e.undoManager.add()))}function Nd(e,t,n){var r,o,i,a=ko(e.getBody()),u=g(xo,1===t?a.next:a.prev);!n.collapsed||""===zr(e)||(r=e.dom.getParent(n.startContainer,"PRE"))&&(u(py.fromRangeStart(n))||(i=e.dom.create(zr(e)),(!Tp.ie||11<=Tp.ie)&&(i.innerHTML='<br data-mce-bogus="1">'),o=i,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse()))}function _d(e,t){return n=e,r=t?hy.Forwards:hy.Backwards,o=n.selection.getRng(),Gf(n,r,o,ax,ux,Kw).orThunk(function(){return Nd(n,r,o),Kg.none()}).exists(function(t){return Xf(e,t),!0});var n,r,o}function Ad(e,t){return r=t?1:-1,o=(n=e).selection.getRng(),Jf(n,r,o,function(e){return ax(e)||ox(e)},function(e){return ux(e)||ix(e)},Kw).orThunk(function(){return Nd(n,r,o),Kg.none()}).exists(function(t){return Xf(e,t),!0});var n,r,o}function Rd(e,t){return Qf(e,t,t?ux:ax)}function Dd(e){return x(["figcaption"],we(e))}function Td(e){var t=document.createRange();return t.setStartBefore(e.dom),t.setEndBefore(e.dom),t}function Od(e,t,n){(n?qp:je)(e,t)}function Bd(e,t){var n=Lp.fromDom(e.getBody()),r=py.fromRangeStart(e.selection.getRng()),o=zr(e),i=Hr(e),a=r,u=g(he,n);return _t(Lp.fromDom(a.container()),qh,u).filter(Dd).exists(function(){if(b=n,y=r,t?(x=b.dom,Pw(x,y).breakAt.isNone()):(C=b.dom,Bw(C,y).breakAt.isNone())){var a=(u=n,c=i,l=t,""===(s=o)?(h=l,Od(u,v=Lp.fromTag("br"),h),Td(v)):(f=u,d=l,m=c,g=Lp.fromTag(s),p=Lp.fromTag("br"),ft(g,m),qp(g,p),Od(f,g,d),Td(p)));return e.selection.setRng(a),!0}var u,s,c,l,f,d,m,g,p,h,v,b,y,C,x;return!1})}function Pd(e,t){return!!e.selection.isCollapsed()&&Bd(e,t)}function Ld(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}}function Id(e,t){return T((n=t,B(S(e,function(e){return rp({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:s},e)}),function(e){return n.keyCode===e.keyCode&&n.shiftKey===e.shiftKey&&n.altKey===e.altKey&&n.ctrlKey===e.ctrlKey&&n.metaKey===e.metaKey?[e]:[]})),function(e){return e.action()});var n}function Md(e,t){var n=t?hy.Forwards:hy.Backwards,r=e.selection.getRng();return Gf(e,n,r,nx,rx,uh).exists(function(t){return Xf(e,t),!0})}function Fd(e,t){var n=t?1:-1,r=e.selection.getRng();return Jf(e,n,r,nx,rx,uh).exists(function(t){return Xf(e,t),!0})}function Ud(e,t){return Qf(e,t,t?rx:nx)}function zd(e,t,n,r,o){var i,a=Zn(Lp.fromDom(n),"td,th,caption").map(function(e){return e.dom}),u=_((i=e,B(a,function(e){var t,n={left:(t=cr(e.getBoundingClientRect())).left- -1,top:t.top- -1,right:t.right+-2,bottom:t.bottom+-2,width:t.width+-1,height:t.height+-1};return[{x:n.left,y:i(n),cell:e},{x:n.right,y:i(n),cell:e}]})),function(e){return t(e,o)}),s=r,c=o;return R(u,function(e,t){return e.fold(function(){return Kg.some(t)},function(e){var n=Math.sqrt(Math.abs(e.x-s)+Math.abs(e.y-c)),r=Math.sqrt(Math.abs(t.x-s)+Math.abs(t.y-c));return Kg.some(r<n?t:e)})},Kg.none()).map(function(e){return e.cell})}function Hd(e,t,n){var r,o,i=e(t,n);return i.breakType===Dx.Wrap&&0===i.positions.length||!nh(n.getNode())&&i.breakType===Dx.Br&&1===i.positions.length?(r=e,o=t,!i.breakAt.exists(function(e){return r(o,e).breakAt.isSome()})):i.breakAt.isNone()}function jd(e,t,n){var r,o,i,a=e.selection.getRng(),u=t?1:-1;return!(!uo()||(r=t,o=n,i=py.fromRangeStart(a),!Do(!r,o).exists(function(e){return e.isEqual(i)}))||(Vl(u,e,n,!t,!1).each(function(t){Xf(e,t)}),0))}function Vd(e,t,n){var r,o,i=(r=!!t,o=n.getNode(r),Gp(o)&&"TABLE"===o.nodeName?Kg.some(o):Kg.none()),a=!1===t;i.fold(function(){return Xf(e,n.toRange())},function(r){return Do(a,e.getBody()).filter(function(e){return e.isEqual(n)}).fold(function(){return Xf(e,n.toRange())},function(){var o,i,a=t,u=r,s=n;(i=zr(o=e))?o.undoManager.transact(function(){var e=Lp.fromTag(i);ft(e,Hr(o)),qp(e,Lp.fromTag("br")),(a?He:ze)(Lp.fromDom(u),e);var t=o.dom.createRng();t.setStart(e.dom,0),t.setEnd(e.dom,0),Xf(o,t)}):Xf(o,s.toRange())})})}function qd(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,g=e.selection.getRng(),p=py.fromRangeStart(g),h=e.getBody();if(t||!Gw(r,p))return!(!t||!Jw(r,p)||(o=h,d=i=n,Vd(e,t,v=z((m=a=p).getClientRects()).bind(function(e){return Yw(d,e.left,e.top)}).bind(function(e){return Lf(rC(t=e).map(function(e){return[e].concat(Pw(t,e).positions)}).getOr([]),m);var t}).orThunk(function(){return U(a.getClientRects()).bind(function(e){return Pf(Iw(o,py.after(i)),e.left)})}).getOr(py.after(i))),0));var v=(u=h,l=s=n,U((f=c=p).getClientRects()).bind(function(e){return Xw(l,e.left,e.top)}).bind(function(e){return Lf(oC(t=e).map(function(e){return Bw(t,e).positions.concat(e)}).getOr([]),f);var t}).orThunk(function(){return U(c.getClientRects()).bind(function(e){return Pf(Lw(u,py.before(s)),e.left)})}).getOr(py.before(s)));return Vd(e,t,v),!0}function $d(e,t,n){return Kg.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(r){return Kg.from(e.dom.getParent(r,"table")).map(function(o){return n(e,t,o,r)})}).getOr(!1)}function Wd(e,t){return $d(e,t,jd)}function Kd(e,t){return $d(e,t,qd)}function Xd(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){!/^(LI|DT|DD)$/.test(t.nodeName)||(r=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild))&&/^(UL|OL|DL)$/.test(r.nodeName)&&t.insertBefore(i.doc.createTextNode(Qh),t.firstChild);var u=i.createRng();if(t.normalize(),t.hasChildNodes()){for(var s=new jh(t,t);n=s.current();){if(Qp(n)){u.setStart(n,0),u.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}o=n,n=s.next()}n||(u.setStart(o,0),u.setEnd(o,0))}else nh(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(u.setStartBefore(t),u.setEndBefore(t)):(u.setStartAfter(t),u.setEndAfter(t)):(u.setStart(t,0),u.setEnd(t,0));e.selection.setRng(u),la(e,u)}}function Yd(e){return Kg.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))}function Gd(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t}function Jd(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)}function Qd(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e}function Zd(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Gp(r);)r=r[n?"nextSibling":"previousSibling"];return r===t}function em(e){e.innerHTML='<br data-mce-bogus="1">'}function tm(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t}function nm(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)}function rm(e,t,n){return!1===Qp(t)?n:e?1===n&&t.data.charAt(n-1)===Zh?0:n:n===t.data.length-1&&t.data.charAt(n)===Zh?t.data.length:n}function om(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r}function im(e,t){var n=zr(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&function(e,t,n){var r=e.dom;Kg.from(n.style).map(r.parseStyle).each(function(e){var n=bt(Lp.fromDom(t)),o=rp(rp({},n),e);r.setStyles(t,o)}),ut(Kg.from(n["class"]).map(function(e){return e.split(/\s+/)}),Kg.from(t.className).map(function(e){return _(e.split(/\s+/),function(e){return""!==e})}),function(e,n){var o=_(n,function(t){return!x(e,t)}),i=ne(ne([],e,!0),o,!0);r.setAttrib(t,"class",i.join(" "))});var o=["style","class"],i=W(n,function(e,t){return!x(o,t)});r.setAttribs(t,i)}(e,t,Hr(e))}function am(e,t){function n(t){var n,r=m,o=l.getTextInlineElements(),i=t||"TABLE"===C||"HR"===C?c.create(t||p):b.cloneNode(!1),a=i;if(!1===e.getParam("keep_styles",!0))c.setAttrib(i,"style",null),c.setAttrib(i,"class",null);else for(;o[r.nodeName]&&(To(r)||zo(r)||(n=r.cloneNode(!1),c.setAttrib(n,"id",""),i.hasChildNodes()?n.appendChild(i.firstChild):a=n,i.appendChild(n))),(r=r.parentNode)&&r!==U;);return im(e,i),em(a),i}function r(e){var t,n,r=rm(e,m,g);if(!Qp(m)||!(e?0<r:r<m.nodeValue.length)){if(m.parentNode===b&&s&&!e)return 1;if(e&&Gp(m)&&m===b.firstChild)return 1;if(tm(m,"TABLE")||tm(m,"HR"))return s&&!e||!s&&e;var o=new jh(m,b);for(Qp(m)&&(e&&0===r?o.prev():e||r!==m.nodeValue.length||o.next());t=o.current();){if(Gp(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),f[n]&&"br"!==n))return}else if(Qp(t)&&!Yt(t.nodeValue))return;e?o.prev():o.next()}return 1}}function o(){a=/^(H[1-6]|PRE|FIGURE)$/.test(C)&&"HGROUP"!==x?n(p):n(),e.getParam("end_container_on_empty_block",!1)&&nm(c,y)&&c.isEmpty(b)?a=c.split(y,b):c.insertAfter(a,b),Xd(e,a)}var i,a,u,s,c=e.dom,l=e.schema,f=l.getNonEmptyElements(),d=e.selection.getRng();$i(c,d).each(function(e){d.setStart(e.startContainer,e.startOffset),d.setEnd(e.endContainer,e.endOffset)});var m=d.startContainer,g=d.startOffset,p=zr(e),h=!(!t||!t.shiftKey),v=!(!t||!t.ctrlKey);Gp(m)&&m.hasChildNodes()&&(s=g>m.childNodes.length-1,m=m.childNodes[Math.min(g,m.childNodes.length-1)]||m,g=s&&Qp(m)?m.nodeValue.length:0);var b,y,C,x,w,S,k,N,_,A,R,D,T,O,B,P,L,I,M,F,U=om(c,m);U&&((p&&!h||!p&&h)&&(m=function(e,t,n,r){var o,i,a,u,s,c,l=p||"P",f=e.dom,d=om(f,n),m=f.getParent(n,f.isBlock);if(!m||!nm(f,m)){if(s=((m=m||d)===e.getBody()||(c=m)&&/^(TD|TH|CAPTION)$/.test(c.nodeName)?m:m.parentNode).nodeName.toLowerCase(),!m.hasChildNodes())return im(e,o=f.create(l)),m.appendChild(o),t.setStart(o,0),t.setEnd(o,0),o;for(a=n;a.parentNode!==m;)a=a.parentNode;for(;a&&!f.isBlock(a);)a=(i=a).previousSibling;if(i&&e.schema.isValidChild(s,l.toLowerCase())){for(im(e,o=f.create(l)),i.parentNode.insertBefore(o,i),a=i;a&&!f.isBlock(a);)u=a.nextSibling,o.appendChild(a),a=u;t.setStart(n,r),t.setEnd(n,r)}}return n}(e,d,m,g)),y=(b=c.getParent(m,c.isBlock))?c.getParent(b.parentNode,c.isBlock):null,C=b?b.nodeName.toUpperCase():"","LI"!==(x=y?y.nodeName.toUpperCase():"")||v||(y=(b=y).parentNode,C=x),/^(LI|DT|DD)$/.test(C)&&c.isEmpty(b)?(N=n,_=y,A=b,R=p,M=(k=e).dom,F=k.selection.getRng(),_!==k.getBody()&&(T=(R=Jd(D=_)&&Jd(D.parentNode)?"LI":R)?N(R):M.create("BR"),Zd(_,A,!0)&&Zd(_,A,!1)?Gd(_,"LI")?(O=Qd(_),M.insertAfter(T,O),(null===(I=(L=_).parentNode)||void 0===I?void 0:I.firstChild)===L?M.remove(O):M.remove(_)):M.replace(T,_):(Zd(_,A,!0)?Gd(_,"LI")?(M.insertAfter(T,Qd(_)),T.appendChild(M.doc.createTextNode(" ")),T.appendChild(_)):_.parentNode.insertBefore(T,_):Zd(_,A,!1)?M.insertAfter(T,Qd(_)):(_=Qd(_),(B=F.cloneRange()).setStartAfter(A),B.setEndAfter(_),P=B.extractContents(),"LI"===R&&P.firstChild&&"LI"===P.firstChild.nodeName?(T=P.firstChild,M.insertAfter(P,_)):(M.insertAfter(P,_),M.insertAfter(T,_))),M.remove(A)),Xd(k,T))):p&&b===e.getBody()||(p=p||"P",Ut(b)?(a=$t(b),c.isEmpty(b)&&em(b),im(e,a),Xd(e,a)):r()?o():r(!0)?(a=b.parentNode.insertBefore(n(),b),Xd(e,tm(b,"HR")?a:b)):((S=(w=d).cloneRange()).setStart(w.startContainer,rm(!0,w.startContainer,w.startOffset)),S.setEnd(w.endContainer,rm(!1,w.endContainer,w.endOffset)),(i=S.cloneRange()).setEndAfter(b),u=i.extractContents(),E(Gb(Lp.fromDom(u),Mp),function(e){var t=e.dom;t.nodeValue=tv(t.nodeValue)}),function(e){for(;Qp(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(u),a=u.firstChild,c.insertAfter(u,b),function(e,t){var n,r,o=a,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Gp(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(n=i.length;n--;)!(o=i[n]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(r=o)&&"A"===r.nodeName&&e.isEmpty(r)&&e.remove(o)}}(c,f),function(e,t){t.normalize();var n=t.lastChild;n&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(c,b),c.isEmpty(b)&&em(b),a.normalize(),c.isEmpty(a)?(c.remove(a),o()):(im(e,a),Xd(e,a))),c.setAttrib(a,"id",""),e.fire("NewBlock",{newBlock:a})))}function um(e,t,n){var r=e.dom.createRng();n?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)),e.selection.setRng(r),la(e,r)}function sm(e,t){var n=Lp.fromTag("br");ze(Lp.fromDom(t),n),e.undoManager.add()}function cm(e,t){Qw(e.getBody(),t)||He(Lp.fromDom(t),Lp.fromTag("br"));var n=Lp.fromTag("br");He(Lp.fromDom(t),n),um(e,n.dom,!1),e.undoManager.add()}function lm(e){return e&&"A"===e.nodeName&&"href"in e}function fm(e){return e.fold(Vg,lm,lm,Vg)}function dm(e,t){t.fold(s,g(sm,e),g(cm,e),s)}function mm(e,t){var n,r,o,i=(r=g(El,n=e),o=py.fromRangeStart(n.selection.getRng()),xf(r,n.getBody(),o).filter(fm));i.isSome()?i.each(g(dm,e)):function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();$i(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u,s=a.startOffset,c=a.startContainer;1===c.nodeType&&c.hasChildNodes()&&(u=s>c.childNodes.length-1,c=c.childNodes[Math.min(s,c.childNodes.length-1)]||c,s=u&&3===c.nodeType?c.nodeValue.length:0);var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(l=f),c&&3===c.nodeType&&s>=c.nodeValue.length&&!function(e){for(var t,n=new jh(c,l),r=e.getNonEmptyElements();t=n.next();)if(r[t.nodeName.toLowerCase()]||0<t.length)return 1}(e.schema)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),kr(i,a,n),um(e,n,r),e.undoManager.add()}(e,t)}function gm(e,t){return Yd(e).filter(function(e){return 0<t.length&&ge(Lp.fromDom(e),t)}).isSome()}function pm(e){return gm(e,e.getParam("no_newline_selector",""))}function hm(e){return function(t){return""===zr(t)===e}}function vm(e){return function(t){return Yd(t).filter(function(e){return Kh(Lp.fromDom(e))}).isSome()===e}}function bm(e,t){return function(n){return Yd(n).fold(f(""),function(e){return e.nodeName.toUpperCase()})===e.toUpperCase()===t}}function ym(e){return bm("pre",e)}function Cm(e){return function(t){return t.getParam("br_in_pre",!0)===e}}function xm(e){return gm(e,e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption"))}function wm(e,t){return t}function Sm(e){var t=zr(e),n=function(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r}(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")}function Em(e,t){return function(n,r){return R(e,function(e,t){return e&&t(n,r)},!0)?Kg.some(t):Kg.none()}}function km(e,t){var n,r;n=e,r=t,df([Em([pm],Zw.none()),Em([bm("summary",!0)],Zw.br()),Em([ym(!0),Cm(!1),wm],Zw.br()),Em([ym(!0),Cm(!1)],Zw.block()),Em([ym(!0),Cm(!0),wm],Zw.block()),Em([ym(!0),Cm(!0)],Zw.br()),Em([vm(!0),wm],Zw.br()),Em([vm(!0)],Zw.block()),Em([hm(!0),wm,Sm],Zw.block()),Em([hm(!0)],Zw.br()),Em([xm],Zw.br()),Em([hm(!1),wm],Zw.br()),Em([Sm],Zw.block())],[n,!(!r||!r.shiftKey)]).getOr(Zw.none()).fold(function(){mm(e,t)},function(){am(e,t)},s)}function Nm(e){return e.stopImmediatePropagation()}function _m(e){return e.keyCode===vC.PAGE_UP||e.keyCode===vC.PAGE_DOWN}function Am(e,t,n){n&&!e.get()?t.on("NodeChange",Nm,!0):!n&&e.get()&&t.off("NodeChange",Nm),e.set(n)}function Rm(e,t){var n=t.container(),r=t.offset();return Qp(n)?(n.insertData(r,e),Kg.some(py(n,r+e.length))):Co(t).map(function(n){var r=Lp.fromText(e);return(t.isAtEnd()?He:ze)(n,r),py(r.dom,e.length)})}function Dm(e,t){return function(n){return i=e,(!mu(a=n)&&(o=a,nC((r=i).dom,o).isNone()||tC(r.dom,o).isNone()||sx(r,o)||cx(r,o)||su(r,o)||uu(r,o)||fu(i,a)||du(i,a))?nS:rS)(t);var r,o,i,a}}function Tm(e){var t,n,r=py.fromRangeStart(e.selection.getRng()),o=Lp.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=g(El,e),a=py.fromRangeStart(e.selection.getRng());return xf(i,e.getBody(),a).bind((n=o,function(e){return e.fold(function(e){return nC(n.dom,py.before(e))},function(e){return rC(e)},function(e){return oC(e)},function(e){return tC(n.dom,py.after(e))})})).bind(Dm(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1}function Om(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,p,h=od(e);return e.on("keyup compositionstart",g(kd,e)),p=h,(m=e).on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=m,n=p,r=e,o=wp().os,Id([{keyCode:vC.RIGHT,action:Ld(_d,t,!0)},{keyCode:vC.LEFT,action:Ld(_d,t,!1)},{keyCode:vC.UP,action:Ld(Ad,t,!1)},{keyCode:vC.DOWN,action:Ld(Ad,t,!0)},{keyCode:vC.RIGHT,action:Ld(Wd,t,!0)},{keyCode:vC.LEFT,action:Ld(Wd,t,!1)},{keyCode:vC.UP,action:Ld(Kd,t,!1)},{keyCode:vC.DOWN,action:Ld(Kd,t,!0)},{keyCode:vC.RIGHT,action:Ld(Md,t,!0)},{keyCode:vC.LEFT,action:Ld(Md,t,!1)},{keyCode:vC.UP,action:Ld(Fd,t,!1)},{keyCode:vC.DOWN,action:Ld(Fd,t,!0)},{keyCode:vC.RIGHT,action:Ld(nd,t,n,!0)},{keyCode:vC.LEFT,action:Ld(nd,t,n,!1)},{keyCode:vC.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Ld(qw,t,n)},{keyCode:vC.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Ld($w,t,n)},{keyCode:vC.UP,action:Ld(Pd,t,!1)},{keyCode:vC.DOWN,action:Ld(Pd,t,!0)}],r).each(function(){r.preventDefault()}))}),d=h,(f=e).on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(n=d,r=e,Id([{keyCode:vC.BACKSPACE,action:Ld(yd,t=f,!1)},{keyCode:vC.BACKSPACE,action:Ld(nf,t,!1)},{keyCode:vC.DELETE,action:Ld(nf,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(Gl,t,!1)},{keyCode:vC.DELETE,action:Ld(Gl,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(sd,t,n,!1)},{keyCode:vC.DELETE,action:Ld(sd,t,n,!0)},{keyCode:vC.BACKSPACE,action:Ld(es,t,!1)},{keyCode:vC.DELETE,action:Ld(es,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(rf,t,!1)},{keyCode:vC.DELETE,action:Ld(rf,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(md,t,!1)},{keyCode:vC.DELETE,action:Ld(md,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(jl,t,!1)},{keyCode:vC.DELETE,action:Ld(jl,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(Ul,t,!1)},{keyCode:vC.DELETE,action:Ld(Ul,t,!0)},{keyCode:vC.BACKSPACE,action:Ld(fd,t,!1)},{keyCode:vC.DELETE,action:Ld(fd,t,!0)}],r).each(function(){r.preventDefault()}))}),f.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(n=e,Id([{keyCode:vC.BACKSPACE,action:Ld(tf,t=f)},{keyCode:vC.DELETE,action:Ld(tf,t)}],n))}),(l=e).on("keydown",function(e){var t,n,r;e.keyCode===vC.ENTER&&(t=l,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),km(t,n)})))}),(c=e).on("keydown",function(e){var t;!1===e.isDefaultPrevented()&&(t=e,Id([{keyCode:vC.SPACEBAR,action:Ld(Tm,c)}],t).each(function(){t.preventDefault()}))}),u=a=e,s=Kn(function(){u.composing||Cu(u)},0),eS.isIE()&&(u.on("keypress",function(){s.throttle()}),u.on("remove",function(){s.cancel()})),a.on("input",function(e){!1===e.isComposing&&Cu(a)}),i=h,(o=e).on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(n=i,r=e,Id([{keyCode:vC.END,action:Ld(Rd,t=o,!0)},{keyCode:vC.HOME,action:Ld(Rd,t,!1)},{keyCode:vC.END,action:Ld(Ud,t,!0)},{keyCode:vC.HOME,action:Ld(Ud,t,!1)},{keyCode:vC.END,action:Ld(id,t,!0,n)},{keyCode:vC.HOME,action:Ld(id,t,!1,n)}],r).each(function(){r.preventDefault()}))}),t=e,n=h,tS.os.isOSX()||(r=qn(!1),t.on("keydown",function(e){_m(e)&&Am(r,t,!0)}),t.on("keyup",function(e){var o,i,a;!1===e.isDefaultPrevented()&&(a=e,Id([{keyCode:vC.PAGE_UP,action:Ld(id,o=t,!1,i=n)},{keyCode:vC.PAGE_DOWN,action:Ld(id,o,!0,i)}],a)),_m(e)&&r.get()&&(Am(r,t,!1),t.nodeChanged())})),h}function Bm(e){var t;this.lastPath=[],this.editor=e;var n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",function(n){var r=e.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&Ui(o,t)||e.fire("SelectionChange"),t=o}),e.on("contextmenu",function(){e.fire("SelectionChange")}),e.on("SelectionChange",function(){var t=e.selection.getStart(!0);!t||!Tp.range&&e.selection.isCollapsed()||wi(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",function(t){!t.isDefaultPrevented()&&wi(e)&&("IMG"===e.selection.getNode().nodeName?zh.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())})}function Pm(e){return Gp(e)&&$h(Lp.fromDom(e))}function Lm(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+o.pageYOffset-r.clientTop,left:t.left+o.pageXOffset-r.clientLeft}}function Im(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Mm(e,t){var n=zh.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return t.on("remove",n.stop),function(r){return e.on(function(e){var o,i,a,u,s,c,l,f,d,m,g,p,h,v,b,y,C,x,w,S,E=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&10<E){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}e.dragging&&(p=e,o={pageX:(b=r,y=(v=t).inline?Lm(v.getBody()):{left:0,top:0},S=(w=v).getBody(),C=w.inline?{left:S.scrollLeft,top:S.scrollTop}:{left:0,top:0},(h={pageX:(x=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,r,o,i,a,u=Lm(e.getContentAreaContainer()),s=(r=(n=e).getBody(),o=n.getDoc().documentElement,i={left:r.scrollLeft,top:r.scrollTop},a={left:r.scrollLeft||o.scrollLeft,top:r.scrollTop||o.scrollTop},n.inline?i:a);return{left:t.pageX-u.left+s.left,top:t.pageY-u.top+s.top}}(v,b)).left-y.left+C.left,pageY:x.top-y.top+C.top}).pageX-p.relX),pageY:h.pageY+5},m=e.ghost,g=t.getBody(),m.parentNode!==g&&g.appendChild(m),i=e.ghost,u=e.width,s=e.height,c=e.maxX,l=e.maxY,d=f=0,i.style.left=(a=o).pageX+"px",i.style.top=a.pageY+"px",l<a.pageY+s&&(d=a.pageY+s-l),i.style.width=u-(f=c<a.pageX+u?a.pageX+u-c:f)+"px",i.style.height=s-d+"px",n(r.clientX,r.clientY))})}}function Fm(e){function t(e){var t,n,r,o,i,a;0===e.button&&(t=T(s.dom.getParents(e.target),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}(iS,aS)).getOr(null),i=s.getBody(),iS(a=t)&&a!==i&&(n=s.dom.getPos(t),r=s.getBody(),o=s.getDoc().documentElement,u.set({element:t,dragging:!1,screenX:e.screenX,screenY:e.screenY,maxX:(s.inline?r.scrollWidth:o.offsetWidth)-2,maxY:(s.inline?r.scrollHeight:o.offsetHeight)-2,relX:e.pageX-n.x,relY:e.pageY-n.y,width:t.offsetWidth,height:t.offsetHeight,ghost:function(e,t,n){var r=s.dom,o=e.cloneNode(!0);r.setStyles(o,{width:t,height:n}),r.setAttrib(o,"data-mce-selected",null);var i=r.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return r.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:t,height:n}),r.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(t,t.offsetWidth,t.offsetHeight)})))}function n(e){i.on(function(t){var n,r,o,i,u,s;t.dragging&&((i=3===(s=(o=a).selection.getSel().getRangeAt(0).startContainer).nodeType?s.parentNode:s)===(u=t.element)||o.dom.isChildOf(i,u)||iS(i)||((r=t.element.cloneNode(!0)).removeAttribute("data-mce-selected"),n=r,a.fire("drop",{clientX:e.clientX,clientY:e.clientY}).isDefaultPrevented()||a.undoManager.transact(function(){Im(t.element),a.insertContent(a.dom.getOuterHTML(n)),a._selectionOverrides.hideFakeCaret()})),a.fire("dragend"))}),uS(i)}var r,o,i,a,u,s,c=Wn(),l=Hb.DOM,f=document,d=Mm(u=c,s=e),m=(r=i=c,function(){r.on(function(e){e.dragging&&o.fire("dragend")}),uS(r)});(o=a=e).on("mousedown",t),e.on("mousemove",d),e.on("mouseup",n),l.bind(f,"mousemove",d),l.bind(f,"mouseup",m),e.on("remove",function(){l.unbind(f,"mousemove",d),l.unbind(f,"mouseup",m)}),e.on("keydown",function(e){e.keyCode===vC.ESC&&m()})}function Um(e){function t(e){var t;e.isDefaultPrevented()||(t=e.dataTransfer)&&(x(t.types,"Files")||0<t.files.length)&&(e.preventDefault(),"drop"===e.type&&ol(i,"Dropped file type is not supported"))}function n(e){Sa(i,e.target)&&t(e)}function r(){var e=Hb.DOM,r=i.dom,o=document,a=i.inline?i.getBody():i.getDoc(),u=["drop","dragover"];E(u,function(i){e.bind(o,i,n),r.bind(a,i,t)}),i.on("remove",function(){E(u,function(i){e.unbind(o,i,n),r.unbind(a,i,t)})})}var o,i;Fm(e),(o=e).on("drop",function(e){var t=void 0!==e.clientX?o.getDoc().elementFromPoint(e.clientX,e.clientY):null;!iS(t)&&"false"!==o.dom.getContentEditableParent(t)||e.preventDefault()}),e.getParam("block_unsupported_drop",!0,"boolean")&&(i=e).on("init",function(){zh.setEditorTimeout(i,r,0)})}function zm(e,t){return Ti(e.getBody(),t)}function Hm(e){function t(e){return e!==v&&(cS(e)||uh(e))&&p.isChildOf(e,v)}function n(e){return ax(e)||ux(e)||nx(e)||rx(e)}function r(e){e&&g.setRng(e)}function o(t,n,r,o){return void 0===o&&(o=!0),e.fire("ShowCaret",{target:n,direction:t,before:r}).isDefaultPrevented()?null:(o&&g.scrollIntoView(n,-1===t),b.show(r,n))}function i(e){return Ht(e)||ov(e)||iv(e)}function u(e){return i(e.startContainer)||i(e.endContainer)}function s(n,r){if(!n)return null;if(n.collapsed){if(!u(n)){var i=r?1:-1,a=yo(i,v,n),s=a.getNode(!r);if(so(s))return o(i,s,!!r&&!a.isAtEnd(),!1);var c=a.getNode(r);if(so(c))return o(i,c,!r&&!a.isAtEnd(),!1)}return null}var f=n.startContainer,d=n.startOffset,m=n.endOffset;if(3===f.nodeType&&0===d&&cS(f.parentNode)&&(f=f.parentNode,d=p.nodeIndex(f),f=f.parentNode),1!==f.nodeType)return null;if(m===d+1&&f===n.endContainer){var h=f.childNodes[d];if(t(h))return function(t){var n=t.cloneNode(!0),r=e.fire("ObjectSelected",{target:t,targetClone:n});if(r.isDefaultPrevented())return null;var o=function(t,n,r){var o=e.$,i=Rt(Lp.fromDom(e.getBody()),"#"+y).fold(function(){return o([])},function(e){return o([e.dom])});0===i.length&&(i=o('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",y)).appendTo(e.getBody());var a=p.createRng();n===r&&Tp.ie?(i.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(n),a.setStartAfter(i[0].firstChild.firstChild),a.setEndAfter(n)):(i.empty().append(Qh).append(n).append(Qh),a.setStart(i[0].firstChild,1),a.setEnd(i[0].lastChild,0)),i.css({top:p.getPos(t,e.getBody()).y}),i[0].focus();var u=g.getSel();return u.removeAllRanges(),u.addRange(a),a}(t,r.targetClone,n),i=Lp.fromDom(t);return E(Zn(Lp.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){he(i,e)||gt(e,C)}),p.getAttrib(t,C)||t.setAttribute(C,"1"),l=t,w(),o}(h)}return null}function c(){l&&l.removeAttribute(C),Rt(Lp.fromDom(e.getBody()),"#"+y).each($p),l=null}
167
+ var l,f,d,m,g=e.selection,p=e.dom,h=p.isBlock,v=e.getBody(),b=ao(e,v,h,function(){return Aa(e)}),y="sel-"+p.uniqueId(),C="data-mce-selected",x=g.getRng,w=function(){b.hide()};return Tp.ceFalse&&!yc(e)&&(e.on("mouseup",function(t){var n=x();n.collapsed&&el(e,t.clientX,t.clientY)&&$l(e,n,!1).each(r)}),e.on("click",function(t){var n=zm(e,t.target);n&&(cS(n)&&(t.preventDefault(),e.focus()),sS(n)&&p.isChildOf(n,g.getNode())&&c())}),e.on("blur NewBlock",c),e.on("ResizeWindow FullscreenStateChanged",b.reposition),e.on("tap",function(n){var r=n.target,o=zm(e,r);cS(o)?(n.preventDefault(),ql(e,o).each(s)):t(r)&&ql(e,r).each(s)},!0),e.on("mousedown",function(i){var u,l,f,d,m,b,y,C=i.target;C!==v&&"HTML"!==C.nodeName&&!p.isChildOf(C,v)||!1===el(e,i.clientX,i.clientY)||((u=zm(e,C))?cS(u)?(i.preventDefault(),ql(e,u).each(s)):(c(),sS(u)&&i.shiftKey||Oi(i.clientX,i.clientY,g.getRng())||(w(),g.placeCaretAt(i.clientX,i.clientY))):t(C)?ql(e,C).each(s):!1===so(C)&&(c(),w(),(l=Kf(v,i.clientX,i.clientY))&&(f=C,d=l.node,b=p.getParent(f,h),y=p.getParent(d,h),!a(b)&&(f!==y&&p.isChildOf(b,y)&&!1===cS(zm(e,b))||!p.isChildOf(y,b)&&(m=y,p.getParent(b,h)!==p.getParent(m,h))&&function(e){var t=e.firstChild;if(!a(t)){var r=py.before(t);if(nh(r.getNode())&&1===e.childNodes.length)return!n(r);var o=ko(e).next(r);return o&&!n(o)}}(b))||(i.preventDefault(),r(o(1,l.node,l.before,!1)),e.getBody().focus()))))}),e.on("keypress",function(e){vC.modifierPressed(e)||cS(g.getNode())&&e.preventDefault()}),e.on("GetSelectionRange",function(e){var t=e.range;l&&(l.parentNode?((t=t.cloneRange()).selectNode(l),e.range=t):l=null)}),e.on("SetSelectionRange",function(t){var n,r,o,i,a,u,c;t.range=(n=t.range,r=e.schema.getShortEndedElements(),o=p.createRng(),i=n.startContainer,a=n.startOffset,u=n.endContainer,c=n.endOffset,tp(r,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),tp(r,u.nodeName.toLowerCase())?0===c?o.setEndBefore(u):o.setEndAfter(u):o.setEnd(u,c),o);var l=s(t.range,t.forward);l&&(t.range=l)}),e.on("AfterSetSelectionRange",function(e){var t=e.range,n=t.startContainer.parentNode;u(t)||"mcepastebin"===n.id||w(),p.hasClass(n,"mce-offscreen-selection")||c()}),e.on("copy",function(e){var t,n,r=e.clipboardData;e.isDefaultPrevented()||!e.clipboardData||Tp.ie||(t=(n=p.get(y))&&n.getElementsByTagName("*")[0])&&(e.preventDefault(),r.clearData(),r.setData("text/html",t.outerHTML),r.setData("text/plain",t.outerText||t.innerText))}),Um(e),d=Kn(function(){var e,t;f.removed||!f.getBody().contains(document.activeElement)||(e=f.selection.getRng()).collapsed&&(t=Wl(f,e,!1),f.selection.setRng(t))},0),(f=e).on("focus",function(){d.throttle()}),f.on("blur",function(){d.cancel()}),(m=e).on("init",function(){m.on("focusin",function(e){var t,n,r=e.target;uh(r)&&(t=Ti(m.getBody(),r),n=ih(t)?t:r,m.selection.getNode()!==n&&ql(m,n).each(function(e){return m.selection.setRng(e)}))})})),{showCaret:o,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&($t(e),r(x()),g.scrollIntoView(e))},hideFakeCaret:w,destroy:function(){b.destroy(),l=null}}}function jm(e){function t(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(t){}}function n(e){return e.isDefaultPrevented()}function r(){e.shortcuts.add("meta+a",null,"SelectAll")}function o(){e.inline||w.bind(e.getDoc(),"mousedown mouseup",function(t){var n;t.target===e.getDoc().documentElement&&(n=S.getRng(),e.getBody().focus(),"mousedown"===t.type?Ht(n.startContainer)||S.placeCaretAt(t.clientX,t.clientY):S.setRng(n))})}function i(){Range.prototype.getClientRects||e.on("mousedown",function(t){var r;n(t)||"HTML"!==t.target.nodeName||((r=e.getBody()).blur(),zh.setEditorTimeout(e,function(){r.focus()}))})}function a(){e.on("click",function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==w.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&w.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),S.select(n))})}function u(){e.on("keydown",function(e){if(!n(e)&&e.keyCode===C&&S.isCollapsed()&&0===S.getRng().startOffset){var t=S.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function c(){e.getParam("readonly")||e.on("BeforeExecCommand mousedown",function(){t("StyleWithCSS",!1),t("enableInlineTableEditing",!1),Xr(e)||t("enableObjectResizing",!1)})}function l(){e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function f(){e.inline||e.on("keydown",function(){document.activeElement===document.body&&e.getWin().focus()})}function d(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(t){var n;"HTML"===t.target.nodeName&&(11<Tp.ie?e.getBody().focus():(n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()))}))}function m(){Tp.mac&&e.on("keydown",function(t){!vC.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})}function g(){e.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function p(){e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(e){e.preventDefault()})})}function h(){var t=w.getAttribs(S.getStart().cloneNode(!1));return function(){var n=S.getStart();n!==e.getBody()&&(w.setAttrib(n,"style",null),y(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}}function v(){return!S.isCollapsed()&&w.getParent(S.getStart(),w.isBlock)!==w.getParent(S.getEnd(),w.isBlock)}function b(e){var t=w.create("body"),n=e.cloneContents();return t.appendChild(n),S.serializer.serialize(t,{format:"html"})}var y=Pp.each,C=vC.BACKSPACE,x=vC.DELETE,w=e.dom,S=e.selection,E=e.parser,k=Tp.gecko,N=Tp.ie,_=Tp.webkit,A="data:text/mce-internal,",R=N?"Text":"URL",D=s;return yc(e)?(_&&(o(),a(),p(),r(),Tp.iOS&&(f(),d(),g())),k&&(i(),c(),l(),m())):(e.on("keydown",function(t){if(!n(t)&&t.keyCode===vC.BACKSPACE){var r,o=(r=S.getRng()).startContainer,i=r.startOffset,a=w.getRoot(),u=o;if(r.collapsed&&0===i){for(;u&&u.parentNode&&u.parentNode.firstChild===u&&u.parentNode!==a;)u=u.parentNode;"BLOCKQUOTE"===u.tagName&&(e.formatter.toggle("blockquote",null,u),(r=w.createRng()).setStart(o,0),r.setEnd(o,0),S.setRng(r))}}}),e.on("keydown",function(t){var r,o,i,a,u=t.keyCode;n(t)||u!==x&&u!==C||(r=e.selection.isCollapsed(),o=e.getBody(),r&&!w.isEmpty(o)||!r&&(i=b(e.selection.getRng()),(a=w.createRng()).selectNode(e.getBody()),i!==b(a))||(t.preventDefault(),e.setContent(""),o.firstChild&&w.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()))}),Tp.windowsPhone||e.on("keyup focusin mouseup",function(e){vC.modifierPressed(e)||S.normalize()},!0),_&&(o(),a(),zr(e)&&e.on("init",function(){t("DefaultParagraphSeparator",zr(e))}),p(),u(),E.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),Tp.iOS?(f(),d(),g()):r()),11<=Tp.ie&&(d(),u()),Tp.ie&&(r(),t("AutoUrlDetect",!1),e.on("dragstart",function(t){var n,r,o;(n=t).dataTransfer&&(e.selection.isCollapsed()&&"IMG"===n.target.tagName&&S.select(n.target),0<(r=e.selection.getContent()).length&&(o=A+escape(e.id)+","+escape(r),n.dataTransfer.setData(R,o)))}),e.on("drop",function(t){var r,o,i,a;n(t)||(r=t.dataTransfer&&(a=t.dataTransfer.getData(R))&&0<=a.indexOf(A)?(a=a.substr(A.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null)&&r.id!==e.id&&(t.preventDefault(),o=Fi(t.x,t.y,e.getDoc()),S.setRng(o),i=r.html,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:i,internal:!0}):e.execCommand("mceInsertContent",!1,i))})),k&&(e.on("keydown",function(t){if(!n(t)&&t.keyCode===C&&e.getBody().getElementsByTagName("hr").length&&S.isCollapsed()&&0===S.getRng().startOffset){var r=S.getNode(),o=r.previousSibling;if("HR"===r.nodeName)return w.remove(r),void t.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(w.remove(o),t.preventDefault())}}),i(),e.on("keypress",function(t){var r;if(!n(t)&&(8===t.keyCode||46===t.keyCode)&&v())return r=h(),e.getDoc().execCommand("delete",!1,null),r(),t.preventDefault(),!1}),w.bind(e.getDoc(),"cut",function(t){var r;!n(t)&&v()&&(r=h(),zh.setEditorTimeout(e,function(){r()}))}),c(),e.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||y(w.select("a"),function(e){var t=e.parentNode,n=w.getRoot();if(t.lastChild===e){for(;t&&!w.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}w.add(t,"br",{"data-mce-bogus":1})}})}),l(),m(),u())),{refreshContentEditable:D,isHidden:function(){if(!k||e.removed)return!1;var t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}}function Vm(e){return W(e,function(e){return!1===zg(e)})}function qm(e){var t=e.settings;return Vm({block_elements:t.block_elements,boolean_attributes:t.boolean_attributes,custom_elements:t.custom_elements,extended_valid_elements:t.extended_valid_elements,invalid_elements:t.invalid_elements,invalid_styles:t.invalid_styles,move_caret_before_on_enter_elements:t.move_caret_before_on_enter_elements,non_empty_elements:t.non_empty_elements,schema:t.schema,self_closing_elements:t.self_closing_elements,short_ended_elements:t.short_ended_elements,special:t.special,text_block_elements:t.text_block_elements,text_inline_elements:t.text_inline_elements,valid_children:t.valid_children,valid_classes:t.valid_classes,valid_elements:t.valid_elements,valid_styles:t.valid_styles,verify_html:t.verify_html,whitespace_elements:t.whitespace_elements,padd_empty_block_inline_children:t.format_empty_lines})}function $m(e){var t=e.settings,n=e.editorUpload.blobCache;return Vm({allow_conditional_comments:t.allow_conditional_comments,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_html_in_named_anchor:t.allow_html_in_named_anchor,allow_script_urls:t.allow_script_urls,allow_unsafe_link_target:t.allow_unsafe_link_target,convert_fonts_to_spans:t.convert_fonts_to_spans,fix_list_elements:t.fix_list_elements,font_size_legacy_values:t.font_size_legacy_values,forced_root_block:t.forced_root_block,forced_root_block_attrs:t.forced_root_block_attrs,padd_empty_with_br:t.padd_empty_with_br,preserve_cdata:t.preserve_cdata,remove_trailing_brs:t.remove_trailing_brs,inline_styles:t.inline_styles,root_name:e.inline?e.getElement().nodeName.toLowerCase():void 0,validate:!0,blob_cache:n,document:e.getDoc(),images_dataimg_filter:t.images_dataimg_filter})}function Wm(e){var t,n,r;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("Init"),e.focus(!0),r=(n=e).dom.getRoot(),n.inline||wi(n)&&n.selection.getStart(!0)!==r||rC(r).each(function(e){var t,r,o,i,a=e.getNode(),u=ot(a)?rC(a).getOr(e):e;Tp.browser.isIE()?(t=n,r=u.toRange(),o=Lp.fromDom(t.getBody()),i=(va(t)?Kg.from(r):Kg.none()).map(ba).filter(ha(o)),t.bookmark=i.isSome()?i:t.bookmark):n.selection.setRng(u.toRange())}),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&zh.setEditorTimeout(t,function(){var e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus);e.destroyed||e.focus()},100)}function Km(e){return(e.inline?e.ui:e.dom).styleSheetLoader}function Xm(e){function t(){o.unloadAll(a),e.inline||e.ui.styleSheetLoader.unloadAll(i)}function n(){e.removed?t():e.on("remove",t)}var r,o=Km(e),i=Kr(e),a=e.contentCSS;0<e.contentStyles.length&&(r="",Pp.each(e.contentStyles,function(e){r+=e+"\r\n"}),e.dom.addStyle(r));var u,s,c,l,f,d,m,g,p,h=Uh.all((u=e,s=a,c=i,l=[new Uh(function(e,t){return Km(u).loadAll(s,e,t)})],u.inline?l:l.concat([new Uh(function(e,t){return u.ui.styleSheetLoader.loadAll(c,e,t)})]))).then(n)["catch"](n);return e.settings.content_style&&(d=(f=e).settings.content_style,m=Lp.fromDom(f.getBody()),g=Fe(Vp(m)),lt(p=Lp.fromTag("style"),"type","text/css"),qp(p,Lp.fromText(d)),qp(g,p),f.on("remove",function(){$p(p)})),h}function Ym(e){var t;!0!==e.removed&&(yc(t=e)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),Wm(e))}function Gm(e,t){var n=e.settings,r=e.getElement(),o=e.getDoc();n.inline||(e.getElement().style.visibility=e.orgVisibility),t||e.inline||(o.open(),o.write(e.iframeHTML),o.close()),e.inline&&(lS.addClass(r,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=r,e.contentAreaContainer=r);var i,a,u,s,c,l,f,d,m,p,h,v,b=e.getBody();b.disabled=!0,e.readonly=!!n.readonly,e.readonly||(e.inline&&"static"===lS.getStyle(b,"position",!0)&&(b.style.position="relative"),b.contentEditable=e.getParam("content_editable_state",!0)),b.disabled=!1,e.editorUpload=pl(e),e.schema=cn(qm(e)),e.dom=Hb(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:e.getParam("content_css_cors",!1,"boolean"),referrerPolicy:qr(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=((a=Uc($m(i=e),i.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o=e.length,a=i.dom,u="data-mce-"+t;o--;)(r=(n=e[o]).attr(t))&&!n.attr(u)&&0!==r.indexOf("data:")&&0!==r.indexOf("blob:")&&("style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(u,r),n.attr(t,r)):"tabindex"===t?(n.attr(u,r),n.attr(t,null)):n.attr(u,i.convertURL(r,t,n.name)))}),a.addNodeFilter("script",function(e){for(var t=e.length;t--;){var n=e[t],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}}),i.settings.preserve_cdata&&a.addNodeFilter("#cdata",function(e){for(var t=e.length;t--;){var n=e[t];n.type=8,n.name="#comment",n.value="[CDATA["+i.dom.encode(n.value)+"]]"}}),a.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,n=i.schema.getNonEmptyElements();t--;){var r=e[t];r.isEmpty(n)&&0===r.getAll("br").length&&(r.append(new IC("br",1)).shortEnded=!0)}}),a),e.serializer=jc((s=(u=e).settings,rp(rp(rp({},$m(u)),qm(u)),Vm({url_converter:s.url_converter,url_converter_scope:s.url_converter_scope,element_format:s.element_format,entities:s.entities,entity_encoding:s.entity_encoding,indent:s.indent,indent_after:s.indent_after,indent_before:s.indent_before}))),e),e.selection=Rc(e.dom,e.getWin(),e.serializer,e),e.annotator=Ai(e),e.formatter=yl(e),e.undoManager=xl(e),e._nodeChangeDispatcher=new oS(e),e._selectionOverrides=Hm(e),m=e,p=Wn(),h=qn(!1),v=Xn(function(e){m.fire("longpress",rp(rp({},e),{type:"longpress"})),h.set(!0)},400),m.on("touchstart",function(e){xd(e).each(function(t){v.cancel();var n={x:t.clientX,y:t.clientY,target:e.target};v.throttle(e),h.set(!1),p.set(n)})},!0),m.on("touchmove",function(e){v.cancel(),xd(e).each(function(e){p.on(function(t){var n=e,r=t,o=Math.abs(n.clientX-r.x),i=Math.abs(n.clientY-r.y);(5<o||5<i)&&(p.clear(),h.set(!1),m.fire("longpresscancel"))})})},!0),m.on("touchend touchcancel",function(e){v.cancel(),"touchcancel"!==e.type&&p.get().filter(function(t){return t.target.isEqualNode(e.target)}).each(function(){h.get()?e.preventDefault():m.fire("tap",rp(rp({},e),{type:"tap"}))})},!0),(f=l=e).on("click",function(e){f.dom.getParent(e.target,"details")&&e.preventDefault()}),(d=l).parser.addNodeFilter("details",function(e){E(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),d.serializer.addNodeFilter("details",function(e){E(e,function(e){var t=e.attr("data-mce-open");e.attr("open",Lg(t)?t:null),e.attr("data-mce-open",null)})}),yc(e)||(c=e).on("click",function(e){var t,n,r,o,i;3<=e.detail&&(r=(t=c).selection.getRng(),o=py.fromRangeStart(r),i=py.fromRangeEnd(r),!py.isElementPosition(o)||Pm(n=o.container())&&rC(n).each(function(e){return r.setStart(e.container(),e.offset())}),!py.isElementPosition(i)||Pm(n=o.container())&&oC(n).each(function(e){return r.setEnd(e.container(),e.offset())}),t.selection.setRng(ts(r)))});var y,C,w,S,k,N,_,A,R,D=yc(y=e)?qn(null):Om(y);R=D,(A=e).addCommand("delete",function(){var e,t=R;yd(e=A)||nf(e,!1)||Gl(e,!1)||sd(e,t,!1)||Ul(e,!1)||es(e)||rf(e,!1)||md(e,!1)||jl(e)||fd(e,!1)||(Cd(e,"Delete"),Rl(e))}),A.addCommand("forwardDelete",function(){var e,t=R;nf(e=A,!0)||Gl(e,!0)||sd(e,t,!0)||Ul(e,!0)||es(e)||rf(e,!0)||md(e,!0)||jl(e)||fd(e,!0)||Cd(e,"ForwardDelete")}),zr(C=e)&&C.on("NodeChange",g(Sd,C)),S=(w=e).dom,k=zr(w),N=w.getParam("placeholder",ky.getAttrib(w.getElement(),"placeholder"),"string"),_=function(e,t){var n,r,o;!function(e){if(wl(e)){var t=e.keyCode;return!Sl(e)&&(vC.metaKeyPressed(e)||e.altKey||112<=t&&t<=123||x(bw,t))}}(e)&&(n=w.getBody(),r=!(wl(o=e)&&!(Sl(o)||"keyup"===o.type&&229===o.keyCode))&&function(e,t,n){if(Jt(Lp.fromDom(t),!1)){var r=""===n,o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&(r?!e.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(S,n,k),""!==S.getAttrib(n,yw)===r&&!t||(S.setAttrib(n,yw,r?N:null),S.setAttrib(n,"aria-placeholder",r?N:null),w.fire("PlaceholderToggle",{state:r}),w.on(r?"keydown":"keyup",_),w.off(r?"keyup":"keydown",_)))},N&&w.on("init",function(e){_(e,!0),w.on("change SetContent ExecCommand",_),w.on("paste",function(e){return zh.setEditorTimeout(w,function(){return _(e)})})});var T=Cc(e);(function(e){var t=e.settings,n=e.getDoc(),r=e.getBody();e.fire("PreInit"),t.browser_spellcheck||t.gecko_spellcheck||(n.body.spellcheck=!1,lS.setAttrib(r,"spellcheck","false")),e.quirks=jm(e),e.fire("PostRender");var o=e.getParam("directionality",Xb.isRtl()?"rtl":void 0);void 0!==o&&(r.dir=o),t.protect&&e.on("BeforeSetContent",function(e){Pp.each(t.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type})})(e),T.fold(function(){Xm(e).then(function(){return Ym(e)})},function(t){e.setProgressState(!0),Xm(e).then(function(){t().then(function(){e.setProgressState(!1),Ym(e)},function(t){e.notificationManager.open({type:"error",text:String(t)}),Ym(e)})})})}function Jm(e,t){var n,r,o,i,a=e.translate("Rich Text Area"),u=(n=e.id,r=a,t.height,o=e.getParam("iframe_attrs",{}),ft(i=Lp.fromTag("iframe"),o),ft(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Jn(i,"tox-edit-area__iframe"),i.dom);u.onload=function(){u.onload=null,e.fire("load")};var s=function(e,t){if(document.domain!==window.location.hostname&&Tp.browser.isIE()){var n=ll("mce");e[n]=function(){Gm(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return fS.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=function(e){var t=e.getParam("doctype","<!DOCTYPE html>")+"<html><head>";e.getParam("document_base_url","")!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=Fr(e,"body_id","tinymce"),r=Fr(e,"body_class",""),o=e.translate(e.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string"));return Ur(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Ur(e)+'" />'),t+'</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'" aria-label="'+o+'"><br></body></html>'}(e),fS.add(t.iframeContainer,u),s}function Qm(e){return e.replace(/^\-/,"")}function Zm(e){return{editorContainer:e,iframeContainer:e,api:{}}}function eg(e){var t,n,r,o,i,a,u,s=e.getElement();return e.orgDisplay=s.style.display,Lg(Gr(e))?e.theme.renderUI():Hg(Gr(e))?(n=(t=e).getElement(),(r=Gr(t)(t,n)).editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||t.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||t.id+"_iframecontainer"),r.height=r.iframeHeight||n.offsetHeight,r):(u=(o=e).getElement(),o.inline?Zm(null):(i=u,a=dS.create("div"),dS.insertAfter(a,i),Zm(a)))}function tg(e){var t,n,r,o,i,a,u,c;e.fire("ScriptsLoaded"),t=e,n=Pp.trim(Vr(t)),r=t.ui.registry.getAll().icons,j(rp(rp({},uw.get("default").icons),uw.get(n).icons),function(e,n){tp(r,n)||t.ui.registry.addIcon(n,e)}),a=Gr(o=e),Lg(a)?(o.settings.theme=Qm(a),i=mw.get(a),o.theme=new i(o,mw.urls[a]),o.theme.init&&o.theme.init(o,mw.urls[a]||o.documentBaseUrl.replace(/\/$/,""),o.$)):o.theme={},c=[],Pp.each(Qr(u=e).split(/[ ,]/),function(e){mS(u,c,Qm(e))});var l=eg(e),f=e,d=Kg.from(l.api).getOr({}),m={show:Kg.from(d.show).getOr(s),hide:Kg.from(d.hide).getOr(s),disable:Kg.from(d.disable).getOr(s),isDisabled:Kg.from(d.isDisabled).getOr(Vg),enable:function(){f.mode.isReadOnly()||Kg.from(d.enable).map(v)}};f.ui=rp(rp({},f.ui),m);var g,p,h,b={editorContainer:l.editorContainer,iframeContainer:l.iframeContainer};return e.editorContainer=b.editorContainer||null,sl(e),e.inline?Gm(e):(h=Jm(g=e,p=b),p.editorContainer&&(fS.get(p.editorContainer).style.display=g.orgDisplay,g.hidden=fS.isHidden(p.editorContainer)),g.getElement().style.display="none",fS.setAttrib(g.id,"aria-hidden","true"),void(h||Gm(g)))}function ng(e){return"-"===e.charAt(0)}function rg(e,t,n){return Kg.from(t).filter(function(e){return 0<e.length&&!uw.has(e)}).map(function(t){return{url:e.editorManager.baseURL+"/icons/"+t+"/icons"+n+".js",name:Kg.some(t)}})}function og(e,t){var n,r,o=$b.ScriptLoader,i=o,a=t,u=function(){var n,r,i,a,u,c,l,f,d;u=o,f=$r(c=e),d=c.getParam("language_url","","string"),!1===Xb.hasCode(f)&&"en"!==f&&(l=""!==d?d:c.editorManager.baseURL+"/langs/"+f+".js",u.add(l,s,void 0,function(){il(c,"LanguageLoadError",al("language",l,f))})),i=o,E(function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t}([rg(a=e,"default",t),Kg.from(a.getParam("icons_url","","string")).filter(function(e){return 0<e.length}).map(function(e){return{url:e,name:Kg.none()}}).orThunk(function(){return rg(a,Vr(a),"")})]),function(e){i.add(e.url,s,void 0,function(){il(a,"IconsLoadError",al("icons",e.url,e.name.getOrUndefined()))})}),n=e,r=t,Pp.each(n.getParam("external_plugins"),function(e,t){dw.load(t,e,s,void 0,function(){ul(n,e,t)}),n.settings.plugins+=" "+t}),Pp.each(Qr(n).split(/[ ,]/),function(e){var t,o;(e=Pp.trim(e))&&!dw.urls[e]&&(ng(e)?(e=e.substr(1,e.length),t=dw.dependencies(e),Pp.each(t,function(e){var t=dw.createUrl({prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"},e);dw.load(t.resource,t,s,void 0,function(){ul(n,t.prefix+t.resource+t.suffix,t.resource)})})):(o={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"},dw.load(e,o,s,void 0,function(){ul(n,o.prefix+o.resource+o.suffix,e)})))}),o.loadQueue(function(){e.removed||tg(e)},e,function(){e.removed||tg(e)})},c=Gr(n=e);Lg(c)?(ng(c)||tp(mw.urls,c)||((r=n.getParam("theme_url"))?mw.load(c,n.documentBaseURI.toAbsolute(r)):mw.load(c,"themes/"+c+"/theme"+a+".js")),i.loadQueue(function(){mw.waitFor(c,u)})):u()}function ig(e){return function(t,n){return Kg.from(n).map(Lp.fromDom).filter(Ip).bind(function(n){return r=e,o=t,i=n.dom,ds(Lp.fromDom(i),function(e){return vt(t=e,r).orThunk(function(){return"font"===we(t)?K(pS,r).bind(function(e){return mt(t,e)}):Kg.none()});var t},function(e){return he(Lp.fromDom(o),e)}).or((a=n.dom,Kg.from(Hb.DOM.getStyle(a,e,!0))));var r,o,i,a}).getOr("")}}function ag(e){return rC(e.getBody()).map(function(e){var t=e.container();return Qp(t)?t.parentNode:t})}function ug(e,t){return n=e,r=l(Kg.some,t),o=n,Kg.from(o.selection.getRng()).bind(function(e){var t=o.getBody();return e.startContainer===t&&0===e.startOffset?Kg.none():Kg.from(o.selection.getStart(!0))}).orThunk(g(ag,n)).map(Lp.fromDom).filter(Ip).bind(r);var n,r,o}function sg(e,t){if(/^[0-9.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Pp.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),o=Pp.explode(e.getParam("font_size_classes",""));return o?o[n-1]||t:r[n-1]||t}return t}return t}function cg(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}function lg(e,t,n){var r,o,i,a,u,s;Qn(e,t)&&!1===n?(o=t,Gn(r=e)?r.dom.classList.remove(o):(u=o,0<(s=_(Yn(a=r,"class"),function(e){return e!==u})).length?lt(a,"class",s.join(" ")):gt(a,"class")),0===(Gn(i=r)?i.dom.classList:Yn(i,"class")).length&&gt(i,"class")):n&&Jn(e,t)}function fg(e,t,n){try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}}function dg(e,t){e.dom.contentEditable=t?"true":"false"}function mg(e,t){var n,r,o=Lp.fromDom(e.getBody());lg(o,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),Kg.from(e.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")}),dg(o,!(e.readonly=!0)),E(Zn(o,'*[contenteditable="true"]'),function(e){lt(e,wS,"true"),dg(e,!1)})):(dg(o,!(e.readonly=!1)),E(Zn(o,"*["+wS+'="true"]'),function(e){gt(e,wS),dg(e,!0)}),fg(e,"StyleWithCSS",!1),fg(e,"enableInlineTableEditing",!1),fg(e,"enableObjectResizing",!1),(Aa(n=e)||(r=n,da(Vp(Lp.fromDom(r.getElement()))).filter(function(e){return!(void 0!==(t=e.dom.classList)&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body")))&&Sa(r,e.dom);var t}).isSome()))&&e.focus(),e.selection.setRng(e.selection.getRng()),e.nodeChanged())}function gg(e){return e.readonly}function pg(e){e.parser.addAttributeFilter("contenteditable",function(t){gg(e)&&E(t,function(e){e.attr(wS,e.attr("contenteditable")),e.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(wS,function(t){gg(e)&&E(t,function(e){e.attr("contenteditable",e.attr(wS))})}),e.serializer.addTempAttr(wS)}function hg(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||Vg}function vg(e){return e._eventDispatcher||(e._eventDispatcher=new ES({scope:e,toggleEvent:function(t,n){ES.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher}function bg(e,t){if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return e.getDoc().documentElement;var n=Yr(e);return n?(e.eventRoot||(e.eventRoot=NS.select(n)[0]),e.eventRoot):e.getBody()}function yg(e,t,n){var r,o,i,a;e.hidden||gg(e)?gg(e)&&(r=e,"click"!==(o=n).type||vC.metaKeyPressed(o)||(i=Lp.fromDom(o.target),a=r,Dt(i,"a",function(e){return he(e,Lp.fromDom(a.getBody()))}).bind(function(e){return mt(e,"href")}).each(function(e){var t,n;o.preventDefault(),/^#/.test(e)?(t=r.dom.select(e+',[name="'+(ap(n=e,"#")?n.substring("#".length):n)+'"]')).length&&r.selection.scrollIntoView(t[0],!0):window.open(e,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))):e.fire(t,n)}function Cg(e,t){var n,r;e.delegates||(e.delegates={}),e.delegates[t]||e.removed||(r=bg(e,t),Yr(e)?(Mw||(Mw={},e.editorManager.on("removeEditor",function(){e.editorManager.activeEditor||Mw&&(j(Mw,function(t,n){e.dom.unbind(bg(e,n))}),Mw=null)})),Mw[t]||(Mw[t]=n=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();a!==r&&!NS.isChildOf(r,a)||yg(o[i],t,n)}},NS.bind(r,t,n))):(NS.bind(r,t,n=function(n){yg(e,t,n)}),e.delegates[t]=n))}function xg(e,t,n,r){var o=n[t.get()],i=n[r];try{i.activate()}catch(e){return void console.error("problem while activating editor mode "+r+":",e)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&mg(e,i.editorReadOnly),t.set(r),e.fire("SwitchMode",{mode:r})}function wg(e){var t,n={};RS(DS(e.toLowerCase(),"+"),function(e){e in OS?n[e]=!0:/^[0-9]{2,}$/.test(e)?n.keyCode=parseInt(e,10):(n.charCode=e.charCodeAt(0),n.keyCode=TS[e]||e.toUpperCase().charCodeAt(0))});var r=[n.keyCode];for(t in OS)n[t]?r.push(t):n[t]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,Tp.mac?n.ctrl=!0:n.shift=!0),n.meta&&(Tp.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n}function Sg(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var t=this;e.on("keyup keypress keydown",function(e){!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(RS(t.shortcuts,function(n){if(t.matchShortcut(e,n))return t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n),!0}),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))})}function Eg(e,t,n){function r(e,t){return function(n,r){return e[n.toLowerCase()]=rp(rp({},r),{type:t})}}var o,i,a,u,c,l,f,d,m,g,p,h,v,b,y,C,w,S,E=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,LS(this,_S),this.settings=(g=(m=this).documentBaseUrl,p=n.defaultSettings,v=g,b=nw,y=m,C={id:e,theme:"silver",toolbar_mode:Xc(h=t,"floating"),plugins:"",document_base_url:v,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:y.convertURL,url_converter_scope:y},w=rp(rp({},C),b?aw:{}),!1!==(S=Gc(rw||ow,rw,w,p,h)).deprecation_warnings&&$c(h,S),S),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&($b.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Hb.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Yb.languageLoad=this.settings.language_load,Yb.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new jC(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new BS(this),this.editorCommands=new xS(this),this.settings.cache_suffix&&(Tp.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:{addAutocompleter:(c={},(o={addButton:r(i={},"button"),addGroupToolbarButton:r(i,"grouptoolbarbutton"),addToggleButton:r(i,"togglebutton"),addMenuButton:r(i,"menubutton"),addSplitButton:r(i,"splitbutton"),addMenuItem:r(a={},"menuitem"),addNestedMenuItem:r(a,"nestedmenuitem"),addToggleMenuItem:r(a,"togglemenuitem"),addAutocompleter:r(u={},"autocompleter"),addContextMenu:r(l={},"contextmenu"),addContextToolbar:r(f={},"contexttoolbar"),addContextForm:r(f,"contextform"),addSidebar:r(d={},"sidebar"),addIcon:function(e,t){return c[e.toLowerCase()]=t},getAll:function(){return{buttons:i,menuItems:a,icons:c,popups:u,contextMenus:l,contextToolbars:f,sidebars:d}}}).addAutocompleter),addButton:o.addButton,addContextForm:o.addContextForm,addContextMenu:o.addContextMenu,addContextToolbar:o.addContextToolbar,addIcon:o.addIcon,addMenuButton:o.addMenuButton,addMenuItem:o.addMenuItem,addNestedMenuItem:o.addNestedMenuItem,addSidebar:o.addSidebar,addSplitButton:o.addSplitButton,addToggleButton:o.addToggleButton,addGroupToolbarButton:o.addGroupToolbarButton,addToggleMenuItem:o.addToggleMenuItem,getAll:o.getAll},styleSheetLoader:void 0,show:s,hide:s,enable:s,disable:s,isDisabled:Vg};var k,N,_,A,R,D=(A=qn("design"),R=qn({design:{activate:s,deactivate:s,editorReadOnly:!1},readonly:{activate:s,deactivate:s,editorReadOnly:!0}}),(N=k=this).serializer?pg(N):N.on("PreInit",function(){pg(N)}),(_=k).on("ShowCaret",function(e){gg(_)&&e.preventDefault()}),_.on("ObjectSelected",function(e){gg(_)&&e.preventDefault()}),{isReadOnly:function(){return gg(k)},set:function(e){return function(e,t,n,r){if(r!==n.get()){if(!tp(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?xg(e,n,t,r):e.on("init",function(){return xg(e,n,t,r)})}}(k,R.get(),A,e)},get:function(){return A.get()},register:function(e,t){R.set(function(e,t,n){var r;if(x(AS,t))throw new Error("Cannot override default mode "+t)
168
+ ;return rp(rp({},e),((r={})[t]=rp(rp({},n),{deactivate:function(){try{n.deactivate()}catch(e){console.error("problem while deactivating editor mode "+t+":",e)}}}),r))}(R.get(),e,t))}});this.mode=D,this.setMode=D.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ib.overrideDefaults(function(){return{context:E.inline?E.getBody():E.getDoc(),element:E.getBody()}})}function kg(e){var t=e.type;jS(YS.get(),function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e)}})}function Ng(e){e!==$S&&(e?Ib(window).on("resize scroll",kg):Ib(window).off("resize scroll",kg),$S=e)}function _g(e){var t=KS;delete WS[e.id];for(var n=0;n<WS.length;n++)if(WS[n]===e){WS.splice(n,1);break}return KS=_(KS,function(t){return e!==t}),YS.activeEditor===e&&(YS.activeEditor=0<KS.length?KS[0]:null),YS.focusedEditor===e&&(YS.focusedEditor=null),t.length!==KS.length}function Ag(e,t,n){var r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,c=(n||"").split("");return"b"===c[0]&&(o+=s),"r"===c[1]&&(r+=u),"c"===c[0]&&(o+=nE(s/2)),"c"===c[1]&&(r+=nE(u/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=nE(a/2)),"c"===c[4]&&(r-=nE(i/2)),Dg(r,o,i,a)}function Rg(){}function Dg(e,t,n,r){return{x:e,y:t,w:n,h:r}}function Tg(e){this.settings=hE({},e),this.count=0}var Og=function(e){return{eq:e}},Bg=Og(function(e,t){return e===t}),Pg=Og(function(r,o){if(r===o)return!0;var i=e(r);return i===e(o)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(i)?r===o:"array"===i?t(Pg).eq(r,o):"object"===i&&n(Pg).eq(r,o))}),Lg=r("string"),Ig=r("object"),Mg=r("array"),Fg=i(null),Ug=o("boolean"),zg=i(void 0),Hg=o("function"),jg=o("number"),Vg=f(!1),qg=f(!0),$g={fold:function(e){return e()},isSome:Vg,isNone:qg,getOr:d,getOrThunk:y,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:d,orThunk:y,map:b,each:s,bind:b,exists:Vg,forall:qg,filter:function(){return $g},toArray:function(){return[]},toString:f("none()")},Wg=function(e){function t(){return o}function n(t){return t(e)}var r=f(e),o={fold:function(t,n){return n(e)},isSome:qg,isNone:Vg,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return Wg(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:$g},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},Kg={some:Wg,none:b,from:function(e){return null==e?$g:Wg(e)}},Xg=Array.prototype.slice,Yg=Array.prototype.indexOf,Gg=Array.prototype.push,Jg=Hg(Array.from)?Array.from:function(e){return Xg.call(e)},Qg=Object.keys,Zg=Object.hasOwnProperty,ep=function(e,t){var n={};return j(e,function(e,r){var o=t(e,r);n[o.k]=o.v}),n},tp=function(e,t){return Zg.call(e,t)},np=Array.isArray,rp=function(){return(rp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},op=function(e,t){return{major:e,minor:t}},ip={nu:op,detect:function(e,t){function n(e){return Number(r.replace(o,"$"+e))}var r,o,i=String(t).toLowerCase();return 0===e.length?be():(o=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,r=i))?op(n(1),n(2)):{major:0,minor:0}},unknown:be},ap=function(e,t){return""===(n=t)||e.length>=n.length&&e.substr(0,0+n.length)===n;var n},up=ae(/^\s+|\s+$/g),sp=ae(/^\s+/g),cp=ae(/\s+$/g),lp=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,fp={browsers:f([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ie(e,"edge/")&&ie(e,"chrome")&&ie(e,"safari")&&ie(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,lp],search:function(e){return ie(e,"chrome")&&!ie(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ie(e,"msie")||ie(e,"trident")}},{name:"Opera",versionRegexes:[lp,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ce("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ce("firefox")},{name:"Safari",versionRegexes:[lp,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ie(e,"safari")||ie(e,"mobile/"))&&ie(e,"applewebkit")}}]),oses:f([{name:"Windows",search:ce("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ie(e,"iphone")||ie(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ce("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ce("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ce("linux"),versionRegexes:[]},{name:"Solaris",search:ce("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ce("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ce("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},dp="Firefox",mp=function(){return ye({current:void 0,version:ip.unknown()})},gp=ye,pp=(f("Edge"),f("Chrome"),f("IE"),f("Opera"),f(dp),f("Safari"),"Windows"),hp="Android",vp="Solaris",bp="FreeBSD",yp="ChromeOS",Cp=function(){return Ce({current:void 0,version:ip.unknown()})},xp=Ce,wp=(f(pp),f("iOS"),f(hp),f("Linux"),f("OSX"),f(vp),f(bp),f(yp),re(function(){return e=navigator.userAgent,t=Kg.from(navigator.userAgentData),n=le,h=fp.browsers(),v=fp.oses(),{browser:b=t.bind(function(e){return t=h,H(e.brands,function(e){var n=e.brand.toLowerCase();return T(t,function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(t){return{current:t.name,version:ip.nu(parseInt(e.version,10),0)}})});var t}).orThunk(function(){return oe(h,t=e).map(function(e){var n=ip.detect(e.versionRegexes,t);return{current:e.name,version:n}});var t}).fold(mp,gp),os:y=oe(v,r=e).map(function(e){var t=ip.detect(e.versionRegexes,r);return{current:e.name,version:t}}).fold(Cp,xp),deviceType:(i=b,a=e,u=n,s=(o=y).isiOS()&&!0===/ipad/i.test(a),c=o.isiOS()&&!s,d=(l=o.isiOS()||o.isAndroid())||u("(pointer:coarse)"),m=s||!c&&l&&u("(min-device-width:768px)"),g=c||l&&!m,p=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:f(s),isiPhone:f(c),isTablet:f(m),isPhone:f(g),isTouch:f(d),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:f(p),isDesktop:f(!g&&!m&&!p)})};var e,t,n,r,o,i,a,u,s,c,l,d,m,g,p,h,v,b,y})),Sp=navigator.userAgent,Ep=wp(),kp=Ep.browser,Np=Ep.os,_p=Ep.deviceType,Ap=/WebKit/.test(Sp)&&!kp.isEdge(),Rp="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Dp=-1!==Sp.indexOf("Windows Phone"),Tp={opera:kp.isOpera(),webkit:Ap,ie:!(!kp.isIE()&&!kp.isEdge())&&kp.version.major,gecko:kp.isFirefox(),mac:Np.isOSX()||Np.isiOS(),iOS:_p.isiPad()||_p.isiPhone(),android:Np.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:kp.isIE()?document.documentMode||7:10,fileApi:Rp,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!kp.isIE(),desktop:_p.isDesktop(),windowsPhone:Dp,browser:{current:kp.current,version:kp.version,isChrome:kp.isChrome,isEdge:kp.isEdge,isFirefox:kp.isFirefox,isIE:kp.isIE,isOpera:kp.isOpera,isSafari:kp.isSafari},os:{current:Np.current,version:Np.version,isAndroid:Np.isAndroid,isChromeOS:Np.isChromeOS,isFreeBSD:Np.isFreeBSD,isiOS:Np.isiOS,isLinux:Np.isLinux,isOSX:Np.isOSX,isSolaris:Np.isSolaris,isWindows:Np.isWindows},deviceType:{isDesktop:_p.isDesktop,isiPad:_p.isiPad,isiPhone:_p.isiPhone,isPhone:_p.isPhone,isTablet:_p.isTablet,isTouch:_p.isTouch,isWebView:_p.isWebView}},Op=/^\s*|\s*$/g,Bp=function(e,t,n,r){r=r||this,e&&Y(e=n?e[n]:e,function(e,o){return!1!==t.call(r,e,o,n)&&void Bp(e,t,n,r)})},Pp={trim:fe,isArray:np,is:de,toArray:function(e){if(np(e))return e;for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n];return t},makeMap:function(e,t,n){var r;for(t=t||",",n=n||{},r=(e="string"==typeof(e=e||[])?e.split(t):e).length;r--;)n[e[r]]={};return n},each:Y,map:G,grep:J,inArray:Q,hasOwn:tp,extend:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o,i,a=t[r];for(o in a)!tp(a,o)||void 0!==(i=a[o])&&(e[o]=i)}return e},create:function(e,t,n){var r,o,i,a=this,u=0,s=(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e))[3].match(/(^|\.)(\w+)$/i)[2],c=a.createNS(e[3].replace(/\.\w+$/,""),n);if(!c[s]){if("static"===e[2])return c[s]=t,void(this.onCreate&&this.onCreate(e[2],e[3],c[s]));t[s]||(t[s]=function(){},u=1),c[s]=t[s],a.extend(c[s].prototype,t),e[5]&&(r=a.resolve(e[5]).prototype,o=e[5].match(/\.(\w+)$/i)[1],i=c[s],c[s]=u?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},c[s].prototype[s]=c[s],a.each(r,function(e,t){c[s].prototype[t]=r[t]}),a.each(t,function(e,t){r[t]?c[s].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==s&&(c[s].prototype[t]=e)})),a.each(t["static"],function(e,t){c[s][t]=e})}},walk:Bp,createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||de(e,"array")?e:G(e.split(t||","),fe)},_addCacheSuffix:function(e){var t=Tp.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Lp={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return xe(n.childNodes[0])},fromTag:function(e,t){return xe((t||document).createElement(e))},fromText:function(e,t){return xe((t||document).createTextNode(e))},fromDom:xe,fromPoint:function(e,t,n){return Kg.from(e.dom.elementFromPoint(t,n)).map(xe)}};"undefined"!=typeof window||Function("return this;")();var Ip=Ee(1),Mp=Ee(3),Fp=Ee(9),Up=Ee(11),zp=function(e){return S(e.dom.childNodes,Lp.fromDom)},Hp=Hg(Element.prototype.attachShadow)&&Hg(Node.prototype.getRootNode),jp=f(Hp),Vp=Hp?function(e){return Lp.fromDom(e.dom.getRootNode())}:Ne,qp=function(e,t){e.dom.appendChild(t.dom)},$p=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Wp=function(e){var t=Mp(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;var n=t.ownerDocument,r=Lp.fromDom(t),o=Vp(r);return(Me(o)?Kg.some(o):Kg.none()).fold(function(){return n.body.contains(t)},l(Wp,Ue))},Kp=function(e,t){return{left:e,top:t,translate:function(n,r){return Kp(e+n,t+r)}}},Xp=Kp,Yp=function(e){var t,n=e.dom,r=n.ownerDocument.body;return r===n?Xp(r.offsetLeft,r.offsetTop):Wp(e)?(t=n.getBoundingClientRect(),Xp(t.left,t.top)):Xp(0,0)},Gp=Qe(1),Jp=et(["textarea","input"]),Qp=Qe(3),Zp=Qe(8),eh=Qe(9),th=Qe(11),nh=et(["br"]),rh=et(["img"]),oh=it("true"),ih=it("false"),ah=et(["td","th"]),uh=et(["video","audio","object","embed"]),sh=function(e,t){return st(e)?e.style.getPropertyValue(t):""},ch=wp().browser,lh={},fh={exports:lh};!function(){var e=this,t=function(){function e(){}function t(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function n(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t,i=1===e._state?n.onFulfilled:n.onRejected;if(null!==i){try{t=i(e._value)}catch(t){return void o(n.promise,t)}r(n.promise,t)}else(1===e._state?r:o)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var r=n.then;if(n instanceof t)return e._state=3,e._value=n,void i(e);if("function"==typeof r)return void u((a=r,s=n,function(){a.apply(s,arguments)}),e)}e._state=1,e._value=n,i(e)}catch(n){o(e,n)}var a,s}function o(e,t){e._state=2,e._value=t,i(e)}function i(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var r=0,o=e._deferreds.length;r<o;r++)n(e,e._deferreds[r]);e._deferreds=null}function a(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function u(e,t){var n=!1;try{e(function(e){n||(n=!0,r(t,e))},function(e){n||(n=!0,o(t,e))})}catch(e){if(n)return;n=!0,o(t,e)}}var s,c,l,f={exports:{}};s=f,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=setTimeout,t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(t,r){var o=new this.constructor(e);return n(this,new a(t,r,o)),o},t.all=function(e){var n=Array.prototype.slice.call(e);return new t(function(e,t){if(0===n.length)return e([]);for(var r=n.length,o=0;o<n.length;o++)!function i(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return u.call(a,function(e){i(o,e)},t),0}n[o]=a,0==--r&&e(n)}catch(a){t(a)}}(o,n[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},t._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){l(e,0)},t._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t._setImmediateFn=function(e){t._immediateFn=e},t._setUnhandledRejectionFn=function(e){t._unhandledRejectionFn=e},s.exports?s.exports=t:c.Promise||(c.Promise=t);var d=f.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||d}};"object"==typeof lh&&void 0!==fh?fh.exports=t():(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=t()}();var dh=fh.exports.boltExport,mh=function(e){function t(e){o()?i(e):r.push(e)}var n=Kg.none(),r=[],o=function(){return n.isSome()},i=function(e){n.each(function(t){setTimeout(function(){e(t)},0)})};return e(function(e){o()||(n=Kg.some(e),E(r,i),r=[])}),{get:t,map:function(e){return mh(function(n){t(function(t){n(e(t))})})},isReady:o}},gh={nu:mh,pure:function(e){return mh(function(t){t(e)})}},ph=function(e){function t(t){e().then(t,xt)}return{map:function(t){return ph(function(){return e().then(t)})},bind:function(t){return ph(function(){return e().then(function(e){return t(e).toPromise()})})},anonBind:function(t){return ph(function(){return e().then(function(){return t.toPromise()})})},toLazy:function(){return gh.nu(t)},toCached:function(){var t=null;return ph(function(){return t=null===t?e():t})},toPromise:e,get:t}},hh=function(e){return{isValue:qg,isError:Vg,getOr:f(e),getOrThunk:f(e),getOrDie:f(e),or:function(){return hh(e)},orThunk:function(){return hh(e)},fold:function(t,n){return n(e)},map:function(t){return hh(t(e))},mapError:function(){return hh(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return Kg.some(e)}}},vh=function(e){return{isValue:Vg,isError:qg,getOr:d,getOrThunk:function(e){return e()},getOrDie:function(){return t=String(e),function(){throw new Error(t)}();var t},or:d,orThunk:function(e){return e()},fold:function(t){return t(e)},map:function(){return vh(e)},mapError:function(t){return vh(t(e))},each:s,bind:function(){return vh(e)},exists:Vg,forall:qg,toOptional:Kg.none}},bh={value:hh,error:vh,fromOption:function(e,t){return e.fold(function(){return vh(t)},hh)}};St([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var yh,Ch,xh,wh,Sh,Eh,kh,Nh,_h,Ah,Rh,Dh,Th,Oh,Bh,Ph,Lh,Ih,Mh,Fh=function(e,t){return T(e.dom.childNodes,function(e){return t(Lp.fromDom(e))}).map(Lp.fromDom)},Uh=window.Promise||dh,zh={requestAnimationFrame:function(e,t){yh?yh.then(e):yh=new Uh(function(e){!function(e,t){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=0;o<r.length&&!n;o++)n=window[r[o]+"RequestAnimationFrame"];(n=n||function(e){window.setTimeout(e,0)})(e,t)}(e,t=t||document.body)}).then(e)},setTimeout:Tt,setInterval:Ot,setEditorTimeout:function(e,t,n){return Tt(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r=Ot(function(){e.removed?clearInterval(r):t()},n);return r},debounce:Bt,throttle:Bt,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},Hh=(Ch=new WeakMap,{forElement:function(e,t){var n=Vp(e).dom;return Kg.from(Ch.get(n)).getOrThunk(function(){var e=Pt(n,t);return Ch.set(n,e),e})}}),jh=(Lt.prototype.current=function(){return this.node},Lt.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},Lt.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},Lt.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},Lt.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},Lt.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e&&(o=e[n],!this.rootNode||o!==this.rootNode)){if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}return(i=e.parentNode)&&i!==this.rootNode?i:void 0}},Lt),Vh=It(["h1","h2","h3","h4","h5","h6"]),qh=It(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),$h=It(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Wh=It(["ul","ol","dl"]),Kh=It(["li","dd","dt"]),Xh=It(["thead","tbody","tfoot"]),Yh=It(["td","th"]),Gh=It(["pre","script","textarea","style"]),Jh="\ufeff",Qh="\xa0",Zh=Jh,ev=function(e){return e===Jh},tv=function(e){return e.replace(/\uFEFF/g,"")},nv=Gp,rv=Qp,ov=function(e){return rv(e)&&e.data[0]===Zh},iv=function(e){return rv(e)&&e.data[e.data.length-1]===Zh},av=oh,uv=ih,sv=nh,cv=Qp,lv=et(["script","style","textarea"]),fv=et(["img","input","textarea","hr","iframe","video","audio","object","embed"]),dv=et(["table"]),mv=Ht,gv=function(e){return!1===(Gp(t=e)&&"true"===t.getAttribute("unselectable"))&&uv(e);var t},pv=/^[ \t\r\n]*$/,hv=nt("data-mce-bookmark"),vv=nt("data-mce-bogus"),bv=function(e){return Gp(e)&&"all"===e.getAttribute("data-mce-bogus")},yv=function(e,t,n){var r=n||t;if(Gp(t)&&Zt(t))return t;for(var o,i,a,u,s,c,l,f,d,m,g,p=t.childNodes,h=p.length-1;0<=h;h--)yv(e,p[h],r);return!Gp(t)||1===(o=t.childNodes).length&&Zt(o[0])&&t.parentNode.insertBefore(o[0],t),th(a=t)||eh(a)||Gt(t,r)||Gp(i=t)&&0<i.childNodes.length||(s=r,Qp(u=t)&&0<u.data.length&&(f=new jh(c=u,l=s).prev(!1),d=new jh(c,l).next(!1),m=zg(f)||Qt(f,l),g=zg(d)||Qt(d,l),m&&g))||e.remove(t),t},Cv=Pp.makeMap,xv=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wv=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Sv=/[<>&\"\']/g,Ev=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,kv={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"},Nv={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},_v={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},Av=en("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),Rv={encodeRaw:tn,encodeAllRaw:function(e){return(""+e).replace(Sv,function(e){return Nv[e]||e})},encodeNumeric:nn,encodeNamed:rn,getEncodeFunc:function(e,t){var n=en(t)||Av,r=Cv(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?xv:wv,function(e){return void 0!==Nv[e]?Nv[e]:void 0!==n[e]?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return rn(e,t,n)}:rn:r.numeric?nn:tn},decode:function(e){return e.replace(Ev,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):kv[t]||String.fromCharCode(t):_v[e]||Av[e]||(n=e,(r=Lp.fromTag("div").dom).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Dv={},Tv={},Ov=Pp.makeMap,Bv=Pp.each,Pv=Pp.extend,Lv=Pp.explode,Iv=Pp.inArray,Mv={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Fv=/^(?:mouse|contextmenu)|click/,Uv=(vn.prototype.bind=function(e,t,n,r){function o(e){f.executeHandlers(hn(e||d.event),i)}var i,a,u,s,c,l,f=this,d=window;if(e&&3!==e.nodeType&&8!==e.nodeType){e[f.expando]?i=e[f.expando]:(i=f.count++,e[f.expando]=i,f.events[i]={}),r=r||e;for(var m=t.split(" "),g=m.length;g--;)c=o,s=l=!1,"DOMContentLoaded"===(u=m[g])&&(u="ready"),f.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,hn({type:u})):(f.hasMouseEnterLeave||(s=f.mouseEnterLeave[u])&&(c=function(e){var t=e.currentTarget,n=e.relatedTarget;if(n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=hn(e||d.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,f.executeHandlers(e,i))}),f.hasFocusIn||"focusin"!==u&&"focusout"!==u||(l=!0,s="focusin"===u?"focus":"blur",c=function(e){(e=hn(e||d.event)).type="focus"===e.type?"focusin":"focusout",f.executeHandlers(e,i)}),(a=f.events[i][u])?"ready"===u&&f.domLoaded?n(hn({type:u})):a.push({func:n,scope:r}):(f.events[i][u]=a=[{func:n,scope:r}],a.fakeName=s,a.capture=l,a.nativeHandler=c,"ready"===u?function(e,t,n){var r,o=e.document,i={type:"ready"};n.domLoaded?t(i):(r=function(){pn(e,"DOMContentLoaded",r),pn(e,"load",r),n.domLoaded||(n.domLoaded=!0,t(i)),e=null},"complete"===o.readyState||"interactive"===o.readyState&&o.body?r():gn(e,"DOMContentLoaded",r),n.domLoaded||gn(e,"load",r))}(e,c,f):gn(e,s||u,c,l)));return e=a=null,n}},vn.prototype.unbind=function(e,t,n){var r,o,i;if(!e||3===e.nodeType||8===e.nodeType)return this;var a=e[this.expando];if(a){if(i=this.events[a],t){for(var u,s,c,l,f=t.split(" "),d=f.length;d--;)if(l=i[o=f[d]]){if(n)for(r=l.length;r--;)l[r].func===n&&(u=l.nativeHandler,s=l.fakeName,c=l.capture,(l=l.slice(0,r).concat(l.slice(r+1))).nativeHandler=u,l.fakeName=s,l.capture=c,i[o]=l);n&&0!==l.length||(delete i[o],pn(e,l.fakeName||o,l.nativeHandler,l.capture))}}else j(i,function(t,n){pn(e,t.fakeName||n,t.nativeHandler,t.capture)}),i={};for(o in i)if(tp(i,o))return this;delete this.events[a];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this},vn.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;for(var o=hn({type:t,target:e},n);(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},vn.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),(e=e.getElementsByTagName?e:e.document)&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},vn.prototype.destroy=function(){this.events={}},vn.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},vn.prototype.executeHandlers=function(e,t){var n=this.events[t],r=n&&n[e.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}},vn.Event=new vn,vn),zv="sizzle"+-new Date,Hv=window.document,jv=0,Vv=0,qv=yn(),$v=yn(),Wv=yn(),Kv=function(e,t){return e===t&&(Dh=!0),0},Xv="undefined",Yv={}.hasOwnProperty,Gv=[],Jv=Gv.pop,Qv=Gv.push,Zv=Gv.push,eb=Gv.slice,tb=Gv.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},nb="[\\x20\\t\\r\\n\\f]",rb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ob="\\["+nb+"*("+rb+")(?:"+nb+"*([*^$|!~]?=)"+nb+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rb+"))|)"+nb+"*\\]",ib=":("+rb+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ob+")*)|.*)\\)|)",ab=new RegExp("^"+nb+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nb+"+$","g"),ub=new RegExp("^"+nb+"*,"+nb+"*"),sb=new RegExp("^"+nb+"*([>+~]|"+nb+")"+nb+"*"),cb=new RegExp("="+nb+"*([^\\]'\"]*?)"+nb+"*\\]","g"),lb=new RegExp(ib),fb=new RegExp("^"+rb+"$"),db={ID:new RegExp("^#("+rb+")"),CLASS:new RegExp("^\\.("+rb+")"),TAG:new RegExp("^("+rb+"|[*])"),ATTR:new RegExp("^"+ob),PSEUDO:new RegExp("^"+ib),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nb+"*(even|odd|(([+-]|)(\\d*)n|)"+nb+"*(?:([+-]|)"+nb+"*(\\d+)|))"+nb+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+nb+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nb+"*((?:-\\d)?\\d*)"+nb+"*\\)|)(?=[^-]|$)","i")},mb=/^(?:input|select|textarea|button)$/i,gb=/^h\d$/i,pb=/^[^{]+\{\s*\[native \w/,hb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,vb=/[+~]/,bb=/'|\\/g,yb=new RegExp("\\\\([\\da-f]{1,6}"+nb+"?|("+nb+")|.)","ig");try{Zv.apply(Gv=eb.call(Hv.childNodes),Hv.childNodes),Gv[Hv.childNodes.length].nodeType}catch(r){Zv={apply:Gv.length?function(e,t){Qv.apply(e,eb.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Cb=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:Hv)!==Oh&&Th(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Oh).nodeType)&&9!==u)return[];if(Ph&&!r){if(o=hb.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Mh(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return Zv.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&xh.getElementsByClassName)return Zv.apply(n,t.getElementsByClassName(a)),n}if(xh.qsa&&(!Lh||!Lh.test(e))){if(f=l=zv,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=kh(e),(l=t.getAttribute("id"))?f=l.replace(bb,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+kn(c[s]);d=vb.test(e)&&Sn(t.parentNode)||t,m=c.join(",")}if(m)try{return Zv.apply(n,d.querySelectorAll(m)),n}catch(e){}finally{l||t.removeAttribute("id")}}}return _h(e.replace(ab,"$1"),t,n,r)};xh=Cb.support={},Eh=Cb.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Th=Cb.setDocument=function(e){var t,n=e?e.ownerDocument||e:Hv,r=n.defaultView;return n!==Oh&&9===n.nodeType&&n.documentElement?(Bh=(Oh=n).documentElement,Ph=!Eh(n),r&&r!==function(e){try{return e.top}catch(e){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",function(){Th()},!1):r.attachEvent&&r.attachEvent("onunload",function(){Th()})),xh.attributes=!0,xh.getElementsByTagName=!0,xh.getElementsByClassName=pb.test(n.getElementsByClassName),xh.getById=!0,wh.find.ID=function(e,t){if(typeof t.getElementById!=Xv&&Ph){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},wh.filter.ID=function(e){var t=e.replace(yb,bn);return function(e){return e.getAttribute("id")===t}},wh.find.TAG=xh.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=Xv)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},wh.find.CLASS=xh.getElementsByClassName&&function(e,t){if(Ph)return t.getElementsByClassName(e)},Ih=[],Lh=[],xh.disconnectedMatch=!0,Lh=Lh.length&&new RegExp(Lh.join("|")),Ih=Ih.length&&new RegExp(Ih.join("|")),t=pb.test(Bh.compareDocumentPosition),Mh=t||pb.test(Bh.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Kv=t?function(e,t){return e===t?(Dh=!0,0):(r=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!xh.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===Hv&&Mh(Hv,e)?-1:t===n||t.ownerDocument===Hv&&Mh(Hv,t)?1:Rh?tb.call(Rh,e)-tb.call(Rh,t):0:4&r?-1:1);var r}:function(e,t){if(e===t)return Dh=!0,0;var r,o=0,i=e.parentNode,a=t.parentNode,u=[e],s=[t];if(!i||!a)return e===n?-1:t===n?1:i?-1:a?1:Rh?tb.call(Rh,e)-tb.call(Rh,t):0;if(i===a)return xn(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)s.unshift(r);for(;u[o]===s[o];)o++;return o?xn(u[o],s[o]):u[o]===Hv?-1:s[o]===Hv?1:0},n):Oh},Cb.matches=function(e,t){return Cb(e,null,null,t)},Cb.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Oh&&Th(e),t=t.replace(cb,"='$1']"),xh.matchesSelector&&Ph&&(!Ih||!Ih.test(t))&&(!Lh||!Lh.test(t)))try{var n=(void 0).call(e,t);if(n||xh.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<Cb(t,Oh,null,[e]).length},Cb.contains=function(e,t){return(e.ownerDocument||e)!==Oh&&Th(e),Mh(e,t)},Cb.attr=function(e,t){(e.ownerDocument||e)!==Oh&&Th(e);var n=wh.attrHandle[t.toLowerCase()],r=n&&Yv.call(wh.attrHandle,t.toLowerCase())?n(e,t,!Ph):void 0;return void 0!==r?r:xh.attributes||!Ph?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Cb.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Cb.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Dh=!xh.detectDuplicates,Rh=!xh.sortStable&&e.slice(0),e.sort(Kv),Dh){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Rh=null,e
169
+ },Sh=Cb.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Sh(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Sh(t);return n},(wh=Cb.selectors={cacheLength:50,createPseudo:Cn,match:db,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(yb,bn),e[3]=(e[3]||e[4]||e[5]||"").replace(yb,bn),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Cb.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Cb.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return db.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&lb.test(n)&&(t=kh(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(yb,bn).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=qv[e+" "];return t||(t=new RegExp("(^|"+nb+")"+e+"("+nb+"|$)"))&&qv(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=Xv&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=Cb.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&-1<o.indexOf(n):"$="===t?n&&o.slice(-n.length)===n:"~="===t?-1<(" "+o+" ").indexOf(n):"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,m,g,p=i!=a?"nextSibling":"previousSibling",h=t.parentNode,v=u&&t.nodeName.toLowerCase(),b=!s&&!u;if(h){if(i){for(;p;){for(f=t;f=f[p];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=p="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?h.firstChild:h.lastChild],a&&b){for(m=(c=(l=h[zv]||(h[zv]={}))[e]||[])[0]===jv&&c[1],d=c[0]===jv&&c[2],f=m&&h.childNodes[m];f=++m&&f&&f[p]||(d=m=0)||g.pop();)if(1===f.nodeType&&++d&&f===t){l[e]=[jv,m,d];break}}else if(b&&(c=(t[zv]||(t[zv]={}))[e])&&c[0]===jv)d=c[1];else for(;(f=++m&&f&&f[p]||(d=m=0)||g.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[zv]||(f[zv]={}))[e]=[jv,d]),f!==t)););return(d-=o)===r||d%r==0&&0<=d/r}}},PSEUDO:function(e,t){var n,r=wh.pseudos[e]||wh.setFilters[e.toLowerCase()]||Cb.error("unsupported pseudo: "+e);return r[zv]?r(t):1<r.length?(n=[e,e,"",t],wh.setFilters.hasOwnProperty(e.toLowerCase())?Cn(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=tb.call(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:Cn(function(e){var t=[],n=[],r=Nh(e.replace(ab,"$1"));return r[zv]?Cn(function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:Cn(function(e){return function(t){return 0<Cb(e,t).length}}),contains:Cn(function(e){return e=e.replace(yb,bn),function(t){return-1<(t.textContent||t.innerText||Sh(t)).indexOf(e)}}),lang:Cn(function(e){return fb.test(e||"")||Cb.error("unsupported lang: "+e),e=e.replace(yb,bn).toLowerCase(),function(t){var n;do{if(n=Ph?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Bh},focus:function(e){return e===Oh.activeElement&&(!Oh.hasFocus||Oh.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!wh.pseudos.empty(e)},header:function(e){return gb.test(e.nodeName)},input:function(e){return mb.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:wn(function(){return[0]}),last:wn(function(e,t){return[t-1]}),eq:wn(function(e,t,n){return[n<0?n+t:n]}),even:wn(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:wn(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:wn(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:wn(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=wh.pseudos.eq,E(["radio","checkbox","file","password","image"],function(e){var t;wh.pseudos[e]=(t=e,function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t})}),E(["submit","reset"],function(e){var t;wh.pseudos[e]=(t=e,function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t})}),En.prototype=wh.filters=wh.pseudos,wh.setFilters=new En,kh=Cb.tokenize=function(e,t){var n,r,o,i,a,u,s,c=$v[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=wh.preFilter;a;){for(i in n&&!(r=ub.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=sb.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ab," ")}),a=a.slice(n.length)),wh.filter)wh.filter.hasOwnProperty(i)&&(!(r=db[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?Cb.error(e):$v(e,u).slice(0)},Nh=Cb.compile=function(e,t){function n(e,t,n,r,s){var c,l,f,d=0,m="0",g=e&&[],p=[],h=Ah,v=e||u&&wh.find.TAG("*",s),b=jv+=null==h?1:Math.random()||.1,y=v.length;for(s&&(Ah=t!==Oh&&t);m!==y&&null!=(c=v[m]);m++){if(u&&c){for(l=0;f=o[l++];)if(f(c,t,n)){r.push(c);break}s&&(jv=b)}a&&((c=!f&&c)&&d--,e&&g.push(c))}if(d+=m,a&&m!==d){for(l=0;f=i[l++];)f(g,p,t,n);if(e){if(0<d)for(;m--;)g[m]||p[m]||(p[m]=Jv.call(r));p=An(p)}Zv.apply(r,p),s&&!e&&0<p.length&&1<d+i.length&&Cb.uniqueSort(r)}return s&&(jv=b,Ah=h),g}var r,o,i,a,u,s=[],c=[],l=Wv[e+" "];if(!l){for(r=(t=t||kh(e)).length;r--;)((l=function n(e){for(var t,r,o,i=e.length,a=wh.relative[e[0].type],u=a||wh.relative[" "],s=a?1:0,c=Nn(function(e){return e===t},u,!0),l=Nn(function(e){return-1<tb.call(t,e)},u,!0),f=[function(e,n,r){var o=!a&&(r||n!==Ah)||((t=n).nodeType?c:l)(e,n,r);return t=null,o}];s<i;s++)if(r=wh.relative[e[s].type])f=[Nn(_n(f),r)];else{if((r=wh.filter[e[s].type].apply(null,e[s].matches))[zv]){for(o=++s;o<i&&!wh.relative[e[o].type];o++);return function t(e,n,r,o,i,a){return o&&!o[zv]&&(o=t(o)),i&&!i[zv]&&(i=t(i,a)),Cn(function(t,a,u,s){var c,l,f,d=[],m=[],g=a.length,p=t||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Cb(e,t[r],n);return n}(n||"*",u.nodeType?[u]:u,[]),h=!e||!t&&n?p:An(p,d,e,u,s),v=r?i||(t?e:g||o)?[]:a:h;if(r&&r(h,v,u,s),o)for(c=An(v,m),o(c,[],u,s),l=c.length;l--;)(f=c[l])&&(v[m[l]]=!(h[m[l]]=f));if(t){if(i||e){if(i){for(c=[],l=v.length;l--;)(f=v[l])&&c.push(h[l]=f);i(null,v=[],c,s)}for(l=v.length;l--;)(f=v[l])&&-1<(c=i?tb.call(t,f):d[l])&&(t[c]=!(a[c]=f))}}else v=An(v===a?v.splice(g,v.length):v),i?i(null,a,v,s):Zv.apply(a,v)})}(1<s&&_n(f),1<s&&kn(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ab,"$1"),r,s<o&&n(e.slice(s,o)),o<i&&n(e=e.slice(o)),o<i&&kn(e))}f.push(r)}return _n(f)}(t[r]))[zv]?s:c).push(l);(l=Wv(e,(o=c,a=0<(i=s).length,u=0<o.length,a?Cn(n):n))).selector=e}return l},_h=Cb.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&kh(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&xh.getById&&9===t.nodeType&&Ph&&wh.relative[i[1].type]){if(!(t=(wh.find.ID(a.matches[0].replace(yb,bn),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=db.needsContext.test(e)?0:i.length;o--&&(a=i[o],!wh.relative[u=a.type]);)if((s=wh.find[u])&&(r=s(a.matches[0].replace(yb,bn),vb.test(i[0].type)&&Sn(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&kn(i)))return Zv.apply(n,r),n;break}}return(c||Nh(e,l))(r,t,!Ph,n,vb.test(e)&&Sn(t.parentNode)||t),n},xh.sortStable=zv.split("").sort(Kv).join("")===zv,xh.detectDuplicates=!!Dh,Th(),xh.sortDetached=!0;var xb=document,wb=Array.prototype.push,Sb=Array.prototype.slice,Eb=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,kb=Uv.Event,Nb=Pp.makeMap("children,contents,next,prev"),_b=function(e,t,n,r){var o;if(Dn(t))t=Tn(t,Lb(e[0]));else if(t.length&&!t.nodeType){if(t=Ib.makeArray(t),r)for(o=t.length-1;0<=o;o--)_b(e,t[o],n,r);else for(o=0;o<t.length;o++)_b(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},Ab=Pp.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Rb=Pp.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),Db={"for":"htmlFor","class":"className",readonly:"readOnly"},Tb={float:"cssFloat"},Ob={},Bb={},Pb=/^\s*|\s*$/g,Lb=function(e){return e?9===e.nodeType?e:e.ownerDocument:xb};Pn.fn=Pn.prototype={constructor:Pn,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return Ib(e).attr(t);o.context=t=document}if(Dn(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Eb.exec(e)))return Ib(t).find(e);if(n[1])for(r=Tn(e,Lb(t)).firstChild;r;)wb.call(o,r),r=r.nextSibling;else{if(!(r=Lb(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Pp.toArray(this)},add:function(e,t){var n,r;if(Dn(e))return this.add(Ib(e));if(!1!==t)for(n=Ib.unique(this.toArray().concat(Ib.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else wb.apply(this,Ib.makeArray(e));return this},attr:function(e,t){var n,r=this;if("object"==typeof e)In(e,function(e,t){r.attr(e,t)});else{if(!Rn(t)){if(r[0]&&1===r[0].nodeType){if((n=Ob[e])&&n.get)return n.get(r[0],e);if(Rb[e])return r.prop(e)?e:void 0;null===(t=r[0].getAttribute(e,2))&&(t=void 0)}return t}this.each(function(){var n;1===this.nodeType&&((n=Ob[e])&&n.set?n.set(this,t):null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2))})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=Db[e]||e))In(e,function(e,t){n.prop(e,t)});else{if(!Rn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var o,i,a=this;if("object"==typeof e)In(e,function(e,t){a.css(e,t)});else if(Rn(t))e=n(e),"number"!=typeof t||Ab[e]||(t=t.toString()+"px"),a.each(function(){var n=this.style;if((i=Bb[e])&&i.set)i.set(this,t);else{try{this.style[Tb[e]||e]=t}catch(n){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))}});else{if(o=a[0],(i=Bb[e])&&i.get)return i.get(o);if(!o.ownerDocument.defaultView)return o.currentStyle?o.currentStyle[n(e)]:"";try{return o.ownerDocument.defaultView.getComputedStyle(o,null).getPropertyValue(r(e))}catch(n){return}}return a},remove:function(){for(var e,t=this.length;t--;)e=this[t],kb.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t;if(Rn(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(r){Ib(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(Rn(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return _b(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return _b(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?_b(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?_b(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return Ib(e).append(this),this},prependTo:function(e){return Ib(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Bn(this,e)},wrapAll:function(e){return Bn(this,e,!0)},wrapInner:function(e){return this.each(function(){Ib(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){Ib(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),Ib(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e||(-1!==e.indexOf(" ")?In(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var o,i=On(r,e);i!==t&&(o=r.className,i?r.className=Ln((" "+o+" ").replace(" "+e+" "," ")):r.className+=o?" "+e:e)})),n},hasClass:function(e){return On(this[0],e)},each:function(e){return In(this,e)},on:function(e,t){return this.each(function(){kb.bind(this,e,t)})},off:function(e,t){return this.each(function(){kb.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?kb.fire(this,e.type,e):kb.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return Ib(Sb.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){for(var t=[],n=0,r=this.length;n<r;n++)Ib.find(e,this[n],t);return Ib(t)},filter:function(e){return Ib("function"==typeof e?Mn(this.toArray(),function(t,n){return e(n,t)}):Ib.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof Ib&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&Ib(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}}),Ib(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:wb,sort:Array.prototype.sort,splice:Array.prototype.splice},Pp.extend(Pn,{extend:Pp.extend,makeArray:function(e){return e&&e===e.window||e.nodeType?[e]:Pp.toArray(e)},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Pp.isArray,each:In,trim:Ln,grep:Mn,find:Cb,expr:Cb.selectors,unique:Cb.uniqueSort,text:Cb.getText,contains:Cb.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return 1===t.length?Ib.find.matchesSelector(t[0],e)?[t[0]]:[]:Ib.find.matches(e,t)}}),In({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Fn(e,"parentNode")},next:function(e){return zn(e,"nextSibling",1)},prev:function(e){return zn(e,"previousSibling",1)},children:function(e){return Un(e.firstChild,"nextSibling",1)},contents:function(e){return Pp.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){Pn.fn[e]=function(n){var r=[];this.each(function(){var e=t.call(r,this,n,r);e&&(Ib.isArray(e)?r.push.apply(r,e):r.push(e))}),1<this.length&&(Nb[e]||(r=Ib.unique(r)),0===e.indexOf("parents")&&(r=r.reverse()));var o=Ib(r);return n?o.filter(n):o}}),In({parentsUntil:function(e,t){return Fn(e,"parentNode",t)},nextUntil:function(e,t){return Un(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Un(e,"previousSibling",1,t).slice(1)}},function(e,t){Pn.fn[e]=function(n,r){var o=[];this.each(function(){var e=t.call(o,this,n,o);e&&(Ib.isArray(e)?o.push.apply(o,e):o.push(e))}),1<this.length&&(o=Ib.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse()));var i=Ib(o);return r?i.filter(r):i}}),Pn.fn.is=function(e){return!!e&&0<this.filter(e).length},Pn.fn.init.prototype=Pn.fn,Pn.overrideDefaults=function(e){var t,n=function(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o=o||t.context,new n.fn.init(r,o)};return Ib.extend(n,this),n},Pn.attrHooks=Ob,Pn.cssHooks=Bb;var Ib=Pn,Mb=Pp.each,Fb=Pp.grep,Ub=Tp.ie,zb=/^([a-z0-9],?)+$/i,Hb=function(e,t){function n(t){return t&&e&&Lg(t)?e.getElementById(t):t}function r(e){return W("string"==typeof e?n(e):e)}function o(e,t,n){var o,i,a=r(e);return void 0===(i=a.length?(o=Q[t])&&o.get?o.get(a,t):a.attr(t):i)?n||"":i}function i(e){var t=n(e);return t?t.attributes:[]}function u(e,n,o){""===o&&(o=null);var i,a=r(e),u=a.attr(n);a.length&&((i=Q[n])&&i.set?i.set(a,o,n):a.attr(n,o),u!==o&&t.onSetAttrib&&t.onSetAttrib({attrElm:a,attrName:n,attrValue:o}))}function c(){return t.root_element||e.body}function l(t,r){return function(e,t,n){var r,o=0,i=0,a=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ht(Lp.fromDom(e),"position")){var u=t.getBoundingClientRect();return{x:o=u.left+(a.documentElement.scrollLeft||e.scrollLeft)-a.documentElement.clientLeft,y:i=u.top+(a.documentElement.scrollTop||e.scrollTop)-a.documentElement.clientTop}}for(var s=t;s&&s!==n&&s.nodeType&&!Ct(s,n);){var c=s;o+=c.offsetLeft||0,i+=c.offsetTop||0,s=c.offsetParent}for(s=t.parentNode;s&&s!==n&&s.nodeType&&!Ct(s,n);)o-=s.scrollLeft||0,i-=s.scrollTop||0,s=s.parentNode;i+=(r=Lp.fromDom(t),ch.isFirefox()&&"table"===we(r)?yt(zp(r)).filter(function(e){return"caption"===we(e)}).bind(function(e){return yt(Oe(e)).map(function(t){var n=t.dom.offsetTop,r=e.dom.offsetTop,o=e.dom.offsetHeight;return n<=r?-o:0})}).getOr(0):0)}return{x:o,y:i}}(e.body,n(t),r)}function d(e,t,n){var o=r(e);return n?o.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=Tp.browser.isIE()?"styleFloat":"cssFloat"),o[0]&&o[0].style?o[0].style[t]:void 0)}function m(e){var t=d(e=n(e),"width"),r=d(e,"height");return-1===t.indexOf("px")&&(t=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}}function g(e,t){if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(zb.test(t)){for(var n=t.toLowerCase().split(/,/),r=e.nodeName.toLowerCase(),o=n.length-1;0<=o;o--)if(n[o]===r)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Cb(t,i[0].ownerDocument||i[0],null,i).length}function p(e,t,r,o){var i,u=[],s=n(e);for(o=void 0===o,r=r||("BODY"!==c().nodeName?c().parentNode:null),Pp.is(t,"string")&&(t="*"===(i=t)?function(e){return 1===e.nodeType}:function(e){return g(e,i)});s&&!(s===r||a(s.nodeType)||eh(s)||th(s));){if(!t||"function"==typeof t&&t(s)){if(!o)return[s];u.push(s)}s=s.parentNode}return o?u:null}function h(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return g(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null}function v(e,t,r){var o,i="string"==typeof e?n(e):e;return!!i&&(Pp.isArray(i)&&(i.length||0===i.length)?(o=[],Mb(i,function(e,i){e&&o.push(t.call(r,"string"==typeof e?n(e):e,i))}),o):t.call(r||this,i))}function b(e,t){r(e).each(function(e,n){Mb(t,function(e,t){u(n,t,e)})})}function y(e,t){var n=r(e);Ub?n.each(function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(e){Ib("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}}):n.html(t)}function C(t,n,r,o,i){return v(t,function(t){var a="string"==typeof n?e.createElement(n):n;return b(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&y(a,o)),i?a:t.appendChild(a)})}function x(t,n,r){return C(e.createElement(t),t,n,r,!0)}function w(e,t){var n=r(e);return(t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}):n).remove(),1<n.length?n.toArray():n[0]}function S(e,t,n){r(e).toggleClass(t,n).each(function(){""===this.className&&Ib(this).attr("class",null)})}function k(e,t,n){return v(t,function(t){return Pp.is(t,"array")&&(e=e.cloneNode(!0)),n&&Mb(Fb(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})}function N(e){if(Gp(e)){var t="a"===e.nodeName.toLowerCase()&&!o(e,"href")&&o(e,"id");return o(e,"name")||o(e,"data-mce-bookmark")||t?1:void 0}}function _(){return e.createRange()}function A(e){if(e&&Gp(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null}void 0===t&&(t={});var R,D,T,O,B,P,L={},I=window,M={},F=0,U=Hh.forElement(Lp.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),z=[],H=t.schema||cn({}),V=fn({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),q=t.ownEvents?new Uv:Uv.Event,$=H.getBlockElements(),W=Ib.overrideDefaults(function(){return{context:e,element:J.getRoot()}}),K=Rv.encodeAllRaw,Y=function(n,r,o,i){if(Pp.isArray(n)){for(var a=n.length,u=[];a--;)u[a]=Y(n[a],r,o,i);return u}return!t.collect||n!==e&&n!==I||z.push([n,r,o,i]),q.bind(n,r,o,i||J)},G=function(t,n,r){if(Pp.isArray(t)){for(var o=t.length,i=[];o--;)i[o]=G(t[o],n,r);return i}if(0<z.length&&(t===e||t===I))for(o=z.length;o--;){var a=z[o];t!==a[0]||n&&n!==a[1]||r&&r!==a[2]||q.unbind(a[0],a[1],a[2])}return q.unbind(t,n,r)},J={doc:e,settings:t,win:I,files:M,stdMode:!0,boxModel:!0,styleSheetLoader:U,boundEvents:z,styles:V,schema:H,events:q,isBlock:function(e){if("string"==typeof e)return!!$[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!$[e.nodeName])}return!1},$:W,$$:r,root:null,clone:function(t,n){if(!Ub||1!==t.nodeType||n)return t.cloneNode(n);var r=e.createElement(t.nodeName);return Mb(i(t),function(e){u(r,e.nodeName,o(t,e.nodeName))}),r},getRoot:c,getViewPort:function(e){var t=Je(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:function(e){var t=l(e=n(e)),r=m(e);return{x:t.x,y:t.y,w:r.w,h:r.h}},getSize:m,getParent:function(e,t,n){var r=p(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:p,get:n,getNext:function(e,t){return h(e,t,"nextSibling")},getPrev:function(e,t){return h(e,t,"previousSibling")},select:function(r,o){return Cb(r,n(o)||t.root_element||e,[])},is:g,add:C,create:x,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)X(t,r)&&(o+=" "+r+'="'+K(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(t){var n,r=e.createElement("div"),o=e.createDocumentFragment();for(o.appendChild(r),t&&(r.innerHTML=t);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},remove:w,setStyle:function(e,n,o){var i=Lg(n)?r(e).css(n,o):r(e).css(n);t.update_styles&&Hn(V,i)},getStyle:d,setStyles:function(e,n){var o=r(e).css(n);t.update_styles&&Hn(V,o)},removeAllAttribs:function(e){return v(e,function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--)e.removeAttributeNode(t.item(n))})},setAttrib:u,setAttribs:b,getAttrib:o,getPos:l,parseStyle:function(e){return V.parse(e)},serializeStyle:function(e,t){return V.serialize(e,t)},addStyle:function(t){var n,r;if(J!==Hb.DOM&&e===document){if(L[t])return;L[t]=!0}(r=e.getElementById("mceDefaultStyles"))||((r=e.createElement("style")).id="mceDefaultStyles",r.type="text/css",(n=e.getElementsByTagName("head")[0]).firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)),r.styleSheet?r.styleSheet.cssText+=t:r.appendChild(e.createTextNode(t))},loadCSS:function(e){E((e=e||"").split(","),function(e){M[e]=!0,U.load(e,s)})},addClass:function(e,t){r(e).addClass(t)},removeClass:function(e,t){S(e,t,!1)},hasClass:function(e,t){return r(e).hasClass(t)},toggleClass:S,show:function(e){r(e).show()},hide:function(e){r(e).hide()},isHidden:function(e){return"none"===r(e).css("display")},uniqueId:function(e){return(e||"mce_")+F++},setHTML:y,getOuterHTML:function(e){var t="string"==typeof e?n(e):e;return Gp(t)?t.outerHTML:Ib("<div></div>").append(Ib(t).clone()).html()},setOuterHTML:function(e,t){r(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}w(Ib(this).html(t),!0)})},decode:Rv.decode,encode:K,insertAfter:function(e,t){var r=n(t);return v(e,function(e){var t=r.parentNode,n=r.nextSibling;return n?t.insertBefore(e,n):t.appendChild(e),e})},replace:k,rename:function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=x(t),Mb(i(e),function(t){u(n,t.nodeName,o(e,t.nodeName))}),k(n,e,!0)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return V.toHex(Pp.trim(e))},run:v,getAttribs:i,isEmpty:function(e,t){var n,r,o=0;if(N(e))return!1;if(e=e.firstChild){var i=new jh(e,e.parentNode),a=H?H.getWhiteSpaceElements():{};t=t||(H?H.getNonEmptyElements():null);do{if(n=e.nodeType,Gp(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=i.next("all"===u);continue}if(r=e.nodeName.toLowerCase(),t&&t[r]){if("br"!==r)return!1;o++,e=i.next();continue}if(N(e))return!1}if(8===n)return!1;if(3===n&&!Yt(e.nodeValue))return!1;if(3===n&&e.parentNode&&a[e.parentNode.nodeName]&&Yt(e.nodeValue))return!1;e=i.next()}while(e)}return o<=1},createRng:_,nodeIndex:jn,split:function(e,t,n){var r,o,i,a=_();if(e&&t)return a.setStart(e.parentNode,jn(e)),a.setEnd(t.parentNode,jn(t)),r=a.extractContents(),(a=_()).setStart(t.parentNode,jn(t)+1),a.setEnd(e.parentNode,jn(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(yv(J,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(yv(J,o),e),w(e),n||t},bind:Y,unbind:G,fire:function(e,t,n){return q.fire(e,t,n)},getContentEditable:A,getContentEditableParent:function(e){for(var t=c(),n=null;e&&e!==t&&null===(n=A(e));e=e.parentNode);return n},destroy:function(){if(0<z.length)for(var e=z.length;e--;){var t=z[e];q.unbind(t[0],t[1],t[2])}j(M,function(e,t){U.unload(t),delete M[t]}),Cb.setDocument&&Cb.setDocument()},isChildOf:function(e,t){if(Ub){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}return e===t||t.contains(e)},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}},Q=(R=V,T=f(J),B={set:function(e,t,n){D.url_converter&&null!==t&&(t=D.url_converter.call(D.url_converter_scope||T(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},P={style:{set:function(e,t){null===t||"object"!=typeof t?(O&&e.attr("data-mce-style",t),null!==t&&"string"==typeof t?(e.removeAttr("style"),e.css(R.parse(t))):e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return R.serialize(R.parse(t),e[0].nodeName)}}},(O=(D=t).keep_values)&&(P.href=P.src=B),P);return J};Hb.DOM=Hb(document),Hb.nodeIndex=jn;var jb=Hb.DOM,Vb=Pp.each,qb=Pp.grep,$b=(Vn.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Vn.prototype.loadScript=function(e,t,n){function r(){o.remove(i),a&&(a.onerror=a.onload=a=null)}var o=jb,i=o.uniqueId(),a=document.createElement("script");a.id=i,a.type="text/javascript",a.src=Pp._addCacheSuffix(e),this.settings.referrerPolicy&&o.setAttrib(a,"referrerpolicy",this.settings.referrerPolicy),a.onload=function(){r(),t()},a.onerror=function(){r(),Hg(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(a)},Vn.prototype.isDone=function(e){return 2===this.states[e]},Vn.prototype.markDone=function(e){this.states[e]=2},Vn.prototype.add=function(e,t,n,r){var o=this.states[e];this.queue.push(e),void 0===o&&(this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Vn.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Vn.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Vn.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Vn.prototype.loadScripts=function(e,t,n,r){function o(e,t){Vb(i.scriptLoadedCallbacks[t],function(t){Hg(t[e])&&t[e].call(t.scope)}),i.scriptLoadedCallbacks[t]=void 0}var i=this,a=[];i.queueLoadedCallbacks.push({success:t,failure:r,scope:n||this});var u=function(){var t,n=qb(e);e.length=0,Vb(n,function(e){2!==i.states[e]?3!==i.states[e]?1!==i.states[e]&&(i.states[e]=1,i.loading++,i.loadScript(e,function(){i.states[e]=2,i.loading--,o("success",e),u()},function(){i.states[e]=3,i.loading--,a.push(e),o("failure",e),u()})):o("failure",e):o("success",e)}),i.loading||(t=i.queueLoadedCallbacks.slice(0),i.queueLoadedCallbacks.length=0,Vb(t,function(e){0===a.length?Hg(e.success)&&e.success.call(e.scope):Hg(e.failure)&&e.failure.call(e.scope,a)}))};u()},Vn.ScriptLoader=new Vn,Vn),Wb={},Kb=qn("en"),Xb={getData:function(){return V(Wb,function(e){return rp({},e)})},setCode:function(e){e&&Kb.set(e)},getCode:function(){return Kb.get()},add:function(e,t){var n=Wb[e];n||(Wb[e]=n={}),j(t,function(e,t){n[t.toLowerCase()]=e})},translate:function(e){function t(e){return Hg(e)?Object.prototype.toString.call(e):u(e)?"":""+e}function n(e){var n=t(e);return K(a,n.toLowerCase()).map(t).getOr(n)}function r(e){return e.replace(/{context:\w+}$/,"")}var o,i,a=$n().getOr({}),u=function(e){return""===e||null==e};if(u(e))return"";if(Ig(o=e)&&tp(o,"raw"))return t(e.raw);if(Mg(i=e)&&1<i.length){var s=e.slice(1);return r(n(e[0]).replace(/\{([0-9]+)\}/g,function(e,n){return tp(s,n)?t(s[n]):e}))}return r(n(e))},isRtl:function(){return $n().bind(function(e){return K(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return tp(Wb,e)}},Yb=function(){function e(e,t){E(_(u,function(n){return n.name===e&&n.state===t}),function(e){return e.callback()})}function t(e){var t;return(a[e]?a[e].dependencies:t)||[]}function n(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}}function r(e,t,n){void 0===n&&(n="added"),tp(a,e)&&"added"===n||tp(i,e)&&"loaded"===n?t():u.push({name:e,state:n,callback:t})}var o=[],i={},a={},u=[],s=function(r,o,u,c,l){var f,d;i[r]||(0!==(f="string"==typeof o?o:o.prefix+o.resource+o.suffix).indexOf("/")&&-1===f.indexOf("://")&&(f=Yb.baseURL+"/"+f),i[r]=f.substring(0,f.lastIndexOf("/")),d=function(){var i,a,l;e(r,"loaded"),i=o,a=u,l=c,E(t(r),function(e){var t=n(i,e);s(t.resource,t,void 0,void 0)}),a&&(l?a.call(l):a.call($b))},a[r]?d():$b.ScriptLoader.add(f,d,c,l))};return{items:o,urls:i,lookup:a,_listeners:u,get:function(e){if(a[e])return a[e].instance},dependencies:t,requireLangPack:function(e,t){!1!==Yb.languageLoad&&r(e,function(){var n=Xb.getCode();!n||t&&-1===(","+(t||"")+",").indexOf(","+n+",")||$b.ScriptLoader.add(i[e]+"/langs/"+n+".js")},"loaded")},add:function(t,n,r){var i=n;return o.push(i),a[t]={instance:i,dependencies:r},e(t,"added"),i},remove:function(e){delete i[e],delete a[e]},createUrl:n,addComponents:function(e,t){var n=i[e];E(t,function(e){$b.ScriptLoader.add(n+"/"+e)})},load:s,waitFor:r}};Yb.languageLoad=!0,Yb.baseURL="",Yb.PluginManager=Yb(),Yb.ThemeManager=Yb();var Gb=function(e,t){var n=[];return E(zp(e),function(e){n=(n=t(e)?n.concat([e]):n).concat(Gb(e,t))}),n},Jb=f("mce-annotation"),Qb=f("data-mce-annotation"),Zb=f("data-mce-annotation-uid"),ey=function(e,t){return Zn(Lp.fromDom(e.getBody()),"["+Zb()+'="'+t+'"]')
170
+ },ty=0,ny=Math.round,ry=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),oy=Gp,iy=Kt,ay=tt("display","block table"),uy=tt("float","left right"),sy=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}(oy,iy,p(uy)),cy=p(tt("white-space","pre pre-line pre-wrap")),ly=Qp,fy=nh,dy=Hb.nodeIndex,my=function(e,t){if(!(t<0&&Gp(e)&&e.hasChildNodes()))return hr(e,t)},gy=function(e){var t=e.getClientRects(),n=0<t.length?cr(t[0]):cr(e.getBoundingClientRect());return!Cr(e)&&fy(e)&&wr(n)?function(e){var t=e.ownerDocument,n=br(t),r=t.createTextNode(Qh),o=e.parentNode;o.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=cr(n.getBoundingClientRect());return o.removeChild(r),i}(e):wr(n)&&Cr(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Qp(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),gy(i)}return null}(e):n},py=function(e,t,n){function r(){return n=n||function(e){function t(e){var t;0!==e.height&&(0<r.length&&(t=r[r.length-1],e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right)||r.push(e))}function n(e,n){var o=br(e.ownerDocument);if(n<e.data.length){if(vr(e.data[n]))return r;if(vr(e.data[n-1])&&(o.setStart(e,n),o.setEnd(e,n+1),!xr(o)))return t(Sr(gy(o),!1)),r}0<n&&(o.setStart(e,n-1),o.setEnd(e,n),xr(o)||t(Sr(gy(o),!1))),n<e.data.length&&(o.setStart(e,n),o.setEnd(e,n+1),xr(o)||t(Sr(gy(o),!0)))}var r=[],o=e.container(),i=e.offset();if(ly(o))return n(o,i),r;if(oy(o))if(e.isAtEnd()){var a=my(o,i);ly(a)&&n(a,a.data.length),sy(a)&&!fy(a)&&t(Sr(gy(a),!1))}else{if(a=my(o,i),ly(a)&&n(a,0),sy(a)&&e.isAtEnd())return t(Sr(gy(a),!1)),r;var u=my(e.container(),e.offset()-1);sy(u)&&!fy(u)&&(!ay(u)&&!ay(a)&&sy(a)||t(Sr(gy(u),!1))),sy(a)&&t(Sr(gy(a),!0))}return r}(py(e,t))}return{container:f(e),offset:f(t),toRange:function(){var n=br(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return ly(e),0===t},isAtEnd:function(){return ly(e)?t>=e.data.length:t>=e.childNodes.length},isEqual:function(n){return n&&e===n.container()&&t===n.offset()},getNode:function(n){return my(e,n?t-1:t)}}};py.fromRangeStart=function(e){return py(e.startContainer,e.startOffset)},py.fromRangeEnd=function(e){return py(e.endContainer,e.endOffset)},py.after=function(e){return py(e.parentNode,dy(e)+1)},py.before=function(e){return py(e.parentNode,dy(e))},py.isAbove=function(e,t){return ut(U(t.getClientRects()),z(e.getClientRects()),dr).getOr(!1)},py.isBelow=function(e,t){return ut(z(t.getClientRects()),U(e.getClientRects()),mr).getOr(!1)},py.isAtStart=function(e){return!!e&&e.isAtStart()},py.isAtEnd=function(e){return!!e&&e.isAtEnd()},py.isTextPosition=function(e){return!!e&&Qp(e.container())},py.isElementPosition=function(e){return!1===py.isTextPosition(e)};var hy,vy,by=Qp,yy=rt,Cy=Hb.nodeIndex,xy=function(e){var t=e.parentNode;return yy(t)?xy(t):t},wy=function(e){return e?Z(e.childNodes,function(e,t){return yy(t)&&"BR"!==t.nodeName?e=e.concat(wy(t)):e.push(t),e},[]):[]},Sy=ih,Ey=g(Lr,d,!0),ky=Hb.DOM,Ny=Gp,_y=Qp,Ay=function(e){Ny(e)&&Ht(e)&&(jt(e)?e.removeAttribute("data-mce-caret"):Zr(e)),_y(e)&&(to(e),0===e.data.length&&Zr(e))},Ry=wp().browser,Dy=ih,Ty=uh,Oy=ah,By=function(e){return Dy(e)||Ty(e)},Py=ih,Ly=uh,Iy=tt("display","block table table-cell table-caption list-item"),My=Ht,Fy=Ut,Uy=Gp,zy=Kt,Hy=g(po,!0),jy=g(po,!1);(vy=hy=hy||{})[vy.Backwards=-1]="Backwards",vy[vy.Forwards=1]="Forwards";var Vy,qy,$y,Wy=ih,Ky=Qp,Xy=Gp,Yy=nh,Gy=Kt,Jy=Xt,Qy=function(e,t,n){var r,o,i;if(!Xy(n)||!t)return null;if(t.isEqual(py.after(n))&&n.lastChild){if(i=py.after(n.lastChild),e<0&&Gy(n.lastChild)&&Xy(n.lastChild))return Yy(n.lastChild)?py.before(n.lastChild):i}else i=t;var a,u,s,c=i.container(),l=i.offset();if(Ky(c)){if(e<0&&0<l)return py(c,--l);if(0<e&&l<c.length)return py(c,++l);r=c}else{if(e<0&&0<l&&(f=So(c,l-1),Gy(f)))return!Di(f)&&(o=lo(f,e,Jy,f))?Ky(o)?py(o,o.data.length):py.after(o):Ky(f)?py(f,f.data.length):py.before(f);if(0<e&&l<c.childNodes.length&&(f=So(c,l),Gy(f)))return Yy(f)?(a=n,(s=(u=f).nextSibling)&&Gy(s)?Ky(s)?py(s,0):py.before(s):Qy(hy.Forwards,py.after(u),a)):!Di(f)&&(o=lo(f,e,Jy,f))?Ky(o)?py(o,0):py.before(o):Ky(f)?py(f,0):py.after(f);r=f||i.getNode()}if((0<e&&i.isAtEnd()||e<0&&i.isAtStart())&&(r=lo(r,e,qg,n,!0),Jy(r,n)))return Eo(e,r);var f=lo(r,e,Jy,n),d=te(_(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(c,n),Wy));return!d||f&&d.contains(f)?f?Eo(e,f):null:0<e?py.after(d):py.before(d)},Zy=function(e,t,n){var r=ko(t);return Kg.from(e?r.next(n):r.prev(n))},eC=function(e,t,n,r){return Ro(e,t,n).bind(function(n){return r(n)?eC(e,t,n,r):Kg.some(n)})},tC=g(Zy,!0),nC=g(Zy,!1),rC=g(Do,!0),oC=g(Do,!1),iC="_mce_caret",aC=function(e,t,n){return 2===t?Lr(tv,n,e):3===t?(o=(r=e).getRng(),{start:Ar(r.dom.getRoot(),py.fromRangeStart(o)),end:Ar(r.dom.getRoot(),py.fromRangeEnd(o))}):t?{rng:e.getRng()}:Mr(e,!1);var r,o},uC=(Vy=Qh,function(e){return Vy===e}),sC=function(e,t){return void 0===t&&(t=!1),!(!u(e)||!Qp(e))&&Yt(t?e.data.replace(/ /g,"\xa0"):e.data)},cC=zo,lC=Zo,fC=sC,dC=Wo,mC=function(e,t,n,r){var o=n.parentNode;return!u(n[r])&&(!(o!==t&&!a(o)&&!e.isBlock(o))||mC(e,t,o,r))},gC=function(e){return Pe(e).fold(f([e]),function(t){return[e].concat(gC(t))})},pC=function(e){return Le(e).fold(f([e]),function(t){return"br"===we(t)?Re(t).map(function(t){return[e].concat(pC(t))}).getOr([]):[e].concat(pC(t))})},hC=(qy=Mp,{get:function(e){if(!qy(e))throw new Error("Can only get text value of a text node");return $y(e).getOr("")},getOption:$y=function(e){return qy(e)?Kg.from(e.dom.nodeValue):Kg.none()},set:function(e,t){if(!qy(e))throw new Error("Can only set raw text value of a text node");e.dom.nodeValue=t}});Ri.isBookmarkNode=zo;var vC={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||vC.metaKeyPressed(e)},metaKeyPressed:function(e){return Tp.mac?e.metaKey:e.ctrlKey&&!e.altKey}},bC=ih;Xi.compareRanges=Ui,Xi.getCaretRangeFromPoint=Fi,Xi.getSelectedNode=pr,Xi.getNode=hr;var yC,CC,xC,wC=(yC="height",CC=function(e){var t=e.dom;return Wp(e)?t.getBoundingClientRect().height:t.offsetHeight},{set:function(e,t){if(!jg(t)&&!t.match(/^[0-9]+$/))throw new Error(yC+".set accepts only positive integer values. Value was "+t);var n=e.dom;st(n)&&(n.style[yC]=t+"px")},get:Yi,getOuter:Yi,aggregate:Gi,max:function(e,t,n){var r=Gi(e,n);return r<t?t-r:0}}),SC=function(e,t){return e.view(t).fold(f([]),function(t){var n=e.owner(t),r=SC(e,n);return[t].concat(r)})},EC=Object.freeze({__proto__:null,view:function(e){var t;return(e.dom===document?Kg.none():Kg.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(Lp.fromDom)},owner:Ne}),kC=function(e,t,n,r){var o=Lp.fromDom(e.getBody()),i=Lp.fromDom(e.getDoc());o.dom.offsetWidth;var a,u,s=(a=function(e,t){var n=zp(e);if(0===n.length||Ji(e))return{element:e,offset:t};if(t<n.length&&!Ji(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Ji(r)?{element:e,offset:t}:"img"===we(r)?{element:r,offset:1}:Mp(r)?{element:r,offset:ki(r).length}:{element:r,offset:zp(r).length}}(Lp.fromDom(n.startContainer),n.startOffset),u=Lp.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>'),ze(a.element,u),Qi(u,function(){return $p(u)}));ea(e,i,t,s,r),s.cleanup()},NC=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(Lp.fromDom(r),Lp.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},_C=St([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),AC=(_C.before,_C.on,_C.after,function(e){return e.fold(d,d,d)}),RC=St([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),DC={domRange:RC.domRange,relative:RC.relative,exact:RC.exact,exactFromRange:function(e){return RC.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){return _e(e.match({domRange:function(e){return Lp.fromDom(e.startContainer)},relative:function(e){return AC(e)},exact:function(e){return e}}))},range:function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}}},TC=wp().browser,OC={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},BC=Hb.DOM,PC=function(e){return e.editorManager.setActive(e)},LC={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},IC=(Ia.create=function(e,t){var n=new Ia(e,LC[e]||1);return t&&j(t,function(e,t){n.attr(t,e)}),n},Ia.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},Ia.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return null!=e&&j(e,function(e,t){r.attr(t,e)}),r;if(n=r.attributes){if(void 0===t)return n.map[e];if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),r}return r}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}},Ia.prototype.clone=function(){var e,t=new Ia(this.name,this.type);if(e=this.attributes){var n=[];n.map={};for(var r=0,o=e.length;r<o;r++){var i=e[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}t.attributes=n}return t.value=this.value,t.shortEnded=this.shortEnded,t},Ia.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},Ia.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},Ia.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},Ia.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},Ia.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},Ia.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=Pa(n,this))n.name===e&&t.push(n);return t},Ia.prototype.children=function(){for(var e=[],t=this.firstChild;t;t=t.next)e.push(t);return e},Ia.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=Pa(t,this))e.push(t);for(var n=e.length;n--;)(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}return this.firstChild=this.lastChild=null,this},Ia.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(La(this))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;if(La(r))return!1}if(8===r.type)return!1;if(3===r.type&&!function(e){if(Yt(e.value)){var t=e.parent;return!t||"span"===t.name&&!t.attr("style")||!/^[ ]+$/.test(e.value)}}(r))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&Yt(r.value))return!1;if(n&&n(r))return!1}while(r=Pa(r,this));return!0},Ia.prototype.walk=function(e){return Pa(this,null,e)},Ia),MC=Pp.each,FC=Pp.trim,UC="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),zC={ftp:21,http:80,https:443,mailto:25},HC=["img","video"],jC=(Fa.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return{type:t=r?r[1]:t,data:n[1]}},Fa.isDomSafe=function(e,t,n){if((n=void 0===n?{}:n).allow_script_urls)return!0;var r,o,i,a,s=Rv.decode(e).replace(/[\s\u0000-\u001F]+/g,"");try{s=decodeURIComponent(s)}catch(e){s=unescape(s)}return!(/((java|vb)script|mhtml):/i.test(s)||(o=s,i=t,!(r=n).allow_html_data_urls&&(/^data:image\//i.test(o)?(u(a=r.allow_svg_data_urls)?!a:!u(i)||!x(HC,i))&&/^data:image\/svg\+xml/i.test(o):/^data:/i.test(o))))},Fa.getDocumentBaseUrl=function(e){var t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname;return/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},Fa.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},Fa.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new Fa(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},Fa.prototype.toAbsolute=function(e,t){var n=new Fa(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},Fa.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=zC[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},Fa.prototype.toRelPath=function(e,t){var n,r,o=0,i="",a=e.substring(0,e.lastIndexOf("/")).split("/"),u=t.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return t;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},Fa.prototype.toAbsPath=function(e,t){var n,r,o=0,i=[],a=/\/$/.test(t)?"/":"",u=e.split("/"),s=t.split("/");for(MC(u,function(e){e&&i.push(e)}),u=i,n=s.length-1,i=[];0<=n;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?0<o?o--:i.push(s[n]):o++);return 0!==(r=(n=u.length-o)<=0?L(i).join("/"):u.slice(0,n).join("/")+"/"+L(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},Fa.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},Fa),VC=Pp.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),qC=re(function(){return document.implementation.createHTMLDocument("parser")}),$C=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&(u=n,/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(r.substr(u)))){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var u,s=a.exec(e);return s?s.index+s[0].length:r.length};za.findEndTag=Ua;var WC=Ha,KC=Pp.each,XC=Pp.makeMap,YC=new Set;E(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],function(e){YC.add(e)});var GC,JC=["font","text-decoration","text-emphasis"],QC=g(Wa,!0,Ho),ZC=g(Wa,!1,Ho),ex=Xa(!0,Ya),tx=Xa(!1,Ya),nx=Xa(!0,uh),rx=Xa(!1,uh),ox=Xa(!0,ot),ix=Xa(!1,ot),ax=Xa(!0,Ga),ux=Xa(!1,Ga),sx=g(ou,!1),cx=g(ou,!0),lx=g(ru,!1),fx=g(ru,!0),dx=g(au,!1),mx=g(au,!0),gx=St([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),px=function(e){var t;return(8===Se(t=e)||"#comment"===we(t)?Re:Le)(e).bind(px).orThunk(function(){return Kg.some(e)})},hx=function(e,t,n,r){void 0===r&&(r=!0),t.deleteContents();var o,i=px(n).getOr(n),a=Lp.fromDom(e.dom.getParent(i.dom,e.dom.isBlock));return Jt(a)&&(Ja(a),r&&e.selection.setCursorLocation(a.dom,0)),he(n,a)||E((at(Ae(a),n)?[]:Ae(o=a).map(zp).map(function(e){return _(e,function(e){return!he(o,e)})}).getOr([])).concat(zp(n)),function(e){he(e,a)||ve(e,a)||!Jt(e)||$p(e)}),!0},vx=function(e,t){return T(eu(t,e),function(e){return Ip(e)&&"caption"===we(e)})},bx=function(e,t){return Ja(t),e.selection.setCursorLocation(t.dom,0),Kg.some(!0)},yx=ah,Cx=function(e,t){t(e),e.firstChild&&Cx(e.firstChild,t),e.next&&Cx(e.next,t)},xx=Yo,wx=function(e,t,n,r,o){var i=e.formatter.get(n),a=e.dom;if(i&&t)for(var u=0;u<i.length;u++){var s=i[u];if(ps(e.dom,t,s)&&hs(a,t,s,"attributes",o,r)&&hs(a,t,s,"styles",o,r)){var c=s.classes;if(c)for(var l=0;l<c.length;l++)if(!e.dom.hasClass(t,Xo(c[l],r)))return;return s}}},Sx=Zh,Ex="_mce_caret",kx={},Nx=J,_x=Y;GC=function(e){var t,n=e.selection.getRng(),r=et(["pre"]);n.collapsed||(t=e.selection.getSelectedBlocks(),_x(Nx(Nx(t,r),function(e){return r(e.previousSibling)&&-1!==Q(t,e.previousSibling)}),function(e){var t,n=e.previousSibling;Ib(t=e).remove(),Ib(n).append("<br><br>").append(t.childNodes)}))},kx.pre||(kx.pre=[]),kx.pre.push(GC);var Ax,Rx,Dx,Tx,Ox=Pp.each,Bx=function(e,t,n){Ox(e.childNodes,function(e){As(e)&&(t(e)&&n(e),e.hasChildNodes()&&Bx(e,t,n))})},Px=St([{keep:[]},{rename:["name"]},{removed:[]}]),Lx=/^(src|href|style)$/,Ix=Pp.each,Mx=Yo,Fx=Pp.each,Ux=Pp.each,zx=function(e,t,n,r){function o(e,t){var o;Hg((t=void 0===t?m:t).onformat)&&t.onformat(e,t,n,r),Ux(t.styles,function(t,r){p.setStyle(e,r,Xo(t,n))}),!t.styles||(o=p.getAttrib(e,"style"))&&p.setAttrib(e,"data-mce-style",o),Ux(t.attributes,function(t,r){p.setAttrib(e,r,Xo(t,n))}),Ux(t.classes,function(t){t=Xo(t,n),p.hasClass(e,t)||p.addClass(e,t)})}function i(e,t){var n=!1;return Ux(e,function(e){return!!ni(e)&&(u(e.collapsed)&&e.collapsed!==g||!p.is(t,e.selector)||To(t)?void 0:(o(t,e),!(n=!0)))}),n}function a(r,a,s){var c=[],l=!0,f=m.inline||m.block,g=function(e){if(Lg(e)){var t=p.create(e);return o(t),t}return null}(f);pi(r,a,function(a){var p,h=function(a){var v=!1,b=l,y=a.nodeName.toLowerCase(),C=a.parentNode,x=C.nodeName.toLowerCase();if(Gp(a)&&r.getContentEditable(a)&&(b=l,l="true"===r.getContentEditable(a),v=!0),nh(a)&&!function(e,t,n,r){if(e.getParam("format_empty_lines",!1,"boolean")&&ri(t)){var o=un(e.schema),i=(a=Lp.fromDom(n),s=function(e){return To(e.dom)},((c=(u=a).dom).parentNode?Fh(Lp.fromDom(c.parentNode),function(e){return!he(u,e)&&s(e)}):Kg.none()).isSome());return X(o,r)&&Jt(Lp.fromDom(n.parentNode),!1)&&!i}var a,u,s,c}(e,m,a,x))return p=null,void(ti(m)&&r.remove(a));if(ti(m)&&m.wrapper&&wx(e,a,t,n))p=null;else{if(l&&!v&&ti(m)&&!m.wrapper&&Wo(e,y)&&Ko(e,x,f)){var w=r.rename(a,f);return o(w),c.push(w),void(p=null)}if(ni(m)){var S=i(d,a);if(!S&&u(C)&&oi(m)&&(S=i(d,C)),!ri(m)||S)return void(p=null)}!l||v||!Ko(e,f,y)||!Ko(e,x,f)||!s&&Qp(a)&&ev(a.data)||To(a)||ri(m)&&r.isBlock(a)?(p=null,E(Jg(a.childNodes),h),v&&(l=b),p=null):(p||(p=r.clone(g,!1),a.parentNode.insertBefore(p,a),c.push(p)),p.appendChild(a))}};E(a,h)}),!0===m.links&&E(c,function(e){var t=function(e){"A"===e.nodeName&&o(e,m),E(Jg(e.childNodes),t)};t(e)}),E(c,function(i){function a(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=Qo(S,e.parentNode),S.getStyle(e,"color")&&t?S.setStyle(e,"text-decoration",t):S.getStyle(e,"text-decoration")===t&&S.setStyle(e,"text-decoration",null))}var s,l,f,g,p,h,v,b,y,C,x,w,S,k,N,_,A,R,D=(s=0,E(i.childNodes,function(e){var t;u(t=e)&&Qp(t)&&0===t.length||zo(e)||s++}),s);!(1<c.length)&&r.isBlock(i)||0!==D?(ri(m)||ti(m)&&m.wrapper)&&(m.exact||1!==D||(i=T((w=i).childNodes,Vs).filter(function(e){return ps(r,e,m)}).map(function(e){var t=r.clone(e,!1);return o(t),r.replace(t,w,!0),r.remove(e,!0),t}).getOr(w)),_=e,A=n,R=i,Fx(d,function(e){var t,n,r;ri(e)&&Fx(_.dom.select(e.inline,R),function(t){As(t)&&Hs(_,e,A,t,e.exact?t:null)}),t=_.dom,(n=e).clear_child_styles&&(r=n.links?"*:not(a)":"*",Ox(t.select(r,R),function(e){As(e)&&Ox(n.styles,function(n,r){t.setStyle(e,r,"")})}))}),b=m,wx(v=e,(x=i).parentNode,y=t,C=n)&&Hs(v,b,C,x)||b.merge_with_parents&&v.dom.getParent(x.parentNode,function(e){if(wx(v,e,y,C))return Hs(v,b,C,x),!0}),h=i,(p=m).styles&&p.styles.backgroundColor&&Bx(h,Os(r,"fontSize"),Bs(r,"backgroundColor",Xo(p.styles.backgroundColor,n))),S=r,N=i,(k=m).styles&&(k.styles.color||k.styles.textDecoration)&&(Pp.walk(N,a,"childNodes"),a(N)),l=r,g=i,!ri(f=m)||"sub"!==f.inline&&"sup"!==f.inline||(Bx(g,Os(l,"fontSize"),Bs(l,"fontSize","")),l.remove(l.select("sup"===f.inline?"sub":"sup",g),!0)),Ts(r,m,0,i)):r.remove(i,!0)})}var s,c,l,f,d=e.formatter.get(t),m=d[0],g=!r&&e.selection.isCollapsed(),p=e.dom,h=e.selection;if("false"!==p.getContentEditable(h.getNode()))m&&(r?Vo(r)?i(d,r)||((s=p.createRng()).setStartBefore(r),s.setEndAfter(r),a(p,gi(e,s,d),!0)):a(p,r,!0):g&&ri(m)&&!bi(e).length?function(e,t,n){var r,o=e.selection,i=o.getRng(),a=i.startOffset,u=i.startContainer.nodeValue,s=Oo(e.getBody(),o.getStart());s&&(r=ys(s));var c,l,f,d,m=/[^\s\u00a0\u00ad\u200b\ufeff]/;u&&0<a&&a<u.length&&m.test(u.charAt(a))&&m.test(u.charAt(a-1))?(c=o.getBookmark(),i.collapse(!0),l=Ki(gi(e,i,e.formatter.get(t))),e.formatter.apply(t,n,l),o.moveToBookmark(c)):(s&&r.nodeValue===Sx||(f=e.getDoc(),d=Cs(!0).dom,r=(s=f.importNode(d,!0)).firstChild,i.insertNode(s),a=1),e.formatter.apply(t,n,s),o.setCursorLocation(r,a))}(e,t,n):(c=h.getNode(),l=d[0],e.settings.forced_root_block||!l.defaultBlock||p.getParent(c,p.isBlock)||zx(e,l.defaultBlock),h.setRng(ts(h.getRng())),Ei(h,!0,function(){Si(e,function(t,n){var r=n?t:gi(e,t,d);a(p,r,!1)})}),qo(p,h,h.getRng()),e.nodeChanged()),f=e,_x(kx[t],function(e){e(f)})),Pi(e,t,r,n);else{r=h.getNode();for(var v=0,b=d.length;v<b;v++){var y=d[v];if(y.ceFalseOverride&&ni(y)&&p.is(r,y.selector)){o(r,y);break}}Pi(e,t,r,n)}},Hx=function(e){return e.selection.getStart()},jx=function(e,t,n){var r=Ws(e,t);j(n,function(n,o){function i(n){var i,a=$s(e,r,o,n.similar,qs(n)?n.vars:void 0),u=a.isSome();n.state.get()!==u&&(n.state.set(u),i=a.getOr(t),qs(n)?n.callback(u,{node:i,format:o,parents:r}):E(n.callbacks,function(e){return e(u,{node:i,format:o,parents:r})}))}E([n.withSimilar,n.withoutSimilar],i),E(n.withVars,i)})},Vx=re(function(){return document.implementation.createHTMLDocument("undo")}),qx=0,$x=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},Wx=Pp.makeMap,Kx=Pp.each,Xx=Pp.explode,Yx=Pp.extend,Gx=Hb.DOM,Jx=(Ax=function(e,t){return Ig(e)&&Ig(t)?Jx(e,t):t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o,i=e[r];for(o in i)tp(i,o)&&(n[o]=Ax(n[o],i[o]))}return n}),Qx="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),Zx="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),ew="imagetools,toc".split(","),tw=wp().deviceType,nw=tw.isTouch(),rw=tw.isPhone(),ow=tw.isTablet(),iw=["lists","autolink","autosave"],aw={table_grid:!1,object_resizing:!1,resize:!1},uw=(Rx={},{add:function(e,t){Rx[e]=t},get:function(e){return Rx[e]||{icons:{}}},has:function(e){return tp(Rx,e)}}),sw=g(Qc,"clientWidth"),cw=g(Qc,"clientHeight"),lw=g(Zc,"margin-top"),fw=g(Zc,"margin-left"),dw=Yb.PluginManager,mw=Yb.ThemeManager,gw=function(e,t){var n=e.editorManager.baseURL+"/skins/content",r="content"+e.editorManager.suffix+".css",o=!0===e.inline;return S(t,function(t){return/^[a-z0-9\-]+$/i.test(t)&&!o?n+"/"+t+"/"+r:e.documentBaseURI.toAbsolute(t)})},pw=0,hw=Pp.each,vw=Hb.DOM,bw=[9,27,vC.HOME,vC.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,vC.DOWN,vC.UP,vC.LEFT,vC.RIGHT].concat(Tp.browser.isFirefox()?[224]:[]),yw="data-mce-placeholder",Cw=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,xw=g(Nl,!0),ww=g(Nl,!1),Sw=oh,Ew=ih,kw=St([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Nw=Qp,_w=g(sf,!0),Aw=g(sf,!1),Rw=St([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Dw=function(e){return e.fold(d,d,d,d)};g(Af,!1),g(Af,!0),(Tx=Dx={})[Tx.Br=0]="Br",Tx[Tx.Block=1]="Block",Tx[Tx.Wrap=2]="Wrap",Tx[Tx.Eol=3]="Eol";var Tw,Ow,Bw=g(Of,py.isAbove,-1),Pw=g(Of,py.isBelow,1),Lw=g(Bf,-1,Bw),Iw=g(Bf,1,Pw);(Ow=Tw=Tw||{})[Ow.Up=-1]="Up",Ow[Ow.Down=1]="Down";var Mw,Fw,Uw=g(Ff,Tw.Up,dr,mr),zw=g(Ff,Tw.Down,mr,dr),Hw=ih,jw=lo,Vw=function(e,t){var n=e.selection.getRng(),r=e.getBody();if(t){var o=py.fromRangeEnd(n),i=Pw(r,o);return z(i.positions)}return o=py.fromRangeStart(n),U((i=Bw(r,o)).positions)},qw=g(rd,!0),$w=g(rd,!1),Ww=function(e){return _(S(e.selection.getSelectedBlocks(),Lp.fromDom),function(e){return!vd(e)&&!Ae(e).exists(vd)&&_t(e,function(e){return oh(e.dom)||ih(e.dom)}).exists(function(e){return oh(e.dom)})})},Kw=ih,Xw=g(zd,function(e){return e.bottom},function(e,t){return e.y<t}),Yw=g(zd,function(e){return e.top},function(e,t){return e.y>t}),Gw=g(Hd,Bw),Jw=g(Hd,Pw),Qw=function(e,t){return n=py.after(t),!!nh(n.getNode())||tC(e,py.after(t)).map(function(e){return nh(e.getNode())}).getOr(!1);var n},Zw=St([{br:[]},{block:[]},{none:[]}]),eS=wp().browser,tS=wp(),nS=g(Rm,Qh),rS=g(Rm," "),oS=(Bm.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){return e===r||void n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},Bm.prototype.isSameElementPath=function(e){var t,n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e);if(n.length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},Bm),iS=ih,aS=oh,uS=function(e){e.on(function(e){Im(e.ghost)}),e.clear()},sS=oh,cS=ih,lS=Hb.DOM,fS=Hb.DOM,dS=Hb.DOM,mS=function(e,t,n){var r,o,i,a,u=dw.get(n),s=dw.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=Pp.trim(n),u&&-1===Pp.inArray(t,n)&&(Pp.each(dw.dependencies(n),function(n){mS(e,t,n)}),!e.plugins[n]))try{var c=new u(e,s,e.$);(e.plugins[n]=c).init&&(c.init(e,s),t.push(n))}catch(u){o=n,i=u,Bi(r=e,"PluginLoadError",{message:a=Xb.translate(["Failed to initialize plugin: {0}",o])}),Rf(a,i),ol(r,a)}},gS=Hb.DOM,pS={"font-size":"size","font-family":"face"},hS=ig("font-size"),vS=c(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},ig("font-family")),bS=Pp.each,yS=Pp.map,CS=Pp.inArray,xS=(cg.prototype.execCommand=function(e,t,n,r){var o,i,a=!1,u=this;if(!u.editor.removed){if("mcefocus"!==e.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus?xa(i=u.editor).each(function(e){return i.selection.setRng(e)}):u.editor.focus()),(r=u.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n})).isDefaultPrevented())return!1;var s=e.toLowerCase();if(o=u.commands.exec[s])return o(s,t,n),u.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(bS(this.editor.plugins,function(r){if(r.execCommand&&r.execCommand(e,t,n))return u.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(e,t,n))return u.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{a=u.editor.getDoc().execCommand(e,t,n)}catch(r){}return!!a&&(u.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0)}},cg.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(e){}return!1}},cg.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(e){}}},cg.prototype.addCommands=function(e,t){void 0===t&&(t="exec");var n=this;bS(e,function(e,r){bS(r.toLowerCase().split(","),function(r){n.commands[t][r]=e})})},cg.prototype.addCommand=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,o,i,a){return t.call(n||r.editor,o,i,a)}},cg.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(e){}return!1},cg.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},cg.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},cg.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},cg.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},cg.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},cg.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t),this.editor.nodeChanged()},cg.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},cg.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},cg.prototype.setupCommands=function(e){function t(t){return function(){
171
+ var n=e.selection,r=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks(),o=yS(r,function(n){return!!e.formatter.matchNode(n,t)});return-1!==CS(o,!0)}}var n=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":s,"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},mceFocus:function(t,n,r){var o,i;i=r,(o=e).removed||(i?PC:function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&!1===Aa(e)&&xa(e).each(function(t){e.selection.setRng(t),r=t});var o,i,a=(o=e,i=t.getNode(),o.dom.getParent(i,function(e){return"true"===o.dom.getContentEditable(e)}));if(e.$.contains(n,a))return _a(a),Na(e,r),PC(e);e.inline||(Tp.opera||_a(n),e.getWin().focus()),(Tp.gecko||e.inline)&&(_a(n),Na(e,r)),PC(e)})(o)},"Cut,Copy,Paste":function(t){var r,o,i=e.getDoc();try{n.execNativeCommand(t)}catch(t){r=!0}!(r="paste"===t&&!i.queryCommandEnabled(t)||r)&&i.queryCommandSupported(t)||(o=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."),Tp.mac&&(o=o.replace(/Ctrl\+/g,"\u2318+")),e.notificationManager.open({text:o,type:"error"}))},unlink:function(){var t;e.selection.isCollapsed()?(t=e.dom.getParent(e.selection.getStart(),"a"))&&e.dom.remove(t,!0):e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(t){var r=t.substring(7);"full"===r&&(r="justify"),bS("left,center,right,justify".split(","),function(t){r!==t&&e.formatter.remove("align"+t)}),"none"!==r&&n.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(t){var r;n.execNativeCommand(t);var o=e.dom.getParent(e.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(n.storeSelection(),e.dom.split(r,o),n.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){n.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,r){n.toggleFormat(e,{value:r})},FontName:function(t,n,r){var o,i;i=sg(o=e,r),o.formatter.toggle("fontname",{value:S(i.split(/\s*,\s*/),function(e){return-1===e.indexOf(" ")||ap(e,'"')||ap(e,"'")?e:"'"+e+"'"}).join(",")}),o.nodeChanged()},FontSize:function(t,n,r){var o;(o=e).formatter.toggle("fontsize",{value:sg(o,r)}),o.nodeChanged()},LineHeight:function(t,n,r){var o;(o=e).formatter.toggle("lineheight",{value:String(r)}),o.nodeChanged()},Lang:function(e,t,r){n.toggleFormat(e,{value:r.code,customValue:r.customCode})},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){n.toggleFormat("blockquote")},FormatBlock:function(e,t,r){return n.toggleFormat(r||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(t,r,o){var i=o||e.selection.getNode();i!==e.getBody()&&(n.storeSelection(),e.dom.remove(i,!0),n.restoreSelection())},mceSelectNodeDepth:function(t,n,r){var o=0;e.dom.getParent(e.selection.getNode(),function(t){if(1===t.nodeType&&o++===r)return e.selection.select(t),!1},e.getBody())},mceSelectNode:function(t,n,r){e.selection.select(r)},mceInsertContent:function(t,n,r){var o,i,a,u;o=e,a=(i=function(e){if("string"==typeof e)return{content:e,details:{}};var t=Pp.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}(r)).content,u=i.details,xc(o).editor.insertContent(a,u)},mceInsertRawHTML:function(t,n,r){e.selection.setContent("tiny_mce_marker");var o=e.getContent();e.setContent(o.replace(/tiny_mce_marker/g,function(){return r}))},mceInsertNewLine:function(t,n,r){km(e,r)},mceToggleFormat:function(e,t,r){n.toggleFormat(r)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){bd(e,t)},mceRepaint:s,InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,n,r){e.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceInsertLink:function(t,n,r){"string"==typeof r&&(r={href:r});var o=e.dom.getParent(e.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,o)},selectAll:function(){var t,n=e.dom.getParent(e.selection.getStart(),oh);n&&((t=e.dom.createRng()).selectNodeContents(n),e.selection.setRng(t))},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return mm(e,r),!0}}),n.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return n.isFormatMatch(e)},mceBlockQuote:function(){return n.isFormatMatch("blockquote")},Outdent:function(){return hd(e)},"InsertUnorderedList,InsertOrderedList":function(t){var n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state"),n.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),n.addQueryValueHandler("FontName",function(){return ug(t=e,function(e){return vS(t.getBody(),e.dom)}).getOr("");var t},this),n.addQueryValueHandler("FontSize",function(){return ug(t=e,function(e){return hS(t.getBody(),e.dom)}).getOr("");var t},this),n.addQueryValueHandler("LineHeight",function(){return ug(t=e,function(e){var n=Lp.fromDom(t.getBody());return ds(e,function(e){return vt(e,"line-height")},g(he,n)).getOrThunk(function(){var t=parseFloat(ht(e,"line-height")),n=parseFloat(ht(e,"font-size"));return String(t/n)})}).getOr("");var t},this)},cg),wS="data-mce-contenteditable",SS=Pp.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),ES=(hg.isNative=function(e){return!!SS[e.toLowerCase()]},hg.prototype.fire=function(e,t){var n=e.toLowerCase(),r=mn(n,t||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i<a;i++){var u=o[i];if(!u.removed){if(u.once&&this.off(n,u.func),r.isImmediatePropagationStopped())return r;if(!1===u.func.call(this.scope,r))return r.preventDefault(),r}}return r},hg.prototype.on=function(e,t,n,r){if(t=!1===t?Vg:t){var o={func:t,removed:!1};r&&Pp.extend(o,r);for(var i=e.toLowerCase().split(" "),a=i.length;a--;){var u=i[a],s=this.bindings[u];s||(s=[],this.toggleEvent(u,!0)),s=n?ne([o],s,!0):ne(ne([],s,!0),[o],!1),this.bindings[u]=s}}return this},hg.prototype.off=function(e,t){var n=this;if(e)for(var r=e.toLowerCase().split(" "),o=r.length;o--;){var i,a=r[o],u=this.bindings[a];if(!a)return j(this.bindings,function(e,t){n.toggleEvent(t,!1),delete n.bindings[t]}),this;u&&(t?(u=(i=N(u,function(e){return e.func===t})).fail,this.bindings[a]=u,E(i.pass,function(e){e.removed=!0})):u.length=0,u.length||(this.toggleEvent(e,!1),delete this.bindings[a]))}else j(this.bindings,function(e,t){n.toggleEvent(t,!1)}),this.bindings={};return this},hg.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},hg.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},hg),kS={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=vg(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return vg(this).on(e,t,n)},off:function(e,t){return vg(this).off(e,t)},once:function(e,t){return vg(this).once(e,t)},hasEventListeners:function(e){return vg(this).has(e)}},NS=Hb.DOM,_S=rp(rp({},kS),{bindPendingEventDelegates:function(){var e=this;Pp.each(e._pendingNativeEvents,function(t){Cg(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(n.removed||(t?n.initialized?Cg(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(bg(n,e),e,n.delegates[e]),delete n.delegates[e])))},unbindAllNativeEvents:function(){var e=this,t=e.getBody(),n=e.dom;e.delegates&&(j(e.delegates,function(t,n){e.dom.unbind(bg(e,n),n,t)}),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}}),AS=["design","readonly"],RS=Pp.each,DS=Pp.explode,TS={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},OS=Pp.makeMap("alt,ctrl,shift,meta,access"),BS=(Sg.prototype.add=function(e,t,n,r){var o=this,i=o.normalizeCommandFunc(n);return RS(DS(Pp.trim(e)),function(e){var n=o.createShortcut(e,t,i,r);o.shortcuts[n.id]=n}),!0},Sg.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},Sg.prototype.normalizeCommandFunc=function(e){var t=this,n=e;return"string"==typeof n?function(){t.editor.execCommand(n,!1,null)}:Pp.isArray(n)?function(){t.editor.execCommand(n[0],n[1],n[2])}:n},Sg.prototype.createShortcut=function(e,t,n,r){var o=Pp.map(DS(e,">"),wg);return o[o.length-1]=Pp.extend(o[o.length-1],{func:n,scope:r||this.editor}),Pp.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},Sg.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},Sg.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},Sg.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},Sg.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},Sg),PS=Hb.DOM,LS=Pp.extend,IS=Pp.each,MS=Pp.resolve,FS=Tp.ie,US=(Eg.prototype.render=function(){!function(e){var t=e.id;Xb.setCode($r(e));var n,r,o,i,a=function(){gS.unbind(window,"ready",a),e.render()};Uv.Event.domLoaded?e.getElement()&&Tp.contentEditable&&(n=Lp.fromDom(e.getElement()),r=R(n.dom.attributes,function(e,t){return e[t.name]=t.value,e},{}),e.on("remove",function(){k(n.dom.attributes,function(e){return gt(n,e.name),0}),ft(n,r)}),e.ui.styleSheetLoader=Hh.forElement(n,{contentCssCors:(o=e).getParam("content_css_cors"),referrerPolicy:qr(o)}),e.getParam("inline")?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden"),(i=e.getElement().form||gS.getParent(t,"form"))&&(e.formElement=i,e.getParam("hidden_input")&&!Jp(e.getElement())&&(gS.insertAfter(gS.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},gS.bind(i,"submit reset",e.formEventDelegate),e.on("reset",function(){e.resetContent()}),!e.getParam("submit_patch")||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),i._mceOldSubmit(i)})),e.windowManager=nl(e),e.notificationManager=tl(e),"xml"===e.getParam("encoding")&&e.on("GetContent",function(e){e.save&&(e.content=gS.encode(e.content))}),e.getParam("add_form_submit_trigger")&&e.on("submit",function(){e.initialized&&e.save()}),e.getParam("add_unload_trigger")&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),og(e,e.suffix)):gS.bind(window,"ready",a)}(this)},Eg.prototype.focus=function(e){this.execCommand("mceFocus",!1,e)},Eg.prototype.hasFocus=function(){return Aa(this)},Eg.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?MS(r):0,o=MS(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,t)},Eg.prototype.translate=function(e){return Xb.translate(e)},Eg.prototype.getParam=function(e,t,n){return i=t,a=n,l=(o=e)in(r=this).settings?r.settings[o]:i,"hash"===a?(c={},"string"==typeof(s=l)?E(0<s.indexOf("=")?s.split(/[;,](?![^=;,]*(?:[;,]|$))/):s.split(","),function(e){var t=e.split("=");1<t.length?c[Pp.trim(t[0])]=Pp.trim(t[1]):c[Pp.trim(t[0])]=Pp.trim(t[0])}):c=s,c):"string"===a?Jc(Lg,r,o).getOr(i):"number"===a?Jc(jg,r,o).getOr(i):"boolean"===a?Jc(Ug,r,o).getOr(i):"object"===a?Jc(Ig,r,o).getOr(i):"array"===a?Jc(Mg,r,o).getOr(i):"string[]"===a?Jc((u=Lg,function(e){return Mg(e)&&P(e,u)}),r,o).getOr(i):"function"===a?Jc(Hg,r,o).getOr(i):l;var r,o,i,a,u,s,c,l},Eg.prototype.hasPlugin=function(e,t){return!(!x(Qr(this).split(/[ ,]/),e)||t&&void 0===dw.get(e))},Eg.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},Eg.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},Eg.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},Eg.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},Eg.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},Eg.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},Eg.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},Eg.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},Eg.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},Eg.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(PS.show(this.getContainer()),PS.hide(this.id)),this.load(),this.fire("show"))},Eg.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(FS&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(PS.hide(e.getContainer()),PS.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},Eg.prototype.isHidden=function(){return!!this.hidden},Eg.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},Eg.prototype.load=function(e){var t=this.getElement();if(this.removed)return"";if(t){(e=e||{}).load=!0;var n=Jp(t)?t.value:t.innerHTML,r=this.setContent(n,e);return e.element=t,e.no_events||this.fire("LoadContent",e),e.element=t=null,r}},Eg.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Jp(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=PS.getParent(r.id,"form"))&&IS(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},Eg.prototype.setContent=function(e,t){return Vc(this,e,t)},Eg.prototype.getContent=function(e){return t=this,r=(n=void 0===(n=e)?{}:n).format||"html",o=n,xc(t).editor.getContent(o,r);var t,n,r,o},Eg.prototype.insertContent=function(e,t){t&&(e=LS({content:e},t)),this.execCommand("mceInsertContent",!1,e)},Eg.prototype.resetContent=function(e){void 0===e?Vc(this,this.startContent,{format:"raw"}):Vc(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},Eg.prototype.isDirty=function(){return!this.isNotDirty},Eg.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},Eg.prototype.getContainer=function(){return this.container||(this.container=PS.get(this.editorContainer||this.id+"_parent")),this.container},Eg.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},Eg.prototype.getElement=function(){return this.targetElm||(this.targetElm=PS.get(this.id)),this.targetElm},Eg.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},Eg.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},Eg.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},Eg.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):this.documentBaseURI.toAbsolute(e,r.remove_script_host)},Eg.prototype.addVisual=function(e){var t;t=e,wc(this).editor.addVisual(t)},Eg.prototype.remove=function(){var e,t,n,r,o;(e=this).removed||(t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement(),r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Gx.remove(o.nextSibling),e.fire("remove"),e.editorManager.remove(e),!e.inline&&r&&Gx.setStyle(e.id,"display",e.orgDisplay),e.fire("detach"),Gx.remove(e.getContainer()),qc(t),qc(n),e.destroy())},Eg.prototype.destroy=function(e){var t,n,r,o,i,a,u;n=e,a=(t=this).selection,u=t.dom,t.destroyed||(n||t.removed?(n||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),qc(a),qc(u)),(o=(r=t).formElement)&&(o._mceOldSubmit&&(o.submit=o._mceOldSubmit,o._mceOldSubmit=null),Gx.unbind(o,"submit reset",r.formEventDelegate)),(i=t).contentAreaContainer=i.formElement=i.container=i.editorContainer=null,i.bodyElement=i.contentDocument=i.contentWindow=null,i.iframeElement=i.targetElm=null,i.selection&&(i.selection=i.selection.win=i.selection.dom=i.selection.dom.doc=null),t.destroyed=!0):t.remove())},Eg.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},Eg.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},Eg.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},Eg.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},Eg.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},Eg.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},Eg),zS=Hb.DOM,HS=Pp.explode,jS=Pp.each,VS=Pp.extend,qS=0,$S=!1,WS=[],KS=[],XS="CSS1Compat"!==document.compatMode,YS=rp(rp({},kS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ib,majorVersion:"5",minorVersion:"10.7",releaseDate:"2022-12-06",editors:WS,i18n:Xb,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t="",n=jC.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));var r=window.tinymce||window.tinyMCEPreInit;if(r)e=r.base||r.baseURL,t=r.suffix;else{for(var o,i=document.getElementsByTagName("script"),a=0;a<i.length;a++)if(""!==(o=i[a].src||"")){var u=o.substring(o.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(o)){-1!==u.indexOf(".min")&&(t=".min"),e=o.substring(0,o.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!==(o=document.currentScript.src).indexOf(".min")&&(t=".min"),e=o.substring(0,o.lastIndexOf("/")))}this.baseURL=new jC(n).toAbsolute(e),this.documentBaseURL=n,this.baseURI=new jC(this.baseURL),this.suffix=t,this.on("AddEditor",g(Ea,this)),this.on("RemoveEditor",g(ka,this))},overrideDefaults:function(e){var t=e.base_url;t&&this._setBaseUrl(t);var n=e.suffix;e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;void 0!==r&&j(r,function(e,t){Yb.PluginManager.urls[t]=e})},init:function(e){function t(e){var t=e.id;return t||(t=K(e,"name").filter(function(e){return!zS.get(e)}).getOrThunk(zS.uniqueId),e.setAttribute("id",t)),t}function n(e,t){return t.constructor===RegExp?t.test(e.className):zS.hasClass(e,t)}var r,o=this,i=Pp.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),a=function(e){r=e},u=function(){function r(e,t,n){var r=new US(e,t,o);f.push(r),r.on("init",function(){++l===s.length&&a(f)}),r.targetElm=r.targetElm||n,r.render()}var s,c,l=0,f=[];zS.unbind(window,"ready",u),(c=e.onpageload)&&c.apply(o,[]),s=Ib.unique(function(e){var t=[];if(Tp.browser.isIE()&&Tp.browser.version.major<11)return Rf("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(XS)return Rf("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(e.types)return jS(e.types,function(e){t=t.concat(zS.select(e.selector))}),t;if(e.selector)return zS.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":var r=e.elements||"";0<r.length&&jS(HS(r),function(e){var n=zS.get(e);n?t.push(n):jS(document.forms,function(n){jS(n.elements,function(n){n.name===e&&(e="mce_editor_"+qS++,zS.setAttrib(n,"id",e),t.push(n))})})});break;case"textareas":case"specific_textareas":jS(zS.select("textarea"),function(r){e.editor_deselector&&n(r,e.editor_deselector)||e.editor_selector&&!n(r,e.editor_selector)||t.push(r)})}return t}(e)),e.types?jS(e.types,function(n){Pp.each(s,function(o){return!zS.is(o,n.selector)||(r(t(o),VS({},e,n),o),!1)})}):(Pp.each(s,function(e){var t;(t=o.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(_g(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0)}),0===(s=Pp.grep(s,function(e){return!o.get(e.id)})).length?a([]):jS(s,function(n){var o=n;e.inline&&o.tagName.toLowerCase()in i?Rf("Could not initialize inline editor on invalid inline target element",n):r(t(n),e,n)}))};return o.settings=e,zS.bind(window,"ready",u),new Uh(function(e){r?e(r):a=function(t){e(t)}})},get:function(e){return 0===arguments.length?KS.slice(0):Lg(e)?T(KS,function(t){return t.id===e}).getOr(null):jg(e)&&KS[e]||null},add:function(e){var t=this;return WS[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(WS[e.id]=e),WS.push(e),KS.push(e)),Ng(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),Fw||(Fw=function(e){var n=t.fire("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Fw))),e},createEditor:function(e,t){return this.add(new US(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!Lg(e))return n=e,Fg(r.get(n.id))?null:(_g(n)&&r.fire("RemoveEditor",{editor:n}),0===KS.length&&window.removeEventListener("beforeunload",Fw),n.remove(),Ng(0<KS.length),n);jS(zS.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=KS.length-1;0<=t;t--)r.remove(KS[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new US(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",!1,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){jS(KS,function(e){e.save()})},addI18n:function(e,t){Xb.add(e,t)},translate:function(e){return Xb.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new jC(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new jC(this.baseURL)}});YS.setup();var GS,JS,QS,ZS,eE=Math.min,tE=Math.max,nE=Math.round,rE={inflate:function(e,t,n){return Dg(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:Ag,findBestRelativePosition:function(e,t,n,r){for(var o,i=0;i<r.length;i++)if((o=Ag(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n=tE(e.x,t.x),r=tE(e.y,t.y),o=eE(e.x+e.w,t.x+t.w),i=eE(e.y+e.h,t.y+t.h);return o-n<0||i-r<0?null:Dg(n,r,o-n,i-r)},clamp:function(e,t,n){var r=e.x,o=e.y,i=e.x+e.w,a=e.y+e.h,u=t.x+t.w,s=t.y+t.h,c=tE(0,t.x-r),l=tE(0,t.y-o),f=tE(0,i-u),d=tE(0,a-s);return r+=c,o+=l,n&&(i+=c,a+=l,r-=f,o-=d),Dg(r,o,(i-=f)-r,(a-=d)-o)},create:Dg,fromClientRect:function(e){return Dg(e.left,e.top,e.width,e.height)}},oE=(GS={},JS={},{load:function(e,t){var n='Script at URL "'+t+'" failed to load',r='Script at URL "'+t+"\" did not call `tinymce.Resource.add('"+e+"', data)` within 1 second";if(void 0!==GS[e])return GS[e];var o=new Uh(function(o,i){var a=function(e,t,n){function r(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];o||(o=!0,null!==i&&(clearTimeout(i),i=null),e.apply(null,t))}}void 0===n&&(n=1e3);var o=!1,i=null,a=r(e),u=r(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||null!==i||(i=setTimeout(function(){return u.apply(null,e)},n))},resolve:a,reject:u}}(o,i);JS[e]=a.resolve,$b.ScriptLoader.loadScript(t,function(){return a.start(r)},function(){return a.reject(n)})});return GS[e]=o},add:function(e,t){void 0!==JS[e]&&(JS[e](t),delete JS[e]),GS[e]=Uh.resolve(t)}}),iE=Pp.each,aE=Pp.extend;Rg.extend=QS=function(e){function t(){var e,t,n;if(!ZS&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function n(){return this}var r=this.prototype;ZS=!0;var o=new this;return ZS=!1,e.Mixins&&(iE(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),r.Mixins&&(e.Mixins=r.Mixins.concat(e.Mixins))),e.Methods&&iE(e.Methods.split(","),function(t){e[t]=n}),e.Properties&&iE(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){return void 0!==e?(this[n]=e,this):this[n]}}),e.Statics&&iE(e.Statics,function(e,n){t[n]=e}),e.Defaults&&r.Defaults&&(e.Defaults=aE({},r.Defaults,e.Defaults)),j(e,function(e,t){var n,i;"function"==typeof e&&r[t]?o[t]=(n=t,i=e,function(){var e=this._super;this._super=r[n];var t=i.apply(this,arguments);return this._super=e,t}):o[t]=e}),t.prototype=o,(t.constructor=t).extend=QS,t};var uE,sE,cE,lE=Math.min,fE=Math.max,dE=Math.round,mE={serialize:function(e){var t=JSON.stringify(e);return Lg(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(e){}}},gE={callbacks:{},count:0,send:function(e){var t=this,n=Hb.DOM,r=(void 0!==e.count?e:t).count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},pE=rp(rp({},kS),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):zh.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",pE.fire("beforeInitialize",{settings:e}),(t=new XMLHttpRequest).overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Pp.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=pE.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();zh.setTimeout(r,10)}}),hE=Pp.extend,vE=(Tg.sendRPC=function(e){return(new Tg).send(e)},Tg.prototype.send=function(e){var t=e.error,n=e.success,r=hE(this.settings,e);r.success=function(e,o){(e=void 0===(e=mE.parse(e))?{error:"JSON Parse error."}:e).error?t.call(r.error_scope||r.scope,e.error,o):n.call(r.success_scope||r.scope,e.result)},r.error=function(e,n){t&&t.call(r.error_scope||r.scope,e,n)},r.data=mE.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),r.content_type="application/json",pE.send(r)},Tg);try{var bE,yE="__storage_test__";(bE=window.localStorage).setItem(yE,yE),bE.removeItem(yE)}catch(r){uE={},sE=[],cE={getItem:function(e){return uE[e]||null},setItem:function(e,t){sE.push(e),uE[e]=String(t)},key:function(e){return sE[e]},removeItem:function(e){sE=sE.filter(function(t){return t===e}),delete uE[e]},clear:function(){sE=[],uE={}},length:0},Object.defineProperty(cE,"length",{get:function(){return sE.length},configurable:!1,enumerable:!1}),bE=cE}var CE={geom:{Rect:rE},util:{Promise:Uh,Delay:zh,Tools:Pp,VK:vC,URI:jC,Class:Rg,EventDispatcher:ES,Observable:kS,I18n:Xb,XHR:pE,JSON:mE,JSONRequest:vE,JSONP:gE,LocalStorage:bE,Color:function(e){function t(e){var t;return"object"==typeof e?"r"in e?(r=e.r,o=e.g,i=e.b):"v"in e&&function(e,t,n){if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=fE(0,lE(t,1)),n=fE(0,lE(n,1)),0!==t){var a=e/60,u=n*t,s=u*(1-Math.abs(a%2-1)),c=n-u;switch(Math.floor(a)){case 0:r=u,o=s,i=0;break;case 1:r=s,o=u,i=0;break;case 2:r=0,o=u,i=s;break;case 3:r=0,o=s,i=u;break;case 4:r=s,o=0,i=u;break;case 5:r=u,o=0,i=s;break;default:r=o=i=0}r=dE(255*(r+c)),o=dE(255*(o+c)),i=dE(255*(i+c))}else r=o=i=dE(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(r=parseInt(t[1],10),o=parseInt(t[2],10),i=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(r=parseInt(t[1],16),o=parseInt(t[2],16),i=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(r=parseInt(t[1]+t[1],16),o=parseInt(t[2]+t[2],16),i=parseInt(t[3]+t[3],16)),r=r<0?0:255<r?255:r,o=o<0?0:255<o?255:o,i=i<0?0:255<i?255:i,n}var n={},r=0,o=0,i=0;return e&&t(e),n.toRgb=function(){return{r:r,g:o,b:i}},n.toHsv=function(){return e=r,t=o,n=i,u=0,(s=lE(e/=255,lE(t/=255,n/=255)))===(c=fE(e,fE(t,n)))?{h:0,s:0,v:100*(u=s)}:(a=(c-s)/c,{h:dE(60*((e===s?3:n===s?1:5)-(e===s?t-n:n===s?e-t:n-e)/((u=c)-s))),s:dE(100*a),v:dE(100*u)});var e,t,n,a,u,s,c},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(r)+e(o)+e(i)},n.parse=t,n},ImageUploader:function(e){var t=cl(),n=gl(e,t);return{upload:function(t,r){return n.upload(t,(r=void 0===r||r)?ml(e):void 0)}}}},dom:{EventUtils:Uv,Sizzle:Cb,DomQuery:Ib,TreeWalker:jh,TextSeeker:sr,DOMUtils:Hb,ScriptLoader:$b,RangeUtils:Xi,Serializer:jc,StyleSheetLoader:Pt,ControlSelection:Ii,BookmarkManager:Ri,Selection:Rc,Event:Uv.Event},html:{Styles:fn,Entities:Rv,Node:IC,Schema:cn,SaxParser:za,DomParser:Uc,Writer:Va,Serializer:qa},Env:Tp,AddOnManager:Yb,Annotator:Ai,Formatter:yl,UndoManager:xl,EditorCommands:xS,WindowManager:nl,NotificationManager:tl,EditorObservable:_S,Shortcuts:BS,Editor:US,FocusManager:OC,EditorManager:YS,DOM:Hb.DOM,ScriptLoader:$b.ScriptLoader,PluginManager:dw,ThemeManager:mw,IconManager:uw,Resource:oE,trim:Pp.trim,isArray:Pp.isArray,is:Pp.is,toArray:Pp.toArray,makeMap:Pp.makeMap,each:Pp.each,map:Pp.map,grep:Pp.grep,inArray:Pp.inArray,extend:Pp.extend,create:Pp.create,walk:Pp.walk,createNS:Pp.createNS,resolve:Pp.resolve,explode:Pp.explode,_addCacheSuffix:Pp._addCacheSuffix,isOpera:Tp.opera,isWebKit:Tp.webkit,isIE:Tp.ie,isGecko:Tp.gecko,isMac:Tp.mac},xE=Pp.extend(YS,CE),wE=xE;window.tinymce=wE,window.tinyMCE=wE,function(e){if("object"==typeof module)try{module.exports=e}catch(e){}}(xE)}();
172
+ // tinymce_config.js.coffee
173
+ (function(){$(document).ready(function(){return document.addEventListener("focusin",function(t){if(null!==t.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root"))return t.stopImmediatePropagation()})}),decko.editors.add(".tinymce-textarea",function(){return decko.initTinyMCE(this[0].id)},function(){var t;return(t=tinyMCE.get(this[0].id))&&t.getContent()}),decko.slot.destroy(function(t){return t.find("textarea.tinymce-textarea").each(function(){var t;return(t=tinyMCE.get($(this)[0].id))&&t.remove()})}),$.extend(decko,{setTinyMCEConfig:function(t){var e;return e=function(){try{return $.parseJSON(t)}catch(e){return{}}},decko.tinyMCEConfig=e()},initTinyMCE:function(t){var e,n,i;return e={theme:"silver",plugins:"autoresize",autoresize_max_height:500,mobile:{theme:"mobile"},contextmenu:"deckolink nest"},i=null!=decko.tinyMCEConfig?decko.tinyMCEConfig:{},n={selector:"#"+t,branding:!1,extended_valid_elements:"card-nest[id]",content_css:decko.cssPath,entity_encoding:"raw"},$.extend(e,i,n),decko.addNestPlugin(e),tinyMCE.baseURL=decko.path("mod/tinymce_editor"),tinyMCE.suffix=".min",tinyMCE.init(e)},addNestPlugin:function(t){return null!=t.plugins?t.plugins+=" nest":t.plugins="nest",t.menu={insert:{title:"Insert",items:"deckolink nest image | hr"}}}})}).call(this);