mirror of
https://github.com/flarum/core.git
synced 2025-07-24 18:21:33 +02:00
9 lines
253 KiB
JavaScript
9 lines
253 KiB
JavaScript
!function(e){var t=e.babelHelpers={};t.inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},t.defaults=function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var o=n[r],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e},t.createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.createDecoratedClass=function(){function e(e,t,n){for(var r=0;r<t.length;r++){var o=t[r],i=o.decorators,s=o.key;if(delete o.key,delete o.decorators,o.enumerable=o.enumerable||!1,o.configurable=!0,("value"in o||o.initializer)&&(o.writable=!0),i){for(var a=0;a<i.length;a++){var u=i[a];if("function"!=typeof u)throw new TypeError("The decorator for method "+o.key+" is of the invalid type "+typeof u);o=u(e,s,o)||o}if(void 0!==o.initializer){n[s]=o;continue}}Object.defineProperty(e,s,o)}}return function(t,n,r,o,i){return n&&e(t.prototype,n,o),r&&e(t,r,i),t}}(),t.createDecoratedObject=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.decorators,i=r.key;if(delete r.key,delete r.decorators,r.enumerable=!0,r.configurable=!0,("value"in r||r.initializer)&&(r.writable=!0),o)for(var s=0;s<o.length;s++){var a=o[s];if("function"!=typeof a)throw new TypeError("The decorator for method "+r.key+" is of the invalid type "+typeof a);r=a(t,i,r)||r}r.initializer&&(r.value=r.initializer.call(t)),Object.defineProperty(t,i,r)}return t},t.defineDecoratedPropertyDescriptor=function(e,t,n){var r=n[t];if(r){var o={};for(var i in r)o[i]=r[i];o.value=o.initializer.call(e),Object.defineProperty(e,t,o)}},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.taggedTemplateLiteralLoose=function(e,t){return e.raw=t,e},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},t.slicedToArray=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.slicedToArrayLoose=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],o=e[Symbol.iterator]();!(n=o.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},t.objectWithoutProperties=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.asyncToGenerator=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(r,s){try{var a=t[r](s),u=a.value}catch(l){return void n(l)}a.done?e(u):Promise.resolve(u).then(o,i)}var o=r.bind(null,"next"),i=r.bind(null,"throw");o()})}},t.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._typeof=function(e){return e&&e.constructor===Symbol?"symbol":typeof e},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.get=function n(e,t,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,t);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:n(i,t,r)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(r)},t.set=function r(e,t,n,o){var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var s=Object.getPrototypeOf(e);null!==s&&r(s,t,n,o)}else if("value"in i&&i.writable)i.value=n;else{var a=i.set;void 0!==a&&a.call(o,n)}return n},t.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.objectDestructuringEmpty=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")},t.temporalUndefined={},t.temporalAssertDefined=function(e,t,n){if(e===n)throw new ReferenceError(t+" is not defined - temporal dead zone");return!0},t.selfGlobal="undefined"==typeof e?self:e,t.defaultProps=function(e,t){if(e)for(var n in e)"undefined"==typeof t[n]&&(t[n]=e[n]);return t},t._instanceof=function(e,t){return null!=t&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t},t.interopRequire=function(e){return e&&e.__esModule?e["default"]:e}}("undefined"==typeof global?self:global),function(e){"use strict";function t(e,t){if("/"===e.charAt(0)&&(e=e.slice(1)),"."!==e.charAt(0))return e;for(var n=e.split("/");"."===n[0]||".."===n[0];)".."===n.shift()&&t.pop();return t.concat(n).join("/")}function n(e){var t=d[e];return t&&!f[e]&&(f[e]=!0,t.execute()),t&&t.proxy}function r(e,t){p[e]=t}function o(e){return p[e]||n(e)}function i(e){return!!p[e]||!!d[e]}function s(e,t){var n=document.createElement("script");n.async&&(n.async=!1),c?n.onreadystatechange=function(){/loaded|complete/.test(this.readyState)&&(this.onreadystatechange=null,t())}:n.onload=n.onerror=t,n.setAttribute("src",e),l.appendChild(n)}function a(e){return new Promise(function(t,n){s((h.baseURL||"/")+e+".js",function(r){u&&(h.register(e,u[0],u[1]),u=void 0);var o=d[e];return o?void Promise.all(o.deps.map(function(e){return p[e]||d[e]?Promise.resolve():a(e)})).then(t,n):void n(new Error("Error loading module "+e))})})}var u,l=document.getElementsByTagName("head")[0],c=/MSIE/.test(navigator.userAgent),f=Object.create(null),d=Object.create(null),p=Object.create(null),h={set:r,get:o,has:i,"import":function(e){return new Promise(function(n,r){var i=t(e,[]),s=o(i);return s?n(s):a(e).then(function(){return o(i)})})},register:function(e,n,r){if(Array.isArray(e))return u=[],void u.push.apply(u,arguments);var i,s,a=Object.create(null),l=Object.create(null);d[e]=i={proxy:a,values:l,deps:n.map(function(n){return t(n,e.split("/").slice(0,-1))}),dependants:[],update:function(e,t){s.setters[i.deps.indexOf(e)](t)},execute:function(){i.deps.map(function(t){var n=p[t];n?i.update(t,n):(n=o(t)&&d[t].values,n&&(d[t].dependants.push(e),i.update(t,n)))}),s.execute()}},s=r(function(t,n){return l[t]=n,i.lock=!0,i.dependants.forEach(function(t){d[t]&&!d[t].lock&&d[t].update(e,l)}),i.lock=!1,Object.getOwnPropertyDescriptor(a,t)||Object.defineProperty(a,t,{enumerable:!0,get:function(){return l[t]}}),n})}};e.System=h}(window);var m=function e(t,n){"use strict";function r(e){return"function"==typeof e}function o(e){return"[object Object]"===me.call(e)}function i(e){return"[object String]"===me.call(e)}function s(e){le=e.document,ce=e.location,de=e.cancelAnimationFrame||e.clearTimeout,fe=e.requestAnimationFrame||e.setTimeout}function a(e,t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(o(e))return G(e,n);var s,a=null!=t&&o(t)&&!("tag"in t||"view"in t||"subtree"in t),u=a?t:{},l="class"in u?"class":"className",c={tag:"div",attrs:{}},f=[];if(!i(e))throw new Error("selector in m(selector, attrs, children) should be a string");for(;null!=(s=ge.exec(e));)if(""===s[1]&&s[2])c.tag=s[2];else if("#"===s[1])c.attrs.id=s[2];else if("."===s[1])f.push(s[2]);else if("["===s[3][0]){var d=ye.exec(s[3]);c.attrs[d[1]]=d[3]||(d[2]?"":!0)}var p=a?n.slice(1):n;1===p.length&&he(p[0])?c.children=p[0]:c.children=p;for(var h in u)u.hasOwnProperty(h)&&(h===l&&null!=u[h]&&""!==u[h]?(f.push(u[h]),c.attrs[h]=""):c.attrs[h]=u[h]);return f.length&&(c.attrs[l]=f.join(" ")),c}function u(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function l(e,t){u(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function c(e){try{if(null==e||null==e.toString())return""}catch(t){return""}return e}function f(e,t,n,r){try{p(e,t,n),t.nodeValue=r}catch(o){}}function d(e){for(var t=0;t<e.length;t++)he(e[t])&&(e=e.concat.apply([],e),t--);return e}function p(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function h(e,t,n,r){l(e,function(e,r){t[e=e.key]=t[e]?{action:Ce,index:r,from:t[e].index,element:n.nodes[t[e].index]||le.createElement("div")}:{action:ke,index:r}});var o=[];for(var i in t)o.push(t[i]);var s=o.sort(B),a=new Array(n.length);return a.nodes=n.nodes.slice(),u(s,function(t){var o=t.index;if(t.action===xe&&(R(n[o].nodes,n[o]),a.splice(o,1)),t.action===ke){var i=le.createElement("div");i.key=e[o].attrs.key,p(r,i,o),a.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),a.nodes[o]=i}if(t.action===Ce){var s=t.element,u=r.childNodes[o];u!==s&&null!==s&&r.insertBefore(s,u||null),a[o]=n[t.from],a.nodes[o]=s}}),a}function m(e,t,n,r){var o=e.length!==t.length;return o||l(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?h(e,n,t,r):t}function g(e,t,n){u(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),u(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&R([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function y(e){var t=0;l(e,function(){return u(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function v(e,t,n){(e.tag!==t.tag||n.sort().join()!==Object.keys(t.attrs).sort().join()||e.attrs.id!==t.attrs.id||e.attrs.key!==t.attrs.key||"all"===a.redraw.strategy()&&(!t.configContext||t.configContext.retain!==!0)||"diff"===a.redraw.strategy()&&t.configContext&&t.configContext.retain===!1)&&(t.nodes.length&&R(t.nodes),t.configContext&&r(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&u(t.controllers,function(e){e.unload&&e.onunload({preventDefault:be})}))}function b(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function w(e,t,n){n.length&&(e.views=t,e.controllers=n,u(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Be&&e.onunload){var t=e.onunload;e.onunload=be,e.onunload.$old=t}}))}function x(e,t,n,o,i){if(r(t.attrs.config)){var s=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,n,!o,s,i)})}}function k(e,t,r,o,i,s,a,u){var l=e.nodes[0];return o&&F(l,t.tag,t.attrs,e.attrs,i),e.children=$(l,t.tag,n,n,t.children,e.children,!1,0,t.attrs.contenteditable?l:r,i,a),e.nodes.intact=!0,u.length&&(e.views=s,e.controllers=u),l}function C(e,t,n){var r;e.$trusted?r=q(t,n,e):(r=[le.createTextNode(e)],t.nodeName.match(ve)||p(t,r[0],n));var o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e;return o.nodes=r,o}function _(e,t,n,r,o,i){var s=t.nodes;return r&&r===le.activeElement||(e.$trusted?(R(s,t),s=q(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===s[0].nodeType||s.length>1)&&(R(t.nodes,t),s=[le.createTextNode(e)]),f(n,s[0],o,e))),t=new e.constructor(e),t.nodes=s,t}function T(e,t,n,r,o,i,s){return 0===e.nodes.length?C(t,r,n):e.valueOf()!==t.valueOf()||o===!0?_(t,e,r,i,n,s):(e.nodes.intact=!0,e)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(he(e))return e.length;return 1}function D(e,t,r,o,i,s,a,u,c){e=d(e);var f=[],p=t.length===e.length,h=0,v={},b=!1;l(t,function(e,n){b=!0,v[t[n].attrs.key]={action:xe,index:n}}),y(e),b&&(t=m(e,t,v,r));for(var w=0,x=0,k=e.length;k>x;x++){var C=$(r,i,t,o,e[x],t[w],s,o+h||h,a,u,c);C!==n&&(p=p&&C.nodes.intact,h+=S(C),t[w++]=C)}return p||g(e,t,f),t}function N(e,t,n,r,o){if(null!=t){if(me.call(t)===me.call(e))return t;if(o&&o.nodes){var i=n-r,s=i+(he(e)?e:t.nodes).length;R(o.nodes.slice(i,s),o.slice(i,s))}else t.nodes&&R(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function O(e,t){return t===n?e.attrs.is?le.createElement(e.tag,e.attrs.is):le.createElement(e.tag):e.attrs.is?le.createElementNS(t,e.tag,e.attrs.is):le.createElementNS(t,e.tag)}function E(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function M(e,t,r,o,i,s){return null!=e.children&&e.children.length>0?$(t,e.tag,n,n,e.children,r.children,!0,0,e.attrs.contenteditable?t:o,i,s):e.children}function H(e,t,n,r,o,i,s){var a={tag:e.tag,attrs:t,children:n,nodes:[r]};return w(a,i,s),a.children&&!a.children.nodes&&(a.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),a}function A(e,t,n,r){var o="diff"===a.redraw.strategy()&&e?e.indexOf(t):-1;return o>-1?n[o]:"function"==typeof r?new r:{}}function P(e,t,n,r){null!=r.onunload&&je.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function j(e,t,n,r,o,i){var s=A(n.views,t,r,e.controller),a=+(e&&e.attrs&&e.attrs.key);return e=0===Be||$e||r&&r.indexOf(s)>-1?e.view(s):{tag:"placeholder"},"retain"===e.subtree?n:(a===a&&((e.attrs=e.attrs||{}).key=a),P(i,o,t,s),e)}function I(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=j(e,e.view.$original||e.view,t,o,r,n);return e}function L(e,t,n,r,o,s,a,u){var l=[],c=[];if(e=I(e,t,l,c),!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(v(e,t,f),i(e.tag)){var h=0===t.nodes.length;a=b(e,a);var m;if(h){m=O(e,a);var g=E(e,m,a,d),y=M(e,m,t,n,a,u);t=H(e,g,y,m,a,l,c)}else m=k(t,e,n,d,a,l,u,c);return(h||s===!0&&null!=m)&&p(r,m,o),x(u,e,m,h,t),t}}function $(e,t,n,i,s,a,u,l,f,d,p){return s=c(s),"retain"===s.subtree?a:(a=N(s,a,l,i,n),he(s)?D(s,a,e,l,t,u,f,d,p):null!=s&&o(s)?L(s,a,f,e,l,u,d,p):r(s)?a:T(a,s,l,e,u,f,t))}function B(e,t){return e.action-t.action||e.index-t.index}function F(e,t,n,i,s){for(var a in n){var u=n[a],l=i[a];if(a in i&&l===u)"value"===a&&"input"===t&&e.value!=u&&(e.value=u);else{i[a]=u;try{if("config"===a||"key"===a)continue;if(r(u)&&"on"===a.slice(0,2))e[a]=U(u,e);else if("style"===a&&null!=u&&o(u)){for(var c in u)(null==l||l[c]!==u[c])&&(e.style[c]=u[c]);for(var c in l)c in u||(e.style[c]="")}else null!=s?"href"===a?e.setAttributeNS("http://www.w3.org/1999/xlink","href",u):e.setAttribute("className"===a?"class":a,u):a in e&&"list"!==a&&"style"!==a&&"form"!==a&&"type"!==a&&"width"!==a&&"height"!==a?("input"!==t||e[a]!==u)&&(e[a]=u):e.setAttribute(a,u)}catch(f){if(f.message.indexOf("Invalid argument")<0)throw f}}}return i}function R(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Y(t[n])}e.length&&(e.length=0)}function Y(e){e.configContext&&r(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&u(e.controllers,function(e){r(e.onunload)&&e.onunload({preventDefault:be})}),e.children&&(he(e.children)?u(e.children,Y):e.children.tag&&Y(e.children))}function q(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=le.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else e.insertAdjacentHTML("beforeend",n);for(var s=[];e.childNodes[t]!==r;)s.push(e.childNodes[t]),t++;return s}function U(e,t){return function(n){n=n||event,a.redraw.strategy("diff"),a.startComputation();try{return e.call(t,n)}finally{X()}}}function z(e){var t=Te.indexOf(e);return 0>t?Te.push(e)-1:t}function W(e){var t=function(){return arguments.length&&(e=arguments[0]),e};return t.toJSON=function(){return e},t}function G(e,t){var n=function(){return(e.controller||be).apply(this,t)||this};e.controller&&(n.prototype=e.controller.prototype);var r=function(n){var r=arguments.length>1?t.concat([].slice.call(arguments,1)):t;return e.view.apply(e,r?[n].concat(r):[n])};r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function V(){Ae&&(Ae(),Ae=null),u(Ne,function(e,t){var n=Oe[t];if(Ee[t]){var r=[Ee[t]];a.render(e,n.view?n.view(Ee[t],r):"")}}),Pe&&(Pe(),Pe=null),Me=null,He=new Date,a.redraw.strategy("diff")}function X(){"none"===a.redraw.strategy()?(Be--,a.redraw.strategy("diff")):a.endComputation()}function J(e){return e.slice(Ye[a.route.mode].length)}function Z(e,t,n){Fe={};var r=n.indexOf("?");-1!==r&&(Fe=te(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(-1!==i)return a.mount(e,t[o[i]]),!0;for(var s in t){if(s===n)return a.mount(e,t[s]),!0;var l=new RegExp("^"+s.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(l.test(n))return n.replace(l,function(){var n=s.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);u(n,function(e,t){Fe[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),a.mount(e,t[s])}),!0}}function Q(e){if(e=e||event,!e.ctrlKey&&!e.metaKey&&2!==e.which){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var t=e.currentTarget||e.srcElement,n="pathname"===a.route.mode&&t.search?te(t.search.slice(1)):{};t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;a.route(t[a.route.mode].slice(Ye[a.route.mode].length),n)}}function K(){"hash"!==a.route.mode&&ce.hash?ce.hash=ce.hash:t.scrollTo(0,0)}function ee(e,t){var r={},i=[];for(var s in e){var a=t?t+"["+s+"]":s,l=e[s];if(null===l)i.push(encodeURIComponent(a));else if(o(l))i.push(ee(l,a));else if(he(l)){var c=[];r[a]=r[a]||{},u(l,function(e){r[a][e]||(r[a][e]=!0,c.push(encodeURIComponent(a)+"="+encodeURIComponent(e)))}),i.push(c.join("&"))}else l!==n&&i.push(encodeURIComponent(a)+"="+encodeURIComponent(l))}return i.join("&")}function te(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return u(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(he(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function ne(e){var t=z(e);R(e.childNodes,Se[t]),Se[t]=n}function re(e,t){var n=a.prop(t);return e.then(n),n.then=function(n,r){return re(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n["finally"]=function(e){var r=function(t){return a.deferred().resolve(e(t)).promise};return n.then(function(e){return re(r(e).then(function(){return e}),t)},function(e){return re(r(e).then(function(){throw new Error(e)}),t)})},n}function oe(e,t){function n(e){p=e||f,m.map(function(e){p===c?e.resolve(h):e.reject(h)})}function i(e,t,n,i){if((null!=h&&o(h)||r(h))&&r(e))try{var s=0;e.call(h,function(e){s++||(h=e,t())},function(e){s++||(h=e,n())})}catch(u){a.deferred.onerror(u),h=u,n()}else i()}function s(){var o;try{o=h&&h.then}catch(f){return a.deferred.onerror(f),h=f,p=l,s()}i(o,function(){p=u,s()},function(){p=l,s()},function(){try{p===u&&r(e)?h=e(h):p===l&&r(t)&&(h=t(h),p=u)}catch(s){return a.deferred.onerror(s),h=s,n()}h===d?(h=TypeError(),n()):i(o,function(){n(c)},n,function(){n(p===u&&c)})})}var u=1,l=2,c=3,f=4,d=this,p=0,h=0,m=[];d.promise={},d.resolve=function(e){return p||(h=e,p=u,s()),this},d.reject=function(e){return p||(h=e,p=l,s()),this},d.promise.then=function(e,t){var n=new oe(e,t);return p===c?n.resolve(h):p===f?n.reject(h):m.push(n),n.promise}}function ie(e){return e}function se(e){if(!e.dataType||"jsonp"!==e.dataType.toLowerCase()){var o=new t.XMLHttpRequest;if(o.open(e.method,e.url,!0,e.user,e.password),o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300?e.onload({type:"load",target:o}):e.onerror({type:"error",target:o}))},e.serialize===JSON.stringify&&e.data&&"GET"!==e.method&&o.setRequestHeader("Content-Type","application/json; charset=utf-8"),e.deserialize===JSON.parse&&o.setRequestHeader("Accept","application/json, text/*"),r(e.config)){var s=e.config(o,e);null!=s&&(o=s)}var a="GET"!==e.method&&e.data?e.data:"";if(a&&!i(a)&&a.constructor!==t.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return o.send(a),o}var u="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),l=le.createElement("script");t[u]=function(r){l.parentNode.removeChild(l),e.onload({type:"load",target:{responseText:r}}),t[u]=n},l.onerror=function(){return l.parentNode.removeChild(l),e.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),t[u]=n,!1},l.onload=function(){return!1},l.src=e.url+(e.url.indexOf("?")>0?"&":"?")+(e.callbackKey?e.callbackKey:"callback")+"="+u+"&"+ee(e.data||{}),le.body.appendChild(l)}function ae(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=ee(t);e.url=e.url+(o?r+o:"")}else e.data=n(t);return e}function ue(e,t){var n=e.match(/:[a-z]\w+/gi);return n&&t&&u(n,function(n){var r=n.slice(1);e=e.replace(n,t[r]),delete t[r]}),e}var le,ce,fe,de,pe="v0.2.1",he=Array.isArray||function(e){return"[object Array]"===me.call(e)},me={}.toString,ge=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g,ye=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/,ve=/^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/,be=function(){};s(t),a.version=function(){return pe};var we,xe=1,ke=2,Ce=3,_e={appendChild:function(e){we===n&&(we=le.createElement("html")),le.documentElement&&le.documentElement!==e?le.replaceChild(e,le.documentElement):le.appendChild(e),this.childNodes=le.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Te=[],Se={};a.render=function(e,t,r){var o=[];if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=z(e),s=e===le,a=s||e===le.documentElement?_e:e;s&&"html"!==t.tag&&(t={tag:"html",attrs:{},children:t}),Se[i]===n&&R(a.childNodes),r===!0&&ne(e),Se[i]=$(a,null,n,n,t,Se[i],!1,0,null,n,o),u(o,function(e){e()})},a.trust=function(e){return e=new String(e),e.$trusted=!0,e},a.prop=function(e){return(null!=e&&o(e)||r(e))&&r(e.then)?re(e):W(e)};var De,Ne=[],Oe=[],Ee=[],Me=null,He=0,Ae=null,Pe=null,je=[],Ie=16;a.component=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);return G(e,t)},a.mount=a.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var n=Ne.indexOf(e);0>n&&(n=Ne.length);var o=!1,i={preventDefault:function(){o=!0,Ae=Pe=null}};if(u(je,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?u(je,function(e){e.controller.onunload=e.handler}):je=[],Ee[n]&&r(Ee[n].onunload)&&Ee[n].onunload(i),!o){a.redraw.strategy("all"),a.startComputation(),Ne[n]=e;var s=De=t?t:t={controller:be},l=new(t.controller||be);return s===De&&(Ee[n]=l,Oe[n]=t),X(),Ee[n]}t||(Ne.splice(n,1),Ee.splice(n,1),Oe.splice(n,1))};var Le=!1,$e=!1;a.redraw=function(e){if(!Le){Le=!0,e&&($e=!0);try{Me&&!e?(fe===t.requestAnimationFrame||new Date-He>Ie)&&(Me>0&&de(Me),Me=fe(V,Ie)):(V(),console.log("redraw..."),Me=fe(function(){Me=null},Ie))}finally{Le=$e=!1}}},a.redraw.strategy=a.prop();var Be=0;a.startComputation=function(){Be++},a.endComputation=function(){Be>1?Be--:(Be=0,a.redraw())},a.withAttr=function(e,t){return function(n){n=n||event;var r=n.currentTarget||this;t(e in r?r[e]:r.getAttribute(e))}};var Fe,Re,Ye={pathname:"",hash:"#",search:"?"},qe=be,Ue=!1;return a.route=function(e,n,r,o){if(0===arguments.length)return Re;if(3===arguments.length&&i(n)){qe=function(t){var o=Re=J(t);if(!Z(e,r,o)){if(Ue)throw new Error("Ensure the default route matches one of the routes defined in m.route");Ue=!0,a.route(n,!0),Ue=!1}};var s="hash"===a.route.mode?"onhashchange":"onpopstate";t[s]=function(){var e=ce[a.route.mode];"pathname"===a.route.mode&&(e+=ce.search),Re!==J(e)&&qe(e)},Ae=K,t[s]()}else if(e.addEventListener||e.attachEvent)e.href=("pathname"!==a.route.mode?ce.pathname:"")+Ye[a.route.mode]+o.attrs.href,e.addEventListener?(e.removeEventListener("click",Q),e.addEventListener("click",Q)):(e.detachEvent("onclick",Q),e.attachEvent("onclick",Q));else if(i(e)){var u=Re;Re=e;var l=n||{},c=Re.indexOf("?"),f=c>-1?te(Re.slice(c+1)):{};for(var d in l)f[d]=l[d];var p=ee(f),h=c>-1?Re.slice(0,c):Re;p&&(Re=h+(-1===h.indexOf("?")?"?":"&")+p);var m=(3===arguments.length?r:n)===!0||u===e;t.history.pushState?(Ae=K,Pe=function(){t.history[m?"replaceState":"pushState"](null,le.title,Ye[a.route.mode]+Re)},qe(Ye[a.route.mode]+Re)):(ce[a.route.mode]=Re,qe(Ye[a.route.mode]+Re))}},a.route.param=function(e){if(!Fe)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return Fe[e]},a.route.mode="search",a.route.buildQueryString=ee,a.route.parseQueryString=te,a.deferred=function(){var e=new oe;return e.promise=re(e.promise),e},a.deferred.onerror=function(e){if("[object Error]"===me.call(e)&&!e.constructor.toString().match(/ Error/))throw Be=0,e},a.sync=function(e){function t(e,t){return function(s){return i[e]=s,t||(n="reject"),0===--o&&(r.promise(i),r[n](i)),s}}var n="resolve",r=a.deferred(),o=e.length,i=new Array(o);return e.length>0?u(e,function(e,n){e.then(t(n,!0),t(n,!1))}):r.resolve([]),r.promise},a.request=function(e){e.background!==!0&&a.startComputation();var t=new oe,n=e.dataType&&"jsonp"===e.dataType.toLowerCase(),r=e.serialize=n?ie:e.serialize||JSON.stringify,o=e.deserialize=n?ie:e.deserialize||JSON.parse,i=n?function(e){return e.responseText}:e.extract||function(e){return 0===e.responseText.length&&o===JSON.parse?null:e.responseText};return e.method=(e.method||"GET").toUpperCase(),e.url=ue(e.url,e.data),e=ae(e,e.data,r),e.onload=e.onerror=function(n){try{n=n||event;var r=("load"===n.type?e.unwrapSuccess:e.unwrapError)||ie,s=r(o(i(n.target,e)),n.target);"load"===n.type&&(he(s)&&e.type?u(s,function(t,n){s[n]=new e.type(t)}):e.type&&(s=new e.type(s))),t["load"===n.type?"resolve":"reject"](s)}catch(n){a.deferred.onerror(n),t.reject(n)}e.background!==!0&&a.endComputation()},se(e),t.promise=re(t.promise,e.initialValue),t.promise},a.deps=function(e){return s(t=e||t),t},a.deps.factory=e,a}("undefined"!=typeof window?window:{});"object"==typeof module&&null!=module&&module.exports?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m}),function(e){"function"==typeof define&&define.amd?define(["mithril"],e):"object"==typeof exports?module.exports=e(require("mithril")):e(m)}(function(e){function t(e,t){var n="select"===e.tag?e.attrs.multi?"multi":"select":e.attrs.type;return"multi"===n?e.attrs.onchange=function(){t([].slice.call(this.selectedOptions,function(e){return e.value}))}:"select"===n?e.attrs.onchange=function(e){t(this.selectedOptions[0].value)}:"checkbox"===n?e.attrs.onchange=function(e){t(this.checked)}:e.attrs.onchange=e.attrs.oninput=function(e){t(this.value)},"select"===e.tag?e.children.forEach(function(e){(e.attrs.value===t()||e.children[0]===t())&&(e.attrs.selected=!0)}):"checkbox"===n?e.attrs.checked=t():"radio"===n?e.attrs.checked=t()===e.attrs.value:e.attrs.value=t(),e}return t.view=function(e,n,r){return t(n,n.attrs.bidi)},e.attrs&&(e.attrs.bidi=t),e.bidi=t,t}),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="length"in e&&e.length,n=K.type(e);return"function"===n||K.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(K.isFunction(t))return K.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return K.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return K.filter(t,e,n);t=K.filter(t,e)}return K.grep(e,function(e){return W.call(t,e)>=0!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function i(e){var t=he[e]={};return K.each(e.match(pe)||[],function(e,n){t[n]=!0}),t}function s(){Z.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),K.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=K.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:be.test(n)?K.parseJSON(n):n}catch(o){}ve.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return Z.activeElement}catch(e){}}function d(e,t){return K.nodeName(e,"table")&&K.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Ie.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,r=e.length;r>n;n++)ye.set(e[n],"globalEval",!t||ye.get(t[n],"globalEval"))}function g(e,t){var n,r,o,i,s,a,u,l;if(1===t.nodeType){if(ye.hasData(e)&&(i=ye.access(e),s=ye.set(t,i),l=i.events)){delete s.handle,s.events={};for(o in l)for(n=0,r=l[o].length;r>n;n++)K.event.add(t,o,l[o][n])}ve.hasData(e)&&(a=ve.access(e),u=K.extend({},a),ve.set(t,u))}}function y(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&K.nodeName(e,t)?K.merge([e],n):n}function v(e,t){var n=t.nodeName.toLowerCase();"input"===n&&_e.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var r,o=K(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(o[0]))?r.display:K.css(o[0],"display");return o.detach(),i}function w(e){var t=Z,n=Fe[e];return n||(n=b(e,t),"none"!==n&&n||(Be=(Be||K("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Be[0].contentDocument,t.write(),t.close(),n=b(e,t),Be.detach()),Fe[e]=n),n}function x(e,t,n){var r,o,i,s,a=e.style;return n=n||qe(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||K.contains(e.ownerDocument,e)||(s=K.style(e,t)),Ye.test(s)&&Re.test(t)&&(r=a.width,o=a.minWidth,i=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=o,a.maxWidth=i)),void 0!==s?s+"":s}function k(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,o=Xe.length;o--;)if(t=Xe[o]+n,t in e)return t;return r}function _(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function T(e,t,n,r,o){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>i;i+=2)"margin"===n&&(s+=K.css(e,n+ke[i],!0,o)),r?("content"===n&&(s-=K.css(e,"padding"+ke[i],!0,o)),"margin"!==n&&(s-=K.css(e,"border"+ke[i]+"Width",!0,o))):(s+=K.css(e,"padding"+ke[i],!0,o),"padding"!==n&&(s+=K.css(e,"border"+ke[i]+"Width",!0,o)));return s}function S(e,t,n){var r=!0,o="width"===t?e.offsetWidth:e.offsetHeight,i=qe(e),s="border-box"===K.css(e,"boxSizing",!1,i);if(0>=o||null==o){if(o=x(e,t,i),(0>o||null==o)&&(o=e.style[t]),Ye.test(o))return o;r=s&&(J.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+T(e,t,n||(s?"border":"content"),r,i)+"px"}function D(e,t){for(var n,r,o,i=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(i[s]=ye.get(r,"olddisplay"),n=r.style.display,t?(i[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Ce(r)&&(i[s]=ye.access(r,"olddisplay",w(r.nodeName)))):(o=Ce(r),"none"===n&&o||ye.set(r,"olddisplay",o?n:K.css(r,"display"))));
|
|
for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?i[s]||"":"none"));return e}function N(e,t,n,r,o){return new N.prototype.init(e,t,n,r,o)}function O(){return setTimeout(function(){Je=void 0}),Je=K.now()}function E(e,t){var n,r=0,o={height:e};for(t=t?1:0;4>r;r+=2-t)n=ke[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function M(e,t,n){for(var r,o=(nt[t]||[]).concat(nt["*"]),i=0,s=o.length;s>i;i++)if(r=o[i].call(n,t,e))return r}function H(e,t,n){var r,o,i,s,a,u,l,c,f=this,d={},p=e.style,h=e.nodeType&&Ce(e),m=ye.get(e,"fxshow");n.queue||(a=K._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,K.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=K.css(e,"display"),c="none"===l?ye.get(e,"olddisplay")||w(e.nodeName):l,"inline"===c&&"none"===K.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Qe.exec(o)){if(delete t[r],i=i||"toggle"===o,o===(h?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;h=!0}d[r]=m&&m[r]||K.style(e,r)}else l=void 0;if(K.isEmptyObject(d))"inline"===("none"===l?w(e.nodeName):l)&&(p.display=l);else{m?"hidden"in m&&(h=m.hidden):m=ye.access(e,"fxshow",{}),i&&(m.hidden=!h),h?K(e).show():f.done(function(){K(e).hide()}),f.done(function(){var t;ye.remove(e,"fxshow");for(t in d)K.style(e,t,d[t])});for(r in d)s=M(h?m[r]:0,r,f),r in m||(m[r]=s.start,h&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function A(e,t){var n,r,o,i,s;for(n in e)if(r=K.camelCase(n),o=t[r],i=e[n],K.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),s=K.cssHooks[r],s&&"expand"in s){i=s.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=o)}else t[r]=o}function P(e,t,n){var r,o,i=0,s=tt.length,a=K.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=Je||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(i);return a.notifyWith(e,[l,i,n]),1>i&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:K.extend({},t),opts:K.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Je||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=K.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(o)return this;for(o=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(A(c,l.opts.specialEasing);s>i;i++)if(r=tt[i].call(l,e,c,l.opts))return r;return K.map(c,M,l),K.isFunction(l.opts.start)&&l.opts.start.call(e,l),K.fx.timer(K.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function j(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(pe)||[];if(K.isFunction(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function I(e,t,n,r){function o(a){var u;return i[a]=!0,K.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||i[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)}),u}var i={},s=e===bt;return o(t.dataTypes[0])||!i["*"]&&o("*")}function L(e,t){var n,r,o=K.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&K.extend(!0,e,r),e}function $(e,t,n){for(var r,o,i,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}s||(s=o)}i=i||s}return i?(i!==u[0]&&u.unshift(i),n[i]):void 0}function B(e,t,n,r){var o,i,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(s=l[u+" "+i]||l["* "+i],!s)for(o in l)if(a=o.split(" "),a[1]===i&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[o]:l[o]!==!0&&(i=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}function F(e,t,n,r){var o;if(K.isArray(t))K.each(t,function(t,o){n||_t.test(e)?r(e,o):F(e+"["+("object"==typeof o?t:"")+"]",o,n,r)});else if(n||"object"!==K.type(t))r(e,t);else for(o in t)F(e+"["+o+"]",t[o],n,r)}function R(e){return K.isWindow(e)?e:9===e.nodeType&&e.defaultView}var Y=[],q=Y.slice,U=Y.concat,z=Y.push,W=Y.indexOf,G={},V=G.toString,X=G.hasOwnProperty,J={},Z=e.document,Q="2.1.4",K=function(e,t){return new K.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,re=function(e,t){return t.toUpperCase()};K.fn=K.prototype={jquery:Q,constructor:K,selector:"",length:0,toArray:function(){return q.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:q.call(this)},pushStack:function(e){var t=K.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return K.each(this,e,t)},map:function(e){return this.pushStack(K.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(q.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:z,sort:Y.sort,splice:Y.splice},K.extend=K.fn.extend=function(){var e,t,n,r,o,i,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||K.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(K.isPlainObject(r)||(o=K.isArray(r)))?(o?(o=!1,i=n&&K.isArray(n)?n:[]):i=n&&K.isPlainObject(n)?n:{},s[t]=K.extend(l,i,r)):void 0!==r&&(s[t]=r));return s},K.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===K.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!K.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==K.type(e)||e.nodeType||K.isWindow(e)?!1:e.constructor&&!X.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?G[V.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=K.trim(e),e&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,re)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var o,i=0,s=e.length,a=n(e);if(r){if(a)for(;s>i&&(o=t.apply(e[i],r),o!==!1);i++);else for(i in e)if(o=t.apply(e[i],r),o===!1)break}else if(a)for(;s>i&&(o=t.call(e[i],i,e[i]),o!==!1);i++);else for(i in e)if(o=t.call(e[i],i,e[i]),o===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?K.merge(r,"string"==typeof e?[e]:e):z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:W.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;n>r;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r,o=[],i=0,s=e.length,a=!n;s>i;i++)r=!t(e[i],i),r!==a&&o.push(e[i]);return o},map:function(e,t,r){var o,i=0,s=e.length,a=n(e),u=[];if(a)for(;s>i;i++)o=t(e[i],i,r),null!=o&&u.push(o);else for(i in e)o=t(e[i],i,r),null!=o&&u.push(o);return U.apply([],u)},guid:1,proxy:function(e,t){var n,r,o;return"string"==typeof t&&(n=e[t],t=e,e=n),K.isFunction(e)?(r=q.call(arguments,2),o=function(){return e.apply(t||this,r.concat(q.call(arguments)))},o.guid=e.guid=e.guid||K.guid++,o):void 0},now:Date.now,support:J}),K.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){G["[object "+t+"]"]=t.toLowerCase()});var oe=function(e){function t(e,t,n,r){var o,i,s,a,u,l,f,p,h,m;if((t?t.ownerDocument||t:F)!==H&&M(t),t=t||H,n=n||[],a=t.nodeType,"string"!=typeof e||!e||1!==a&&9!==a&&11!==a)return n;if(!r&&P){if(11!==a&&(o=ve.exec(e)))if(s=o[1]){if(9===a){if(i=t.getElementById(s),!i||!i.parentNode)return n;if(i.id===s)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(s))&&$(t,i)&&i.id===s)return n.push(i),n}else{if(o[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&x.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(s)),n}if(x.qsa&&(!j||!j.test(e))){if(p=f=B,h=t,m=1!==a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(l=T(e),(f=t.getAttribute("id"))?p=f.replace(we,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",u=l.length;u--;)l[u]=p+d(l[u]);h=be.test(e)&&c(t.parentNode)||t,m=l.join(",")}if(m)try{return Q.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return D(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[B]=!0,e}function o(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=e.length;r--;)k.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Y++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var a,u,l=[R,i];if(s){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(u=t[B]||(t[B]={}),(a=u[r])&&a[0]===R&&a[1]===i)return l[2]=a[2];if(u[r]=l,l[2]=e(t,n,s))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;i>o;o++)t(e,n[o],r);return r}function g(e,t,n,r,o){for(var i,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(i=e[a])&&(!n||n(i,r,o))&&(s.push(i),l&&t.push(a));return s}function y(e,t,n,o,i,s){return o&&!o[B]&&(o=y(o)),i&&!i[B]&&(i=y(i,s)),r(function(r,s,a,u){var l,c,f,d=[],p=[],h=s.length,y=r||m(t||"*",a.nodeType?[a]:a,[]),v=!e||!r&&t?y:g(y,d,e,a,u),b=n?i||(r?e:h||o)?[]:s:v;if(n&&n(v,b,a,u),o)for(l=g(b,p),o(l,[],a,u),c=l.length;c--;)(f=l[c])&&(b[p[c]]=!(v[p[c]]=f));if(r){if(i||e){if(i){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(v[c]=f);i(null,b=[],l,u)}for(c=b.length;c--;)(f=b[c])&&(l=i?ee(r,f):d[c])>-1&&(r[l]=!(s[l]=f))}}else b=g(b===s?b.splice(h,b.length):b),i?i(null,s,b,u):Q.apply(s,b)})}function v(e){for(var t,n,r,o=e.length,i=k.relative[e[0].type],s=i||k.relative[" "],a=i?1:0,u=p(function(e){return e===t},s,!0),l=p(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,r){var o=!i&&(r||n!==N)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,o}];o>a;a++)if(n=k.relative[e[a].type])c=[p(h(c),n)];else{if(n=k.filter[e[a].type].apply(null,e[a].matches),n[B]){for(r=++a;o>r&&!k.relative[e[r].type];r++);return y(a>1&&h(c),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ue,"$1"),n,r>a&&v(e.slice(a,r)),o>r&&v(e=e.slice(r)),o>r&&d(e))}c.push(n)}return h(c)}function b(e,n){var o=n.length>0,i=e.length>0,s=function(r,s,a,u,l){var c,f,d,p=0,h="0",m=r&&[],y=[],v=N,b=r||i&&k.find.TAG("*",l),w=R+=null==v?1:Math.random()||.1,x=b.length;for(l&&(N=s!==H&&s);h!==x&&null!=(c=b[h]);h++){if(i&&c){for(f=0;d=e[f++];)if(d(c,s,a)){u.push(c);break}l&&(R=w)}o&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,o&&h!==p){for(f=0;d=n[f++];)d(m,y,s,a);if(r){if(p>0)for(;h--;)m[h]||y[h]||(y[h]=J.call(u));y=g(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(R=w,N=v),m};return o?r(s):s}var w,x,k,C,_,T,S,D,N,O,E,M,H,A,P,j,I,L,$,B="sizzle"+1*new Date,F=e.document,R=0,Y=0,q=n(),U=n(),z=n(),W=function(e,t){return e===t&&(E=!0),0},G=1<<31,V={}.hasOwnProperty,X=[],J=X.pop,Z=X.push,Q=X.push,K=X.slice,ee=function(e,t){for(var n=0,r=e.length;r>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]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=re.replace("w","w#"),ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+oe+"))|)"+ne+"*\\]",se=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),ue=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),fe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(se),pe=new RegExp("^"+oe+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+se),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,ye=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),ke=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ce=function(){M()};try{Q.apply(X=K.call(F.childNodes),F.childNodes),X[F.childNodes.length].nodeType}catch(_e){Q={apply:X.length?function(e,t){Z.apply(e,K.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},_=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},M=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:F;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,A=r.documentElement,n=r.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),P=!_(r),x.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ye.test(r.getElementsByClassName),x.getById=o(function(e){return A.appendChild(e).id=B,!r.getElementsByName||!r.getElementsByName(B).length}),x.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(xe,ke);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},k.find.CLASS=x.getElementsByClassName&&function(e,t){return P?t.getElementsByClassName(e):void 0},I=[],j=[],(x.qsa=ye.test(r.querySelectorAll))&&(o(function(e){A.appendChild(e).innerHTML="<a id='"+B+"'></a><select id='"+B+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&j.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||j.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+B+"-]").length||j.push("~="),e.querySelectorAll(":checked").length||j.push(":checked"),e.querySelectorAll("a#"+B+"+*").length||j.push(".#.+[+~]")}),o(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&j.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||j.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),j.push(",.*:")})),(x.matchesSelector=ye.test(L=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(e){x.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),I.push("!=",se)}),j=j.length&&new RegExp(j.join("|")),I=I.length&&new RegExp(I.join("|")),t=ye.test(A.compareDocumentPosition),$=t||ye.test(A.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return E=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===F&&$(F,e)?-1:t===r||t.ownerDocument===F&&$(F,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return E=!0,0;var n,o=0,i=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!i||!a)return e===r?-1:t===r?1:i?-1:a?1:O?ee(O,e)-ee(O,t):0;if(i===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[o]===l[o];)o++;return o?s(u[o],l[o]):u[o]===F?-1:l[o]===F?1:0},r):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&M(e),n=n.replace(fe,"='$1']"),x.matchesSelector&&P&&(!I||!I.test(n))&&(!j||!j.test(n)))try{var r=L.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&M(e),$(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&M(e);var n=k.attrHandle[t.toLowerCase()],r=n&&V.call(k.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:x.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(E=!x.detectDuplicates,O=!x.sortStable&&e.slice(0),e.sort(W),E){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return O=null,e},C=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},k=t.selectors={cacheLength:50,createPseudo:r,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(xe,ke),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,ke),"~="===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=T(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(xe,ke).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,m=i!==s?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!u&&!a;if(g){if(i){for(;m;){for(f=t;f=f[m];)if(a?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&v){for(c=g[B]||(g[B]={}),l=c[e]||[],p=l[0]===R&&l[1],d=l[0]===R&&l[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(d=p=0)||h.pop();)if(1===f.nodeType&&++d&&f===t){c[e]=[R,p,d];break}}else if(v&&(l=(t[B]||(t[B]={}))[e])&&l[0]===R)d=l[1];else for(;(f=++p&&f&&f[m]||(d=p=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++d||(v&&((f[B]||(f[B]={}))[e]=[R,d]),f!==t)););return d-=o,d===r||d%r===0&&d/r>=0}}},PSEUDO:function(e,n){var o,i=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[B]?i(n):i.length>1?(o=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=S(e.replace(ue,"$1"));return o[B]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,ke),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,ke).toLowerCase(),function(t){var n;do if(n=P?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===A},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.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!k.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:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=u(w);return f.prototype=k.filters=k.pseudos,k.setFilters=new f,T=t.tokenize=function(e,n){var r,o,i,s,a,u,l,c=U[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=k.preFilter;a;){(!r||(o=le.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),u.push(i=[])),r=!1,(o=ce.exec(a))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ue," ")}),a=a.slice(r.length));for(s in k.filter)!(o=he[s].exec(a))||l[s]&&!(o=l[s](o))||(r=o.shift(),i.push({value:r,type:s,matches:o}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):U(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],o=[],i=z[e+" "];if(!i){for(t||(t=T(e)),n=t.length;n--;)i=v(t[n]),i[B]?r.push(i):o.push(i);i=z(e,b(o,r)),i.selector=e}return i},D=t.select=function(e,t,n,r){var o,i,s,a,u,l="function"==typeof e&&e,f=!r&&T(e=l.selector||e);if(n=n||[],1===f.length){if(i=f[0]=f[0].slice(0),i.length>2&&"ID"===(s=i[0]).type&&x.getById&&9===t.nodeType&&P&&k.relative[i[1].type]){if(t=(k.find.ID(s.matches[0].replace(xe,ke),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=he.needsContext.test(e)?0:i.length;o--&&(s=i[o],!k.relative[a=s.type]);)if((u=k.find[a])&&(r=u(s.matches[0].replace(xe,ke),be.test(i[0].type)&&c(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&d(i),!e)return Q.apply(n,r),n;break}}return(l||S(e,f))(r,t,!P,n,be.test(e)&&c(t.parentNode)||t),n},x.sortStable=B.split("").sort(W).join("")===B,x.detectDuplicates=!!E,M(),x.sortDetached=o(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);K.find=oe,K.expr=oe.selectors,K.expr[":"]=K.expr.pseudos,K.unique=oe.uniqueSort,K.text=oe.getText,K.isXMLDoc=oe.isXML,K.contains=oe.contains;var ie=K.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;K.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?K.find.matchesSelector(r,e)?[r]:[]:K.find.matches(e,K.grep(t,function(e){return 1===e.nodeType}))},K.fn.extend({find:function(e){var t,n=this.length,r=[],o=this;if("string"!=typeof e)return this.pushStack(K(e).filter(function(){for(t=0;n>t;t++)if(K.contains(o[t],this))return!0}));for(t=0;n>t;t++)K.find(e,o[t],r);return r=this.pushStack(n>1?K.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ie.test(e)?K(e):e||[],!1).length}});var ue,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=K.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ue).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof K?t[0]:t,K.merge(this,K.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),se.test(n[1])&&K.isPlainObject(t))for(n in t)K.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=Z.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):K.isFunction(e)?"undefined"!=typeof ue.ready?ue.ready(e):e(K):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),K.makeArray(e,this))};ce.prototype=K.fn,ue=K(Z);var fe=/^(?:parents|prev(?:Until|All))/,de={children:!0,contents:!0,next:!0,prev:!0};K.extend({dir:function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&K(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),K.fn.extend({has:function(e){var t=K(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(K.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,o=this.length,i=[],s=ie.test(e)||"string"!=typeof e?K(e,t||this.context):0;o>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&K.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?K.unique(i):i)},index:function(e){return e?"string"==typeof e?W.call(K(e),this[0]):W.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(K.unique(K.merge(this.get(),K(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),K.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return K.dir(e,"parentNode")},parentsUntil:function(e,t,n){return K.dir(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return K.dir(e,"nextSibling")},prevAll:function(e){return K.dir(e,"previousSibling")},nextUntil:function(e,t,n){return K.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return K.dir(e,"previousSibling",n)},siblings:function(e){return K.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return K.sibling(e.firstChild)},contents:function(e){return e.contentDocument||K.merge([],e.childNodes)}},function(e,t){K.fn[e]=function(n,r){var o=K.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=K.filter(r,o)),this.length>1&&(de[e]||K.unique(o),fe.test(e)&&o.reverse()),this.pushStack(o)}});var pe=/\S+/g,he={};K.Callbacks=function(e){e="string"==typeof e?he[e]||i(e):K.extend({},e);var t,n,r,o,s,a,u=[],l=!e.once&&[],c=function(i){for(t=e.memory&&i,n=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;a++)if(u[a].apply(i[0],i[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;!function i(t){K.each(t,function(t,n){var r=K.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})}(arguments),r?s=u.length:t&&(o=n,c(t))}return this},remove:function(){return u&&K.each(arguments,function(e,t){for(var n;(n=K.inArray(t,u,n))>-1;)u.splice(n,1),r&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?K.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},K.extend({Deferred:function(e){var t=[["resolve","done",K.Callbacks("once memory"),"resolved"],["reject","fail",K.Callbacks("once memory"),"rejected"],["notify","progress",K.Callbacks("memory")]],n="pending",r={
|
|
state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return K.Deferred(function(n){K.each(t,function(t,i){var s=K.isFunction(e[t])&&e[t];o[i[1]](function(){var e=s&&s.apply(this,arguments);e&&K.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[i[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?K.extend(e,r):r}},o={};return r.pipe=r.then,K.each(t,function(e,i){var s=i[2],a=i[3];r[i[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=q.call(arguments),s=i.length,a=1!==s||e&&K.isFunction(e.promise)?s:0,u=1===a?e:K.Deferred(),l=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?q.call(arguments):o,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);s>o;o++)i[o]&&K.isFunction(i[o].promise)?i[o].promise().done(l(o,r,i)).fail(u.reject).progress(l(o,n,t)):--a;return a||u.resolveWith(r,i),u.promise()}});var me;K.fn.ready=function(e){return K.ready.promise().done(e),this},K.extend({isReady:!1,readyWait:1,holdReady:function(e){e?K.readyWait++:K.ready(!0)},ready:function(e){(e===!0?--K.readyWait:K.isReady)||(K.isReady=!0,e!==!0&&--K.readyWait>0||(me.resolveWith(Z,[K]),K.fn.triggerHandler&&(K(Z).triggerHandler("ready"),K(Z).off("ready"))))}}),K.ready.promise=function(t){return me||(me=K.Deferred(),"complete"===Z.readyState?setTimeout(K.ready):(Z.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),me.promise(t)},K.ready.promise();var ge=K.access=function(e,t,n,r,o,i,s){var a=0,u=e.length,l=null==n;if("object"===K.type(n)){o=!0;for(a in n)K.access(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,K.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(K(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return o?e:l?t.call(e):u?t(e[0],n):i};K.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=K.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=a.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,K.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,o=this.key(e),i=this.cache[o];if("string"==typeof t)i[t]=n;else if(K.isEmptyObject(i))K.extend(this.cache[o],t);else for(r in t)i[r]=t[r];return i},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,K.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,o,i=this.key(e),s=this.cache[i];if(void 0===t)this.cache[i]={};else{K.isArray(t)?r=t.concat(t.map(K.camelCase)):(o=K.camelCase(t),t in s?r=[t,o]:(r=o,r=r in s?[r]:r.match(pe)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!K.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ye=new a,ve=new a,be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,we=/([A-Z])/g;K.extend({hasData:function(e){return ve.hasData(e)||ye.hasData(e)},data:function(e,t,n){return ve.access(e,t,n)},removeData:function(e,t){ve.remove(e,t)},_data:function(e,t,n){return ye.access(e,t,n)},_removeData:function(e,t){ye.remove(e,t)}}),K.fn.extend({data:function(e,t){var n,r,o,i=this[0],s=i&&i.attributes;if(void 0===e){if(this.length&&(o=ve.get(i),1===i.nodeType&&!ye.get(i,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=K.camelCase(r.slice(5)),u(i,r,o[r])));ye.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ve.set(this,e)}):ge(this,function(t){var n,r=K.camelCase(e);if(i&&void 0===t){if(n=ve.get(i,e),void 0!==n)return n;if(n=ve.get(i,r),void 0!==n)return n;if(n=u(i,r,void 0),void 0!==n)return n}else this.each(function(){var n=ve.get(this,r);ve.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&ve.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ve.remove(this,e)})}}),K.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=ye.get(e,t),n&&(!r||K.isArray(n)?r=ye.access(e,t,K.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=K.queue(e,t),r=n.length,o=n.shift(),i=K._queueHooks(e,t),s=function(){K.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ye.get(e,n)||ye.access(e,n,{empty:K.Callbacks("once memory").add(function(){ye.remove(e,[t+"queue",n])})})}}),K.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?K.queue(this[0],e):void 0===t?this:this.each(function(){var n=K.queue(this,e,t);K._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&K.dequeue(this,e)})},dequeue:function(e){return this.each(function(){K.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=K.Deferred(),i=this,s=this.length,a=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=ye.get(i[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),o.promise(t)}});var xe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ke=["Top","Right","Bottom","Left"],Ce=function(e,t){return e=t||e,"none"===K.css(e,"display")||!K.contains(e.ownerDocument,e)},_e=/^(?:checkbox|radio)$/i;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),J.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",J.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Te="undefined";J.focusinBubbles="onfocusin"in e;var Se=/^key/,De=/^(?:mouse|pointer|contextmenu)|click/,Ne=/^(?:focusinfocus|focusoutblur)$/,Oe=/^([^.]*)(?:\.(.+)|)$/;K.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,l,c,f,d,p,h,m,g=ye.get(e);if(g)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=K.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return typeof K!==Te&&K.event.triggered!==t.type?K.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(pe)||[""],l=t.length;l--;)a=Oe.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p&&(f=K.event.special[p]||{},p=(o?f.delegateType:f.bindType)||p,f=K.event.special[p]||{},c=K.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&K.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(p,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),K.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,l,c,f,d,p,h,m,g=ye.hasData(e)&&ye.get(e);if(g&&(u=g.events)){for(t=(t||"").match(pe)||[""],l=t.length;l--;)if(a=Oe.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p){for(f=K.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=d.length;i--;)c=d[i],!o&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(i,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));s&&!d.length&&(f.teardown&&f.teardown.call(e,h,g.handle)!==!1||K.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)K.event.remove(e,p+t[l],n,r,!0);K.isEmptyObject(u)&&(delete g.handle,ye.remove(e,"events"))}},trigger:function(t,n,r,o){var i,s,a,u,l,c,f,d=[r||Z],p=X.call(t,"type")?t.type:t,h=X.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!Ne.test(p+K.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),l=p.indexOf(":")<0&&"on"+p,t=t[K.expando]?t:new K.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:K.makeArray(n,[t]),f=K.event.special[p]||{},o||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!o&&!f.noBubble&&!K.isWindow(r)){for(u=f.delegateType||p,Ne.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||Z)&&d.push(a.defaultView||a.parentWindow||e)}for(i=0;(s=d[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||p,c=(ye.get(s,"events")||{})[t.type]&&ye.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&K.acceptData(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!K.acceptData(r)||l&&K.isFunction(r[p])&&!K.isWindow(r)&&(a=r[l],a&&(r[l]=null),K.event.triggered=p,r[p](),K.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=K.event.fix(e);var t,n,r,o,i,s=[],a=q.call(arguments),u=(ye.get(this,"events")||{})[e.type]||[],l=K.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=K.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((K.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)i=t[n],o=i.selector+" ",void 0===r[o]&&(r[o]=i.needsContext?K(o,this).index(u)>=0:K.find(o,this,null,[u]).length),r[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,o,i=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,r=n.documentElement,o=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),e.which||void 0===i||(e.which=1&i?1:2&i?3:4&i?2:0),e}},fix:function(e){if(e[K.expando])return e;var t,n,r,o=e.type,i=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=De.test(o)?this.mouseHooks:Se.test(o)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new K.Event(i),t=r.length;t--;)n=r[t],e[n]=i[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,i):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&K.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return K.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var o=K.extend(new K.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?K.event.trigger(o,null,t):K.event.dispatch.call(t,o),o.isDefaultPrevented()&&n.preventDefault()}},K.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},K.Event=function(e,t){return this instanceof K.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?l:c):this.type=e,t&&K.extend(this,t),this.timeStamp=e&&e.timeStamp||K.now(),void(this[K.expando]=!0)):new K.Event(e,t)},K.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=l,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},K.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){K.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return(!o||o!==r&&!K.contains(r,o))&&(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),J.focusinBubbles||K.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){K.event.simulate(t,e.target,K.event.fix(e),!0)};K.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=ye.access(r,t);o||r.addEventListener(e,n,!0),ye.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=ye.access(r,t)-1;o?ye.access(r,t,o):(r.removeEventListener(e,n,!0),ye.remove(r,t))}}}),K.fn.extend({on:function(e,t,n,r,o){var i,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(s in e)this.on(s,t,n,e[s],o);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=c;else if(!r)return this;return 1===o&&(i=r,r=function(e){return K().off(e),i.apply(this,arguments)},r.guid=i.guid||(i.guid=K.guid++)),this.each(function(){K.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,K(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){K.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){K.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?K.event.trigger(e,t,n,!0):void 0}});var Ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Me=/<([\w:]+)/,He=/<|&#?\w+;/,Ae=/<(?:script|style|link)/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^$|\/(?:java|ecma)script/i,Ie=/^true\/(.*)/,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,$e={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td,K.extend({clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),u=K.contains(e.ownerDocument,e);if(!(J.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||K.isXMLDoc(e)))for(s=y(a),i=y(e),r=0,o=i.length;o>r;r++)v(i[r],s[r]);if(t)if(n)for(i=i||y(e),s=s||y(a),r=0,o=i.length;o>r;r++)g(i[r],s[r]);else g(e,a);return s=y(a,"script"),s.length>0&&m(s,!u&&y(e,"script")),a},buildFragment:function(e,t,n,r){for(var o,i,s,a,u,l,c=t.createDocumentFragment(),f=[],d=0,p=e.length;p>d;d++)if(o=e[d],o||0===o)if("object"===K.type(o))K.merge(f,o.nodeType?[o]:o);else if(He.test(o)){for(i=i||c.appendChild(t.createElement("div")),s=(Me.exec(o)||["",""])[1].toLowerCase(),a=$e[s]||$e._default,i.innerHTML=a[1]+o.replace(Ee,"<$1></$2>")+a[2],l=a[0];l--;)i=i.lastChild;K.merge(f,i.childNodes),i=c.firstChild,i.textContent=""}else f.push(t.createTextNode(o));for(c.textContent="",d=0;o=f[d++];)if((!r||-1===K.inArray(o,r))&&(u=K.contains(o.ownerDocument,o),i=y(c.appendChild(o),"script"),u&&m(i),n))for(l=0;o=i[l++];)je.test(o.type||"")&&n.push(o);return c},cleanData:function(e){for(var t,n,r,o,i=K.event.special,s=0;void 0!==(n=e[s]);s++){if(K.acceptData(n)&&(o=n[ye.expando],o&&(t=ye.cache[o]))){if(t.events)for(r in t.events)i[r]?K.event.remove(n,r):K.removeEvent(n,r,t.handle);ye.cache[o]&&delete ye.cache[o]}delete ve.cache[n[ve.expando]]}}}),K.fn.extend({text:function(e){return ge(this,function(e){return void 0===e?K.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=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=d(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=d(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,r=e?K.filter(e,this):this,o=0;null!=(n=r[o]);o++)t||1!==n.nodeType||K.cleanData(y(n)),n.parentNode&&(t&&K.contains(n.ownerDocument,n)&&m(y(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(K.cleanData(y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return K.clone(this,e,t)})},html:function(e){return ge(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!$e[(Me.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ee,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(K.cleanData(y(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,K.cleanData(y(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=U.apply([],e);var n,r,o,i,s,a,u=0,l=this.length,c=this,f=l-1,d=e[0],m=K.isFunction(d);if(m||l>1&&"string"==typeof d&&!J.checkClone&&Pe.test(d))return this.each(function(n){var r=c.eq(n);m&&(e[0]=d.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=K.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(o=K.map(y(n,"script"),p),i=o.length;l>u;u++)s=n,u!==f&&(s=K.clone(s,!0,!0),i&&K.merge(o,y(s,"script"))),t.call(this[u],s,u);if(i)for(a=o[o.length-1].ownerDocument,K.map(o,h),u=0;i>u;u++)s=o[u],je.test(s.type||"")&&!ye.access(s,"globalEval")&&K.contains(a,s)&&(s.src?K._evalUrl&&K._evalUrl(s.src):K.globalEval(s.textContent.replace(Le,"")))}return this}}),K.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){K.fn[e]=function(e){for(var n,r=[],o=K(e),i=o.length-1,s=0;i>=s;s++)n=s===i?this:this.clone(!0),K(o[s])[t](n),z.apply(r,n.get());return this.pushStack(r)}});var Be,Fe={},Re=/^margin/,Ye=new RegExp("^("+xe+")(?!px)[a-z%]+$","i"),qe=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){s.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",s.innerHTML="",o.appendChild(i);var t=e.getComputedStyle(s,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(i)}var n,r,o=Z.documentElement,i=Z.createElement("div"),s=Z.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",J.clearCloneStyle="content-box"===s.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",i.appendChild(s),e.getComputedStyle&&K.extend(J,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=s.appendChild(Z.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",o.appendChild(i),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(i),s.removeChild(n),t}}))}(),K.swap=function(e,t,n,r){var o,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];o=n.apply(e,r||[]);for(i in t)e.style[i]=s[i];return o};var Ue=/^(none|table(?!-c[ea]).+)/,ze=new RegExp("^("+xe+")(.*)$","i"),We=new RegExp("^([+-])=("+xe+")","i"),Ge={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Xe=["Webkit","O","Moz","ms"];K.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=x(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":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,s,a=K.camelCase(t),u=e.style;return t=K.cssProps[a]||(K.cssProps[a]=C(u,a)),s=K.cssHooks[t]||K.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:u[t]:(i=typeof n,"string"===i&&(o=We.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(K.css(e,t)),i="number"),null!=n&&n===n&&("number"!==i||K.cssNumber[a]||(n+="px"),J.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n)),void 0)}},css:function(e,t,n,r){var o,i,s,a=K.camelCase(t);return t=K.cssProps[a]||(K.cssProps[a]=C(e.style,a)),s=K.cssHooks[t]||K.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=x(e,t,r)),"normal"===o&&t in Ve&&(o=Ve[t]),""===n||n?(i=parseFloat(o),n===!0||K.isNumeric(i)?i||0:o):o}}),K.each(["height","width"],function(e,t){K.cssHooks[t]={get:function(e,n,r){return n?Ue.test(K.css(e,"display"))&&0===e.offsetWidth?K.swap(e,Ge,function(){return S(e,t,r)}):S(e,t,r):void 0},set:function(e,n,r){var o=r&&qe(e);return _(e,n,r?T(e,t,r,"border-box"===K.css(e,"boxSizing",!1,o),o):0)}}}),K.cssHooks.marginRight=k(J.reliableMarginRight,function(e,t){return t?K.swap(e,{display:"inline-block"},x,[e,"marginRight"]):void 0}),K.each({margin:"",padding:"",border:"Width"},function(e,t){K.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[e+ke[r]+t]=i[r]||i[r-2]||i[0];return o}},Re.test(e)||(K.cssHooks[e+t].set=_)}),K.fn.extend({css:function(e,t){return ge(this,function(e,t,n){var r,o,i={},s=0;if(K.isArray(t)){for(r=qe(e),o=t.length;o>s;s++)i[t[s]]=K.css(e,t[s],!1,r);return i}return void 0!==n?K.style(e,t,n):K.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?K(this).show():K(this).hide()})}}),K.Tween=N,N.prototype={constructor:N,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(K.cssNumber[n]?"":"px")},cur:function(){var e=N.propHooks[this.prop];return e&&e.get?e.get(this):N.propHooks._default.get(this)},run:function(e){var t,n=N.propHooks[this.prop];return this.options.duration?this.pos=t=K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=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):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.fx=N.prototype.init,K.fx.step={};var Je,Ze,Qe=/^(?:toggle|show|hide)$/,Ke=new RegExp("^(?:([+-])=|)("+xe+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[H],nt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),o=Ke.exec(t),i=o&&o[3]||(K.cssNumber[e]?"":"px"),s=(K.cssNumber[e]||"px"!==i&&+r)&&Ke.exec(K.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==i){i=i||s[3],o=o||[],s=+r||1;do a=a||".5",s/=a,K.style(n.elem,e,s+i);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return o&&(s=n.start=+s||+r||0,n.unit=i,n.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),n}]};K.Animation=K.extend(P,{tweener:function(e,t){K.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,o=e.length;o>r;r++)n=e[r],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),K.speed=function(e,t,n){var r=e&&"object"==typeof e?K.extend({},e):{complete:n||!n&&t||K.isFunction(e)&&e,duration:e,easing:n&&t||t&&!K.isFunction(t)&&t};return r.duration=K.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in K.fx.speeds?K.fx.speeds[r.duration]:K.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){K.isFunction(r.old)&&r.old.call(this),r.queue&&K.dequeue(this,r.queue)},r},K.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=K.isEmptyObject(e),i=K.speed(t,n,r),s=function(){var t=P(this,K.extend({},e),i);(o||ye.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||i.queue===!1?this.each(s):this.queue(i.queue,s)},stop:function(e,t,n){var r=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,o=null!=e&&e+"queueHooks",i=K.timers,s=ye.get(this);if(o)s[o]&&s[o].stop&&r(s[o]);else for(o in s)s[o]&&s[o].stop&&et.test(o)&&r(s[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));(t||!n)&&K.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ye.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=K.timers,s=r?r.length:0;for(n.finish=!0,K.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),K.each(["toggle","show","hide"],function(e,t){var n=K.fn[t];K.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(E(t,!0),e,r,o)}}),K.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){K.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),K.timers=[],K.fx.tick=function(){var e,t=0,n=K.timers;for(Je=K.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||K.fx.stop(),Je=void 0},K.fx.timer=function(e){K.timers.push(e),e()?K.fx.start():K.timers.pop()},K.fx.interval=13,K.fx.start=function(){Ze||(Ze=setInterval(K.fx.tick,K.fx.interval))},K.fx.stop=function(){clearInterval(Ze),Ze=null},K.fx.speeds={slow:600,fast:200,_default:400},K.fn.delay=function(e,t){return e=K.fx?K.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",J.checkOn=""!==e.value,J.optSelected=n.selected,t.disabled=!0,J.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",J.radioValue="t"===e.value}();var rt,ot,it=K.expr.attrHandle;K.fn.extend({attr:function(e,t){return ge(this,K.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){K.removeAttr(this,e)})}}),K.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(e&&3!==i&&8!==i&&2!==i)return typeof e.getAttribute===Te?K.prop(e,t,n):(1===i&&K.isXMLDoc(e)||(t=t.toLowerCase(),r=K.attrHooks[t]||(K.expr.match.bool.test(t)?ot:rt)),void 0===n?r&&"get"in r&&null!==(o=r.get(e,t))?o:(o=K.find.attr(e,t),null==o?void 0:o):null!==n?r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+""),n):void K.removeAttr(e,t))},removeAttr:function(e,t){var n,r,o=0,i=t&&t.match(pe);if(i&&1===e.nodeType)for(;n=i[o++];)r=K.propFix[n]||n,K.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!J.radioValue&&"radio"===t&&K.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),ot={set:function(e,t,n){return t===!1?K.removeAttr(e,n):e.setAttribute(n,n),n}},K.each(K.expr.match.bool.source.match(/\w+/g),function(e,t){var n=it[t]||K.find.attr;it[t]=function(e,t,r){var o,i;return r||(i=it[t],it[t]=o,o=null!=n(e,t,r)?t.toLowerCase():null,it[t]=i),o}});var st=/^(?:input|select|textarea|button)$/i;K.fn.extend({prop:function(e,t){return ge(this,K.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[K.propFix[e]||e]})}}),K.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,o,i,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return i=1!==s||!K.isXMLDoc(e),i&&(t=K.propFix[t]||t,o=K.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||st.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),J.optSelected||(K.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),K.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){K.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;K.fn.extend({addClass:function(e){var t,n,r,o,i,s,a="string"==typeof e&&e,u=0,l=this.length;if(K.isFunction(e))return this.each(function(t){K(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(pe)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):" ")){for(i=0;o=t[i++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,o,i,s,a=0===arguments.length||"string"==typeof e&&e,u=0,l=this.length;if(K.isFunction(e))return this.each(function(t){K(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(pe)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):"")){for(i=0;o=t[i++];)for(;r.indexOf(" "+o+" ")>=0;)r=r.replace(" "+o+" "," ");s=e?K.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):K.isFunction(e)?this.each(function(n){
|
|
K(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,o=K(this),i=e.match(pe)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(n===Te||"boolean"===n)&&(this.className&&ye.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ye.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(at," ").indexOf(t)>=0)return!0;return!1}});var ut=/\r/g;K.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=K.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,K(this).val()):e,null==o?o="":"number"==typeof o?o+="":K.isArray(o)&&(o=K.map(o,function(e){return null==e?"":e+""})),t=K.valHooks[this.type]||K.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=K.valHooks[o.type]||K.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(ut,""):null==n?"":n)}}}),K.extend({valHooks:{option:{get:function(e){var t=K.find.attr(e,"value");return null!=t?t:K.trim(K.text(e))}},select:{get:function(e){for(var t,n,r=e.options,o=e.selectedIndex,i="select-one"===e.type||0>o,s=i?null:[],a=i?o+1:r.length,u=0>o?a:i?o:0;a>u;u++)if(n=r[u],(n.selected||u===o)&&(J.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!K.nodeName(n.parentNode,"optgroup"))){if(t=K(n).val(),i)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=K.makeArray(t),s=o.length;s--;)r=o[s],(r.selected=K.inArray(r.value,i)>=0)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),K.each(["radio","checkbox"],function(){K.valHooks[this]={set:function(e,t){return K.isArray(t)?e.checked=K.inArray(K(e).val(),t)>=0:void 0}},J.checkOn||(K.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),K.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){K.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),K.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,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var lt=K.now(),ct=/\?/;K.parseJSON=function(e){return JSON.parse(e+"")},K.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&K.error("Invalid XML: "+e),t};var ft=/#.*$/,dt=/([?&])_=[^&]*/,pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,yt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,vt={},bt={},wt="*/".concat("*"),xt=e.location.href,kt=yt.exec(xt.toLowerCase())||[];K.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt,type:"GET",isLocal:ht.test(kt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,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":K.parseJSON,"text xml":K.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,K.ajaxSettings),t):L(K.ajaxSettings,e)},ajaxPrefilter:j(vt),ajaxTransport:j(bt),ajax:function(e,t){function n(e,t,n,s){var u,c,y,v,w,k=t;2!==b&&(b=2,a&&clearTimeout(a),r=void 0,i=s||"",x.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(v=$(f,x,n)),v=B(f,v,x,u),u?(f.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(K.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(K.etag[o]=w)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=v.state,c=v.data,y=v.error,u=!y)):(y=k,(e||!k)&&(k="error",0>e&&(e=0))),x.status=e,x.statusText=(t||k)+"",u?h.resolveWith(d,[c,k,x]):h.rejectWith(d,[x,k,y]),x.statusCode(g),g=void 0,l&&p.trigger(u?"ajaxSuccess":"ajaxError",[x,f,u?c:y]),m.fireWith(d,[x,k]),l&&(p.trigger("ajaxComplete",[x,f]),--K.active||K.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,i,s,a,u,l,c,f=K.ajaxSetup({},t),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?K(d):K.event,h=K.Deferred(),m=K.Callbacks("once memory"),g=f.statusCode||{},y={},v={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!s)for(s={};t=pt.exec(i);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return r&&r.abort(t),n(0,t),this}};if(h.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,f.url=((e||f.url||xt)+"").replace(ft,"").replace(gt,kt[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=K.trim(f.dataType||"*").toLowerCase().match(pe)||[""],null==f.crossDomain&&(u=yt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===kt[1]&&u[2]===kt[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(kt[3]||("http:"===kt[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=K.param(f.data,f.traditional)),I(vt,f,t,x),2===b)return x;l=K.event&&f.global,l&&0===K.active++&&K.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!mt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(ct.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=dt.test(o)?o.replace(dt,"$1_="+lt++):o+(ct.test(o)?"&":"?")+"_="+lt++)),f.ifModified&&(K.lastModified[o]&&x.setRequestHeader("If-Modified-Since",K.lastModified[o]),K.etag[o]&&x.setRequestHeader("If-None-Match",K.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)x.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(d,x,f)===!1||2===b))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](f[c]);if(r=I(bt,f,t,x)){x.readyState=1,l&&p.trigger("ajaxSend",[x,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){x.abort("timeout")},f.timeout));try{b=1,r.send(y,n)}catch(k){if(!(2>b))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return K.get(e,t,n,"json")},getScript:function(e,t){return K.get(e,void 0,t,"script")}}),K.each(["get","post"],function(e,t){K[t]=function(e,n,r,o){return K.isFunction(n)&&(o=o||r,r=n,n=void 0),K.ajax({url:e,type:t,dataType:o,data:n,success:r})}}),K._evalUrl=function(e){return K.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},K.fn.extend({wrapAll:function(e){var t;return K.isFunction(e)?this.each(function(t){K(this).wrapAll(e.call(this,t))}):(this[0]&&(t=K(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return K.isFunction(e)?this.each(function(t){K(this).wrapInner(e.call(this,t))}):this.each(function(){var t=K(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=K.isFunction(e);return this.each(function(n){K(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){K.nodeName(this,"body")||K(this).replaceWith(this.childNodes)}).end()}}),K.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},K.expr.filters.visible=function(e){return!K.expr.filters.hidden(e)};var Ct=/%20/g,_t=/\[\]$/,Tt=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;K.param=function(e,t){var n,r=[],o=function(e,t){t=K.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=K.ajaxSettings&&K.ajaxSettings.traditional),K.isArray(e)||e.jquery&&!K.isPlainObject(e))K.each(e,function(){o(this.name,this.value)});else for(n in e)F(n,e[n],t,o);return r.join("&").replace(Ct,"+")},K.fn.extend({serialize:function(){return K.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=K.prop(this,"elements");return e?K.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!K(this).is(":disabled")&&Dt.test(this.nodeName)&&!St.test(e)&&(this.checked||!_e.test(e))}).map(function(e,t){var n=K(this).val();return null==n?null:K.isArray(n)?K.map(n,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:n.replace(Tt,"\r\n")}}).get()}}),K.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nt=0,Ot={},Et={0:200,1223:204},Mt=K.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Ot)Ot[e]()}),J.cors=!!Mt&&"withCredentials"in Mt,J.ajax=Mt=!!Mt,K.ajaxTransport(function(e){var t;return J.cors||Mt&&!e.crossDomain?{send:function(n,r){var o,i=e.xhr(),s=++Nt;if(i.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)i[o]=e.xhrFields[o];e.mimeType&&i.overrideMimeType&&i.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)i.setRequestHeader(o,n[o]);t=function(e){return function(){t&&(delete Ot[s],t=i.onload=i.onerror=null,"abort"===e?i.abort():"error"===e?r(i.status,i.statusText):r(Et[i.status]||i.status,i.statusText,"string"==typeof i.responseText?{text:i.responseText}:void 0,i.getAllResponseHeaders()))}},i.onload=t(),i.onerror=t("error"),t=Ot[s]=t("abort");try{i.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}:void 0}),K.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),K.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=K("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Ht=[],At=/(=)\?(?=&|$)|\?\?/;K.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ht.pop()||K.expando+"_"+lt++;return this[e]=!0,e}}),K.ajaxPrefilter("json jsonp",function(t,n,r){var o,i,s,a=t.jsonp!==!1&&(At.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=K.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(At,"$1"+o):t.jsonp!==!1&&(t.url+=(ct.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||K.error(o+" was not called"),s[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){s=arguments},r.always(function(){e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,Ht.push(o)),s&&K.isFunction(i)&&i(s[0]),s=i=void 0}),"script"):void 0}),K.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var r=se.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=K.buildFragment([e],t,o),o&&o.length&&K(o).remove(),K.merge([],r.childNodes))};var Pt=K.fn.load;K.fn.load=function(e,t,n){if("string"!=typeof e&&Pt)return Pt.apply(this,arguments);var r,o,i,s=this,a=e.indexOf(" ");return a>=0&&(r=K.trim(e.slice(a)),e=e.slice(0,a)),K.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&K.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,s.html(r?K("<div>").append(K.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,i||[e.responseText,t,e])}),this},K.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){K.fn[t]=function(e){return this.on(t,e)}}),K.expr.filters.animated=function(e){return K.grep(K.timers,function(t){return e===t.elem}).length};var jt=e.document.documentElement;K.offset={setOffset:function(e,t,n){var r,o,i,s,a,u,l,c=K.css(e,"position"),f=K(e),d={};"static"===c&&(e.style.position="relative"),a=f.offset(),i=K.css(e,"top"),u=K.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(i+u).indexOf("auto")>-1,l?(r=f.position(),s=r.top,o=r.left):(s=parseFloat(i)||0,o=parseFloat(u)||0),K.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):f.css(d)}},K.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){K.offset.setOffset(this,e,t)});var t,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return t=i.documentElement,K.contains(t,r)?(typeof r.getBoundingClientRect!==Te&&(o=r.getBoundingClientRect()),n=R(i),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===K.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),K.nodeName(e[0],"html")||(r=e.offset()),r.top+=K.css(e[0],"borderTopWidth",!0),r.left+=K.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-K.css(n,"marginTop",!0),left:t.left-r.left-K.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||jt;e&&!K.nodeName(e,"html")&&"static"===K.css(e,"position");)e=e.offsetParent;return e||jt})}}),K.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;K.fn[t]=function(o){return ge(this,function(t,o,i){var s=R(t);return void 0===i?s?s[n]:t[o]:void(s?s.scrollTo(r?e.pageXOffset:i,r?i:e.pageYOffset):t[o]=i)},t,o,arguments.length,null)}}),K.each(["top","left"],function(e,t){K.cssHooks[t]=k(J.pixelPosition,function(e,n){return n?(n=x(e,t),Ye.test(n)?K(e).position()[t]+"px":n):void 0})}),K.each({Height:"height",Width:"width"},function(e,t){K.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){K.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||o===!0?"margin":"border");return ge(this,function(t,n,r){var o;return K.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?K.css(t,n,s):K.style(t,n,r,s)},t,i?r:void 0,i,null)}})}),K.fn.size=function(){return this.length},K.fn.andSelf=K.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return K});var It=e.jQuery,Lt=e.$;return K.noConflict=function(t){return e.$===K&&(e.$=Lt),t&&e.jQuery===K&&(e.jQuery=It),K},typeof t===Te&&(e.jQuery=e.$=K),K}),function(e){function t(e,t,n){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:n;default:throw new Error("Implement me")}}function n(e,t){return Te.call(e,t)}function r(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function o(e){be.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function i(e,t){var n=!0;return d(function(){return n&&(o(e),n=!1),t.apply(this,arguments)},t)}function s(e,t){gt[e]||(o(t),gt[e]=!0)}function a(e,t){return function(n){return m(e.call(this,n),t)}}function u(e,t){return function(n){return this.localeData().ordinal(e.call(this,n),t)}}function l(){}function c(e,t){t!==!1&&M(e),p(this,e),this._d=new Date(+e._d)}function f(e){var t=_(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||0,s=t.day||0,a=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*l+6e4*u+36e5*a,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=be.localeData(),this._bubble()}function d(e,t){for(var r in t)n(t,r)&&(e[r]=t[r]);return n(t,"toString")&&(e.toString=t.toString),n(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t){var n,r,o;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),Pe.length>0)for(n in Pe)r=Pe[n],o=t[r],"undefined"!=typeof o&&(e[r]=o);return e}function h(e){return 0>e?Math.ceil(e):Math.floor(e)}function m(e,t,n){for(var r=""+Math.abs(e),o=e>=0;r.length<t;)r="0"+r;return(o?n?"+":"":"-")+r}function g(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function y(e,t){var n;return t=I(t,e),e.isBefore(t)?n=g(e,t):(n=g(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function v(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(s(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=be.duration(n,r),b(this,o,e),this}}function b(e,t,n,r){var o=t._milliseconds,i=t._days,s=t._months;r=null==r?!0:r,o&&e._d.setTime(+e._d+o*n),i&&pe(e,"Date",de(e,"Date")+i*n),s&&fe(e,de(e,"Month")+s*n),r&&be.updateOffset(e,i||s)}function w(e){return"[object Array]"===Object.prototype.toString.call(e)}function x(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function k(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;o>r;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&s++;return s+i}function C(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=lt[e]||ct[t]||t}return e}function _(e){var t,r,o={};for(r in e)n(e,r)&&(t=C(r),t&&(o[t]=e[r]));return o}function T(t){var n,r;if(0===t.indexOf("week"))n=7,r="day";else{if(0!==t.indexOf("month"))return;n=12,r="month"}be[t]=function(o,i){var s,a,u=be._locale[t],l=[];if("number"==typeof o&&(i=o,o=e),a=function(e){var t=be().utc().set(r,e);return u.call(be._locale,t,o||"")},null!=i)return a(i);for(s=0;n>s;s++)l.push(a(s));return l}}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function D(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function N(e,t,n){return ae(be([e,11,31+t-n]),t,n).week}function O(e){return E(e)?366:365}function E(e){return e%4===0&&e%100!==0||e%400===0}function M(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[De]<0||e._a[De]>11?De:e._a[Ne]<1||e._a[Ne]>D(e._a[Se],e._a[De])?Ne:e._a[Oe]<0||e._a[Oe]>24||24===e._a[Oe]&&(0!==e._a[Ee]||0!==e._a[Me]||0!==e._a[He])?Oe:e._a[Ee]<0||e._a[Ee]>59?Ee:e._a[Me]<0||e._a[Me]>59?Me:e._a[He]<0||e._a[He]>999?He:-1,e._pf._overflowDayOfYear&&(Se>t||t>Ne)&&(t=Ne),e._pf.overflow=t)}function H(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===e)),t._isValid}function A(e){return e?e.toLowerCase().replace("_","-"):e}function P(e){for(var t,n,r,o,i=0;i<e.length;){for(o=A(e[i]).split("-"),t=o.length,n=A(e[i+1]),n=n?n.split("-"):null;t>0;){if(r=j(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&k(o,n,!0)>=t-1)break;t--}i++}return null}function j(e){var t=null;if(!Ae[e]&&je)try{t=be.locale(),require("./locale/"+e),be.locale(t)}catch(n){}return Ae[e]}function I(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(be.isMoment(e)||x(e)?+e:+be(e))-+n,n._d.setTime(+n._d+r),be.updateOffset(n,!1),n):be(e).local()}function L(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,n,r=e.match(Be);for(t=0,n=r.length;n>t;t++)mt[r[t]]?r[t]=mt[r[t]]:r[t]=L(r[t]);return function(o){var i="";for(t=0;n>t;t++)i+=r[t]instanceof Function?r[t].call(o,e):r[t];return i}}function B(e,t){return e.isValid()?(t=F(t,e.localeData()),ft[t]||(ft[t]=$(t)),ft[t](e)):e.localeData().invalidDate()}function F(e,t){function n(e){return t.longDateFormat(e)||e}var r=5;for(Fe.lastIndex=0;r>=0&&Fe.test(e);)e=e.replace(Fe,n),Fe.lastIndex=0,r-=1;return e}function R(e,t){var n,r=t._strict;switch(e){case"Q":return Ze;case"DDDD":return Ke;case"YYYY":case"GGGG":case"gggg":return r?et:qe;case"Y":case"G":case"g":return nt;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?tt:Ue;case"S":if(r)return Ze;case"SS":if(r)return Qe;case"SSS":if(r)return Ke;case"DDD":return Ye;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return We;case"a":case"A":return t._locale._meridiemParse;case"x":return Xe;case"X":return Je;case"Z":case"ZZ":return Ge;case"T":return Ve;case"SSSS":return ze;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?Qe:Re;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Re;case"Do":return r?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return n=new RegExp(J(X(e.replace("\\","")),"i"))}}function Y(e){e=e||"";var t=e.match(Ge)||[],n=t[t.length-1]||[],r=(n+"").match(at)||["-",0,0],o=+(60*r[1])+S(r[2]);return"+"===r[0]?-o:o}function q(e,t,n){var r,o=n._a;switch(e){case"Q":null!=t&&(o[De]=3*(S(t)-1));break;case"M":case"MM":null!=t&&(o[De]=S(t)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(t,e,n._strict),null!=r?o[De]=r:n._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(o[Ne]=S(t));break;case"Do":null!=t&&(o[Ne]=S(parseInt(t.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=t&&(n._dayOfYear=S(t));break;case"YY":o[Se]=be.parseTwoDigitYear(t);break;case"YYYY":case"YYYYY":case"YYYYYY":o[Se]=S(t);break;case"a":case"A":n._isPm=n._locale.isPM(t);break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":o[Oe]=S(t);break;case"m":case"mm":o[Ee]=S(t);break;case"s":case"ss":o[Me]=S(t);break;case"S":case"SS":case"SSS":case"SSSS":o[He]=S(1e3*("0."+t));break;case"x":n._d=new Date(S(t));break;case"X":n._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=Y(t);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(t),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=t;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(n._w=n._w||{},n._w[e]=S(t));break;case"gg":case"GG":n._w=n._w||{},n._w[e]=be.parseTwoDigitYear(t)}}function U(e){var n,r,o,i,s,a,u;n=e._w,null!=n.GG||null!=n.W||null!=n.E?(s=1,a=4,r=t(n.GG,e._a[Se],ae(be(),1,4).year),o=t(n.W,1),i=t(n.E,1)):(s=e._locale._week.dow,a=e._locale._week.doy,r=t(n.gg,e._a[Se],ae(be(),s,a).year),o=t(n.w,1),null!=n.d?(i=n.d,s>i&&++o):i=null!=n.e?n.e+s:s),u=ue(r,o,i,a,s),e._a[Se]=u.year,e._dayOfYear=u.dayOfYear}function z(e){var n,r,o,i,s=[];if(!e._d){for(o=G(e),e._w&&null==e._a[Ne]&&null==e._a[De]&&U(e),e._dayOfYear&&(i=t(e._a[Se],o[Se]),e._dayOfYear>O(i)&&(e._pf._overflowDayOfYear=!0),r=re(i,0,e._dayOfYear),e._a[De]=r.getUTCMonth(),e._a[Ne]=r.getUTCDate()),n=0;3>n&&null==e._a[n];++n)e._a[n]=s[n]=o[n];for(;7>n;n++)e._a[n]=s[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[Oe]&&0===e._a[Ee]&&0===e._a[Me]&&0===e._a[He]&&(e._nextDay=!0,e._a[Oe]=0),e._d=(e._useUTC?re:ne).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()+e._tzm),e._nextDay&&(e._a[Oe]=24)}}function W(e){var t;e._d||(t=_(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],z(e))}function G(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function V(t){if(t._f===be.ISO_8601)return void Q(t);t._a=[],t._pf.empty=!0;var n,r,o,i,s,a=""+t._i,u=a.length,l=0;for(o=F(t._f,t._locale).match(Be)||[],n=0;n<o.length;n++)i=o[n],r=(a.match(R(i,t))||[])[0],r&&(s=a.substr(0,a.indexOf(r)),s.length>0&&t._pf.unusedInput.push(s),a=a.slice(a.indexOf(r)+r.length),l+=r.length),mt[i]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(i),q(i,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-l,a.length>0&&t._pf.unusedInput.push(a),t._pf.bigHour===!0&&t._a[Oe]<=12&&(t._pf.bigHour=e),t._isPm&&t._a[Oe]<12&&(t._a[Oe]+=12),t._isPm===!1&&12===t._a[Oe]&&(t._a[Oe]=0),z(t),M(t)}function X(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o})}function J(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(e){var t,n,o,i,s;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)s=0,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._pf=r(),t._f=e._f[i],V(t),H(t)&&(s+=t._pf.charsLeftOver,s+=10*t._pf.unusedTokens.length,t._pf.score=s,(null==o||o>s)&&(o=s,n=t));d(e,n||t)}function Q(e){var t,n,r=e._i,o=rt.exec(r);if(o){for(e._pf.iso=!0,t=0,n=it.length;n>t;t++)if(it[t][1].exec(r)){e._f=it[t][0]+(o[6]||" ");break}for(t=0,n=st.length;n>t;t++)if(st[t][1].exec(r)){e._f+=st[t][0];break}r.match(Ge)&&(e._f+="Z"),V(e)}else e._isValid=!1}function K(e){Q(e),e._isValid===!1&&(delete e._isValid,be.createFromInputFallback(e))}function ee(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function te(t){var n,r=t._i;r===e?t._d=new Date:x(r)?t._d=new Date(+r):null!==(n=Ie.exec(r))?t._d=new Date(+n[1]):"string"==typeof r?K(t):w(r)?(t._a=ee(r.slice(0),function(e){return parseInt(e,10)}),z(t)):"object"==typeof r?W(t):"number"==typeof r?t._d=new Date(r):be.createFromInputFallback(t)}function ne(e,t,n,r,o,i,s){var a=new Date(e,t,n,r,o,i,s);return 1970>e&&a.setFullYear(e),a}function re(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function oe(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function ie(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function se(e,t,n){var r=be.duration(e).abs(),o=_e(r.as("s")),i=_e(r.as("m")),s=_e(r.as("h")),a=_e(r.as("d")),u=_e(r.as("M")),l=_e(r.as("y")),c=o<dt.s&&["s",o]||1===i&&["m"]||i<dt.m&&["mm",i]||1===s&&["h"]||s<dt.h&&["hh",s]||1===a&&["d"]||a<dt.d&&["dd",a]||1===u&&["M"]||u<dt.M&&["MM",u]||1===l&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=n,ie.apply({},c)}function ae(e,t,n){var r,o=n-t,i=n-e.day();return i>o&&(i-=7),o-7>i&&(i+=7),r=be(e).add(i,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ue(e,t,n,r,o){var i,s,a=re(e,0,1).getUTCDay();return a=0===a?7:a,n=null!=n?n:o,i=o-a+(a>r?7:0)-(o>a?7:0),s=7*(t-1)+(n-o)+i+1,{year:s>0?e:e-1,dayOfYear:s>0?s:O(e-1)+s}}function le(t){var n,r=t._i,o=t._f;return t._locale=t._locale||be.localeData(t._l),null===r||o===e&&""===r?be.invalid({nullInput:!0}):("string"==typeof r&&(t._i=r=t._locale.preparse(r)),be.isMoment(r)?new c(r,!0):(o?w(o)?Z(t):V(t):te(t),n=new c(t),n._nextDay&&(n.add(1,"d"),n._nextDay=e),n))}function ce(e,t){var n,r;if(1===t.length&&w(t[0])&&(t=t[0]),!t.length)return be();for(n=t[0],r=1;r<t.length;++r)t[r][e](n)&&(n=t[r]);return n}function fe(e,t){var n;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(n=Math.min(e.date(),D(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e)}function de(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function pe(e,t,n){return"Month"===t?fe(e,n):e._d["set"+(e._isUTC?"UTC":"")+t](n)}function he(e,t){return function(n){return null!=n?(pe(this,e,n),be.updateOffset(this,t),this):de(this,e)}}function me(e){return 400*e/146097}function ge(e){return 146097*e/400}function ye(e){be.duration.fn[e]=function(){return this._data[e]}}function ve(e){"undefined"==typeof ender&&(we=Ce.moment,e?Ce.moment=i("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",be):Ce.moment=be)}for(var be,we,xe,ke="2.8.4",Ce="undefined"!=typeof global?global:this,_e=Math.round,Te=Object.prototype.hasOwnProperty,Se=0,De=1,Ne=2,Oe=3,Ee=4,Me=5,He=6,Ae={},Pe=[],je="undefined"!=typeof module&&module&&module.exports,Ie=/^\/?Date\((\-?\d+)/i,Le=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,$e=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Be=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Fe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Re=/\d\d?/,Ye=/\d{1,3}/,qe=/\d{1,4}/,Ue=/[+\-]?\d{1,6}/,ze=/\d+/,We=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ge=/Z|[\+\-]\d\d:?\d\d/gi,Ve=/T/i,Xe=/[\+\-]?\d+/,Je=/[\+\-]?\d+(\.\d{1,3})?/,Ze=/\d/,Qe=/\d\d/,Ke=/\d{3}/,et=/\d{4}/,tt=/[+-]?\d{6}/,nt=/[+-]?\d+/,rt=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ot="YYYY-MM-DDTHH:mm:ssZ",it=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],st=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],at=/([\+\-]|\d\d)/gi,ut=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),lt={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},ct={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},ft={},dt={s:45,m:45,h:22,d:26,M:11},pt="DDD w W M D d".split(" "),ht="M D H h m s w W".split(" "),mt={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return m(this.year()%100,2)},YYYY:function(){return m(this.year(),4)},YYYYY:function(){return m(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+m(Math.abs(e),6)},gg:function(){return m(this.weekYear()%100,2)},gggg:function(){return m(this.weekYear(),4)},ggggg:function(){return m(this.weekYear(),5)},GG:function(){return m(this.isoWeekYear()%100,2)},GGGG:function(){return m(this.isoWeekYear(),4)},GGGGG:function(){return m(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1);
|
|
},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return S(this.milliseconds()/100)},SS:function(){return m(S(this.milliseconds()/10),2)},SSS:function(){return m(this.milliseconds(),3)},SSSS:function(){return m(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+m(S(e/60),2)+":"+m(S(e)%60,2)},ZZ:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+m(S(e/60),2)+m(S(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},gt={},yt=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];pt.length;)xe=pt.pop(),mt[xe+"o"]=u(mt[xe],xe);for(;ht.length;)xe=ht.pop(),mt[xe+xe]=a(mt[xe],2);mt.DDDD=a(mt.DDD,3),d(l.prototype,{set:function(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,t,n){var r,o,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(o=be.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(n=be([2e3,1]).day(t),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,n){var r=this._calendar[e];return"function"==typeof r?r.apply(t,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var o=this._relativeTime[n];return"function"==typeof o?o(e,t,n,r):o.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return ae(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),be=function(t,n,o,i){var s;return"boolean"==typeof o&&(i=o,o=e),s={},s._isAMomentObject=!0,s._i=t,s._f=n,s._l=o,s._strict=i,s._isUTC=!1,s._pf=r(),le(s)},be.suppressDeprecationWarnings=!1,be.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),be.min=function(){var e=[].slice.call(arguments,0);return ce("isBefore",e)},be.max=function(){var e=[].slice.call(arguments,0);return ce("isAfter",e)},be.utc=function(t,n,o,i){var s;return"boolean"==typeof o&&(i=o,o=e),s={},s._isAMomentObject=!0,s._useUTC=!0,s._isUTC=!0,s._l=o,s._i=t,s._f=n,s._strict=i,s._pf=r(),le(s).utc()},be.unix=function(e){return be(1e3*e)},be.duration=function(e,t){var r,o,i,s,a=e,u=null;return be.isDuration(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(a={},t?a[t]=e:a.milliseconds=e):(u=Le.exec(e))?(r="-"===u[1]?-1:1,a={y:0,d:S(u[Ne])*r,h:S(u[Oe])*r,m:S(u[Ee])*r,s:S(u[Me])*r,ms:S(u[He])*r}):(u=$e.exec(e))?(r="-"===u[1]?-1:1,i=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*r},a={y:i(u[2]),M:i(u[3]),d:i(u[4]),h:i(u[5]),m:i(u[6]),s:i(u[7]),w:i(u[8])}):"object"==typeof a&&("from"in a||"to"in a)&&(s=y(be(a.from),be(a.to)),a={},a.ms=s.milliseconds,a.M=s.months),o=new f(a),be.isDuration(e)&&n(e,"_locale")&&(o._locale=e._locale),o},be.version=ke,be.defaultFormat=ot,be.ISO_8601=function(){},be.momentProperties=Pe,be.updateOffset=function(){},be.relativeTimeThreshold=function(t,n){return dt[t]===e?!1:n===e?dt[t]:(dt[t]=n,!0)},be.lang=i("moment.lang is deprecated. Use moment.locale instead.",function(e,t){return be.locale(e,t)}),be.locale=function(e,t){var n;return e&&(n="undefined"!=typeof t?be.defineLocale(e,t):be.localeData(e),n&&(be.duration._locale=be._locale=n)),be._locale._abbr},be.defineLocale=function(e,t){return null!==t?(t.abbr=e,Ae[e]||(Ae[e]=new l),Ae[e].set(t),be.locale(e),Ae[e]):(delete Ae[e],null)},be.langData=i("moment.langData is deprecated. Use moment.localeData instead.",function(e){return be.localeData(e)}),be.localeData=function(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return be._locale;if(!w(e)){if(t=j(e))return t;e=[e]}return P(e)},be.isMoment=function(e){return e instanceof c||null!=e&&n(e,"_isAMomentObject")},be.isDuration=function(e){return e instanceof f};for(xe=yt.length-1;xe>=0;--xe)T(yt[xe]);be.normalizeUnits=function(e){return C(e)},be.invalid=function(e){var t=be.utc(NaN);return null!=e?d(t._pf,e):t._pf.userInvalidated=!0,t},be.parseZone=function(){return be.apply(null,arguments).parseZone()},be.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)},d(be.fn=c.prototype,{clone:function(){return be(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=be(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():B(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):B(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return H(this)},isDSTShifted:function(){return this._a?this.isValid()&&k(this._a,(this._isUTC?be.utc(this._a):be(this._a)).toArray())>0:!1},parsingFlags:function(){return d({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.zone(0,e)},local:function(e){return this._isUTC&&(this.zone(0,e),this._isUTC=!1,e&&this.add(this._dateTzOffset(),"m")),this},format:function(e){var t=B(this,e||be.defaultFormat);return this.localeData().postformat(t)},add:v(1,"add"),subtract:v(-1,"subtract"),diff:function(e,t,n){var r,o,i,s=I(e,this),a=6e4*(this.zone()-s.zone());return t=C(t),"year"===t||"month"===t?(r=432e5*(this.daysInMonth()+s.daysInMonth()),o=12*(this.year()-s.year())+(this.month()-s.month()),i=this-be(this).startOf("month")-(s-be(s).startOf("month")),i-=6e4*(this.zone()-be(this).startOf("month").zone()-(s.zone()-be(s).startOf("month").zone())),o+=i/r,"year"===t&&(o/=12)):(r=this-s,o="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-a)/864e5:"week"===t?(r-a)/6048e5:r),n?o:h(o)},from:function(e,t){return be.duration({to:this,from:e}).locale(this.locale()).humanize(!t)},fromNow:function(e){return this.from(be(),e)},calendar:function(e){var t=e||be(),n=I(t,this).startOf("day"),r=this.diff(n,"days",!0),o=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(o,this,be(t)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=oe(e,this.localeData()),this.add(e-t,"d")):t},month:he("Month",!0),startOf:function(e){switch(e=C(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=C(t),t===e||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(e,t){var n;return t=C("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+this>+e):(n=be.isMoment(e)?+e:+be(e),n<+this.clone().startOf(t))},isBefore:function(e,t){var n;return t=C("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+e>+this):(n=be.isMoment(e)?+e:+be(e),+this.clone().endOf(t)<n)},isSame:function(e,t){var n;return t=C(t||"millisecond"),"millisecond"===t?(e=be.isMoment(e)?e:be(e),+this===+e):(n=+be(e),+this.clone().startOf(t)<=n&&n<=+this.clone().endOf(t))},min:i("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=be.apply(null,arguments),this>e?this:e}),max:i("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=be.apply(null,arguments),e>this?this:e}),zone:function(e,t){var n,r=this._offset||0;return null==e?this._isUTC?r:this._dateTzOffset():("string"==typeof e&&(e=Y(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&t&&(n=this._dateTzOffset()),this._offset=e,this._isUTC=!0,null!=n&&this.subtract(n,"m"),r!==e&&(!t||this._changeInProgress?b(this,be.duration(r-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,be.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(e){return e=e?be(e).zone():0,(this.zone()-e)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(e){var t=_e((be(this).startOf("day")-be(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},quarter:function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},weekYear:function(e){var t=ae(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=ae(this,1,4).year;return null==e?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},isoWeek:function(e){var t=ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return N(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},get:function(e){return e=C(e),this[e]()},set:function(e,t){return e=C(e),"function"==typeof this[e]&&this[e](t),this},locale:function(t){var n;return t===e?this._locale._abbr:(n=be.localeData(t),null!=n&&(this._locale=n),this)},lang:i("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===e?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),be.fn.millisecond=be.fn.milliseconds=he("Milliseconds",!1),be.fn.second=be.fn.seconds=he("Seconds",!1),be.fn.minute=be.fn.minutes=he("Minutes",!1),be.fn.hour=be.fn.hours=he("Hours",!0),be.fn.date=he("Date",!0),be.fn.dates=i("dates accessor is deprecated. Use date instead.",he("Date",!0)),be.fn.year=he("FullYear",!0),be.fn.years=i("years accessor is deprecated. Use year instead.",he("FullYear",!0)),be.fn.days=be.fn.day,be.fn.months=be.fn.month,be.fn.weeks=be.fn.week,be.fn.isoWeeks=be.fn.isoWeek,be.fn.quarters=be.fn.quarter,be.fn.toJSON=be.fn.toISOString,d(be.duration.fn=f.prototype,{_bubble:function(){var e,t,n,r=this._milliseconds,o=this._days,i=this._months,s=this._data,a=0;s.milliseconds=r%1e3,e=h(r/1e3),s.seconds=e%60,t=h(e/60),s.minutes=t%60,n=h(t/60),s.hours=n%24,o+=h(n/24),a=h(me(o)),o-=h(ge(a)),i+=h(o/30),o%=30,a+=h(i/12),i%=12,s.days=o,s.months=i,s.years=a},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},humanize:function(e){var t=se(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,t){var n=be.duration(e,t);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(e,t){var n=be.duration(e,t);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(e){return e=C(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,n;if(e=C(e),"month"===e||"year"===e)return t=this._days+this._milliseconds/864e5,n=this._months+12*me(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ge(this._months/12)),e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 24*t*60+this._milliseconds/6e4;case"second":return 24*t*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*t*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:be.fn.lang,locale:be.fn.locale,toIsoString:i("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),o=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(r||o||i?"T":"")+(r?r+"H":"")+(o?o+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}}),be.duration.fn.toString=be.duration.fn.toISOString;for(xe in ut)n(ut,xe)&&ye(xe.toLowerCase());be.duration.fn.asMilliseconds=function(){return this.as("ms")},be.duration.fn.asSeconds=function(){return this.as("s")},be.duration.fn.asMinutes=function(){return this.as("m")},be.duration.fn.asHours=function(){return this.as("h")},be.duration.fn.asDays=function(){return this.as("d")},be.duration.fn.asWeeks=function(){return this.as("weeks")},be.duration.fn.asMonths=function(){return this.as("M")},be.duration.fn.asYears=function(){return this.as("y")},be.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),je?module.exports=be:"function"==typeof define&&define.amd?(define("moment",function(e,t,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Ce.moment=we),be}),ve(!0)):ve()}.call(this),+function(e){"use strict";function t(t){return this.each(function(){var r=e(this),o=r.data("bs.affix"),i="object"==typeof t&&t;o||r.data("bs.affix",o=new n(this,i)),"string"==typeof t&&o[t]()})}var n=function(t,r){this.options=e.extend({},n.DEFAULTS,r),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.5",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,r){var o=this.$target.scrollTop(),i=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>o?"top":!1;if("bottom"==this.affixed)return null!=n?o+this.unpin<=i.top?!1:"bottom":e-r>=o+s?!1:"bottom";var a=null==this.affixed,u=a?o:i.top,l=a?s:t;return null!=n&&n>=o?"top":null!=r&&u+l>=e-r?"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(),r=this.options.offset,o=r.top,i=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(i=o=r),"function"==typeof o&&(o=r.top(this.$element)),"function"==typeof i&&(i=r.bottom(this.$element));var a=this.getState(s,t,o,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),l=e.Event(u+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-t-i})}};var r=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),r=n.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),t.call(n,r)})})}(jQuery),+function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}function n(n){n&&3===n.which||(e(o).remove(),e(i).each(function(){var r=e(this),o=t(r),i={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(o[0],n.target)||(o.trigger(n=e.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||(r.attr("aria-expanded","false"),o.removeClass("open").trigger("hidden.bs.dropdown",i))))}))}function r(t){return this.each(function(){var n=e(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new s(this)),"string"==typeof t&&r[t].call(n)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.5",s.prototype.toggle=function(r){var o=e(this);if(!o.is(".disabled, :disabled")){var i=t(o),s=i.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var a={relatedTarget:this};if(i.trigger(r=e.Event("show.bs.dropdown",a)),r.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=e(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=t(r),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(i).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible",u=o.find(".dropdown-menu"+a).find("a, button");if(u.length){var l=u.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<u.length-1&&l++,~l||(l=0),u.eq(l).trigger("focus")}}}};var a=e.fn.dropdown;e.fn.dropdown=r,e.fn.dropdown.Constructor=s,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=a,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",i,s.prototype.toggle).on("keydown.bs.dropdown.data-api",i,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,r){return this.each(function(){var o=e(this),i=o.data("bs.modal"),s=e.extend({},n.DEFAULTS,o.data(),"object"==typeof t&&t);i||o.data("bs.modal",i=new n(this,s)),"string"==typeof t?i[t](r):s.show&&i.show(r)})}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.5",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 r=this,o=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(o),this.isShown||o.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(){r.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=e.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),o&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});o?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(i)}).emulateTransitionEnd(n.TRANSITION_DURATION):r.$element.trigger("focus").trigger(i)}))},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").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 r=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&o;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+o).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)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){r.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}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 r=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=r,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var r=e(this),o=r.attr("href"),i=e(r.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(o)&&o},i.data(),r.data());r.is("a")&&n.preventDefault(),i.one("show.bs.modal",function(e){e.isDefaultPrevented()||i.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})}),t.call(i,s,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var r=e(this),o=r.data("bs.tooltip"),i="object"==typeof t&&t;(o||!/destroy|hide/.test(t))&&(o||r.data("bs.tooltip",o=new n(this,i)),"string"==typeof t&&o[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.inState=null,this.init("tooltip",e,t)};n.VERSION="3.3.5",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,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},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 o=this.options.trigger.split(" "),i=o.length;i--;){var s=o[i];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+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,r){n[e]!=r&&(t[e]=r)}),t},n.prototype.enter=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)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(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.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},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)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(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 r=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!r)return;var o=this,i=this.tip(),s=this.getUID(this.type);this.setContent(),i.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,l=u.test(a);l&&(a=a.replace(u,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),
|
|
this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),f=i[0].offsetWidth,d=i[0].offsetHeight;if(l){var p=a,h=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+d>h.bottom?"top":"top"==a&&c.top-d<h.top?"bottom":"right"==a&&c.right+f>h.width?"left":"left"==a&&c.left-f<h.left?"right":a,i.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,c,f,d);this.applyPlacement(m,a);var g=function(){var e=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==e&&o.leave(o)};e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",g).emulateTransitionEnd(n.TRANSITION_DURATION):g()}},n.prototype.applyPlacement=function(t,n){var r=this.tip(),o=r[0].offsetWidth,i=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),a=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,e.offset.setOffset(r[0],e.extend({using:function(e){r.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),r.addClass("in");var u=r[0].offsetWidth,l=r[0].offsetHeight;"top"==n&&l!=i&&(t.top=t.top+i-l);var c=this.getViewportAdjustedDelta(n,t,u,l);c.left?t.left+=c.left:t.top+=c.top;var f=/top|bottom/.test(n),d=f?2*c.left-o+u:2*c.top-i+l,p=f?"offsetWidth":"offsetHeight";r.offset(t),this.replaceArrow(d,r[0][p],f)},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 r(){"in"!=o.hoverState&&i.detach(),o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),t&&t()}var o=this,i=e(this.$tip),s=e.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),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],r="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=e.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var i=r?{top:0,left:0}:t.offset(),s={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=r?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},o,s,a,i)},n.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,r){var o={top:0,left:0};if(!this.$viewport)return o;var i=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-i-s.scroll,u=t.top+i-s.scroll+r;a<s.top?o.top=s.top-a:u>s.top+s.height&&(o.top=s.top+s.height-u)}else{var l=t.left-i,c=t.left+i+n;l<s.left?o.left=s.left-l:c>s.right&&(o.left=s.left+s.width-c)}return o},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(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},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))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(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),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null})};var r=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=r,this}}(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,r=this;e(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(o,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,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Spinner=t()}(this,function(){"use strict";function e(e,t){var n,r=document.createElement(e||"div");for(n in t)r[n]=t[n];return r}function t(e){for(var t=1,n=arguments.length;n>t;t++)e.appendChild(arguments[t]);return e}function n(e,t,n,r){var o=["opacity",t,~~(100*e),n,r].join("-"),i=.01+n/r*100,s=Math.max(1-(1-e)/t*(100-i),e),a=l.substring(0,l.indexOf("Animation")).toLowerCase(),u=a&&"-"+a+"-"||"";return f[o]||(d.insertRule("@"+u+"keyframes "+o+"{0%{opacity:"+s+"}"+i+"%{opacity:"+e+"}"+(i+.01)+"%{opacity:1}"+(i+t)%100+"%{opacity:"+e+"}100%{opacity:"+s+"}}",d.cssRules.length),f[o]=1),o}function r(e,t){var n,r,o=e.style;for(t=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<c.length;r++)if(n=c[r]+t,void 0!==o[n])return n;return void 0!==o[t]?t:void 0}function o(e,t){for(var n in t)e.style[r(e,n)||n]=t[n];return e}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)void 0===e[r]&&(e[r]=n[r])}return e}function s(e,t){return"string"==typeof e?e:e[t%e.length]}function a(e){this.opts=i(e||{},a.defaults,p)}function u(){function n(t,n){return e("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}d.addRule(".spin-vml","behavior:url(#default#VML)"),a.prototype.lines=function(e,r){function i(){return o(n("group",{coordsize:c+" "+c,coordorigin:-l+" "+-l}),{width:c,height:c})}function a(e,a,u){t(d,t(o(i(),{rotation:360/r.lines*e+"deg",left:~~a}),t(o(n("roundrect",{arcsize:r.corners}),{width:l,height:r.width,left:r.radius,top:-r.width>>1,filter:u}),n("fill",{color:s(r.color,e),opacity:r.opacity}),n("stroke",{opacity:0}))))}var u,l=r.length+r.width,c=2*l,f=2*-(r.width+r.length)+"px",d=o(i(),{position:"absolute",top:f,left:f});if(r.shadow)for(u=1;u<=r.lines;u++)a(u,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(u=1;u<=r.lines;u++)a(u);return t(e,d)},a.prototype.opacity=function(e,t,n,r){var o=e.firstChild;r=r.shadow&&r.lines||0,o&&t+r<o.childNodes.length&&(o=o.childNodes[t+r],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=n))}}var l,c=["webkit","Moz","ms","O"],f={},d=function(){var n=e("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};a.defaults={},i(a.prototype,{spin:function(t){this.stop();var n=this,r=n.opts,i=n.el=o(e(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex});if(o(i,{left:r.left,top:r.top}),t&&t.insertBefore(i,t.firstChild||null),i.setAttribute("role","progressbar"),n.lines(i,n.opts),!l){var s,a=0,u=(r.lines-1)*(1-r.direction)/2,c=r.fps,f=c/r.speed,d=(1-r.opacity)/(f*r.trail/100),p=f/r.lines;!function h(){a++;for(var e=0;e<r.lines;e++)s=Math.max(1-(a+(r.lines-e)*p)%f*d,r.opacity),n.opacity(i,e*r.direction+u,s,r);n.timeout=n.el&&setTimeout(h,~~(1e3/c))}()}return n},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=void 0),this},lines:function(r,i){function a(t,n){return o(e(),{position:"absolute",width:i.length+i.width+"px",height:i.width+"px",background:t,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/i.lines*c+i.rotate)+"deg) translate("+i.radius+"px,0)",borderRadius:(i.corners*i.width>>1)+"px"})}for(var u,c=0,f=(i.lines-1)*(1-i.direction)/2;c<i.lines;c++)u=o(e(),{position:"absolute",top:1+~(i.width/2)+"px",transform:i.hwaccel?"translate3d(0,0,0)":"",opacity:i.opacity,animation:l&&n(i.opacity,i.trail,f+c*i.direction,i.lines)+" "+1/i.speed+"s linear infinite"}),i.shadow&&t(u,o(a("#000","0 0 4px #000"),{top:"2px"})),t(r,t(u,a(s(i.color,c),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(e,t,n){t<e.childNodes.length&&(e.childNodes[t].style.opacity=n)}});var h=o(e("group"),{behavior:"url(#default#VML)"});return!r(h,"transform")&&h.adj?u():l=r(h,"animation"),a}),function(e){if("object"==typeof exports)e(require("jquery"),require("spin.js"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],e);else{if(!window.Spinner)throw new Error("Spin.js not present");e(window.jQuery,window.Spinner)}}(function(e,t){e.fn.spin=function(n,r){return this.each(function(){var o=e(this),i=o.data();i.spinner&&(i.spinner.stop(),delete i.spinner),n!==!1&&(n=e.extend({color:r||o.css("color")},e.fn.spin.presets[n]||n),i.spinner=new t(n).spin(this))})},e.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}),System.register("flarum/app",["flarum/App","flarum/initializers/store","flarum/initializers/preload","flarum/initializers/routes","flarum/initializers/boot"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=new t,s.initializers.add("store",n),s.initializers.add("routes",o),s.initializers.add("preload",r,-100),s.initializers.add("boot",i,-100),s.extensionSettings={},e("default",s)}}}),System.register("flarum/components/AddExtensionModal",["flarum/components/Modal"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"AddExtensionModal Modal--small"}},{key:"title",value:function(){return"Add Extension"}},{key:"content",value:function(){return m("div",{className:"Modal-body"},m("p",null,"One day in the not-too-distant future, this dialog will allow you to add an extension to your forum with ease. We're building an ecosystem as we speak!"),m("p",null,"In the meantime, if you manage to get your hands on a new extension, simply drop it in your forum's ",m("code",null,"extensions")," directory."),m("p",null,"If you're a developer, you can ",m("a",{href:"http://flarum.org/docs/extend"},"read the docs")," and have a go at building your own."))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/AdminLinkButton",["flarum/components/LinkButton"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getButtonContent",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"getButtonContent",this).call(this);return e.push(m("div",{className:"AdminLinkButton-description"},this.props.description)),e}}]),t}(t),e("default",n)}}}),System.register("flarum/components/AdminNav",["flarum/Component","flarum/components/AdminLinkButton","flarum/components/SelectDropdown","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m(r,{className:"AdminNav App-titleControl",buttonClassName:"Button",children:this.items().toArray()})}},{key:"items",value:function i(){var i=new o;return i.add("dashboard",n.component({href:app.route("dashboard"),icon:"bar-chart",children:"Dashboard",description:"Your forum at a glance."})),i.add("basics",n.component({href:app.route("basics"),icon:"pencil",children:"Basics",description:"Set your forum title, language, and other basic settings."})),i.add("permissions",n.component({href:app.route("permissions"),icon:"key",children:"Permissions",description:"Configure who can see and do what."})),i.add("appearance",n.component({href:app.route("appearance"),icon:"paint-brush",children:"Appearance",description:"Customize your forum's colors, logos, and other variables."})),i.add("extensions",n.component({href:app.route("extensions"),icon:"puzzle-piece",children:"Extensions",description:"Add extra functionality to your forum and make it your own."})),i}}]),t}(t),e("default",i)}}}),System.register("flarum/components/AppearancePage",["flarum/Component","flarum/components/Button","flarum/components/Switch","flarum/components/EditCustomCssModal","flarum/utils/saveConfig"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.primaryColor=m.prop(app.config.theme_primary_color),this.secondaryColor=m.prop(app.config.theme_secondary_color),this.darkMode=m.prop("1"===app.config.theme_dark_mode),this.coloredHeader=m.prop("1"===app.config.theme_colored_header)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"AppearancePage"},m("div",{className:"container"},m("form",{onsubmit:this.onsubmit.bind(this)},m("fieldset",{className:"AppearancePage-colors"},m("legend",null,"Colors"),m("div",{className:"helpText"},"Choose two colors to theme your forum with. The first will be used as a highlight color, while the second will be used to style background elements."),m("div",{className:"AppearancePage-colors-input"},m("input",{className:"FormControl",placeholder:"#aaaaaa",value:this.primaryColor(),onchange:m.withAttr("value",this.primaryColor)}),m("input",{className:"FormControl",placeholder:"#aaaaaa",value:this.secondaryColor(),onchange:m.withAttr("value",this.secondaryColor)})),r.component({state:this.darkMode(),children:"Dark Mode",onchange:this.darkMode}),r.component({state:this.coloredHeader(),children:"Colored Header",onchange:this.coloredHeader}),n.component({className:"Button Button--primary",type:"submit",children:"Save Changes",loading:this.loading}))),m("fieldset",null,m("legend",null,"Custom Styles"),m("div",{className:"helpText"},"Customize your forum's appearance by adding your own LESS/CSS code to be applied on top of Flarum's default styles."),n.component({className:"Button",children:"Edit Custom CSS",onclick:function(){return app.modal.show(new o)}}))))}},{key:"onsubmit",value:function(e){e.preventDefault();var t=/^#[0-9a-f]{3}([0-9a-f]{3})?$/i;return t.test(this.primaryColor())&&t.test(this.secondaryColor())?(this.loading=!0,void i({theme_primary_color:this.primaryColor(),theme_secondary_color:this.secondaryColor(),theme_dark_mode:this.darkMode(),theme_colored_header:this.coloredHeader()}).then(function(){return window.location.reload()})):void alert("Please enter a hexadecimal color code.")}}]),t}(t),e("default",s)}}}),System.register("flarum/components/BasicsPage",["flarum/Component","flarum/components/FieldSet","flarum/components/Select","flarum/components/Button","flarum/components/Alert","flarum/utils/saveConfig","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i,s,a,u;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]}],execute:function(){u=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"init",value:function(){var e=this;this.loading=!1,this.fields=["forum_title","forum_description","default_locale","default_route","welcome_title","welcome_message"],this.values={};var t=app.config;this.fields.forEach(function(n){return e.values[n]=m.prop(t[n])}),this.localeOptions={};var n=app.locales;for(var r in n)this.localeOptions[r]=n[r]+" ("+r+")"}},{key:"view",value:function(){var e=this;return m("div",{className:"BasicsPage"},m("div",{className:"container"},m("form",{onsubmit:this.onsubmit.bind(this)},n.component({label:"Forum Title",children:[m("input",{className:"FormControl",value:this.values.forum_title(),oninput:m.withAttr("value",this.values.forum_title)})]}),n.component({label:"Forum Description",children:[m("div",{className:"helpText"},"Enter a short sentence or two that describes your community. This will appear in the meta tag and show up in search engines."),m("textarea",{className:"FormControl",value:this.values.forum_description(),oninput:m.withAttr("value",this.values.forum_description)})]}),Object.keys(this.localeOptions).length>1?n.component({label:"Default Language",children:[r.component({options:this.localeOptions,onchange:this.values.default_locale})]}):"",n.component({label:"Home Page",className:"BasicsPage-homePage",children:[m("div",{className:"helpText"},"Choose the page which users will first see when they visit your forum. If entering a custom value, use the path relative to the forum root."),this.homePageItems().toArray().map(function(t){var n=t.path,r=t.label;return m("label",{className:"checkbox"},m("input",{type:"radio",name:"homePage",value:n,checked:e.values.default_route()===n,onclick:m.withAttr("value",e.values.default_route)}),r)})]}),n.component({label:"Welcome Banner",className:"BasicsPage-welcomeBanner",children:[m("div",{className:"helpText"},"Configure the text that displays in the banner on the All Discussions page. Use this to welcome guests to your forum."),m("div",{className:"BasicsPage-welcomeBanner-input"},m("input",{className:"FormControl",value:this.values.welcome_title(),oninput:m.withAttr("value",this.values.welcome_title)}),m("textarea",{className:"FormControl",value:this.values.welcome_message(),oninput:m.withAttr("value",this.values.welcome_message)}))]}),o.component({type:"submit",className:"Button Button--primary",children:"Save Changes",loading:this.loading,disabled:!this.changed()}))))}},{key:"changed",value:function(){var e=this;return this.fields.some(function(t){return e.values[t]()!==app.config[t]})}},{key:"homePageItems",value:function(){var e=new a;return e.add("allDiscussions",{path:"/all",label:"All Discussions"}),e}},{key:"onsubmit",value:function(e){var t=this;if(e.preventDefault(),!this.loading){this.loading=!0,app.alerts.dismiss(this.successAlert);var n={};this.fields.forEach(function(e){return n[e]=t.values[e]()}),s(n).then(function(){app.alerts.show(t.successAlert=new i({type:"success",children:"Your changes were saved."}))})["finally"](function(){t.loading=!1,m.redraw()})}}}]),t}(t),e("default",u)}}}),System.register("flarum/components/ConfigDropdown",["flarum/components/SelectDropdown","flarum/components/Button","flarum/utils/saveConfig"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){var o=this;babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className="ConfigDropdown",e.buttonClassName="Button Button--text",e.caretIcon="caret-down",e.defaultLabel="Custom",e.children=e.options.map(function(t){var i=t.value,s=t.label,a=app.config[e.key]===i;return n.component({children:s,icon:a?"check":!0,onclick:r.bind(o,babelHelpers.defineProperty({},e.key,i)),active:a})})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/DashboardPage",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"DashboardPage"},m("div",{className:"container"},m("h2",null,"Welcome to Flarum Beta"),m("p",null,"Thanks for trying out Flarum! You are running version ",m("strong",null,app.forum.attribute("version")),"."),m("p",null,"This ",m("strong",null,"beta software")," is provided primarily so that you can help us test it and make it better; it should not be used in production."),m("ul",null,m("li",null,"Want to look for bugs and contribute? Read the ",m("a",{href:"http://flarum.org/docs/contributing",target:"_blank"},"Contributing docs"),"."),m("li",null,"Having problems? Follow the instructions in the ",m("a",{href:"http://flarum.org/docs/troubleshooting",target:"_blank"},"Troubleshooting docs"),"."),m("li",null,"Found a bug? Please report it in our forum, under the ",m("a",{href:"http://discuss.flarum.org/t/support",target:"_blank"},"Support tag"),"."),m("li",null,"Got an idea to improve a feature? Tell us about it under the ",m("a",{href:"http://discuss.flarum.org/t/features",target:"_blank"},"Features tag"),"."),m("li",null,"Interested in developing extensions? Read the ",m("a",{href:"http://flarum.org/docs/extend",target:"_blank"},"Extension docs"),"."))))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/EditCustomCssModal",["flarum/components/Modal","flarum/components/Button","flarum/utils/saveConfig"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.customLess=m.prop(app.config.custom_less||"")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"EditCustomCssModal Modal--large"}},{key:"title",value:function(){return"Edit Custom CSS"}},{key:"content",value:function(){return m("div",{className:"Modal-body"},m("p",null,"Customize your forum's appearance by adding your own LESS/CSS code to be applied on top of Flarum's default styles. ",m("a",{href:"http://flarum.org/docs/extend/themes/"},"Read the documentation")," for more information."),m("div",{className:"Form"},m("div",{className:"Form-group"},m("textarea",{className:"FormControl",rows:"30",value:this.customLess(),onchange:m.withAttr("value",this.customLess)})),m("div",{className:"Form-group"},n.component({className:"Button Button--primary",type:"submit",children:"Save Changes",loading:this.loading}))))}},{key:"onsubmit",value:function(e){e.preventDefault(),this.loading=!0,r({custom_less:this.customLess()}).then(function(){return window.location.reload()})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/EditGroupModal",["flarum/components/Modal","flarum/components/Button","flarum/components/Badge","flarum/models/Group"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.group=this.props.group||app.store.createRecord("groups"),this.nameSingular=m.prop(this.group.nameSingular()||""),this.namePlural=m.prop(this.group.namePlural()||""),this.icon=m.prop(this.group.icon()||""),this.color=m.prop(this.group.color()||"")}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"EditGroupModal Modal--small"}},{key:"title",value:function(){return[this.color()||this.icon()?r.component({icon:this.icon(),style:{backgroundColor:this.color()}}):""," ",this.namePlural()||"Create Group"]}},{key:"content",value:function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,"Name"),m("div",{className:"EditGroupModal-name-input"},m("input",{className:"FormControl",placeholder:"Singular (e.g. Mod)",value:this.nameSingular(),oninput:m.withAttr("value",this.nameSingular)}),m("input",{className:"FormControl",placeholder:"Plural (e.g. Mods)",value:this.namePlural(),oninput:m.withAttr("value",this.namePlural)}))),m("div",{className:"Form-group"},m("label",null,"Color"),m("input",{className:"FormControl",placeholder:"#aaaaaa",value:this.color(),oninput:m.withAttr("value",this.color)})),m("div",{className:"Form-group"},m("label",null,"Icon"),m("div",{className:"helpText"},"Enter the name of any ",m("a",{href:"http://fortawesome.github.io/Font-Awesome/icons/",tabindex:"-1"},"FontAwesome")," icon class, ",m("em",null,"without")," the ",m("code",null,"fa-")," prefix."),m("input",{className:"FormControl",placeholder:"bolt",value:this.icon(),oninput:m.withAttr("value",this.icon)})),m("div",{className:"Form-group"},n.component({type:"submit",className:"Button Button--primary EditGroupModal-save",loading:this.loading,children:"Save Changes"}),this.group.exists&&this.group.id()!==o.ADMINISTRATOR_ID?m("button",{type:"button",className:"Button EditGroupModal-delete",onclick:this["delete"].bind(this)},"Delete Group"):"")))}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0,this.group.save({nameSingular:this.nameSingular(),namePlural:this.namePlural(),color:this.color(),icon:this.icon()}).then(function(){return t.hide()},function(){t.loading=!1,m.redraw()})}},{key:"delete",value:function(){confirm("Are you sure you want to delete this group? The group members will NOT be deleted.")&&(this.group["delete"]().then(function(){return m.redraw()}),this.hide())}}]),t}(t),e("default",i)}}}),System.register("flarum/components/ExtensionsPage",["flarum/Component","flarum/components/LinkButton","flarum/components/Button","flarum/components/Dropdown","flarum/components/Separator","flarum/components/AddExtensionModal","flarum/components/LoadingModal","flarum/utils/ItemList","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o,i,s,a,u,l,c;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){c=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this;return m("div",{className:"ExtensionsPage"},m("div",{className:"ExtensionsPage-header"},m("div",{className:"container"},r.component({children:"Add Extension",icon:"plus",className:"Button Button--primary",onclick:function(){return app.modal.show(new s)}}))),m("div",{className:"ExtensionsPage-list"},m("div",{className:"container"},m("ul",{className:"ExtensionList"},Object.keys(app.extensions).sort(function(e,t){return app.extensions[e].extra["flarum-extension"].title.localeCompare(app.extensions[t].extra["flarum-extension"].title)}).map(function(t){var n=app.extensions[t];return m("li",{className:"ExtensionListItem "+(e.isEnabled(t)?"":"disabled")},o.component({icon:"ellipsis-v",children:e.controlItems(t).toArray(),className:"ExtensionListItem-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right"}),m("div",{className:"ExtensionListItem-content"},m("span",{className:"ExtensionListItem-icon ExtensionIcon",style:n.extra["flarum-extension"].icon},n.extra["flarum-extension"].icon?l(n.extra["flarum-extension"].icon.name):""),m("h4",{className:"ExtensionListItem-title"},n.extra["flarum-extension"].title," ",m("small",{className:"ExtensionListItem-version"},n.version)),m("div",{className:"ExtensionListItem-description"},n.description)))})))))}},{key:"controlItems",value:function(e){var t=new u,n=app.extensions[e],o=this.isEnabled(e);return t.add("info",m("span",null,"Package Name: ",n.name,m("br",null),"Installed in: ",e)),app.extensionSettings[n.name]&&t.add("settings",r.component({icon:"cog",children:"Settings",onclick:app.extensionSettings[n.name]})),t.add("toggle",r.component({icon:"power-off",children:o?"Disable":"Enable",onclick:function(){app.request({url:app.forum.attribute("apiUrl")+"/extensions/"+e,method:"PATCH",data:{enabled:!o}}).then(function(){return window.location.reload()}),app.modal.show(new a)}})),o||t.add("uninstall",r.component({icon:"trash-o",children:"Uninstall",onclick:function(){app.request({url:app.forum.attribute("apiUrl")+"/extensions/"+e,method:"DELETE"}).then(function(){return window.location.reload()}),app.modal.show(new a)}})),t}},{key:"isEnabled",value:function(e){var t=JSON.parse(app.config.extensions_enabled);return-1!==t.indexOf(e)}}]),t}(t),e("default",c)}}}),System.register("flarum/components/HeaderPrimary",["flarum/Component","flarum/utils/ItemList","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("ul",{className:"Header-controls"},r(this.items().toArray()))}},{key:"items",value:function(){return new n}}]),t}(t),e("default",o)}}}),System.register("flarum/components/HeaderSecondary",["flarum/Component","flarum/components/SessionDropdown","flarum/utils/ItemList","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){
|
|
r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("ul",{className:"Header-controls"},o(this.items().toArray()))}},{key:"items",value:function i(){var i=new r;return i.add("session",n.component()),i}}]),t}(t),e("default",i)}}}),System.register("flarum/components/LoadingModal",["flarum/components/Modal"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"isDismissible",value:function(){return!1}},{key:"className",value:function(){return"LoadingModal Modal--small"}},{key:"title",value:function(){return"Please Wait..."}},{key:"content",value:function(){return""}}]),t}(t),e("default",n)}}}),System.register("flarum/components/PermissionDropdown",["flarum/components/Dropdown","flarum/components/Button","flarum/components/Separator","flarum/models/Group","flarum/components/GroupBadge"],function(e){"use strict";function t(e){var t=app.store.getById("groups",e);return t?s.component({group:t,label:null}):""}var n,r,o,i,s,a;return{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function n(){babelHelpers.classCallCheck(this,n),babelHelpers.get(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(n,e),babelHelpers.createClass(n,[{key:"view",value:function(){var e=this;this.props.children=[];var a=app.permissions[this.props.permission]||[],u=-1!==a.indexOf(i.GUEST_ID),l=-1!==a.indexOf(i.MEMBER_ID),c=app.store.getById("groups",i.ADMINISTRATOR_ID);return u?this.props.label="Everyone":l?this.props.label="Members":this.props.label=[t(i.ADMINISTRATOR_ID),a.map(t)],this.props.allowGuest&&this.props.children.push(r.component({children:"Everyone",icon:u?"check":!0,onclick:function(){return e.save([i.GUEST_ID])}})),this.props.children.push(r.component({children:"Members",icon:l?"check":!0,onclick:function(){return e.save([i.MEMBER_ID])}}),o.component(),r.component({children:[s.component({group:c,label:null})," ",c.namePlural()],icon:u||l?!0:"check",disabled:!u&&!l,onclick:function(t){t.shiftKey&&t.stopPropagation(),e.save([])}})),[].push.apply(this.props.children,app.store.all("groups").filter(function(e){return-1===[i.ADMINISTRATOR_ID,i.GUEST_ID,i.MEMBER_ID].indexOf(e.id())}).map(function(t){return r.component({children:[s.component({group:t,label:null})," ",t.namePlural()],icon:-1!==a.indexOf(t.id())?"check":!0,onclick:function(n){n.shiftKey&&n.stopPropagation(),e.toggle(t.id())}})})),babelHelpers.get(Object.getPrototypeOf(n.prototype),"view",this).call(this)}},{key:"save",value:function(e){var t=this.props.permission;app.permissions[t]=e,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/permission",data:{permission:t,groupIds:e}})}},{key:"toggle",value:function(e){var t=this.props.permission,n=app.permissions[t]||[],r=n.indexOf(e);-1!==r?n.splice(r,1):(n.push(e),n=n.filter(function(e){return-1===[i.GUEST_ID,i.MEMBER_ID].indexOf(e)})),this.save(n)}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(n),"initProps",this).call(this,e),e.className="PermissionDropdown",e.buttonClassName="Button Button--text"}}]),n}(n),e("default",a)}}}),System.register("flarum/components/PermissionGrid",["flarum/Component","flarum/components/PermissionDropdown","flarum/components/ConfigDropdown","flarum/components/Button","flarum/utils/ItemList","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.permissions=this.permissionItems().toArray()}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.scopeItems().toArray(),t=function(t){return e.map(function(e){return m("td",null,e.render(t))})};return m("table",{className:"PermissionGrid"},m("thead",null,m("tr",null,m("td",null),e.map(function(e){return m("th",null,e.label," ",e.onremove?o.component({icon:"times",className:"Button Button--text PermissionGrid-removeScope",onclick:e.onremove}):"")}),m("th",null,this.scopeControlItems().toArray()))),this.permissions.map(function(e){return m("tbody",null,m("tr",{className:"PermissionGrid-section"},m("th",null,e.label),t(e),m("td",null)),e.children.map(function(e){return m("tr",{className:"PermissionGrid-child"},m("th",null,e.icon?s(e.icon):"",e.label),t(e),m("td",null))}))}))}},{key:"permissionItems",value:function(){var e=new i;return e.add("view",{label:"Read",children:this.viewItems().toArray()},100),e.add("start",{label:"Create",children:this.startItems().toArray()},90),e.add("reply",{label:"Participate",children:this.replyItems().toArray()},80),e.add("moderate",{label:"Moderate",children:this.moderateItems().toArray()},70),e}},{key:"viewItems",value:function(){var e=new i;return e.add("view",{icon:"eye",label:"View discussions",permission:"forum.view",allowGuest:!0},100),e.add("signUp",{icon:"user-plus",label:"Sign up",setting:function(){return r.component({key:"allow_sign_up",options:[{value:"1",label:"Open"},{value:"0",label:"Closed"}]})}},90),e}},{key:"startItems",value:function(){var e=new i;return e.add("start",{icon:"edit",label:"Start discussions",permission:"forum.startDiscussion"},100),e.add("allowRenaming",{icon:"i-cursor",label:"Allow renaming",setting:function(){var e=parseInt(app.config.allow_renaming,10);return r.component({defaultLabel:e?"For "+e+" minutes":"Indefinitely",key:"allow_renaming",options:[{value:"-1",label:"Indefinitely"},{value:"10",label:"For 10 minutes"},{value:"reply",label:"Until next reply"}]})}},90),e}},{key:"replyItems",value:function(){var e=new i;return e.add("reply",{icon:"reply",label:"Reply to discussions",permission:"discussion.reply"},100),e.add("allowPostEditing",{icon:"pencil",label:"Allow post editing",setting:function(){var e=parseInt(app.config.allow_post_editing,10);return r.component({defaultLabel:e?"For "+e+" minutes":"Indefinitely",key:"allow_post_editing",options:[{value:"-1",label:"Indefinitely"},{value:"10",label:"For 10 minutes"},{value:"reply",label:"Until next reply"}]})}},90),e}},{key:"moderateItems",value:function(){var e=new i;return e.add("renameDiscussions",{icon:"i-cursor",label:"Rename discussions",permission:"discussion.rename"},100),e.add("hideDiscussions",{icon:"trash-o",label:"Delete discussions",permission:"discussion.hide"},90),e.add("deleteDiscussions",{icon:"times",label:"Delete discussions forever",permission:"discussion.delete"},80),e.add("editPosts",{icon:"pencil",label:"Edit and delete posts",permission:"discussion.editPosts"},70),e.add("deletePosts",{icon:"times",label:"Delete posts forever",permission:"discussion.deletePosts"},60),e}},{key:"scopeItems",value:function(){var e=new i;return e.add("global",{label:"Global",render:function(e){return e.setting?e.setting():e.permission?n.component({permission:e.permission,allowGuest:e.allowGuest}):""}},100),e}},{key:"scopeControlItems",value:function(){return new i}}]),t}(t),e("default",a)}}}),System.register("flarum/components/PermissionsPage",["flarum/Component","flarum/components/GroupBadge","flarum/components/EditGroupModal","flarum/models/Group","flarum/helpers/icon","flarum/components/PermissionGrid"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"PermissionsPage"},m("div",{className:"PermissionsPage-groups"},m("div",{className:"container"},app.store.all("groups").filter(function(e){return-1===[o.GUEST_ID,o.MEMBER_ID].indexOf(e.id())}).map(function(e){return m("button",{className:"Button Group",onclick:function(){return app.modal.show(new r({group:e}))}},n.component({group:e,className:"Group-icon",label:null}),m("span",{className:"Group-name"},e.namePlural()))}),m("button",{className:"Button Group Group--add",onclick:function(){return app.modal.show(new r)}},i("plus",{className:"Group-icon"}),m("span",{className:"Group-name"},"New Group")))),m("div",{className:"PermissionsPage-permissions"},m("div",{className:"container"},s.component())))}}]),t}(t),e("default",a)}}}),System.register("flarum/components/SessionDropdown",["flarum/helpers/avatar","flarum/helpers/username","flarum/components/Dropdown","flarum/components/Button","flarum/utils/ItemList"],function(e){"use strict";var t,n,r,o,i,s;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){s=function(e){function r(){babelHelpers.classCallCheck(this,r),babelHelpers.get(Object.getPrototypeOf(r.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"view",value:function(){return this.props.children=this.items().toArray(),babelHelpers.get(Object.getPrototypeOf(r.prototype),"view",this).call(this)}},{key:"getButtonContent",value:function(){var e=app.session.user;return[t(e)," ",m("span",{className:"Button-label"},n(e))]}},{key:"items",value:function s(){var s=new i;return s.add("logOut",o.component({icon:"sign-out",children:app.trans("core.log_out"),onclick:app.session.logout.bind(app.session)}),-100),s}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(r),"initProps",this).call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"}}]),r}(r),e("default",s)}}}),System.register("flarum/components/SettingsModal",["flarum/components/Modal","flarum/components/Button","flarum/utils/saveConfig"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"init",value:function(){this.settings={},this.loading=!1}},{key:"form",value:function(){return""}},{key:"content",value:function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.form(),m("div",{className:"Form-group"},this.submitButton())))}},{key:"submitButton",value:function(){return m(n,{type:"submit",className:"Button Button--primary",loading:this.loading,disabled:!this.changed()},"Save Changes")}},{key:"setting",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return this.settings[e]=this.settings[e]||m.prop(app.config[e]||t),this.settings[e]}},{key:"dirty",value:function o(){var e=this,o={};return Object.keys(this.settings).forEach(function(t){var n=e.settings[t]();n!==app.config[t]&&(o[t]=n)}),o}},{key:"changed",value:function(){return Object.keys(this.dirty()).length}},{key:"onsubmit",value:function(e){var t=this;e.preventDefault(),this.loading=!0,r(this.dirty()).then(function(){return t.hide()},function(){t.loading=!1,m.redraw()})}}]),t}(t),e("default",o)}}}),System.register("flarum/initializers/boot",["flarum/utils/ScrollListener","flarum/utils/Drawer","flarum/utils/mapRoutes","flarum/components/Navigation","flarum/components/HeaderPrimary","flarum/components/HeaderSecondary","flarum/components/AdminNav","flarum/components/ModalManager","flarum/components/AlertManager"],function(e){"use strict";function t(e){m.startComputation(),m.mount(document.getElementById("app-navigation"),i.component({className:"App-backControl",drawer:!0})),m.mount(document.getElementById("header-navigation"),i.component()),m.mount(document.getElementById("header-primary"),s.component()),m.mount(document.getElementById("header-secondary"),a.component()),m.mount(document.getElementById("admin-navigation"),u.component()),e.drawer=new r,e.modal=m.mount(document.getElementById("modal"),l.component()),e.alerts=m.mount(document.getElementById("alerts"),c.component()),e.history={canGoBack:function(){return!0},backUrl:function(){return e.forum.attribute("baseUrl")},back:function(){window.location=this.backUrl()}},m.route.mode="hash",m.route(document.getElementById("content"),"/",o(e.routes)),m.endComputation(),new n(function(e){var t=$("#app"),n=t.offset().top;t.toggleClass("affix",e>=n).toggleClass("scrolled",e>n)}).start(),e.booted=!0}var n,r,o,i,s,a,u,l,c;return e("default",t),{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]},function(e){c=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/routes",["flarum/components/DashboardPage","flarum/components/BasicsPage","flarum/components/PermissionsPage","flarum/components/AppearancePage","flarum/components/ExtensionsPage"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){e("default",function(e){e.routes={dashboard:{path:"/",component:t.component()},basics:{path:"/basics",component:n.component()},permissions:{path:"/permissions",component:r.component()},appearance:{path:"/appearance",component:o.component()},extensions:{path:"/extensions",component:i.component()}}})}}}),System.register("flarum/utils/saveConfig",[],function(e){"use strict";function t(e){var t=JSON.parse(JSON.stringify(app.config));return babelHelpers._extends(app.config,e),app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/config",data:{config:e}})["catch"](function(e){throw app.config=t,e})}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/App",["flarum/utils/ItemList","flarum/components/Alert","flarum/components/Button","flarum/components/RequestErrorModal","flarum/Translator","flarum/utils/extract","flarum/utils/patchMithril","flarum/utils/RequestError"],function(e){"use strict";var t,n,r,o,i,s,a,u,l;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]}],execute:function(){l=function(){function e(){babelHelpers.classCallCheck(this,e),a(window),this.forum=null,this.routes={},this.preload={data:null,document:null,session:null},this.initializers=new t,this.session=null,this.translator=new i,this.store=null,this.cache={},this.booted=!1,this.requestError=null,this.title="",this.titleCount=0}return babelHelpers.createClass(e,[{key:"boot",value:function(){var e=this;this.initializers.toArray().forEach(function(t){return t(e)})}},{key:"preloadedDocument",value:function(){if(app.preload.document){var e=app.store.pushPayload(app.preload.document);return app.preload.document=null,e}return null}},{key:"setTitle",value:function(e){this.title=e,this.updateTitle()}},{key:"setTitleCount",value:function(e){this.titleCount=e,this.updateTitle()}},{key:"updateTitle",value:function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")}},{key:"request",value:function(e){var t=this;e.config=e.config||this.session.authorize.bind(this.session),e.background=e.background||!0,e.deserialize=e.deserialize||function(e){try{return JSON.parse(e)}catch(t){throw new u(t.message,e)}};var o=e.extract;return e.extract=function(e){var t=void 0;t=o?o(e.responseText):e.responseText.length>0?e.responseText:null;var n=e.status;if(n>=500&&599>=n)throw new u("Internal Server Error",t);return t},this.alerts.dismiss(this.requestErrorAlert),m.request(e).then(null,function(e){throw e instanceof u&&t.alerts.show(t.requestErrorAlert=new n({type:"error",children:"Oops! Something went wrong. Please reload the page and try again.",controls:app.forum.attribute("debug")?[m(r,{className:"Button Button--link",onclick:t.showDebug.bind(t,e)},"Debug")]:void 0})),e})}},{key:"showDebug",value:function(e){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(new o({error:e}))}},{key:"alertErrors",value:function(e){var t=this;e.forEach(function(e){t.alerts.show(new n({type:"error",children:e.detail}))})}},{key:"route",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=this.routes[e].path.replace(/:([^\/]+)/g,function(e,n){return s(t,n)}),r=m.route.buildQueryString(t),o="pathname"===m.route.mode?app.forum.attribute("basePath"):"";return o+n+(r?"?"+r:"")}},{key:"trans",value:function(e,t){return this.translator.trans(e,t)}}]),e}(),e("default",l)}}}),System.register("flarum/Component",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){void 0===t&&(t={}),babelHelpers.classCallCheck(this,e),n&&(t.children=n),this.constructor.initProps(t),this.props=t,this.element=null,this.init()}return babelHelpers.createClass(e,[{key:"init",value:function(){}},{key:"onunload",value:function(){}},{key:"render",value:function(){var e=this,t=this.view();t.attrs=t.attrs||{};var n=t.attrs.config;return t.attrs.config=function(){for(var t=arguments.length,r=Array(t),o=0;t>o;o++)r[o]=arguments[o];e.element=r[0],e.config.apply(e,r.slice(1)),n&&n.apply(e,r)},t}},{key:"$",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){var t=$(this.element);return e?t.find(e):t})},{key:"config",value:function(){}},{key:"view",value:function(){throw new Error("Component#view must be implemented by subclass")}}],[{key:"component",value:function(e,t){void 0===e&&(e={});var n=babelHelpers._extends({},e);t&&(n.children=t),this.initProps(n);var r=function(e){return e.props=n,e.render()};r.$original=this.prototype.view;var o={controller:this.bind(void 0,n),view:r,props:n,component:this};return n.key&&(o.attrs={key:n.key}),o}},{key:"initProps",value:function(e){}}]),e}(),e("default",t)}}}),System.register("flarum/Model",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){void 0===t&&(t={}),babelHelpers.classCallCheck(this,e),this.data=t,this.freshness=new Date,this.exists=!1,this.store=n}return babelHelpers.createClass(e,[{key:"id",value:function(){return this.data.id}},{key:"attribute",value:function(e){return this.data.attributes[e]}},{key:"pushData",value:function(t){for(var n in t)if("object"==typeof t[n]){this.data[n]=this.data[n]||{};for(var r in t[n])t[n][r]instanceof e&&(t[n][r]={data:e.getRelationshipData(t[n][r])}),this.data[n][r]=t[n][r]}else this.data[n]=t[n];this.freshness=new Date}},{key:"pushAttributes",value:function(e){this.pushData({attributes:e})}},{key:"save",value:function(t){var n=this,r={type:this.data.type,id:this.data.id,attributes:t};if(t.relationships){r.relationships={};for(var o in t.relationships){var i=t.relationships[o];r.relationships[o]={data:i instanceof Array?i.map(e.getRelationshipData):e.getRelationshipData(i)}}delete t.relationships}var s=JSON.parse(JSON.stringify(this.data));return this.pushData(r),app.request({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:{data:r}}).then(function(e){return n.store.data[e.data.type]=n.store.data[e.data.type]||{},n.store.data[e.data.type][e.data.id]=n,n.store.pushPayload(e)},function(e){throw n.pushData(s),m.lazyRedraw(),e})}},{key:"delete",value:function(e){var t=this;return this.exists?app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:e}).then(function(){t.exists=!1,t.store.remove(t)}):m.deferred.resolve().promise}},{key:"apiEndpoint",value:function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")}}],[{key:"attribute",value:function(e,t){return function(){var n=this.data.attributes&&this.data.attributes[e];return t?t(n):n}}},{key:"hasOne",value:function(e){return function(){if(this.data.relationships){var t=this.data.relationships[e];if(t)return app.store.getById(t.data.type,t.data.id)}return!1}}},{key:"hasMany",value:function(e){return function(){if(this.data.relationships){var t=this.data.relationships[e];if(t)return t.data.map(function(e){return app.store.getById(e.type,e.id)})}return!1}}},{key:"transformDate",value:function(e){return e?new Date(e):null}},{key:"getRelationshipData",value:function(e){return{type:e.data.type,id:e.data.id}}}]),e}(),e("default",t)}}}),System.register("flarum/Session",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t,n){babelHelpers.classCallCheck(this,e),this.user=n,this.token=t}return babelHelpers.createClass(e,[{key:"login",value:function(e,t){return app.request({method:"POST",url:app.forum.attribute("baseUrl")+"/login",data:{identification:e,password:t}}).then(function(){return window.location.reload()})}},{key:"logout",value:function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.token}},{key:"authorize",value:function(e){this.token&&e.setRequestHeader("Authorization","Token "+this.token)}}]),e}(),e("default",t)}}}),System.register("flarum/Store",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(t){babelHelpers.classCallCheck(this,e),this.data={},this.models=t}return babelHelpers.createClass(e,[{key:"pushPayload",value:function(e){e.included&&e.included.map(this.pushObject.bind(this));var t=e.data instanceof Array?e.data.map(this.pushObject.bind(this)):this.pushObject(e.data);return t.payload=e,t}},{key:"pushObject",value:function(e){if(!this.models[e.type])return null;var t=this.data[e.type]=this.data[e.type]||{};return t[e.id]?t[e.id].pushData(e):t[e.id]=this.createRecord(e.type,e),t[e.id].exists=!0,t[e.id]}},{key:"find",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n,o=app.forum.attribute("apiUrl")+"/"+e;return t instanceof Array?o+="?ids[]="+t.join("&ids[]="):"object"==typeof t?r=t:t&&(o+="/"+t),app.request({method:"GET",url:o,data:r}).then(this.pushPayload.bind(this))}},{key:"getById",value:function(e,t){return this.data[e]&&this.data[e][t]}},{key:"getBy",value:function(e,t,n){return this.all(e).filter(function(e){return e[t]()===n})[0]}},{key:"all",value:function(e){var t=this.data[e];return t?Object.keys(t).map(function(e){return t[e]}):[]}},{key:"remove",value:function(e){delete this.data[e.data.type][e.id()]}},{key:"createRecord",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.type=t.type||e,new this.models[e](t,this)}}]),e}(),e("default",t)}}}),System.register("flarum/Translator",["flarum/models/User","flarum/helpers/username","flarum/utils/extractText","flarum/utils/extract"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(){function e(){babelHelpers.classCallCheck(this,e),this.translations={}}return babelHelpers.createClass(e,[{key:"plural",value:function(e){return 1===e?"one":"other"}},{key:"trans",value:function(e,t,i){void 0===t&&(t={});var s=e.split("."),a=this.translations;if(s.forEach(function(e){a=a&&a[e]}),a&&"object"==typeof a&&"undefined"!=typeof t.count&&(a=a[this.plural(r(t.count))]),"user"in t){var u=o(t,"user");t.username||(t.username=n(u))}return"string"==typeof a?(a=a.split(new RegExp("({[^}]+})","gi")),a.forEach(function(e,n){var r=e.match(/^{(.+)}$/i);r&&(a[n]=t[r[1]])}),a):i||[e]}}]),e}(),e("default",i)}}}),System.register("flarum/extend",[],function(e){"use strict";function t(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];var i=r?r.apply(this,t):void 0;return n.apply(this,[i].concat(t)),i},babelHelpers._extends(e[t],r)}function n(e,t,n){var r=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),o=0;e>o;o++)t[o]=arguments[o];return n.apply(this,[r.bind(this)].concat(t))},babelHelpers._extends(e[t],r)}return e("extend",t),e("override",n),{setters:[],execute:function(){}}}),System.register("flarum/components/Alert",["flarum/Component","flarum/components/Button","flarum/helpers/listItems","flarum/utils/extract"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props),t=o(e,"type");e.className="Alert Alert--"+t+" "+(e.className||"");var i=o(e,"children"),s=o(e,"controls")||[],a=o(e,"dismissible"),u=o(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(n,{icon:"times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,m("span",{className:"Alert-body"},i),m("ul",{className:"Alert-controls"},r(s.concat(l))))}}]),t}(t),e("default",i)}}}),System.register("flarum/components/AlertManager",["flarum/Component","flarum/components/Alert"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.components=[]}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"AlertManager"},this.components.map(function(e){return m("div",{className:"AlertManager-alert"},e)}))}},{key:"show",value:function(e){if(!(e instanceof n))throw new Error("The AlertManager component can only show Alert components");e.props.ondismiss=this.dismiss.bind(this,e),this.components.push(e),m.redraw()}},{key:"dismiss",value:function(e){var t=this.components.indexOf(e);-1!==t&&(this.components.splice(t,1),m.redraw())}},{key:"clear",value:function(){this.components=[],m.redraw()}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Badge",["flarum/Component","flarum/helpers/icon","flarum/utils/extract"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props),t=r(e,"type"),o=r(e,"icon");return e.className="Badge "+(t?"Badge--"+t:"")+" "+(e.className||""),e.title=r(e,"label")||"",e.key=e.type,m("span",e,o?n(o,{className:"Badge-icon"}):m.trust(" "))}},{key:"config",value:function(e){e||this.props.label&&this.$().tooltip({container:"body"})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Button",["flarum/Component","flarum/helpers/icon","flarum/utils/extract","flarum/components/LoadingIndicator"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props);delete e.children,e.className=e.className||"",e.type=e.type||"button";var t=r(e,"icon");t&&(e.className+=" hasIcon");var n=r(e,"loading");return(e.disabled||n)&&(e.className+=" disabled"+(n?" loading":""),delete e.onclick),m("button",e,this.getButtonContent())}},{key:"getButtonContent",value:function(){var e=this.props.icon;return[e&&e!==!0?n(e,{className:"Button-icon"}):"",this.props.children?m("span",{className:"Button-label"},this.props.children):"",this.props.loading?o.component({size:"tiny",className:"LoadingIndicator--inline"}):""]}}]),t}(t),e("default",i)}}}),System.register("flarum/components/Checkbox",["flarum/Component","flarum/components/LoadingIndicator","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.loading=!1}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e="Checkbox "+(this.props.state?"on":"off")+" "+(this.props.className||"");return this.loading&&(e+=" loading"),this.props.disabled&&(e+=" disabled"),m("label",{className:e},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)}},{key:"getDisplay",value:function(){return this.loading?n.component({size:"tiny"}):r(this.props.state?"check":"times")}},{key:"onchange",value:function(e){this.props.onchange&&this.props.onchange(e,this)}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Dropdown",["flarum/Component","flarum/helpers/icon","flarum/helpers/listItems"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props.children?r(this.props.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.props.className+" itemCount"+e.length},this.getButton(),this.getMenu(e))}},{key:"config",value:function(e){var t=this;e||(this.$().on("shown.bs.dropdown",function(){var e=t.$(".Dropdown-menu").removeClass("Dropdown-menu--top");e.toggleClass("Dropdown-menu--top",e.offset().top+e.height()>$(window).scrollTop()+$(window).height()),t.props.onshow&&(t.props.onshow(),m.redraw())}),this.$().on("hidden.bs.dropdown",function(){t.props.onhide&&(t.props.onhide(),m.redraw())}))}},{key:"getButton",value:function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())}},{key:"getButtonContent",
|
|
value:function(){return[this.props.icon?n(this.props.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.props.label),this.props.caretIcon?n(this.props.caretIcon,{className:"Button-caret"}):""]}},{key:"getMenu",value:function(e){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},e)}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=e.className||"",e.buttonClassName=e.buttonClassName||"",e.menuClassName=e.menuClassName||"",e.label=e.label||"",e.caretIcon="undefined"!=typeof e.caretIcon?e.caretIcon:"caret-down"}}]),t}(t),e("default",o)}}}),System.register("flarum/components/FieldSet",["flarum/Component","flarum/helpers/listItems"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,n(this.props.children)))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/GroupBadge",["flarum/components/Badge"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label="undefined"==typeof e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.nameSingular(),delete e.group)}}]),t}(t),e("default",n)}}}),System.register("flarum/components/LinkButton",["flarum/components/Button"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers.get(Object.getPrototypeOf(t.prototype),"view",this).call(this);return e.tag="a",e}}],[{key:"initProps",value:function(e){e.active=this.isActive(e),e.config=e.config||m.route}},{key:"isActive",value:function(e){return"undefined"!=typeof e.active?e.active:m.route()===e.href}}]),t}(t),e("default",n)}}}),System.register("flarum/components/LoadingIndicator",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=babelHelpers._extends({},this.props);return e.className="LoadingIndicator "+(e.className||""),delete e.size,m("div",e,m.trust(" "))}},{key:"config",value:function(){var e=this.props.size||"small";$.fn.spin.presets[e].zIndex="auto",this.$().spin(e)}}]),t}(t),e("default",n)}}}),System.register("flarum/components/Modal",["flarum/Component","flarum/components/Alert","flarum/components/Button"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.alert=null}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return this.alert&&(this.alert.props.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},r.component({icon:"times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),alert?m("div",{className:"Modal-alert"},this.alert):"",this.content())))}},{key:"isDismissible",value:function(){return!0}},{key:"className",value:function(){}},{key:"title",value:function(){}},{key:"content",value:function(){}},{key:"onsubmit",value:function(){}},{key:"onready",value:function(){this.$("form :input:first").focus().select()}},{key:"hide",value:function(){app.modal.close()}},{key:"handleErrors",value:function(e){var t=e&&e.errors;t&&(this.alert=new n({type:"error",children:t.map(function(e,n){return[e.detail,n<t.length-1?m("br"):""]})})),m.redraw(),t?this.$("form [name="+t[0].source.pointer.replace("/data/attributes/","")+"]").select():this.$("form :input:first").select()}}]),t}(t),e("default",o)}}}),System.register("flarum/components/ModalManager",["flarum/Component","flarum/components/Modal"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t);for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,n),this.showing=!1,this.component=null}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"ModalManager modal fade"},this.component&&this.component.render())}},{key:"config",value:function(e,t){e||(t.retain=!0,this.$().on("hidden.bs.modal",this.clear.bind(this)).on("shown.bs.modal",this.onready.bind(this)))}},{key:"show",value:function(e){if(!(e instanceof n))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.component=e,m.redraw(!0),this.$().modal({backdrop:this.component.isDismissible()?!0:"static"}).modal("show"),this.onready()}},{key:"close",value:function(){var e=this;this.showing&&(this.hideTimeout=setTimeout(function(){e.$().modal("hide"),e.showing=!1}))}},{key:"clear",value:function(){this.component=null,m.lazyRedraw()}},{key:"onready",value:function(){this.component&&this.component.onready&&this.component.onready(this.$())}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Navigation",["flarum/Component","flarum/components/Button","flarum/components/LinkButton"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=app,t=e.history,n=e.pane;return m("div",{className:"Navigation ButtonGroup "+(this.props.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())}},{key:"config",value:function(e,t){t.retain=!0}},{key:"getBackButton",value:function(){var e=app,t=e.history;return r.component({className:"Button Button--icon Navigation-back",href:t.backUrl(),icon:"chevron-left",config:function(){},onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})}},{key:"getPaneButton",value:function(){var e=app,t=e.pane;return t&&t.active?n.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"thumb-tack"}):""}},{key:"getDrawerButton",value:function(){if(!this.props.drawer)return"";var e=app,t=e.drawer,r=app.session.user;return n.component({className:"Button Button--icon Navigation-drawer"+(r&&r.newNotificationsCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"reorder"})}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Placeholder",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/RequestErrorModal",["flarum/components/Modal"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"className",value:function(){return"RequestErrorModal Modal--large"}},{key:"title",value:function(){return this.props.error.message}},{key:"content",value:function(){var e=void 0;try{e=JSON.stringify(JSON.parse(this.props.error.responseText),null,2)}catch(t){e=this.props.error.responseText}return m("div",{className:"Modal-body"},m("pre",null,e))}}]),t}(t),e("default",n)}}}),System.register("flarum/components/Select",["flarum/Component","flarum/helpers/icon"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){var e=this.props,t=e.options,r=e.onchange,o=e.value;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:r?m.withAttr("value",r.bind(this)):void 0,value:o},Object.keys(t).map(function(e){return m("option",{value:e},t[e])})),n("sort",{className:"Select-caret"}))}}]),t}(t),e("default",r)}}}),System.register("flarum/components/SelectDropdown",["flarum/components/Dropdown","flarum/helpers/icon"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getButtonContent",value:function(){var e=this.props.children.filter(function(e){return e.props.active})[0],t=e&&e.props.children||this.props.defaultLabel;return t instanceof Array&&(t=t[0]),[m("span",{className:"Button-label"},t),n(this.props.caretIcon,{className:"Button-caret"})]}}],[{key:"initProps",value:function(e){e.caretIcon="undefined"!=typeof e.caretIcon?e.caretIcon:"sort",babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className+=" Dropdown--select"}}]),t}(t),e("default",r)}}}),System.register("flarum/components/Separator",["flarum/Component"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"view",value:function(){return m("li",{className:"Dropdown-separator"})}}]),t}(t),n.isListItem=!0,e("default",n)}}}),System.register("flarum/components/SplitDropdown",["flarum/components/Dropdown","flarum/components/Button","flarum/helpers/icon"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getButton",value:function(){var e=this.getFirstChild(),t=babelHelpers._extends({},e.props);return t.className=(t.className||"")+" SplitDropdown-button Button "+this.props.buttonClassName,[n.component(t),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},r(this.props.icon,{className:"Button-icon"}),r("caret-down",{className:"Button-caret"}))]}},{key:"getFirstChild",value:function(){for(var e=this.props.children;e instanceof Array;)e=e[0];return e}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"}}]),t}(t),e("default",o)}}}),System.register("flarum/components/Switch",["flarum/components/Checkbox"],function(e){"use strict";var t,n;return{setters:[function(e){t=e["default"]}],execute:function(){n=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"getDisplay",value:function(){return this.loading?babelHelpers.get(Object.getPrototypeOf(t.prototype),"getDisplay",this).call(this):""}}],[{key:"initProps",value:function(e){babelHelpers.get(Object.getPrototypeOf(t),"initProps",this).call(this,e),e.className=(e.className||"")+" Checkbox--switch"}}]),t}(t),e("default",n)}}}),System.register("flarum/helpers/avatar",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.className="Avatar "+(t.className||"");var n="",r="undefined"===t.title||t.title;if(r||delete t.title,e){var o=e.username()||"?",i=e.avatarUrl();if(r&&(t.title=t.title||o),i)return m("img",babelHelpers._extends({},t,{src:i}));n=o.charAt(0).toUpperCase(),t.style={background:e.color()}}return m("span",t,n)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/fullTime",[],function(e){"use strict";function t(e){var t=moment(e),n=t.format(),r=t.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/highlight",["flarum/utils/string"],function(e){"use strict";function t(e,t,r){if(!t&&!r)return e;var o=t instanceof RegExp?t:new RegExp(t,"gi"),i=e,s=0;return r&&(t&&(s=Math.max(0,e.search(o)-r/2)),i=n(i,r,s)),i=$("<div/>").text(i).html(),t&&(i=i.replace(o,"<mark>$&</mark>")),m.trust(i)}var n;return e("default",t),{setters:[function(e){n=e.truncate}],execute:function(){}}}),System.register("flarum/helpers/humanTime",["flarum/utils/humanTime"],function(e){"use strict";function t(e){var t=moment(e),r=t.format(),o=t.format("LLLL"),i=n(e);return m("time",{pubdate:!0,datetime:r,title:o,"data-humantime":!0},i)}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/helpers/icon",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.className="icon fa fa-fw fa-"+e+" "+(t.className||""),m("i",t)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/listItems",["flarum/components/Separator","flarum/utils/classList"],function(e){"use strict";function t(e){return e&&e.component===o}function n(e){var n=[],r=void 0;return e.forEach(function(o,i){(!t(o)||r&&!t(r)&&i!==e.length-1)&&(r=o,n.push(o))}),n}function r(e){return e instanceof Array||(e=[e]),n(e).map(function(e){var t=e.component&&e.component.isListItem,n=e.component&&e.component.isActive&&e.component.isActive(e.props),r=e.props?e.props.itemClassName:e.itemClassName;return[t?e:m("li",{className:i([e.itemName?"item-"+e.itemName:"",r,n?"active":""])},e)," "]})}var o,i;return e("default",r),{setters:[function(e){o=e["default"]},function(e){i=e["default"]}],execute:function(){}}}),System.register("flarum/helpers/punctuate",[],function(e){"use strict";function t(e){var t=[];return e.forEach(function(n,r){t.push(n),r<e.length-1&&t.push((e.length>2?", ":"")+(r===e.length-2?" and ":""))}),t}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/helpers/username",[],function(e){"use strict";function t(e){var t=e&&e.username()||app.trans("core.forum.user_deleted_text");return m("span",{className:"username"},t)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/initializers/humanTime",["flarum/utils/humanTime"],function(e){"use strict";function t(){$("[data-humantime]").each(function(){var e=$(this),t=r(e.attr("datetime"));e.html(t)})}function n(){setInterval(t,1e3)}var r;return e("default",n),{setters:[function(e){r=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/preload",["flarum/Session"],function(e){"use strict";function t(e){e.store.pushPayload({data:e.preload.data}),e.forum=e.store.getById("forums",1),e.session=new n(e.preload.session.token,e.store.getById("users",e.preload.session.userId))}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/initializers/store",["flarum/Store","flarum/models/Forum","flarum/models/User","flarum/models/Discussion","flarum/models/Post","flarum/models/Group","flarum/models/Activity","flarum/models/Notification"],function(e){"use strict";function t(e){e.store=new n({forums:r,users:o,discussions:i,posts:s,groups:a,activity:u,notifications:l})}var n,r,o,i,s,a,u,l;return e("default",t),{setters:[function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]},function(e){a=e["default"]},function(e){u=e["default"]},function(e){l=e["default"]}],execute:function(){}}}),System.register("flarum/models/Discussion",["flarum/Model","flarum/utils/mixin","flarum/utils/computed","flarum/utils/ItemList","flarum/utils/string","flarum/components/Badge"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e.slug},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"removePost",value:function(e){var t=this.data.relationships,n=t&&t.posts;n&&n.data.some(function(t,r){return e===t.id?(n.data.splice(r,1),!0):void 0})}},{key:"unreadCount",value:function(){var e=app.session.user;return e&&e.readTime()<this.lastTime()?Math.max(0,this.lastPostNumber()-(this.readNumber()||0)):0}},{key:"badges",value:function(){var e=new o;return this.isHidden()&&e.add("hidden",m(s,{type:"hidden",icon:"trash",label:"Hidden"})),e}},{key:"postIds",value:function(){return this.data.relationships.posts.data.map(function(e){return e.id})}}]),t}(n(t,{title:t.attribute("title"),slug:r("title",i),startTime:t.attribute("startTime",t.transformDate),startUser:t.hasOne("startUser"),startPost:t.hasOne("startPost"),lastTime:t.attribute("lastTime",t.transformDate),lastUser:t.hasOne("lastUser"),lastPost:t.hasOne("lastPost"),lastPostNumber:t.attribute("lastPostNumber"),commentsCount:t.attribute("commentsCount"),repliesCount:r("commentsCount",function(e){return Math.max(0,e-1)}),posts:t.hasMany("posts"),relevantPosts:t.hasMany("relevantPosts"),readTime:t.attribute("readTime",t.transformDate),readNumber:t.attribute("readNumber"),isUnread:r("unreadCount",function(e){return!!e}),isRead:r("unreadCount",function(e){return app.session.user&&!e}),hideTime:t.attribute("hideTime",t.transformDate),hideUser:t.hasOne("hideUser"),isHidden:r("hideTime","commentsCount",function(e,t){return!!e||0===t}),canReply:t.attribute("canReply"),canRename:t.attribute("canRename"),canHide:t.attribute("canHide"),canDelete:t.attribute("canDelete")})),e("default",a)}}}),System.register("flarum/models/Forum",["flarum/Model","flarum/utils/mixin"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"apiEndpoint",value:function(){return"/forum"}}]),t}(n(t,{canStartDiscussion:t.attribute("canStartDiscussion")})),e("default",r)}}}),System.register("flarum/models/Group",["flarum/Model","flarum/utils/mixin"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]}],execute:function(){r=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{nameSingular:t.attribute("nameSingular"),namePlural:t.attribute("namePlural"),color:t.attribute("color"),icon:t.attribute("icon")})),r.ADMINISTRATOR_ID="1",r.GUEST_ID="2",r.MEMBER_ID="3",e("default",r)}}}),System.register("flarum/models/Notification",["flarum/Model","flarum/utils/mixin","flarum/utils/computed"],function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]}],execute:function(){o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{contentType:t.attribute("contentType"),subjectId:t.attribute("subjectId"),content:t.attribute("content"),time:t.attribute("time",t.date),isRead:t.attribute("isRead"),unreadCount:t.attribute("unreadCount"),additionalUnreadCount:r("unreadCount",function(e){return Math.max(0,e-1)}),user:t.hasOne("user"),sender:t.hasOne("sender"),subject:t.hasOne("subject")})),e("default",o)}}}),System.register("flarum/models/Post",["flarum/Model","flarum/utils/mixin","flarum/utils/computed","flarum/utils/string"],function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e.getPlainContent}],execute:function(){i=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(n(t,{number:t.attribute("number"),discussion:t.hasOne("discussion"),time:t.attribute("time",t.transformDate),user:t.hasOne("user"),contentType:t.attribute("contentType"),content:t.attribute("content"),contentHtml:t.attribute("contentHtml"),contentPlain:r("contentHtml",o),editTime:t.attribute("editTime",t.transformDate),editUser:t.hasOne("editUser"),isEdited:r("editTime",function(e){return!!e}),hideTime:t.attribute("hideTime",t.transformDate),hideUser:t.hasOne("hideUser"),isHidden:r("hideTime",function(e){return!!e}),canEdit:t.attribute("canEdit"),canDelete:t.attribute("canDelete")})),e("default",i)}}}),System.register("flarum/models/User",["flarum/Model","flarum/utils/mixin","flarum/utils/stringToColor","flarum/utils/ItemList","flarum/utils/computed","flarum/components/GroupBadge"],function(e){"use strict";var t,n,r,o,i,s,a;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){r=e["default"]},function(e){o=e["default"]},function(e){i=e["default"]},function(e){s=e["default"]}],execute:function(){a=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"isOnline",value:function(){return this.lastSeenTime()>moment().subtract(5,"minutes").toDate()}},{key:"badges",value:function(){var e=new o,t=this.groups();return t&&t.forEach(function(t){e.add("group"+t.id(),s.component({group:t}))}),e}},{key:"calculateAvatarColor",value:function(){var e=new Image,t=this;e.onload=function(){var e=new ColorThief;t.avatarColor=e.getColor(this),t.freshness=new Date,m.redraw()},e.src=this.avatarUrl()}},{key:"savePreferences",value:function(e){var t=this.preferences();return babelHelpers._extends(t,e),this.save({preferences:t})}}]),t}(n(t,{username:t.attribute("username"),email:t.attribute("email"),isActivated:t.attribute("isActivated"),password:t.attribute("password"),avatarUrl:t.attribute("avatarUrl"),bio:t.attribute("bio"),bioHtml:i("bio",function(e){return e?"<p>"+$("<div/>").text(e).html().replace(/\n/g,"<br>").autoLink()+"</p>":""}),preferences:t.attribute("preferences"),groups:t.hasMany("groups"),joinTime:t.attribute("joinTime",t.transformDate),lastSeenTime:t.attribute("lastSeenTime",t.transformDate),readTime:t.attribute("readTime",t.transformDate),unreadNotificationsCount:t.attribute("unreadNotificationsCount"),newNotificationsCount:t.attribute("newNotificationsCount"),discussionsCount:t.attribute("discussionsCount"),commentsCount:t.attribute("commentsCount"),canEdit:t.attribute("canEdit"),canDelete:t.attribute("canDelete"),avatarColor:null,color:i("username","avatarUrl","avatarColor",function(e,t,n){return n?"rgb("+n.join(", ")+")":t?(this.calculateAvatarColor(),""):"#"+r(e)})})),e("default",a)}}}),System.register("flarum/utils/Drawer",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){var t=this;babelHelpers.classCallCheck(this,e),$("#content").click(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})}return babelHelpers.createClass(e,[{key:"isOpen",value:function(){return $("#app").hasClass("drawerOpen")}},{key:"hide",value:function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()}},{key:"show",value:function(){var e=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").click(function(){return e.hide()}),setTimeout(function(){return e.$backdrop.addClass("in")})}}]),e}(),e("default",t)}}}),System.register("flarum/utils/ItemList",[],function(e){"use strict";var t,n;return{setters:[],execute:function(){t=function r(e,t){babelHelpers.classCallCheck(this,r),this.content=e,this.priority=t},n=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,[{key:"add",value:function(e,n){var r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];this[e]=new t(n,r)}},{key:"merge",value:function(e){for(var n in e)e.hasOwnProperty(n)&&e[n]instanceof t&&(this[n]=e[n])}},{key:"toArray",value:function(){var e=[];for(var n in this)this.hasOwnProperty(n)&&this[n]instanceof t&&(this[n].content=Object(this[n].content),this[n].content.itemName=n,e.push(this[n]),this[n].key=e.length);return e.sort(function(e,t){return e.priority===t.priority?e.key-t.key:e.priority>t.priority?-1:1}).map(function(e){return e.content})}}]),e}(),e("default",n)}}}),System.register("flarum/utils/RequestError",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function n(e,t){babelHelpers.classCallCheck(this,n),this.message=e,this.responseText=t},e("default",t)}}}),System.register("flarum/utils/ScrollListener",[],function(e){"use strict";var t,n;return{setters:[],execute:function(){t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},n=function(){function e(t){babelHelpers.classCallCheck(this,e),this.callback=t,this.lastTop=-1}return babelHelpers.createClass(e,[{key:"loop",value:function(){this.active&&(this.update(),t(this.loop.bind(this)))}},{key:"update",value:function(e){var t=window.pageYOffset;(this.lastTop!==t||e)&&(this.callback(t),this.lastTop=t)}},{key:"start",value:function(){this.active||(this.active=!0,this.loop())}},{key:"stop",value:function(){this.active=!1}}]),e}(),e("default",n)}}}),System.register("flarum/utils/SubtreeRetainer",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){babelHelpers.classCallCheck(this,e);for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];this.callbacks=n,this.data={}}return babelHelpers.createClass(e,[{key:"retain",value:function(){var e=this,t=!1;return this.callbacks.forEach(function(n,r){var o=n();o!==e.data[r]&&(e.data[r]=o,t=!0)}),t?!1:{subtree:"retain"}}},{key:"check",value:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];this.callbacks=this.callbacks.concat(t)}},{key:"invalidate",value:function(){this.data={}}}]),e}(),e("default",t)}}}),System.register("flarum/utils/abbreviateNumber",[],function(e){"use strict";function t(e){return e>=1e6?Math.floor(e/1e6)+"M":e>=1e3?Math.floor(e/1e3)+"K":e.toString()}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/anchorScroll",[],function(e){"use strict";function t(e,t){var n=$(window),r=$(e).offset().top-n.scrollTop();t(),n.scrollTop($(e).offset().top-r)}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/classList",[],function(e){"use strict";function t(e){var t=void 0;if(e instanceof Array)t=e.filter(function(e){return e});else{t=[];for(var n in e)e[n]&&t.push(n)}return t.join(" ")}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/computed",[],function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.slice(0,-1),o=t.slice(-1)[0],i={},s=void 0;return function(){var e=this,t=!1;return r.forEach(function(n){var r="function"==typeof e[n]?e[n]():e[n];i[n]!==r&&(t=!0,i[n]=r)}),t&&(s=o.apply(this,r.map(function(e){return i[e]}))),s}}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/evented",[],function(e){"use strict";return{setters:[],execute:function(){e("default",{handlers:null,getHandlers:function(e){return this.handlers=this.handlers||{},this.handlers[e]=this.handlers[e]||[],this.handlers[e]},trigger:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];this.getHandlers(e).forEach(function(e){return e.apply(t,r)})},on:function(e,t){this.getHandlers(e).push(t)},one:function(e,t){var n=function r(){t.apply(this,arguments),this.off(e,r)};this.getHandlers(e).push(n)},off:function(e,t){var n=this.getHandlers(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}})}}}),System.register("flarum/utils/extract",[],function(e){"use strict";function t(e,t){var n=e[t];return delete e[t],n}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/extractText",[],function(e){"use strict";function t(e){var n="";return n+=e instanceof Array?e.map(function(e){return t(e)}).join(""):"object"==typeof e?t(e.children):e}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/formatNumber",[],function(e){"use strict";function t(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/humanTime",[],function(e){"use strict";function t(e){var t=moment(e),n=864e5,r=t.diff(moment()),o=null;return o=-30*n>r?t.year()===moment().year()?t.format("D MMM"):t.format("MMM 'YY"):t.fromNow()}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/mapRoutes",[],function(e){"use strict";function t(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1],n={};
|
|
for(var r in e){var o=e[r];o.component&&(o.component.props.routeName=r),n[t+o.path]=o.component}return n}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/mixin",[],function(e){"use strict";function t(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var o=function(e){function t(){babelHelpers.classCallCheck(this,t),babelHelpers.get(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return babelHelpers.inherits(t,e),t}(e);return n.forEach(function(e){babelHelpers._extends(o.prototype,e)}),o}return e("default",t),{setters:[],execute:function(){}}}),System.register("flarum/utils/patchMithril",["../Component"],function(e){"use strict";function t(e){var t=e.m,r=function o(e){for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;r>s;s++)i[s-1]=arguments[s];if(e.prototype&&e.prototype instanceof n)return e.component.apply(e,i);var a=t.apply(this,arguments);return a.attrs.bidi&&o.bidi(a,a.attrs.bidi),a.attrs.route&&(a.attrs.href=a.attrs.route,a.attrs.config=o.route,delete a.attrs.route),a};Object.keys(t).forEach(function(e){return r[e]=t[e]}),r.lazyRedraw=function(){r.startComputation(),r.endComputation()},e.m=r}var n;return e("default",t),{setters:[function(e){n=e["default"]}],execute:function(){}}}),System.register("flarum/utils/string",[],function(e){"use strict";function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return(n>0?"...":"")+e.substring(n,n+t)+(e.length>n+t?"...":"")}function n(e){return e.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")||"-"}function r(e){var t=$("<div/>").html(e.replace(/(<\/p>|<br>)/g,"$1 "));return t.find(r.removeSelectors.join(",")).remove(),t.text()}function o(e){return e.substr(0,1).toUpperCase()+e.substr(1)}return e("truncate",t),e("slug",n),e("getPlainContent",r),e("ucfirst",o),{setters:[],execute:function(){r.removeSelectors=["blockquote","script"]}}}),System.register("flarum/utils/stringToColor",[],function(e){"use strict";function t(e,t,n){var r=void 0,o=void 0,i=void 0,s=Math.floor(6*e),a=6*e-s,u=n*(1-t),l=n*(1-a*t),c=n*(1-(1-a)*t);switch(s%6){case 0:r=n,o=c,i=u;break;case 1:r=l,o=n,i=u;break;case 2:r=u,o=n,i=c;break;case 3:r=u,o=l,i=n;break;case 4:r=c,o=u,i=n;break;case 5:r=n,o=u,i=l}return{r:Math.floor(255*r),g:Math.floor(255*o),b:Math.floor(255*i)}}function n(e){for(var n=0,r=0;r<e.length;r++)n+=e.charCodeAt(r);var o=n%360,i=t(o/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}return e("default",n),{setters:[],execute:function(){}}}); |