/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */

//     Underscore.js 1.4.4
//     http://underscorejs.org
//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
//     Underscore may be freely distributed under the MIT license.

//     (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
//     Backbone may be freely distributed under the MIT license.
//     For all details and documentation:
//     http://backbonejs.org

//     (c) 2012 Airbnb, Inc.
//
//     polyglot.js may be freely distributed under the terms of the BSD
//     license. For all licensing information, details, and documention:
//     http://airbnb.github.com/polyglot.js
//
//
// Polyglot.js is an I18n helper library written in JavaScript, made to
// work both in the browser and in Node. It provides a simple solution for
// interpolation and pluralization, based off of Airbnb's
// experience adding I18n functionality to its Backbone.js and Node apps.
//
// Polylglot is agnostic to your translation backend. It doesn't perform any
// translation; it simply gives you a way to manage translated phrases from
// your client- or server-side JavaScript application.
//

/*!
 * Bootstrap 2.3.1 Form Builder
 * Copyright (C) 2012 Adam Moore
 * Licensed under MIT (https://github.com/minikomi/Bootstrap-Form-Builder/blob/gh-pages/LICENSE)
 */

/**
 * Copyright (C) Baluart.COM - All Rights Reserved
 *
 * @description JavaScript Form Builder for Easy Forms
 * @since 1.0
 * @author Balu
 * @copyright Copyright (c) 2015 - 2016 Baluart.COM
 * @license http://codecanyon.net/licenses/faq Envato marketplace licenses
 * @link http://easyforms.baluart.com/ Easy Forms
 */

/**
 * @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

/*!
 * Bootstrap v3.3.4 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */

/*!
 * jQuery Cookie Plugin v1.4.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2006, 2014 Klaus Hartl
 * Released under the MIT license
 */

