thingspeak/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js

8 lines
238 KiB
JavaScript
Raw Permalink Normal View History

2014-08-01 21:23:28 +02:00
!function(t,e){function i(t){var e=t.length,i=ce.type(t);return ce.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===i||"function"!==i&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t){var e=Ce[t]={};return ce.each(t.match(pe)||[],function(t,i){e[i]=!0}),e}function s(t,i,n,s){if(ce.acceptData(t)){var o,r,a=ce.expando,l=t.nodeType,h=l?ce.cache:t,c=l?t[a]:t[a]&&a;if(c&&h[c]&&(s||h[c].data)||n!==e||"string"!=typeof i)return c||(c=l?t[a]=ee.pop()||ce.guid++:a),h[c]||(h[c]=l?{}:{toJSON:ce.noop}),("object"==typeof i||"function"==typeof i)&&(s?h[c]=ce.extend(h[c],i):h[c].data=ce.extend(h[c].data,i)),r=h[c],s||(r.data||(r.data={}),r=r.data),n!==e&&(r[ce.camelCase(i)]=n),"string"==typeof i?(o=r[i],null==o&&(o=r[ce.camelCase(i)])):o=r,o}}function o(t,e,i){if(ce.acceptData(t)){var n,s,o=t.nodeType,r=o?ce.cache:t,l=o?t[ce.expando]:ce.expando;if(r[l]){if(e&&(n=i?r[l]:r[l].data)){ce.isArray(e)?e=e.concat(ce.map(e,ce.camelCase)):e in n?e=[e]:(e=ce.camelCase(e),e=e in n?[e]:e.split(" ")),s=e.length;for(;s--;)delete n[e[s]];if(i?!a(n):!ce.isEmptyObject(n))return}(i||(delete r[l].data,a(r[l])))&&(o?ce.cleanData([t],!0):ce.support.deleteExpando||r!=r.window?delete r[l]:r[l]=null)}}}function r(t,i,n){if(n===e&&1===t.nodeType){var s="data-"+i.replace(Se,"-$1").toLowerCase();if(n=t.getAttribute(s),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Te.test(n)?ce.parseJSON(n):n}catch(o){}ce.data(t,i,n)}else n=e}return n}function a(t){var e;for(e in t)if(("data"!==e||!ce.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function l(){return!0}function h(){return!1}function c(){try{return Q.activeElement}catch(t){}}function u(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function p(t,e,i){if(ce.isFunction(e))return ce.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return ce.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(Re.test(e))return ce.filter(e,t,i);e=ce.filter(e,t)}return ce.grep(t,function(t){return ce.inArray(t,e)>=0!==i})}function d(t){var e=Xe.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){return ce.nodeName(t,"table")&&ce.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function g(t){return t.type=(null!==ce.find.attr(t,"type"))+"/"+t.type,t}function m(t){var e=si.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function v(t,e){for(var i,n=0;null!=(i=t[n]);n++)ce._data(i,"globalEval",!e||ce._data(e[n],"globalEval"))}function y(t,e){if(1===e.nodeType&&ce.hasData(t)){var i,n,s,o=ce._data(t),r=ce._data(e,o),a=o.events;if(a){delete r.handle,r.events={};for(i in a)for(n=0,s=a[i].length;s>n;n++)ce.event.add(e,i,a[i][n])}r.data&&(r.data=ce.extend({},r.data))}}function b(t,e){var i,n,s;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!ce.support.noCloneEvent&&e[ce.expando]){s=ce._data(e);for(n in s.events)ce.removeEvent(e,n,s.handle);e.removeAttribute(ce.expando)}"script"===i&&e.text!==t.text?(g(e).text=t.text,m(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),ce.support.html5Clone&&t.innerHTML&&!ce.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&ei.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}}function _(t,i){var n,s,o=0,r=typeof t.getElementsByTagName!==U?t.getElementsByTagName(i||"*"):typeof t.querySelectorAll!==U?t.querySelectorAll(i||"*"):e;if(!r)for(r=[],n=t.childNodes||t;null!=(s=n[o]);o++)!i||ce.nodeName(s,i)?r.push(s):ce.merge(r,_(s,i));return i===e||i&&ce.nodeName(t,i)?ce.merge([t],r):r}function w(t){ei.test(t.type)&&(t.defaultChecked=t.checked)}function x(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,s=Di.length;s--;)if(e=Di[s]+i,e in t)return e;return n}function k(t,e){return t=e||t,"none"===ce.css(t,"display")||!ce.contains(t.ownerDocument,t)}function D(t,e){for(var i,n
}}},PSEUDO:function(t,e){var n,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||i.error("unsupported pseudo: "+t);return o[O]?o(e):o.length>1?(n=[t,t,"",e],C.setFilters.hasOwnProperty(t.toLowerCase())?s(function(t,i){for(var n,s=o(t,e),r=s.length;r--;)n=ie.call(t,s[r]),t[n]=!(i[n]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:s(function(t){var e=[],i=[],n=N(t.replace(he,"$1"));return n[O]?s(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:s(function(t){return function(e){return i(t,e).length>0}}),contains:s(function(t){return function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:s(function(t){return me.test(t||"")||i.error("unsupported lang: "+t),t=t.replace(ke,De).toLowerCase(),function(e){var i;do if(i=H?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return we.test(t.nodeName)},input:function(t){return _e.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,i){return[0>i?i+e:i]}),even:c(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:c(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:c(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:c(function(t,e,i){for(var n=0>i?i+e:i;++n<e;)t.push(n);return t})}},C.pseudos.nth=C.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})C.pseudos[x]=h(x);u.prototype=C.filters=C.pseudos,C.setFilters=new u,N=i.compile=function(t,e){var i,n=[],s=[],o=q[t+" "];if(!o){for(e||(e=p(t)),i=e.length;i--;)o=y(e[i]),o[O]?n.push(o):s.push(o);o=q(t,b(s,n))}return o},k.sortStable=O.split("").sort(K).join("")===O,k.detectDuplicates=X,I(),k.sortDetached=o(function(t){return 1&t.compareDocumentPosition(M.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),k.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(ne,function(t,e,i){var n;return i?void 0:(n=t.getAttributeNode(e))&&n.specified?n.value:t[e]===!0?e.toLowerCase():null}),ce.find=i,ce.expr=i.selectors,ce.expr[":"]=ce.expr.pseudos,ce.unique=i.uniqueSort,ce.text=i.getText,ce.isXMLDoc=i.isXML,ce.contains=i.contains}(t);var Ce={};ce.Callbacks=function(t){t="string"==typeof t?Ce[t]||n(t):ce.extend({},t);var i,s,o,r,a,l,h=[],c=!t.once&&[],u=function(e){for(s=t.memory&&e,o=!0,a=l||0,l=0,r=h.length,i=!0;h&&r>a;a++)if(h[a].apply(e[0],e[1])===!1&&t.stopOnFalse){s=!1;break}i=!1,h&&(c?c.length&&u(c.shift()):s?h=[]:p.disable())},p={add:function(){if(h){var e=h.length;!function n(e){ce.each(e,function(e,i){var s=ce.type(i);"function"===s?t.u
ri.optgroup=ri.option,ri.tbody=ri.tfoot=ri.colgroup=ri.caption=ri.thead,ri.th=ri.td,ce.fn.extend({text:function(t){return ce.access(this,function(t){return t===e?ce.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Q).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?ce.filter(t,this):this,s=0;null!=(i=n[s]);s++)e||1!==i.nodeType||ce.cleanData(_(i)),i.parentNode&&(e&&ce.contains(i.ownerDocument,i)&&v(_(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ce.cleanData(_(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ce.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ce.clone(this,t,e)})},html:function(t){return ce.access(this,function(t){var i=this[0]||{},n=0,s=this.length;if(t===e)return 1===i.nodeType?i.innerHTML.replace(Ke,""):e;if(!("string"!=typeof t||ti.test(t)||!ce.support.htmlSerialize&&Ue.test(t)||!ce.support.leadingWhitespace&&Ve.test(t)||ri[(Je.exec(t)||["",""])[1].toLowerCase()])){t=t.replace(Qe,"<$1></$2>");try{for(;s>n;n++)i=this[n]||{},1===i.nodeType&&(ce.cleanData(_(i,!1)),i.innerHTML=t);i=0}catch(o){}}i&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=ce.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(i){var n=t[e++],s=t[e++];s&&(n&&n.parentNode!==s&&(n=this.nextSibling),ce(this).remove(),s.insertBefore(i,n))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=ne.apply([],t);var n,s,o,r,a,l,h=0,c=this.length,u=this,p=c-1,d=t[0],f=ce.isFunction(d);if(f||!(1>=c||"string"!=typeof d||ce.support.checkClone)&&ii.test(d))return this.each(function(n){var s=u.eq(n);f&&(t[0]=d.call(this,n,s.html())),s.domManip(t,e,i)});if(c&&(l=ce.buildFragment(t,this[0].ownerDocument,!1,!i&&this),n=l.firstChild,1===l.childNodes.length&&(l=n),n)){for(r=ce.map(_(l,"script"),g),o=r.length;c>h;h++)s=l,h!==p&&(s=ce.clone(s,!0,!0),o&&ce.merge(r,_(s,"script"))),e.call(this[h],s,h);if(o)for(a=r[r.length-1].ownerDocument,ce.map(r,m),h=0;o>h;h++)s=r[h],ni.test(s.type||"")&&!ce._data(s,"globalEval")&&ce.contains(a,s)&&(s.src?ce._evalUrl(s.src):ce.globalEval((s.text||s.textContent||s.innerHTML||"").replace(oi,"")));l=n=null}return this}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ce.fn[t]=function(t){for(var i,n=0,s=[],o=ce(t),r=o.length-1;r>=n;n++)i=n===r?this:this.clone(!0),ce(o[n])[e](i),se.apply(s,i.get());return this.pushStack(s)}}),ce.extend({clone:function(t,e,i){var n,s,o,r,a,l=ce.contains(t.ownerDocument,t);if(ce.support.html5Clone||ce.isXMLDoc(t)||!Ue.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(li.innerHTML=t.outerHTML,li.removeChild(o=li.firstChild)),!(ce.support.noCloneEvent&&ce.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ce.isXMLDoc(t)))for(n=_(o),a=_(t),r=0;null!=(s=a[r]);++r)n[r]&&b(s,n[r]);if(e)if(i)for(a=a||_(t),n=n||_(o),r=0;null!=(s=a[r]);r++)y(s,n[r]);else y(t,o);return n=_(o,"script"),n.length>0&&v(n,!l&&_(t,"script")),n=a=s=null,o},buildFragment:function(t,e,i,n){for(var s,o,r,a,l,h,c,u=t.length,p=d(e),f=[],g=0;u>g;g++)if(o=t[g],o||0===o)if("object"===ce.type(o))ce.merge(f,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||p.appendChild(e.createElement("div")),l=(Je.exec(o)||["",""])[1].toLowerCase(),c=ri[l
}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",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")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.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 s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;n=e.nodeName.toLowerCase(),s="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),s),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,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 n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=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:s,title:s}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:s,title:s}):s)),e[a?"before":"after"](i.trigger),i.trigger.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,n,s,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,n=s);return n},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,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,n,o,a){var l,h,c,u,p,d=this._dialogInst;return d||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d
return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).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 i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}s(e)},t.widget=function(e,i,n){var s,o,r,a,l={},h=e.split(".")[0];e=e.split(".")[1],s=h+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[h]=t[h]||{},o=t[h][e],r=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},s=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(l[e]=n,void 0)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:e},l,{constructor:r,namespace:h,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==e&&(i[s]=t.isPlainObject(o)?t.isPlainObject(i[s])?t.widget.extend({},i[s],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),h=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,s=t.data(this,o);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==e?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():t.data(this,o,new s(r,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).rem
})},drag:function(e,i){var n,s,o,r,a,l,h,c,u,p,d=t(this).data("ui-draggable"),f=d.options,g=f.snapTolerance,m=i.offset.left,v=m+d.helperProportions.width,y=i.offset.top,b=y+d.helperProportions.height;for(u=d.snapElements.length-1;u>=0;u--)a=d.snapElements[u].left,l=a+d.snapElements[u].width,h=d.snapElements[u].top,c=h+d.snapElements[u].height,a-g>v||m>l+g||h-g>b||y>c+g||!t.contains(d.snapElements[u].item.ownerDocument,d.snapElements[u].item)?(d.snapElements[u].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(h-b)<=g,s=Math.abs(c-y)<=g,o=Math.abs(a-v)<=g,r=Math.abs(l-m)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h-d.helperProportions.height,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a-d.helperProportions.width}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left)),p=n||s||o||r,"outer"!==f.snapMode&&(n=Math.abs(h-y)<=g,s=Math.abs(c-b)<=g,o=Math.abs(a-m)<=g,r=Math.abs(l-v)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c-d.helperProportions.height,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[u].snapping&&(n||s||o||r||p)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=n||s||o||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?i/100:1)]}function n(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()}}t.ui=t.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,p=/^\w+/,d=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,s=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),n=e.isWindow?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}}
},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(s,o){n.height=t(this).height(),n.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,e(o))}}).css("position",o)},_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(n){var s=this,o=!1,r={};t.each(n,function(t,n){s._setOption(t,n),t in e&&(o=!0),t in i&&(r[t]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var i,n,s=this.uiDialog;"dialogClass"===t&&s.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=s.is(":data(ui-draggable)"),i&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=s.is(":data(ui-resizable)"),n&&!e&&s.resizable("destroy"),n&&"string"==typeof e&&s.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.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?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){e._allowInteraction(n)||(n.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),t.each(["left","top"],function(t,e){+n[t]===n[t]&&(s[t]=n[t],n[t]=e)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cu
return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var s=t(this),o=s.data("remote")!==e,r=i.blankInputs(s,i.requiredInputSelector),a=i.nonBlankInputs(s,i.fileInputSelector);if(!i.allowAction(s))return i.stopEverything(n);if(r&&s.attr("novalidate")==e&&i.fire(s,"ajax:aborted:required",[r]))return i.stopEverything(n);if(o){if(a){setTimeout(function(){i.disableFormElements(s)},13);var l=i.fire(s,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(s)},13),l}return i.handleRemote(s),!1}setTimeout(function(){i.disableFormElements(s)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var s=n.attr("name"),o=s?{name:s,value:n.val()}:null;n.closest("form").data("ujs:submit-button",o)}),n.delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)}))}(jQuery),function(){window.ActiveAdmin={},window.AA||(window.AA=window.ActiveAdmin)}.call(this),function(){$(function(){return $(".batch_actions_selector li a").click(function(t){var e,i=this;return t.stopPropagation(),t.preventDefault(),(e=$(this).data("confirm"))?ActiveAdmin.modal_dialog(e,$(this).data("inputs"),function(t){return $(i).trigger("confirm:complete",t)}):$(this).trigger("confirm:complete")}),$(".batch_actions_selector li a").on("confirm:complete",function(t,e){var i;return(i=JSON.stringify(e))?$("#batch_action_inputs").val(i):$("#batch_action_inputs").attr("disabled","disabled"),$("#batch_action").val($(this).data("action")),$("#collection_selection").submit()}),$(".batch_actions_selector").length&&$(":checkbox.toggle_all").length?($(".paginated_collection table.index_table").length?$(".paginated_collection table.index_table").tableCheckboxToggler():$(".paginated_collection").checkboxToggler(),$(document).on("change",".paginated_collection :checkbox",function(){return $(".paginated_collection :checkbox:checked").length?$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("enable")}):$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("disable")})})):void 0})}.call(this),function(){ActiveAdmin.CheckboxToggler=function(){function t(t,e){var i;this.options=t,this.container=e,i={},this.options=$.extend(i,t),this._init(),this._bind()}return t.prototype._init=function(){if(!this.container)throw new Error("Container element not found");if(this.$container=$(this.container),!this.$container.find(".toggle_all").length)throw new Error('"toggle all" checkbox not found');return this.toggle_all_checkbox=this.$container.find(".toggle_all"),this.checkboxes=this.$container.find(":checkbox").not(this.toggle_all_checkbox)},t.prototype._bind=function(){var t=this;return this.checkboxes.change(function(e){return t._didChangeCheckbox(e.target)}),this.toggle_all_checkbox.change(function(){return t._didChangeToggleAllCheckbox()})},t.prototype._didChangeCheckbox=function(){switch(this.checkboxes.filter(":checked").length){case this.checkboxes.length-1:return this.toggle_all_checkbox.prop({checked:null});case this.checkboxes.length:return this.toggle_all_checkbox.prop({checked:!0})}},t.prototype._didChangeToggleAllCheckbox=function(){var t,e=this;return t=this.toggle_all_checkbox.prop("checked")?!0:null,this.checkboxes.each(function(i,n){return $(n).prop({checked:t}),e._didChangeCheckbox(n)})},t}(),$.widget.bridge("checkboxToggler",ActiveAdmin.CheckboxToggler)}.call(this),function(){ActiveAdmin.DropdownMenu=function(){function t(t,e){var i;this.options=t,this.element=e,this.$element=$(this.element),i={fadeInDuration:20,fadeOutDuration:100,onClickActionItemCallback:null},this.options=$.extend(i,t),this.isOpen=!1,this.$menuButton=this.$element.find(".dropdown_menu_bu