if(!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ae.type(e);return"function"===n||ae.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(ae.isFunction(t))return ae.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ae.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(de.test(t))return ae.filter(t,e,n);t=ae.filter(t,e)}return ae.grep(e,function(e){return ae.inArray(e,t)>=0!==n})}function a(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t=xe[e]={};return ae.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function o(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(he.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(o(),ae.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Se,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:ke.test(n)?ae.parseJSON(n):n}catch(a){}ae.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!ae.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,i){if(ae.acceptData(e)){var a,r,o=ae.expando,s=e.nodeType,l=s?ae.cache:e,c=s?e[o]:e[o]&&o;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[o]=J.pop()||ae.guid++:o),l[c]||(l[c]=s?{}:{toJSON:ae.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=ae.extend(l[c],t):l[c].data=ae.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[ae.camelCase(t)]=n),"string"==typeof t?(a=r[t],null==a&&(a=r[ae.camelCase(t)])):a=r,a}}function p(e,t,n){if(ae.acceptData(e)){var i,a,r=e.nodeType,o=r?ae.cache:e,s=r?e[ae.expando]:ae.expando;if(o[s]){if(t&&(i=n?o[s]:o[s].data)){ae.isArray(t)?t=t.concat(ae.map(t,ae.camelCase)):t in i?t=[t]:(t=ae.camelCase(t),t=t in i?[t]:t.split(" ")),a=t.length;for(;a--;)delete i[t[a]];if(n?!c(i):!ae.isEmptyObject(i))return}(n||(delete o[s].data,c(o[s])))&&(r?ae.cleanData([e],!0):ne.deleteExpando||o!=o.window?delete o[s]:o[s]=null)}}}function d(){return!0}function f(){return!1}function h(){try{return he.activeElement}catch(e){}}function m(e){var t=Fe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,a=0,r=typeof e.getElementsByTagName!==Te?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Te?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[a]);a++)!t||ae.nodeName(i,t)?r.push(i):ae.merge(r,g(i,t));return void 0===t||t&&ae.nodeName(e,t)?ae.merge([e],r):r}function v(e){De.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return ae.nodeName(e,"table")&&ae.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==ae.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Xe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,i=0;null!=(n=e[i]);i++)ae._data(n,"globalEval",!t||ae._data(t[i],"globalEval"))}function C(e,t){if(1===t.nodeType&&ae.hasData(e)){var n,i,a,r=ae._data(e),o=ae._data(t,r),s=r.events;if(s){delete o.handle,o.events={};for(n in s)for(i=0,a=s[n].length;a>i;i++)ae.event.add(t,n,s[n][i])}o.data&&(o.data=ae.extend({},o.data))}}function T(e,t){var n,i,a;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[ae.expando]){a=ae._data(t);for(i in a.events)ae.removeEvent(t,i,a.handle);t.removeAttribute(ae.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,x(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!ae.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&De.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function k(t,n){var i,a=ae(n.createElement(t)).appendTo(n.body),r=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(a[0]))?i.display:ae.css(a[0],"display");return a.detach(),r}function S(e){var t=he,n=Ze[e];return n||(n=k(e,t),"none"!==n&&n||(Ke=(Ke||ae("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Ke[0].contentWindow||Ke[0].contentDocument).document,t.write(),t.close(),n=k(e,t),Ke.detach()),Ze[e]=n),n}function E(e,t){return{get:function(){var n=e();return null!=n?n?void delete this.get:(this.get=t).apply(this,arguments):void 0}}}function N(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,a=dt.length;a--;)if(t=dt[a]+n,t in e)return t;return i}function A(e,t){for(var n,i,a,r=[],o=0,s=e.length;s>o;o++)i=e[o],i.style&&(r[o]=ae._data(i,"olddisplay"),n=i.style.display,t?(r[o]||"none"!==n||(i.style.display=""),""===i.style.display&&Ae(i)&&(r[o]=ae._data(i,"olddisplay",S(i.nodeName)))):(a=Ae(i),(n&&"none"!==n||!a)&&ae._data(i,"olddisplay",a?n:ae.css(i,"display"))));for(o=0;s>o;o++)i=e[o],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[o]||"":"none"));return e}function $(e,t,n){var i=lt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function D(e,t,n,i,a){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,o=0;4>r;r+=2)"margin"===n&&(o+=ae.css(e,n+Ne[r],!0,a)),i?("content"===n&&(o-=ae.css(e,"padding"+Ne[r],!0,a)),"margin"!==n&&(o-=ae.css(e,"border"+Ne[r]+"Width",!0,a))):(o+=ae.css(e,"padding"+Ne[r],!0,a),"padding"!==n&&(o+=ae.css(e,"border"+Ne[r]+"Width",!0,a)));return o}function j(e,t,n){var i=!0,a="width"===t?e.offsetWidth:e.offsetHeight,r=et(e),o=ne.boxSizing&&"border-box"===ae.css(e,"boxSizing",!1,r);if(0>=a||null==a){if(a=tt(e,t,r),(0>a||null==a)&&(a=e.style[t]),it.test(a))return a;i=o&&(ne.boxSizingReliable()||a===e.style[t]),a=parseFloat(a)||0}return a+D(e,t,n||(o?"border":"content"),i,r)+"px"}function O(e,t,n,i,a){return new O.prototype.init(e,t,n,i,a)}function _(){return setTimeout(function(){ft=void 0}),ft=ae.now()}function q(e,t){var n,i={height:e},a=0;for(t=t?1:0;4>a;a+=2-t)n=Ne[a],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function H(e,t,n){for(var i,a=(bt[t]||[]).concat(bt["*"]),r=0,o=a.length;o>r;r++)if(i=a[r].call(n,t,e))return i}function F(e,t,n){var i,a,r,o,s,l,c,u,p=this,d={},f=e.style,h=e.nodeType&&Ae(e),m=ae._data(e,"fxshow");n.queue||(s=ae._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,ae.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=ae.css(e,"display"),u="none"===c?ae._data(e,"olddisplay")||S(e.nodeName):c,"inline"===u&&"none"===ae.css(e,"float")&&(ne.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",ne.shrinkWrapBlocks()||p.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],mt.exec(a)){if(delete t[i],r=r||"toggle"===a,a===(h?"hide":"show")){if("show"!==a||!m||void 0===m[i])continue;h=!0}d[i]=m&&m[i]||ae.style(e,i)}else c=void 0;if(ae.isEmptyObject(d))"inline"===("none"===c?S(e.nodeName):c)&&(f.display=c);else{m?"hidden"in m&&(h=m.hidden):m=ae._data(e,"fxshow",{}),r&&(m.hidden=!h),h?ae(e).show():p.done(function(){ae(e).hide()}),p.done(function(){var t;ae._removeData(e,"fxshow");for(t in d)ae.style(e,t,d[t])});for(i in d)o=H(h?m[i]:0,i,p),i in m||(m[i]=o.start,h&&(o.end=o.start,o.start="width"===i||"height"===i?1:0))}}function P(e,t){var n,i,a,r,o;for(n in e)if(i=ae.camelCase(n),a=t[i],r=e[n],ae.isArray(r)&&(a=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),o=ae.cssHooks[i],o&&"expand"in o){r=o.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=a)}else t[i]=a}function L(e,t,n){var i,a,r=0,o=yt.length,s=ae.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var t=ft||_(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,r=1-i,o=0,l=c.tweens.length;l>o;o++)c.tweens[o].run(r);return s.notifyWith(e,[c,r,n]),1>r&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:ae.extend({},t),opts:ae.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:ft||_(),duration:n.duration,tweens:[],createTween:function(t,n){var i=ae.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(a)return this;for(a=!0;i>n;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(P(u,c.opts.specialEasing);o>r;r++)if(i=yt[r].call(c,e,u,c.opts))return i;return ae.map(u,H,c),ae.isFunction(c.opts.start)&&c.opts.start.call(e,c),ae.fx.timer(ae.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function I(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,a=0,r=t.toLowerCase().match(be)||[];if(ae.isFunction(n))for(;i=r[a++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function R(e,t,n,i){function a(s){var l;return r[s]=!0,ae.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),l}var r={},o=e===zt;return a(t.dataTypes[0])||!r["*"]&&a("*")}function M(e,t){var n,i,a=ae.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((a[i]?e:n||(n={}))[i]=t[i]);return n&&ae.extend(!0,e,n),e}function B(e,t,n){for(var i,a,r,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===a&&(a=e.mimeType||t.getResponseHeader("Content-Type"));if(a)for(o in s)if(s[o]&&s[o].test(a)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}i||(i=o)}r=r||i}return r?(r!==l[0]&&l.unshift(r),n[r]):void 0}function z(e,t,n,i){var a,r,o,s,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(o=c[l+" "+r]||c["* "+r],!o)for(a in c)if(s=a.split(" "),s[1]===r&&(o=c[l+" "+s[0]]||c["* "+s[0]])){o===!0?o=c[a]:c[a]!==!0&&(r=s[0],u.unshift(s[1]));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(p){return{state:"parsererror",error:o?p:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function U(e,t,n,i){var a;if(ae.isArray(t))ae.each(t,function(t,a){n||Xt.test(e)?i(e,a):U(e+"["+("object"==typeof a?t:"")+"]",a,n,i)});else if(n||"object"!==ae.type(t))i(e,t);else for(a in t)U(e+"["+a+"]",t[a],n,i)}function W(){try{return new e.XMLHttpRequest}catch(t){}}function V(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function X(e){return ae.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var J=[],Y=J.slice,Q=J.concat,G=J.push,K=J.indexOf,Z={},ee=Z.toString,te=Z.hasOwnProperty,ne={},ie="1.11.2",ae=function(e,t){return new ae.fn.init(e,t)},re=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,oe=/^-ms-/,se=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};ae.fn=ae.prototype={jquery:ie,constructor:ae,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:Y.call(this)},pushStack:function(e){var t=ae.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ae.each(this,e,t)},map:function(e){return this.pushStack(ae.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:G,sort:J.sort,splice:J.splice},ae.extend=ae.fn.extend=function(){var e,t,n,i,a,r,o=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[s]||{},s++),"object"==typeof o||ae.isFunction(o)||(o={}),s===l&&(o=this,s--);l>s;s++)if(null!=(a=arguments[s]))for(i in a)e=o[i],n=a[i],o!==n&&(c&&n&&(ae.isPlainObject(n)||(t=ae.isArray(n)))?(t?(t=!1,r=e&&ae.isArray(e)?e:[]):r=e&&ae.isPlainObject(e)?e:{},o[i]=ae.extend(c,r,n)):void 0!==n&&(o[i]=n));return o},ae.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ae.type(e)},isArray:Array.isArray||function(e){return"array"===ae.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!ae.isArray(e)&&e-parseFloat(e)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==ae.type(e)||e.nodeType||ae.isWindow(e))return!1;try{if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ne.ownLast)for(t in e)return te.call(e,t);for(t in e);return void 0===t||te.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[ee.call(e)]||"object":typeof e},globalEval:function(t){t&&ae.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(oe,"ms-").replace(se,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var a,r=0,o=e.length,s=n(e);if(i){if(s)for(;o>r&&(a=t.apply(e[r],i),a!==!1);r++);else for(r in e)if(a=t.apply(e[r],i),a===!1)break}else if(s)for(;o>r&&(a=t.call(e[r],r,e[r]),a!==!1);r++);else for(r in e)if(a=t.call(e[r],r,e[r]),a===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(re,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?ae.merge(i,"string"==typeof e?[e]:e):G.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(K)return K.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,a=e.length;n>i;)e[a++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[a++]=t[i++];return e.length=a,e},grep:function(e,t,n){for(var i,a=[],r=0,o=e.length,s=!n;o>r;r++)i=!t(e[r],r),i!==s&&a.push(e[r]);return a},map:function(e,t,i){var a,r=0,o=e.length,s=n(e),l=[];if(s)for(;o>r;r++)a=t(e[r],r,i),null!=a&&l.push(a);else for(r in e)a=t(e[r],r,i),null!=a&&l.push(a);return Q.apply([],l)},guid:1,proxy:function(e,t){var n,i,a;return"string"==typeof t&&(a=e[t],t=e,e=a),ae.isFunction(e)?(n=Y.call(arguments,2),i=function(){return e.apply(t||this,n.concat(Y.call(arguments)))},i.guid=e.guid=e.guid||ae.guid++,i):void 0},now:function(){return+new Date},support:ne}),ae.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var ce=function(e){function t(e,t,n,i){var a,r,o,s,l,c,p,f,h,m;if((t?t.ownerDocument||t:R)!==O&&j(t),t=t||O,n=n||[],s=t.nodeType,"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return n;if(!i&&q){if(11!==s&&(a=ye.exec(e)))if(o=a[1]){if(9===s){if(r=t.getElementById(o),!r||!r.parentNode)return n;if(r.id===o)return n.push(r),n}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(o))&&L(t,r)&&r.id===o)return n.push(r),n}else{if(a[2])return K.apply(n,t.getElementsByTagName(e)),n;if((o=a[3])&&w.getElementsByClassName)return K.apply(n,t.getElementsByClassName(o)),n}if(w.qsa&&(!H||!H.test(e))){if(f=p=I,h=t,m=1!==s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=S(e),(p=t.getAttribute("id"))?f=p.replace(xe,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+d(c[l]);h=be.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return K.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{p||t.removeAttribute("id")}}}return N(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[I]=!0,e}function a(e){var t=O.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=e.length;i--;)C.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var a,r=e([],n.length,t),o=r.length;o--;)n[a=r[o]]&&(n[a]=!(i[a]=n[a]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,a=n&&"parentNode"===i,r=B++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,r)}:function(t,n,o){var s,l,c=[M,r];if(o){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,o))return!0}else for(;t=t[i];)if(1===t.nodeType||a){if(l=t[I]||(t[I]={}),(s=l[i])&&s[0]===M&&s[1]===r)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,o))return!0}}}function h(e){return e.length>1?function(t,n,i){for(var a=e.length;a--;)if(!e[a](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var a=0,r=n.length;r>a;a++)t(e,n[a],i);return i}function g(e,t,n,i,a){for(var r,o=[],s=0,l=e.length,c=null!=t;l>s;s++)(r=e[s])&&(!n||n(r,i,a))&&(o.push(r),c&&t.push(s));return o}function v(e,t,n,a,r,o){return a&&!a[I]&&(a=v(a)),r&&!r[I]&&(r=v(r,o)),i(function(i,o,s,l){var c,u,p,d=[],f=[],h=o.length,v=i||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?v:g(v,d,e,s,l),b=n?r||(i?e:h||a)?[]:o:y;if(n&&n(y,b,s,l),a)for(c=g(b,f),a(c,[],s,l),u=c.length;u--;)(p=c[u])&&(b[f[u]]=!(y[f[u]]=p));if(i){if(r||e){if(r){for(c=[],u=b.length;u--;)(p=b[u])&&c.push(y[u]=p);r(null,b=[],c,l)}for(u=b.length;u--;)(p=b[u])&&(c=r?ee(i,p):d[u])>-1&&(i[c]=!(o[c]=p))}}else b=g(b===o?b.splice(h,b.length):b),r?r(null,o,b,l):K.apply(o,b)})}function y(e){for(var t,n,i,a=e.length,r=C.relative[e[0].type],o=r||C.relative[" "],s=r?1:0,l=f(function(e){return e===t},o,!0),c=f(function(e){return ee(t,e)>-1},o,!0),u=[function(e,n,i){var a=!r&&(i||n!==A)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,a}];a>s;s++)if(n=C.relative[e[s].type])u=[f(h(u),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[I]){for(i=++s;a>i&&!C.relative[e[i].type];i++);return v(s>1&&h(u),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(e.slice(s,i)),a>i&&y(e=e.slice(i)),a>i&&d(e))}u.push(n)}return h(u)}function b(e,n){var a=n.length>0,r=e.length>0,o=function(i,o,s,l,c){var u,p,d,f=0,h="0",m=i&&[],v=[],y=A,b=i||r&&C.find.TAG("*",c),x=M+=null==y?1:Math.random()||.1,w=b.length;for(c&&(A=o!==O&&o);h!==w&&null!=(u=b[h]);h++){if(r&&u){for(p=0;d=e[p++];)if(d(u,o,s)){l.push(u);break}c&&(M=x)}a&&((u=!d&&u)&&f--,i&&m.push(u))}if(f+=h,a&&h!==f){for(p=0;d=n[p++];)d(m,v,o,s);if(i){if(f>0)for(;h--;)m[h]||v[h]||(v[h]=Q.call(l));v=g(v)}K.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(M=x,A=y),m};return a?i(o):o}var x,w,C,T,k,S,E,N,A,$,D,j,O,_,q,H,F,P,L,I="sizzle"+1*new Date,R=e.document,M=0,B=0,z=n(),U=n(),W=n(),V=function(e,t){return e===t&&(D=!0),0},X=1<<31,J={}.hasOwnProperty,Y=[],Q=Y.pop,G=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readOnly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ae=ie.replace("w","w#"),re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ae+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ce=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),pe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),fe=new RegExp("^"+ae+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,xe=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ce=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Te=function(){j()};try{K.apply(Y=Z.call(R.childNodes),R.childNodes),Y[R.childNodes.length].nodeType}catch(ke){K={apply:Y.length?function(e,t){G.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}w=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},j=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:R;return i!==O&&9===i.nodeType&&i.documentElement?(O=i,_=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),q=!k(i),w.attributes=a(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=a(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(i.getElementsByClassName),w.getById=a(function(e){return _.appendChild(e).id=I,!i.getElementsByName||!i.getElementsByName(I).length}),w.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(we,Ce);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(we,Ce);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],a=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[a++];)1===n.nodeType&&i.push(n);return i}return r},C.find.CLASS=w.getElementsByClassName&&function(e,t){return q?t.getElementsByClassName(e):void 0},F=[],H=[],(w.qsa=ve.test(i.querySelectorAll))&&(a(function(e){_.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+I+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||H.push(".#.+[+~]")}),a(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(w.matchesSelector=ve.test(P=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&a(function(e){w.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),F.push("!=",oe)}),H=H.length&&new RegExp(H.join("|")),F=F.length&&new RegExp(F.join("|")),t=ve.test(_.compareDocumentPosition),L=t||ve.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===R&&L(R,e)?-1:t===i||t.ownerDocument===R&&L(R,t)?1:$?ee($,e)-ee($,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,a=0,r=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!r||!s)return e===i?-1:t===i?1:r?-1:s?1:$?ee($,e)-ee($,t):0;if(r===s)return o(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[a]===c[a];)a++;return a?o(l[a],c[a]):l[a]===R?-1:c[a]===R?1:0},i):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&j(e),n=n.replace(pe,"='$1']"),!(!w.matchesSelector||!q||F&&F.test(n)||H&&H.test(n)))try{var i=P.call(e,n);if(i||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(a){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&j(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&j(e);var n=C.attrHandle[t.toLowerCase()],i=n&&J.call(C.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==i?i:w.attributes||!q?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,a=0;if(D=!w.detectDuplicates,$=!w.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[a++];)t===e[a]&&(i=n.push(a));for(;i--;)e.splice(n[i],1)}return $=null,e},T=t.getText=function(e){var t,n="",i=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:he,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(we,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(we,Ce),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=S(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(we,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(a){var r=t.attr(a,e);return null==r?"!="===n:n?(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(se," ")+" ").indexOf(i)>-1:"|="===n?r===i||r.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,a){var r="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===a?function(e){return!!e.parentNode}:function(t,n,l){var c,u,p,d,f,h,m=r!==o?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(r){for(;m;){for(p=t;p=p[m];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[o?g.firstChild:g.lastChild],o&&y){for(u=g[I]||(g[I]={}),c=u[e]||[],f=c[0]===M&&c[1],d=c[0]===M&&c[2],p=f&&g.childNodes[f];p=++f&&p&&p[m]||(d=f=0)||h.pop();)if(1===p.nodeType&&++d&&p===t){u[e]=[M,f,d];break}}else if(y&&(c=(t[I]||(t[I]={}))[e])&&c[0]===M)d=c[1];else for(;(p=++f&&p&&p[m]||(d=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++d||(y&&((p[I]||(p[I]={}))[e]=[M,d]),p!==t)););return d-=a,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(e,n){var a,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[I]?r(n):r.length>1?(a=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,a=r(e,n),o=a.length;o--;)i=ee(e,a[o]),e[i]=!(t[i]=a[o])}):function(e){return r(e,0,a)}):r}},pseudos:{not:i(function(e){var t=[],n=[],a=E(e.replace(le,"$1"));return a[I]?i(function(e,t,n,i){for(var r,o=a(e,null,i,[]),s=e.length;s--;)(r=o[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,a(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(we,Ce),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,Ce).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return me.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})C.pseudos[x]=l(x);return p.prototype=C.filters=C.pseudos,C.setFilters=new p,S=t.tokenize=function(e,n){var i,a,r,o,s,l,c,u=U[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=C.preFilter;s;){(!i||(a=ce.exec(s)))&&(a&&(s=s.slice(a[0].length)||s),l.push(r=[])),i=!1,(a=ue.exec(s))&&(i=a.shift(),r.push({value:i,type:a[0].replace(le," ")}),s=s.slice(i.length));for(o in C.filter)!(a=he[o].exec(s))||c[o]&&!(a=c[o](a))||(i=a.shift(),
r.push({value:i,type:o,matches:a}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):U(e,l).slice(0)},E=t.compile=function(e,t){var n,i=[],a=[],r=W[e+" "];if(!r){for(t||(t=S(e)),n=t.length;n--;)r=y(t[n]),r[I]?i.push(r):a.push(r);r=W(e,b(a,i)),r.selector=e}return r},N=t.select=function(e,t,n,i){var a,r,o,s,l,c="function"==typeof e&&e,p=!i&&S(e=c.selector||e);if(n=n||[],1===p.length){if(r=p[0]=p[0].slice(0),r.length>2&&"ID"===(o=r[0]).type&&w.getById&&9===t.nodeType&&q&&C.relative[r[1].type]){if(t=(C.find.ID(o.matches[0].replace(we,Ce),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(a=he.needsContext.test(e)?0:r.length;a--&&(o=r[a],!C.relative[s=o.type]);)if((l=C.find[s])&&(i=l(o.matches[0].replace(we,Ce),be.test(r[0].type)&&u(t.parentNode)||t))){if(r.splice(a,1),e=i.length&&d(r),!e)return K.apply(n,i),n;break}}return(c||E(e,p))(i,t,!q,n,be.test(e)&&u(t.parentNode)||t),n},w.sortStable=I.split("").sort(V).join("")===I,w.detectDuplicates=!!D,j(),w.sortDetached=a(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))}),a(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&a(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),a(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);ae.find=ce,ae.expr=ce.selectors,ae.expr[":"]=ae.expr.pseudos,ae.unique=ce.uniqueSort,ae.text=ce.getText,ae.isXMLDoc=ce.isXML,ae.contains=ce.contains;var ue=ae.expr.match.needsContext,pe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,de=/^.[^:#\[\.,]*$/;ae.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ae.find.matchesSelector(i,e)?[i]:[]:ae.find.matches(e,ae.grep(t,function(e){return 1===e.nodeType}))},ae.fn.extend({find:function(e){var t,n=[],i=this,a=i.length;if("string"!=typeof e)return this.pushStack(ae(e).filter(function(){for(t=0;a>t;t++)if(ae.contains(i[t],this))return!0}));for(t=0;a>t;t++)ae.find(e,i[t],n);return n=this.pushStack(a>1?ae.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&ue.test(e)?ae(e):e||[],!1).length}});var fe,he=e.document,me=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ge=ae.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:me.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||fe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof ae?t[0]:t,ae.merge(this,ae.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:he,!0)),pe.test(n[1])&&ae.isPlainObject(t))for(n in t)ae.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(i=he.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return fe.find(e);this.length=1,this[0]=i}return this.context=he,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ae.isFunction(e)?"undefined"!=typeof fe.ready?fe.ready(e):e(ae):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ae.makeArray(e,this))};ge.prototype=ae.fn,fe=ae(he);var ve=/^(?:parents|prev(?:Until|All))/,ye={children:!0,contents:!0,next:!0,prev:!0};ae.extend({dir:function(e,t,n){for(var i=[],a=e[t];a&&9!==a.nodeType&&(void 0===n||1!==a.nodeType||!ae(a).is(n));)1===a.nodeType&&i.push(a),a=a[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),ae.fn.extend({has:function(e){var t,n=ae(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(ae.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,a=this.length,r=[],o=ue.test(e)||"string"!=typeof e?ae(e,t||this.context):0;a>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&ae.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?ae.unique(r):r)},index:function(e){return e?"string"==typeof e?ae.inArray(this[0],ae(e)):ae.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ae.unique(ae.merge(this.get(),ae(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ae.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ae.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ae.dir(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return ae.dir(e,"nextSibling")},prevAll:function(e){return ae.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ae.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ae.dir(e,"previousSibling",n)},siblings:function(e){return ae.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ae.sibling(e.firstChild)},contents:function(e){return ae.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ae.merge([],e.childNodes)}},function(e,t){ae.fn[e]=function(n,i){var a=ae.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(a=ae.filter(i,a)),this.length>1&&(ye[e]||(a=ae.unique(a)),ve.test(e)&&(a=a.reverse())),this.pushStack(a)}});var be=/\S+/g,xe={};ae.Callbacks=function(e){e="string"==typeof e?xe[e]||r(e):ae.extend({},e);var t,n,i,a,o,s,l=[],c=!e.once&&[],u=function(r){for(n=e.memory&&r,i=!0,o=s||0,s=0,a=l.length,t=!0;l&&a>o;o++)if(l[o].apply(r[0],r[1])===!1&&e.stopOnFalse){n=!1;break}t=!1,l&&(c?c.length&&u(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var i=l.length;!function r(t){ae.each(t,function(t,n){var i=ae.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})}(arguments),t?a=l.length:n&&(s=i,u(n))}return this},remove:function(){return l&&ae.each(arguments,function(e,n){for(var i;(i=ae.inArray(n,l,i))>-1;)l.splice(i,1),t&&(a>=i&&a--,o>=i&&o--)}),this},has:function(e){return e?ae.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=n=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,n){return!l||i&&!c||(n=n||[],n=[e,n.slice?n.slice():n],t?c.push(n):u(n)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},ae.extend({Deferred:function(e){var t=[["resolve","done",ae.Callbacks("once memory"),"resolved"],["reject","fail",ae.Callbacks("once memory"),"rejected"],["notify","progress",ae.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ae.Deferred(function(n){ae.each(t,function(t,r){var o=ae.isFunction(e[t])&&e[t];a[r[1]](function(){var e=o&&o.apply(this,arguments);e&&ae.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[r[0]+"With"](this===i?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ae.extend(e,i):i}},a={};return i.pipe=i.then,ae.each(t,function(e,r){var o=r[2],s=r[3];i[r[1]]=o.add,s&&o.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),a[r[0]]=function(){return a[r[0]+"With"](this===a?i:this,arguments),this},a[r[0]+"With"]=o.fireWith}),i.promise(a),e&&e.call(a,a),a},when:function(e){var t,n,i,a=0,r=Y.call(arguments),o=r.length,s=1!==o||e&&ae.isFunction(e.promise)?o:0,l=1===s?e:ae.Deferred(),c=function(e,n,i){return function(a){n[e]=this,i[e]=arguments.length>1?Y.call(arguments):a,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);o>a;a++)r[a]&&ae.isFunction(r[a].promise)?r[a].promise().done(c(a,i,r)).fail(l.reject).progress(c(a,n,t)):--s;return s||l.resolveWith(i,r),l.promise()}});var we;ae.fn.ready=function(e){return ae.ready.promise().done(e),this},ae.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ae.readyWait++:ae.ready(!0)},ready:function(e){if(e===!0?!--ae.readyWait:!ae.isReady){if(!he.body)return setTimeout(ae.ready);ae.isReady=!0,e!==!0&&--ae.readyWait>0||(we.resolveWith(he,[ae]),ae.fn.triggerHandler&&(ae(he).triggerHandler("ready"),ae(he).off("ready")))}}}),ae.ready.promise=function(t){if(!we)if(we=ae.Deferred(),"complete"===he.readyState)setTimeout(ae.ready);else if(he.addEventListener)he.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{he.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&he.documentElement}catch(i){}n&&n.doScroll&&!function a(){if(!ae.isReady){try{n.doScroll("left")}catch(e){return setTimeout(a,50)}o(),ae.ready()}}()}return we.promise(t)};var Ce,Te="undefined";for(Ce in ae(ne))break;ne.ownLast="0"!==Ce,ne.inlineBlockNeedsLayout=!1,ae(function(){var e,t,n,i;n=he.getElementsByTagName("body")[0],n&&n.style&&(t=he.createElement("div"),i=he.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==Te&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=he.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(t){ne.deleteExpando=!1}}e=null}(),ae.acceptData=function(e){var t=ae.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t};var ke=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Se=/([A-Z])/g;ae.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ae.cache[e[ae.expando]]:e[ae.expando],!!e&&!c(e)},data:function(e,t,n){return u(e,t,n)},removeData:function(e,t){return p(e,t)},_data:function(e,t,n){return u(e,t,n,!0)},_removeData:function(e,t){return p(e,t,!0)}}),ae.fn.extend({data:function(e,t){var n,i,a,r=this[0],o=r&&r.attributes;if(void 0===e){if(this.length&&(a=ae.data(r),1===r.nodeType&&!ae._data(r,"parsedAttrs"))){for(n=o.length;n--;)o[n]&&(i=o[n].name,0===i.indexOf("data-")&&(i=ae.camelCase(i.slice(5)),l(r,i,a[i])));ae._data(r,"parsedAttrs",!0)}return a}return"object"==typeof e?this.each(function(){ae.data(this,e)}):arguments.length>1?this.each(function(){ae.data(this,e,t)}):r?l(r,e,ae.data(r,e)):void 0},removeData:function(e){return this.each(function(){ae.removeData(this,e)})}}),ae.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=ae._data(e,t),n&&(!i||ae.isArray(n)?i=ae._data(e,t,ae.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=ae.queue(e,t),i=n.length,a=n.shift(),r=ae._queueHooks(e,t),o=function(){ae.dequeue(e,t)};"inprogress"===a&&(a=n.shift(),i--),a&&("fx"===t&&n.unshift("inprogress"),delete r.stop,a.call(e,o,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae._data(e,n)||ae._data(e,n,{empty:ae.Callbacks("once memory").add(function(){ae._removeData(e,t+"queue"),ae._removeData(e,n)})})}}),ae.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ae.queue(this[0],e):void 0===t?this:this.each(function(){var n=ae.queue(this,e,t);ae._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ae.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ae.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,a=ae.Deferred(),r=this,o=this.length,s=function(){--i||a.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)n=ae._data(r[o],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),a.promise(t)}});var Ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ne=["Top","Right","Bottom","Left"],Ae=function(e,t){return e=t||e,"none"===ae.css(e,"display")||!ae.contains(e.ownerDocument,e)},$e=ae.access=function(e,t,n,i,a,r,o){var s=0,l=e.length,c=null==n;if("object"===ae.type(n)){a=!0;for(s in n)ae.access(e,t,s,n[s],!0,r,o)}else if(void 0!==i&&(a=!0,ae.isFunction(i)||(o=!0),c&&(o?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(ae(e),n)})),t))for(;l>s;s++)t(e[s],n,o?i:i.call(e[s],s,t(e[s],n)));return a?e:c?t.call(e):l?t(e[0],n):r},De=/^(?:checkbox|radio)$/i;!function(){var e=he.createElement("input"),t=he.createElement("div"),n=he.createDocumentFragment();if(t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===t.firstChild.nodeType,ne.tbody=!t.getElementsByTagName("tbody").length,ne.htmlSerialize=!!t.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==he.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ne.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ne.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(i){ne.deleteExpando=!1}}}(),function(){var t,n,i=he.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ne[t+"Bubbles"]=n in e)||(i.setAttribute(n,"t"),ne[t+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var je=/^(?:input|select|textarea)$/i,Oe=/^key/,_e=/^(?:mouse|pointer|contextmenu)|click/,qe=/^(?:focusinfocus|focusoutblur)$/,He=/^([^.]*)(?:\.(.+)|)$/;ae.event={global:{},add:function(e,t,n,i,a){var r,o,s,l,c,u,p,d,f,h,m,g=ae._data(e);if(g){for(n.handler&&(l=n,n=l.handler,a=l.selector),n.guid||(n.guid=ae.guid++),(o=g.events)||(o=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof ae===Te||e&&ae.event.triggered===e.type?void 0:ae.event.dispatch.apply(u.elem,arguments)},u.elem=e),t=(t||"").match(be)||[""],s=t.length;s--;)r=He.exec(t[s])||[],f=m=r[1],h=(r[2]||"").split(".").sort(),f&&(c=ae.event.special[f]||{},f=(a?c.delegateType:c.bindType)||f,c=ae.event.special[f]||{},p=ae.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:a,needsContext:a&&ae.expr.match.needsContext.test(a),namespace:h.join(".")},l),(d=o[f])||(d=o[f]=[],d.delegateCount=0,c.setup&&c.setup.call(e,i,h,u)!==!1||(e.addEventListener?e.addEventListener(f,u,!1):e.attachEvent&&e.attachEvent("on"+f,u))),c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),a?d.splice(d.delegateCount++,0,p):d.push(p),ae.event.global[f]=!0);e=null}},remove:function(e,t,n,i,a){var r,o,s,l,c,u,p,d,f,h,m,g=ae.hasData(e)&&ae._data(e);if(g&&(u=g.events)){for(t=(t||"").match(be)||[""],c=t.length;c--;)if(s=He.exec(t[c])||[],f=m=s[1],h=(s[2]||"").split(".").sort(),f){for(p=ae.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,d=u[f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=d.length;r--;)o=d[r],!a&&m!==o.origType||n&&n.guid!==o.guid||s&&!s.test(o.namespace)||i&&i!==o.selector&&("**"!==i||!o.selector)||(d.splice(r,1),o.selector&&d.delegateCount--,p.remove&&p.remove.call(e,o));l&&!d.length&&(p.teardown&&p.teardown.call(e,h,g.handle)!==!1||ae.removeEvent(e,f,g.handle),delete u[f])}else for(f in u)ae.event.remove(e,f+t[c],n,i,!0);ae.isEmptyObject(u)&&(delete g.handle,ae._removeData(e,"events"))}},trigger:function(t,n,i,a){var r,o,s,l,c,u,p,d=[i||he],f=te.call(t,"type")?t.type:t,h=te.call(t,"namespace")?t.namespace.split("."):[];if(s=u=i=i||he,3!==i.nodeType&&8!==i.nodeType&&!qe.test(f+ae.event.triggered)&&(f.indexOf(".")>=0&&(h=f.split("."),f=h.shift(),h.sort()),o=f.indexOf(":")<0&&"on"+f,t=t[ae.expando]?t:new ae.Event(f,"object"==typeof t&&t),t.isTrigger=a?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:ae.makeArray(n,[t]),c=ae.event.special[f]||{},a||!c.trigger||c.trigger.apply(i,n)!==!1)){if(!a&&!c.noBubble&&!ae.isWindow(i)){for(l=c.delegateType||f,qe.test(l+f)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||he)&&d.push(u.defaultView||u.parentWindow||e)}for(p=0;(s=d[p++])&&!t.isPropagationStopped();)t.type=p>1?l:c.bindType||f,r=(ae._data(s,"events")||{})[t.type]&&ae._data(s,"handle"),r&&r.apply(s,n),r=o&&s[o],r&&r.apply&&ae.acceptData(s)&&(t.result=r.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=f,!a&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),n)===!1)&&ae.acceptData(i)&&o&&i[f]&&!ae.isWindow(i)){u=i[o],u&&(i[o]=null),ae.event.triggered=f;try{i[f]()}catch(m){}ae.event.triggered=void 0,u&&(i[o]=u)}return t.result}},dispatch:function(e){e=ae.event.fix(e);var t,n,i,a,r,o=[],s=Y.call(arguments),l=(ae._data(this,"events")||{})[e.type]||[],c=ae.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(o=ae.event.handlers.call(this,e,l),t=0;(a=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=a.elem,r=0;(i=a.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,n=((ae.event.special[i.origType]||{}).handle||i.handler).apply(a.elem,s),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,a,r,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(a=[],r=0;s>r;r++)i=t[r],n=i.selector+" ",void 0===a[n]&&(a[n]=i.needsContext?ae(n,this).index(l)>=0:ae.find(n,this,null,[l]).length),a[n]&&a.push(i);a.length&&o.push({elem:l,handlers:a})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},fix:function(e){if(e[ae.expando])return e;var t,n,i,a=e.type,r=e,o=this.fixHooks[a];for(o||(this.fixHooks[a]=o=_e.test(a)?this.mouseHooks:Oe.test(a)?this.keyHooks:{}),i=o.props?this.props.concat(o.props):this.props,e=new ae.Event(r),t=i.length;t--;)n=i[t],e[n]=r[n];return e.target||(e.target=r.srcElement||he),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,o.filter?o.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,a,r=t.button,o=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||he,a=i.documentElement,n=i.body,e.pageX=t.clientX+(a&&a.scrollLeft||n&&n.scrollLeft||0)-(a&&a.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(a&&a.scrollTop||n&&n.scrollTop||0)-(a&&a.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&o&&(e.relatedTarget=o===e.target?t.toElement:o),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ae.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return ae.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var a=ae.extend(new ae.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?ae.event.trigger(a,null,t):ae.event.dispatch.call(t,a),a.isDefaultPrevented()&&n.preventDefault()}},ae.removeEvent=he.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===Te&&(e[i]=null),e.detachEvent(i,n))},ae.Event=function(e,t){return this instanceof ae.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?d:f):this.type=e,t&&ae.extend(this,t),this.timeStamp=e&&e.timeStamp||ae.now(),void(this[ae.expando]=!0)):new ae.Event(e,t)},ae.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=d,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=d,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=d,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},ae.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ae.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,a=e.relatedTarget,r=e.handleObj;return(!a||a!==i&&!ae.contains(i,a))&&(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),ne.submitBubbles||(ae.event.special.submit={setup:function(){return ae.nodeName(this,"form")?!1:void ae.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=ae.nodeName(t,"input")||ae.nodeName(t,"button")?t.form:void 0;n&&!ae._data(n,"submitBubbles")&&(ae.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),ae._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ae.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ae.nodeName(this,"form")?!1:void ae.event.remove(this,"._submit")}}),ne.changeBubbles||(ae.event.special.change={setup:function(){return je.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ae.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ae.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ae.event.simulate("change",this,e,!0)})),!1):void ae.event.add(this,"beforeactivate._change",function(e){var t=e.target;je.test(t.nodeName)&&!ae._data(t,"changeBubbles")&&(ae.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ae.event.simulate("change",this.parentNode,e,!0)}),ae._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ae.event.remove(this,"._change"),!je.test(this.nodeName)}}),ne.focusinBubbles||ae.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ae.event.simulate(t,e.target,ae.event.fix(e),!0)};ae.event.special[t]={setup:function(){var i=this.ownerDocument||this,a=ae._data(i,t);a||i.addEventListener(e,n,!0),ae._data(i,t,(a||0)+1)},teardown:function(){var i=this.ownerDocument||this,a=ae._data(i,t)-1;a?ae._data(i,t,a):(i.removeEventListener(e,n,!0),ae._removeData(i,t))}}}),ae.fn.extend({on:function(e,t,n,i,a){var r,o;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(r in e)this.on(r,t,n,e[r],a);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=f;else if(!i)return this;return 1===a&&(o=i,i=function(e){return ae().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=ae.guid++)),this.each(function(){ae.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,a;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,ae(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(a in e)this.off(a,t,e[a]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=f),this.each(function(){ae.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){ae.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?ae.event.trigger(e,t,n,!0):void 0}});var Fe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pe=/ jQuery\d+="(?:null|\d+)"/g,Le=new RegExp("<(?:"+Fe+")[\\s/>]","i"),Ie=/^\s+/,Re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Me=/<([\w:]+)/,Be=/<tbody/i,ze=/<|&#?\w+;/,Ue=/<(?:script|style|link)/i,We=/checked\s*(?:[^=]|=\s*.checked.)/i,Ve=/^$|\/(?:java|ecma)script/i,Xe=/^true\/(.*)/,Je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ye={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qe=m(he),Ge=Qe.appendChild(he.createElement("div"));Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td,ae.extend({clone:function(e,t,n){var i,a,r,o,s,l=ae.contains(e.ownerDocument,e);if(ne.html5Clone||ae.isXMLDoc(e)||!Le.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(Ge.innerHTML=e.outerHTML,Ge.removeChild(r=Ge.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ae.isXMLDoc(e)))for(i=g(r),s=g(e),o=0;null!=(a=s[o]);++o)i[o]&&T(a,i[o]);if(t)if(n)for(s=s||g(e),i=i||g(r),o=0;null!=(a=s[o]);o++)C(a,i[o]);else C(e,r);return i=g(r,"script"),i.length>0&&w(i,!l&&g(e,"script")),i=s=a=null,r},buildFragment:function(e,t,n,i){for(var a,r,o,s,l,c,u,p=e.length,d=m(t),f=[],h=0;p>h;h++)if(r=e[h],r||0===r)if("object"===ae.type(r))ae.merge(f,r.nodeType?[r]:r);else if(ze.test(r)){for(s=s||d.appendChild(t.createElement("div")),l=(Me.exec(r)||["",""])[1].toLowerCase(),u=Ye[l]||Ye._default,s.innerHTML=u[1]+r.replace(Re,"<$1></$2>")+u[2],a=u[0];a--;)s=s.lastChild;if(!ne.leadingWhitespace&&Ie.test(r)&&f.push(t.createTextNode(Ie.exec(r)[0])),!ne.tbody)for(r="table"!==l||Be.test(r)?"<table>"!==u[1]||Be.test(r)?0:s:s.firstChild,a=r&&r.childNodes.length;a--;)ae.nodeName(c=r.childNodes[a],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(ae.merge(f,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else f.push(t.createTextNode(r));for(s&&d.removeChild(s),ne.appendChecked||ae.grep(g(f,"input"),v),h=0;r=f[h++];)if((!i||-1===ae.inArray(r,i))&&(o=ae.contains(r.ownerDocument,r),s=g(d.appendChild(r),"script"),o&&w(s),n))for(a=0;r=s[a++];)Ve.test(r.type||"")&&n.push(r);return s=null,d},cleanData:function(e,t){for(var n,i,a,r,o=0,s=ae.expando,l=ae.cache,c=ne.deleteExpando,u=ae.event.special;null!=(n=e[o]);o++)if((t||ae.acceptData(n))&&(a=n[s],r=a&&l[a])){if(r.events)for(i in r.events)u[i]?ae.event.remove(n,i):ae.removeEvent(n,i,r.handle);l[a]&&(delete l[a],c?delete n[s]:typeof n.removeAttribute!==Te?n.removeAttribute(s):n[s]=null,J.push(a))}}}),ae.fn.extend({text:function(e){return $e(this,function(e){return void 0===e?ae.text(this):this.empty().append((this[0]&&this[0].ownerDocument||he).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?ae.filter(e,this):this,a=0;null!=(n=i[a]);a++)t||1!==n.nodeType||ae.cleanData(g(n)),n.parentNode&&(t&&ae.contains(n.ownerDocument,n)&&w(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ae.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ae.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ae.clone(this,e,t)})},html:function(e){return $e(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Pe,""):void 0;if(!("string"!=typeof e||Ue.test(e)||!ne.htmlSerialize&&Le.test(e)||!ne.leadingWhitespace&&Ie.test(e)||Ye[(Me.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Re,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(ae.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(a){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,ae.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=Q.apply([],e);var n,i,a,r,o,s,l=0,c=this.length,u=this,p=c-1,d=e[0],f=ae.isFunction(d);if(f||c>1&&"string"==typeof d&&!ne.checkClone&&We.test(d))return this.each(function(n){var i=u.eq(n);f&&(e[0]=d.call(this,n,i.html())),i.domManip(e,t)});if(c&&(s=ae.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(r=ae.map(g(s,"script"),b),a=r.length;c>l;l++)i=s,l!==p&&(i=ae.clone(i,!0,!0),a&&ae.merge(r,g(i,"script"))),t.call(this[l],i,l);if(a)for(o=r[r.length-1].ownerDocument,ae.map(r,x),l=0;a>l;l++)i=r[l],Ve.test(i.type||"")&&!ae._data(i,"globalEval")&&ae.contains(o,i)&&(i.src?ae._evalUrl&&ae._evalUrl(i.src):ae.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Je,"")));s=n=null}return this}}),ae.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ae.fn[e]=function(e){for(var n,i=0,a=[],r=ae(e),o=r.length-1;o>=i;i++)n=i===o?this:this.clone(!0),ae(r[i])[t](n),G.apply(a,n.get());return this.pushStack(a)}});var Ke,Ze={};!function(){var e;ne.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return n=he.getElementsByTagName("body")[0],n&&n.style?(t=he.createElement("div"),i=he.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==Te&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(he.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var et,tt,nt=/^margin/,it=new RegExp("^("+Ee+")(?!px)[a-z%]+$","i"),at=/^(top|right|bottom|left)$/;e.getComputedStyle?(et=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},tt=function(e,t,n){var i,a,r,o,s=e.style;return n=n||et(e),o=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==o||ae.contains(e.ownerDocument,e)||(o=ae.style(e,t)),it.test(o)&&nt.test(t)&&(i=s.width,a=s.minWidth,
r=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=i,s.minWidth=a,s.maxWidth=r)),void 0===o?o:o+""}):he.documentElement.currentStyle&&(et=function(e){return e.currentStyle},tt=function(e,t,n){var i,a,r,o,s=e.style;return n=n||et(e),o=n?n[t]:void 0,null==o&&s&&s[t]&&(o=s[t]),it.test(o)&&!at.test(t)&&(i=s.left,a=e.runtimeStyle,r=a&&a.left,r&&(a.left=e.currentStyle.left),s.left="fontSize"===t?"1em":o,o=s.pixelLeft+"px",s.left=i,r&&(a.left=r)),void 0===o?o:o+""||"auto"}),!function(){function t(){var t,n,i,a;n=he.getElementsByTagName("body")[0],n&&n.style&&(t=he.createElement("div"),i=he.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r=o=!1,l=!0,e.getComputedStyle&&(r="1%"!==(e.getComputedStyle(t,null)||{}).top,o="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,a=t.appendChild(he.createElement("div")),a.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",a.style.marginRight=a.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(a,null)||{}).marginRight),t.removeChild(a)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=t.getElementsByTagName("td"),a[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===a[0].offsetHeight,s&&(a[0].style.display="",a[1].style.display="none",s=0===a[0].offsetHeight),n.removeChild(i))}var n,i,a,r,o,s,l;n=he.createElement("div"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=n.getElementsByTagName("a")[0],(i=a&&a.style)&&(i.cssText="float:left;opacity:.5",ne.opacity="0.5"===i.opacity,ne.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,ae.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==o&&t(),o},pixelPosition:function(){return null==r&&t(),r},reliableMarginRight:function(){return null==l&&t(),l}}))}(),ae.swap=function(e,t,n,i){var a,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];a=n.apply(e,i||[]);for(r in t)e.style[r]=o[r];return a};var rt=/alpha\([^)]*\)/i,ot=/opacity\s*=\s*([^)]*)/,st=/^(none|table(?!-c[ea]).+)/,lt=new RegExp("^("+Ee+")(.*)$","i"),ct=new RegExp("^([+-])=("+Ee+")","i"),ut={position:"absolute",visibility:"hidden",display:"block"},pt={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","O","Moz","ms"];ae.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=tt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,r,o,s=ae.camelCase(t),l=e.style;if(t=ae.cssProps[s]||(ae.cssProps[s]=N(l,s)),o=ae.cssHooks[t]||ae.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(a=o.get(e,!1,i))?a:l[t];if(r=typeof n,"string"===r&&(a=ct.exec(n))&&(n=(a[1]+1)*a[2]+parseFloat(ae.css(e,t)),r="number"),null!=n&&n===n&&("number"!==r||ae.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(o&&"set"in o&&void 0===(n=o.set(e,n,i)))))try{l[t]=n}catch(c){}}},css:function(e,t,n,i){var a,r,o,s=ae.camelCase(t);return t=ae.cssProps[s]||(ae.cssProps[s]=N(e.style,s)),o=ae.cssHooks[t]||ae.cssHooks[s],o&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=tt(e,t,i)),"normal"===r&&t in pt&&(r=pt[t]),""===n||n?(a=parseFloat(r),n===!0||ae.isNumeric(a)?a||0:r):r}}),ae.each(["height","width"],function(e,t){ae.cssHooks[t]={get:function(e,n,i){return n?st.test(ae.css(e,"display"))&&0===e.offsetWidth?ae.swap(e,ut,function(){return j(e,t,i)}):j(e,t,i):void 0},set:function(e,n,i){var a=i&&et(e);return $(e,n,i?D(e,t,i,ne.boxSizing&&"border-box"===ae.css(e,"boxSizing",!1,a),a):0)}}}),ne.opacity||(ae.cssHooks.opacity={get:function(e,t){return ot.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,a=ae.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ae.trim(r.replace(rt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=rt.test(r)?r.replace(rt,a):r+" "+a)}}),ae.cssHooks.marginRight=E(ne.reliableMarginRight,function(e,t){return t?ae.swap(e,{display:"inline-block"},tt,[e,"marginRight"]):void 0}),ae.each({margin:"",padding:"",border:"Width"},function(e,t){ae.cssHooks[e+t]={expand:function(n){for(var i=0,a={},r="string"==typeof n?n.split(" "):[n];4>i;i++)a[e+Ne[i]+t]=r[i]||r[i-2]||r[0];return a}},nt.test(e)||(ae.cssHooks[e+t].set=$)}),ae.fn.extend({css:function(e,t){return $e(this,function(e,t,n){var i,a,r={},o=0;if(ae.isArray(t)){for(i=et(e),a=t.length;a>o;o++)r[t[o]]=ae.css(e,t[o],!1,i);return r}return void 0!==n?ae.style(e,t,n):ae.css(e,t)},e,t,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ae(this)?ae(this).show():ae(this).hide()})}}),ae.Tween=O,O.prototype={constructor:O,init:function(e,t,n,i,a,r){this.elem=e,this.prop=n,this.easing=a||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(ae.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.pos=t=this.options.duration?ae.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ae.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ae.fx.step[e.prop]?ae.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ae.cssProps[e.prop]]||ae.cssHooks[e.prop])?ae.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ae.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ae.fx=O.prototype.init,ae.fx.step={};var ft,ht,mt=/^(?:toggle|show|hide)$/,gt=new RegExp("^(?:([+-])=|)("+Ee+")([a-z%]*)$","i"),vt=/queueHooks$/,yt=[F],bt={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),a=gt.exec(t),r=a&&a[3]||(ae.cssNumber[e]?"":"px"),o=(ae.cssNumber[e]||"px"!==r&&+i)&&gt.exec(ae.css(n.elem,e)),s=1,l=20;if(o&&o[3]!==r){r=r||o[3],a=a||[],o=+i||1;do s=s||".5",o/=s,ae.style(n.elem,e,o+r);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return a&&(o=n.start=+o||+i||0,n.unit=r,n.end=a[1]?o+(a[1]+1)*a[2]:+a[2]),n}]};ae.Animation=ae.extend(L,{tweener:function(e,t){ae.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,a=e.length;a>i;i++)n=e[i],bt[n]=bt[n]||[],bt[n].unshift(t)},prefilter:function(e,t){t?yt.unshift(e):yt.push(e)}}),ae.speed=function(e,t,n){var i=e&&"object"==typeof e?ae.extend({},e):{complete:n||!n&&t||ae.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ae.isFunction(t)&&t};return i.duration=ae.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in ae.fx.speeds?ae.fx.speeds[i.duration]:ae.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){ae.isFunction(i.old)&&i.old.call(this),i.queue&&ae.dequeue(this,i.queue)},i},ae.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ae).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var a=ae.isEmptyObject(e),r=ae.speed(t,n,i),o=function(){var t=L(this,ae.extend({},e),r);(a||ae._data(this,"finish"))&&t.stop(!0)};return o.finish=o,a||r.queue===!1?this.each(o):this.queue(r.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,a=null!=e&&e+"queueHooks",r=ae.timers,o=ae._data(this);if(a)o[a]&&o[a].stop&&i(o[a]);else for(a in o)o[a]&&o[a].stop&&vt.test(a)&&i(o[a]);for(a=r.length;a--;)r[a].elem!==this||null!=e&&r[a].queue!==e||(r[a].anim.stop(n),t=!1,r.splice(a,1));(t||!n)&&ae.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ae._data(this),i=n[e+"queue"],a=n[e+"queueHooks"],r=ae.timers,o=i?i.length:0;for(n.finish=!0,ae.queue(this,e,[]),a&&a.stop&&a.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;o>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),ae.each(["toggle","show","hide"],function(e,t){var n=ae.fn[t];ae.fn[t]=function(e,i,a){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,a)}}),ae.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ae.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),ae.timers=[],ae.fx.tick=function(){var e,t=ae.timers,n=0;for(ft=ae.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||ae.fx.stop(),ft=void 0},ae.fx.timer=function(e){ae.timers.push(e),e()?ae.fx.start():ae.timers.pop()},ae.fx.interval=13,ae.fx.start=function(){ht||(ht=setInterval(ae.fx.tick,ae.fx.interval))},ae.fx.stop=function(){clearInterval(ht),ht=null},ae.fx.speeds={slow:600,fast:200,_default:400},ae.fn.delay=function(e,t){return e=ae.fx?ae.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,a;t=he.createElement("div"),t.setAttribute("className","t"),t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],n=he.createElement("select"),a=n.appendChild(he.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",ne.getSetAttribute="t"!==t.className,ne.style=/top/.test(i.getAttribute("style")),ne.hrefNormalized="/a"===i.getAttribute("href"),ne.checkOn=!!e.value,ne.optSelected=a.selected,ne.enctype=!!he.createElement("form").enctype,n.disabled=!0,ne.optDisabled=!a.disabled,e=he.createElement("input"),e.setAttribute("value",""),ne.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ne.radioValue="t"===e.value}();var xt=/\r/g;ae.fn.extend({val:function(e){var t,n,i,a=this[0];return arguments.length?(i=ae.isFunction(e),this.each(function(n){var a;1===this.nodeType&&(a=i?e.call(this,n,ae(this).val()):e,null==a?a="":"number"==typeof a?a+="":ae.isArray(a)&&(a=ae.map(a,function(e){return null==e?"":e+""})),t=ae.valHooks[this.type]||ae.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))})):a?(t=ae.valHooks[a.type]||ae.valHooks[a.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:(n=a.value,"string"==typeof n?n.replace(xt,""):null==n?"":n)):void 0}}),ae.extend({valHooks:{option:{get:function(e){var t=ae.find.attr(e,"value");return null!=t?t:ae.trim(ae.text(e))}},select:{get:function(e){for(var t,n,i=e.options,a=e.selectedIndex,r="select-one"===e.type||0>a,o=r?null:[],s=r?a+1:i.length,l=0>a?s:r?a:0;s>l;l++)if(n=i[l],!(!n.selected&&l!==a||(ne.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ae.nodeName(n.parentNode,"optgroup"))){if(t=ae(n).val(),r)return t;o.push(t)}return o},set:function(e,t){for(var n,i,a=e.options,r=ae.makeArray(t),o=a.length;o--;)if(i=a[o],ae.inArray(ae.valHooks.option.get(i),r)>=0)try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),a}}}}),ae.each(["radio","checkbox"],function(){ae.valHooks[this]={set:function(e,t){return ae.isArray(t)?e.checked=ae.inArray(ae(e).val(),t)>=0:void 0}},ne.checkOn||(ae.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var wt,Ct,Tt=ae.expr.attrHandle,kt=/^(?:checked|selected)$/i,St=ne.getSetAttribute,Et=ne.input;ae.fn.extend({attr:function(e,t){return $e(this,ae.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ae.removeAttr(this,e)})}}),ae.extend({attr:function(e,t,n){var i,a,r=e.nodeType;return e&&3!==r&&8!==r&&2!==r?typeof e.getAttribute===Te?ae.prop(e,t,n):(1===r&&ae.isXMLDoc(e)||(t=t.toLowerCase(),i=ae.attrHooks[t]||(ae.expr.match.bool.test(t)?Ct:wt)),void 0===n?i&&"get"in i&&null!==(a=i.get(e,t))?a:(a=ae.find.attr(e,t),null==a?void 0:a):null!==n?i&&"set"in i&&void 0!==(a=i.set(e,n,t))?a:(e.setAttribute(t,n+""),n):void ae.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,i,a=0,r=t&&t.match(be);if(r&&1===e.nodeType)for(;n=r[a++];)i=ae.propFix[n]||n,ae.expr.match.bool.test(n)?Et&&St||!kt.test(n)?e[i]=!1:e[ae.camelCase("default-"+n)]=e[i]=!1:ae.attr(e,n,""),e.removeAttribute(St?n:i)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&ae.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),Ct={set:function(e,t,n){return t===!1?ae.removeAttr(e,n):Et&&St||!kt.test(n)?e.setAttribute(!St&&ae.propFix[n]||n,n):e[ae.camelCase("default-"+n)]=e[n]=!0,n}},ae.each(ae.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Tt[t]||ae.find.attr;Tt[t]=Et&&St||!kt.test(t)?function(e,t,i){var a,r;return i||(r=Tt[t],Tt[t]=a,a=null!=n(e,t,i)?t.toLowerCase():null,Tt[t]=r),a}:function(e,t,n){return n?void 0:e[ae.camelCase("default-"+t)]?t.toLowerCase():null}}),Et&&St||(ae.attrHooks.value={set:function(e,t,n){return ae.nodeName(e,"input")?void(e.defaultValue=t):wt&&wt.set(e,t,n)}}),St||(wt={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Tt.id=Tt.name=Tt.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},ae.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:wt.set},ae.attrHooks.contenteditable={set:function(e,t,n){wt.set(e,""===t?!1:t,n)}},ae.each(["width","height"],function(e,t){ae.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),ne.style||(ae.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Nt=/^(?:input|select|textarea|button|object)$/i,At=/^(?:a|area)$/i;ae.fn.extend({prop:function(e,t){return $e(this,ae.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ae.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),ae.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,a,r,o=e.nodeType;return e&&3!==o&&8!==o&&2!==o?(r=1!==o||!ae.isXMLDoc(e),r&&(t=ae.propFix[t]||t,a=ae.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(i=a.set(e,n,t))?i:e[t]=n:a&&"get"in a&&null!==(i=a.get(e,t))?i:e[t]):void 0},propHooks:{tabIndex:{get:function(e){var t=ae.find.attr(e,"tabindex");return t?parseInt(t,10):Nt.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:-1}}}}),ne.hrefNormalized||ae.each(["href","src"],function(e,t){ae.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ne.optSelected||(ae.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ae.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ae.propFix[this.toLowerCase()]=this}),ne.enctype||(ae.propFix.enctype="encoding");var $t=/[\t\r\n\f]/g;ae.fn.extend({addClass:function(e){var t,n,i,a,r,o,s=0,l=this.length,c="string"==typeof e&&e;if(ae.isFunction(e))return this.each(function(t){ae(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(be)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace($t," "):" ")){for(r=0;a=t[r++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");o=ae.trim(i),n.className!==o&&(n.className=o)}return this},removeClass:function(e){var t,n,i,a,r,o,s=0,l=this.length,c=0===arguments.length||"string"==typeof e&&e;if(ae.isFunction(e))return this.each(function(t){ae(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(be)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace($t," "):"")){for(r=0;a=t[r++];)for(;i.indexOf(" "+a+" ")>=0;)i=i.replace(" "+a+" "," ");o=e?ae.trim(i):"",n.className!==o&&(n.className=o)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(ae.isFunction(e)?function(n){ae(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,a=ae(this),r=e.match(be)||[];t=r[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else(n===Te||"boolean"===n)&&(this.className&&ae._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ae._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace($t," ").indexOf(t)>=0)return!0;return!1}}),ae.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ae.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ae.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dt=ae.now(),jt=/\?/,Ot=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ae.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,a=ae.trim(t+"");return a&&!ae.trim(a.replace(Ot,function(e,t,a,r){return n&&t&&(i=0),0===i?e:(n=a||t,i+=!r-!a,"")}))?Function("return "+a)():ae.error("Invalid JSON: "+t)},ae.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(a){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ae.error("Invalid XML: "+t),n};var _t,qt,Ht=/#.*$/,Ft=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Rt=/^\/\//,Mt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Bt={},zt={},Ut="*/".concat("*");try{qt=location.href}catch(Wt){qt=he.createElement("a"),qt.href="",qt=qt.href}_t=Mt.exec(qt.toLowerCase())||[],ae.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qt,type:"GET",isLocal:Lt.test(_t[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ut,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ae.parseJSON,"text xml":ae.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?M(M(e,ae.ajaxSettings),t):M(ae.ajaxSettings,e)},ajaxPrefilter:I(Bt),ajaxTransport:I(zt),ajax:function(e,t){function n(e,t,n,i){var a,u,v,y,x,C=t;2!==b&&(b=2,s&&clearTimeout(s),c=void 0,o=i||"",w.readyState=e>0?4:0,a=e>=200&&300>e||304===e,n&&(y=B(p,w,n)),y=z(p,y,w,a),a?(p.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(ae.lastModified[r]=x),x=w.getResponseHeader("etag"),x&&(ae.etag[r]=x)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=y.state,u=y.data,v=y.error,a=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),w.status=e,w.statusText=(t||C)+"",a?h.resolveWith(d,[u,C,w]):h.rejectWith(d,[w,C,v]),w.statusCode(g),g=void 0,l&&f.trigger(a?"ajaxSuccess":"ajaxError",[w,p,a?u:v]),m.fireWith(d,[w,C]),l&&(f.trigger("ajaxComplete",[w,p]),--ae.active||ae.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,a,r,o,s,l,c,u,p=ae.ajaxSetup({},t),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?ae(d):ae.event,h=ae.Deferred(),m=ae.Callbacks("once memory"),g=p.statusCode||{},v={},y={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!u)for(u={};t=Pt.exec(o);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return c&&c.abort(t),n(0,t),this}};if(h.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||qt)+"").replace(Ht,"").replace(Rt,_t[1]+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=ae.trim(p.dataType||"*").toLowerCase().match(be)||[""],null==p.crossDomain&&(i=Mt.exec(p.url.toLowerCase()),p.crossDomain=!(!i||i[1]===_t[1]&&i[2]===_t[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(_t[3]||("http:"===_t[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ae.param(p.data,p.traditional)),R(Bt,p,t,w),2===b)return w;l=ae.event&&p.global,l&&0===ae.active++&&ae.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!It.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(jt.test(r)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Ft.test(r)?r.replace(Ft,"$1_="+Dt++):r+(jt.test(r)?"&":"?")+"_="+Dt++)),p.ifModified&&(ae.lastModified[r]&&w.setRequestHeader("If-Modified-Since",ae.lastModified[r]),ae.etag[r]&&w.setRequestHeader("If-None-Match",ae.etag[r])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ut+"; q=0.01":""):p.accepts["*"]);for(a in p.headers)w.setRequestHeader(a,p.headers[a]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===b))return w.abort();x="abort";for(a in{success:1,error:1,complete:1})w[a](p[a]);if(c=R(zt,p,t,w)){w.readyState=1,l&&f.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},p.timeout));try{b=1,c.send(v,n)}catch(C){if(!(2>b))throw C;n(-1,C)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return ae.get(e,t,n,"json")},getScript:function(e,t){return ae.get(e,void 0,t,"script")}}),ae.each(["get","post"],function(e,t){ae[t]=function(e,n,i,a){return ae.isFunction(n)&&(a=a||i,i=n,n=void 0),ae.ajax({url:e,type:t,dataType:a,data:n,success:i})}}),ae._evalUrl=function(e){return ae.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ae.fn.extend({wrapAll:function(e){if(ae.isFunction(e))return this.each(function(t){ae(this).wrapAll(e.call(this,t))});if(this[0]){var t=ae(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ae.isFunction(e)?function(t){ae(this).wrapInner(e.call(this,t))}:function(){var t=ae(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ae.isFunction(e);return this.each(function(n){ae(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ae.nodeName(this,"body")||ae(this).replaceWith(this.childNodes)}).end()}}),ae.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||ae.css(e,"display"))},ae.expr.filters.visible=function(e){return!ae.expr.filters.hidden(e)};var Vt=/%20/g,Xt=/\[\]$/,Jt=/\r?\n/g,Yt=/^(?:submit|button|image|reset|file)$/i,Qt=/^(?:input|select|textarea|keygen)/i;ae.param=function(e,t){var n,i=[],a=function(e,t){t=ae.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ae.ajaxSettings&&ae.ajaxSettings.traditional),ae.isArray(e)||e.jquery&&!ae.isPlainObject(e))ae.each(e,function(){a(this.name,this.value)});else for(n in e)U(n,e[n],t,a);return i.join("&").replace(Vt,"+")},ae.fn.extend({serialize:function(){return ae.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ae.prop(this,"elements");return e?ae.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ae(this).is(":disabled")&&Qt.test(this.nodeName)&&!Yt.test(e)&&(this.checked||!De.test(e))}).map(function(e,t){var n=ae(this).val();return null==n?null:ae.isArray(n)?ae.map(n,function(e){return{name:t.name,value:e.replace(Jt,"\r\n")}}):{name:t.name,value:n.replace(Jt,"\r\n")}}).get()}}),ae.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&W()||V()}:W;var Gt=0,Kt={},Zt=ae.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Kt)Kt[e](void 0,!0)}),ne.cors=!!Zt&&"withCredentials"in Zt,Zt=ne.ajax=!!Zt,Zt&&ae.ajaxTransport(function(e){if(!e.crossDomain||ne.cors){var t;return{send:function(n,i){var a,r=e.xhr(),o=++Gt;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)r[a]=e.xhrFields[a];e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(a in n)void 0!==n[a]&&r.setRequestHeader(a,n[a]+"");r.send(e.hasContent&&e.data||null),t=function(n,a){var s,l,c;if(t&&(a||4===r.readyState))if(delete Kt[o],t=void 0,r.onreadystatechange=ae.noop,a)4!==r.readyState&&r.abort();else{c={},s=r.status,"string"==typeof r.responseText&&(c.text=r.responseText);try{l=r.statusText}catch(u){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&i(s,l,c,r.getAllResponseHeaders())},e.async?4===r.readyState?setTimeout(t):r.onreadystatechange=Kt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),ae.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ae.globalEval(e),e}}}),ae.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ae.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=he.head||ae("head")[0]||he.documentElement;return{send:function(i,a){t=he.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||a(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var en=[],tn=/(=)\?(?=&|$)|\?\?/;ae.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||ae.expando+"_"+Dt++;return this[e]=!0,e}}),ae.ajaxPrefilter("json jsonp",function(t,n,i){var a,r,o,s=t.jsonp!==!1&&(tn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(a=t.jsonpCallback=ae.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(tn,"$1"+a):t.jsonp!==!1&&(t.url+=(jt.test(t.url)?"&":"?")+t.jsonp+"="+a),t.converters["script json"]=function(){return o||ae.error(a+" was not called"),o[0]},t.dataTypes[0]="json",r=e[a],e[a]=function(){o=arguments},i.always(function(){e[a]=r,t[a]&&(t.jsonpCallback=n.jsonpCallback,en.push(a)),o&&ae.isFunction(r)&&r(o[0]),o=r=void 0}),"script"):void 0}),ae.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||he;var i=pe.exec(e),a=!n&&[];return i?[t.createElement(i[1])]:(i=ae.buildFragment([e],t,a),a&&a.length&&ae(a).remove(),ae.merge([],i.childNodes))};var nn=ae.fn.load;ae.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var i,a,r,o=this,s=e.indexOf(" ");return s>=0&&(i=ae.trim(e.slice(s,e.length)),e=e.slice(0,s)),ae.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),o.length>0&&ae.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){a=arguments,o.html(i?ae("<div>").append(ae.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){o.each(n,a||[e.responseText,t,e])}),this},ae.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ae.fn[t]=function(e){return this.on(t,e)}}),ae.expr.filters.animated=function(e){return ae.grep(ae.timers,function(t){return e===t.elem}).length};var an=e.document.documentElement;ae.offset={setOffset:function(e,t,n){var i,a,r,o,s,l,c,u=ae.css(e,"position"),p=ae(e),d={};"static"===u&&(e.style.position="relative"),s=p.offset(),r=ae.css(e,"top"),l=ae.css(e,"left"),c=("absolute"===u||"fixed"===u)&&ae.inArray("auto",[r,l])>-1,c?(i=p.position(),o=i.top,a=i.left):(o=parseFloat(r)||0,a=parseFloat(l)||0),ae.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+o),null!=t.left&&(d.left=t.left-s.left+a),"using"in t?t.using.call(e,d):p.css(d)}},ae.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ae.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},a=this[0],r=a&&a.ownerDocument;return r?(t=r.documentElement,ae.contains(t,a)?(typeof a.getBoundingClientRect!==Te&&(i=a.getBoundingClientRect()),n=X(r),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===ae.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ae.nodeName(e[0],"html")||(n=e.offset()),n.top+=ae.css(e[0],"borderTopWidth",!0),n.left+=ae.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ae.css(i,"marginTop",!0),left:t.left-n.left-ae.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||an;e&&!ae.nodeName(e,"html")&&"static"===ae.css(e,"position");)e=e.offsetParent;return e||an})}}),ae.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);ae.fn[e]=function(i){return $e(this,function(e,i,a){var r=X(e);return void 0===a?r?t in r?r[t]:r.document.documentElement[i]:e[i]:void(r?r.scrollTo(n?ae(r).scrollLeft():a,n?a:ae(r).scrollTop()):e[i]=a)},e,i,arguments.length,null)}}),ae.each(["top","left"],function(e,t){ae.cssHooks[t]=E(ne.pixelPosition,function(e,n){return n?(n=tt(e,t),it.test(n)?ae(e).position()[t]+"px":n):void 0})}),ae.each({Height:"height",Width:"width"},function(e,t){ae.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){ae.fn[i]=function(i,a){var r=arguments.length&&(n||"boolean"!=typeof i),o=n||(i===!0||a===!0?"margin":"border");return $e(this,function(t,n,i){
var a;return ae.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===i?ae.css(t,n,o):ae.style(t,n,i,o)},t,r?i:void 0,r,null)}})}),ae.fn.size=function(){return this.length},ae.fn.andSelf=ae.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ae});var rn=e.jQuery,on=e.$;return ae.noConflict=function(t){return e.$===ae&&(e.$=on),t&&e.jQuery===ae&&(e.jQuery=rn),ae},typeof t===Te&&(e.jQuery=e.$=ae),ae}),function(){var e=this,t=e._,n={},i=Array.prototype,a=Object.prototype,r=Function.prototype,o=i.push,s=i.slice,l=i.concat,c=a.toString,u=a.hasOwnProperty,p=i.forEach,d=i.map,f=i.reduce,h=i.reduceRight,m=i.filter,g=i.every,v=i.some,y=i.indexOf,b=i.lastIndexOf,x=Array.isArray,w=Object.keys,C=r.bind,T=function(e){return e instanceof T?e:this instanceof T?void(this._wrapped=e):new T(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.4";var k=T.each=T.forEach=function(e,t,i){if(null!=e)if(p&&e.forEach===p)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;r>a;a++)if(t.call(i,e[a],a,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(i,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var i=[];return null==e?i:d&&e.map===d?e.map(t,n):(k(e,function(e,a,r){i[i.length]=t.call(n,e,a,r)}),i)};var S="Reduce of empty array with no initial value";T.reduce=T.foldl=T.inject=function(e,t,n,i){var a=arguments.length>2;if(null==e&&(e=[]),f&&e.reduce===f)return i&&(t=T.bind(t,i)),a?e.reduce(t,n):e.reduce(t);if(k(e,function(e,r,o){a?n=t.call(i,n,e,r,o):(n=e,a=!0)}),!a)throw new TypeError(S);return n},T.reduceRight=T.foldr=function(e,t,n,i){var a=arguments.length>2;if(null==e&&(e=[]),h&&e.reduceRight===h)return i&&(t=T.bind(t,i)),a?e.reduceRight(t,n):e.reduceRight(t);var r=e.length;if(r!==+r){var o=T.keys(e);r=o.length}if(k(e,function(s,l,c){l=o?o[--r]:--r,a?n=t.call(i,n,e[l],l,c):(n=e[l],a=!0)}),!a)throw new TypeError(S);return n},T.find=T.detect=function(e,t,n){var i;return E(e,function(e,a,r){return t.call(n,e,a,r)?(i=e,!0):void 0}),i},T.filter=T.select=function(e,t,n){var i=[];return null==e?i:m&&e.filter===m?e.filter(t,n):(k(e,function(e,a,r){t.call(n,e,a,r)&&(i[i.length]=e)}),i)},T.reject=function(e,t,n){return T.filter(e,function(e,i,a){return!t.call(n,e,i,a)},n)},T.every=T.all=function(e,t,i){t||(t=T.identity);var a=!0;return null==e?a:g&&e.every===g?e.every(t,i):(k(e,function(e,r,o){return(a=a&&t.call(i,e,r,o))?void 0:n}),!!a)};var E=T.some=T.any=function(e,t,i){t||(t=T.identity);var a=!1;return null==e?a:v&&e.some===v?e.some(t,i):(k(e,function(e,r,o){return a||(a=t.call(i,e,r,o))?n:void 0}),!!a)};T.contains=T.include=function(e,t){return null==e?!1:y&&e.indexOf===y?-1!=e.indexOf(t):E(e,function(e){return e===t})},T.invoke=function(e,t){var n=s.call(arguments,2),i=T.isFunction(t);return T.map(e,function(e){return(i?t:e[t]).apply(e,n)})},T.pluck=function(e,t){return T.map(e,function(e){return e[t]})},T.where=function(e,t,n){return T.isEmpty(t)?n?null:[]:T[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},T.findWhere=function(e,t){return T.where(e,t,!0)},T.max=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&T.isEmpty(e))return-(1/0);var i={computed:-(1/0),value:-(1/0)};return k(e,function(e,a,r){var o=t?t.call(n,e,a,r):e;o>=i.computed&&(i={value:e,computed:o})}),i.value},T.min=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&T.isEmpty(e))return 1/0;var i={computed:1/0,value:1/0};return k(e,function(e,a,r){var o=t?t.call(n,e,a,r):e;o<i.computed&&(i={value:e,computed:o})}),i.value},T.shuffle=function(e){var t,n=0,i=[];return k(e,function(e){t=T.random(n++),i[n-1]=i[t],i[t]=e}),i};var N=function(e){return T.isFunction(e)?e:function(t){return t[e]}};T.sortBy=function(e,t,n){var i=N(t);return T.pluck(T.map(e,function(e,t,a){return{value:e,index:t,criteria:i.call(n,e,t,a)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(i>n||void 0===i)return-1}return e.index<t.index?-1:1}),"value")};var A=function(e,t,n,i){var a={},r=N(t||T.identity);return k(e,function(t,o){var s=r.call(n,t,o,e);i(a,s,t)}),a};T.groupBy=function(e,t,n){return A(e,t,n,function(e,t,n){(T.has(e,t)?e[t]:e[t]=[]).push(n)})},T.countBy=function(e,t,n){return A(e,t,n,function(e,t){T.has(e,t)||(e[t]=0),e[t]++})},T.sortedIndex=function(e,t,n,i){n=null==n?T.identity:N(n);for(var a=n.call(i,t),r=0,o=e.length;o>r;){var s=r+o>>>1;n.call(i,e[s])<a?r=s+1:o=s}return r},T.toArray=function(e){return e?T.isArray(e)?s.call(e):e.length===+e.length?T.map(e,T.identity):T.values(e):[]},T.size=function(e){return null==e?0:e.length===+e.length?e.length:T.keys(e).length},T.first=T.head=T.take=function(e,t,n){return null!=e?null==t||n?e[0]:s.call(e,0,t):void 0},T.initial=function(e,t,n){return s.call(e,0,e.length-(null==t||n?1:t))},T.last=function(e,t,n){return null!=e?null==t||n?e[e.length-1]:s.call(e,Math.max(e.length-t,0)):void 0},T.rest=T.tail=T.drop=function(e,t,n){return s.call(e,null==t||n?1:t)},T.compact=function(e){return T.filter(e,T.identity)};var $=function(e,t,n){return k(e,function(e){T.isArray(e)?t?o.apply(n,e):$(e,t,n):n.push(e)}),n};T.flatten=function(e,t){return $(e,t,[])},T.without=function(e){return T.difference(e,s.call(arguments,1))},T.uniq=T.unique=function(e,t,n,i){T.isFunction(t)&&(i=n,n=t,t=!1);var a=n?T.map(e,n,i):e,r=[],o=[];return k(a,function(n,i){(t?i&&o[o.length-1]===n:T.contains(o,n))||(o.push(n),r.push(e[i]))}),r},T.union=function(){return T.uniq(l.apply(i,arguments))},T.intersection=function(e){var t=s.call(arguments,1);return T.filter(T.uniq(e),function(e){return T.every(t,function(t){return T.indexOf(t,e)>=0})})},T.difference=function(e){var t=l.apply(i,s.call(arguments,1));return T.filter(e,function(e){return!T.contains(t,e)})},T.zip=function(){for(var e=s.call(arguments),t=T.max(T.pluck(e,"length")),n=new Array(t),i=0;t>i;i++)n[i]=T.pluck(e,""+i);return n},T.object=function(e,t){if(null==e)return{};for(var n={},i=0,a=e.length;a>i;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},T.indexOf=function(e,t,n){if(null==e)return-1;var i=0,a=e.length;if(n){if("number"!=typeof n)return i=T.sortedIndex(e,t),e[i]===t?i:-1;i=0>n?Math.max(0,a+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;a>i;i++)if(e[i]===t)return i;return-1},T.lastIndexOf=function(e,t,n){if(null==e)return-1;var i=null!=n;if(b&&e.lastIndexOf===b)return i?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var a=i?n:e.length;a--;)if(e[a]===t)return a;return-1},T.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;for(var i=Math.max(Math.ceil((t-e)/n),0),a=0,r=new Array(i);i>a;)r[a++]=e,e+=n;return r},T.bind=function(e,t){if(e.bind===C&&C)return C.apply(e,s.call(arguments,1));var n=s.call(arguments,2);return function(){return e.apply(t,n.concat(s.call(arguments)))}},T.partial=function(e){var t=s.call(arguments,1);return function(){return e.apply(this,t.concat(s.call(arguments)))}},T.bindAll=function(e){var t=s.call(arguments,1);return 0===t.length&&(t=T.functions(e)),k(t,function(t){e[t]=T.bind(e[t],e)}),e},T.memoize=function(e,t){var n={};return t||(t=T.identity),function(){var i=t.apply(this,arguments);return T.has(n,i)?n[i]:n[i]=e.apply(this,arguments)}},T.delay=function(e,t){var n=s.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},T.defer=function(e){return T.delay.apply(T,[e,1].concat(s.call(arguments,1)))},T.throttle=function(e,t){var n,i,a,r,o=0,s=function(){o=new Date,a=null,r=e.apply(n,i)};return function(){var l=new Date,c=t-(l-o);return n=this,i=arguments,0>=c?(clearTimeout(a),a=null,o=l,r=e.apply(n,i)):a||(a=setTimeout(s,c)),r}},T.debounce=function(e,t,n){var i,a;return function(){var r=this,o=arguments,s=function(){i=null,n||(a=e.apply(r,o))},l=n&&!i;return clearTimeout(i),i=setTimeout(s,t),l&&(a=e.apply(r,o)),a}},T.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},T.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},T.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},T.after=function(e,t){return 0>=e?t():function(){return--e<1?t.apply(this,arguments):void 0}},T.keys=w||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)T.has(e,n)&&(t[t.length]=n);return t},T.values=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push(e[n]);return t},T.pairs=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push([n,e[n]]);return t},T.invert=function(e){var t={};for(var n in e)T.has(e,n)&&(t[e[n]]=n);return t},T.functions=T.methods=function(e){var t=[];for(var n in e)T.isFunction(e[n])&&t.push(n);return t.sort()},T.extend=function(e){return k(s.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},T.pick=function(e){var t={},n=l.apply(i,s.call(arguments,1));return k(n,function(n){n in e&&(t[n]=e[n])}),t},T.omit=function(e){var t={},n=l.apply(i,s.call(arguments,1));for(var a in e)T.contains(n,a)||(t[a]=e[a]);return t},T.defaults=function(e){return k(s.call(arguments,1),function(t){if(t)for(var n in t)null==e[n]&&(e[n]=t[n])}),e},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,t){return t(e),e};var D=function(e,t,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof T&&(e=e._wrapped),t instanceof T&&(t=t._wrapped);var a=c.call(e);if(a!=c.call(t))return!1;switch(a){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var r=n.length;r--;)if(n[r]==e)return i[r]==t;n.push(e),i.push(t);var o=0,s=!0;if("[object Array]"==a){if(o=e.length,s=o==t.length)for(;o--&&(s=D(e[o],t[o],n,i)););}else{var l=e.constructor,u=t.constructor;if(l!==u&&!(T.isFunction(l)&&l instanceof l&&T.isFunction(u)&&u instanceof u))return!1;for(var p in e)if(T.has(e,p)&&(o++,!(s=T.has(t,p)&&D(e[p],t[p],n,i))))break;if(s){for(p in t)if(T.has(t,p)&&!o--)break;s=!o}}return n.pop(),i.pop(),s};T.isEqual=function(e,t){return D(e,t,[],[])},T.isEmpty=function(e){if(null==e)return!0;if(T.isArray(e)||T.isString(e))return 0===e.length;for(var t in e)if(T.has(e,t))return!1;return!0},T.isElement=function(e){return!(!e||1!==e.nodeType)},T.isArray=x||function(e){return"[object Array]"==c.call(e)},T.isObject=function(e){return e===Object(e)},k(["Arguments","Function","String","Number","Date","RegExp"],function(e){T["is"+e]=function(t){return c.call(t)=="[object "+e+"]"}}),T.isArguments(arguments)||(T.isArguments=function(e){return!(!e||!T.has(e,"callee"))}),"function"!=typeof/./&&(T.isFunction=function(e){return"function"==typeof e}),T.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},T.isNaN=function(e){return T.isNumber(e)&&e!=+e},T.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==c.call(e)},T.isNull=function(e){return null===e},T.isUndefined=function(e){return void 0===e},T.has=function(e,t){return u.call(e,t)},T.noConflict=function(){return e._=t,this},T.identity=function(e){return e},T.times=function(e,t,n){for(var i=Array(e),a=0;e>a;a++)i[a]=t.call(n,a);return i},T.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var j={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};j.unescape=T.invert(j.escape);var O={escape:new RegExp("["+T.keys(j.escape).join("")+"]","g"),unescape:new RegExp("("+T.keys(j.unescape).join("|")+")","g")};T.each(["escape","unescape"],function(e){T[e]=function(t){return null==t?"":(""+t).replace(O[e],function(t){return j[e][t]})}}),T.result=function(e,t){if(null==e)return null;var n=e[t];return T.isFunction(n)?n.call(e):n},T.mixin=function(e){k(T.functions(e),function(t){var n=T[t]=e[t];T.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),P.call(this,n.apply(T,e))}})};var _=0;T.uniqueId=function(e){var t=++_+"";return e?e+t:t},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\t|\u2028|\u2029/g;T.template=function(e,t,n){var i;n=T.defaults({},n,T.templateSettings);var a=new RegExp([(n.escape||q).source,(n.interpolate||q).source,(n.evaluate||q).source].join("|")+"|$","g"),r=0,o="__p+='";e.replace(a,function(t,n,i,a,s){return o+=e.slice(r,s).replace(F,function(e){return"\\"+H[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),i&&(o+="'+\n((__t=("+i+"))==null?'':__t)+\n'"),a&&(o+="';\n"+a+"\n__p+='"),r=s+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{i=new Function(n.variable||"obj","_",o)}catch(s){throw s.source=o,s}if(t)return i(t,T);var l=function(e){return i.call(this,e,T)};return l.source="function("+(n.variable||"obj")+"){\n"+o+"}",l},T.chain=function(e){return T(e).chain()};var P=function(e){return this._chain?T(e).chain():e};T.mixin(T),k(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];T.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],P.call(this,n)}}),k(["concat","join","slice"],function(e){var t=i[e];T.prototype[e]=function(){return P.call(this,t.apply(this._wrapped,arguments))}}),T.extend(T.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscoreBase",function(e){return function(){var t;return t||e._}}(this)),define("underscore",["underscoreBase"],function(e){return e.templateSettings={evaluate:/\{\{(.+?)\}\}/g,interpolate:/\{\{=(.+?)\}\}/g,escape:/\{\{-(.+?)\}\}/g},e}),function(e,t){if("function"==typeof define&&define.amd)define("backbone",["underscore","jquery","exports"],function(n,i,a){e.Backbone=t(e,a,n,i)});else if("undefined"!=typeof exports){var n=require("underscore");t(e,exports,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,n,i){var a=e.Backbone,r=[],o=(r.push,r.slice);r.splice;t.VERSION="1.1.2",t.$=i,t.noConflict=function(){return e.Backbone=a,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s=t.Events={on:function(e,t,n){if(!c(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var i=this._events[e]||(this._events[e]=[]);return i.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,i){if(!c(this,"once",e,[t,i])||!t)return this;var a=this,r=n.once(function(){a.off(e,r),t.apply(this,arguments)});return r._callback=t,this.on(e,r,i)},off:function(e,t,i){var a,r,o,s,l,u,p,d;if(!this._events||!c(this,"off",e,[t,i]))return this;if(!e&&!t&&!i)return this._events=void 0,this;for(s=e?[e]:n.keys(this._events),l=0,u=s.length;u>l;l++)if(e=s[l],o=this._events[e]){if(this._events[e]=a=[],t||i)for(p=0,d=o.length;d>p;p++)r=o[p],(t&&t!==r.callback&&t!==r.callback._callback||i&&i!==r.context)&&a.push(r);a.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=o.call(arguments,1);if(!c(this,"trigger",e,t))return this;var n=this._events[e],i=this._events.all;return n&&u(n,t),i&&u(i,arguments),this},stopListening:function(e,t,i){var a=this._listeningTo;if(!a)return this;var r=!t&&!i;i||"object"!=typeof t||(i=this),e&&((a={})[e._listenId]=e);for(var o in a)e=a[o],e.off(t,i,this),(r||n.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,c=function(e,t,n,i){if(!n)return!0;if("object"==typeof n){for(var a in n)e[t].apply(e,[a,n[a]].concat(i));return!1}if(l.test(n)){for(var r=n.split(l),o=0,s=r.length;s>o;o++)e[t].apply(e,[r[o]].concat(i));return!1}return!0},u=function(e,t){var n,i=-1,a=e.length,r=t[0],o=t[1],s=t[2];switch(t.length){case 0:for(;++i<a;)(n=e[i]).callback.call(n.ctx);return;case 1:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r);return;case 2:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,o);return;case 3:for(;++i<a;)(n=e[i]).callback.call(n.ctx,r,o,s);return;default:for(;++i<a;)(n=e[i]).callback.apply(n.ctx,t);return}},p={listenTo:"on",listenToOnce:"once"};n.each(p,function(e,t){s[t]=function(t,i,a){var r=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=n.uniqueId("l"));return r[o]=t,a||"object"!=typeof i||(a=this),t[e](i,a,this),this}}),s.bind=s.on,s.unbind=s.off,n.extend(t,s);var d=t.Model=function(e,t){var i=e||{};t||(t={}),this.cid=n.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(i=this.parse(i,t)||{}),i=n.defaults({},i,n.result(this,"defaults")),this.set(i,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(d.prototype,s,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},set:function(e,t,i){var a,r,o,s,l,c,u,p;if(null==e)return this;if("object"==typeof e?(r=e,i=t):(r={})[e]=t,i||(i={}),!this._validate(r,i))return!1;o=i.unset,l=i.silent,s=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={}),p=this.attributes,u=this._previousAttributes,this.idAttribute in r&&(this.id=r[this.idAttribute]);for(a in r)t=r[a],n.isEqual(p[a],t)||s.push(a),n.isEqual(u[a],t)?delete this.changed[a]:this.changed[a]=t,o?delete p[a]:p[a]=t;if(!l){s.length&&(this._pending=i);for(var d=0,f=s.length;f>d;d++)this.trigger("change:"+s[d],this,p[s[d]],i)}if(c)return this;if(!l)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var i in this.attributes)t[i]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,i=!1,a=this._changing?this._previousAttributes:this.attributes;for(var r in e)n.isEqual(a[r],t=e[r])||((i||(i={}))[r]=t);return i},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,i=e.success;return e.success=function(n){return t.set(t.parse(n,e),e)?(i&&i(t,n,e),void t.trigger("sync",t,n,e)):!1},P(this,e),this.sync("read",this,e)},save:function(e,t,i){var a,r,o,s=this.attributes;if(null==e||"object"==typeof e?(a=e,i=t):(a={})[e]=t,i=n.extend({validate:!0},i),a&&!i.wait){if(!this.set(a,i))return!1}else if(!this._validate(a,i))return!1;a&&i.wait&&(this.attributes=n.extend({},s,a)),void 0===i.parse&&(i.parse=!0);var l=this,c=i.success;return i.success=function(e){l.attributes=s;var t=l.parse(e,i);return i.wait&&(t=n.extend(a||{},t)),n.isObject(t)&&!l.set(t,i)?!1:(c&&c(l,e,i),void l.trigger("sync",l,e,i))},P(this,i),r=this.isNew()?"create":i.patch?"patch":"update","patch"===r&&(i.attrs=a),o=this.sync(r,this,i),a&&i.wait&&(this.attributes=s),o},destroy:function(e){e=e?n.clone(e):{};var t=this,i=e.success,a=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(n){(e.wait||t.isNew())&&a(),i&&i(t,n,e),t.isNew()||t.trigger("sync",t,n,e)},this.isNew())return e.success(),!1;P(this,e);var r=this.sync("delete",this,e);return e.wait||a(),r},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||F();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var i=this.validationError=this.validate(e,t)||null;return i?(this.trigger("invalid",this,i,n.extend(t,{validationError:i})),!1):!0}});var f=["keys","values","pairs","invert","pick","omit"];n.each(f,function(e){d.prototype[e]=function(){var t=o.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var h=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},m={add:!0,remove:!0,merge:!0},g={add:!0,remove:!1};n.extend(h.prototype,s,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,g))},remove:function(e,t){var i=!n.isArray(e);e=i?[e]:n.clone(e),t||(t={});var a,r,o,s;for(a=0,r=e.length;r>a;a++)s=e[a]=this.get(e[a]),s&&(delete this._byId[s.id],delete this._byId[s.cid],o=this.indexOf(s),this.models.splice(o,1),this.length--,t.silent||(t.index=o,s.trigger("remove",s,this,t)),this._removeReference(s,t));return i?e[0]:e},set:function(e,t){t=n.defaults({},t,m),t.parse&&(e=this.parse(e,t));var i=!n.isArray(e);e=i?e?[e]:[]:n.clone(e);var a,r,o,s,l,c,u,p=t.at,f=this.model,h=this.comparator&&null==p&&t.sort!==!1,g=n.isString(this.comparator)?this.comparator:null,v=[],y=[],b={},x=t.add,w=t.merge,C=t.remove,T=!h&&x&&C?[]:!1;for(a=0,r=e.length;r>a;a++){if(l=e[a]||{},o=l instanceof d?s=l:l[f.prototype.idAttribute||"id"],c=this.get(o))C&&(b[c.cid]=!0),w&&(l=l===s?s.attributes:l,t.parse&&(l=c.parse(l,t)),c.set(l,t),h&&!u&&c.hasChanged(g)&&(u=!0)),e[a]=c;else if(x){if(s=e[a]=this._prepareModel(l,t),!s)continue;v.push(s),this._addReference(s,t)}s=c||s,!T||!s.isNew()&&b[s.id]||T.push(s),b[s.id]=!0}if(C){for(a=0,r=this.length;r>a;++a)b[(s=this.models[a]).cid]||y.push(s);y.length&&this.remove(y,t)}if(v.length||T&&T.length)if(h&&(u=!0),this.length+=v.length,null!=p)for(a=0,r=v.length;r>a;a++)this.models.splice(p+a,0,v[a]);else{T&&(this.models.length=0);var k=T||v;for(a=0,r=k.length;r>a;a++)this.models.push(k[a])}if(u&&this.sort({silent:!0}),!t.silent){for(a=0,r=v.length;r>a;a++)(s=v[a]).trigger("add",s,this,t);(u||T&&T.length)&&this.trigger("sort",this,t)}return i?e[0]:e},reset:function(e,t){t||(t={});for(var i=0,a=this.models.length;a>i;i++)this._removeReference(this.models[i],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return o.apply(this.models,arguments)},get:function(e){return null!=e?this._byId[e]||this._byId[e.id]||this._byId[e.cid]:void 0},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,i=this;return e.success=function(n){var a=e.reset?"reset":"set";i[a](n,e),t&&t(i,n,e),i.trigger("sync",i,n,e)},P(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?n.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var i=this,a=t.success;return t.success=function(e,n){t.wait&&i.add(e,t),a&&a(e,n,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e;t=t?n.clone(t):{},t.collection=this;var i=new this.model(e,t);return i.validationError?(this.trigger("invalid",this,i.validationError,t),!1):i},_addReference:function(e,t){this._byId[e.cid]=e,null!=e.id&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,i){("add"!==e&&"remove"!==e||n===this)&&("destroy"===e&&this.remove(t,i),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var v=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(v,function(e){h.prototype[e]=function(){var t=o.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var y=["groupBy","countBy","sortBy","indexBy"];n.each(y,function(e){h.prototype[e]=function(t,i){var a=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,a,i)}});var b=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,w)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},x=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName","events"];n.extend(b.prototype,s,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var i=e[t];if(n.isFunction(i)||(i=this[e[t]]),i){var a=t.match(x),r=a[1],o=a[2];i=n.bind(i,this),r+=".delegateEvents"+this.cid,""===o?this.$el.on(r,i):this.$el.on(r,o,i)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"),!1);else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var i=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(i,!1)}}}),t.sync=function(e,i,a){var r=T[e];n.defaults(a||(a={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:r,dataType:"json"};if(a.url||(o.url=n.result(i,"url")||F()),null!=a.data||!i||"create"!==e&&"update"!==e&&"patch"!==e||(o.contentType="application/json",o.data=JSON.stringify(a.attrs||i.toJSON(a))),a.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),a.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){o.type="POST",a.emulateJSON&&(o.data._method=r);var s=a.beforeSend;a.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",r),s?s.apply(this,arguments):void 0}}"GET"===o.type||a.emulateJSON||(o.processData=!1),"PATCH"===o.type&&C&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var l=a.xhr=t.ajax(n.extend(o,a));return i.trigger("request",i,l,a),l};var C=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var k=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},S=/\((.*?)\)/g,E=/(\(\?)?:\w+/g,N=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(k.prototype,s,{initialize:function(){},route:function(e,i,a){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(i)&&(a=i,i=""),a||(a=this[i]);var r=this;return t.history.route(e,function(n){var o=r._extractParameters(e,n);r.execute(a,o)!==!1&&(r.trigger.apply(r,["route:"+i].concat(o)),r.trigger("route",i,o),t.history.trigger("route",r,i,o))}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(S,"(?:$1)?").replace(E,function(e,t){return t?e:"([^/?]+)"}).replace(N,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var i=e.exec(t).slice(1);return n.map(i,function(e,t){return t===i.length-1?e||null:e?decodeURIComponent(e):null})}});var $=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},D=/^[#\/]|\s+$/g,j=/^\/+|\/+$/g,O=/msie [\w.]+/,_=/\/$/,q=/#.*$/;$.started=!1,n.extend($.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(_,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(D,"")},start:function(e){if($.started)throw new Error("Backbone.history has already been started");$.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var i=this.getFragment(),a=document.documentMode,r=O.exec(navigator.userAgent.toLowerCase())&&(!a||7>=a);if(this.root=("/"+this.root+"/").replace(j,"/"),r&&this._wantsHashChange){var o=t.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=o.hide().appendTo("body")[0].contentWindow,this.navigate(i)}this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=i;var s=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&s.hash&&(this.fragment=this.getHash().replace(D,""),this.history.replaceState({},document.title,this.root+this.fragment))}return this.options.silent?void 0:this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),$.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();
return t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment?!1:(this.iframe&&this.navigate(t),void this.loadUrl())},loadUrl:function(e){return e=this.fragment=this.getFragment(e),n.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0})},navigate:function(e,t){if(!$.started)return!1;t&&t!==!0||(t={trigger:!!t});var n=this.root+(e=this.getFragment(e||""));if(e=e.replace(q,""),this.fragment!==e){if(this.fragment=e,""===e&&"/"!==n&&(n=n.slice(0,-1)),this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var i=e.href.replace(/(javascript:|#).*$/,"");e.replace(i+"#"+t)}else e.hash="#"+t}}),t.history=new $;var H=function(e,t){var i,a=this;i=e&&n.has(e,"constructor")?e.constructor:function(){return a.apply(this,arguments)},n.extend(i,a,t);var r=function(){this.constructor=i};return r.prototype=a.prototype,i.prototype=new r,e&&n.extend(i.prototype,e),i.__super__=a.prototype,i};d.extend=h.extend=k.extend=b.extend=$.extend=H;var F=function(){throw new Error('A "url" property or function must be specified')},P=function(e,t){var n=t.error;t.error=function(i){n&&n(e,i,t),e.trigger("error",e,i,t)}};return t}),function(e,t){"function"==typeof define&&define.amd?define("polyglot",[],function(){return t(e)}):"object"==typeof exports?module.exports=t(e):e.Polyglot=t(e)}(this,function(e){"use strict";function t(e){e=e||{},this.phrases={},this.extend(e.phrases||{}),this.currentLocale=e.locale||"en",this.allowMissing=!!e.allowMissing,this.warn=e.warn||l}function n(e){var t,n,i,a={};for(t in e)if(e.hasOwnProperty(t)){n=e[t];for(i in n)a[n[i]]=t}return a}function i(e){var t=/^\s+|\s+$/g;return e.replace(t,"")}function a(e,t,n){var a,r,s;return null!=n&&e?(r=e.split(u),s=r[o(t,n)]||r[0],a=i(s)):a=e,a}function r(e){var t=n(d);return t[e]||t.en}function o(e,t){return p[r(e)](t)}function s(e,t){for(var n in t)"_"!==n&&t.hasOwnProperty(n)&&(e=e.replace(new RegExp("%\\{"+n+"\\}","g"),t[n]));return e}function l(t){e.console&&e.console.warn&&e.console.warn("WARNING: "+t)}function c(e){var t={};for(var n in e)t[n]=e[n];return t}t.VERSION="0.4.3",t.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},t.prototype.extend=function(e,t){var n;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],t&&(i=t+"."+i),"object"==typeof n?this.extend(n,i):this.phrases[i]=n)},t.prototype.unset=function(e,t){var n;if("string"==typeof e)delete this.phrases[e];else for(var i in e)e.hasOwnProperty(i)&&(n=e[i],t&&(i=t+"."+i),"object"==typeof n?this.unset(n,i):delete this.phrases[i])},t.prototype.clear=function(){this.phrases={}},t.prototype.replace=function(e){this.clear(),this.extend(e)},t.prototype.t=function(e,t){var n,i;return t=null==t?{}:t,"number"==typeof t&&(t={smart_count:t}),"string"==typeof this.phrases[e]?n=this.phrases[e]:"string"==typeof t._?n=t._:this.allowMissing?n=e:(this.warn('Missing translation for key: "'+e+'"'),i=e),"string"==typeof n&&(t=c(t),i=a(n,this.currentLocale,t.smart_count),i=s(i,t)),i},t.prototype.has=function(e){return e in this.phrases};var u="||||",p={chinese:function(e){return 0},german:function(e){return 1!==e?1:0},french:function(e){return e>1?1:0},russian:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?1:2},czech:function(e){return 1===e?0:e>=2&&4>=e?1:2},polish:function(e){return 1===e?0:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?1:2},icelandic:function(e){return e%10!==1||e%100===11?1:0}},d={chinese:["fa","id","ja","ko","lo","ms","th","tr","zh"],german:["da","de","en","es","fi","el","he","hu","it","nl","no","pt","sv"],french:["fr","tl","pt-br"],russian:["hr","ru"],czech:["cs"],polish:["pl"],icelandic:["is"]};return t}),define("models/component",["jquery","underscore","backbone"],function(e,t,n){return n.Model.extend({initialize:function(){this.has("fresh")||this.set("fresh",!0)},getValues:function(){return t.reduce(this.get("fields"),function(e,n,i){return"select"==n.type?e[i]=t.find(n.value,function(e){return e.selected}).value:e[i]=n.value,e},{})},setField:function(e,t){var n=this.get("fields");n[e].value=t,this.set("fields",n)},getField:function(e){var t=this.get("fields");return t[e].value}})}),define("text",["module"],function(e){"use strict";var t,n,i=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,r=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,o="undefined"!=typeof location&&location.href,s=o&&location.protocol&&location.protocol.replace(/\:/,""),l=o&&location.hostname,c=o&&(location.port||void 0),u=[],p=e.config&&e.config()||{};return t={version:"2.0.5",strip:function(e){if(e){e=e.replace(a,"");var t=e.match(r);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=i[t];try{e=new ActiveXObject(n)}catch(a){}if(e){i=[n];break}}return e},parseName:function(e){var t,n,i,a=!1,r=e.indexOf("."),o=0===e.indexOf("./")||0===e.indexOf("../");return-1!==r&&(!o||r>1)?(t=e.substring(0,r),n=e.substring(r+1,e.length)):t=e,i=n||t,r=i.indexOf("!"),-1!==r&&(a="strip"===i.substring(r+1),i=i.substring(0,r),n?n=i:t=i),{moduleName:t,ext:n,strip:a}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,i,a){var r,o,s,l=t.xdRegExp.exec(e);return l?(r=l[2],o=l[3],o=o.split(":"),s=o[1],o=o[0],!(r&&r!==n||o&&o.toLowerCase()!==i.toLowerCase()||(s||o)&&s!==a)):!0},finishLoad:function(e,n,i,a){i=n?t.strip(i):i,p.isBuild&&(u[e]=i),a(i)},load:function(e,n,i,a){if(a.isBuild&&!a.inlineText)return void i();p.isBuild=a.isBuild;var r=t.parseName(e),u=r.moduleName+(r.ext?"."+r.ext:""),d=n.toUrl(u),f=p.useXhr||t.useXhr;!o||f(d,s,l,c)?t.get(d,function(n){t.finishLoad(e,r.strip,n,i)},function(e){i.error&&i.error(e)}):n([u],function(e){t.finishLoad(r.moduleName+"."+r.ext,r.strip,e,i)})},write:function(e,n,i,a){if(u.hasOwnProperty(n)){var r=t.jsEscape(u[n]);i.asModule(e+"!"+n,"define(function () { return '"+r+"';});\n")}},writeFile:function(e,n,i,a,r){var o=t.parseName(n),s=o.ext?"."+o.ext:"",l=o.moduleName+s,c=i.toUrl(o.moduleName+s)+".js";t.load(l,i,function(n){var i=function(e){return a(c,e)};i.asModule=function(e,t){return a.asModule(e,c,t)},t.write(e,l,i,r)},r)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node?(n=require.nodeRequire("fs"),t.get=function(e,t){var i=n.readFileSync(e,"utf8");0===i.indexOf("\ufeff")&&(i=i.substring(1)),t(i)}):"xhr"===p.env||!p.env&&t.createXhr()?t.get=function(e,n,i,a){var r,o=t.createXhr();if(o.open("GET",e,!0),a)for(r in a)a.hasOwnProperty(r)&&o.setRequestHeader(r.toLowerCase(),a[r]);p.onXhr&&p.onXhr(o,e),o.onreadystatechange=function(t){var a,r;4===o.readyState&&(a=o.status,a>399&&600>a?(r=new Error(e+" HTTP status: "+a),r.xhr=o,i(r)):n(o.responseText))},o.send(null)}:("rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java)&&(t.get=function(e,t){var n,i,a="utf-8",r=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),a)),l="";try{for(n=new java.lang.StringBuffer,i=s.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),n.append(i);null!==(i=s.readLine());)n.append(o),n.append(i);l=String(n.toString())}finally{s.close()}t(l)}),t}),define("text!templates/app/recaptcha.html",[],function(){return'<!-- reCAPTCHA -->{{ if ( siteKey ) { }}\n<div class="form-group{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    <div id="{{= id }}" class="g-recaptcha" data-sitekey="{{= siteKey }}" data-theme="{{= theme }}" data-type="{{= type }}" data-size="{{= size }}"></div>\n</div>\n{{ } else { }}\n<div class="g-recaptcha" data-sitekey="your_site_key"></div>\n{{ } }}'}),define("text!templates/popover/popover-main.html",[],function(){return'\n<form class="form">{{= basicFields }}{{ if (advancedFields) { }}\n<p><a id="collapseLink" href="javascript:void(0)" data-toggle="collapse" data-target="#collapseAdvancedFields" aria-expanded="false" aria-controls="collapseAdvancedFields">{{= polyglot.t(\'popover.more\') }}</a></p>\n<div class="collapse" id="collapseAdvancedFields">\n{{= advancedFields }}</div>{{ } }}\n<hr/>\n<button id="save" class="btn btn-primary">{{= polyglot.t(\'popover.save\') }}</button> <button id="delete" class="btn btn-danger">{{= polyglot.t(\'popover.delete\') }}</button> <button id="cancel" class="btn btn-default">{{= polyglot.t(\'popover.cancel\') }}</button>\n</form>\n'}),define("text!templates/popover/popover-input.html",[],function(){return'{{ if(name !== "id") {}}<div class="form-group">\n    <label class="control-label"> {{= polyglot.t(label) }} </label>\n    <input class="input-large field form-control" data-type="{{= type }}" type="text" name="{{= name }}" id="{{= name }}" value="{{- value }}" />\n</div>{{ } }}\n'}),define("text!templates/popover/popover-select.html",[],function(){return'<div class="form-group">\n    <label class="control-label"> {{= polyglot.t(label) }} </label>\n    <select class="field form-control" data-type="{{= type }}" id=\'{{= name }}\'>{{ _.each(value, function(v,k){ }}\n        <option value="{{= v["value"] }}"{{ if (v["selected"]){ }} selected{{ } }}>{{= v["label"] }}</option>{{ }); }}\n    </select>\n</div>'}),define("text!templates/popover/popover-textarea.html",[],function(){return'<div class="form-group">\n    <label class="control-label"> {{= polyglot.t(label) }} </label>\n    <textarea class="field form-control" data-type="{{= type }}" style="min-height: 100px" id="{{= name }}">{{= value }}</textarea>\n</div>\n'}),define("text!templates/popover/popover-textarea-split.html",[],function(){return'<div class="form-group">\n    <label class="control-label"> {{= polyglot.t(label) }} </label>\n    <textarea class="field form-control" data-type="{{= type }}" style="min-height: 100px" id="{{= name }}">{{ for ( var i = 0; i < value.length ; i++ ) { }}{{= value[i] }}{{ if (i < value.length - 1) { }}{{= "\\n" }}{{ } }}{{ } }}</textarea>\n</div>\n'}),define("text!templates/popover/popover-checkbox.html",[],function(){return'<div class="checkbox">\n    <label>\n        <input type="checkbox" data-type="{{= type }}" class="input-inline field" name="{{= name }}" id="{{= name }}"{{ if(value) {}} checked="checked" {{ } }}>\n        {{= polyglot.t(label) }}\n    </label>\n</div>\n'}),define("text!templates/component/heading.html",[],function(){return'{{ if(containerClass) { }}<!-- Heading -->\n<div class="{{= containerClass }}">\n    <{{= type }} {{ if(cssClass) { }}class="{{= cssClass }}"{{ } }}>{{= text }}</{{= type }}>\n</div>\n{{ } else { }}<!-- Heading -->\n<{{= type }} {{ if(cssClass) { }}class="{{= cssClass }}"{{ } }}>{{= text }}</{{= type}}>\n{{ } }}'}),define("text!templates/component/paragraph.html",[],function(){return'{{ if(containerClass) { }}<!-- Paragraph Text -->\n<div class="{{= containerClass }}">\n    <p{{ if(cssClass) { }} class="{{= cssClass }}" {{ } }}>{{= text }}</p>\n</div>\n{{ } else { }}<!-- Paragraph Text -->\n<p{{ if(cssClass) { }} class="{{= cssClass }}"{{ } }}>{{= text }}</p>\n{{ } }}'}),define("text!templates/component/text.html",[],function(){return'<!-- Text -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <input type="{{= inputType }}" id="{{= id }}" name="{{= id }}" value="{{= predefinedValue }}"{{ if (pattern) { }} pattern="{{= pattern }}"{{ } }}{{ if (placeholder) { }}placeholder="{{= placeholder }}" {{ } }}{{ if (cssClass) { }}class="{{= cssClass }}" {{ } }}{{ if(required) {}}required {{ } }}{{ if (unique) { }}data-unique="{{= unique }}" {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) { }}disabled {{ } }}>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/number.html",[],function(){return'<!-- Number -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <input type="{{= inputType }}" id="{{= id }}" name="{{= id }}" value="{{= predefinedValue }}"{{ if (min) { }} min="{{= min }}"{{ } }}{{ if (max) { }} max="{{= max }}"{{ } }}{{ if (step) { }} step="{{= step }}"{{ } }}{{ if (integerOnly) { }} data-integer-only="{{= integerOnly }}"{{ } }}{{ if (integerPattern) { }} data-integer-pattern="{{= integerPattern }}"{{ } }}{{ if (numberPattern) { }} data-number-pattern="{{= numberPattern }}"{{ } }}{{ if (placeholder) { }} placeholder="{{= placeholder }}"{{ } }} {{ if (cssClass) { }} class="{{= cssClass }}"{{ } }} {{ if(required) { }} required{{ } }}{{ if (unique) { }} data-unique="{{= unique }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/date.html",[],function(){return'<!-- Date -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <input type="{{= inputType }}" id="{{= id }}" name="{{= id }}" value="{{= predefinedValue }}"{{ if (min) { }} min="{{= min }}"{{ } }}{{ if(max) { }} max="{{= max }}"{{ } }}{{ if(step) { }} step="{{= step }}"{{ } }}{{ if (placeholder) { }} placeholder="{{= placeholder }}"{{ } }}{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if(required) {}} required{{ } }}{{ if (unique) { }} data-unique="{{= unique }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/email.html",[],function(){return'<!-- Email -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <input type="email" id="{{= id }}" name="{{= id }}" value="{{= predefinedValue }}"{{ if (pattern) { }} pattern="{{= pattern }}"{{ } }}{{ if (placeholder) { }} placeholder="{{= placeholder }}"{{ } }}{{ if (checkdns) { }} data-check-dns="true"{{ } }}{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if (multiple) { }} multiple{{ } }}{{ if(required) {}} required{{ } }}{{ if (unique) { }} data-unique="{{= unique }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/textarea.html",[],function(){return'<!-- Text Area -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <textarea id="{{= id }}" name="{{= id }}" rows="{{= fieldSize }}" {{ if (cssClass) { }}class="{{= cssClass }}" {{ } }}{{ if (placeholder) { }}placeholder="{{= placeholder }}" {{ } }}{{ if(required) {}}required {{ } }}{{ if (unique) { }}data-unique="{{= unique }}" {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) { }}disabled {{ } }}>{{= predefinedValue }}</textarea>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/checkbox.html",[],function(){return'<!-- Checkbox -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if(inline) { }} inline-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">{{ if (label) { }}\n    <label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}{{ _.each(checkboxes, function(checkbox, i){ var items = checkbox.split("|"); var last = items[items.length-1]; var checked = last==="check"; checkbox = items[0]; var value = ((items.length >= 3) || (items.length == 2) && !checked) ? items[1] : items[0]; var figure =  ((items.length == 4 && checked) || (items.length == 3) && !checked) ? items[2] : false; }}{{ if (!inline) { }}\n    <div class="checkbox">{{ } }}\n        <label for="{{= id+\'_\'+i }}"{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}>{{ if(figure) { }}\n        <span class="figure">{{ if (figure.indexOf("http") == 0) { }}<img src="{{= figure }}" />{{ } else { }}<span class="{{= figure }}"> </span>{{ } }}</span>{{ } }}\n        <input type="checkbox" name="{{= id }}[]" id="{{= id+\'_\'+i }}" value="{{= value }}"{{ if(required){ }}data-required="true" {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) {}}disabled {{ } }} {{ if(checked) { }}checked {{ } }}> {{= checkbox }} </label>{{ if (!inline) { }}\n    </div>{{ } }}{{ }); }}\n    <span id="{{= id }}"></span>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/radio.html",[],function(){return'<!-- Radio -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if(inline) { }} inline-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">{{ if (label) { }}\n    <label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}{{ _.each(radios, function(radio, i){ var items = radio.split("|"); var last = items[items.length-1]; var checked = last==="select"; var radio = items[0]; var value = ((items.length >= 3) || (items.length == 2) && !checked) ? items[1] : items[0]; var figure =  ((items.length == 4 && checked) || (items.length == 3) && !checked) ? items[2] : false; }}{{ if (!inline) { }}\n    <div class="radio">{{ } }}\n        <label for="{{= id+\'_\'+i }}" {{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}>{{ if(figure) { }}\n        <span class="figure">{{ if (figure.indexOf("http") == 0) { }}<img src="{{= figure }}" />{{ } else { }}<span class="{{= figure }}"> </span>{{ } }}</span>{{ } }}\n        <input type="radio" name="{{= id }}" id="{{= id+\'_\'+i }}" value="{{= value }}"{{ if (checked) { }}checked {{ } }}{{ if(required) { }}required {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) { }}disabled {{ } }}> {{= radio }} </label>{{ if (!inline) { }}\n    </div>{{ } }}{{ }); }}\n    <span id="{{= id }}"></span>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/selectlist.html",[],function(){return'<!-- Select List -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <select id="{{= id }}" name="{{= id }}[]" {{ if (cssClass) { }} class="{{= cssClass }}"{{ } }} {{ if(required) { }}required {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) { }}disabled {{ } }}{{ if (multiple) { }}multiple {{ } }} >{{ if(placeholder) { }}\n        <option value="" disabled selected>{{= placeholder }}</option>{{ } }}{{ _.each(options, function(option) { var items = option.split("|"); var last = items[items.length-1]; var selected = (last==="select"); var option = items[0]; var value = ((items.length == 3 && selected) || (items.length == 2) && !selected) ? items[1] : items[0]; }}\n        <option value="{{= value }}"{{ if (selected) { }} selected{{ } }}>{{= option }}</option>{{ }); }}\n    </select>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/hidden.html",[],function(){return'<!-- Hidden -->\n<div class="form-group">\n    <input type="hidden" id="{{= id }}" name="{{= id }}" value="{{- predefinedValue }}" {{ if (label) { }}data-label="{{- label }}" {{ } }}{{ if (disabled) { }}disabled{{ } }}>\n</div>\n'}),define("text!templates/component/file.html",[],function(){return'<!-- File -->\n<div class="form-group{{ if(required) { }} required-control{{ } }}{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if (label) { }}<label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>{{ } }}\n    <input type="file" id="{{= id }}" name="{{= id }}" accept="{{= accept }}" {{ if (minSize) { }} data-min-size="{{= minSize }}" {{ } }}{{ if(maxSize) { }}data-max-size="{{= maxSize }}" {{ } }}{{ if(cssClass) { }}class="{{= cssClass }}" {{ } }} {{ if(required){ }}required {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) { }}disabled {{ } }}>{{ if (helpText) { }}\n    <p class="help-block">{{= helpText }}</p>{{ } }}\n</div>\n'}),define("text!templates/component/snippet.html",[],function(){return'<!-- Snippet -->\n{{ if (containerClass) { }}<div class="snippet {{= containerClass }}">{{= snippet }}</div>{{ } else { }}<div class="snippet">{{= snippet }}</div>{{ } }}\n'}),define("text!templates/component/recaptcha.html",[],function(){return'<!-- reCAPTCHA -->\n<div id="recaptcha">\n    <div class="rc">\n        <div class="pull-left">\n            <div class="rc-checkbox"></div>\n        </div>\n        <div class="pull-left">\n            <div class="rc-label">I\'m not a robot</div>\n        </div>\n        <div class="pull-right">\n            <div class="rc-logo">\n                <div class="rc-logo-img rc-logo-img-portrait"></div>\n                <div class="rc-logo-text">reCAPTCHA</div>\n            </div>\n            <div class="rc-anchor-pt">\n                <span>Privacy</span> - <span>Terms</span>\n            </div>\n        </div>\n    </div>\n</div>\n'}),define("text!templates/component/pagebreak.html",[],function(){return'<!-- Page Break -->\n<div class="page-break" data-button-previous="{{= prev }}" data-button-next="{{= next }}"></div>\n'}),define("text!templates/component/button.html",[],function(){return'{{ if (buttonText) {  } }} {{ if (label) { }}<!-- Button -->\n<div class="form-action{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    <label {{ if (labelClass) { }} class="{{= labelClass }}"{{ } }} for="{{= id }}">{{= label }}</label>\n    {{ if ( inputType !== "image" ) { }}<button type="{{= inputType }}" id="{{= id }}" name="{{= id }}"{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{= buttonText }}</button>{{ } else { }}<input type="image" src="{{= src }}" id="{{= id }}" name="{{= id }}"{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{ } }}\n</div>\n{{ } else { }}<!-- Button -->\n<div class="form-action{{ if (containerClass) { }} {{= containerClass }}{{ } }}">\n    {{ if ( inputType !== "image" ) { }}<button type="{{= inputType }}" id="{{= id }}" name="{{= id }}"{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if(readOnly) { }} readOnly{{ } }}{{ if(disabled) { }} disabled{{ } }}>{{= buttonText }}</button>{{ } else { }}<input type="image" src="{{= src }}" id="{{= id }}" name="{{= id }}"{{ if (cssClass) { }} class="{{= cssClass }}"{{ } }}{{ if(readOnly) { }} readOnly {{ } }}{{ if(disabled) { }} disabled{{ } }}>{{ } }}\n</div>\n{{ } }}'}),define("templates/component/templates",["require","text!templates/component/heading.html","text!templates/component/paragraph.html","text!templates/component/text.html","text!templates/component/number.html","text!templates/component/date.html","text!templates/component/email.html","text!templates/component/textarea.html","text!templates/component/checkbox.html","text!templates/component/radio.html","text!templates/component/selectlist.html","text!templates/component/hidden.html","text!templates/component/file.html","text!templates/component/snippet.html","text!templates/component/recaptcha.html","text!templates/component/pagebreak.html","text!templates/component/button.html"],function(e){var t=e("text!templates/component/heading.html"),n=e("text!templates/component/paragraph.html"),i=e("text!templates/component/text.html"),a=e("text!templates/component/number.html"),r=e("text!templates/component/date.html"),o=e("text!templates/component/email.html"),s=e("text!templates/component/textarea.html"),l=e("text!templates/component/checkbox.html"),c=e("text!templates/component/radio.html"),u=e("text!templates/component/selectlist.html"),p=e("text!templates/component/hidden.html"),d=e("text!templates/component/file.html"),f=e("text!templates/component/snippet.html"),h=e("text!templates/component/recaptcha.html"),m=e("text!templates/component/pagebreak.html"),g=e("text!templates/component/button.html");return{heading:t,paragraph:n,text:i,number:a,date:r,email:o,textarea:s,checkbox:l,radio:c,selectlist:u,hidden:p,file:d,snippet:f,recaptcha:h,pagebreak:m,button:g}}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var a=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(a,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var n=e(this),a=n.data("bs.alert");a||n.data("bs.alert",a=new i(this)),"string"==typeof t&&a[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.3.4",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){o.detach().trigger("closed.bs.alert").remove()}var a=e(this),r=a.attr("data-target");r||(r=a.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=e(r);t&&t.preventDefault(),o.length||(o=a.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var a=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=a,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.button"),r="object"==typeof t&&t;a||i.data("bs.button",a=new n(this,r)),"toggle"==t?a.toggle():t&&a.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.4",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,a=i.is("input")?"val":"html",r=i.data();t+="Text",null==r.resetText&&i.data("resetText",i[a]()),setTimeout(e.proxy(function(){i[a](null==r[t]?this.options[t]:r[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));e&&this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target);i.hasClass("btn")||(i=i.closest(".btn")),t.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.carousel"),r=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),o="string"==typeof t?t:r.slide;a||i.data("bs.carousel",a=new n(this,r)),"number"==typeof t?a.to(t):o?a[o]():r.interval&&a.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.4",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i="prev"==e&&0===n||"next"==e&&n==this.$items.length-1;if(i&&!this.options.wrap)return t;var a="prev"==e?-1:1,r=(n+a)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(t,i){var a=this.$element.find(".item.active"),r=i||this.getItemForDirection(t,a),o=this.interval,s="next"==t?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;
var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=e(this.$indicators.children()[this.getItemIndex(r)]);p&&p.addClass("active")}var d=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,a.addClass(s),r.addClass(s),a.one("bsTransitionEnd",function(){r.removeClass([t,s].join(" ")).addClass("active"),a.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(a.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),o&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var a=function(n){var i,a=e(this),r=e(a.attr("data-target")||(i=a.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var o=e.extend({},r.data(),a.data()),s=a.attr("data-slide-to");s&&(o.interval=!1),t.call(r,o),s&&r.data("bs.carousel").to(s),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",a).on("click.bs.carousel.data-api","[data-slide-to]",a),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),+function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(i)}function n(t){return this.each(function(){var n=e(this),a=n.data("bs.collapse"),r=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!a&&r.toggle&&/show|hide/.test(t)&&(r.toggle=!1),a||n.data("bs.collapse",a=new i(this,r)),"string"==typeof t&&a[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.4",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,a=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(a&&a.length&&(t=a.data("bs.collapse"),t&&t.transitioning))){var r=e.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){a&&a.length&&(n.call(a,"hide"),t||a.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[o](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var a=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION):a.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var a=e(i);this.addAriaAndCollapsedClass(t(a),a)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var a=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=a,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var a=e(this);a.attr("data-target")||i.preventDefault();var r=t(a),o=r.data("bs.collapse"),s=o?"toggle":a.data();n.call(r,s)})}(jQuery),+function(e){"use strict";function t(t){t&&3===t.which||(e(a).remove(),e(r).each(function(){var i=e(this),a=n(i),r={relatedTarget:this};a.hasClass("open")&&(a.trigger(t=e.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||(i.attr("aria-expanded","false"),a.removeClass("open").trigger("hidden.bs.dropdown",r)))}))}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new o(this)),"string"==typeof t&&i[t].call(n)})}var a=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(t){e(t).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.4",o.prototype.toggle=function(i){var a=e(this);if(!a.is(".disabled, :disabled")){var r=n(a),o=r.hasClass("open");if(t(),!o){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t);var s={relatedTarget:this};if(r.trigger(i=e.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;a.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var a=n(i),o=a.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&a.find(r).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=a.find('[role="menu"]'+s+', [role="listbox"]'+s);if(l.length){var c=l.index(t.target);38==t.which&&c>0&&c--,40==t.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var s=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=o,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',o.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',o.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,i){return this.each(function(){var a=e(this),r=a.data("bs.modal"),o=e.extend({},n.DEFAULTS,a.data(),"object"==typeof t&&t);r||a.data("bs.modal",r=new n(this,o)),"string"==typeof t?r[t](i):o.show&&r.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.4",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this,a=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(a),this.isShown||a.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var a=e.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),a&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:t});a?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var i=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&a;if(this.$backdrop=e('<div class="modal-backdrop '+a+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){i.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):o()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),a=i.attr("href"),r=e(i.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(a)&&a},r.data(),i.data());i.is("a")&&n.preventDefault(),r.one("show.bs.modal",function(e){e.isDefaultPrevented()||r.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(r,o,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.tooltip"),r="object"==typeof t&&t;(a||!/destroy|hide/.test(t))&&(a||i.data("bs.tooltip",a=new n(this,r)),"string"==typeof t&&a[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",e,t)};n.VERSION="3.3.4",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,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,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var a=this.options.trigger.split(" "),r=a.length;r--;){var o=a[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focusin",l="hover"==o?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n&&n.$tip&&n.$tip.is(":visible")?void(n.hoverState="in"):(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var i=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!i)return;var a=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(s);c&&(s=s.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);var u=this.getPosition(),p=r[0].offsetWidth,d=r[0].offsetHeight;if(c){var f=s,h=this.options.container?e(this.options.container):this.$element.parent(),m=this.getPosition(h);s="bottom"==s&&u.bottom+d>m.bottom?"top":"top"==s&&u.top-d<m.top?"bottom":"right"==s&&u.right+p>m.width?"left":"left"==s&&u.left-p<m.left?"right":s,r.removeClass(f).addClass(s)}var g=this.getCalculatedOffset(s,u,p,d);this.applyPlacement(g,s);var v=function(){var e=a.hoverState;a.$element.trigger("shown.bs."+a.type),a.hoverState=null,"out"==e&&a.leave(a)};e.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",v).emulateTransitionEnd(n.TRANSITION_DURATION):v()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),a=i[0].offsetWidth,r=i[0].offsetHeight,o=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(s)&&(s=0),t.top=t.top+o,t.left=t.left+s,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(t.top=t.top+r-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var p=/top|bottom/.test(n),d=p?2*u.left-a+l:2*u.top-r+c,f=p?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(d,i[0][f],p)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function i(){"in"!=a.hoverState&&r.detach(),a.$element.removeAttr("aria-describedby").trigger("hidden.bs."+a.type),t&&t()}var a=this,r=e(this.$tip),o=e.Event("hide.bs."+this.type);return this.$element.trigger(o),o.isDefaultPrevented()?void 0:(r.removeClass("in"),e.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName,a=n.getBoundingClientRect();null==a.width&&(a=e.extend({},a,{width:a.right-a.left,height:a.bottom-a.top}));var r=i?{top:0,left:0}:t.offset(),o={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=i?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},a,o,s,r)},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var a={top:0,left:0};if(!this.$viewport)return a;var r=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-r-o.scroll,l=t.top+r-o.scroll+i;s<o.top?a.top=o.top-s:l>o.top+o.height&&(a.top=o.top+o.height-l)}else{var c=t.left-r,u=t.left+r+n;c<o.left?a.left=o.left-c:u>o.width&&(a.left=o.left+o.width-u)}return a},n.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},n.prototype.getUID=function(e){do e+=~~(1e6*Math.random());while(document.getElementById(e));return e},n.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&(n=e(t.currentTarget).data("bs."+this.type),n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type)})};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.popover"),r="object"==typeof t&&t;(a||!/destroy|hide/.test(t))&&(a||i.data("bs.popover",a=new n(this,r)),"string"==typeof t&&a[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.4",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),+function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),a=i.data("bs.scrollspy"),r="object"==typeof n&&n;a||i.data("bs.scrollspy",a=new t(this,r)),"string"==typeof n&&a[n]()})}t.VERSION="3.3.4",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),a=t.data("target")||t.attr("href"),r=/^#./.test(a)&&e(a);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,a]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),a=this.offsets,r=this.targets,o=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return o!=(e=r[r.length-1])&&this.activate(e);if(o&&t<a[0])return this.activeTarget=null,this.clear();for(e=a.length;e--;)o!=r[e]&&t>=a[e]&&(void 0===a[e+1]||t<a[e+1])&&this.activate(r[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.tab");a||i.data("bs.tab",a=new n(this)),"string"==typeof t&&a[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.4",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var a=n.find(".active:last a"),r=e.Event("hide.bs.tab",{relatedTarget:t[0]}),o=e.Event("show.bs.tab",{relatedTarget:a[0]});if(a.trigger(r),t.trigger(o),!o.isDefaultPrevented()&&!r.isDefaultPrevented()){var s=e(i);this.activate(t.closest("li"),n),this.activate(s,s.parent(),function(){a.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:a[0]})})}}},n.prototype.activate=function(t,i,a){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),a&&a()}var o=i.find("> .active"),s=a&&e.support.transition&&(o.length&&o.hasClass("fade")||!!i.find("> .fade").length);o.length&&s?o.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),o.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var a=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',a).on("click.bs.tab.data-api",'[data-toggle="pill"]',a)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),a=i.data("bs.affix"),r="object"==typeof t&&t;a||i.data("bs.affix",a=new n(this,r)),"string"==typeof t&&a[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.4",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var a=this.$target.scrollTop(),r=this.$element.offset(),o=this.$target.height();if(null!=n&&"top"==this.affixed)return n>a?"top":!1;if("bottom"==this.affixed)return null!=n?a+this.unpin<=r.top?!1:"bottom":e-i>=a+o?!1:"bottom";var s=null==this.affixed,l=s?a:r.top,c=s?o:t;return null!=n&&n>=a?"top":null!=i&&l+c>=e-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,a=i.top,r=i.bottom,o=e(document.body).height();"object"!=typeof i&&(r=a=i),"function"==typeof a&&(a=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var s=this.getState(o,t,a,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:o-t-r})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),define("bootstrap",["jquery"],function(){}),function(e){"use strict";var t=e.fn.popover,n=function(e,n){t.Constructor.apply(this,arguments)};n.prototype=e.extend({},t.Constructor.prototype,{constructor:n,_super:function(){var n=e.makeArray(arguments);t.Constructor.prototype[n.shift()].apply(this,n)},show:function(){var e,t,n,i,a,r,o;if(this.hasContent&&this.enabled){switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(r),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),i=e[0].offsetWidth,a=e[0].offsetHeight,t?r.split(" ")[1]:r){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":o={top:n.top-a,left:n.left+n.width/2-i/2};break;case"left":o={top:n.top+n.height/2-a/2,left:n.left-i};break;case"right":o={top:n.top+n.height/2-a/2,left:n.left+n.width};break;case"topLeft":o={top:n.top-a,left:n.left+n.width/2-.25*i};break;case"topRight":o={top:n.top-a,left:n.left+n.width/2-.75*i};break;case"rightTop":o={top:n.top+n.height/2-.2*a,left:n.left+n.width};break;case"rightBottom":o={top:n.top+n.height/2-.75*a,left:n.left+n.width};break;case"bottomLeft":o={top:n.top+n.height,left:n.left+n.width/2-.25*i};break;case"bottomRight":o={top:n.top+n.height,left:n.left+n.width/2-.75*i};break;case"leftTop":o={top:n.top+n.height/2-.25*a,left:n.left-i};break;case"leftBottom":o={top:n.top+n.height/2-.75*a,left:n.left-i}}e.css(o).addClass(r).addClass("in")}}}),e.fn.popover=e.extend(function(t){return this.each(function(){var i=e(this),a=i.data("popover"),r="object"==typeof t&&t;a||i.data("popover",a=new n(this,r)),"string"==typeof t&&a[t]()})},t)}(jQuery),define("popover-extra-placements",["jquery","bootstrap"],function(){}),define("views/component",["jquery","underscore","backbone","text!templates/app/recaptcha.html","text!templates/popover/popover-main.html","text!templates/popover/popover-input.html","text!templates/popover/popover-select.html","text!templates/popover/popover-textarea.html","text!templates/popover/popover-textarea-split.html","text!templates/popover/popover-checkbox.html","templates/component/templates","bootstrap","popover-extra-placements"],function(e,t,n,i,a,r,o,s,l,c,u){return n.View.extend({tagName:"div",className:"component",
initialize:function(){this.template=t.template(u[this.model.get("name")]),this.recaptchaTemplate=t.template(i),this.popoverTemplates={input:t.template(r),select:t.template(o),textarea:t.template(s),"textarea-split":t.template(l),checkbox:t.template(c)}},render:function(e){var n=this,i={},r={};t.map(n.model.get("fields"),function(e,t){e.advanced===!0?r[t]=e:i[t]=e});var o=t.reduce(i,function(e,t,i){return t.name=i,e+n.popoverTemplates[t.type](t)},""),s=t.reduce(r,function(e,t,i){return t.name=i,e+n.popoverTemplates[t.type](t)},""),l=t.template(a)({title:polyglot.t(n.model.get("title")),basicFields:o,advancedFields:s});if(e)return this.$el.html(n.template(n.model.getValues())).attr({"class":"component "+n.model.get("name"),"data-content":l,"data-title":polyglot.t(n.model.get("title")),"data-trigger":"manual","data-placement":"rightTop","data-html":!0});if("recaptcha"===n.model.get("name")){var c=n.model.getValues();return c.siteKey=options.reCaptchaSiteKey,this.$el.html(n.recaptchaTemplate(c))}return this.$el.html(n.template(n.model.getValues()))}})}),define("text!templates/widget/checkbox.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> {{= polyglot.t(\'widget.checkbox\') }}</span>'}),define("text!templates/widget/file.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span> {{= polyglot.t(\'widget.file\') }}</span>'}),define("text!templates/widget/heading.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-header" aria-hidden="true"></span> {{= polyglot.t(\'widget.heading\') }}</span>'}),define("text!templates/widget/paragraph.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-justify" aria-hidden="true"></span> {{= polyglot.t(\'widget.paragraph\') }}</span>'}),define("text!templates/widget/radio.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-record" aria-hidden="true"></span> {{= polyglot.t(\'widget.radio\') }}</span>'}),define("text!templates/widget/selectlist.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-expand" aria-hidden="true"></span> {{= polyglot.t(\'widget.selectList\') }}</span>'}),define("text!templates/widget/textarea.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> {{= polyglot.t(\'widget.textArea\') }}</span>'}),define("text!templates/widget/text.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-text-resize" aria-hidden="true"></span> {{= polyglot.t(\'widget.text\') }}</span>'}),define("text!templates/widget/snippet.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-embed" aria-hidden="true"></span> {{= polyglot.t(\'widget.snippet\') }}</span>\n'}),define("text!templates/widget/recaptcha.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-shield" aria-hidden="true"></span> {{= polyglot.t(\'widget.recaptcha\') }}</span>\n'}),define("text!templates/widget/number.html",[],function(){return'<span class="btn btn-widget"><span class="number-icon" aria-hidden="true">123</span> {{= polyglot.t(\'widget.number\') }}</span>'}),define("text!templates/widget/date.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span> {{= polyglot.t(\'widget.date\') }}</span>'}),define("text!templates/widget/email.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> {{= polyglot.t(\'widget.email\') }}</span>'}),define("text!templates/widget/hidden.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span> {{= polyglot.t(\'widget.hidden\') }}</span>'}),define("text!templates/widget/pagebreak.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-scissors-alt" aria-hidden="true"></span> {{= polyglot.t(\'widget.pageBreak\') }}</span>'}),define("text!templates/widget/button.html",[],function(){return'<span class="btn btn-widget"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {{= polyglot.t(\'widget.button\') }}</span>'}),define("templates/widget/templates",["require","text!templates/widget/checkbox.html","text!templates/widget/file.html","text!templates/widget/heading.html","text!templates/widget/paragraph.html","text!templates/widget/radio.html","text!templates/widget/selectlist.html","text!templates/widget/textarea.html","text!templates/widget/text.html","text!templates/widget/snippet.html","text!templates/widget/recaptcha.html","text!templates/widget/number.html","text!templates/widget/date.html","text!templates/widget/email.html","text!templates/widget/hidden.html","text!templates/widget/pagebreak.html","text!templates/widget/button.html"],function(e){var t=e("text!templates/widget/checkbox.html"),n=e("text!templates/widget/file.html"),i=e("text!templates/widget/heading.html"),a=e("text!templates/widget/paragraph.html"),r=e("text!templates/widget/radio.html"),o=e("text!templates/widget/selectlist.html"),s=e("text!templates/widget/textarea.html"),l=e("text!templates/widget/text.html"),c=e("text!templates/widget/snippet.html"),u=e("text!templates/widget/recaptcha.html"),p=e("text!templates/widget/number.html"),d=e("text!templates/widget/date.html"),f=e("text!templates/widget/email.html"),h=e("text!templates/widget/hidden.html"),m=e("text!templates/widget/pagebreak.html"),g=e("text!templates/widget/button.html");return{checkbox:t,file:n,heading:i,paragraph:a,radio:r,selectlist:o,textarea:s,text:l,date:d,email:f,snippet:c,recaptcha:u,number:p,hidden:h,pagebreak:m,button:g}}),define("views/widget",["jquery","underscore","backbone","text!templates/popover/popover-main.html","text!templates/popover/popover-input.html","text!templates/popover/popover-select.html","text!templates/popover/popover-textarea.html","text!templates/popover/popover-textarea-split.html","text!templates/popover/popover-checkbox.html","../templates/widget/templates","bootstrap","popover-extra-placements"],function(e,t,n,i,a,r,o,s,l,c){return n.View.extend({tagName:"div",className:"widget",initialize:function(){this.template=t.template(c[this.model.get("name")])},render:function(){var e=this;return this.$el.html(e.template(e.model.getValues()))}})}),define("text!templates/app/temp.html",[],function(){return"<form id='temp'>\n  {{= text }}\n</form>\n"}),define("helper/pubsub",["jquery","underscore","backbone"],function(e,t,n){return t.extend({},n.Events)}),define("views/temp-widget",["jquery","views/widget","text!templates/app/temp.html","helper/pubsub"],function(e,t,n,i){return t.extend({initialize:function(){i.on("newTempPostRender",this.postRender,this),this.constructor.__super__.initialize.call(this),this.tempTemplate=_.template(n)},className:"temp",render:function(){return this.$el.html(this.tempTemplate({text:this.constructor.__super__.render.call(this).html()}))},postRender:function(e){this.tempForm=this.$el.find("form")[0],this.halfHeight=Math.floor(this.tempForm.clientHeight/2),this.halfWidth=Math.floor(this.tempForm.clientWidth/2),this.centerOnEvent(e)},events:{mousemove:"mouseMoveHandler",mouseup:"mouseUpHandler"},centerOnEvent:function(e){var t=e.pageX,n=e.pageY;this.tempForm.style.top=n-this.halfHeight+"px",this.tempForm.style.left=t-this.halfWidth+"px",i.trigger("tempMove",e)},mouseMoveHandler:function(e){e.preventDefault(),this.centerOnEvent(e)},mouseUpHandler:function(e){e.preventDefault(),i.trigger("tempDrop",e,this.model),this.remove()}})}),define("views/tab-component",["jquery","underscore","backbone","models/component","views/component","views/temp-widget","helper/pubsub"],function(e,t,n,i,a,r,o){return a.extend({events:{mousedown:"mouseDownHandler"},mouseDownHandler:function(t){t.preventDefault(),t.stopPropagation(),e(".popover").hide(),e("body").append(new r({model:new i(e.extend(!0,{},this.model.attributes))}).render()),o.trigger("newTempPostRender",t)}})}),define("views/tab-widget",["jquery","underscore","backbone","models/component","views/widget","views/temp-widget","helper/pubsub"],function(e,t,n,i,a,r,o){return a.extend({events:{mousedown:"mouseDownHandler",mousemove:"mouseMoveHandler",mouseup:"mouseUpHandler"},mouseDownHandler:function(e){e.preventDefault(),e.stopPropagation(),this.flag=1,this.mouseDownEvent=e},mouseMoveHandler:function(t){1===this.flag&&(e(".popover").hide(),e("body").append(new r({model:new i(e.extend(!0,{},this.model.attributes))}).render()),o.trigger("newTempPostRender",this.mouseDownEvent),this.flag=2)},mouseUpHandler:function(e){this.flag=0,this.mouseDownEvent=null}})}),define("collections/components",["jquery","underscore","backbone","models/component","views/tab-component","views/tab-widget"],function(e,t,n,i,a,r){return n.Collection.extend({model:i,renderAll:function(){return this.map(function(e){return new a({model:e}).render()})},renderAllAsWidgets:function(){return this.map(function(e){return new r({model:e}).render()})}})}),define("views/my-form-component",["jquery","underscore","backbone","views/component","helper/pubsub"],function(e,t,n,i,a){return i.extend({events:{click:"preventPropagation",mousedown:"mouseDownHandler",mouseup:"mouseUpHandler"},mouseDownHandler:function(t){t.stopPropagation(),t.preventDefault();var n=this;e(".popover").remove(),this.$el.popover("show"),e(".popover #save").on("click",this.saveHandler(n)),e(".popover #delete").on("click",this.deleteHandler(n)),e(".popover #cancel").on("click",this.cancelHandler(n)),e("body").on("mousemove",function(e){(Math.abs(t.pageX-e.pageX)>10||Math.abs(t.pageY-e.pageY)>10)&&(n.$el.popover("destroy"),a.trigger("myComponentDrag",t,n.model),n.mouseUpHandler())})},preventPropagation:function(e){e.stopPropagation(),e.preventDefault()},mouseUpHandler:function(t){e("body").off("mousemove")},saveHandler:function(n){return function(i){i.preventDefault();var a=e(".popover .field");t.each(a,function(i){var a=e(i),r=a.attr("data-type"),o=a.attr("id");switch(r){case"checkbox":n.model.setField(o,a.is(":checked"));break;case"input":n.model.setField(o,a.val());break;case"textarea":n.model.setField(o,a.val());break;case"textarea-split":n.model.setField(o,t.chain(a.val().split("\n")).map(function(t){return e.trim(t)}).filter(function(e){return e.length>0}).value());break;case"select":var s=t.map(a.find("option"),function(t){return{value:t.value,selected:t.selected,label:e(t).text()}});n.model.setField(o,s)}}),n.model.trigger("change"),e(".popover").remove()}},deleteHandler:function(t){return function(n){n.preventDefault(),confirm(polyglot.t("alert.confirmToDeleteField"))&&(e(".popover").remove(),t.model.trigger("remove"),a.trigger("myComponentDelete",t.model))}},cancelHandler:function(t){return function(n){n.preventDefault(),e(".popover").remove(),t.model.trigger("change")}}})}),define("collections/my-form-components",["jquery","underscore","backbone","models/component","collections/components","views/my-form-component"],function(e,t,n,i,a,r){return a.extend({model:i,initialize:function(){this.counter={},this.bind("add",this.giveUniqueId)},giveUniqueId:function(e){if(e.get("fresh")){var n=e.get("name"),i=n+"_"+t.size(this.componentsByName(n));if(e.set("fresh",!1),e.setField("id",i),t.size(this.componentsByFieldID(i))>0){var a=Math.floor(1e6*Math.random()+1);e.setField("id",n+"_"+a)}}},componentsByFieldID:function(e){return this.filter(function(t){return t.getField("id")===e})},componentsByName:function(e){return this.filter(function(t){return t.get("name")===e})},pageBreaks:function(){return this.filter(function(e){return"pagebreak"===e.get("name")})},containsFileType:function(){return!("undefined"==typeof this.find(function(e){return"file"===e.get("name")}))},containsRecaptcha:function(){return!("undefined"==typeof this.find(function(e){return"recaptcha"===e.get("name")}))},allComponents:{},allCleanComponents:{},renderAll:function(){t.map(this.allComponents,function(e,t){e.undelegateEvents(),e.$el.removeData().unbind(),e.remove(),n.View.prototype.remove.call(e)});var e=this;return this.map(function(t){return e.allComponents[t.cid]=new r({model:t}),e.allComponents[t.cid].render(!0)})},renderAllClean:function(){t.map(this.allCleanComponents,function(e,t){e.undelegateEvents(),e.$el.removeData().unbind(),e.remove(),n.View.prototype.remove.call(e)});var e=this;return this.map(function(t){return e.allCleanComponents[t.cid]=new r({model:t}),e.allCleanComponents[t.cid].render(!1)})}})}),define("text!templates/app/tab-nav.html",[],function(){return'<li role="presentation"><a href="#{{= id }}" aria-controls="{{= id }}" role="tab" data-toggle="tab">{{= title }}</a></li>'}),define("text!templates/app/settingsForm.html",[],function(){return'<div class="form-group">\n    <label for="settings-form-name">{{= polyglot.t(\'form.name\') }}</label>\n    <input type="text" class="form-control" placeholder="{{= polyglot.t(\'form.name\') }}" id="settings-form-name" value="{{ if(name) { }}{{= name }}{{ } }}">\n    <span class="help-block">{{= polyglot.t(\'form.description\') }}</span>\n</div>\n<div class="form-group">\n    <label for="settings-form-layout-selected">{{= polyglot.t(\'form.layout\') }}</label>\n    <select class="form-control" id="settings-form-layout-selected">\n        {{ _.each(layouts, function(layout) { }}\n        <option value="{{= layout.id }}" {{ if( layoutSelected === layout.id ) { }}selected{{ } }}>{{= layout.name }}</option>\n        {{ }); }}\n    </select>\n</div>\n<div class="form-group checkbox">\n    <label style="font-weight: normal">\n        <input type="checkbox" id="settings-form-disabled-fieldset" {{ if( disabledFieldset ) { }}checked{{ } }}> {{= polyglot.t(\'form.disabled\') }}\n    </label>\n</div>'}),define("views/tab",["jquery","underscore","backbone","helper/pubsub","text!templates/app/tab-nav.html","text!templates/app/settingsForm.html"],function(e,t,n,i,a,r){return n.View.extend({tagName:"div",className:"tab-pane",initialize:function(e){this.options=e,this.id=this.options.id,this.tabNavTemplate=t.template(a),"settings"==this.id&&(this.renderForm=t.template(r)),this.render()},render:function(){var n=this;void 0!==n.collection?t.each(this.collection.renderAllAsWidgets(),function(e){n.$el.append(e)}):n.options.content&&"code"==this.id&&(n.$el.append(e("<label></label>").text(polyglot.t("form.sourceCode"))),n.$el.append(n.options.content)),e("#formtabs").append(this.tabNavTemplate({title:this.options.title,id:this.id})),this.$el.attr("id",this.id),this.$el.attr("role","tabpanel"),this.$el.appendTo(".tab-content"),"settings"==this.id&&(this.$el.append(n.renderForm({name:n.options.settings.name,disabledFieldset:n.options.settings.disabledFieldset,layouts:n.options.settings.layouts,layoutSelected:n.options.settings.layoutSelected})),e("#settings-form-name").on("keyup keypress",function(e){var t=e.keyCode||e.which;return 13==t?(e.preventDefault(),!1):void 0}),e("#settings").find(":input").on("change",function(t){t.preventDefault();var n=e("#settings-form-name").val(),a=e("#settings-form-disabled-fieldset").is(":checked"),r=e("#settings-form-layout-selected").val(),o={name:n,disabledFieldset:a,layoutSelected:r};i.trigger("changeFormSettings",o)})),this.delegateEvents()}})}),define("views/tab-content",["jquery","underscore","backbone"],function(e,t,n){return n.View.extend({tagName:"div",className:"tab-pane",initialize:function(e){this.options=e,this.id=this.options.id,this.render()},render:function(){var e=this;void 0!==e.collection?t.each(this.collection.renderAllAsWidgets(),function(t){e.$el.append(t)}):e.options.content&&e.$el.append(e.options.content),this.$el.attr("id",this.id),this.$el.attr("role","tabpanel"),this.$el.appendTo(".tab-content"),this.delegateEvents()}})}),self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{};var Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var i={};for(var a in e)e.hasOwnProperty(a)&&(i[a]=t.util.clone(e[a]));return i;case"Array":return e.map(function(e){return t.util.clone(e)})}return e}},languages:{extend:function(e,n){var i=t.util.clone(t.languages[e]);for(var a in n)i[a]=n[a];return i},insertBefore:function(e,n,i,a){a=a||t.languages;var r=a[e];if(2==arguments.length){i=arguments[1];for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);return r}var s={};for(var l in r)if(r.hasOwnProperty(l)){if(l==n)for(var o in i)i.hasOwnProperty(o)&&(s[o]=i[o]);s[l]=r[l]}return t.languages.DFS(t.languages,function(t,n){n===a[e]&&t!=e&&(this[t]=s)}),a[e]=s},DFS:function(e,n,i){for(var a in e)e.hasOwnProperty(a)&&(n.call(e,a,e[a],i||a),"Object"===t.util.type(e[a])?t.languages.DFS(e[a],n):"Array"===t.util.type(e[a])&&t.languages.DFS(e[a],n,a))}},highlightAll:function(e,n){for(var i,a=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),r=0;i=a[r++];)t.highlightElement(i,e===!0,n)},highlightElement:function(i,a,r){for(var o,s,l=i;l&&!e.test(l.className);)l=l.parentNode;if(l&&(o=(l.className.match(e)||[,""])[1],s=t.languages[o]),s){i.className=i.className.replace(e,"").replace(/\s+/g," ")+" language-"+o,l=i.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var c=i.textContent;if(c){c=c.replace(/^(?:\r?\n|\r)/,"");var u={element:i,language:o,grammar:s,code:c};if(t.hooks.run("before-highlight",u),a&&self.Worker){var p=new Worker(t.filename);p.onmessage=function(e){u.highlightedCode=n.stringify(JSON.parse(e.data),o),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),t.hooks.run("after-highlight",u)},p.postMessage(JSON.stringify({language:u.language,code:u.code}))}else u.highlightedCode=t.highlight(u.code,u.grammar,u.language),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(i),t.hooks.run("after-highlight",u)}}},highlight:function(e,i,a){var r=t.tokenize(e,i);return n.stringify(t.util.encode(r),a)},tokenize:function(e,n){var i=t.Token,a=[e],r=n.rest;if(r){for(var o in r)n[o]=r[o];delete n.rest}e:for(var o in n)if(n.hasOwnProperty(o)&&n[o]){var s=n[o];s="Array"===t.util.type(s)?s:[s];for(var l=0;l<s.length;++l){var c=s[l],u=c.inside,p=!!c.lookbehind,d=0,f=c.alias;c=c.pattern||c;for(var h=0;h<a.length;h++){var m=a[h];if(a.length>e.length)break e;if(!(m instanceof i)){c.lastIndex=0;var g=c.exec(m);if(g){p&&(d=g[1].length);var v=g.index-1+d,g=g[0].slice(d),y=g.length,b=v+y,x=m.slice(0,v+1),w=m.slice(b+1),C=[h,1];x&&C.push(x);var T=new i(o,u?t.tokenize(g,u):g,f);C.push(T),w&&C.push(w),Array.prototype.splice.apply(a,C)}}}}}return a},hooks:{all:{},add:function(e,n){var i=t.hooks.all;i[e]=i[e]||[],i[e].push(n)},run:function(e,n){var i=t.hooks.all[e];if(i&&i.length)for(var a,r=0;a=i[r++];)a(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,i,a){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,i,e)}).join("");var r={type:e.type,content:n.stringify(e.content,i,a),tag:"span",classes:["token",e.type],attributes:{},language:i,parent:a};if("comment"==r.type&&(r.attributes.spellcheck="true"),e.alias){var o="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,o)}t.hooks.run("wrap",r);var s="";for(var l in r.attributes)s+=l+'="'+(r.attributes[l]||"")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'" '+s+">"+r.content+"</"+r.tag+">"},!self.document)return self.addEventListener?(self.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,a=n.code;self.postMessage(JSON.stringify(t.util.encode(t.tokenize(a,t.languages[i])))),self.close()},!1),self.Prism):self.Prism;var i=document.getElementsByTagName("script");return i=i[i.length-1],i&&(t.filename=i.src,document.addEventListener&&!i.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/i,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/=|>|"/}},punctuation:/\/?>/,"attr-name":{pattern:/[\w:-]+/,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),define("prism",function(e){return function(){var t;return t||e.Prism}}(this)),define("models/steps",["jquery","underscore","backbone"],function(e,t,n){return n.Model.extend({getValues:function(){return t.reduce(this.get("fields"),function(e,n,i){return"select"==n.type?e[i]=t.find(n.value,function(e){return e.selected}).value:e[i]=n.value,e},{})},setField:function(e,t){var n=this.get("fields");n[e].value=t,this.set("fields",n)},getField:function(e){var t=this.get("fields");return t[e].value}})}),define("text!templates/app/formSteps.html",[],function(){return'{{ if( steps && !noSteps) { }}{{ if( !progressBar ) { }}\n<!-- Steps -->\n<div class="steps">{{ _.each(steps, function(step, index, list){ var items = step.split("|"); var title = items[0]; var stage = items[1]; }}\n    <div class="step{{ if(noStages) { }} no-stage{{ } }}{{ if(noTitles) { }} no-title{{ } }}{{ if(index===0) { }} current{{ } }}">\n        {{ if (!noStages) { }}<div class="stage">{{if (stage) { if (stage.indexOf("icon") >= 0) { }}<span class="glyphicon glyph{{= stage }}"></span>{{ } else { }}{{= stage }}{{ } }}{{ } else { }}{{= index + 1 }}{{ } }}</div>{{ } }} {{ if (!noTitles) { }}<div class="title">{{= title }}</div>{{ } }}\n    </div>{{ }); }}\n</div>{{ } else { }}\n<!-- Progress Bar -->\n<div class="progress">\n    <div class="progress-bar" {{ if(!noTitles) { }} data-titles="{{= steps }}"{{ } }}>{{ if(!noStages) { }}<span class="percent">0%</span>{{ } }}{{ if(!noTitles) { }} <span class="title">{{= _.first(steps) }}</span>{{ } }}</div>\n</div>{{ } }}\n{{ } }}'}),define("text!templates/popover/popover-main-steps.html",[],function(){return'\n<form class="form">{{= basicFields }}{{ if (advancedFields) { }}\n<p><a id="collapseLink" href="javascript:void(0)" data-toggle="collapse" data-target="#collapseAdvancedFields" aria-expanded="false" aria-controls="collapseAdvancedFields">{{= polyglot.t(\'popover.more\') }}</a></p>\n<div class="collapse" id="collapseAdvancedFields">\n{{= advancedFields }}</div>{{ } }}\n<hr/>\n<button id="save" class="btn btn-primary">{{= polyglot.t(\'popover.save\') }}</button> <button id="cancel" class="btn btn-danger">{{= polyglot.t(\'popover.cancel\') }}</button>\n</form>\n'}),define("views/my-form-steps",["jquery","underscore","backbone","helper/pubsub","text!templates/app/formSteps.html","text!templates/popover/popover-main-steps.html","text!templates/popover/popover-input.html","text!templates/popover/popover-select.html","text!templates/popover/popover-textarea.html","text!templates/popover/popover-textarea-split.html","text!templates/popover/popover-checkbox.html","popover-extra-placements"],function(e,t,n,i,a,r,o,s,l,c,u){return n.View.extend({tagName:"div",id:"form-steps",events:{click:"preventPropagation",mousedown:"mouseDownHandler",mouseup:"mouseUpHandler"},initialize:function(e){this.template=t.template(a),this.popoverTemplates={input:t.template(o),select:t.template(s),textarea:t.template(l),"textarea-split":t.template(c),checkbox:t.template(u)},this.options=e,this.render(!0)},render:function(e){var n=this,i={},a={};t.map(n.model.get("fields"),function(e,t){e.advanced===!0?a[t]=e:i[t]=e});var o=t.reduce(i,function(e,t,i){return t.name=i,e+n.popoverTemplates[t.type](t)},""),s=t.reduce(a,function(e,t,i){return t.name=i,e+n.popoverTemplates[t.type](t)},""),l=t.template(r)({title:n.model.get("title"),basicFields:o,advancedFields:s});return e?this.$el.html(this.template(n.model.getValues())).attr({"class":"component form-steps","data-content":l,"data-title":"Form Steps","data-trigger":"manual","data-placement":"rightTop","data-html":!0}):this.$el.html(n.template(n.model.getValues())),this},mouseDownHandler:function(t){t.stopPropagation(),t.preventDefault();var n=this;e(".popover").remove(),this.$el.popover("show"),e(".popover #save").on("click",this.saveHandler(n)),e(".popover #cancel").on("click",this.cancelHandler(n))},preventPropagation:function(e){e.stopPropagation(),e.preventDefault()},mouseUpHandler:function(t){e("body").off("mousemove")},saveHandler:function(n){return function(a){a.preventDefault();var r=e(".popover .field");t.each(r,function(i){var a=e(i),r=a.attr("data-type"),o=a.attr("id");switch(r){case"checkbox":n.model.setField(o,a.is(":checked"));break;case"input":n.model.setField(o,a.val());break;case"textarea":n.model.setField(o,a.val());break;case"textarea-split":n.model.setField(o,t.chain(a.val().split("\n")).map(function(t){return e.trim(t)}).filter(function(e){return e.length>0}).value());break;case"select":var s=t.map(a.find("option"),function(t){return{value:t.value,selected:t.selected,label:e(t).text()}});n.model.setField(o,s)}}),i.trigger("changeFormSteps",n.model),e(".popover").remove()}},cancelHandler:function(t){return function(t){t.preventDefault(),e(".popover").remove()}}})}),define("text!templates/app/renderform.html",[],function(){return'<form id="form-app"{{ if( cssClass ) { }} class="{{= cssClass }}"{{ } }}{{ if( multipart ){ }} enctype="multipart/form-data"{{ } }}>{{= pageHeader }}\n<fieldset{{ if (disabled) { }} disabled="disabled"{{ } }}>\n\n{{= text }}\n</fieldset>\n</form>'}),define("views/my-form",["jquery","underscore","backbone","prism","models/steps","views/my-form-steps","views/temp-widget","helper/pubsub","text!templates/app/renderform.html"],function(e,t,n,i,a,r,o,s,l){return n.View.extend({tagName:"fieldset",pageHeader:!1,initialize:function(n){this.options=n,this.collection.on("add",this.render,this),this.collection.on("remove",this.render,this),this.collection.on("change",this.render,this),s.on("myComponentDrag",this.handleComponentDrag,this),s.on("myComponentDelete",this.handleComponentDelete,this),s.on("tempMove",this.handleTempMove,this),s.on("tempDrop",this.handleTempDrop,this),s.on("changeFormSettings",this.changeFormSettings,this),s.on("changeFormSteps",this.changeFormSteps,this),e(document).keydown(function(t){27===t.keyCode&&e(".popover").remove()}),this.$canvas=e(this.options.settings.canvas),this.myForm=e("#my-form"),this.renderForm=t.template(l),this.hasPages=!1,this.stepsModel=new a(this.options.settings.formSteps),this.pageHeader=new r({pageBreaks:this.collection.pageBreaks(),model:this.stepsModel}),this.render()},render:function(){var n=this;if(t.each(this.collection.renderAll(),function(e){n.$el.append(e)}),this.hasPages=this.collection.pageBreaks().length>0,this.hasPages){var a=this.stepsModel.getField("steps"),o=this.collection.pageBreaks().length+1;o>a.length?t.times(o-a.length,function(){a.push("Untitled Step")}):o<a.length&&t.times(a.length-o,function(){a.pop()}),this.stepsModel.setField("steps",a),this.pageHeader.remove(),this.pageHeader=new r({pageBreaks:this.collection.pageBreaks(),model:this.stepsModel})}else this.stepsModel.setField("steps",[]);var s=n.renderForm({cssClass:this.options.settings.layoutSelected,disabled:this.options.settings.disabledFieldset,multipart:this.collection.containsFileType(),pageHeader:this.hasPages?this.pageHeader.$el.html():"",text:t.map(this.collection.renderAllClean(),function(e){return e.html()}).join("\n")});e("#render").text(s),i.highlightElement(e("#render")[0]),FormBuilder.html=s,this.hasPages?this.pageHeader.$el.appendTo("#my-form"):this.pageHeader.remove(),this.$el.appendTo("#my-form"),this.myForm.attr("class",this.options.settings.layoutSelected),this.myForm.find("fieldset").attr("disabled",this.options.settings.disabledFieldset),this.delegateEvents()},getBottomAbove:function(n){var i=e(this.$el.find(".component")),a=t.find(i,function(t){return e(t).offset().top+e(t).height()>n});return a?a:i[i.length-1]},handleComponentDrag:function(t,n){options.lastIndex=e(this.getBottomAbove(t.pageY)).index(),e("body").append(new o({model:n}).render()),this.collection.remove(n),s.trigger("newTempPostRender",t)},handleComponentDelete:function(e){this.collection.remove(e)},handleTempMove:function(t){smoothScrollTo=function(){var e,t,n;return function(i,a){function r(){var i;n=(Date.now()-t)/a,n>=1&&(clearInterval(e),n=1),i=n*s+o,window.scrollBy(0,i-window.pageYOffset)}var o=window.pageYOffset,s=i-window.pageYOffset;return a=a||100,t=Date.now(),n=0,e&&clearInterval(e),e=setInterval(r,10)}}();var n=e(window).height(),i=e(window).scrollTop();t.clientY>n-50?smoothScrollTo(i+50):t.clientY<50&&smoothScrollTo(i-50);var a=e(".target");a.removeClass("target"),t.pageX>=this.$canvas.offset().left&&t.pageX<this.$canvas.width()+this.$canvas.offset().left&&t.pageY>=this.$canvas.offset().top&&t.pageY<this.$canvas.height()+this.$canvas.offset().top?e(this.getBottomAbove(t.pageY)).addClass("target"):a.removeClass("target")},handleTempDrop:function(t,n,i){var a=e(".target");if(this.collection.containsRecaptcha()&&"recaptcha"===n.get("name"))return a.removeClass("target"),!1;if(t.pageX>=this.$canvas.offset().left&&t.pageX<this.$canvas.width()+this.$canvas.offset().left&&t.pageY>=this.$canvas.offset().top&&t.pageY<this.$canvas.height()+this.$canvas.offset().top){var r=a.index();a.removeClass("target"),this.collection.add(n,{at:r+1})}else{a.removeClass("target");var o=e("#formId");options.endPoint.indexOf("form")>-1&&o.size()>0&&""!==o.val()&&!confirm(polyglot.t("alert.confirmToDeleteField"))&&this.collection.add(n,{at:options.lastIndex})}},changeFormSteps:function(e){this.options.settings.formSteps=e.toJSON(),this.render()},changeFormSettings:function(e){this.options.settings.name=e.name,this.options.settings.layoutSelected=e.layoutSelected,this.options.settings.disabledFieldset=e.disabledFieldset,this.render()}})}),define("text!data/components.json",[],function(){return'[\n    {\n        "name": "heading",\n        "title": "heading.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "heading"\n            },\n            "text": {\n                "label": "component.text",\n                "type": "input",\n                "value": "Heading"\n            },\n            "type": {\n                "label": "component.type",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "h1",\n                        "label": "H1",\n                        "selected": false\n                    },\n                    {\n                        "value": "h2",\n                        "label": "H2",\n                        "selected": false\n                    },\n                    {\n                        "value": "h3",\n                        "label": "H3",\n                        "selected": true\n                    },\n                    {\n                        "value": "h4",\n                        "label": "H4",\n                        "selected": false\n                    },\n                    {\n                        "value": "h5",\n                        "label": "H5",\n                        "selected": false\n                    },\n                    {\n                        "value": "h6",\n                        "label": "H6",\n                        "selected": false\n                    }\n                ]\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "legend",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "paragraph",\n        "title": "paragraph.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "paragraph"\n            },\n            "text": {\n                "label": "component.text",\n                "type": "textarea",\n                "value": "You can edit this paragraph by clicking here."\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "text",\n        "title": "text.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "text"\n            },\n            "inputType": {\n                "label": "component.inputType",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "text",\n                        "label": "Text",\n                        "selected": true\n                    },\n                    {\n                        "value": "tel",\n                        "label": "Tel",\n                        "selected": false\n                    },\n                    {\n                        "value": "url",\n                        "label": "URL",\n                        "selected": false\n                    },\n                    {\n                        "value": "color",\n                        "label": "Color",\n                        "selected": false\n                    },\n                    {\n                        "value": "password",\n                        "label": "Password",\n                        "selected": false\n                    }\n                ]\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Text Field"\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "pattern": {\n                "label": "component.pattern",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "unique": {\n                "label": "component.unique",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "number",\n        "title": "number.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "number"\n            },\n            "inputType": {\n                "label": "component.inputType",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "number",\n                        "label": "Number",\n                        "selected": true\n                    },\n                    {\n                        "value": "range",\n                        "label": "Range",\n                        "selected": false\n                    }\n                ]\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Number Field"\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "integerOnly": {\n                "label": "component.integerOnly",\n                "type": "checkbox",\n                "value": false\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "min": {\n                "label": "component.minNumber",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "max": {\n                "label": "component.maxNumber",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "step": {\n                "label": "component.stepNumber",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "integerPattern": {\n                "label": "component.integerPattern",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "numberPattern": {\n                "label": "component.numberPattern",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "unique": {\n                "label": "component.unique",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "date",\n        "title": "date.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "date"\n            },\n            "inputType": {\n                "label": "component.inputType",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "date",\n                        "label": "Date",\n                        "selected": true\n                    },\n                    {\n                        "value": "datetime-local",\n                        "label": "DateTime-Local",\n                        "selected": false\n                    },\n                    {\n                        "value": "time",\n                        "label": "Time",\n                        "selected": false\n                    },\n                    {\n                        "value": "month",\n                        "label": "Month",\n                        "selected": false\n                    },\n                    {\n                        "value": "week",\n                        "label": "Week",\n                        "selected": false\n                    }\n                ]\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Date Field"\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "min": {\n                "label": "component.minDate",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "max": {\n                "label": "component.maxDate",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "step": {\n                "label": "component.stepNumber",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "unique": {\n                "label": "component.unique",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "email",\n        "title": "email.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "email"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Email Field"\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "pattern": {\n                "label": "component.pattern",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "checkdns": {\n                "label": "component.checkDNS",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "multiple": {\n                "label": "component.multiple",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "unique": {\n                "label": "component.unique",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "textarea",\n        "title": "textarea.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "textarea"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Text Area"\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "textarea",\n                "value": ""\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "fieldSize": {\n                "label": "component.fieldSize",\n                "type": "input",\n                "value": 3,\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "unique": {\n                "label": "component.unique",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "checkbox",\n        "title": "checkbox.title",\n        "fields": {\n            "id": {\n                "label": "component.groupName",\n                "type": "input",\n                "value": "checkbox"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Check All That Apply"\n            },\n            "checkboxes": {\n                "label": "component.checkboxes",\n                "type": "textarea-split",\n                "value": [\n                    "First Choice|check",\n                    "Second Choice",\n                    "Third Choice"\n                ]\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "checkbox-inline",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "inline": {\n                "label": "component.inline",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "radio",\n        "title": "radio.title",\n        "fields": {\n            "id": {\n                "label": "component.groupName",\n                "type": "input",\n                "value": "radio"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Select a Choice"\n            },\n            "radios": {\n                "label": "component.radios",\n                "type": "textarea-split",\n                "value": [\n                    "First Choice|select",\n                    "Second Choice",\n                    "Third Choice"\n                ]\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "radio-inline",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "inline": {\n                "label": "component.inline",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "selectlist",\n        "title": "selectlist.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "selectlist"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Select a Choice"\n            },\n            "options": {\n                "label": "component.options",\n                "type": "textarea-split",\n                "value": [\n                    "First Choice|select",\n                    "Second Choice",\n                    "Third Choice"\n                ]\n            },\n            "placeholder": {\n                "label": "component.placeholder",\n                "type": "input",\n                "value": ""\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "form-control",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "multiple": {\n                "label": "component.multiple",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "hidden",\n        "title": "hidden.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "hidden"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": ""\n            },\n            "predefinedValue": {\n                "label": "component.predefinedValue",\n                "type": "input",\n                "value": ""\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false\n            }\n        }\n    },\n    {\n        "name": "file",\n        "title": "file.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "file"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "Attach a File"\n            },\n            "accept": {\n                "label": "component.accept",\n                "type": "input",\n                "value": ".gif, .jpg, .png"\n            },\n            "required": {\n                "label": "component.required",\n                "type": "checkbox",\n                "value": false\n            },\n            "helpText": {\n                "label": "component.helpText",\n                "type": "textarea",\n                "value": "",\n                "advanced": true\n            },\n            "minSize": {\n                "label": "component.minSize",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "maxSize": {\n                "label": "component.maxSize",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "snippet",\n        "title": "snippet.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "snippet"\n            },\n            "snippet": {\n                "label": "component.htmlCode",\n                "type": "textarea",\n                "value": "Replace this <code>code</code> with your html snippet."\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "recaptcha",\n        "title": "recaptcha.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "recaptcha"\n            },\n            "theme": {\n                "label": "component.theme",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "light",\n                        "label": "Light",\n                        "selected": true\n                    },\n                    {\n                        "value": "dark",\n                        "label": "Dark",\n                        "selected": false\n                    }\n                ]\n            },\n            "type": {\n                "label": "component.type",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "image",\n                        "label": "Image",\n                        "selected": true\n                    },\n                    {\n                        "value": "audio",\n                        "label": "Audio",\n                        "selected": false\n                    }\n                ],\n                "advanced": true\n            },\n            "size": {\n                "label": "component.size",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "normal",\n                        "label": "Normal",\n                        "selected": true\n                    },\n                    {\n                        "value": "compact",\n                        "label": "Compact",\n                        "selected": false\n                    }\n                ],\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            }\n        }\n    },\n    {\n        "name": "pagebreak",\n        "title": "pagebreak.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "pagebreak"\n            },\n            "prev": {\n                "label": "component.prev",\n                "type": "input",\n                "value": ""\n            },\n            "next": {\n                "label": "component.next",\n                "type": "input",\n                "value": ""\n            }\n        }\n    },\n    {\n        "name": "button",\n        "title": "button.title",\n        "fields": {\n            "id": {\n                "label": "component.id",\n                "type": "input",\n                "value": "button"\n            },\n            "inputType": {\n                "label": "component.type",\n                "type": "select",\n                "value": [\n                    {\n                        "value": "submit",\n                        "label": "Submit",\n                        "selected": true\n                    },\n                    {\n                        "value": "reset",\n                        "label": "Reset",\n                        "selected": false\n                    },\n                    {\n                        "value": "image",\n                        "label": "Image",\n                        "selected": false\n                    },\n                    {\n                        "value": "button",\n                        "label": "Button",\n                        "selected": false\n                    }\n                ]\n            },\n            "buttonText": {\n                "label": "component.buttonText",\n                "type": "input",\n                "value": "Submit"\n            },\n            "label": {\n                "label": "component.label",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "src": {\n                "label": "component.src",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "cssClass": {\n                "label": "component.cssClass",\n                "type": "input",\n                "value": "btn btn-primary",\n                "advanced": true\n            },\n            "labelClass": {\n                "label": "component.labelClass",\n                "type": "input",\n                "value": "control-label",\n                "advanced": true\n            },\n            "containerClass": {\n                "label": "component.containerClass",\n                "type": "input",\n                "value": "",\n                "advanced": true\n            },\n            "readOnly": {\n                "label": "component.readOnly",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            },\n            "disabled": {\n                "label": "component.disabled",\n                "type": "checkbox",\n                "value": false,\n                "advanced": true\n            }\n        }\n    }\n]';
}),define("text!data/i18n.json",[],function(){return'{\n    "phrases": {\n        "form.name": "Form Name",\n        "form.description": "Used to identify the form on administration pages.",\n        "form.layout": "Form Layout",\n        "form.disabled": "Disable form elements",\n        "form.sourceCode": "Source Code preview",\n        "formSteps.title": "Form Steps",\n        "formSteps.id": "ID / Name",\n        "formSteps.steps": "Steps",\n        "formSteps.progressBar": "Progress Bar",\n        "formSteps.noTitles": "No Titles",\n        "formSteps.noStages": "No Stages",\n        "formSteps.noSteps": "No Form Steps",\n        "popover.save": "Save",\n        "popover.delete": "Delete",\n        "popover.cancel": "Cancel",\n        "popover.more": "More",\n        "tab.fields": "Fields",\n        "tab.settings": "Settings",\n        "tab.code": "Code",\n        "alert.warning": "Warning!",\n        "alert.errorSavingData": "There was a problem saving data. Please retry later",\n        "alert.unsavedChanges": "YOU HAVE UNSAVED CHANGES! ALL CHANGES IN THE FORM WILL BE LOST!",\n        "widget.button": "Submit",\n        "widget.checkbox": "Checkboxes",\n        "widget.date": "Date Field",\n        "widget.email": "Email Field",\n        "widget.file": "File Upload",\n        "widget.heading": "Heading",\n        "widget.hidden": "Hidden Field",\n        "widget.number": "Number Field",\n        "widget.pageBreak": "Page Break",\n        "widget.paragraph": "Paragraph",\n        "widget.radio": "Radio Buttons",\n        "widget.recaptcha": "reCaptcha",\n        "widget.selectList": "Select List",\n        "widget.snippet": "Snippet",\n        "widget.text": "Text Field",\n        "widget.textArea": "Text Area",\n        "heading.title": "Heading",\n        "paragraph.title": "Paragraph",\n        "text.title": "Text",\n        "number.title": "Number",\n        "date.title": "Date",\n        "email.title": "Email",\n        "textarea.title": "Text Area",\n        "checkbox.title": "Checkbox",\n        "radio.title": "Radio",\n        "selectlist.title": "Select List",\n        "hidden.title": "Hidden",\n        "file.title": "File",\n        "snippet.title": "Snippet",\n        "recaptcha.title": "reCAPTCHA",\n        "pagebreak.title": "Page Break",\n        "button.title": "Button",\n        "component.id": "ID / Name",\n        "component.text": "Text",\n        "component.inputType": "Input Type",\n        "component.type": "Type",\n        "component.size": "Size",\n        "component.label": "Label",\n        "component.placeholder": "Placeholder",\n        "component.required": "Required",\n        "component.predefinedValue": "Predefined Value",\n        "component.helpText": "Help Text",\n        "component.fieldSize": "Field Size",\n        "component.groupName": "Group Name",\n        "component.checkboxes": "Checkboxes",\n        "component.radios": "Radios",\n        "component.options": "Options",\n        "component.value": "Value",\n        "component.accept": "Accept",\n        "component.pattern": "Pattern",\n        "component.integerPattern": "Integer Pattern",\n        "component.numberPattern": "Number Pattern",\n        "component.prev": "Text of Previous Button",\n        "component.next": "Text of Next Button",\n        "component.buttonText": "Button Text",\n        "component.src": "Image Source",\n        "component.inline": "Inline",\n        "component.unique": "Unique",\n        "component.readOnly": "Read Only",\n        "component.integerOnly": "Integer Only",\n        "component.minNumber": "Min number",\n        "component.maxNumber": "Max number",\n        "component.stepNumber": "Step number",\n        "component.minDate": "Min date",\n        "component.maxDate": "Max date",\n        "component.minSize": "Min Size",\n        "component.maxSize": "Max Size",\n        "component.htmlCode": "HTML Code",\n        "component.theme": "Theme",\n        "component.checkDNS": "Check DNS",\n        "component.multiple": "Multiple",\n        "component.disabled": "Disabled",\n        "component.cssClass": "CSS Class",\n        "component.labelClass": "Label CSS Class",\n        "component.containerClass": "Container CSS Class"\n    }\n}'}),define("text!data/init-form.json",[],function(){return'{\n    "initForm": [\n        {\n            "name": "heading",\n            "title": "heading.title",\n            "fields": {\n                "id": {\n                    "label": "component.id",\n                    "type": "input",\n                    "value": "heading_0"\n                },\n                "text": {\n                    "label": "component.text",\n                    "type": "input",\n                    "value": "Untitled Form"\n                },\n                "type": {\n                    "label": "component.type",\n                    "type": "select",\n                    "value": [\n                        {\n                            "value": "h1",\n                            "label": "H1",\n                            "selected": false\n                        },\n                        {\n                            "value": "h2",\n                            "label": "H2",\n                            "selected": false\n                        },\n                        {\n                            "value": "h3",\n                            "label": "H3",\n                            "selected": true\n                        },\n                        {\n                            "value": "h4",\n                            "label": "H4",\n                            "selected": false\n                        },\n                        {\n                            "value": "h5",\n                            "label": "H5",\n                            "selected": false\n                        },\n                        {\n                            "value": "h6",\n                            "label": "H6",\n                            "selected": false\n                        }\n                    ]\n                },\n                "cssClass": {\n                    "label": "component.cssClass",\n                    "type": "input",\n                    "value": "legend",\n                    "advanced": true\n                },\n                "containerClass": {\n                    "label": "component.containerClass",\n                    "type": "input",\n                    "value": "",\n                    "advanced": true\n                }\n            },\n            "fresh": false\n        },\n        {\n            "name": "paragraph",\n            "title": "paragraph.title",\n            "fields": {\n                "id": {\n                    "label": "component.id",\n                    "type": "input",\n                    "value": "paragraph_0"\n                },\n                "text": {\n                    "label": "component.text",\n                    "type": "textarea",\n                    "value": "This is my form. Please fill it out. Thanks!"\n                },\n                "cssClass": {\n                    "label": "component.cssClass",\n                    "type": "input",\n                    "value": "",\n                    "advanced": true\n                },\n                "containerClass": {\n                    "label": "component.containerClass",\n                    "type": "input",\n                    "value": "",\n                    "advanced": true\n                }\n            },\n            "fresh": false\n        }\n    ],\n    "settings": {\n        "name": "Untitled Form",\n        "canvas": "#canvas",\n        "disabledFieldset": false,\n        "layoutSelected": "",\n        "layouts": [\n            {\n                "id": "",\n                "name": "Vertical"\n            },\n            {\n                "id": "form-horizontal",\n                "name": "Horizontal"\n            },\n            {\n                "id": "form-inline",\n                "name": "Inline"\n            }\n        ],\n        "formSteps": {\n            "title": "formSteps.title",\n            "fields": {\n                "id": {\n                    "label": "formSteps.id",\n                    "type": "input",\n                    "value": "formSteps"\n                },\n                "steps": {\n                    "label": "formSteps.steps",\n                    "type": "textarea-split",\n                    "value": []\n                },\n                "progressBar": {\n                    "label": "formSteps.progressBar",\n                    "type": "checkbox",\n                    "value": false\n                },\n                "noTitles": {\n                    "label": "formSteps.noTitles",\n                    "type": "checkbox",\n                    "value": false\n                },\n                "noStages": {\n                    "label": "formSteps.noStages",\n                    "type": "checkbox",\n                    "value": false\n                },\n                "noSteps": {\n                    "label": "formSteps.noSteps",\n                    "type": "checkbox",\n                    "value": false\n                }\n            }\n        }\n    }\n}'}),define("text!templates/app/render.html",[],function(){return'<pre><code id="render" class="language-markup"></code></pre>'}),function(e){"function"==typeof define&&define.amd?define("jquery.cookie",["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function t(e){return s.raw?e:encodeURIComponent(e)}function n(e){return s.raw?e:decodeURIComponent(e)}function i(e){return t(s.json?JSON.stringify(e):String(e))}function a(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(o," ")),s.json?JSON.parse(e):e}catch(t){}}function r(t,n){var i=s.raw?t:a(t);return e.isFunction(n)?n(i):i}var o=/\+/g,s=e.cookie=function(a,o,l){if(arguments.length>1&&!e.isFunction(o)){if(l=e.extend({},s.defaults,l),"number"==typeof l.expires){var c=l.expires,u=l.expires=new Date;u.setMilliseconds(u.getMilliseconds()+864e5*c)}return document.cookie=[t(a),"=",i(o),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var p=a?void 0:{},d=document.cookie?document.cookie.split("; "):[],f=0,h=d.length;h>f;f++){var m=d[f].split("="),g=n(m.shift()),v=m.join("=");if(a===g){p=r(v,o);break}a||void 0===(v=r(v))||(p[g]=v)}return p};s.defaults={},e.removeCookie=function(t,n){return e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t)}}),function(e,t,n,i){"use strict";var a=function(t,i){function a(e){return"notice"===e?"info":"error"===e?"danger":e}function r(t){return{errs:e.grep(t,function(e){return"error"===e.priority||"danger"===e.priority}),warns:e.grep(t,function(e){return"warning"===e.priority}),infos:e.grep(t,function(e){return"notice"===e.priority||"info"===e.priority}),succs:e.grep(t,function(e){return"success"===e.priority})}}var o,s=this;s.element=t,s.options=e.extend({},e.fn.bsAlerts.defaults,i),e(n).on("add-alerts",function(){var e=Array.prototype.slice.call(arguments,1);s.addAlerts(e)}),e(n).on("clear-alerts",function(){s.clearAlerts()}),e.each(this.options.ids.split(","),function(t,i){var a=i.trim();if(a.length>0){var r="set-alert-id-"+a;e(n).on(r,function(){var e=Array.prototype.slice.call(arguments,1);s.addAlerts(e)})}}),s.clearAlerts=function(){e(this.element).html("")},s.addAlerts=function(e){var t=r([].concat(e));s.addAlertsToContainer(t.errs),s.addAlertsToContainer(t.warns),s.addAlertsToContainer(t.infos),s.addAlertsToContainer(t.succs);var n=parseInt(s.options.fade,10);!isNaN(n)&&n>0&&(clearTimeout(o),o=setTimeout(s.fade,n))},s.fade=function(){e("[data-alerts-container]").fadeOut("slow",function(){e(this).remove()})},s.buildNoticeContainer=function(t){if(t.length>0){var n=a(t[0].priority),i=e("<button/>",{type:"button","class":"close","data-dismiss":"alert","aria-hidden":!0}).html("&times;"),r=e("<ul/>");s.attachLIs(r,t);var o=e("<div/>",{"data-alerts-container":n,"class":"alert alert-dismissable alert-"+n});o.append(i);var l=this.options.titles[n];return l&&l.length>0&&o.append(e("<strong/>").html(l)),o.append(r),o}return null},s.addAlertsToContainer=function(t){if(t.length>0){var n=e(this.element),i=a(t[0].priority),r=e("[data-alerts-container='"+i+"']",n);if(r.length>0){var o=r.find("ul");s.attachLIs(o,t)}else r=s.buildNoticeContainer(t),n.append(r)}},s.attachLIs=function(t,n){e.each(n,function(n,i){t.append(e("<li/>").html(i.message))})}},r=e.fn.bsAlerts;e.fn.bsAlerts=function(t){return this.each(function(){var n=e(this),i=n.data("bsAlerts"),r="object"==typeof t&&t;i||n.data("bsAlerts",i=new a(this,r)),"string"==typeof t&&i[t]()})},e.fn.bsAlerts.Constructor=a,e.fn.bsAlerts.defaults={titles:{},ids:"",fade:"0"},e.fn.bsAlerts.noConflict=function(){return e.fn.bsAlerts=r,this},e(n).ready(function(){e('[data-alerts="alerts"]').each(function(){var t=e(this);t.bsAlerts(t.data())})})}(jQuery,window,document),define("jquery.bsAlerts",["jquery"],function(){}),define("app/app",["jquery","underscore","backbone","polyglot","collections/components","collections/my-form-components","views/tab","views/tab-content","views/my-form","text!data/components.json","text!data/i18n.json","text!data/init-form.json","text!templates/app/render.html","helper/pubsub","jquery.cookie","jquery.bsAlerts"],function(e,t,n,i,a,r,o,s,l,c,u,p,d,f){return{csrfParam:"",csrfToken:"",touchHandler:function(e){var t=e.changedTouches,n=t[0],i="";switch(e.type){case"touchstart":i="mousedown";break;case"touchmove":i="mousemove";break;case"touchend":i="mouseup";break;default:return}var a=document.createEvent("MouseEvent");a.initMouseEvent(i,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(a)},initialize:function(){window.FormBuilder={data:"",html:""},document.addEventListener("touchstart",this.touchHandler,!0),document.addEventListener("touchmove",this.touchHandler,!0),document.addEventListener("touchend",this.touchHandler,!0),document.addEventListener("touchcancel",this.touchHandler,!0),window.polyglot=new i(JSON.parse(u)),p=JSON.parse(p),c=JSON.parse(c),this.csrfParam=e('meta[name="csrf-param"]').attr("content"),this.csrfToken=e('meta[name="csrf-token"]').attr("content");var t=this;e.when(e.ajax(options.i18nUrl),e.ajax(options.componentsUrl),e.ajax(options.initPoint)).then(function(e,n,i){polyglot.replace(e[0].phrases),c=n[0],p=i[0],t.render()},function(){})},render:function(){var t=this;new o({id:"fields",title:polyglot.t("tab.fields"),collection:new a(c)}),new o({id:"settings",title:polyglot.t("tab.settings"),isForm:!0,settings:p.settings}),new o({id:"code",title:polyglot.t("tab.code"),content:d});var n=e("#formtabs");n.find("li").first().addClass("active"),n.find("li .dropdown-menu li").first().addClass("active"),e("#widgets").find(".tab-pane").first().addClass("active"),e(".close").click(function(t){t.preventDefault(),e.cookie("alert-box","closed")}),"closed"!==e.cookie("alert-box")?e(".alert").addClass("in").show():e(".alert").removeClass("in").hide(),e("ul").find("[data-method='post']").click(function(n){n.preventDefault();var i={};i[t.csrfParam]=t.csrfToken,e.ajax({method:"POST",url:e(this).attr("href"),dataType:"json",data:i}).always(function(){location.reload()})});var i=new r;i.add(p.initForm);var s=new l({settings:p.settings,collection:i});f.on("tempDrop",function(){e(window).off("beforeunload").on("beforeunload",function(){return polyglot.t("alert.unsavedChanges")})}),e("#actions").find(".saveForm").click(function(n){n.preventDefault();var a=e(n.target);options.endPoint="undefined"!=typeof a.data("endpoint")&&""!==a.data("endpoint")?a.data("endpoint"):options.endPoint,options.afterSave="undefined"!=typeof a.data("aftersave")&&""!==a.data("aftersave")?a.data("aftersave"):options.afterSave,options.redirectTo="undefined"!=typeof a.data("redirectto")&&""!==a.data("redirectto")?a.data("redirectto"):options.redirectTo,e(window).off("beforeunload"),FormBuilder.data={settings:s.options.settings,initForm:i.toJSON(),height:e("#my-form").find("fieldset").height()};var r={FormBuilder:JSON.stringify(FormBuilder)};r[t.csrfParam]=t.csrfToken,e.ajax({method:"POST",url:options.endPoint,dataType:"json",data:r}).done(function(t){if(t.success&&t.id>0)if("redirect"==options.afterSave&&"undefined"!=typeof options.redirectTo)window.location.href=options.redirectTo;else{if(e("#formId").val(t.id),"create"==t.action){var n=e("#toUpdate"),i=n.attr("href"),a=i.indexOf("?")>=0?"&":"?",r=i+a+"id="+t.id;n.attr("href",r);var o=e("#toSettings"),s=o.attr("href");a=s.indexOf("?")>=0?"&":"?";var l=s+a+"id="+t.id;o.attr("href",l)}e("#saved").modal("show")}else e(document).trigger("add-alerts",[{message:"<strong>"+polyglot.t("alert.warning")+"</strong> "+t.message,priority:"warning"}])}).fail(function(t){e(document).trigger("add-alerts",[{message:"<strong>"+polyglot.t("alert.warning")+"</strong> "+polyglot.t("alert.errorSavingData"),priority:"warning"}])}).always(function(){})})}}}),require.config({baseUrl:options.libUrl,shim:{underscoreBase:{exports:"_"},underscore:{deps:["underscoreBase"],exports:"_"},backbone:{deps:["underscore","jquery"],exports:"Backbone"},bootstrap:{deps:["jquery"]},"popover-extra-placements":{deps:["jquery","bootstrap"]},"jquery.cookie":{deps:["jquery"]},"jquery.bsAlerts":{deps:["jquery"]},polyglot:{exports:"Polyglot"},prism:{exports:"Prism"}},paths:{app:"..",collections:"../collections",data:"../data",models:"../models",helper:"../helper",templates:"../templates",views:"../views"}}),require(["app/app"],function(e){e.initialize()}),define("../main",function(){});