You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@htrace.apache.org by cm...@apache.org on 2015/04/23 01:07:55 UTC
[01/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Repository: incubator-htrace
Updated Branches:
refs/heads/master af0bf3f4f -> 39e89ea02
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.min.js b/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.min.js
new file mode 100644
index 0000000..541911f
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.min.js
@@ -0,0 +1,2 @@
+// rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.rome=t()}}(function(){return function t(e,n,r){function o(i,s){if(!n[i]){if(!e[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var c=n[i]={exports:{}};e[i][0].call(c.exports,function(t){var n=e[i][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListe
ner("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(t,e){e.exports=t("./src/contra.emitter.js")},{"./src/contra.emitter.js":3}],3:[function(t,e){(function(t){!function(n,r){"use strict";function o(t,e){return Array.prototype.slice.call(t,e)}function a(t,e,n){t&&s(function(){t.apply(n||null,e||[])})}function i(t,e){var n=e||{},i={};return t===r&&(t={}),t.on=function(e,n){return i[e]?i[e].push(n):i[e]=[n],t},t.once=function(e,n){return n._once=!0,t.on(e,n),t},t.o
ff=function(e,n){var r=arguments.length;if(1===r)delete i[e];else if(0===r)i={};else{var o=i[e];if(!o)return t;o.splice(o.indexOf(n),1)}return t},t.emit=function(){var e=o(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var r=(i[e]||[]).slice(0);return function(){var s=o(arguments),u=this||t;if("error"===e&&n.throws!==!1&&!r.length)throw 1===s.length?s[0]:s;return i[e]=r.filter(function(t){return n.async?a(t,s,u):t.apply(u,s),!t._once}),t}},t}var s,u=""+r,c="function"==typeof setImmediate;s=c?function(t){setImmediate(t)}:typeof t!==u&&t.nextTick?t.nextTick:function(t){setTimeout(t,0)},typeof e!==u&&e.exports?e.exports=i:(n.contra=n.contra||{},n.contra.emitter=i)}(this)}).call(this,t("FWaASH"))},{FWaASH:1}],4:[function(t,e){for(var n=t("performance-now"),r="undefined"==typeof window?{}:window,o=["moz","webkit"],a="AnimationFrame",i=r["request"+a],s=r["cancel"+a]||r["cancelRequest"+a],u=!0,c=0;c<o.length&&!i;c++)i=r[o[c]+"Request"+a],s=r[o[c
]+"Cancel"+a]||r[o[c]+"CancelRequest"+a];if(!i||!s){u=!1;var l=0,d=0,f=[],m=1e3/60;i=function(t){if(0===f.length){var e=n(),r=Math.max(0,m-(e-l));l=r+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(n){setTimeout(function(){throw n},0)}},Math.round(r))}return f.push({handle:++d,callback:t,cancelled:!1}),d},s=function(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0)}}e.exports=function(t){return u?i.call(r,function(){try{t.apply(this,arguments)}catch(e){setTimeout(function(){throw e},0)}}):i.call(r,t)},e.exports.cancel=function(){s.apply(r,arguments)}},{"performance-now":5}],5:[function(t,e){(function(t){(function(){var n,r,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-o)/1e6},r=t.hrtime,n=function(){var t;return t=r(),1e9*t[0]+t[1]},o=n()):Date.n
ow?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("FWaASH"))},{FWaASH:1}],6:[function(t,e){"use strict";function n(t,e){var n=u[t.id];return n&&n[e.id]}function r(t,e){var n=u[t.id];n||(n=u[t.id]={});var r=a(e);n[e.id]=r,t.on("data",r),t.on("destroyed",o.bind(null,t,e))}function o(t,e){var n=u[t.id];if(n){var r=n[e.id];t.off("data",r),delete n[e.id]}}function a(t){return function(){t.refresh()}}function i(t,e){s(e.associated)||n(t,e)||r(t,e)}var s=t("./isInput"),u={};e.exports={add:i,remove:o}},{"./isInput":17}],7:[function(t,e){"use strict";function n(t){function e(){return Te}function n(n){return de=l(n||t,Te),ye||(ye=i({className:de.styles.container})),pe=de.weekdayFormat,he=pe.length,we=r,ve=r,be=r,ge=r,de.appendTo.appendChild(ye),J(ye),De=!1,fe=de.initialValue?de.initialValue:d.moment(),me=fe.clone(),Te.container=ye,Te.destroyed=!1,Te.destroy=h.bind(Te,!1),Te.emitVal
ues=z,Te.getDate=ue,Te.getDateString=ce,Te.getMoment=le,Te.hide=O,Te.options=w,Te.options.reset=b,Te.refresh=$,Te.restore=e,Te.setValue=G,Te.show=N,N(),v(),p(),Te}function p(){Te.emit("ready",c(de))}function h(t){ye&&ye.parentNode.removeChild(ye),de&&v(!0);var r=Te.emitterSnapshot("destroyed");return Te.destroyed=!0,Te.destroy=e,Te.emitValues=e,Te.getDate=y,Te.getDateString=y,Te.getMoment=y,Te.hide=e,Te.options=e,Te.options.reset=e,Te.refresh=e,Te.restore=n,Te.setValue=e,Te.show=e,Te.off(),t!==!0&&r(),Te}function v(t){var e=t?"remove":"add";de.autoHideOnBlur&&m[e](document.documentElement,"focus",H,!0),de.autoHideOnClick&&m[e](document,"click",S)}function w(t){return 0===arguments.length?c(de):(h(),n(t),Te)}function b(){return w({appendTo:de.appendTo})}function g(){De||(De=!0,x(),k(),Te.emit("render"))}function x(){function t(t){var e=i({className:de.styles.month,parent:xe});0===t&&(ke=i({type:"button",className:de.styles.back,attributes:{type:"button"},parent:e})),t===de.monthsInCa
lendar-1&&(Ee=i({type:"button",className:de.styles.next,attributes:{type:"button"},parent:e}));var n,r=i({className:de.styles.monthLabel,parent:e}),o=i({type:"table",className:de.styles.dayTable,parent:e}),a=i({type:"thead",className:de.styles.dayHead,parent:o}),s=i({type:"tr",className:de.styles.dayRow,parent:a}),u=i({type:"tbody",className:de.styles.dayBody,parent:o});for(n=0;he>n;n++)i({type:"th",className:de.styles.dayHeadElem,parent:s,text:pe[E(n)]});u.setAttribute(Me,t),Ce.push({label:r,body:u})}if(de.date){var e;for(Ce=[],xe=i({className:de.styles.date,parent:ye}),e=0;e<de.monthsInCalendar;e++)t(e);m.add(ke,"click",V),m.add(Ee,"click",B),m.add(xe,"click",re)}}function k(){if(de.time&&de.timeInterval){var t=i({className:de.styles.time,parent:ye});Fe=i({className:de.styles.selectedTime,parent:t,text:fe.format(de.timeFormat)}),m.add(Fe,"click",A),Ae=i({className:de.styles.timeList,parent:t}),m.add(Ae,"click",se);for(var e=d.moment("00:00:00","HH:mm:ss"),n=e.clone().add(1,"days")
;e.isBefore(n);)i({className:de.styles.timeOption,parent:Ae,text:e.format(de.timeFormat)}),e.add(de.timeInterval,"seconds")}}function E(t,e){var n=e?-1:1,r=t+de.weekStart*n;return(r>=he||0>r)&&(r+=he*-n),r}function F(){if(de.time&&De){var t,e,n,r,o=Ae.children,a=o.length;for(r=0;a>r;r++)n=o[r],e=d.moment(s(n),de.timeFormat),t=ie(fe.clone(),e),n.style.display=U(t,!1,de.timeValidator)?"block":"none"}}function A(t){var e="boolean"==typeof t?t:"none"===Ae.style.display;e?T():D()}function T(){Ae&&(Ae.style.display="block")}function D(){Ae&&(Ae.style.display="none")}function M(){ye.style.display="inline-block",Te.emit("show")}function C(){ye.style.display="none",Te.emit("hide")}function N(){return g(),$(),A(!de.date),M(),Te}function O(){return D(),a(C),Te}function I(){D();var t=f.contains(ye,de.styles.positioned);return t&&a(C),Te}function j(t){var e=t.target;if(e===Te.associated)return!0;for(;e;){if(e===ye)return!0;e=e.parentNode}}function H(t){j(t)||I()}function S(t){j(t)||I()}function
V(){L("subtract")}function B(){L("add")}function L(t){var e,n="add"===t?-1:1,r=de.monthsInCalendar+n*ae(ge);me[t](r,"months"),e=te(me.clone()),fe=e||fe,e&&(me=e.clone()),q()}function q(t){P(),W(),t!==!0&&z(),F()}function P(){function t(t,e){var n=me.clone().add(e,"months");s(t.label,n.format(de.monthFormat)),J(t.body)}if(de.date&&De){var e=me.year(),n=me.month(),r=me.date();if(r!==be||n!==we||e!==ve){var o=R();if(be=me.date(),we=me.month(),ve=me.year(),o)return Y(),void 0;Ce.forEach(t),K()}}}function Y(){function t(t){var e,n=[];for(e=0;e<t.length;e++)n.push(t[e]);return n}function e(e){return t(e.children)}function n(t){return!f.contains(t,de.styles.dayPrevMonth)&&!f.contains(t,de.styles.dayNextMonth)}var r=me.date()-1;oe(!1),Ce.forEach(function(o){var a;_(o.date,me)&&(a=t(o.body.children).map(e),a=Array.prototype.concat.apply([],a).filter(n),oe(a[r]))})}function R(){function t(t){return ve?_(t.date,me):!1}return Ce.some(t)}function _(t,e){return t&&e&&t.year()===e.year()&&t.month(
)===e.month()}function W(){de.time&&De&&s(Fe,fe.format(de.timeFormat))}function z(){return Te.emit("data",ce()),Te.emit("year",fe.year()),Te.emit("month",fe.month()),Te.emit("day",fe.day()),Te.emit("time",fe.format(de.timeFormat)),Te}function $(){return ve=!1,we=!1,be=!1,q(!0),Te}function G(t){var e=u(t,de.inputFormat);if(null!==e)return fe=te(e)||fe,me=fe.clone(),q(!0),Te}function J(t,e){for(;t&&t.firstChild;)t.removeChild(t.firstChild);e===!0&&t.parentNode.removeChild(t)}function K(){var t;for(t=0;t<de.monthsInCalendar;t++)Q(t)}function Q(t){function e(t){var e,r,o;for(e=0;e<t.length;e++)f.children.length===he&&(f=i({type:"tr",className:de.styles.dayRow,parent:a.body})),r=t.base.clone().add(e,"days"),o=i({type:"td",parent:f,text:r.format(de.dayFormat),className:n(r,t.cell.join(" ").split(" ")).join(" ")}),t.selectable&&r.date()===c&&oe(o)}function n(t,e){return U(t,!0,de.dateValidator)||e.push(p),e}function r(t,e){return t&&e.push(de.styles.dayConcealed),e}var o,a=Ce[t],s=me.clone
().add(t,"months"),u=s.daysInMonth(),c=s.month()!==fe.month()?-1:fe.date(),l=s.clone().date(1),d=E(l.day(),!0),f=i({type:"tr",className:de.styles.dayRow,parent:a.body}),m=r(0!==t,[de.styles.dayBodyElem,de.styles.dayPrevMonth]),y=r(t!==de.monthsInCalendar-1,[de.styles.dayBodyElem,de.styles.dayNextMonth]),p=de.styles.dayDisabled;e({base:l.clone().subtract(d,"days"),length:d,cell:m}),e({base:l.clone(),length:u,cell:[de.styles.dayBodyElem],selectable:!0}),o=l.clone().add(u,"days"),e({base:o,length:he-f.children.length,cell:y}),ke.disabled=!X(l,!0),Ee.disabled=!Z(o,!0),a.date=s.clone()}function U(t,e,n){if(!X(t,e))return!1;if(!Z(t,e))return!1;var r=(n||Function.prototype).call(Te,t.toDate());return r!==!1}function X(t,e){var n=de.min?e?de.min.clone().startOf("day"):de.min:!1;return!n||!t.isBefore(n)}function Z(t,e){var n=de.max?e?de.max.clone().endOf("day"):de.max:!1;return!n||!t.isAfter(n)}function te(t){if(de.min&&t.isBefore(de.min))return te(de.min.clone());if(de.max&&t.isAfter(de.max
))return te(de.max.clone());var e=t.clone().subtract(1,"days");return ne(e,t,"add")?ee(e):(e=t.clone(),ne(e,t,"subtract")?ee(e):void 0)}function ee(t){var e,n=t.clone().subtract(de.timeInterval,"seconds"),r=Math.ceil(Ne/de.timeInterval);for(e=0;r>e;e++)if(n.add(de.timeInterval,"seconds"),n.date()>t.date()&&n.subtract(1,"days"),de.timeValidator.call(Te,n.toDate())!==!1)return n}function ne(t,e,n){for(var r=!1;r===!1&&(t[n](1,"days"),t.month()===e.month());)r=de.dateValidator.call(Te,t.toDate());return r!==!1}function re(t){var e=t.target;if(!f.contains(e,de.styles.dayDisabled)&&f.contains(e,de.styles.dayBodyElem)){var n=parseInt(s(e),10),r=f.contains(e,de.styles.dayPrevMonth),o=f.contains(e,de.styles.dayNextMonth),a=ae(e)-ae(ge);fe.add(a,"months"),(r||o)&&fe.add(r?-1:1,"months"),oe(e),fe.date(n),ie(fe,te(fe)||fe),me=fe.clone(),de.autoClose===!0&&I(),q()}}function oe(t){ge&&f.remove(ge,de.styles.selectedDay),t&&f.add(t,de.styles.selectedDay),ge=t}function ae(t){for(var e;t&&t.getAttri
bute;){if(e=t.getAttribute(Me),"string"==typeof e)return parseInt(e,10);t=t.parentNode}return 0}function ie(t,e){return t.hour(e.hour()).minute(e.minute()).second(e.second()),t}function se(t){var e=t.target;if(f.contains(e,de.styles.timeOption)){var n=d.moment(s(e),de.timeFormat);ie(fe,n),me=fe.clone(),z(),W(),!de.date&&de.autoClose===!0||"time"===de.autoClose?I():D()}}function ue(){return fe.toDate()}function ce(t){return fe.format(t||de.inputFormat)}function le(){return fe.clone()}var de,fe,me,ye,pe,he,ve,we,be,ge,xe,ke,Ee,Fe,Ae,Te=o({}),De=!1,Me="data-rome-offset",Ce=[],Ne=86400;return n(),a(p),Te}var r,o=t("contra.emitter"),a=t("raf"),i=t("./dom"),s=t("./text"),u=t("./parse"),c=t("./clone"),l=t("./defaults"),d=t("./momentum"),f=t("./classes"),m=t("./events"),y=t("./noop");e.exports=n},{"./classes":8,"./clone":9,"./defaults":11,"./dom":12,"./events":13,"./momentum":18,"./noop":19,"./parse":20,"./text":32,"contra.emitter":2,raf:4}],8:[function(t,e){"use strict";function n(t){retur
n t.className.replace(s,"").split(u)}function r(t,e){t.className=e.join(" ")}function o(t,e){var n=a(t,e);n.push(e),r(t,n)}function a(t,e){var o=n(t),a=o.indexOf(e);return-1!==a&&(o.splice(a,1),r(t,o)),o}function i(t,e){return-1!==n(t).indexOf(e)}var s=/^\s+|\s+$/g,u=/\s+/;e.exports={add:o,remove:a,contains:i}},{}],9:[function(t,e){"use strict";function n(t){var e,o={};for(var a in t)e=t[a],o[a]=e?r.isMoment(e)?e.clone():e._isStylesConfiguration?n(e):e:e;return o}var r=t("./momentum");e.exports=n},{"./momentum":18}],10:[function(t,e){"use strict";function n(t,e){var n,s=r.find(t);return s?s:(n=i(t)?o(t,e):a(t,e),n.associated=t,r.assign(t,n),n)}var r=t("./index"),o=t("./input"),a=t("./inline"),i=t("./isInput");e.exports=n},{"./index":14,"./inline":15,"./input":16,"./isInput":17}],11:[function(t,e){"use strict";function n(t,e){var n,i,s=t||{};if(s.autoHideOnClick===i&&(s.autoHideOnClick=!0),s.autoHideOnBlur===i&&(s.autoHideOnBlur=!0),s.autoClose===i&&(s.autoClose=!0),s.appendTo===i&&(
s.appendTo=document.body),"parent"===s.appendTo){if(!o(e.associated))throw new Error("Inline calendars must be appended to a parent node explicitly.");s.appendTo=e.associated.parentNode}if(s.invalidate===i&&(s.invalidate=!0),s.required===i&&(s.required=!1),s.date===i&&(s.date=!0),s.time===i&&(s.time=!0),s.date===!1&&s.time===!1)throw new Error("At least one of `date` or `time` must be `true`.");if(s.inputFormat===i&&(s.inputFormat=s.date&&s.time?"YYYY-MM-DD HH:mm":s.date?"YYYY-MM-DD":"HH:mm"),s.initialValue=s.initialValue===i?null:r(s.initialValue,s.inputFormat),s.min=s.min===i?null:r(s.min,s.inputFormat),s.max=s.max===i?null:r(s.max,s.inputFormat),s.timeInterval===i&&(s.timeInterval=1800),s.min&&s.max)if(s.max.isBefore(s.min)&&(n=s.max,s.max=s.min,s.min=n),s.date===!0){if(s.max.clone().subtract(1,"days").isBefore(s.min))throw new Error("`max` must be at least one day after `min`")}else if(1e3*s.timeInterval-s.min%(1e3*s.timeInterval)>s.max-s.min)throw new Error("`min` to `max` rang
e must allow for at least one time option that matches `timeInterval`");if(s.dateValidator===i&&(s.dateValidator=Function.prototype),s.timeValidator===i&&(s.timeValidator=Function.prototype),s.timeFormat===i&&(s.timeFormat="HH:mm"),s.weekStart===i&&(s.weekStart=a.moment().weekday(0).day()),s.weekdayFormat===i&&(s.weekdayFormat="min"),"long"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdays();else if("short"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdaysShort();else if("min"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdaysMin();else if(!Array.isArray(s.weekdayFormat)||s.weekdayFormat.length<7)throw new Error("`weekdays` must be `min`, `short`, or `long`");s.monthsInCalendar===i&&(s.monthsInCalendar=1),s.monthFormat===i&&(s.monthFormat="MMMM YYYY"),s.dayFormat===i&&(s.dayFormat="DD"),s.styles===i&&(s.styles={}),s.styles._isStylesConfiguration=!0;var u=s.styles;return u.back===i&&(u.back="rd-back"),u.container===i&&(u.container="rd-container"),u.positioned===i&&(u.positioned=
"rd-container-attachment"),u.date===i&&(u.date="rd-date"),u.dayBody===i&&(u.dayBody="rd-days-body"),u.dayBodyElem===i&&(u.dayBodyElem="rd-day-body"),u.dayPrevMonth===i&&(u.dayPrevMonth="rd-day-prev-month"),u.dayNextMonth===i&&(u.dayNextMonth="rd-day-next-month"),u.dayDisabled===i&&(u.dayDisabled="rd-day-disabled"),u.dayConcealed===i&&(u.dayConcealed="rd-day-concealed"),u.dayHead===i&&(u.dayHead="rd-days-head"),u.dayHeadElem===i&&(u.dayHeadElem="rd-day-head"),u.dayRow===i&&(u.dayRow="rd-days-row"),u.dayTable===i&&(u.dayTable="rd-days"),u.month===i&&(u.month="rd-month"),u.monthLabel===i&&(u.monthLabel="rd-month-label"),u.next===i&&(u.next="rd-next"),u.selectedDay===i&&(u.selectedDay="rd-day-selected"),u.selectedTime===i&&(u.selectedTime="rd-time-selected"),u.time===i&&(u.time="rd-time"),u.timeList===i&&(u.timeList="rd-time-list"),u.timeOption===i&&(u.timeOption="rd-time-option"),s}var r=t("./parse"),o=t("./isInput"),a=t("./momentum");e.exports=n},{"./isInput":17,"./momentum":18,"./par
se":20}],12:[function(t,e){"use strict";function n(t){var e=t||{};e.type||(e.type="div");var n=document.createElement(e.type);return e.className&&(n.className=e.className),e.text&&(n.innerText=n.textContent=e.text),e.attributes&&Object.keys(e.attributes).forEach(function(t){n.setAttribute(t,e.attributes[t])}),e.parent&&e.parent.appendChild(n),n}e.exports=n},{}],13:[function(t,e){"use strict";function n(t,e,n,r){return t.addEventListener(e,n,r)}function r(t,e,n,r){return t.attachEvent("on"+e,function(e){var r=e||window.event;r.target=r.target||r.srcElement,r.preventDefault=r.preventDefault||function(){r.returnValue=!1},r.stopPropagation=r.stopPropagation||function(){r.cancelBubble=!0},n.call(t,r)},r)}function o(t,e,n){return t.removeEventListener(e,n)}function a(t,e,n){return t.detachEvent("on"+e,n)}var i=n,s=o;window.addEventListener||(i=r),window.removeEventListener||(s=a),e.exports={add:i,remove:s}},{}],14:[function(t,e){"use strict";function n(t){if("number"!=typeof t&&t&&t.getAt
tribute)return n(t.getAttribute(a));var e=i[t];return e!==o?e:null}function r(t,e){t.setAttribute(a,e.id=i.push(e)-1)}var o,a="data-rome-id",i=[];e.exports={find:n,assign:r}},{}],15:[function(t,e){"use strict";function n(t,e){var n=e||{};return n.appendTo=t,r(n)}var r=(t("raf"),t("./calendar"));e.exports=n},{"./calendar":7,raf:4}],16:[function(t,e){"use strict";function n(t,e){function n(n){x=a(n||e,F),u.add(F.container,x.styles.positioned),c.add(F.container,"mousedown",m),c.add(F.container,"click",f),F.getDate=g(F.getDate),F.getDateString=g(F.getDateString),F.getMoment=g(F.getMoment),x.initialValue&&(t.value=x.initialValue.format(x.inputFormat)),F.on("data",w),F.on("show",T),d(),A(),F.hide()}function l(){d(!0)}function d(e){var r=e?"remove":"add";c[r](t,"click",p),c[r](t,"touchend",p),c[r](t,"focusin",p),c[r](t,"change",A),c[r](t,"keypress",A),c[r](t,"keydown",A),c[r](t,"input",A),x.invalidate&&c[r](t,"blur",y),c[r](window,"resize",T),e?(F.once("ready",n),F.off("destroyed",l)):(F.o
ff("ready",n),F.once("destroyed",l))}function f(){E=!0,t.focus(),E=!1}function m(){function t(){k=!1}k=!0,o(t)}function y(){k||b()||F.emitValues()}function p(){E||F.show()}function h(){var e=t.getBoundingClientRect(),n=document.body.scrollTop||document.documentElement.scrollTop;F.container.style.top=e.top+n+t.offsetHeight+"px",F.container.style.left=e.left+"px"}function v(){var e=t.value.trim();if(!b()){var n=s.moment(e,x.inputFormat,x.strictParse);F.setValue(n)}}function w(e){t.value=e}function b(){return x.required===!1&&""===t.value.trim()}function g(t){return function(){return b()?null:t.apply(this,arguments)}}var x,k,E,F=i(e),A=r(v,30),T=r(h,30);return n(e),F}var r=t("./throttle"),o=t("raf"),a=(t("./clone"),t("./defaults")),i=t("./calendar"),s=t("./momentum"),u=t("./classes"),c=t("./events");e.exports=n},{"./calendar":7,"./classes":8,"./clone":9,"./defaults":11,"./events":13,"./momentum":18,"./throttle":33,raf:4}],17:[function(t,e){"use strict";function n(t){return t&&t.nodeNam
e&&"input"===t.nodeName.toLowerCase()}e.exports=n},{}],18:[function(t,e){"use strict";function n(t){return t&&Object.prototype.hasOwnProperty.call(t,"_isAMomentObject")}var r={moment:null,isMoment:n};e.exports=r},{}],19:[function(t,e){"use strict";function n(){}e.exports=n},{}],20:[function(t,e){"use strict";function n(t,e){return"string"==typeof t?o.moment(t,e):"[object Date]"===Object.prototype.toString.call(t)?o.moment(t):o.isMoment(t)?t.clone():void 0}function r(t,e){var r=n(t,"string"==typeof e?e:null);return r&&r.isValid()?r:null}var o=t("./momentum");e.exports=r},{"./momentum":18}],21:[function(){"use strict";Array.prototype.filter||(Array.prototype.filter=function(t,e){var n=[];return this.forEach(function(r,o,a){t.call(e,r,o,a)&&n.push(r)},e),n})},{}],22:[function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=this,r=n.length,o=0;r>o;o++)o in n&&t.call(e,n[o],o,
n)})},{}],23:[function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError;var n=this.length;for(e=+e||0,1/0===Math.abs(e)?e=0:0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1})},{}],24:[function(){"use strict";Array.isArray||(Array.isArray=function(t){return""+t!==t&&"[object Array]"===Object.prototype.toString.call(t)})},{}],25:[function(){"use strict";Array.prototype.map||(Array.prototype.map=function(t,e){var n,r,o;if(null==this)throw new TypeError("this is null or not defined");var a=Object(this),i=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=new Array(i),o=0;i>o;)o in a&&(r[o]=t.call(n,a[o],o,a)),o++;return r})},{}],26:[function(){"use strict";Array.prototype.some||(Array.prototype.some=function(t,e){var n,r;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),a=o.length>>>0;if("function"!
=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;a>r;){if(r in o){var i=t.call(n,o[r],r,o);if(i)return!0}r++}return!1})},{}],27:[function(){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},o=function(){var o=this instanceof r&&t?this:t,a=e.concat(Array.prototype.slice.call(arguments));return n.apply(o,a)};return r.prototype=this.prototype,o.prototype=new r,o})},{}],28:[function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;Object.keys||(Object.keys=function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on
non-object");var a,i,s=[];for(a in o)t.call(o,a)&&s.push(a);if(e)for(i=0;r>i;i++)t.call(o,n[i])&&s.push(n[i]);return s})},{}],29:[function(){"use strict";String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},{}],30:[function(t,e){"use strict";t("./polyfills/function.bind"),t("./polyfills/array.foreach"),t("./polyfills/array.map"),t("./polyfills/array.filter"),t("./polyfills/array.isarray"),t("./polyfills/array.indexof"),t("./polyfills/array.some"),t("./polyfills/string.trim"),t("./polyfills/object.keys");var n=t("./core"),r=t("./index"),o=t("./use");n.use=o.bind(n),n.find=r.find,n.val=t("./validators"),e.exports=n},{"./core":10,"./index":14,"./polyfills/array.filter":21,"./polyfills/array.foreach":22,"./polyfills/array.indexof":23,"./polyfills/array.isarray":24,"./polyfills/array.map":25,"./polyfills/array.some":26,"./polyfills/function.bind":27,"./polyfills/object.keys":28,"./polyfills/string.trim":29,"./use":34,"./validators":35}],31:[fu
nction(t,e){(function(n){var r=t("./rome"),o=t("./momentum");if(r.use(n.moment),void 0===o.moment)throw new Error("rome depends on moment.js, you can get it at http://momentjs.com, or you could use the bundled distribution file instead.");e.exports=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./momentum":18,"./rome":30}],32:[function(t,e){"use strict";function n(t,e){return 2===arguments.length&&(t.innerText=t.textContent=e),t.innerText||t.textContent}e.exports=n},{}],33:[function(t,e){"use strict";e.exports=function(t,e){var n,r=-1/0;return function(){function o(){clearTimeout(n),n=null;var a=r+e,i=Date.now();i>a?(r=i,t.apply(this,arguments)):n=setTimeout(o,a-i)}n||o()}}},{}],34:[function(t,e){"use strict";function n(t){this.moment=r.moment=t}var r=t("./momentum");e.exports=n},{"./momentum":18}],35:[function(t,e){"use strict";function n(t){return function(e){var n=a(e);return function(r){var s=o.find(e),u=a(r),c=n||s&&s.getMoment();return c?(
s&&i.add(this,s),t(u,c)):!0}}}function r(t,e){return function(n,r){function s(t){var e,n,r=o.find(t);return r?e=n=r.getMoment():Array.isArray(t)?(e=t[0],n=t[1]):e=n=t,r&&i.add(r,this),{start:a(e).startOf("day").toDate(),end:a(n).endOf("day").toDate()}}var u,c=arguments.length;return Array.isArray(n)?u=n:1===c?u=[n]:2===c&&(u=[[n,r]]),function(n){return u.map(s.bind(this))[t](e.bind(this,n))}}}var o=t("./index"),a=t("./parse"),i=t("./association"),s=n(function(t,e){return t>=e}),u=n(function(t,e){return t>e}),c=n(function(t,e){return e>=t}),l=n(function(t,e){return e>t}),d=r("every",function(t,e){return e.start>t||e.end<t}),f=r("some",function(t,e){return e.start<=t&&e.end>=t});e.exports={afterEq:s,after:u,beforeEq:c,before:l,except:d,only:f}},{"./association":6,"./index":14,"./parse":20}]},{},[31])(31)});
\ No newline at end of file
[09/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/backgrid-0.3.5.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/backgrid-0.3.5.js b/htrace-htraced/src/web/lib/js/backgrid-0.3.5.js
new file mode 100644
index 0000000..6f8da79
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/backgrid-0.3.5.js
@@ -0,0 +1,2883 @@
+/*!
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2014 Jimmy Yuen Ho Wong and contributors <wy...@gmail.com>
+ Licensed under the MIT license.
+*/
+
+(function (factory) {
+
+ // CommonJS
+ if (typeof exports == "object") {
+ module.exports = factory(module.exports,
+ require("underscore"),
+ require("backbone"));
+ }
+ // Browser
+ else factory(this, this._, this.Backbone);
+}(function (root, _, Backbone) {
+
+ "use strict";
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+// Copyright 2009, 2010 Kristopher Michael Kowal
+// https://github.com/kriskowal/es5-shim
+// ES5 15.5.4.20
+// http://es5.github.com/#x15.5.4.20
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ // http://blog.stevenlevithan.com/archives/faster-trim-javascript
+ // http://perfectionkills.com/whitespace-deviations/
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ if (this === undefined || this === null) {
+ throw new TypeError("can't convert " + this + " to object");
+ }
+ return String(this)
+ .replace(trimBeginRegexp, "")
+ .replace(trimEndRegexp, "");
+ };
+}
+
+function lpad(str, length, padstr) {
+ var paddingLen = length - (str + '').length;
+ paddingLen = paddingLen < 0 ? 0 : paddingLen;
+ var padding = '';
+ for (var i = 0; i < paddingLen; i++) {
+ padding = padding + padstr;
+ }
+ return padding + str;
+}
+
+var $ = Backbone.$;
+
+var Backgrid = root.Backgrid = {
+
+ Extension: {},
+
+ resolveNameToClass: function (name, suffix) {
+ if (_.isString(name)) {
+ var key = _.map(name.split('-'), function (e) {
+ return e.slice(0, 1).toUpperCase() + e.slice(1);
+ }).join('') + suffix;
+ var klass = Backgrid[key] || Backgrid.Extension[key];
+ if (_.isUndefined(klass)) {
+ throw new ReferenceError("Class '" + key + "' not found");
+ }
+ return klass;
+ }
+
+ return name;
+ },
+
+ callByNeed: function () {
+ var value = arguments[0];
+ if (!_.isFunction(value)) return value;
+
+ var context = arguments[1];
+ var args = [].slice.call(arguments, 2);
+ return value.apply(context, !!(args + '') ? args : []);
+ }
+
+};
+_.extend(Backgrid, Backbone.Events);
+
+/**
+ Command translates a DOM Event into commands that Backgrid
+ recognizes. Interested parties can listen on selected Backgrid events that
+ come with an instance of this class and act on the commands.
+
+ It is also possible to globally rebind the keyboard shortcuts by replacing
+ the methods in this class' prototype.
+
+ @class Backgrid.Command
+ @constructor
+ */
+var Command = Backgrid.Command = function (evt) {
+ _.extend(this, {
+ altKey: !!evt.altKey,
+ "char": evt["char"],
+ charCode: evt.charCode,
+ ctrlKey: !!evt.ctrlKey,
+ key: evt.key,
+ keyCode: evt.keyCode,
+ locale: evt.locale,
+ location: evt.location,
+ metaKey: !!evt.metaKey,
+ repeat: !!evt.repeat,
+ shiftKey: !!evt.shiftKey,
+ which: evt.which
+ });
+};
+_.extend(Command.prototype, {
+ /**
+ Up Arrow
+
+ @member Backgrid.Command
+ */
+ moveUp: function () { return this.keyCode == 38; },
+ /**
+ Down Arrow
+
+ @member Backgrid.Command
+ */
+ moveDown: function () { return this.keyCode === 40; },
+ /**
+ Shift Tab
+
+ @member Backgrid.Command
+ */
+ moveLeft: function () { return this.shiftKey && this.keyCode === 9; },
+ /**
+ Tab
+
+ @member Backgrid.Command
+ */
+ moveRight: function () { return !this.shiftKey && this.keyCode === 9; },
+ /**
+ Enter
+
+ @member Backgrid.Command
+ */
+ save: function () { return this.keyCode === 13; },
+ /**
+ Esc
+
+ @member Backgrid.Command
+ */
+ cancel: function () { return this.keyCode === 27; },
+ /**
+ None of the above.
+
+ @member Backgrid.Command
+ */
+ passThru: function () {
+ return !(this.moveUp() || this.moveDown() || this.moveLeft() ||
+ this.moveRight() || this.save() || this.cancel());
+ }
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ Just a convenient class for interested parties to subclass.
+
+ The default Cell classes don't require the formatter to be a subclass of
+ Formatter as long as the fromRaw(rawData) and toRaw(formattedData) methods
+ are defined.
+
+ @abstract
+ @class Backgrid.CellFormatter
+ @constructor
+*/
+var CellFormatter = Backgrid.CellFormatter = function () {};
+_.extend(CellFormatter.prototype, {
+
+ /**
+ Takes a raw value from a model and returns an optionally formatted string
+ for display. The default implementation simply returns the supplied value
+ as is without any type conversion.
+
+ @member Backgrid.CellFormatter
+ @param {*} rawData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {*}
+ */
+ fromRaw: function (rawData, model) {
+ return rawData;
+ },
+
+ /**
+ Takes a formatted string, usually from user input, and returns a
+ appropriately typed value for persistence in the model.
+
+ If the user input is invalid or unable to be converted to a raw value
+ suitable for persistence in the model, toRaw must return `undefined`.
+
+ @member Backgrid.CellFormatter
+ @param {string} formattedData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {*|undefined}
+ */
+ toRaw: function (formattedData, model) {
+ return formattedData;
+ }
+
+});
+
+/**
+ A floating point number formatter. Doesn't understand scientific notation at
+ the moment.
+
+ @class Backgrid.NumberFormatter
+ @extends Backgrid.CellFormatter
+ @constructor
+ @throws {RangeError} If decimals < 0 or > 20.
+*/
+var NumberFormatter = Backgrid.NumberFormatter = function (options) {
+ _.extend(this, this.defaults, options || {});
+
+ if (this.decimals < 0 || this.decimals > 20) {
+ throw new RangeError("decimals must be between 0 and 20");
+ }
+};
+NumberFormatter.prototype = new CellFormatter();
+_.extend(NumberFormatter.prototype, {
+
+ /**
+ @member Backgrid.NumberFormatter
+ @cfg {Object} options
+
+ @cfg {number} [options.decimals=2] Number of decimals to display. Must be an integer.
+
+ @cfg {string} [options.decimalSeparator='.'] The separator to use when
+ displaying decimals.
+
+ @cfg {string} [options.orderSeparator=','] The separator to use to
+ separator thousands. May be an empty string.
+ */
+ defaults: {
+ decimals: 2,
+ decimalSeparator: '.',
+ orderSeparator: ','
+ },
+
+ HUMANIZED_NUM_RE: /(\d)(?=(?:\d{3})+$)/g,
+
+ /**
+ Takes a floating point number and convert it to a formatted string where
+ every thousand is separated by `orderSeparator`, with a `decimal` number of
+ decimals separated by `decimalSeparator`. The number returned is rounded
+ the usual way.
+
+ @member Backgrid.NumberFormatter
+ @param {number} number
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string}
+ */
+ fromRaw: function (number, model) {
+ if (_.isNull(number) || _.isUndefined(number)) return '';
+
+ number = number.toFixed(~~this.decimals);
+
+ var parts = number.split('.');
+ var integerPart = parts[0];
+ var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : '';
+
+ return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart;
+ },
+
+ /**
+ Takes a string, possibly formatted with `orderSeparator` and/or
+ `decimalSeparator`, and convert it back to a number.
+
+ @member Backgrid.NumberFormatter
+ @param {string} formattedData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {number|undefined} Undefined if the string cannot be converted to
+ a number.
+ */
+ toRaw: function (formattedData, model) {
+ formattedData = formattedData.trim();
+
+ if (formattedData === '') return null;
+
+ var rawData = '';
+
+ var thousands = formattedData.split(this.orderSeparator);
+ for (var i = 0; i < thousands.length; i++) {
+ rawData += thousands[i];
+ }
+
+ var decimalParts = rawData.split(this.decimalSeparator);
+ rawData = '';
+ for (var i = 0; i < decimalParts.length; i++) {
+ rawData = rawData + decimalParts[i] + '.';
+ }
+
+ if (rawData[rawData.length - 1] === '.') {
+ rawData = rawData.slice(0, rawData.length - 1);
+ }
+
+ var result = (rawData * 1).toFixed(~~this.decimals) * 1;
+ if (_.isNumber(result) && !_.isNaN(result)) return result;
+ }
+
+});
+
+/**
+ A number formatter that converts a floating point number, optionally
+ multiplied by a multiplier, to a percentage string and vice versa.
+
+ @class Backgrid.PercentFormatter
+ @extends Backgrid.NumberFormatter
+ @constructor
+ @throws {RangeError} If decimals < 0 or > 20.
+ */
+var PercentFormatter = Backgrid.PercentFormatter = function () {
+ Backgrid.NumberFormatter.apply(this, arguments);
+};
+
+PercentFormatter.prototype = new Backgrid.NumberFormatter(),
+
+_.extend(PercentFormatter.prototype, {
+
+ /**
+ @member Backgrid.PercentFormatter
+ @cfg {Object} options
+
+ @cfg {number} [options.multiplier=1] The number used to multiply the model
+ value for display.
+
+ @cfg {string} [options.symbol='%'] The symbol to append to the percentage
+ string.
+ */
+ defaults: _.extend({}, NumberFormatter.prototype.defaults, {
+ multiplier: 1,
+ symbol: "%"
+ }),
+
+ /**
+ Takes a floating point number, where the number is first multiplied by
+ `multiplier`, then converted to a formatted string like
+ NumberFormatter#fromRaw, then finally append `symbol` to the end.
+
+ @member Backgrid.PercentFormatter
+ @param {number} rawValue
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string}
+ */
+ fromRaw: function (number, model) {
+ var args = [].slice.call(arguments, 1);
+ args.unshift(number * this.multiplier);
+ return (NumberFormatter.prototype.fromRaw.apply(this, args) || "0") + this.symbol;
+ },
+
+ /**
+ Takes a string, possibly appended with `symbol` and/or `decimalSeparator`,
+ and convert it back to a number for the model like NumberFormatter#toRaw,
+ and then dividing it by `multiplier`.
+
+ @member Backgrid.PercentFormatter
+ @param {string} formattedData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {number|undefined} Undefined if the string cannot be converted to
+ a number.
+ */
+ toRaw: function (formattedValue, model) {
+ var tokens = formattedValue.split(this.symbol);
+ if (tokens && tokens[0] && tokens[1] === "" || tokens[1] == null) {
+ var rawValue = NumberFormatter.prototype.toRaw.call(this, tokens[0]);
+ if (_.isUndefined(rawValue)) return rawValue;
+ return rawValue / this.multiplier;
+ }
+ }
+
+});
+
+/**
+ Formatter to converts between various datetime formats.
+
+ This class only understands ISO-8601 formatted datetime strings and UNIX
+ offset (number of milliseconds since UNIX Epoch). See
+ Backgrid.Extension.MomentFormatter if you need a much more flexible datetime
+ formatter.
+
+ @class Backgrid.DatetimeFormatter
+ @extends Backgrid.CellFormatter
+ @constructor
+ @throws {Error} If both `includeDate` and `includeTime` are false.
+*/
+var DatetimeFormatter = Backgrid.DatetimeFormatter = function (options) {
+ _.extend(this, this.defaults, options || {});
+
+ if (!this.includeDate && !this.includeTime) {
+ throw new Error("Either includeDate or includeTime must be true");
+ }
+};
+DatetimeFormatter.prototype = new CellFormatter();
+_.extend(DatetimeFormatter.prototype, {
+
+ /**
+ @member Backgrid.DatetimeFormatter
+
+ @cfg {Object} options
+
+ @cfg {boolean} [options.includeDate=true] Whether the values include the
+ date part.
+
+ @cfg {boolean} [options.includeTime=true] Whether the values include the
+ time part.
+
+ @cfg {boolean} [options.includeMilli=false] If `includeTime` is true,
+ whether to include the millisecond part, if it exists.
+ */
+ defaults: {
+ includeDate: true,
+ includeTime: true,
+ includeMilli: false
+ },
+
+ DATE_RE: /^([+\-]?\d{4})-(\d{2})-(\d{2})$/,
+ TIME_RE: /^(\d{2}):(\d{2}):(\d{2})(\.(\d{3}))?$/,
+ ISO_SPLITTER_RE: /T|Z| +/,
+
+ _convert: function (data, validate) {
+ if ((data + '').trim() === '') return null;
+
+ var date, time = null;
+ if (_.isNumber(data)) {
+ var jsDate = new Date(data);
+ date = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);
+ time = lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);
+ }
+ else {
+ data = data.trim();
+ var parts = data.split(this.ISO_SPLITTER_RE) || [];
+ date = this.DATE_RE.test(parts[0]) ? parts[0] : '';
+ time = date && parts[1] ? parts[1] : this.TIME_RE.test(parts[0]) ? parts[0] : '';
+ }
+
+ var YYYYMMDD = this.DATE_RE.exec(date) || [];
+ var HHmmssSSS = this.TIME_RE.exec(time) || [];
+
+ if (validate) {
+ if (this.includeDate && _.isUndefined(YYYYMMDD[0])) return;
+ if (this.includeTime && _.isUndefined(HHmmssSSS[0])) return;
+ if (!this.includeDate && date) return;
+ if (!this.includeTime && time) return;
+ }
+
+ var jsDate = new Date(Date.UTC(YYYYMMDD[1] * 1 || 0,
+ YYYYMMDD[2] * 1 - 1 || 0,
+ YYYYMMDD[3] * 1 || 0,
+ HHmmssSSS[1] * 1 || null,
+ HHmmssSSS[2] * 1 || null,
+ HHmmssSSS[3] * 1 || null,
+ HHmmssSSS[5] * 1 || null));
+
+ var result = '';
+
+ if (this.includeDate) {
+ result = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);
+ }
+
+ if (this.includeTime) {
+ result = result + (this.includeDate ? 'T' : '') + lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);
+
+ if (this.includeMilli) {
+ result = result + '.' + lpad(jsDate.getUTCMilliseconds(), 3, 0);
+ }
+ }
+
+ if (this.includeDate && this.includeTime) {
+ result += "Z";
+ }
+
+ return result;
+ },
+
+ /**
+ Converts an ISO-8601 formatted datetime string to a datetime string, date
+ string or a time string. The timezone is ignored if supplied.
+
+ @member Backgrid.DatetimeFormatter
+ @param {string} rawData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string|null|undefined} ISO-8601 string in UTC. Null and undefined
+ values are returned as is.
+ */
+ fromRaw: function (rawData, model) {
+ if (_.isNull(rawData) || _.isUndefined(rawData)) return '';
+ return this._convert(rawData);
+ },
+
+ /**
+ Converts an ISO-8601 formatted datetime string to a datetime string, date
+ string or a time string. The timezone is ignored if supplied. This method
+ parses the input values exactly the same way as
+ Backgrid.Extension.MomentFormatter#fromRaw(), in addition to doing some
+ sanity checks.
+
+ @member Backgrid.DatetimeFormatter
+ @param {string} formattedData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string|undefined} ISO-8601 string in UTC. Undefined if a date is
+ found when `includeDate` is false, or a time is found when `includeTime` is
+ false, or if `includeDate` is true and a date is not found, or if
+ `includeTime` is true and a time is not found.
+ */
+ toRaw: function (formattedData, model) {
+ return this._convert(formattedData, true);
+ }
+
+});
+
+/**
+ Formatter to convert any value to string.
+
+ @class Backgrid.StringFormatter
+ @extends Backgrid.CellFormatter
+ @constructor
+ */
+var StringFormatter = Backgrid.StringFormatter = function () {};
+StringFormatter.prototype = new CellFormatter();
+_.extend(StringFormatter.prototype, {
+ /**
+ Converts any value to a string using Ecmascript's implicit type
+ conversion. If the given value is `null` or `undefined`, an empty string is
+ returned instead.
+
+ @member Backgrid.StringFormatter
+ @param {*} rawValue
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string}
+ */
+ fromRaw: function (rawValue, model) {
+ if (_.isUndefined(rawValue) || _.isNull(rawValue)) return '';
+ return rawValue + '';
+ }
+});
+
+/**
+ Simple email validation formatter.
+
+ @class Backgrid.EmailFormatter
+ @extends Backgrid.CellFormatter
+ @constructor
+ */
+var EmailFormatter = Backgrid.EmailFormatter = function () {};
+EmailFormatter.prototype = new CellFormatter();
+_.extend(EmailFormatter.prototype, {
+ /**
+ Return the input if it is a string that contains an '@' character and if
+ the strings before and after '@' are non-empty. If the input does not
+ validate, `undefined` is returned.
+
+ @member Backgrid.EmailFormatter
+ @param {*} formattedData
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {string|undefined}
+ */
+ toRaw: function (formattedData, model) {
+ var parts = formattedData.trim().split("@");
+ if (parts.length === 2 && _.all(parts)) {
+ return formattedData;
+ }
+ }
+});
+
+/**
+ Formatter for SelectCell.
+
+ If the type of a model value is not a string, it is expected that a subclass
+ of this formatter is provided to the SelectCell, with #toRaw overridden to
+ convert the string value returned from the DOM back to whatever value is
+ expected in the model.
+
+ @class Backgrid.SelectFormatter
+ @extends Backgrid.CellFormatter
+ @constructor
+*/
+var SelectFormatter = Backgrid.SelectFormatter = function () {};
+SelectFormatter.prototype = new CellFormatter();
+_.extend(SelectFormatter.prototype, {
+
+ /**
+ Normalizes raw scalar or array values to an array.
+
+ @member Backgrid.SelectFormatter
+ @param {*} rawValue
+ @param {Backbone.Model} model Used for more complicated formatting
+ @return {Array.<*>}
+ */
+ fromRaw: function (rawValue, model) {
+ return _.isArray(rawValue) ? rawValue : rawValue != null ? [rawValue] : [];
+ }
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ Generic cell editor base class. Only defines an initializer for a number of
+ required parameters.
+
+ @abstract
+ @class Backgrid.CellEditor
+ @extends Backbone.View
+*/
+var CellEditor = Backgrid.CellEditor = Backbone.View.extend({
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backgrid.CellFormatter} options.formatter
+ @param {Backgrid.Column} options.column
+ @param {Backbone.Model} options.model
+
+ @throws {TypeError} If `formatter` is not a formatter instance, or when
+ `model` or `column` are undefined.
+ */
+ initialize: function (options) {
+ this.formatter = options.formatter;
+ this.column = options.column;
+ if (!(this.column instanceof Column)) {
+ this.column = new Column(this.column);
+ }
+
+ this.listenTo(this.model, "backgrid:editing", this.postRender);
+ },
+
+ /**
+ Post-rendering setup and initialization. Focuses the cell editor's `el` in
+ this default implementation. **Should** be called by Cell classes after
+ calling Backgrid.CellEditor#render.
+ */
+ postRender: function (model, column) {
+ if (column == null || column.get("name") == this.column.get("name")) {
+ this.$el.focus();
+ }
+ return this;
+ }
+
+});
+
+/**
+ InputCellEditor the cell editor type used by most core cell types. This cell
+ editor renders a text input box as its editor. The input will render a
+ placeholder if the value is empty on supported browsers.
+
+ @class Backgrid.InputCellEditor
+ @extends Backgrid.CellEditor
+*/
+var InputCellEditor = Backgrid.InputCellEditor = CellEditor.extend({
+
+ /** @property */
+ tagName: "input",
+
+ /** @property */
+ attributes: {
+ type: "text"
+ },
+
+ /** @property */
+ events: {
+ "blur": "saveOrCancel",
+ "keydown": "saveOrCancel"
+ },
+
+ /**
+ Initializer. Removes this `el` from the DOM when a `done` event is
+ triggered.
+
+ @param {Object} options
+ @param {Backgrid.CellFormatter} options.formatter
+ @param {Backgrid.Column} options.column
+ @param {Backbone.Model} options.model
+ @param {string} [options.placeholder]
+ */
+ initialize: function (options) {
+ InputCellEditor.__super__.initialize.apply(this, arguments);
+
+ if (options.placeholder) {
+ this.$el.attr("placeholder", options.placeholder);
+ }
+ },
+
+ /**
+ Renders a text input with the cell value formatted for display, if it
+ exists.
+ */
+ render: function () {
+ var model = this.model;
+ this.$el.val(this.formatter.fromRaw(model.get(this.column.get("name")), model));
+ return this;
+ },
+
+ /**
+ If the key pressed is `enter`, `tab`, `up`, or `down`, converts the value
+ in the editor to a raw value for saving into the model using the formatter.
+
+ If the key pressed is `esc` the changes are undone.
+
+ If the editor goes out of focus (`blur`) but the value is invalid, the
+ event is intercepted and cancelled so the cell remains in focus pending for
+ further action. The changes are saved otherwise.
+
+ Triggers a Backbone `backgrid:edited` event from the model when successful,
+ and `backgrid:error` if the value cannot be converted. Classes listening to
+ the `error` event, usually the Cell classes, should respond appropriately,
+ usually by rendering some kind of error feedback.
+
+ @param {Event} e
+ */
+ saveOrCancel: function (e) {
+
+ var formatter = this.formatter;
+ var model = this.model;
+ var column = this.column;
+
+ var command = new Command(e);
+ var blurred = e.type === "blur";
+
+ if (command.moveUp() || command.moveDown() || command.moveLeft() || command.moveRight() ||
+ command.save() || blurred) {
+
+ e.preventDefault();
+ e.stopPropagation();
+
+ var val = this.$el.val();
+ var newValue = formatter.toRaw(val, model);
+ if (_.isUndefined(newValue)) {
+ model.trigger("backgrid:error", model, column, val);
+ }
+ else {
+ model.set(column.get("name"), newValue);
+ model.trigger("backgrid:edited", model, column, command);
+ }
+ }
+ // esc
+ else if (command.cancel()) {
+ // undo
+ e.stopPropagation();
+ model.trigger("backgrid:edited", model, column, command);
+ }
+ },
+
+ postRender: function (model, column) {
+ if (column == null || column.get("name") == this.column.get("name")) {
+ // move the cursor to the end on firefox if text is right aligned
+ if (this.$el.css("text-align") === "right") {
+ var val = this.$el.val();
+ this.$el.focus().val(null).val(val);
+ }
+ else this.$el.focus();
+ }
+ return this;
+ }
+
+});
+
+/**
+ The super-class for all Cell types. By default, this class renders a plain
+ table cell with the model value converted to a string using the
+ formatter. The table cell is clickable, upon which the cell will go into
+ editor mode, which is rendered by a Backgrid.InputCellEditor instance by
+ default. Upon encountering any formatting errors, this class will add an
+ `error` CSS class to the table cell.
+
+ @abstract
+ @class Backgrid.Cell
+ @extends Backbone.View
+*/
+var Cell = Backgrid.Cell = Backbone.View.extend({
+
+ /** @property */
+ tagName: "td",
+
+ /**
+ @property {Backgrid.CellFormatter|Object|string} [formatter=CellFormatter]
+ */
+ formatter: CellFormatter,
+
+ /**
+ @property {Backgrid.CellEditor} [editor=Backgrid.InputCellEditor] The
+ default editor for all cell instances of this class. This value must be a
+ class, it will be automatically instantiated upon entering edit mode.
+
+ See Backgrid.CellEditor
+ */
+ editor: InputCellEditor,
+
+ /** @property */
+ events: {
+ "click": "enterEditMode"
+ },
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Model} options.model
+ @param {Backgrid.Column} options.column
+
+ @throws {ReferenceError} If formatter is a string but a formatter class of
+ said name cannot be found in the Backgrid module.
+ */
+ initialize: function (options) {
+ this.column = options.column;
+ if (!(this.column instanceof Column)) {
+ this.column = new Column(this.column);
+ }
+
+ var column = this.column, model = this.model, $el = this.$el;
+
+ var formatter = Backgrid.resolveNameToClass(column.get("formatter") ||
+ this.formatter, "Formatter");
+
+ if (!_.isFunction(formatter.fromRaw) && !_.isFunction(formatter.toRaw)) {
+ formatter = new formatter();
+ }
+
+ this.formatter = formatter;
+
+ this.editor = Backgrid.resolveNameToClass(this.editor, "CellEditor");
+
+ this.listenTo(model, "change:" + column.get("name"), function () {
+ if (!$el.hasClass("editor")) this.render();
+ });
+
+ this.listenTo(model, "backgrid:error", this.renderError);
+
+ this.listenTo(column, "change:editable change:sortable change:renderable",
+ function (column) {
+ var changed = column.changedAttributes();
+ for (var key in changed) {
+ if (changed.hasOwnProperty(key)) {
+ $el.toggleClass(key, changed[key]);
+ }
+ }
+ });
+
+ if (Backgrid.callByNeed(column.editable(), column, model)) $el.addClass("editable");
+ if (Backgrid.callByNeed(column.sortable(), column, model)) $el.addClass("sortable");
+ if (Backgrid.callByNeed(column.renderable(), column, model)) $el.addClass("renderable");
+ },
+
+ /**
+ Render a text string in a table cell. The text is converted from the
+ model's raw value for this cell's column.
+ */
+ render: function () {
+ this.$el.empty();
+ var model = this.model;
+ this.$el.text(this.formatter.fromRaw(model.get(this.column.get("name")), model));
+ this.delegateEvents();
+ return this;
+ },
+
+ /**
+ If this column is editable, a new CellEditor instance is instantiated with
+ its required parameters. An `editor` CSS class is added to the cell upon
+ entering edit mode.
+
+ This method triggers a Backbone `backgrid:edit` event from the model when
+ the cell is entering edit mode and an editor instance has been constructed,
+ but before it is rendered and inserted into the DOM. The cell and the
+ constructed cell editor instance are sent as event parameters when this
+ event is triggered.
+
+ When this cell has finished switching to edit mode, a Backbone
+ `backgrid:editing` event is triggered from the model. The cell and the
+ constructed cell instance are also sent as parameters in the event.
+
+ When the model triggers a `backgrid:error` event, it means the editor is
+ unable to convert the current user input to an apprpriate value for the
+ model's column, and an `error` CSS class is added to the cell accordingly.
+ */
+ enterEditMode: function () {
+ var model = this.model;
+ var column = this.column;
+
+ var editable = Backgrid.callByNeed(column.editable(), column, model);
+ if (editable) {
+
+ this.currentEditor = new this.editor({
+ column: this.column,
+ model: this.model,
+ formatter: this.formatter
+ });
+
+ model.trigger("backgrid:edit", model, column, this, this.currentEditor);
+
+ // Need to redundantly undelegate events for Firefox
+ this.undelegateEvents();
+ this.$el.empty();
+ this.$el.append(this.currentEditor.$el);
+ this.currentEditor.render();
+ this.$el.addClass("editor");
+
+ model.trigger("backgrid:editing", model, column, this, this.currentEditor);
+ }
+ },
+
+ /**
+ Put an `error` CSS class on the table cell.
+ */
+ renderError: function (model, column) {
+ if (column == null || column.get("name") == this.column.get("name")) {
+ this.$el.addClass("error");
+ }
+ },
+
+ /**
+ Removes the editor and re-render in display mode.
+ */
+ exitEditMode: function () {
+ this.$el.removeClass("error");
+ this.currentEditor.remove();
+ this.stopListening(this.currentEditor);
+ delete this.currentEditor;
+ this.$el.removeClass("editor");
+ this.render();
+ },
+
+ /**
+ Clean up this cell.
+
+ @chainable
+ */
+ remove: function () {
+ if (this.currentEditor) {
+ this.currentEditor.remove.apply(this.currentEditor, arguments);
+ delete this.currentEditor;
+ }
+ return Cell.__super__.remove.apply(this, arguments);
+ }
+
+});
+
+/**
+ StringCell displays HTML escaped strings and accepts anything typed in.
+
+ @class Backgrid.StringCell
+ @extends Backgrid.Cell
+*/
+var StringCell = Backgrid.StringCell = Cell.extend({
+
+ /** @property */
+ className: "string-cell",
+
+ formatter: StringFormatter
+
+});
+
+/**
+ UriCell renders an HTML `<a>` anchor for the value and accepts URIs as user
+ input values. No type conversion or URL validation is done by the formatter
+ of this cell. Users who need URL validation are encourage to subclass UriCell
+ to take advantage of the parsing capabilities of the HTMLAnchorElement
+ available on HTML5-capable browsers or using a third-party library like
+ [URI.js](https://github.com/medialize/URI.js).
+
+ @class Backgrid.UriCell
+ @extends Backgrid.Cell
+*/
+var UriCell = Backgrid.UriCell = Cell.extend({
+
+ /** @property */
+ className: "uri-cell",
+
+ /**
+ @property {string} [title] The title attribute of the generated anchor. It
+ uses the display value formatted by the `formatter.fromRaw` by default.
+ */
+ title: null,
+
+ /**
+ @property {string} [target="_blank"] The target attribute of the generated
+ anchor.
+ */
+ target: "_blank",
+
+ initialize: function (options) {
+ UriCell.__super__.initialize.apply(this, arguments);
+ this.title = options.title || this.title;
+ this.target = options.target || this.target;
+ },
+
+ render: function () {
+ this.$el.empty();
+ var rawValue = this.model.get(this.column.get("name"));
+ var formattedValue = this.formatter.fromRaw(rawValue, this.model);
+ this.$el.append($("<a>", {
+ tabIndex: -1,
+ href: rawValue,
+ title: this.title || formattedValue,
+ target: this.target
+ }).text(formattedValue));
+ this.delegateEvents();
+ return this;
+ }
+
+});
+
+/**
+ Like Backgrid.UriCell, EmailCell renders an HTML `<a>` anchor for the
+ value. The `href` in the anchor is prefixed with `mailto:`. EmailCell will
+ complain if the user enters a string that doesn't contain the `@` sign.
+
+ @class Backgrid.EmailCell
+ @extends Backgrid.StringCell
+*/
+var EmailCell = Backgrid.EmailCell = StringCell.extend({
+
+ /** @property */
+ className: "email-cell",
+
+ formatter: EmailFormatter,
+
+ render: function () {
+ this.$el.empty();
+ var model = this.model;
+ var formattedValue = this.formatter.fromRaw(model.get(this.column.get("name")), model);
+ this.$el.append($("<a>", {
+ tabIndex: -1,
+ href: "mailto:" + formattedValue,
+ title: formattedValue
+ }).text(formattedValue));
+ this.delegateEvents();
+ return this;
+ }
+
+});
+
+/**
+ NumberCell is a generic cell that renders all numbers. Numbers are formatted
+ using a Backgrid.NumberFormatter.
+
+ @class Backgrid.NumberCell
+ @extends Backgrid.Cell
+*/
+var NumberCell = Backgrid.NumberCell = Cell.extend({
+
+ /** @property */
+ className: "number-cell",
+
+ /**
+ @property {number} [decimals=2] Must be an integer.
+ */
+ decimals: NumberFormatter.prototype.defaults.decimals,
+
+ /** @property {string} [decimalSeparator='.'] */
+ decimalSeparator: NumberFormatter.prototype.defaults.decimalSeparator,
+
+ /** @property {string} [orderSeparator=','] */
+ orderSeparator: NumberFormatter.prototype.defaults.orderSeparator,
+
+ /** @property {Backgrid.CellFormatter} [formatter=Backgrid.NumberFormatter] */
+ formatter: NumberFormatter,
+
+ /**
+ Initializes this cell and the number formatter.
+
+ @param {Object} options
+ @param {Backbone.Model} options.model
+ @param {Backgrid.Column} options.column
+ */
+ initialize: function (options) {
+ NumberCell.__super__.initialize.apply(this, arguments);
+ var formatter = this.formatter;
+ formatter.decimals = this.decimals;
+ formatter.decimalSeparator = this.decimalSeparator;
+ formatter.orderSeparator = this.orderSeparator;
+ }
+
+});
+
+/**
+ An IntegerCell is just a Backgrid.NumberCell with 0 decimals. If a floating
+ point number is supplied, the number is simply rounded the usual way when
+ displayed.
+
+ @class Backgrid.IntegerCell
+ @extends Backgrid.NumberCell
+*/
+var IntegerCell = Backgrid.IntegerCell = NumberCell.extend({
+
+ /** @property */
+ className: "integer-cell",
+
+ /**
+ @property {number} decimals Must be an integer.
+ */
+ decimals: 0
+});
+
+/**
+ A PercentCell is another Backgrid.NumberCell that takes a floating number,
+ optionally multiplied by a multiplier and display it as a percentage.
+
+ @class Backgrid.PercentCell
+ @extends Backgrid.NumberCell
+ */
+var PercentCell = Backgrid.PercentCell = NumberCell.extend({
+
+ /** @property */
+ className: "percent-cell",
+
+ /** @property {number} [multiplier=1] */
+ multiplier: PercentFormatter.prototype.defaults.multiplier,
+
+ /** @property {string} [symbol='%'] */
+ symbol: PercentFormatter.prototype.defaults.symbol,
+
+ /** @property {Backgrid.CellFormatter} [formatter=Backgrid.PercentFormatter] */
+ formatter: PercentFormatter,
+
+ /**
+ Initializes this cell and the percent formatter.
+
+ @param {Object} options
+ @param {Backbone.Model} options.model
+ @param {Backgrid.Column} options.column
+ */
+ initialize: function () {
+ PercentCell.__super__.initialize.apply(this, arguments);
+ var formatter = this.formatter;
+ formatter.multiplier = this.multiplier;
+ formatter.symbol = this.symbol;
+ }
+
+});
+
+/**
+ DatetimeCell is a basic cell that accepts datetime string values in RFC-2822
+ or W3C's subset of ISO-8601 and displays them in ISO-8601 format. For a much
+ more sophisticated date time cell with better datetime formatting, take a
+ look at the Backgrid.Extension.MomentCell extension.
+
+ @class Backgrid.DatetimeCell
+ @extends Backgrid.Cell
+
+ See:
+
+ - Backgrid.Extension.MomentCell
+ - Backgrid.DatetimeFormatter
+*/
+var DatetimeCell = Backgrid.DatetimeCell = Cell.extend({
+
+ /** @property */
+ className: "datetime-cell",
+
+ /**
+ @property {boolean} [includeDate=true]
+ */
+ includeDate: DatetimeFormatter.prototype.defaults.includeDate,
+
+ /**
+ @property {boolean} [includeTime=true]
+ */
+ includeTime: DatetimeFormatter.prototype.defaults.includeTime,
+
+ /**
+ @property {boolean} [includeMilli=false]
+ */
+ includeMilli: DatetimeFormatter.prototype.defaults.includeMilli,
+
+ /** @property {Backgrid.CellFormatter} [formatter=Backgrid.DatetimeFormatter] */
+ formatter: DatetimeFormatter,
+
+ /**
+ Initializes this cell and the datetime formatter.
+
+ @param {Object} options
+ @param {Backbone.Model} options.model
+ @param {Backgrid.Column} options.column
+ */
+ initialize: function (options) {
+ DatetimeCell.__super__.initialize.apply(this, arguments);
+ var formatter = this.formatter;
+ formatter.includeDate = this.includeDate;
+ formatter.includeTime = this.includeTime;
+ formatter.includeMilli = this.includeMilli;
+
+ var placeholder = this.includeDate ? "YYYY-MM-DD" : "";
+ placeholder += (this.includeDate && this.includeTime) ? "T" : "";
+ placeholder += this.includeTime ? "HH:mm:ss" : "";
+ placeholder += (this.includeTime && this.includeMilli) ? ".SSS" : "";
+
+ this.editor = this.editor.extend({
+ attributes: _.extend({}, this.editor.prototype.attributes, this.editor.attributes, {
+ placeholder: placeholder
+ })
+ });
+ }
+
+});
+
+/**
+ DateCell is a Backgrid.DatetimeCell without the time part.
+
+ @class Backgrid.DateCell
+ @extends Backgrid.DatetimeCell
+*/
+var DateCell = Backgrid.DateCell = DatetimeCell.extend({
+
+ /** @property */
+ className: "date-cell",
+
+ /** @property */
+ includeTime: false
+
+});
+
+/**
+ TimeCell is a Backgrid.DatetimeCell without the date part.
+
+ @class Backgrid.TimeCell
+ @extends Backgrid.DatetimeCell
+*/
+var TimeCell = Backgrid.TimeCell = DatetimeCell.extend({
+
+ /** @property */
+ className: "time-cell",
+
+ /** @property */
+ includeDate: false
+
+});
+
+/**
+ BooleanCellEditor renders a checkbox as its editor.
+
+ @class Backgrid.BooleanCellEditor
+ @extends Backgrid.CellEditor
+*/
+var BooleanCellEditor = Backgrid.BooleanCellEditor = CellEditor.extend({
+
+ /** @property */
+ tagName: "input",
+
+ /** @property */
+ attributes: {
+ tabIndex: -1,
+ type: "checkbox"
+ },
+
+ /** @property */
+ events: {
+ "mousedown": function () {
+ this.mouseDown = true;
+ },
+ "blur": "enterOrExitEditMode",
+ "mouseup": function () {
+ this.mouseDown = false;
+ },
+ "change": "saveOrCancel",
+ "keydown": "saveOrCancel"
+ },
+
+ /**
+ Renders a checkbox and check it if the model value of this column is true,
+ uncheck otherwise.
+ */
+ render: function () {
+ var model = this.model;
+ var val = this.formatter.fromRaw(model.get(this.column.get("name")), model);
+ this.$el.prop("checked", val);
+ return this;
+ },
+
+ /**
+ Event handler. Hack to deal with the case where `blur` is fired before
+ `change` and `click` on a checkbox.
+ */
+ enterOrExitEditMode: function (e) {
+ if (!this.mouseDown) {
+ var model = this.model;
+ model.trigger("backgrid:edited", model, this.column, new Command(e));
+ }
+ },
+
+ /**
+ Event handler. Save the value into the model if the event is `change` or
+ one of the keyboard navigation key presses. Exit edit mode without saving
+ if `escape` was pressed.
+ */
+ saveOrCancel: function (e) {
+ var model = this.model;
+ var column = this.column;
+ var formatter = this.formatter;
+ var command = new Command(e);
+ // skip ahead to `change` when space is pressed
+ if (command.passThru() && e.type != "change") return true;
+ if (command.cancel()) {
+ e.stopPropagation();
+ model.trigger("backgrid:edited", model, column, command);
+ }
+
+ var $el = this.$el;
+ if (command.save() || command.moveLeft() || command.moveRight() || command.moveUp() ||
+ command.moveDown()) {
+ e.preventDefault();
+ e.stopPropagation();
+ var val = formatter.toRaw($el.prop("checked"), model);
+ model.set(column.get("name"), val);
+ model.trigger("backgrid:edited", model, column, command);
+ }
+ else if (e.type == "change") {
+ var val = formatter.toRaw($el.prop("checked"), model);
+ model.set(column.get("name"), val);
+ $el.focus();
+ }
+ }
+
+});
+
+/**
+ BooleanCell renders a checkbox both during display mode and edit mode. The
+ checkbox is checked if the model value is true, unchecked otherwise.
+
+ @class Backgrid.BooleanCell
+ @extends Backgrid.Cell
+*/
+var BooleanCell = Backgrid.BooleanCell = Cell.extend({
+
+ /** @property */
+ className: "boolean-cell",
+
+ /** @property */
+ editor: BooleanCellEditor,
+
+ /** @property */
+ events: {
+ "click": "enterEditMode"
+ },
+
+ /**
+ Renders a checkbox and check it if the model value of this column is true,
+ uncheck otherwise.
+ */
+ render: function () {
+ this.$el.empty();
+ var model = this.model, column = this.column;
+ var editable = Backgrid.callByNeed(column.editable(), column, model);
+ this.$el.append($("<input>", {
+ tabIndex: -1,
+ type: "checkbox",
+ checked: this.formatter.fromRaw(model.get(column.get("name")), model),
+ disabled: !editable
+ }));
+ this.delegateEvents();
+ return this;
+ }
+
+});
+
+/**
+ SelectCellEditor renders an HTML `<select>` fragment as the editor.
+
+ @class Backgrid.SelectCellEditor
+ @extends Backgrid.CellEditor
+*/
+var SelectCellEditor = Backgrid.SelectCellEditor = CellEditor.extend({
+
+ /** @property */
+ tagName: "select",
+
+ /** @property */
+ events: {
+ "change": "save",
+ "blur": "close",
+ "keydown": "close"
+ },
+
+ /** @property {function(Object, ?Object=): string} template */
+ template: _.template('<option value="<%- value %>" <%= selected ? \'selected="selected"\' : "" %>><%- text %></option>', null, {variable: null}),
+
+ setOptionValues: function (optionValues) {
+ this.optionValues = optionValues;
+ this.optionValues = _.result(this, "optionValues");
+ },
+
+ setMultiple: function (multiple) {
+ this.multiple = multiple;
+ this.$el.prop("multiple", multiple);
+ },
+
+ _renderOptions: function (nvps, selectedValues) {
+ var options = '';
+ for (var i = 0; i < nvps.length; i++) {
+ options = options + this.template({
+ text: nvps[i][0],
+ value: nvps[i][1],
+ selected: _.indexOf(selectedValues, nvps[i][1]) > -1
+ });
+ }
+ return options;
+ },
+
+ /**
+ Renders the options if `optionValues` is a list of name-value pairs. The
+ options are contained inside option groups if `optionValues` is a list of
+ object hashes. The name is rendered at the option text and the value is the
+ option value. If `optionValues` is a function, it is called without a
+ parameter.
+ */
+ render: function () {
+ this.$el.empty();
+
+ var optionValues = _.result(this, "optionValues");
+ var model = this.model;
+ var selectedValues = this.formatter.fromRaw(model.get(this.column.get("name")), model);
+
+ if (!_.isArray(optionValues)) throw new TypeError("optionValues must be an array");
+
+ var optionValue = null;
+ var optionText = null;
+ var optionValue = null;
+ var optgroupName = null;
+ var optgroup = null;
+
+ for (var i = 0; i < optionValues.length; i++) {
+ var optionValue = optionValues[i];
+
+ if (_.isArray(optionValue)) {
+ optionText = optionValue[0];
+ optionValue = optionValue[1];
+
+ this.$el.append(this.template({
+ text: optionText,
+ value: optionValue,
+ selected: _.indexOf(selectedValues, optionValue) > -1
+ }));
+ }
+ else if (_.isObject(optionValue)) {
+ optgroupName = optionValue.name;
+ optgroup = $("<optgroup></optgroup>", { label: optgroupName });
+ optgroup.append(this._renderOptions.call(this, optionValue.values, selectedValues));
+ this.$el.append(optgroup);
+ }
+ else {
+ throw new TypeError("optionValues elements must be a name-value pair or an object hash of { name: 'optgroup label', value: [option name-value pairs] }");
+ }
+ }
+
+ this.delegateEvents();
+
+ return this;
+ },
+
+ /**
+ Saves the value of the selected option to the model attribute.
+ */
+ save: function (e) {
+ var model = this.model;
+ var column = this.column;
+ model.set(column.get("name"), this.formatter.toRaw(this.$el.val(), model));
+ },
+
+ /**
+ Triggers a `backgrid:edited` event from the model so the body can close
+ this editor.
+ */
+ close: function (e) {
+ var model = this.model;
+ var column = this.column;
+ var command = new Command(e);
+ if (command.cancel()) {
+ e.stopPropagation();
+ model.trigger("backgrid:edited", model, column, new Command(e));
+ }
+ else if (command.save() || command.moveLeft() || command.moveRight() ||
+ command.moveUp() || command.moveDown() || e.type == "blur") {
+ e.preventDefault();
+ e.stopPropagation();
+ this.save(e);
+ model.trigger("backgrid:edited", model, column, new Command(e));
+ }
+ }
+
+});
+
+/**
+ SelectCell is also a different kind of cell in that upon going into edit mode
+ the cell renders a list of options to pick from, as opposed to an input box.
+
+ SelectCell cannot be referenced by its string name when used in a column
+ definition because it requires an `optionValues` class attribute to be
+ defined. `optionValues` can either be a list of name-value pairs, to be
+ rendered as options, or a list of object hashes which consist of a key *name*
+ which is the option group name, and a key *values* which is a list of
+ name-value pairs to be rendered as options under that option group.
+
+ In addition, `optionValues` can also be a parameter-less function that
+ returns one of the above. If the options are static, it is recommended the
+ returned values to be memoized. `_.memoize()` is a good function to help with
+ that.
+
+ During display mode, the default formatter will normalize the raw model value
+ to an array of values whether the raw model value is a scalar or an
+ array. Each value is compared with the `optionValues` values using
+ Ecmascript's implicit type conversion rules. When exiting edit mode, no type
+ conversion is performed when saving into the model. This behavior is not
+ always desirable when the value type is anything other than string. To
+ control type conversion on the client-side, you should subclass SelectCell to
+ provide a custom formatter or provide the formatter to your column
+ definition.
+
+ See:
+ [$.fn.val()](http://api.jquery.com/val/)
+
+ @class Backgrid.SelectCell
+ @extends Backgrid.Cell
+*/
+var SelectCell = Backgrid.SelectCell = Cell.extend({
+
+ /** @property */
+ className: "select-cell",
+
+ /** @property */
+ editor: SelectCellEditor,
+
+ /** @property */
+ multiple: false,
+
+ /** @property */
+ formatter: SelectFormatter,
+
+ /**
+ @property {Array.<Array>|Array.<{name: string, values: Array.<Array>}>} optionValues
+ */
+ optionValues: undefined,
+
+ /** @property */
+ delimiter: ', ',
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Model} options.model
+ @param {Backgrid.Column} options.column
+
+ @throws {TypeError} If `optionsValues` is undefined.
+ */
+ initialize: function (options) {
+ SelectCell.__super__.initialize.apply(this, arguments);
+ this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) {
+ if (column.get("name") == this.column.get("name")) {
+ editor.setOptionValues(this.optionValues);
+ editor.setMultiple(this.multiple);
+ }
+ });
+ },
+
+ /**
+ Renders the label using the raw value as key to look up from `optionValues`.
+
+ @throws {TypeError} If `optionValues` is malformed.
+ */
+ render: function () {
+ this.$el.empty();
+
+ var optionValues = _.result(this, "optionValues");
+ var model = this.model;
+ var rawData = this.formatter.fromRaw(model.get(this.column.get("name")), model);
+
+ var selectedText = [];
+
+ try {
+ if (!_.isArray(optionValues) || _.isEmpty(optionValues)) throw new TypeError;
+
+ for (var k = 0; k < rawData.length; k++) {
+ var rawDatum = rawData[k];
+
+ for (var i = 0; i < optionValues.length; i++) {
+ var optionValue = optionValues[i];
+
+ if (_.isArray(optionValue)) {
+ var optionText = optionValue[0];
+ var optionValue = optionValue[1];
+
+ if (optionValue == rawDatum) selectedText.push(optionText);
+ }
+ else if (_.isObject(optionValue)) {
+ var optionGroupValues = optionValue.values;
+
+ for (var j = 0; j < optionGroupValues.length; j++) {
+ var optionGroupValue = optionGroupValues[j];
+ if (optionGroupValue[1] == rawDatum) {
+ selectedText.push(optionGroupValue[0]);
+ }
+ }
+ }
+ else {
+ throw new TypeError;
+ }
+ }
+ }
+
+ this.$el.append(selectedText.join(this.delimiter));
+ }
+ catch (ex) {
+ if (ex instanceof TypeError) {
+ throw new TypeError("'optionValues' must be of type {Array.<Array>|Array.<{name: string, values: Array.<Array>}>}");
+ }
+ throw ex;
+ }
+
+ this.delegateEvents();
+
+ return this;
+ }
+
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ A Column is a placeholder for column metadata.
+
+ You usually don't need to create an instance of this class yourself as a
+ collection of column instances will be created for you from a list of column
+ attributes in the Backgrid.js view class constructors.
+
+ @class Backgrid.Column
+ @extends Backbone.Model
+*/
+var Column = Backgrid.Column = Backbone.Model.extend({
+
+ /**
+ @cfg {Object} defaults Column defaults. To override any of these default
+ values, you can either change the prototype directly to override
+ Column.defaults globally or extend Column and supply the custom class to
+ Backgrid.Grid:
+
+ // Override Column defaults globally
+ Column.prototype.defaults.sortable = false;
+
+ // Override Column defaults locally
+ var MyColumn = Column.extend({
+ defaults: _.defaults({
+ editable: false
+ }, Column.prototype.defaults)
+ });
+
+ var grid = new Backgrid.Grid(columns: new Columns([{...}, {...}], {
+ model: MyColumn
+ }));
+
+ @cfg {string} [defaults.name] The default name of the model attribute.
+
+ @cfg {string} [defaults.label] The default label to show in the header.
+
+ @cfg {string|Backgrid.Cell} [defaults.cell] The default cell type. If this
+ is a string, the capitalized form will be used to look up a cell class in
+ Backbone, i.e.: string => StringCell. If a Cell subclass is supplied, it is
+ initialized with a hash of parameters. If a Cell instance is supplied, it
+ is used directly.
+
+ @cfg {string|Backgrid.HeaderCell} [defaults.headerCell] The default header
+ cell type.
+
+ @cfg {boolean|string|function(): boolean} [defaults.sortable=true] Whether
+ this column is sortable. If the value is a string, a method will the same
+ name will be looked up from the column instance to determine whether the
+ column should be sortable. The method's signature must be `function
+ (Backgrid.Column, Backbone.Model): boolean`.
+
+ @cfg {boolean|string|function(): boolean} [defaults.editable=true] Whether
+ this column is editable. If the value is a string, a method will the same
+ name will be looked up from the column instance to determine whether the
+ column should be editable. The method's signature must be `function
+ (Backgrid.Column, Backbone.Model): boolean`.
+
+ @cfg {boolean|string|function(): boolean} [defaults.renderable=true]
+ Whether this column is renderable. If the value is a string, a method will
+ the same name will be looked up from the column instance to determine
+ whether the column should be renderable. The method's signature must be
+ `function (Backrid.Column, Backbone.Model): boolean`.
+
+ @cfg {Backgrid.CellFormatter | Object | string} [defaults.formatter] The
+ formatter to use to convert between raw model values and user input.
+
+ @cfg {"toggle"|"cycle"} [defaults.sortType="cycle"] Whether sorting will
+ toggle between ascending and descending order, or cycle between insertion
+ order, ascending and descending order.
+
+ @cfg {(function(Backbone.Model, string): *) | string} [defaults.sortValue]
+ The function to use to extract a value from the model for comparison during
+ sorting. If this value is a string, a method with the same name will be
+ looked up from the column instance.
+
+ @cfg {"ascending"|"descending"|null} [defaults.direction=null] The initial
+ sorting direction for this column. The default is ordered by
+ Backbone.Model.cid, which usually means the collection is ordered by
+ insertion order.
+ */
+ defaults: {
+ name: undefined,
+ label: undefined,
+ sortable: true,
+ editable: true,
+ renderable: true,
+ formatter: undefined,
+ sortType: "cycle",
+ sortValue: undefined,
+ direction: null,
+ cell: undefined,
+ headerCell: undefined
+ },
+
+ /**
+ Initializes this Column instance.
+
+ @param {Object} attrs
+
+ @param {string} attrs.name The model attribute this column is responsible
+ for.
+
+ @param {string|Backgrid.Cell} attrs.cell The cell type to use to render
+ this column.
+
+ @param {string} [attrs.label]
+
+ @param {string|Backgrid.HeaderCell} [attrs.headerCell]
+
+ @param {boolean|string|function(): boolean} [attrs.sortable=true]
+
+ @param {boolean|string|function(): boolean} [attrs.editable=true]
+
+ @param {boolean|string|function(): boolean} [attrs.renderable=true]
+
+ @param {Backgrid.CellFormatter | Object | string} [attrs.formatter]
+
+ @param {"toggle"|"cycle"} [attrs.sortType="cycle"]
+
+ @param {(function(Backbone.Model, string): *) | string} [attrs.sortValue]
+
+ @throws {TypeError} If attrs.cell or attrs.options are not supplied.
+
+ @throws {ReferenceError} If formatter is a string but a formatter class of
+ said name cannot be found in the Backgrid module.
+
+ See:
+
+ - Backgrid.Column.defaults
+ - Backgrid.Cell
+ - Backgrid.CellFormatter
+ */
+ initialize: function () {
+ if (!this.has("label")) {
+ this.set({ label: this.get("name") }, { silent: true });
+ }
+
+ var headerCell = Backgrid.resolveNameToClass(this.get("headerCell"), "HeaderCell");
+
+ var cell = Backgrid.resolveNameToClass(this.get("cell"), "Cell");
+
+ this.set({cell: cell, headerCell: headerCell}, { silent: true });
+ },
+
+ /**
+ Returns an appropriate value extraction function from a model for sorting.
+
+ If the column model contains an attribute `sortValue`, if it is a string, a
+ method from the column instance identifified by the `sortValue` string is
+ returned. If it is a function, it it returned as is. If `sortValue` isn't
+ found from the column model's attributes, a default value extraction
+ function is returned which will compare according to the natural order of
+ the value's type.
+
+ @return {function(Backbone.Model, string): *}
+ */
+ sortValue: function () {
+ var sortValue = this.get("sortValue");
+ if (_.isString(sortValue)) return this[sortValue];
+ else if (_.isFunction(sortValue)) return sortValue;
+
+ return function (model, colName) {
+ return model.get(colName);
+ };
+ }
+
+ /**
+ @member Backgrid.Column
+ @protected
+ @method sortable
+ @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
+ */
+
+ /**
+ @member Backgrid.Column
+ @protected
+ @method editable
+ @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
+ */
+
+ /**
+ @member Backgrid.Column
+ @protected
+ @method renderable
+ @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
+ */
+});
+
+_.each(["sortable", "renderable", "editable"], function (key) {
+ Column.prototype[key] = function () {
+ var value = this.get(key);
+ if (_.isString(value)) return this[value];
+ else if (_.isFunction(value)) return value;
+
+ return !!value;
+ };
+});
+
+/**
+ A Backbone collection of Column instances.
+
+ @class Backgrid.Columns
+ @extends Backbone.Collection
+ */
+var Columns = Backgrid.Columns = Backbone.Collection.extend({
+
+ /**
+ @property {Backgrid.Column} model
+ */
+ model: Column
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ Row is a simple container view that takes a model instance and a list of
+ column metadata describing how each of the model's attribute is to be
+ rendered, and apply the appropriate cell to each attribute.
+
+ @class Backgrid.Row
+ @extends Backbone.View
+*/
+var Row = Backgrid.Row = Backbone.View.extend({
+
+ /** @property */
+ tagName: "tr",
+
+ /**
+ Initializes a row view instance.
+
+ @param {Object} options
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
+ @param {Backbone.Model} options.model The model instance to render.
+
+ @throws {TypeError} If options.columns or options.model is undefined.
+ */
+ initialize: function (options) {
+
+ var columns = this.columns = options.columns;
+ if (!(columns instanceof Backbone.Collection)) {
+ columns = this.columns = new Columns(columns);
+ }
+
+ var cells = this.cells = [];
+ for (var i = 0; i < columns.length; i++) {
+ cells.push(this.makeCell(columns.at(i), options));
+ }
+
+ this.listenTo(columns, "add", function (column, columns) {
+ var i = columns.indexOf(column);
+ var cell = this.makeCell(column, options);
+ cells.splice(i, 0, cell);
+
+ var $el = this.$el;
+ if (i === 0) {
+ $el.prepend(cell.render().$el);
+ }
+ else if (i === columns.length - 1) {
+ $el.append(cell.render().$el);
+ }
+ else {
+ $el.children().eq(i).before(cell.render().$el);
+ }
+ });
+
+ this.listenTo(columns, "remove", function (column, columns, opts) {
+ cells[opts.index].remove();
+ cells.splice(opts.index, 1);
+ });
+ },
+
+ /**
+ Factory method for making a cell. Used by #initialize internally. Override
+ this to provide an appropriate cell instance for a custom Row subclass.
+
+ @protected
+
+ @param {Backgrid.Column} column
+ @param {Object} options The options passed to #initialize.
+
+ @return {Backgrid.Cell}
+ */
+ makeCell: function (column) {
+ return new (column.get("cell"))({
+ column: column,
+ model: this.model
+ });
+ },
+
+ /**
+ Renders a row of cells for this row's model.
+ */
+ render: function () {
+ this.$el.empty();
+
+ var fragment = document.createDocumentFragment();
+ for (var i = 0; i < this.cells.length; i++) {
+ fragment.appendChild(this.cells[i].render().el);
+ }
+
+ this.el.appendChild(fragment);
+
+ this.delegateEvents();
+
+ return this;
+ },
+
+ /**
+ Clean up this row and its cells.
+
+ @chainable
+ */
+ remove: function () {
+ for (var i = 0; i < this.cells.length; i++) {
+ var cell = this.cells[i];
+ cell.remove.apply(cell, arguments);
+ }
+ return Backbone.View.prototype.remove.apply(this, arguments);
+ }
+
+});
+
+/**
+ EmptyRow is a simple container view that takes a list of column and render a
+ row with a single column.
+
+ @class Backgrid.EmptyRow
+ @extends Backbone.View
+*/
+var EmptyRow = Backgrid.EmptyRow = Backbone.View.extend({
+
+ /** @property */
+ tagName: "tr",
+
+ /** @property {string|function(): string} */
+ emptyText: null,
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {string|function(): string} options.emptyText
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
+ */
+ initialize: function (options) {
+ this.emptyText = options.emptyText;
+ this.columns = options.columns;
+ },
+
+ /**
+ Renders an empty row.
+ */
+ render: function () {
+ this.$el.empty();
+
+ var td = document.createElement("td");
+ td.setAttribute("colspan", this.columns.length);
+ td.appendChild(document.createTextNode(_.result(this, "emptyText")));
+
+ this.el.className = "empty";
+ this.el.appendChild(td);
+
+ return this;
+ }
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ HeaderCell is a special cell class that renders a column header cell. If the
+ column is sortable, a sorter is also rendered and will trigger a table
+ refresh after sorting.
+
+ @class Backgrid.HeaderCell
+ @extends Backbone.View
+ */
+var HeaderCell = Backgrid.HeaderCell = Backbone.View.extend({
+
+ /** @property */
+ tagName: "th",
+
+ /** @property */
+ events: {
+ "click a": "onClick"
+ },
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backgrid.Column|Object} options.column
+
+ @throws {TypeError} If options.column or options.collection is undefined.
+ */
+ initialize: function (options) {
+ this.column = options.column;
+ if (!(this.column instanceof Column)) {
+ this.column = new Column(this.column);
+ }
+
+ var column = this.column, collection = this.collection, $el = this.$el;
+
+ this.listenTo(column, "change:editable change:sortable change:renderable",
+ function (column) {
+ var changed = column.changedAttributes();
+ for (var key in changed) {
+ if (changed.hasOwnProperty(key)) {
+ $el.toggleClass(key, changed[key]);
+ }
+ }
+ });
+ this.listenTo(column, "change:direction", this.setCellDirection);
+ this.listenTo(column, "change:name change:label", this.render);
+
+ if (Backgrid.callByNeed(column.editable(), column, collection)) $el.addClass("editable");
+ if (Backgrid.callByNeed(column.sortable(), column, collection)) $el.addClass("sortable");
+ if (Backgrid.callByNeed(column.renderable(), column, collection)) $el.addClass("renderable");
+
+ this.listenTo(collection.fullCollection || collection, "sort", this.removeCellDirection);
+ },
+
+ /**
+ Event handler for the collection's `sort` event. Removes all the CSS
+ direction classes.
+ */
+ removeCellDirection: function () {
+ this.$el.removeClass("ascending").removeClass("descending");
+ this.column.set("direction", null);
+ },
+
+ /**
+ Event handler for the column's `change:direction` event. If this
+ HeaderCell's column is being sorted on, it applies the direction given as a
+ CSS class to the header cell. Removes all the CSS direction classes
+ otherwise.
+ */
+ setCellDirection: function (column, direction) {
+ this.$el.removeClass("ascending").removeClass("descending");
+ if (column.cid == this.column.cid) this.$el.addClass(direction);
+ },
+
+ /**
+ Event handler for the `click` event on the cell's anchor. If the column is
+ sortable, clicking on the anchor will cycle through 3 sorting orderings -
+ `ascending`, `descending`, and default.
+ */
+ onClick: function (e) {
+ e.preventDefault();
+
+ var column = this.column;
+ var collection = this.collection;
+ var event = "backgrid:sort";
+
+ function cycleSort(header, col) {
+ if (column.get("direction") === "ascending") collection.trigger(event, col, "descending");
+ else if (column.get("direction") === "descending") collection.trigger(event, col, null);
+ else collection.trigger(event, col, "ascending");
+ }
+
+ function toggleSort(header, col) {
+ if (column.get("direction") === "ascending") collection.trigger(event, col, "descending");
+ else collection.trigger(event, col, "ascending");
+ }
+
+ var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
+ if (sortable) {
+ var sortType = column.get("sortType");
+ if (sortType === "toggle") toggleSort(this, column);
+ else cycleSort(this, column);
+ }
+ },
+
+ /**
+ Renders a header cell with a sorter, a label, and a class name for this
+ column.
+ */
+ render: function () {
+ this.$el.empty();
+ var column = this.column;
+ var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
+ var label;
+ if(sortable){
+ label = $("<a>").text(column.get("label")).append("<b class='sort-caret'></b>");
+ } else {
+ label = document.createTextNode(column.get("label"));
+ }
+
+ this.$el.append(label);
+ this.$el.addClass(column.get("name"));
+ this.$el.addClass(column.get("direction"));
+ this.delegateEvents();
+ return this;
+ }
+
+});
+
+/**
+ HeaderRow is a controller for a row of header cells.
+
+ @class Backgrid.HeaderRow
+ @extends Backgrid.Row
+ */
+var HeaderRow = Backgrid.HeaderRow = Backgrid.Row.extend({
+
+ requiredOptions: ["columns", "collection"],
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
+ @param {Backgrid.HeaderCell} [options.headerCell] Customized default
+ HeaderCell for all the columns. Supply a HeaderCell class or instance to a
+ the `headerCell` key in a column definition for column-specific header
+ rendering.
+
+ @throws {TypeError} If options.columns or options.collection is undefined.
+ */
+ initialize: function () {
+ Backgrid.Row.prototype.initialize.apply(this, arguments);
+ },
+
+ makeCell: function (column, options) {
+ var headerCell = column.get("headerCell") || options.headerCell || HeaderCell;
+ headerCell = new headerCell({
+ column: column,
+ collection: this.collection
+ });
+ return headerCell;
+ }
+
+});
+
+/**
+ Header is a special structural view class that renders a table head with a
+ single row of header cells.
+
+ @class Backgrid.Header
+ @extends Backbone.View
+ */
+var Header = Backgrid.Header = Backbone.View.extend({
+
+ /** @property */
+ tagName: "thead",
+
+ /**
+ Initializer. Initializes this table head view to contain a single header
+ row view.
+
+ @param {Object} options
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
+ @param {Backbone.Model} options.model The model instance to render.
+
+ @throws {TypeError} If options.columns or options.model is undefined.
+ */
+ initialize: function (options) {
+ this.columns = options.columns;
+ if (!(this.columns instanceof Backbone.Collection)) {
+ this.columns = new Columns(this.columns);
+ }
+
+ this.row = new Backgrid.HeaderRow({
+ columns: this.columns,
+ collection: this.collection
+ });
+ },
+
+ /**
+ Renders this table head with a single row of header cells.
+ */
+ render: function () {
+ this.$el.append(this.row.render().$el);
+ this.delegateEvents();
+ return this;
+ },
+
+ /**
+ Clean up this header and its row.
+
+ @chainable
+ */
+ remove: function () {
+ this.row.remove.apply(this.row, arguments);
+ return Backbone.View.prototype.remove.apply(this, arguments);
+ }
+
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ Body is the table body which contains the rows inside a table. Body is
+ responsible for refreshing the rows after sorting, insertion and removal.
+
+ @class Backgrid.Body
+ @extends Backbone.View
+*/
+var Body = Backgrid.Body = Backbone.View.extend({
+
+ /** @property */
+ tagName: "tbody",
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Collection} options.collection
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
+ Column metadata.
+ @param {Backgrid.Row} [options.row=Backgrid.Row] The Row class to use.
+ @param {string|function(): string} [options.emptyText] The text to display in the empty row.
+
+ @throws {TypeError} If options.columns or options.collection is undefined.
+
+ See Backgrid.Row.
+ */
+ initialize: function (options) {
+
+ this.columns = options.columns;
+ if (!(this.columns instanceof Backbone.Collection)) {
+ this.columns = new Columns(this.columns);
+ }
+
+ this.row = options.row || Row;
+ this.rows = this.collection.map(function (model) {
+ var row = new this.row({
+ columns: this.columns,
+ model: model
+ });
+
+ return row;
+ }, this);
+
+ this.emptyText = options.emptyText;
+ this._unshiftEmptyRowMayBe();
+
+ var collection = this.collection;
+ this.listenTo(collection, "add", this.insertRow);
+ this.listenTo(collection, "remove", this.removeRow);
+ this.listenTo(collection, "sort", this.refresh);
+ this.listenTo(collection, "reset", this.refresh);
+ this.listenTo(collection, "backgrid:sort", this.sort);
+ this.listenTo(collection, "backgrid:edited", this.moveToNextCell);
+ },
+
+ _unshiftEmptyRowMayBe: function () {
+ if (this.rows.length === 0 && this.emptyText != null) {
+ this.rows.unshift(new EmptyRow({
+ emptyText: this.emptyText,
+ columns: this.columns
+ }));
+ }
+ },
+
+ /**
+ This method can be called either directly or as a callback to a
+ [Backbone.Collecton#add](http://backbonejs.org/#Collection-add) event.
+
+ When called directly, it accepts a model or an array of models and an
+ option hash just like
+ [Backbone.Collection#add](http://backbonejs.org/#Collection-add) and
+ delegates to it. Once the model is added, a new row is inserted into the
+ body and automatically rendered.
+
+ When called as a callback of an `add` event, splices a new row into the
+ body and renders it.
+
+ @param {Backbone.Model} model The model to render as a row.
+ @param {Backbone.Collection} collection When called directly, this
+ parameter is actually the options to
+ [Backbone.Collection#add](http://backbonejs.org/#Collection-add).
+ @param {Object} options When called directly, this must be null.
+
+ See:
+
+ - [Backbone.Collection#add](http://backbonejs.org/#Collection-add)
+ */
+ insertRow: function (model, collection, options) {
+
+ if (this.rows[0] instanceof EmptyRow) this.rows.pop().remove();
+
+ // insertRow() is called directly
+ if (!(collection instanceof Backbone.Collection) && !options) {
+ this.collection.add(model, (options = collection));
+ return;
+ }
+
+ var row = new this.row({
+ columns: this.columns,
+ model: model
+ });
+
+ var index = collection.indexOf(model);
+ this.rows.splice(index, 0, row);
+
+ var $el = this.$el;
+ var $children = $el.children();
+ var $rowEl = row.render().$el;
+
+ if (index >= $children.length) {
+ $el.append($rowEl);
+ }
+ else {
+ $children.eq(index).before($rowEl);
+ }
+
+ return this;
+ },
+
+ /**
+ The method can be called either directly or as a callback to a
+ [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)
+ event.
+
+ When called directly, it accepts a model or an array of models and an
+ option hash just like
+ [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove) and
+ delegates to it. Once the model is removed, a corresponding row is removed
+ from the body.
+
+ When called as a callback of a `remove` event, splices into the rows and
+ removes the row responsible for rendering the model.
+
+ @param {Backbone.Model} model The model to remove from the body.
+ @param {Backbone.Collection} collection When called directly, this
+ parameter is actually the options to
+ [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove).
+ @param {Object} options When called directly, this must be null.
+
+ See:
+
+ - [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)
+ */
+ removeRow: function (model, collection, options) {
+
+ // removeRow() is called directly
+ if (!options) {
+ this.collection.remove(model, (options = collection));
+ this._unshiftEmptyRowMayBe();
+ return;
+ }
+
+ if (_.isUndefined(options.render) || options.render) {
+ this.rows[options.index].remove();
+ }
+
+ this.rows.splice(options.index, 1);
+ this._unshiftEmptyRowMayBe();
+
+ return this;
+ },
+
+ /**
+ Reinitialize all the rows inside the body and re-render them. Triggers a
+ Backbone `backgrid:refresh` event from the collection along with the body
+ instance as its sole parameter when done.
+ */
+ refresh: function () {
+ for (var i = 0; i < this.rows.length; i++) {
+ this.rows[i].remove();
+ }
+
+ this.rows = this.collection.map(function (model) {
+ var row = new this.row({
+ columns: this.columns,
+ model: model
+ });
+
+ return row;
+ }, this);
+ this._unshiftEmptyRowMayBe();
+
+ this.render();
+
+ this.collection.trigger("backgrid:refresh", this);
+
+ return this;
+ },
+
+ /**
+ Renders all the rows inside this body. If the collection is empty and
+ `options.emptyText` is defined and not null in the constructor, an empty
+ row is rendered, otherwise no row is rendered.
+ */
+ render: function () {
+ this.$el.empty();
+
+ var fragment = document.createDocumentFragment();
+ for (var i = 0; i < this.rows.length; i++) {
+ var row = this.rows[i];
+ fragment.appendChild(row.render().el);
+ }
+
+ this.el.appendChild(fragment);
+
+ this.delegateEvents();
+
+ return this;
+ },
+
+ /**
+ Clean up this body and it's rows.
+
+ @chainable
+ */
+ remove: function () {
+ for (var i = 0; i < this.rows.length; i++) {
+ var row = this.rows[i];
+ row.remove.apply(row, arguments);
+ }
+ return Backbone.View.prototype.remove.apply(this, arguments);
+ },
+
+ /**
+ If the underlying collection is a Backbone.PageableCollection in
+ server-mode or infinite-mode, a page of models is fetched after sorting is
+ done on the server.
+
+ If the underlying collection is a Backbone.PageableCollection in
+ client-mode, or any
+ [Backbone.Collection](http://backbonejs.org/#Collection) instance, sorting
+ is done on the client side. If the collection is an instance of a
+ Backbone.PageableCollection, sorting will be done globally on all the pages
+ and the current page will then be returned.
+
+ Triggers a Backbone `backgrid:sorted` event from the collection when done
+ with the column, direction and a reference to the collection.
+
+ @param {Backgrid.Column} column
+ @param {null|"ascending"|"descending"} direction
+
+ See [Backbone.Collection#comparator](http://backbonejs.org/#Collection-comparator)
+ */
+ sort: function (column, direction) {
+
+ if (!_.contains(["ascending", "descending", null], direction)) {
+ throw new RangeError('direction must be one of "ascending", "descending" or `null`');
+ }
+
+ if (_.isString(column)) column = this.columns.findWhere({name: column});
+
+ var collection = this.collection;
+
+ var order;
+ if (direction === "ascending") order = -1;
+ else if (direction === "descending") order = 1;
+ else order = null;
+
+ var comparator = this.makeComparator(column.get("name"), order,
+ order ?
+ column.sortValue() :
+ function (model) {
+ return model.cid.replace('c', '') * 1;
+ });
+
+ if (Backbone.PageableCollection &&
+ collection instanceof Backbone.PageableCollection) {
+
+ collection.setSorting(order && column.get("name"), order,
+ {sortValue: column.sortValue()});
+
+ if (collection.fullCollection) {
+ // If order is null, pageable will remove the comparator on both sides,
+ // in this case the default insertion order comparator needs to be
+ // attached to get back to the order before sorting.
+ if (collection.fullCollection.comparator == null) {
+ collection.fullCollection.comparator = comparator;
+ }
+ collection.fullCollection.sort();
+ collection.trigger("backgrid:sorted", column, direction, collection);
+ }
+ else collection.fetch({reset: true, success: function () {
+ collection.trigger("backgrid:sorted", column, direction, collection);
+ }});
+ }
+ else {
+ collection.comparator = comparator;
+ collection.sort();
+ collection.trigger("backgrid:sorted", column, direction, collection);
+ }
+
+ column.set("direction", direction);
+
+ return this;
+ },
+
+ makeComparator: function (attr, order, func) {
+
+ return function (left, right) {
+ // extract the values from the models
+ var l = func(left, attr), r = func(right, attr), t;
+
+ // if descending order, swap left and right
+ if (order === 1) t = l, l = r, r = t;
+
+ // compare as usual
+ if (l === r) return 0;
+ else if (l < r) return -1;
+ return 1;
+ };
+ },
+
+ /**
+ Moves focus to the next renderable and editable cell and return the
+ currently editing cell to display mode.
+
+ Triggers a `backgrid:next` event on the model with the indices of the row
+ and column the user *intended* to move to, and whether the intended move
+ was going to go out of bounds. Note that *out of bound* always means an
+ attempt to go past the end of the last row.
+
+ @param {Backbone.Model} model The originating model
+ @param {Backgrid.Column} column The originating model column
+ @param {Backgrid.Command} command The Command object constructed from a DOM
+ event
+ */
+ moveToNextCell: function (model, column, command) {
+ var i = this.collection.indexOf(model);
+ var j = this.columns.indexOf(column);
+ var cell, renderable, editable, m, n;
+
+ this.rows[i].cells[j].exitEditMode();
+
+ if (command.moveUp() || command.moveDown() || command.moveLeft() ||
+ command.moveRight() || command.save()) {
+ var l = this.columns.length;
+ var maxOffset = l * this.collection.length;
+
+ if (command.moveUp() || command.moveDown()) {
+ m = i + (command.moveUp() ? -1 : 1);
+ var row = this.rows[m];
+ if (row) {
+ cell = row.cells[j];
+ if (Backgrid.callByNeed(cell.column.editable(), cell.column, model)) {
+ cell.enterEditMode();
+ model.trigger("backgrid:next", m, j, false);
+ }
+ }
+ else model.trigger("backgrid:next", m, j, true);
+ }
+ else if (command.moveLeft() || command.moveRight()) {
+ var right = command.moveRight();
+ for (var offset = i * l + j + (right ? 1 : -1);
+ offset >= 0 && offset < maxOffset;
+ right ? offset++ : offset--) {
+ m = ~~(offset / l);
+ n = offset - m * l;
+ cell = this.rows[m].cells[n];
+ renderable = Backgrid.callByNeed(cell.column.renderable(), cell.column, cell.model);
+ editable = Backgrid.callByNeed(cell.column.editable(), cell.column, model);
+ if (renderable && editable) {
+ cell.enterEditMode();
+ model.trigger("backgrid:next", m, n, false);
+ break;
+ }
+ }
+
+ if (offset == maxOffset) {
+ model.trigger("backgrid:next", ~~(offset / l), offset - m * l, true);
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ A Footer is a generic class that only defines a default tag `tfoot` and
+ number of required parameters in the initializer.
+
+ @abstract
+ @class Backgrid.Footer
+ @extends Backbone.View
+ */
+var Footer = Backgrid.Footer = Backbone.View.extend({
+
+ /** @property */
+ tagName: "tfoot",
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
+ Column metadata.
+ @param {Backbone.Collection} options.collection
+
+ @throws {TypeError} If options.columns or options.collection is undefined.
+ */
+ initialize: function (options) {
+ this.columns = options.columns;
+ if (!(this.columns instanceof Backbone.Collection)) {
+ this.columns = new Backgrid.Columns(this.columns);
+ }
+ }
+
+});
+
+/*
+ backgrid
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT license.
+*/
+
+/**
+ Grid represents a data grid that has a header, body and an optional footer.
+
+ By default, a Grid treats each model in a collection as a row, and each
+ attribute in a model as a column. To render a grid you must provide a list of
+ column metadata and a collection to the Grid constructor. Just like any
+ Backbone.View class, the grid is rendered as a DOM node fragment when you
+ call render().
+
+ var grid = Backgrid.Grid({
+ columns: [{ name: "id", label: "ID", type: "string" },
+ // ...
+ ],
+ collections: books
+ });
+
+ $("#table-container").append(grid.render().el);
+
+ Optionally, if you want to customize the rendering of the grid's header and
+ footer, you may choose to extend Backgrid.Header and Backgrid.Footer, and
+ then supply that class or an instance of that class to the Grid constructor.
+ See the documentation for Header and Footer for further details.
+
+ var grid = Backgrid.Grid({
+ columns: [{ name: "id", label: "ID", type: "string" }],
+ collections: books,
+ header: Backgrid.Header.extend({
+ //...
+ }),
+ footer: Backgrid.Paginator
+ });
+
+ Finally, if you want to override how the rows are rendered in the table body,
+ you can supply a Body subclass as the `body` attribute that uses a different
+ Row class.
+
+ @class Backgrid.Grid
+ @extends Backbone.View
+
+ See:
+
+ - Backgrid.Column
+ - Backgrid.Header
+ - Backgrid.Body
+ - Backgrid.Row
+ - Backgrid.Footer
+*/
+var Grid = Backgrid.Grid = Backbone.View.extend({
+
+ /** @property */
+ tagName: "table",
+
+ /** @property */
+ className: "backgrid",
+
+ /** @property */
+ header: Header,
+
+ /** @property */
+ body: Body,
+
+ /** @property */
+ footer: null,
+
+ /**
+ Initializes a Grid instance.
+
+ @param {Object} options
+ @param {Backbone.Collection.<Backgrid.Columns>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
+ @param {Backbone.Collection} options.collection The collection of tabular model data to display.
+ @param {Backgrid.Header} [options.header=Backgrid.Header] An optional Header class to override the default.
+ @param {Backgrid.Body} [options.body=Backgrid.Body] An optional Body class to override the default.
+ @param {Backgrid.Row} [options.row=Backgrid.Row] An optional Row class to override the default.
+ @param {Backgrid.Footer} [options.footer=Backgrid.Footer] An optional Footer class.
+ */
+ initialize: function (options) {
+ // Convert the list of column objects here first so the subviews don't have
+ // to.
+ if (!(options.columns instanceof Backbone.Collection)) {
+ options.columns = new Columns(options.columns);
+ }
+ this.columns = options.columns;
+
+ var filteredOptions = _.omit(options, ["el", "id", "attributes",
+ "className", "tagName", "events"]);
+
+ // must construct body first so it listens to backgrid:sort first
+ this.body = options.body || this.body;
+ this.body = new this.body(filteredOptions);
+
+ this.header = options.header || this.header;
+ if (this.header) {
+ this.header = new this.header(filteredOptions);
+ }
+
+ this.footer = options.footer || this.footer;
+ if (this.footer) {
+ this.footer = new this.footer(filteredOptions);
+ }
+
+ this.listenTo(this.columns, "reset", function () {
+ if (this.header) {
+ this.header = new (this.header.remove().constructor)(filteredOptions);
+ }
+ this.body = new (this.body.remove().constructor)(filteredOptions);
+ if (this.footer) {
+ this.footer = new (this.footer.remove().constructor)(filteredOptions);
+ }
+ this.render();
+ });
+ },
+
+ /**
+ Delegates to Backgrid.Body#insertRow.
+ */
+ insertRow: function () {
+ this.body.insertRow.apply(this.body, arguments);
+ return this;
+ },
+
+ /**
+ Delegates to Backgrid.Body#removeRow.
+ */
+ removeRow: function () {
+ this.body.removeRow.apply(this.body, arguments);
+ return this;
+ },
+
+ /**
+ Delegates to Backgrid.Columns#add for adding a column. Subviews can listen
+ to the `add` event from their internal `columns` if rerendering needs to
+ happen.
+
+ @param {Object} [options] Options for `Backgrid.Columns#add`.
+ */
+ insertColumn: function () {
+ this.columns.add.apply(this.columns, arguments);
+ return this;
+ },
+
+ /**
+ Delegates to Backgrid.Columns#remove for removing a column. Subviews can
+ listen to the `remove` event from the internal `columns` if rerendering
+ needs to happen.
+
+ @param {Object} [options] Options for `Backgrid.Columns#remove`.
+ */
+ removeColumn: function () {
+ this.columns.remove.apply(this.columns, arguments);
+ return this;
+ },
+
+ /**
+ Delegates to Backgrid.Body#sort.
+ */
+ sort: function () {
+ this.body.sort.apply(this.body, arguments);
+ return this;
+ },
+
+ /**
+ Renders the grid's header, then footer, then finally the body. Triggers a
+ Backbone `backgrid:rendered` event along with a reference to the grid when
+ the it has successfully been rendered.
+ */
+ render: function () {
+ this.$el.empty();
+
+ if (this.header) {
+ this.$el.append(this.header.render().$el);
+ }
+
+ if (this.footer) {
+ this.$el.append(this.footer.render().$el);
+ }
+
+ this.$el.append(this.body.render().$el);
+
+ this.delegateEvents();
+
+ this.trigger("backgrid:rendered", this);
+
+ return this;
+ },
+
+ /**
+ Clean up this grid and its subviews.
+
+ @chainable
+ */
+ remove: function () {
+ this.header && this.header.remove.apply(this.header, arguments);
+ this.body.remove.apply(this.body, arguments);
+ this.footer && this.footer.remove.apply(this.footer, arguments);
+ return Backbone.View.prototype.remove.apply(this, arguments);
+ }
+
+});
+return Backgrid;
+}));
\ No newline at end of file
[16/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
new file mode 100644
index 0000000..a02f6ba
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labe
ls.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA,6DAA4D;ACQ5D;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EDND;ACaD;EACE,WAAA;EDXD;ACwBD;;;;;;;;;;;;;EAaE,gBAAA;EDtBD;AC8BD;;;;EAIE,uBAAA;EACA,0BAAA;ED5BD;ACoCD;EACE,eAAA;EACA,WAAA;EDlCD;AC0CD;;EAEE,eAAA;EDxCD;ACkDD;EACE,+BAAA;EDhDD;ACuDD;;EAEE,YAAA;EDrDD;AC+DD;EACE,2BAAA;ED7DD;ACoED;;EAEE,mBAAA;EDlED;ACyED;EACE,oBAAA;EDvE
D;AC+ED;EACE,gBAAA;EACA,kBAAA;ED7ED;ACoFD;EACE,kBAAA;EACA,aAAA;EDlFD;ACyFD;EACE,gBAAA;EDvFD;AC8FD;;EAEE,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,0BAAA;ED5FD;AC+FD;EACE,aAAA;ED7FD;ACgGD;EACE,iBAAA;ED9FD;ACwGD;EACE,WAAA;EDtGD;AC6GD;EACE,kBAAA;ED3GD;ACqHD;EACE,kBAAA;EDnHD;AC0HD;EACE,8BAAA;EACA,iCAAA;UAAA,yBAAA;EACA,WAAA;EDxHD;AC+HD;EACE,gBAAA;ED7HD;ACoID;;;;EAIE,mCAAA;E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I,4BAAA;I/D88LD;EACF;A+D58LD;EACE,0BAAA;E/D88LD;A+Dz8LD;EAAA;IAFI,kCAAA;I/D+8LD;EACF;A+Dx8LD;EAAA;ICpLE,0BAAA;IhEgoMC;EACF","file":"bootstrap.css","sourcesContent":["/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-
size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n -moz-box-s
izing: content-box;\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n -moz-box-sizing
: content-box;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n
a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n select {\n background: #fff !important;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot')
;\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\2a\";\n}\n.glyphicon-plus:before {\n content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.gly
phicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before
{\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volum
e-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}
\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n conte
nt: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\
n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111
\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\
e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e1
45\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n
content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.gl
yphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}
\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #ffffff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertica
l-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;
\n margin: 0;\n overflow: visible;\n clip: auto;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .sm
all,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary
{\n color: #337ab7;\n}\na.text-primary:hover {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n borde
r-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n paddi
ng: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-r
ight small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #ffffff;\n background-color: #333333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\
n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-l
g-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n rig
ht: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n
left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9
{\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n
.col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }
\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;
\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n
}\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-lef
t: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right
: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-le
ft: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.tab
le > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #dddddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n.table .table {\n background-color: #ffffff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-border
ed {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n bo
<TRUNCATED>
[10/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/backbone.paginator-2.0.2.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/backbone.paginator-2.0.2.js b/htrace-htraced/src/web/lib/js/backbone.paginator-2.0.2.js
new file mode 100644
index 0000000..d8ccc65
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/backbone.paginator-2.0.2.js
@@ -0,0 +1,1325 @@
+/*
+ backbone.paginator 2.0.0
+ http://github.com/backbone-paginator/backbone.paginator
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT @license.
+*/
+
+(function (factory) {
+
+ // CommonJS
+ if (typeof exports == "object") {
+ module.exports = factory(require("underscore"), require("backbone"));
+ }
+ // AMD
+ else if (typeof define == "function" && define.amd) {
+ define(["underscore", "backbone"], factory);
+ }
+ // Browser
+ else if (typeof _ !== "undefined" && typeof Backbone !== "undefined") {
+ var oldPageableCollection = Backbone.PageableCollection;
+ var PageableCollection = factory(_, Backbone);
+
+ /**
+ __BROWSER ONLY__
+
+ If you already have an object named `PageableCollection` attached to the
+ `Backbone` module, you can use this to return a local reference to this
+ Backbone.PageableCollection class and reset the name
+ Backbone.PageableCollection to its previous definition.
+
+ // The left hand side gives you a reference to this
+ // Backbone.PageableCollection implementation, the right hand side
+ // resets Backbone.PageableCollection to your other
+ // Backbone.PageableCollection.
+ var PageableCollection = Backbone.PageableCollection.noConflict();
+
+ @static
+ @member Backbone.PageableCollection
+ @return {Backbone.PageableCollection}
+ */
+ Backbone.PageableCollection.noConflict = function () {
+ Backbone.PageableCollection = oldPageableCollection;
+ return PageableCollection;
+ };
+ }
+
+}(function (_, Backbone) {
+
+ "use strict";
+
+ var _extend = _.extend;
+ var _omit = _.omit;
+ var _clone = _.clone;
+ var _each = _.each;
+ var _pick = _.pick;
+ var _contains = _.contains;
+ var _isEmpty = _.isEmpty;
+ var _pairs = _.pairs;
+ var _invert = _.invert;
+ var _isArray = _.isArray;
+ var _isFunction = _.isFunction;
+ var _isObject = _.isObject;
+ var _keys = _.keys;
+ var _isUndefined = _.isUndefined;
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ var max = Math.max;
+
+ var BBColProto = Backbone.Collection.prototype;
+
+ function finiteInt (val, name) {
+ if (!_.isNumber(val) || _.isNaN(val) || !_.isFinite(val) || ~~val !== val) {
+ throw new TypeError("`" + name + "` must be a finite integer");
+ }
+ return val;
+ }
+
+ function queryStringToParams (qs) {
+ var kvp, k, v, ls, params = {}, decode = decodeURIComponent;
+ var kvps = qs.split('&');
+ for (var i = 0, l = kvps.length; i < l; i++) {
+ var param = kvps[i];
+ kvp = param.split('='), k = kvp[0], v = kvp[1] || true;
+ k = decode(k), v = decode(v), ls = params[k];
+ if (_isArray(ls)) ls.push(v);
+ else if (ls) params[k] = [ls, v];
+ else params[k] = v;
+ }
+ return params;
+ }
+
+ // hack to make sure the whatever event handlers for this event is run
+ // before func is, and the event handlers that func will trigger.
+ function runOnceAtLastHandler (col, event, func) {
+ var eventHandlers = col._events[event];
+ if (eventHandlers && eventHandlers.length) {
+ var lastHandler = eventHandlers[eventHandlers.length - 1];
+ var oldCallback = lastHandler.callback;
+ lastHandler.callback = function () {
+ try {
+ oldCallback.apply(this, arguments);
+ func();
+ }
+ catch (e) {
+ throw e;
+ }
+ finally {
+ lastHandler.callback = oldCallback;
+ }
+ };
+ }
+ else func();
+ }
+
+ var PARAM_TRIM_RE = /[\s'"]/g;
+ var URL_TRIM_RE = /[<>\s'"]/g;
+
+ /**
+ Drop-in replacement for Backbone.Collection. Supports server-side and
+ client-side pagination and sorting. Client-side mode also support fully
+ multi-directional synchronization of changes between pages.
+
+ @class Backbone.PageableCollection
+ @extends Backbone.Collection
+ */
+ var PageableCollection = Backbone.PageableCollection = Backbone.Collection.extend({
+
+ /**
+ The container object to store all pagination states.
+
+ You can override the default state by extending this class or specifying
+ them in an `options` hash to the constructor.
+
+ @property {Object} state
+
+ @property {0|1} [state.firstPage=1] The first page index. Set to 0 if
+ your server API uses 0-based indices. You should only override this value
+ during extension, initialization or reset by the server after
+ fetching. This value should be read only at other times.
+
+ @property {number} [state.lastPage=null] The last page index. This value
+ is __read only__ and it's calculated based on whether `firstPage` is 0 or
+ 1, during bootstrapping, fetching and resetting. Please don't change this
+ value under any circumstances.
+
+ @property {number} [state.currentPage=null] The current page index. You
+ should only override this value during extension, initialization or reset
+ by the server after fetching. This value should be read only at other
+ times. Can be a 0-based or 1-based index, depending on whether
+ `firstPage` is 0 or 1. If left as default, it will be set to `firstPage`
+ on initialization.
+
+ @property {number} [state.pageSize=25] How many records to show per
+ page. This value is __read only__ after initialization, if you want to
+ change the page size after initialization, you must call #setPageSize.
+
+ @property {number} [state.totalPages=null] How many pages there are. This
+ value is __read only__ and it is calculated from `totalRecords`.
+
+ @property {number} [state.totalRecords=null] How many records there
+ are. This value is __required__ under server mode. This value is optional
+ for client mode as the number will be the same as the number of models
+ during bootstrapping and during fetching, either supplied by the server
+ in the metadata, or calculated from the size of the response.
+
+ @property {string} [state.sortKey=null] The model attribute to use for
+ sorting.
+
+ @property {-1|0|1} [state.order=-1] The order to use for sorting. Specify
+ -1 for ascending order or 1 for descending order. If 0, no client side
+ sorting will be done and the order query parameter will not be sent to
+ the server during a fetch.
+ */
+ state: {
+ firstPage: 1,
+ lastPage: null,
+ currentPage: null,
+ pageSize: 25,
+ totalPages: null,
+ totalRecords: null,
+ sortKey: null,
+ order: -1
+ },
+
+ /**
+ @property {"server"|"client"|"infinite"} [mode="server"] The mode of
+ operations for this collection. `"server"` paginates on the server-side,
+ `"client"` paginates on the client-side and `"infinite"` paginates on the
+ server-side for APIs that do not support `totalRecords`.
+ */
+ mode: "server",
+
+ /**
+ A translation map to convert Backbone.PageableCollection state attributes
+ to the query parameters accepted by your server API.
+
+ You can override the default state by extending this class or specifying
+ them in `options.queryParams` object hash to the constructor.
+
+ @property {Object} queryParams
+ @property {string} [queryParams.currentPage="page"]
+ @property {string} [queryParams.pageSize="per_page"]
+ @property {string} [queryParams.totalPages="total_pages"]
+ @property {string} [queryParams.totalRecords="total_entries"]
+ @property {string} [queryParams.sortKey="sort_by"]
+ @property {string} [queryParams.order="order"]
+ @property {string} [queryParams.directions={"-1": "asc", "1": "desc"}] A
+ map for translating a Backbone.PageableCollection#state.order constant to
+ the ones your server API accepts.
+ */
+ queryParams: {
+ currentPage: "page",
+ pageSize: "per_page",
+ totalPages: "total_pages",
+ totalRecords: "total_entries",
+ sortKey: "sort_by",
+ order: "order",
+ directions: {
+ "-1": "asc",
+ "1": "desc"
+ }
+ },
+
+ /**
+ __CLIENT MODE ONLY__
+
+ This collection is the internal storage for the bootstrapped or fetched
+ models. You can use this if you want to operate on all the pages.
+
+ @property {Backbone.Collection} fullCollection
+ */
+
+ /**
+ Given a list of models or model attributues, bootstraps the full
+ collection in client mode or infinite mode, or just the page you want in
+ server mode.
+
+ If you want to initialize a collection to a different state than the
+ default, you can specify them in `options.state`. Any state parameters
+ supplied will be merged with the default. If you want to change the
+ default mapping from #state keys to your server API's query parameter
+ names, you can specifiy an object hash in `option.queryParams`. Likewise,
+ any mapping provided will be merged with the default. Lastly, all
+ Backbone.Collection constructor options are also accepted.
+
+ See:
+
+ - Backbone.PageableCollection#state
+ - Backbone.PageableCollection#queryParams
+ - [Backbone.Collection#initialize](http://backbonejs.org/#Collection-constructor)
+
+ @param {Array.<Object>} [models]
+
+ @param {Object} [options]
+
+ @param {function(*, *): number} [options.comparator] If specified, this
+ comparator is set to the current page under server mode, or the #fullCollection
+ otherwise.
+
+ @param {boolean} [options.full] If `false` and either a
+ `options.comparator` or `sortKey` is defined, the comparator is attached
+ to the current page. Default is `true` under client or infinite mode and
+ the comparator will be attached to the #fullCollection.
+
+ @param {Object} [options.state] The state attributes overriding the defaults.
+
+ @param {string} [options.state.sortKey] The model attribute to use for
+ sorting. If specified instead of `options.comparator`, a comparator will
+ be automatically created using this value, and optionally a sorting order
+ specified in `options.state.order`. The comparator is then attached to
+ the new collection instance.
+
+ @param {-1|1} [options.state.order] The order to use for sorting. Specify
+ -1 for ascending order and 1 for descending order.
+
+ @param {Object} [options.queryParam]
+ */
+ constructor: function (models, options) {
+
+ BBColProto.constructor.apply(this, arguments);
+
+ options = options || {};
+
+ var mode = this.mode = options.mode || this.mode || PageableProto.mode;
+
+ var queryParams = _extend({}, PageableProto.queryParams, this.queryParams,
+ options.queryParams || {});
+
+ queryParams.directions = _extend({},
+ PageableProto.queryParams.directions,
+ this.queryParams.directions,
+ queryParams.directions || {});
+
+ this.queryParams = queryParams;
+
+ var state = this.state = _extend({}, PageableProto.state, this.state,
+ options.state || {});
+
+ state.currentPage = state.currentPage == null ?
+ state.firstPage :
+ state.currentPage;
+
+ if (!_isArray(models)) models = models ? [models] : [];
+ models = models.slice();
+
+ if (mode != "server" && state.totalRecords == null && !_isEmpty(models)) {
+ state.totalRecords = models.length;
+ }
+
+ this.switchMode(mode, _extend({fetch: false,
+ resetState: false,
+ models: models}, options));
+
+ var comparator = options.comparator;
+
+ if (state.sortKey && !comparator) {
+ this.setSorting(state.sortKey, state.order, options);
+ }
+
+ if (mode != "server") {
+ var fullCollection = this.fullCollection;
+
+ if (comparator && options.full) {
+ this.comparator = null;
+ fullCollection.comparator = comparator;
+ }
+
+ if (options.full) fullCollection.sort();
+
+ // make sure the models in the current page and full collection have the
+ // same references
+ if (models && !_isEmpty(models)) {
+ this.reset(models, _extend({silent: true}, options));
+ this.getPage(state.currentPage);
+ models.splice.apply(models, [0, models.length].concat(this.models));
+ }
+ }
+
+ this._initState = _clone(this.state);
+ },
+
+ /**
+ Makes a Backbone.Collection that contains all the pages.
+
+ @private
+ @param {Array.<Object|Backbone.Model>} models
+ @param {Object} options Options for Backbone.Collection constructor.
+ @return {Backbone.Collection}
+ */
+ _makeFullCollection: function (models, options) {
+
+ var properties = ["url", "model", "sync", "comparator"];
+ var thisProto = this.constructor.prototype;
+ var i, length, prop;
+
+ var proto = {};
+ for (i = 0, length = properties.length; i < length; i++) {
+ prop = properties[i];
+ if (!_isUndefined(thisProto[prop])) {
+ proto[prop] = thisProto[prop];
+ }
+ }
+
+ var fullCollection = new (Backbone.Collection.extend(proto))(models, options);
+
+ for (i = 0, length = properties.length; i < length; i++) {
+ prop = properties[i];
+ if (this[prop] !== thisProto[prop]) {
+ fullCollection[prop] = this[prop];
+ }
+ }
+
+ return fullCollection;
+ },
+
+ /**
+ Factory method that returns a Backbone event handler that responses to
+ the `add`, `remove`, `reset`, and the `sort` events. The returned event
+ handler will synchronize the current page collection and the full
+ collection's models.
+
+ @private
+
+ @param {Backbone.PageableCollection} pageCol
+ @param {Backbone.Collection} fullCol
+
+ @return {function(string, Backbone.Model, Backbone.Collection, Object)}
+ Collection event handler
+ */
+ _makeCollectionEventHandler: function (pageCol, fullCol) {
+
+ return function collectionEventHandler (event, model, collection, options) {
+
+ var handlers = pageCol._handlers;
+ _each(_keys(handlers), function (event) {
+ var handler = handlers[event];
+ pageCol.off(event, handler);
+ fullCol.off(event, handler);
+ });
+
+ var state = _clone(pageCol.state);
+ var firstPage = state.firstPage;
+ var currentPage = firstPage === 0 ?
+ state.currentPage :
+ state.currentPage - 1;
+ var pageSize = state.pageSize;
+ var pageStart = currentPage * pageSize, pageEnd = pageStart + pageSize;
+
+ if (event == "add") {
+ var pageIndex, fullIndex, addAt, colToAdd, options = options || {};
+ if (collection == fullCol) {
+ fullIndex = fullCol.indexOf(model);
+ if (fullIndex >= pageStart && fullIndex < pageEnd) {
+ colToAdd = pageCol;
+ pageIndex = addAt = fullIndex - pageStart;
+ }
+ }
+ else {
+ pageIndex = pageCol.indexOf(model);
+ fullIndex = pageStart + pageIndex;
+ colToAdd = fullCol;
+ var addAt = !_isUndefined(options.at) ?
+ options.at + pageStart :
+ fullIndex;
+ }
+
+ if (!options.onRemove) {
+ ++state.totalRecords;
+ delete options.onRemove;
+ }
+
+ pageCol.state = pageCol._checkState(state);
+
+ if (colToAdd) {
+ colToAdd.add(model, _extend({}, options || {}, {at: addAt}));
+ var modelToRemove = pageIndex >= pageSize ?
+ model :
+ !_isUndefined(options.at) && addAt < pageEnd && pageCol.length > pageSize ?
+ pageCol.at(pageSize) :
+ null;
+ if (modelToRemove) {
+ runOnceAtLastHandler(collection, event, function () {
+ pageCol.remove(modelToRemove, {onAdd: true});
+ });
+ }
+ }
+ }
+
+ // remove the model from the other collection as well
+ if (event == "remove") {
+ if (!options.onAdd) {
+ // decrement totalRecords and update totalPages and lastPage
+ if (!--state.totalRecords) {
+ state.totalRecords = null;
+ state.totalPages = null;
+ }
+ else {
+ var totalPages = state.totalPages = ceil(state.totalRecords / pageSize);
+ state.lastPage = firstPage === 0 ? totalPages - 1 : totalPages || firstPage;
+ if (state.currentPage > totalPages) state.currentPage = state.lastPage;
+ }
+ pageCol.state = pageCol._checkState(state);
+
+ var nextModel, removedIndex = options.index;
+ if (collection == pageCol) {
+ if (nextModel = fullCol.at(pageEnd)) {
+ runOnceAtLastHandler(pageCol, event, function () {
+ pageCol.push(nextModel, {onRemove: true});
+ });
+ }
+ else if (!pageCol.length && state.totalRecords) {
+ pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),
+ _extend({}, options, {parse: false}));
+ }
+ fullCol.remove(model);
+ }
+ else if (removedIndex >= pageStart && removedIndex < pageEnd) {
+ if (nextModel = fullCol.at(pageEnd - 1)) {
+ runOnceAtLastHandler(pageCol, event, function() {
+ pageCol.push(nextModel, {onRemove: true});
+ });
+ }
+ pageCol.remove(model);
+ if (!pageCol.length && state.totalRecords) {
+ pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),
+ _extend({}, options, {parse: false}));
+ }
+ }
+ }
+ else delete options.onAdd;
+ }
+
+ if (event == "reset") {
+ options = collection;
+ collection = model;
+
+ // Reset that's not a result of getPage
+ if (collection == pageCol && options.from == null &&
+ options.to == null) {
+ var head = fullCol.models.slice(0, pageStart);
+ var tail = fullCol.models.slice(pageStart + pageCol.models.length);
+ fullCol.reset(head.concat(pageCol.models).concat(tail), options);
+ }
+ else if (collection == fullCol) {
+ if (!(state.totalRecords = fullCol.models.length)) {
+ state.totalRecords = null;
+ state.totalPages = null;
+ }
+ if (pageCol.mode == "client") {
+ state.lastPage = state.currentPage = state.firstPage;
+ }
+ pageCol.state = pageCol._checkState(state);
+ pageCol.reset(fullCol.models.slice(pageStart, pageEnd),
+ _extend({}, options, {parse: false}));
+ }
+ }
+
+ if (event == "sort") {
+ options = collection;
+ collection = model;
+ if (collection === fullCol) {
+ pageCol.reset(fullCol.models.slice(pageStart, pageEnd),
+ _extend({}, options, {parse: false}));
+ }
+ }
+
+ _each(_keys(handlers), function (event) {
+ var handler = handlers[event];
+ _each([pageCol, fullCol], function (col) {
+ col.on(event, handler);
+ var callbacks = col._events[event] || [];
+ callbacks.unshift(callbacks.pop());
+ });
+ });
+ };
+ },
+
+ /**
+ Sanity check this collection's pagination states. Only perform checks
+ when all the required pagination state values are defined and not null.
+ If `totalPages` is undefined or null, it is set to `totalRecords` /
+ `pageSize`. `lastPage` is set according to whether `firstPage` is 0 or 1
+ when no error occurs.
+
+ @private
+
+ @throws {TypeError} If `totalRecords`, `pageSize`, `currentPage` or
+ `firstPage` is not a finite integer.
+
+ @throws {RangeError} If `pageSize`, `currentPage` or `firstPage` is out
+ of bounds.
+
+ @return {Object} Returns the `state` object if no error was found.
+ */
+ _checkState: function (state) {
+
+ var mode = this.mode;
+ var links = this.links;
+ var totalRecords = state.totalRecords;
+ var pageSize = state.pageSize;
+ var currentPage = state.currentPage;
+ var firstPage = state.firstPage;
+ var totalPages = state.totalPages;
+
+ if (totalRecords != null && pageSize != null && currentPage != null &&
+ firstPage != null && (mode == "infinite" ? links : true)) {
+
+ totalRecords = finiteInt(totalRecords, "totalRecords");
+ pageSize = finiteInt(pageSize, "pageSize");
+ currentPage = finiteInt(currentPage, "currentPage");
+ firstPage = finiteInt(firstPage, "firstPage");
+
+ if (pageSize < 1) {
+ throw new RangeError("`pageSize` must be >= 1");
+ }
+
+ totalPages = state.totalPages = ceil(totalRecords / pageSize);
+
+ if (firstPage < 0 || firstPage > 1) {
+ throw new RangeError("`firstPage must be 0 or 1`");
+ }
+
+ state.lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;
+
+ if (mode == "infinite") {
+ if (!links[currentPage + '']) {
+ throw new RangeError("No link found for page " + currentPage);
+ }
+ }
+ else if (currentPage < firstPage ||
+ (totalPages > 0 &&
+ (firstPage ? currentPage > totalPages : currentPage >= totalPages))) {
+ throw new RangeError("`currentPage` must be firstPage <= currentPage " +
+ (firstPage ? ">" : ">=") +
+ " totalPages if " + firstPage + "-based. Got " +
+ currentPage + '.');
+ }
+ }
+
+ return state;
+ },
+
+ /**
+ Change the page size of this collection.
+
+ Under most if not all circumstances, you should call this method to
+ change the page size of a pageable collection because it will keep the
+ pagination state sane. By default, the method will recalculate the
+ current page number to one that will retain the current page's models
+ when increasing the page size. When decreasing the page size, this method
+ will retain the last models to the current page that will fit into the
+ smaller page size.
+
+ If `options.first` is true, changing the page size will also reset the
+ current page back to the first page instead of trying to be smart.
+
+ For server mode operations, changing the page size will trigger a #fetch
+ and subsequently a `reset` event.
+
+ For client mode operations, changing the page size will `reset` the
+ current page by recalculating the current page boundary on the client
+ side.
+
+ If `options.fetch` is true, a fetch can be forced if the collection is in
+ client mode.
+
+ @param {number} pageSize The new page size to set to #state.
+ @param {Object} [options] {@link #fetch} options.
+ @param {boolean} [options.first=false] Reset the current page number to
+ the first page if `true`.
+ @param {boolean} [options.fetch] If `true`, force a fetch in client mode.
+
+ @throws {TypeError} If `pageSize` is not a finite integer.
+ @throws {RangeError} If `pageSize` is less than 1.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ setPageSize: function (pageSize, options) {
+ pageSize = finiteInt(pageSize, "pageSize");
+
+ options = options || {first: false};
+
+ var state = this.state;
+ var totalPages = ceil(state.totalRecords / pageSize);
+ var currentPage = totalPages ?
+ max(state.firstPage, floor(totalPages * state.currentPage / state.totalPages)) :
+ state.firstPage;
+
+ state = this.state = this._checkState(_extend({}, state, {
+ pageSize: pageSize,
+ currentPage: options.first ? state.firstPage : currentPage,
+ totalPages: totalPages
+ }));
+
+ return this.getPage(state.currentPage, _omit(options, ["first"]));
+ },
+
+ /**
+ Switching between client, server and infinite mode.
+
+ If switching from client to server mode, the #fullCollection is emptied
+ first and then deleted and a fetch is immediately issued for the current
+ page from the server. Pass `false` to `options.fetch` to skip fetching.
+
+ If switching to infinite mode, and if `options.models` is given for an
+ array of models, #links will be populated with a URL per page, using the
+ default URL for this collection.
+
+ If switching from server to client mode, all of the pages are immediately
+ refetched. If you have too many pages, you can pass `false` to
+ `options.fetch` to skip fetching.
+
+ If switching to any mode from infinite mode, the #links will be deleted.
+
+ @param {"server"|"client"|"infinite"} [mode] The mode to switch to.
+
+ @param {Object} [options]
+
+ @param {boolean} [options.fetch=true] If `false`, no fetching is done.
+
+ @param {boolean} [options.resetState=true] If 'false', the state is not
+ reset, but checked for sanity instead.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this if `options.fetch` is `false`.
+ */
+ switchMode: function (mode, options) {
+
+ if (!_contains(["server", "client", "infinite"], mode)) {
+ throw new TypeError('`mode` must be one of "server", "client" or "infinite"');
+ }
+
+ options = options || {fetch: true, resetState: true};
+
+ var state = this.state = options.resetState ?
+ _clone(this._initState) :
+ this._checkState(_extend({}, this.state));
+
+ this.mode = mode;
+
+ var self = this;
+ var fullCollection = this.fullCollection;
+ var handlers = this._handlers = this._handlers || {}, handler;
+ if (mode != "server" && !fullCollection) {
+ fullCollection = this._makeFullCollection(options.models || [], options);
+ fullCollection.pageableCollection = this;
+ this.fullCollection = fullCollection;
+ var allHandler = this._makeCollectionEventHandler(this, fullCollection);
+ _each(["add", "remove", "reset", "sort"], function (event) {
+ handlers[event] = handler = _.bind(allHandler, {}, event);
+ self.on(event, handler);
+ fullCollection.on(event, handler);
+ });
+ fullCollection.comparator = this._fullComparator;
+ }
+ else if (mode == "server" && fullCollection) {
+ _each(_keys(handlers), function (event) {
+ handler = handlers[event];
+ self.off(event, handler);
+ fullCollection.off(event, handler);
+ });
+ delete this._handlers;
+ this._fullComparator = fullCollection.comparator;
+ delete this.fullCollection;
+ }
+
+ if (mode == "infinite") {
+ var links = this.links = {};
+ var firstPage = state.firstPage;
+ var totalPages = ceil(state.totalRecords / state.pageSize);
+ var lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;
+ for (var i = state.firstPage; i <= lastPage; i++) {
+ links[i] = this.url;
+ }
+ }
+ else if (this.links) delete this.links;
+
+ return options.fetch ?
+ this.fetch(_omit(options, "fetch", "resetState")) :
+ this;
+ },
+
+ /**
+ @return {boolean} `true` if this collection can page backward, `false`
+ otherwise.
+ */
+ hasPreviousPage: function () {
+ var state = this.state;
+ var currentPage = state.currentPage;
+ if (this.mode != "infinite") return currentPage > state.firstPage;
+ return !!this.links[currentPage - 1];
+ },
+
+ /**
+ @return {boolean} `true` if this collection can page forward, `false`
+ otherwise.
+ */
+ hasNextPage: function () {
+ var state = this.state;
+ var currentPage = this.state.currentPage;
+ if (this.mode != "infinite") return currentPage < state.lastPage;
+ return !!this.links[currentPage + 1];
+ },
+
+ /**
+ Fetch the first page in server mode, or reset the current page of this
+ collection to the first page in client or infinite mode.
+
+ @param {Object} options {@link #getPage} options.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getFirstPage: function (options) {
+ return this.getPage("first", options);
+ },
+
+ /**
+ Fetch the previous page in server mode, or reset the current page of this
+ collection to the previous page in client or infinite mode.
+
+ @param {Object} options {@link #getPage} options.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getPreviousPage: function (options) {
+ return this.getPage("prev", options);
+ },
+
+ /**
+ Fetch the next page in server mode, or reset the current page of this
+ collection to the next page in client mode.
+
+ @param {Object} options {@link #getPage} options.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getNextPage: function (options) {
+ return this.getPage("next", options);
+ },
+
+ /**
+ Fetch the last page in server mode, or reset the current page of this
+ collection to the last page in client mode.
+
+ @param {Object} options {@link #getPage} options.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getLastPage: function (options) {
+ return this.getPage("last", options);
+ },
+
+ /**
+ Given a page index, set #state.currentPage to that index. If this
+ collection is in server mode, fetch the page using the updated state,
+ otherwise, reset the current page of this collection to the page
+ specified by `index` in client mode. If `options.fetch` is true, a fetch
+ can be forced in client mode before resetting the current page. Under
+ infinite mode, if the index is less than the current page, a reset is
+ done as in client mode. If the index is greater than the current page
+ number, a fetch is made with the results **appended** to #fullCollection.
+ The current page will then be reset after fetching.
+
+ @param {number|string} index The page index to go to, or the page name to
+ look up from #links in infinite mode.
+ @param {Object} [options] {@link #fetch} options or
+ [reset](http://backbonejs.org/#Collection-reset) options for client mode
+ when `options.fetch` is `false`.
+ @param {boolean} [options.fetch=false] If true, force a {@link #fetch} in
+ client mode.
+
+ @throws {TypeError} If `index` is not a finite integer under server or
+ client mode, or does not yield a URL from #links under infinite mode.
+
+ @throws {RangeError} If `index` is out of bounds.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getPage: function (index, options) {
+
+ var mode = this.mode, fullCollection = this.fullCollection;
+
+ options = options || {fetch: false};
+
+ var state = this.state,
+ firstPage = state.firstPage,
+ currentPage = state.currentPage,
+ lastPage = state.lastPage,
+ pageSize = state.pageSize;
+
+ var pageNum = index;
+ switch (index) {
+ case "first": pageNum = firstPage; break;
+ case "prev": pageNum = currentPage - 1; break;
+ case "next": pageNum = currentPage + 1; break;
+ case "last": pageNum = lastPage; break;
+ default: pageNum = finiteInt(index, "index");
+ }
+
+ this.state = this._checkState(_extend({}, state, {currentPage: pageNum}));
+
+ options.from = currentPage, options.to = pageNum;
+
+ var pageStart = (firstPage === 0 ? pageNum : pageNum - 1) * pageSize;
+ var pageModels = fullCollection && fullCollection.length ?
+ fullCollection.models.slice(pageStart, pageStart + pageSize) :
+ [];
+ if ((mode == "client" || (mode == "infinite" && !_isEmpty(pageModels))) &&
+ !options.fetch) {
+ this.reset(pageModels, _omit(options, "fetch"));
+ return this;
+ }
+
+ if (mode == "infinite") options.url = this.links[pageNum];
+
+ return this.fetch(_omit(options, "fetch"));
+ },
+
+ /**
+ Fetch the page for the provided item offset in server mode, or reset the current page of this
+ collection to the page for the provided item offset in client mode.
+
+ @param {Object} options {@link #getPage} options.
+
+ @chainable
+ @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
+ from fetch or this.
+ */
+ getPageByOffset: function (offset, options) {
+ if (offset < 0) {
+ throw new RangeError("`offset must be > 0`");
+ }
+ offset = finiteInt(offset);
+
+ var page = floor(offset / this.state.pageSize);
+ if (this.state.firstPage !== 0) page++;
+ if (page > this.state.lastPage) page = this.state.lastPage;
+ return this.getPage(page, options);
+ },
+
+ /**
+ Overidden to make `getPage` compatible with Zepto.
+
+ @param {string} method
+ @param {Backbone.Model|Backbone.Collection} model
+ @param {Object} [options]
+
+ @return {XMLHttpRequest}
+ */
+ sync: function (method, model, options) {
+ var self = this;
+ if (self.mode == "infinite") {
+ var success = options.success;
+ var currentPage = self.state.currentPage;
+ options.success = function (resp, status, xhr) {
+ var links = self.links;
+ var newLinks = self.parseLinks(resp, _extend({xhr: xhr}, options));
+ if (newLinks.first) links[self.state.firstPage] = newLinks.first;
+ if (newLinks.prev) links[currentPage - 1] = newLinks.prev;
+ if (newLinks.next) links[currentPage + 1] = newLinks.next;
+ if (success) success(resp, status, xhr);
+ };
+ }
+
+ return (BBColProto.sync || Backbone.sync).call(self, method, model, options);
+ },
+
+ /**
+ Parse pagination links from the server response. Only valid under
+ infinite mode.
+
+ Given a response body and a XMLHttpRequest object, extract pagination
+ links from them for infinite paging.
+
+ This default implementation parses the RFC 5988 `Link` header and extract
+ 3 links from it - `first`, `prev`, `next`. Any subclasses overriding this
+ method __must__ return an object hash having only the keys
+ above. However, simply returning a `next` link or an empty hash if there
+ are no more links should be enough for most implementations.
+
+ @param {*} resp The deserialized response body.
+ @param {Object} [options]
+ @param {XMLHttpRequest} [options.xhr] The XMLHttpRequest object for this
+ response.
+ @return {Object}
+ */
+ parseLinks: function (resp, options) {
+ var links = {};
+ var linkHeader = options.xhr.getResponseHeader("Link");
+ if (linkHeader) {
+ var relations = ["first", "prev", "next"];
+ _each(linkHeader.split(","), function (linkValue) {
+ var linkParts = linkValue.split(";");
+ var url = linkParts[0].replace(URL_TRIM_RE, '');
+ var params = linkParts.slice(1);
+ _each(params, function (param) {
+ var paramParts = param.split("=");
+ var key = paramParts[0].replace(PARAM_TRIM_RE, '');
+ var value = paramParts[1].replace(PARAM_TRIM_RE, '');
+ if (key == "rel" && _contains(relations, value)) links[value] = url;
+ });
+ });
+ }
+
+ return links;
+ },
+
+ /**
+ Parse server response data.
+
+ This default implementation assumes the response data is in one of two
+ structures:
+
+ [
+ {}, // Your new pagination state
+ [{}, ...] // An array of JSON objects
+ ]
+
+ Or,
+
+ [{}] // An array of JSON objects
+
+ The first structure is the preferred form because the pagination states
+ may have been updated on the server side, sending them down again allows
+ this collection to update its states. If the response has a pagination
+ state object, it is checked for errors.
+
+ The second structure is the
+ [Backbone.Collection#parse](http://backbonejs.org/#Collection-parse)
+ default.
+
+ **Note:** this method has been further simplified since 1.1.7. While
+ existing #parse implementations will continue to work, new code is
+ encouraged to override #parseState and #parseRecords instead.
+
+ @param {Object} resp The deserialized response data from the server.
+ @param {Object} the options for the ajax request
+
+ @return {Array.<Object>} An array of model objects
+ */
+ parse: function (resp, options) {
+ var newState = this.parseState(resp, _clone(this.queryParams), _clone(this.state), options);
+ if (newState) this.state = this._checkState(_extend({}, this.state, newState));
+ return this.parseRecords(resp, options);
+ },
+
+ /**
+ Parse server response for server pagination state updates. Not applicable
+ under infinite mode.
+
+ This default implementation first checks whether the response has any
+ state object as documented in #parse. If it exists, a state object is
+ returned by mapping the server state keys to this pageable collection
+ instance's query parameter keys using `queryParams`.
+
+ It is __NOT__ neccessary to return a full state object complete with all
+ the mappings defined in #queryParams. Any state object resulted is merged
+ with a copy of the current pageable collection state and checked for
+ sanity before actually updating. Most of the time, simply providing a new
+ `totalRecords` value is enough to trigger a full pagination state
+ recalculation.
+
+ parseState: function (resp, queryParams, state, options) {
+ return {totalRecords: resp.total_entries};
+ }
+
+ If you want to use header fields use:
+
+ parseState: function (resp, queryParams, state, options) {
+ return {totalRecords: options.xhr.getResponseHeader("X-total")};
+ }
+
+ This method __MUST__ return a new state object instead of directly
+ modifying the #state object. The behavior of directly modifying #state is
+ undefined.
+
+ @param {Object} resp The deserialized response data from the server.
+ @param {Object} queryParams A copy of #queryParams.
+ @param {Object} state A copy of #state.
+ @param {Object} [options] The options passed through from
+ `parse`. (backbone >= 0.9.10 only)
+
+ @return {Object} A new (partial) state object.
+ */
+ parseState: function (resp, queryParams, state, options) {
+ if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {
+
+ var newState = _clone(state);
+ var serverState = resp[0];
+
+ _each(_pairs(_omit(queryParams, "directions")), function (kvp) {
+ var k = kvp[0], v = kvp[1];
+ var serverVal = serverState[v];
+ if (!_isUndefined(serverVal) && !_.isNull(serverVal)) newState[k] = serverState[v];
+ });
+
+ if (serverState.order) {
+ newState.order = _invert(queryParams.directions)[serverState.order] * 1;
+ }
+
+ return newState;
+ }
+ },
+
+ /**
+ Parse server response for an array of model objects.
+
+ This default implementation first checks whether the response has any
+ state object as documented in #parse. If it exists, the array of model
+ objects is assumed to be the second element, otherwise the entire
+ response is returned directly.
+
+ @param {Object} resp The deserialized response data from the server.
+ @param {Object} [options] The options passed through from the
+ `parse`. (backbone >= 0.9.10 only)
+
+ @return {Array.<Object>} An array of model objects
+ */
+ parseRecords: function (resp, options) {
+ if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {
+ return resp[1];
+ }
+
+ return resp;
+ },
+
+ /**
+ Fetch a page from the server in server mode, or all the pages in client
+ mode. Under infinite mode, the current page is refetched by default and
+ then reset.
+
+ The query string is constructed by translating the current pagination
+ state to your server API query parameter using #queryParams. The current
+ page will reset after fetch.
+
+ @param {Object} [options] Accepts all
+ [Backbone.Collection#fetch](http://backbonejs.org/#Collection-fetch)
+ options.
+
+ @return {XMLHttpRequest}
+ */
+ fetch: function (options) {
+
+ options = options || {};
+
+ var state = this._checkState(this.state);
+
+ var mode = this.mode;
+
+ if (mode == "infinite" && !options.url) {
+ options.url = this.links[state.currentPage];
+ }
+
+ var data = options.data || {};
+
+ // dedup query params
+ var url = options.url || this.url || "";
+ if (_isFunction(url)) url = url.call(this);
+ var qsi = url.indexOf('?');
+ if (qsi != -1) {
+ _extend(data, queryStringToParams(url.slice(qsi + 1)));
+ url = url.slice(0, qsi);
+ }
+
+ options.url = url;
+ options.data = data;
+
+ // map params except directions
+ var queryParams = this.mode == "client" ?
+ _pick(this.queryParams, "sortKey", "order") :
+ _omit(_pick(this.queryParams, _keys(PageableProto.queryParams)),
+ "directions");
+
+ var i, kvp, k, v, kvps = _pairs(queryParams), thisCopy = _clone(this);
+ for (i = 0; i < kvps.length; i++) {
+ kvp = kvps[i], k = kvp[0], v = kvp[1];
+ v = _isFunction(v) ? v.call(thisCopy) : v;
+ if (state[k] != null && v != null) {
+ data[v] = state[k];
+ }
+ }
+
+ // fix up sorting parameters
+ if (state.sortKey && state.order) {
+ var o = _isFunction(queryParams.order) ?
+ queryParams.order.call(thisCopy) :
+ queryParams.order;
+ data[o] = this.queryParams.directions[state.order + ""];
+ }
+ else if (!state.sortKey) delete data[queryParams.order];
+
+ // map extra query parameters
+ var extraKvps = _pairs(_omit(this.queryParams,
+ _keys(PageableProto.queryParams)));
+ for (i = 0; i < extraKvps.length; i++) {
+ kvp = extraKvps[i];
+ v = kvp[1];
+ v = _isFunction(v) ? v.call(thisCopy) : v;
+ if (v != null) data[kvp[0]] = v;
+ }
+
+ if (mode != "server") {
+ var self = this, fullCol = this.fullCollection;
+ var success = options.success;
+ options.success = function (col, resp, opts) {
+
+ // make sure the caller's intent is obeyed
+ opts = opts || {};
+ if (_isUndefined(options.silent)) delete opts.silent;
+ else opts.silent = options.silent;
+
+ var models = col.models;
+ if (mode == "client") fullCol.reset(models, opts);
+ else {
+ fullCol.add(models, _extend({at: fullCol.length},
+ _extend(opts, {parse: false})));
+ self.trigger("reset", self, opts);
+ }
+
+ if (success) success(col, resp, opts);
+ };
+
+ // silent the first reset from backbone
+ return BBColProto.fetch.call(this, _extend({}, options, {silent: true}));
+ }
+
+ return BBColProto.fetch.call(this, options);
+ },
+
+ /**
+ Convenient method for making a `comparator` sorted by a model attribute
+ identified by `sortKey` and ordered by `order`.
+
+ Like a Backbone.Collection, a Backbone.PageableCollection will maintain
+ the __current page__ in sorted order on the client side if a `comparator`
+ is attached to it. If the collection is in client mode, you can attach a
+ comparator to #fullCollection to have all the pages reflect the global
+ sorting order by specifying an option `full` to `true`. You __must__ call
+ `sort` manually or #fullCollection.sort after calling this method to
+ force a resort.
+
+ While you can use this method to sort the current page in server mode,
+ the sorting order may not reflect the global sorting order due to the
+ additions or removals of the records on the server since the last
+ fetch. If you want the most updated page in a global sorting order, it is
+ recommended that you set #state.sortKey and optionally #state.order, and
+ then call #fetch.
+
+ @protected
+
+ @param {string} [sortKey=this.state.sortKey] See `state.sortKey`.
+ @param {number} [order=this.state.order] See `state.order`.
+ @param {(function(Backbone.Model, string): Object) | string} [sortValue] See #setSorting.
+
+ See [Backbone.Collection.comparator](http://backbonejs.org/#Collection-comparator).
+ */
+ _makeComparator: function (sortKey, order, sortValue) {
+ var state = this.state;
+
+ sortKey = sortKey || state.sortKey;
+ order = order || state.order;
+
+ if (!sortKey || !order) return;
+
+ if (!sortValue) sortValue = function (model, attr) {
+ return model.get(attr);
+ };
+
+ return function (left, right) {
+ var l = sortValue(left, sortKey), r = sortValue(right, sortKey), t;
+ if (order === 1) t = l, l = r, r = t;
+ if (l === r) return 0;
+ else if (l < r) return -1;
+ return 1;
+ };
+ },
+
+ /**
+ Adjusts the sorting for this pageable collection.
+
+ Given a `sortKey` and an `order`, sets `state.sortKey` and
+ `state.order`. A comparator can be applied on the client side to sort in
+ the order defined if `options.side` is `"client"`. By default the
+ comparator is applied to the #fullCollection. Set `options.full` to
+ `false` to apply a comparator to the current page under any mode. Setting
+ `sortKey` to `null` removes the comparator from both the current page and
+ the full collection.
+
+ If a `sortValue` function is given, it will be passed the `(model,
+ sortKey)` arguments and is used to extract a value from the model during
+ comparison sorts. If `sortValue` is not given, `model.get(sortKey)` is
+ used for sorting.
+
+ @chainable
+
+ @param {string} sortKey See `state.sortKey`.
+ @param {number} [order=this.state.order] See `state.order`.
+ @param {Object} [options]
+ @param {"server"|"client"} [options.side] By default, `"client"` if
+ `mode` is `"client"`, `"server"` otherwise.
+ @param {boolean} [options.full=true]
+ @param {(function(Backbone.Model, string): Object) | string} [options.sortValue]
+ */
+ setSorting: function (sortKey, order, options) {
+
+ var state = this.state;
+
+ state.sortKey = sortKey;
+ state.order = order = order || state.order;
+
+ var fullCollection = this.fullCollection;
+
+ var delComp = false, delFullComp = false;
+
+ if (!sortKey) delComp = delFullComp = true;
+
+ var mode = this.mode;
+ options = _extend({side: mode == "client" ? mode : "server", full: true},
+ options);
+
+ var comparator = this._makeComparator(sortKey, order, options.sortValue);
+
+ var full = options.full, side = options.side;
+
+ if (side == "client") {
+ if (full) {
+ if (fullCollection) fullCollection.comparator = comparator;
+ delComp = true;
+ }
+ else {
+ this.comparator = comparator;
+ delFullComp = true;
+ }
+ }
+ else if (side == "server" && !full) {
+ this.comparator = comparator;
+ }
+
+ if (delComp) this.comparator = null;
+ if (delFullComp && fullCollection) fullCollection.comparator = null;
+
+ return this;
+ }
+
+ });
+
+ var PageableProto = PageableCollection.prototype;
+
+ return PageableCollection;
+
+}));
[04/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.js b/htrace-htraced/src/web/lib/rome-2.1.0/rome.js
new file mode 100644
index 0000000..f0b0b86
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.js
@@ -0,0 +1,4796 @@
+/**
+ * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
+ * @version v2.1.0
+ * @link https://github.com/bevacqua/rome
+ * @license MIT
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.rome=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+ var canSetImmediate = typeof window !== 'undefined'
+ && window.setImmediate;
+ var canPost = typeof window !== 'undefined'
+ && window.postMessage && window.addEventListener
+ ;
+
+ if (canSetImmediate) {
+ return function (f) { return window.setImmediate(f) };
+ }
+
+ if (canPost) {
+ var queue = [];
+ window.addEventListener('message', function (ev) {
+ var source = ev.source;
+ if ((source === window || source === null) && ev.data === 'process-tick') {
+ ev.stopPropagation();
+ if (queue.length > 0) {
+ var fn = queue.shift();
+ fn();
+ }
+ }
+ }, true);
+
+ return function nextTick(fn) {
+ queue.push(fn);
+ window.postMessage('process-tick', '*');
+ };
+ }
+
+ return function nextTick(fn) {
+ setTimeout(fn, 0);
+ };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+}
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+
+},{}],2:[function(_dereq_,module,exports){
+module.exports = _dereq_('./src/contra.emitter.js');
+
+},{"./src/contra.emitter.js":3}],3:[function(_dereq_,module,exports){
+(function (process){
+(function (root, undefined) {
+ 'use strict';
+
+ var undef = '' + undefined;
+ function atoa (a, n) { return Array.prototype.slice.call(a, n); }
+ function debounce (fn, args, ctx) { if (!fn) { return; } tick(function run () { fn.apply(ctx || null, args || []); }); }
+
+ // cross-platform ticker
+ var si = typeof setImmediate === 'function', tick;
+ if (si) {
+ tick = function (fn) { setImmediate(fn); };
+ } else if (typeof process !== undef && process.nextTick) {
+ tick = process.nextTick;
+ } else {
+ tick = function (fn) { setTimeout(fn, 0); };
+ }
+
+ function _emitter (thing, options) {
+ var opts = options || {};
+ var evt = {};
+ if (thing === undefined) { thing = {}; }
+ thing.on = function (type, fn) {
+ if (!evt[type]) {
+ evt[type] = [fn];
+ } else {
+ evt[type].push(fn);
+ }
+ return thing;
+ };
+ thing.once = function (type, fn) {
+ fn._once = true; // thing.off(fn) still works!
+ thing.on(type, fn);
+ return thing;
+ };
+ thing.off = function (type, fn) {
+ var c = arguments.length;
+ if (c === 1) {
+ delete evt[type];
+ } else if (c === 0) {
+ evt = {};
+ } else {
+ var et = evt[type];
+ if (!et) { return thing; }
+ et.splice(et.indexOf(fn), 1);
+ }
+ return thing;
+ };
+ thing.emit = function () {
+ var args = atoa(arguments);
+ return thing.emitterSnapshot(args.shift()).apply(this, args);
+ };
+ thing.emitterSnapshot = function (type) {
+ var et = (evt[type] || []).slice(0);
+ return function () {
+ var args = atoa(arguments);
+ var ctx = this || thing;
+ if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
+ evt[type] = et.filter(function emitter (listen) {
+ if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
+ return !listen._once;
+ });
+ return thing;
+ };
+ }
+ return thing;
+ }
+
+ // cross-platform export
+ if (typeof module !== undef && module.exports) {
+ module.exports = _emitter;
+ } else {
+ root.contra = root.contra || {};
+ root.contra.emitter = _emitter;
+ }
+})(this);
+
+}).call(this,_dereq_("FWaASH"))
+},{"FWaASH":1}],4:[function(_dereq_,module,exports){
+(function (global){
+//! moment.js
+//! version : 2.8.4
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+(function (undefined) {
+ /************************************
+ Constants
+ ************************************/
+
+ var moment,
+ VERSION = '2.8.4',
+ // the global-scope this is NOT the global object in Node.js
+ globalScope = typeof global !== 'undefined' ? global : this,
+ oldGlobalMoment,
+ round = Math.round,
+ hasOwnProperty = Object.prototype.hasOwnProperty,
+ i,
+
+ YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+
+ // internal storage for locale config files
+ locales = {},
+
+ // extra moment internal properties (plugins register props here)
+ momentProperties = [],
+
+ // check for nodeJS
+ hasModule = (typeof module !== 'undefined' && module && module.exports),
+
+ // ASP.NET json date format regex
+ aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
+ aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
+
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
+
+ // format tokens
+ formattingTokens = /(\[[^\[]*\])|(\\)?(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,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+
+ // parsing token regexes
+ parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
+ parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
+ parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
+ parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
+ parseTokenDigits = /\d+/, // nonzero number of digits
+ parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
+ parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ parseTokenT = /T/i, // T (ISO separator)
+ parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123
+ parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+
+ //strict parsing regexes
+ parseTokenOneDigit = /\d/, // 0 - 9
+ parseTokenTwoDigits = /\d\d/, // 00 - 99
+ parseTokenThreeDigits = /\d{3}/, // 000 - 999
+ parseTokenFourDigits = /\d{4}/, // 0000 - 9999
+ parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
+ parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
+
+ // iso 8601 regex
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+ isoRegex = /^\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)?)?$/,
+
+ isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
+
+ isoDates = [
+ ['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}/]
+ ],
+
+ // iso time formats and regexes
+ isoTimes = [
+ ['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/]
+ ],
+
+ // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30']
+ parseTimezoneChunker = /([\+\-]|\d\d)/gi,
+
+ // getter and setter names
+ proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
+ unitMillisecondFactors = {
+ 'Milliseconds' : 1,
+ 'Seconds' : 1e3,
+ 'Minutes' : 6e4,
+ 'Hours' : 36e5,
+ 'Days' : 864e5,
+ 'Months' : 2592e6,
+ 'Years' : 31536e6
+ },
+
+ unitAliases = {
+ 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'
+ },
+
+ camelFunctions = {
+ dayofyear : 'dayOfYear',
+ isoweekday : 'isoWeekday',
+ isoweek : 'isoWeek',
+ weekyear : 'weekYear',
+ isoweekyear : 'isoWeekYear'
+ },
+
+ // format function strings
+ formatFunctions = {},
+
+ // default relative time thresholds
+ relativeTimeThresholds = {
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month
+ M: 11 // months to year
+ },
+
+ // tokens to ordinalize and pad
+ ordinalizeTokens = 'DDD w W M D d'.split(' '),
+ paddedTokens = 'M D H h m s w W'.split(' '),
+
+ formatTokenFunctions = {
+ M : function () {
+ return this.month() + 1;
+ },
+ MMM : function (format) {
+ return this.localeData().monthsShort(this, format);
+ },
+ MMMM : function (format) {
+ return this.localeData().months(this, format);
+ },
+ D : function () {
+ return this.date();
+ },
+ DDD : function () {
+ return this.dayOfYear();
+ },
+ d : function () {
+ return this.day();
+ },
+ dd : function (format) {
+ return this.localeData().weekdaysMin(this, format);
+ },
+ ddd : function (format) {
+ return this.localeData().weekdaysShort(this, format);
+ },
+ dddd : function (format) {
+ return this.localeData().weekdays(this, format);
+ },
+ w : function () {
+ return this.week();
+ },
+ W : function () {
+ return this.isoWeek();
+ },
+ YY : function () {
+ return leftZeroFill(this.year() % 100, 2);
+ },
+ YYYY : function () {
+ return leftZeroFill(this.year(), 4);
+ },
+ YYYYY : function () {
+ return leftZeroFill(this.year(), 5);
+ },
+ YYYYYY : function () {
+ var y = this.year(), sign = y >= 0 ? '+' : '-';
+ return sign + leftZeroFill(Math.abs(y), 6);
+ },
+ gg : function () {
+ return leftZeroFill(this.weekYear() % 100, 2);
+ },
+ gggg : function () {
+ return leftZeroFill(this.weekYear(), 4);
+ },
+ ggggg : function () {
+ return leftZeroFill(this.weekYear(), 5);
+ },
+ GG : function () {
+ return leftZeroFill(this.isoWeekYear() % 100, 2);
+ },
+ GGGG : function () {
+ return leftZeroFill(this.isoWeekYear(), 4);
+ },
+ GGGGG : function () {
+ return leftZeroFill(this.isoWeekYear(), 5);
+ },
+ e : function () {
+ return this.weekday();
+ },
+ E : function () {
+ return this.isoWeekday();
+ },
+ a : function () {
+ return this.localeData().meridiem(this.hours(), this.minutes(), true);
+ },
+ A : function () {
+ return this.localeData().meridiem(this.hours(), this.minutes(), false);
+ },
+ 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 toInt(this.milliseconds() / 100);
+ },
+ SS : function () {
+ return leftZeroFill(toInt(this.milliseconds() / 10), 2);
+ },
+ SSS : function () {
+ return leftZeroFill(this.milliseconds(), 3);
+ },
+ SSSS : function () {
+ return leftZeroFill(this.milliseconds(), 3);
+ },
+ Z : function () {
+ var a = -this.zone(),
+ b = '+';
+ if (a < 0) {
+ a = -a;
+ b = '-';
+ }
+ return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2);
+ },
+ ZZ : function () {
+ var a = -this.zone(),
+ b = '+';
+ if (a < 0) {
+ a = -a;
+ b = '-';
+ }
+ return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 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();
+ }
+ },
+
+ deprecations = {},
+
+ lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
+
+ // Pick the first defined of two or three arguments. dfl comes from
+ // default.
+ function dfl(a, b, c) {
+ switch (arguments.length) {
+ case 2: return a != null ? a : b;
+ case 3: return a != null ? a : b != null ? b : c;
+ default: throw new Error('Implement me');
+ }
+ }
+
+ function hasOwnProp(a, b) {
+ return hasOwnProperty.call(a, b);
+ }
+
+ function defaultParsingFlags() {
+ // We need to deep clone this object, and es5 standard is not very
+ // helpful.
+ return {
+ empty : false,
+ unusedTokens : [],
+ unusedInput : [],
+ overflow : -2,
+ charsLeftOver : 0,
+ nullInput : false,
+ invalidMonth : null,
+ invalidFormat : false,
+ userInvalidated : false,
+ iso: false
+ };
+ }
+
+ function printMsg(msg) {
+ if (moment.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' && console.warn) {
+ console.warn('Deprecation warning: ' + msg);
+ }
+ }
+
+ function deprecate(msg, fn) {
+ var firstTime = true;
+ return extend(function () {
+ if (firstTime) {
+ printMsg(msg);
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+ }
+
+ function deprecateSimple(name, msg) {
+ if (!deprecations[name]) {
+ printMsg(msg);
+ deprecations[name] = true;
+ }
+ }
+
+ function padToken(func, count) {
+ return function (a) {
+ return leftZeroFill(func.call(this, a), count);
+ };
+ }
+ function ordinalizeToken(func, period) {
+ return function (a) {
+ return this.localeData().ordinal(func.call(this, a), period);
+ };
+ }
+
+ while (ordinalizeTokens.length) {
+ i = ordinalizeTokens.pop();
+ formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
+ }
+ while (paddedTokens.length) {
+ i = paddedTokens.pop();
+ formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
+ }
+ formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
+
+
+ /************************************
+ Constructors
+ ************************************/
+
+ function Locale() {
+ }
+
+ // Moment prototype object
+ function Moment(config, skipOverflow) {
+ if (skipOverflow !== false) {
+ checkOverflow(config);
+ }
+ copyConfig(this, config);
+ this._d = new Date(+config._d);
+ }
+
+ // Duration Constructor
+ function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ // representation for dateAddRemove
+ this._milliseconds = +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 36e5; // 1000 * 60 * 60
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days +
+ weeks * 7;
+ // It is impossible translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months +
+ quarters * 3 +
+ years * 12;
+
+ this._data = {};
+
+ this._locale = moment.localeData();
+
+ this._bubble();
+ }
+
+ /************************************
+ Helpers
+ ************************************/
+
+
+ function extend(a, b) {
+ for (var i in b) {
+ if (hasOwnProp(b, i)) {
+ a[i] = b[i];
+ }
+ }
+
+ if (hasOwnProp(b, 'toString')) {
+ a.toString = b.toString;
+ }
+
+ if (hasOwnProp(b, 'valueOf')) {
+ a.valueOf = b.valueOf;
+ }
+
+ return a;
+ }
+
+ function copyConfig(to, from) {
+ var i, prop, val;
+
+ if (typeof from._isAMomentObject !== 'undefined') {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (typeof from._i !== 'undefined') {
+ to._i = from._i;
+ }
+ if (typeof from._f !== 'undefined') {
+ to._f = from._f;
+ }
+ if (typeof from._l !== 'undefined') {
+ to._l = from._l;
+ }
+ if (typeof from._strict !== 'undefined') {
+ to._strict = from._strict;
+ }
+ if (typeof from._tzm !== 'undefined') {
+ to._tzm = from._tzm;
+ }
+ if (typeof from._isUTC !== 'undefined') {
+ to._isUTC = from._isUTC;
+ }
+ if (typeof from._offset !== 'undefined') {
+ to._offset = from._offset;
+ }
+ if (typeof from._pf !== 'undefined') {
+ to._pf = from._pf;
+ }
+ if (typeof from._locale !== 'undefined') {
+ to._locale = from._locale;
+ }
+
+ if (momentProperties.length > 0) {
+ for (i in momentProperties) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (typeof val !== 'undefined') {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+ }
+
+ function absRound(number) {
+ if (number < 0) {
+ return Math.ceil(number);
+ } else {
+ return Math.floor(number);
+ }
+ }
+
+ // left zero fill a number
+ // see http://jsperf.com/left-zero-filling for performance comparison
+ function leftZeroFill(number, targetLength, forceSign) {
+ var output = '' + Math.abs(number),
+ sign = number >= 0;
+
+ while (output.length < targetLength) {
+ output = '0' + output;
+ }
+ return (sign ? (forceSign ? '+' : '') : '-') + output;
+ }
+
+ function positiveMomentsDifference(base, other) {
+ var res = {milliseconds: 0, months: 0};
+
+ res.months = other.month() - base.month() +
+ (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
+
+ return res;
+ }
+
+ function momentsDifference(base, other) {
+ var res;
+ other = makeAs(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+ }
+
+ // TODO: remove 'name' arg after deprecation is removed
+ function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
+ tmp = val; val = period; period = tmp;
+ }
+
+ val = typeof val === 'string' ? +val : val;
+ dur = moment.duration(val, period);
+ addOrSubtractDurationFromMoment(this, dur, direction);
+ return this;
+ };
+ }
+
+ function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = duration._days,
+ months = duration._months;
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (milliseconds) {
+ mom._d.setTime(+mom._d + milliseconds * isAdding);
+ }
+ if (days) {
+ rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding);
+ }
+ if (months) {
+ rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding);
+ }
+ if (updateOffset) {
+ moment.updateOffset(mom, days || months);
+ }
+ }
+
+ // check if is an array
+ function isArray(input) {
+ return Object.prototype.toString.call(input) === '[object Array]';
+ }
+
+ function isDate(input) {
+ return Object.prototype.toString.call(input) === '[object Date]' ||
+ input instanceof Date;
+ }
+
+ // compare two arrays, return the number of differences
+ function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if ((dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+ }
+
+ function normalizeUnits(units) {
+ if (units) {
+ var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
+ units = unitAliases[units] || camelFunctions[lowered] || lowered;
+ }
+ return units;
+ }
+
+ function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (hasOwnProp(inputObject, prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+ }
+
+ function makeList(field) {
+ var count, setter;
+
+ if (field.indexOf('week') === 0) {
+ count = 7;
+ setter = 'day';
+ }
+ else if (field.indexOf('month') === 0) {
+ count = 12;
+ setter = 'month';
+ }
+ else {
+ return;
+ }
+
+ moment[field] = function (format, index) {
+ var i, getter,
+ method = moment._locale[field],
+ results = [];
+
+ if (typeof format === 'number') {
+ index = format;
+ format = undefined;
+ }
+
+ getter = function (i) {
+ var m = moment().utc().set(setter, i);
+ return method.call(moment._locale, m, format || '');
+ };
+
+ if (index != null) {
+ return getter(index);
+ }
+ else {
+ for (i = 0; i < count; i++) {
+ results.push(getter(i));
+ }
+ return results;
+ }
+ };
+ }
+
+ function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ if (coercedNumber >= 0) {
+ value = Math.floor(coercedNumber);
+ } else {
+ value = Math.ceil(coercedNumber);
+ }
+ }
+
+ return value;
+ }
+
+ function daysInMonth(year, month) {
+ return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+ }
+
+ function weeksInYear(year, dow, doy) {
+ return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week;
+ }
+
+ function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+ }
+
+ function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+ }
+
+ function checkOverflow(m) {
+ var overflow;
+ if (m._a && m._pf.overflow === -2) {
+ overflow =
+ m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
+ m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
+ m._a[HOUR] < 0 || m._a[HOUR] > 24 ||
+ (m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 ||
+ m._a[SECOND] !== 0 ||
+ m._a[MILLISECOND] !== 0)) ? HOUR :
+ m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
+ m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
+ m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
+ -1;
+
+ if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+ overflow = DATE;
+ }
+
+ m._pf.overflow = overflow;
+ }
+ }
+
+ function isValid(m) {
+ if (m._isValid == null) {
+ m._isValid = !isNaN(m._d.getTime()) &&
+ m._pf.overflow < 0 &&
+ !m._pf.empty &&
+ !m._pf.invalidMonth &&
+ !m._pf.nullInput &&
+ !m._pf.invalidFormat &&
+ !m._pf.userInvalidated;
+
+ if (m._strict) {
+ m._isValid = m._isValid &&
+ m._pf.charsLeftOver === 0 &&
+ m._pf.unusedTokens.length === 0 &&
+ m._pf.bigHour === undefined;
+ }
+ }
+ return m._isValid;
+ }
+
+ function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+ }
+
+ // pick the locale from the array
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+ function chooseLocale(names) {
+ var i = 0, j, next, locale, split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return null;
+ }
+
+ function loadLocale(name) {
+ var oldLocale = null;
+ if (!locales[name] && hasModule) {
+ try {
+ oldLocale = moment.locale();
+ _dereq_('./locale/' + name);
+ // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales
+ moment.locale(oldLocale);
+ } catch (e) { }
+ }
+ return locales[name];
+ }
+
+ // Return a moment from input, that is local/utc/zone equivalent to model.
+ function makeAs(input, model) {
+ var res, diff;
+ if (model._isUTC) {
+ res = model.clone();
+ diff = (moment.isMoment(input) || isDate(input) ?
+ +input : +moment(input)) - (+res);
+ // Use low-level api, because this fn is low-level api.
+ res._d.setTime(+res._d + diff);
+ moment.updateOffset(res, false);
+ return res;
+ } else {
+ return moment(input).local();
+ }
+ }
+
+ /************************************
+ Locale
+ ************************************/
+
+
+ extend(Locale.prototype, {
+
+ set : function (config) {
+ var prop, i;
+ for (i in config) {
+ prop = config[i];
+ if (typeof prop === 'function') {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ // Lenient ordinal parsing accepts just a number in addition to
+ // number + (possibly) stuff coming from _ordinalParseLenient.
+ 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 (m) {
+ return this._months[m.month()];
+ },
+
+ _monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ monthsShort : function (m) {
+ return this._monthsShort[m.month()];
+ },
+
+ monthsParse : function (monthName, format, strict) {
+ var i, mom, regex;
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ this._longMonthsParse = [];
+ this._shortMonthsParse = [];
+ }
+
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ mom = moment.utc([2000, i]);
+ if (strict && !this._longMonthsParse[i]) {
+ this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
+ this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
+ }
+ if (!strict && !this._monthsParse[i]) {
+ regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
+ return i;
+ } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
+ return i;
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+ },
+
+ _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdays : function (m) {
+ return this._weekdays[m.day()];
+ },
+
+ _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysShort : function (m) {
+ return this._weekdaysShort[m.day()];
+ },
+
+ _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ weekdaysMin : function (m) {
+ return this._weekdaysMin[m.day()];
+ },
+
+ weekdaysParse : function (weekdayName) {
+ var i, mom, regex;
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ if (!this._weekdaysParse[i]) {
+ mom = moment([2000, 1]).day(i);
+ regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+ },
+
+ _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 (key) {
+ var output = this._longDateFormat[key];
+ if (!output && this._longDateFormat[key.toUpperCase()]) {
+ output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
+ return val.slice(1);
+ });
+ this._longDateFormat[key] = output;
+ }
+ return output;
+ },
+
+ isPM : function (input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return ((input + '').toLowerCase().charAt(0) === 'p');
+ },
+
+ _meridiemParse : /[ap]\.?m?\.?/i,
+ meridiem : function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? '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 (key, mom, now) {
+ var output = this._calendar[key];
+ return typeof output === 'function' ? output.apply(mom, [now]) : output;
+ },
+
+ _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 (number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return (typeof output === 'function') ?
+ output(number, withoutSuffix, string, isFuture) :
+ output.replace(/%d/i, number);
+ },
+
+ pastFuture : function (diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
+ },
+
+ ordinal : function (number) {
+ return this._ordinal.replace('%d', number);
+ },
+ _ordinal : '%d',
+ _ordinalParse : /\d{1,2}/,
+
+ preparse : function (string) {
+ return string;
+ },
+
+ postformat : function (string) {
+ return string;
+ },
+
+ week : function (mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+ },
+
+ _week : {
+ dow : 0, // Sunday is the first day of the week.
+ doy : 6 // The week that contains Jan 1st is the first week of the year.
+ },
+
+ _invalidDate: 'Invalid date',
+ invalidDate: function () {
+ return this._invalidDate;
+ }
+ });
+
+ /************************************
+ Formatting
+ ************************************/
+
+
+ function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+ }
+
+ function makeFormatFunction(format) {
+ var array = format.match(formattingTokens), i, length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '';
+ for (i = 0; i < length; i++) {
+ output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
+ }
+ return output;
+ };
+ }
+
+ // format date using native date object
+ function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+
+ if (!formatFunctions[format]) {
+ formatFunctions[format] = makeFormatFunction(format);
+ }
+
+ return formatFunctions[format](m);
+ }
+
+ function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+ }
+
+
+ /************************************
+ Parsing
+ ************************************/
+
+
+ // get the regex to find the next token
+ function getParseRegexForToken(token, config) {
+ var a, strict = config._strict;
+ switch (token) {
+ case 'Q':
+ return parseTokenOneDigit;
+ case 'DDDD':
+ return parseTokenThreeDigits;
+ case 'YYYY':
+ case 'GGGG':
+ case 'gggg':
+ return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
+ case 'Y':
+ case 'G':
+ case 'g':
+ return parseTokenSignedNumber;
+ case 'YYYYYY':
+ case 'YYYYY':
+ case 'GGGGG':
+ case 'ggggg':
+ return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
+ case 'S':
+ if (strict) {
+ return parseTokenOneDigit;
+ }
+ /* falls through */
+ case 'SS':
+ if (strict) {
+ return parseTokenTwoDigits;
+ }
+ /* falls through */
+ case 'SSS':
+ if (strict) {
+ return parseTokenThreeDigits;
+ }
+ /* falls through */
+ case 'DDD':
+ return parseTokenOneToThreeDigits;
+ case 'MMM':
+ case 'MMMM':
+ case 'dd':
+ case 'ddd':
+ case 'dddd':
+ return parseTokenWord;
+ case 'a':
+ case 'A':
+ return config._locale._meridiemParse;
+ case 'x':
+ return parseTokenOffsetMs;
+ case 'X':
+ return parseTokenTimestampMs;
+ case 'Z':
+ case 'ZZ':
+ return parseTokenTimezone;
+ case 'T':
+ return parseTokenT;
+ case 'SSSS':
+ return parseTokenDigits;
+ case 'MM':
+ case 'DD':
+ case 'YY':
+ case 'GG':
+ case 'gg':
+ case 'HH':
+ case 'hh':
+ case 'mm':
+ case 'ss':
+ case 'ww':
+ case 'WW':
+ return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
+ case 'M':
+ case 'D':
+ case 'd':
+ case 'H':
+ case 'h':
+ case 'm':
+ case 's':
+ case 'w':
+ case 'W':
+ case 'e':
+ case 'E':
+ return parseTokenOneOrTwoDigits;
+ case 'Do':
+ return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient;
+ default :
+ a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));
+ return a;
+ }
+ }
+
+ function timezoneMinutesFromString(string) {
+ string = string || '';
+ var possibleTzMatches = (string.match(parseTokenTimezone) || []),
+ tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
+ parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return parts[0] === '+' ? -minutes : minutes;
+ }
+
+ // function to convert string input to date
+ function addTimeToArrayFromToken(token, input, config) {
+ var a, datePartArray = config._a;
+
+ switch (token) {
+ // QUARTER
+ case 'Q':
+ if (input != null) {
+ datePartArray[MONTH] = (toInt(input) - 1) * 3;
+ }
+ break;
+ // MONTH
+ case 'M' : // fall through to MM
+ case 'MM' :
+ if (input != null) {
+ datePartArray[MONTH] = toInt(input) - 1;
+ }
+ break;
+ case 'MMM' : // fall through to MMMM
+ case 'MMMM' :
+ a = config._locale.monthsParse(input, token, config._strict);
+ // if we didn't find a month name, mark the date as invalid.
+ if (a != null) {
+ datePartArray[MONTH] = a;
+ } else {
+ config._pf.invalidMonth = input;
+ }
+ break;
+ // DAY OF MONTH
+ case 'D' : // fall through to DD
+ case 'DD' :
+ if (input != null) {
+ datePartArray[DATE] = toInt(input);
+ }
+ break;
+ case 'Do' :
+ if (input != null) {
+ datePartArray[DATE] = toInt(parseInt(
+ input.match(/\d{1,2}/)[0], 10));
+ }
+ break;
+ // DAY OF YEAR
+ case 'DDD' : // fall through to DDDD
+ case 'DDDD' :
+ if (input != null) {
+ config._dayOfYear = toInt(input);
+ }
+
+ break;
+ // YEAR
+ case 'YY' :
+ datePartArray[YEAR] = moment.parseTwoDigitYear(input);
+ break;
+ case 'YYYY' :
+ case 'YYYYY' :
+ case 'YYYYYY' :
+ datePartArray[YEAR] = toInt(input);
+ break;
+ // AM / PM
+ case 'a' : // fall through to A
+ case 'A' :
+ config._isPm = config._locale.isPM(input);
+ break;
+ // HOUR
+ case 'h' : // fall through to hh
+ case 'hh' :
+ config._pf.bigHour = true;
+ /* falls through */
+ case 'H' : // fall through to HH
+ case 'HH' :
+ datePartArray[HOUR] = toInt(input);
+ break;
+ // MINUTE
+ case 'm' : // fall through to mm
+ case 'mm' :
+ datePartArray[MINUTE] = toInt(input);
+ break;
+ // SECOND
+ case 's' : // fall through to ss
+ case 'ss' :
+ datePartArray[SECOND] = toInt(input);
+ break;
+ // MILLISECOND
+ case 'S' :
+ case 'SS' :
+ case 'SSS' :
+ case 'SSSS' :
+ datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
+ break;
+ // UNIX OFFSET (MILLISECONDS)
+ case 'x':
+ config._d = new Date(toInt(input));
+ break;
+ // UNIX TIMESTAMP WITH MS
+ case 'X':
+ config._d = new Date(parseFloat(input) * 1000);
+ break;
+ // TIMEZONE
+ case 'Z' : // fall through to ZZ
+ case 'ZZ' :
+ config._useUTC = true;
+ config._tzm = timezoneMinutesFromString(input);
+ break;
+ // WEEKDAY - human
+ case 'dd':
+ case 'ddd':
+ case 'dddd':
+ a = config._locale.weekdaysParse(input);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (a != null) {
+ config._w = config._w || {};
+ config._w['d'] = a;
+ } else {
+ config._pf.invalidWeekday = input;
+ }
+ break;
+ // WEEK, WEEK DAY - numeric
+ case 'w':
+ case 'ww':
+ case 'W':
+ case 'WW':
+ case 'd':
+ case 'e':
+ case 'E':
+ token = token.substr(0, 1);
+ /* falls through */
+ case 'gggg':
+ case 'GGGG':
+ case 'GGGGG':
+ token = token.substr(0, 2);
+ if (input) {
+ config._w = config._w || {};
+ config._w[token] = toInt(input);
+ }
+ break;
+ case 'gg':
+ case 'GG':
+ config._w = config._w || {};
+ config._w[token] = moment.parseTwoDigitYear(input);
+ }
+ }
+
+ function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
+ week = dfl(w.W, 1);
+ weekday = dfl(w.E, 1);
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
+ week = dfl(w.w, 1);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < dow) {
+ ++week;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from begining of week
+ weekday = w.e + dow;
+ } else {
+ // default to begining of week
+ weekday = dow;
+ }
+ }
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
+
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+
+ // convert an array to a date.
+ // the array should mirror the parameters below
+ // note: all values past the year are optional and will default to the lowest possible value.
+ // [year, month, day , hour, minute, second, millisecond]
+ function dateFromConfig(config) {
+ var i, date, input = [], currentDate, yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear) {
+ yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
+
+ if (config._dayOfYear > daysInYear(yearToUse)) {
+ config._pf._overflowDayOfYear = true;
+ }
+
+ date = makeUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ // Check for 24:00:00.000
+ if (config._a[HOUR] === 24 &&
+ config._a[MINUTE] === 0 &&
+ config._a[SECOND] === 0 &&
+ config._a[MILLISECOND] === 0) {
+ config._nextDay = true;
+ config._a[HOUR] = 0;
+ }
+
+ config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
+ // Apply timezone offset from input. The actual zone can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
+ }
+
+ if (config._nextDay) {
+ config._a[HOUR] = 24;
+ }
+ }
+
+ function dateFromObject(config) {
+ var normalizedInput;
+
+ if (config._d) {
+ return;
+ }
+
+ normalizedInput = normalizeObjectUnits(config._i);
+ config._a = [
+ normalizedInput.year,
+ normalizedInput.month,
+ normalizedInput.day || normalizedInput.date,
+ normalizedInput.hour,
+ normalizedInput.minute,
+ normalizedInput.second,
+ normalizedInput.millisecond
+ ];
+
+ dateFromConfig(config);
+ }
+
+ function currentDateArray(config) {
+ var now = new Date();
+ if (config._useUTC) {
+ return [
+ now.getUTCFullYear(),
+ now.getUTCMonth(),
+ now.getUTCDate()
+ ];
+ } else {
+ return [now.getFullYear(), now.getMonth(), now.getDate()];
+ }
+ }
+
+ // date from string and format string
+ function makeDateFromStringAndFormat(config) {
+ if (config._f === moment.ISO_8601) {
+ parseISO(config);
+ return;
+ }
+
+ config._a = [];
+ config._pf.empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i, parsedInput, tokens, token, skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0;
+
+ tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
+
+ for (i = 0; i < tokens.length; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ config._pf.unusedInput.push(skipped);
+ }
+ string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ config._pf.empty = false;
+ }
+ else {
+ config._pf.unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ }
+ else if (config._strict && !parsedInput) {
+ config._pf.unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ config._pf.charsLeftOver = stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ config._pf.unusedInput.push(string);
+ }
+
+ // clear _12h flag if hour is <= 12
+ if (config._pf.bigHour === true && config._a[HOUR] <= 12) {
+ config._pf.bigHour = undefined;
+ }
+ // handle am pm
+ if (config._isPm && config._a[HOUR] < 12) {
+ config._a[HOUR] += 12;
+ }
+ // if is 12 am, change hours to 0
+ if (config._isPm === false && config._a[HOUR] === 12) {
+ config._a[HOUR] = 0;
+ }
+ dateFromConfig(config);
+ checkOverflow(config);
+ }
+
+ function unescapeFormat(s) {
+ return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ });
+ }
+
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+ function regexpEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+ }
+
+ // date from string and array of format strings
+ function makeDateFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+
+ scoreToBeat,
+ i,
+ currentScore;
+
+ if (config._f.length === 0) {
+ config._pf.invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < config._f.length; i++) {
+ currentScore = 0;
+ tempConfig = copyConfig({}, config);
+ if (config._useUTC != null) {
+ tempConfig._useUTC = config._useUTC;
+ }
+ tempConfig._pf = defaultParsingFlags();
+ tempConfig._f = config._f[i];
+ makeDateFromStringAndFormat(tempConfig);
+
+ if (!isValid(tempConfig)) {
+ continue;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += tempConfig._pf.charsLeftOver;
+
+ //or tokens
+ currentScore += tempConfig._pf.unusedTokens.length * 10;
+
+ tempConfig._pf.score = currentScore;
+
+ if (scoreToBeat == null || currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+ }
+
+ // date from iso format
+ function parseISO(config) {
+ var i, l,
+ string = config._i,
+ match = isoRegex.exec(string);
+
+ if (match) {
+ config._pf.iso = true;
+ for (i = 0, l = isoDates.length; i < l; i++) {
+ if (isoDates[i][1].exec(string)) {
+ // match[5] should be 'T' or undefined
+ config._f = isoDates[i][0] + (match[6] || ' ');
+ break;
+ }
+ }
+ for (i = 0, l = isoTimes.length; i < l; i++) {
+ if (isoTimes[i][1].exec(string)) {
+ config._f += isoTimes[i][0];
+ break;
+ }
+ }
+ if (string.match(parseTokenTimezone)) {
+ config._f += 'Z';
+ }
+ makeDateFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ // date from iso format or fallback
+ function makeDateFromString(config) {
+ parseISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ moment.createFromInputFallback(config);
+ }
+ }
+
+ function map(arr, fn) {
+ var res = [], i;
+ for (i = 0; i < arr.length; ++i) {
+ res.push(fn(arr[i], i));
+ }
+ return res;
+ }
+
+ function makeDateFromInput(config) {
+ var input = config._i, matched;
+ if (input === undefined) {
+ config._d = new Date();
+ } else if (isDate(input)) {
+ config._d = new Date(+input);
+ } else if ((matched = aspNetJsonRegex.exec(input)) !== null) {
+ config._d = new Date(+matched[1]);
+ } else if (typeof input === 'string') {
+ makeDateFromString(config);
+ } else if (isArray(input)) {
+ config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10);
+ });
+ dateFromConfig(config);
+ } else if (typeof(input) === 'object') {
+ dateFromObject(config);
+ } else if (typeof(input) === 'number') {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ moment.createFromInputFallback(config);
+ }
+ }
+
+ function makeDate(y, m, d, h, M, s, ms) {
+ //can't just apply() to create a date:
+ //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
+ var date = new Date(y, m, d, h, M, s, ms);
+
+ //the date constructor doesn't accept years < 1970
+ if (y < 1970) {
+ date.setFullYear(y);
+ }
+ return date;
+ }
+
+ function makeUTCDate(y) {
+ var date = new Date(Date.UTC.apply(null, arguments));
+ if (y < 1970) {
+ date.setUTCFullYear(y);
+ }
+ return date;
+ }
+
+ function parseWeekday(input, locale) {
+ if (typeof input === 'string') {
+ if (!isNaN(input)) {
+ input = parseInt(input, 10);
+ }
+ else {
+ input = locale.weekdaysParse(input);
+ if (typeof input !== 'number') {
+ return null;
+ }
+ }
+ }
+ return input;
+ }
+
+ /************************************
+ Relative Time
+ ************************************/
+
+
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+ }
+
+ function relativeTime(posNegDuration, withoutSuffix, locale) {
+ var duration = moment.duration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ years = round(duration.as('y')),
+
+ args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
+ minutes === 1 && ['m'] ||
+ minutes < relativeTimeThresholds.m && ['mm', minutes] ||
+ hours === 1 && ['h'] ||
+ hours < relativeTimeThresholds.h && ['hh', hours] ||
+ days === 1 && ['d'] ||
+ days < relativeTimeThresholds.d && ['dd', days] ||
+ months === 1 && ['M'] ||
+ months < relativeTimeThresholds.M && ['MM', months] ||
+ years === 1 && ['y'] || ['yy', years];
+
+ args[2] = withoutSuffix;
+ args[3] = +posNegDuration > 0;
+ args[4] = locale;
+ return substituteTimeAgo.apply({}, args);
+ }
+
+
+ /************************************
+ Week of Year
+ ************************************/
+
+
+ // firstDayOfWeek 0 = sun, 6 = sat
+ // the day of the week that starts the week
+ // (usually sunday or monday)
+ // firstDayOfWeekOfYear 0 = sun, 6 = sat
+ // the first week is the week that contains the first
+ // of this day of the week
+ // (eg. ISO weeks use thursday (4))
+ function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
+ var end = firstDayOfWeekOfYear - firstDayOfWeek,
+ daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
+ adjustedMoment;
+
+
+ if (daysToDayOfWeek > end) {
+ daysToDayOfWeek -= 7;
+ }
+
+ if (daysToDayOfWeek < end - 7) {
+ daysToDayOfWeek += 7;
+ }
+
+ adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd');
+ return {
+ week: Math.ceil(adjustedMoment.dayOfYear() / 7),
+ year: adjustedMoment.year()
+ };
+ }
+
+ //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+ function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
+ var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
+
+ d = d === 0 ? 7 : d;
+ weekday = weekday != null ? weekday : firstDayOfWeek;
+ daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
+ dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
+
+ return {
+ year: dayOfYear > 0 ? year : year - 1,
+ dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear
+ };
+ }
+
+ /************************************
+ Top Level Functions
+ ************************************/
+
+ function makeMoment(config) {
+ var input = config._i,
+ format = config._f,
+ res;
+
+ config._locale = config._locale || moment.localeData(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return moment.invalid({nullInput: true});
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (moment.isMoment(input)) {
+ return new Moment(input, true);
+ } else if (format) {
+ if (isArray(format)) {
+ makeDateFromStringAndArray(config);
+ } else {
+ makeDateFromStringAndFormat(config);
+ }
+ } else {
+ makeDateFromInput(config);
+ }
+
+ res = new Moment(config);
+ if (res._nextDay) {
+ // Adding is smart enough around DST
+ res.add(1, 'd');
+ res._nextDay = undefined;
+ }
+
+ return res;
+ }
+
+ moment = function (input, format, locale, strict) {
+ var c;
+
+ if (typeof(locale) === 'boolean') {
+ strict = locale;
+ locale = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c = {};
+ c._isAMomentObject = true;
+ c._i = input;
+ c._f = format;
+ c._l = locale;
+ c._strict = strict;
+ c._isUTC = false;
+ c._pf = defaultParsingFlags();
+
+ return makeMoment(c);
+ };
+
+ moment.suppressDeprecationWarnings = false;
+
+ moment.createFromInputFallback = deprecate(
+ '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 (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+ }
+ );
+
+ // Pick a moment m from moments so that m[fn](other) is true for all
+ // other. This relies on the function fn to be transitive.
+ //
+ // moments should either be an array of moment objects or an array, whose
+ // first element is an array of moment objects.
+ function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return moment();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+ }
+
+ moment.min = function () {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+ };
+
+ moment.max = function () {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+ };
+
+ // creating with utc
+ moment.utc = function (input, format, locale, strict) {
+ var c;
+
+ if (typeof(locale) === 'boolean') {
+ strict = locale;
+ locale = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c = {};
+ c._isAMomentObject = true;
+ c._useUTC = true;
+ c._isUTC = true;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+ c._pf = defaultParsingFlags();
+
+ return makeMoment(c).utc();
+ };
+
+ // creating with unix timestamp (in seconds)
+ moment.unix = function (input) {
+ return moment(input * 1000);
+ };
+
+ // duration
+ moment.duration = function (input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ parseIso,
+ diffRes;
+
+ if (moment.isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months
+ };
+ } else if (typeof input === 'number') {
+ duration = {};
+ if (key) {
+ duration[key] = input;
+ } else {
+ duration.milliseconds = input;
+ }
+ } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
+ sign = (match[1] === '-') ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(match[MILLISECOND]) * sign
+ };
+ } else if (!!(match = isoDurationRegex.exec(input))) {
+ sign = (match[1] === '-') ? -1 : 1;
+ parseIso = function (inp) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+ };
+ duration = {
+ y: parseIso(match[2]),
+ M: parseIso(match[3]),
+ d: parseIso(match[4]),
+ h: parseIso(match[5]),
+ m: parseIso(match[6]),
+ s: parseIso(match[7]),
+ w: parseIso(match[8])
+ };
+ } else if (typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)) {
+ diffRes = momentsDifference(moment(duration.from), moment(duration.to));
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (moment.isDuration(input) && hasOwnProp(input, '_locale')) {
+ ret._locale = input._locale;
+ }
+
+ return ret;
+ };
+
+ // version number
+ moment.version = VERSION;
+
+ // default format
+ moment.defaultFormat = isoFormat;
+
+ // constant that refers to the ISO standard
+ moment.ISO_8601 = function () {};
+
+ // Plugins that add properties should also add the key here (null value),
+ // so we can properly clone ourselves.
+ moment.momentProperties = momentProperties;
+
+ // This function will be called whenever a moment is mutated.
+ // It is intended to keep the offset in sync with the timezone.
+ moment.updateOffset = function () {};
+
+ // This function allows you to set a threshold for relative time strings
+ moment.relativeTimeThreshold = function (threshold, limit) {
+ if (relativeTimeThresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return relativeTimeThresholds[threshold];
+ }
+ relativeTimeThresholds[threshold] = limit;
+ return true;
+ };
+
+ moment.lang = deprecate(
+ 'moment.lang is deprecated. Use moment.locale instead.',
+ function (key, value) {
+ return moment.locale(key, value);
+ }
+ );
+
+ // This function will load locale and then set the global locale. If
+ // no arguments are passed in, it will simply return the current global
+ // locale key.
+ moment.locale = function (key, values) {
+ var data;
+ if (key) {
+ if (typeof(values) !== 'undefined') {
+ data = moment.defineLocale(key, values);
+ }
+ else {
+ data = moment.localeData(key);
+ }
+
+ if (data) {
+ moment.duration._locale = moment._locale = data;
+ }
+ }
+
+ return moment._locale._abbr;
+ };
+
+ moment.defineLocale = function (name, values) {
+ if (values !== null) {
+ values.abbr = name;
+ if (!locales[name]) {
+ locales[name] = new Locale();
+ }
+ locales[name].set(values);
+
+ // backwards compat for now: also set the locale
+ moment.locale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+ };
+
+ moment.langData = deprecate(
+ 'moment.langData is deprecated. Use moment.localeData instead.',
+ function (key) {
+ return moment.localeData(key);
+ }
+ );
+
+ // returns locale data
+ moment.localeData = function (key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return moment._locale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+ };
+
+ // compare moment object
+ moment.isMoment = function (obj) {
+ return obj instanceof Moment ||
+ (obj != null && hasOwnProp(obj, '_isAMomentObject'));
+ };
+
+ // for typechecking Duration objects
+ moment.isDuration = function (obj) {
+ return obj instanceof Duration;
+ };
+
+ for (i = lists.length - 1; i >= 0; --i) {
+ makeList(lists[i]);
+ }
+
+ moment.normalizeUnits = function (units) {
+ return normalizeUnits(units);
+ };
+
+ moment.invalid = function (flags) {
+ var m = moment.utc(NaN);
+ if (flags != null) {
+ extend(m._pf, flags);
+ }
+ else {
+ m._pf.userInvalidated = true;
+ }
+
+ return m;
+ };
+
+ moment.parseZone = function () {
+ return moment.apply(null, arguments).parseZone();
+ };
+
+ moment.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+ };
+
+ /************************************
+ Moment Prototype
+ ************************************/
+
+
+ extend(moment.fn = Moment.prototype, {
+
+ clone : function () {
+ return moment(this);
+ },
+
+ valueOf : function () {
+ return +this._d + ((this._offset || 0) * 60000);
+ },
+
+ unix : function () {
+ return Math.floor(+this / 1000);
+ },
+
+ 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 m = moment(this).utc();
+ if (0 < m.year() && m.year() <= 9999) {
+ if ('function' === typeof Date.prototype.toISOString) {
+ // native implementation is ~50x faster, use it when we can
+ return this.toDate().toISOString();
+ } else {
+ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+ }
+ } else {
+ return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+ }
+ },
+
+ toArray : function () {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hours(),
+ m.minutes(),
+ m.seconds(),
+ m.milliseconds()
+ ];
+ },
+
+ isValid : function () {
+ return isValid(this);
+ },
+
+ isDSTShifted : function () {
+ if (this._a) {
+ return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
+ }
+
+ return false;
+ },
+
+ parsingFlags : function () {
+ return extend({}, this._pf);
+ },
+
+ invalidAt: function () {
+ return this._pf.overflow;
+ },
+
+ utc : function (keepLocalTime) {
+ return this.zone(0, keepLocalTime);
+ },
+
+ local : function (keepLocalTime) {
+ if (this._isUTC) {
+ this.zone(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.add(this._dateTzOffset(), 'm');
+ }
+ }
+ return this;
+ },
+
+ format : function (inputString) {
+ var output = formatMoment(this, inputString || moment.defaultFormat);
+ return this.localeData().postformat(output);
+ },
+
+ add : createAdder(1, 'add'),
+
+ subtract : createAdder(-1, 'subtract'),
+
+ diff : function (input, units, asFloat) {
+ var that = makeAs(input, this),
+ zoneDiff = (this.zone() - that.zone()) * 6e4,
+ diff, output, daysAdjust;
+
+ units = normalizeUnits(units);
+
+ if (units === 'year' || units === 'month') {
+ // average number of days in the months in the given dates
+ diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
+ // difference in months
+ output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
+ // adjust by taking difference in days, average number of days
+ // and dst in the given months.
+ daysAdjust = (this - moment(this).startOf('month')) -
+ (that - moment(that).startOf('month'));
+ // same as above but with zones, to negate all dst
+ daysAdjust -= ((this.zone() - moment(this).startOf('month').zone()) -
+ (that.zone() - moment(that).startOf('month').zone())) * 6e4;
+ output += daysAdjust / diff;
+ if (units === 'year') {
+ output = output / 12;
+ }
+ } else {
+ diff = (this - that);
+ output = units === 'second' ? diff / 1e3 : // 1000
+ units === 'minute' ? diff / 6e4 : // 1000 * 60
+ units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
+ units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
+ units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
+ diff;
+ }
+ return asFloat ? output : absRound(output);
+ },
+
+ from : function (time, withoutSuffix) {
+ return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
+ },
+
+ fromNow : function (withoutSuffix) {
+ return this.from(moment(), withoutSuffix);
+ },
+
+ calendar : function (time) {
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're zone'd or not.
+ var now = time || moment(),
+ sod = makeAs(now, this).startOf('day'),
+ diff = this.diff(sod, 'days', true),
+ format = diff < -6 ? 'sameElse' :
+ diff < -1 ? 'lastWeek' :
+ diff < 0 ? 'lastDay' :
+ diff < 1 ? 'sameDay' :
+ diff < 2 ? 'nextDay' :
+ diff < 7 ? 'nextWeek' : 'sameElse';
+ return this.format(this.localeData().calendar(format, this, moment(now)));
+ },
+
+ isLeapYear : function () {
+ return isLeapYear(this.year());
+ },
+
+ isDST : function () {
+ return (this.zone() < this.clone().month(0).zone() ||
+ this.zone() < this.clone().month(5).zone());
+ },
+
+ day : function (input) {
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+ },
+
+ month : makeAccessor('Month', true),
+
+ startOf : function (units) {
+ units = normalizeUnits(units);
+ // the following switch intentionally omits break keywords
+ // to utilize falling through the cases.
+ switch (units) {
+ case 'year':
+ this.month(0);
+ /* falls through */
+ case 'quarter':
+ case 'month':
+ this.date(1);
+ /* falls through */
+ case 'week':
+ case 'isoWeek':
+ case 'day':
+ this.hours(0);
+ /* falls through */
+ case 'hour':
+ this.minutes(0);
+ /* falls through */
+ case 'minute':
+ this.seconds(0);
+ /* falls through */
+ case 'second':
+ this.milliseconds(0);
+ /* falls through */
+ }
+
+ // weeks are a special case
+ if (units === 'week') {
+ this.weekday(0);
+ } else if (units === 'isoWeek') {
+ this.isoWeekday(1);
+ }
+
+ // quarters are also special
+ if (units === 'quarter') {
+ this.month(Math.floor(this.month() / 3) * 3);
+ }
+
+ return this;
+ },
+
+ endOf: function (units) {
+ units = normalizeUnits(units);
+ if (units === undefined || units === 'millisecond') {
+ return this;
+ }
+ return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
+ },
+
+ isAfter: function (input, units) {
+ var inputMs;
+ units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
+ if (units === 'millisecond') {
+ input = moment.isMoment(input) ? input : moment(input);
+ return +this > +input;
+ } else {
+ inputMs = moment.isMoment(input) ? +input : +moment(input);
+ return inputMs < +this.clone().startOf(units);
+ }
+ },
+
+ isBefore: function (input, units) {
+ var inputMs;
+ units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
+ if (units === 'millisecond') {
+ input = moment.isMoment(input) ? input : moment(input);
+ return +this < +input;
+ } else {
+ inputMs = moment.isMoment(input) ? +input : +moment(input);
+ return +this.clone().endOf(units) < inputMs;
+ }
+ },
+
+ isSame: function (input, units) {
+ var inputMs;
+ units = normalizeUnits(units || 'millisecond');
+ if (units === 'millisecond') {
+ input = moment.isMoment(input) ? input : moment(input);
+ return +this === +input;
+ } else {
+ inputMs = +moment(input);
+ return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
+ }
+ },
+
+ min: deprecate(
+ 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
+ function (other) {
+ other = moment.apply(null, arguments);
+ return other < this ? this : other;
+ }
+ ),
+
+ max: deprecate(
+ 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
+ function (other) {
+ other = moment.apply(null, arguments);
+ return other > this ? this : other;
+ }
+ ),
+
+ // keepLocalTime = true means only change the timezone, without
+ // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]-->
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone
+ // +0200, so we adjust the time as needed, to be valid.
+ //
+ // Keeping the time actually adds/subtracts (one hour)
+ // from the actual represented time. That is why we call updateOffset
+ // a second time. In case it wants us to change the offset again
+ // _changeInProgress == true case, then we have to adjust, because
+ // there is no such time in the given timezone.
+ zone : function (input, keepLocalTime) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = timezoneMinutesFromString(input);
+ }
+ if (Math.abs(input) < 16) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = this._dateTzOffset();
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.subtract(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addOrSubtractDurationFromMoment(this,
+ moment.duration(offset - input, 'm'), 1, false);
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ moment.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ } else {
+ return this._isUTC ? offset : this._dateTzOffset();
+ }
+ return this;
+ },
+
+ zoneAbbr : function () {
+ return this._isUTC ? 'UTC' : '';
+ },
+
+ zoneName : function () {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+ },
+
+ parseZone : function () {
+ if (this._tzm) {
+ this.zone(this._tzm);
+ } else if (typeof this._i === 'string') {
+ this.zone(this._i);
+ }
+ return this;
+ },
+
+ hasAlignedHourOffset : function (input) {
+ if (!input) {
+ input = 0;
+ }
+ else {
+ input = moment(input).zone();
+ }
+
+ return (this.zone() - input) % 60 === 0;
+ },
+
+ daysInMonth : function () {
+ return daysInMonth(this.year(), this.month());
+ },
+
+ dayOfYear : function (input) {
+ var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
+ return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
+ },
+
+ quarter : function (input) {
+ return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
+ },
+
+ weekYear : function (input) {
+ var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
+ return input == null ? year :
<TRUNCATED>
[32/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/backbone-1.1.2.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/backbone-1.1.2.js b/htrace-core/src/web/lib/js/backbone-1.1.2.js
deleted file mode 100644
index 5da4943..0000000
--- a/htrace-core/src/web/lib/js/backbone-1.1.2.js
+++ /dev/null
@@ -1,1608 +0,0 @@
-// Backbone.js 1.1.2
-
-// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-
-(function(root, factory) {
-
- // Set up Backbone appropriately for the environment. Start with AMD.
- if (typeof define === 'function' && define.amd) {
- define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
- // Export global even in AMD case in case this script is loaded with
- // others that may still expect a global Backbone.
- root.Backbone = factory(root, exports, _, $);
- });
-
- // Next for Node.js or CommonJS. jQuery may not be needed as a module.
- } else if (typeof exports !== 'undefined') {
- var _ = require('underscore');
- factory(root, exports, _);
-
- // Finally, as a browser global.
- } else {
- root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
- }
-
-}(this, function(root, Backbone, _, $) {
-
- // Initial Setup
- // -------------
-
- // Save the previous value of the `Backbone` variable, so that it can be
- // restored later on, if `noConflict` is used.
- var previousBackbone = root.Backbone;
-
- // Create local references to array methods we'll want to use later.
- var array = [];
- var push = array.push;
- var slice = array.slice;
- var splice = array.splice;
-
- // Current version of the library. Keep in sync with `package.json`.
- Backbone.VERSION = '1.1.2';
-
- // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
- // the `$` variable.
- Backbone.$ = $;
-
- // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
- // to its previous owner. Returns a reference to this Backbone object.
- Backbone.noConflict = function() {
- root.Backbone = previousBackbone;
- return this;
- };
-
- // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
- // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
- // set a `X-Http-Method-Override` header.
- Backbone.emulateHTTP = false;
-
- // Turn on `emulateJSON` to support legacy servers that can't deal with direct
- // `application/json` requests ... will encode the body as
- // `application/x-www-form-urlencoded` instead and will send the model in a
- // form param named `model`.
- Backbone.emulateJSON = false;
-
- // Backbone.Events
- // ---------------
-
- // A module that can be mixed in to *any object* in order to provide it with
- // custom events. You may bind with `on` or remove with `off` callback
- // functions to an event; `trigger`-ing an event fires all callbacks in
- // succession.
- //
- // var object = {};
- // _.extend(object, Backbone.Events);
- // object.on('expand', function(){ alert('expanded'); });
- // object.trigger('expand');
- //
- var Events = Backbone.Events = {
-
- // Bind an event to a `callback` function. Passing `"all"` will bind
- // the callback to all events fired.
- on: function(name, callback, context) {
- if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
- this._events || (this._events = {});
- var events = this._events[name] || (this._events[name] = []);
- events.push({callback: callback, context: context, ctx: context || this});
- return this;
- },
-
- // Bind an event to only be triggered a single time. After the first time
- // the callback is invoked, it will be removed.
- once: function(name, callback, context) {
- if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
- var self = this;
- var once = _.once(function() {
- self.off(name, once);
- callback.apply(this, arguments);
- });
- once._callback = callback;
- return this.on(name, once, context);
- },
-
- // Remove one or many callbacks. If `context` is null, removes all
- // callbacks with that function. If `callback` is null, removes all
- // callbacks for the event. If `name` is null, removes all bound
- // callbacks for all events.
- off: function(name, callback, context) {
- var retain, ev, events, names, i, l, j, k;
- if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
- if (!name && !callback && !context) {
- this._events = void 0;
- return this;
- }
- names = name ? [name] : _.keys(this._events);
- for (i = 0, l = names.length; i < l; i++) {
- name = names[i];
- if (events = this._events[name]) {
- this._events[name] = retain = [];
- if (callback || context) {
- for (j = 0, k = events.length; j < k; j++) {
- ev = events[j];
- if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||
- (context && context !== ev.context)) {
- retain.push(ev);
- }
- }
- }
- if (!retain.length) delete this._events[name];
- }
- }
-
- return this;
- },
-
- // Trigger one or many events, firing all bound callbacks. Callbacks are
- // passed the same arguments as `trigger` is, apart from the event name
- // (unless you're listening on `"all"`, which will cause your callback to
- // receive the true name of the event as the first argument).
- trigger: function(name) {
- if (!this._events) return this;
- var args = slice.call(arguments, 1);
- if (!eventsApi(this, 'trigger', name, args)) return this;
- var events = this._events[name];
- var allEvents = this._events.all;
- if (events) triggerEvents(events, args);
- if (allEvents) triggerEvents(allEvents, arguments);
- return this;
- },
-
- // Tell this object to stop listening to either specific events ... or
- // to every object it's currently listening to.
- stopListening: function(obj, name, callback) {
- var listeningTo = this._listeningTo;
- if (!listeningTo) return this;
- var remove = !name && !callback;
- if (!callback && typeof name === 'object') callback = this;
- if (obj) (listeningTo = {})[obj._listenId] = obj;
- for (var id in listeningTo) {
- obj = listeningTo[id];
- obj.off(name, callback, this);
- if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];
- }
- return this;
- }
-
- };
-
- // Regular expression used to split event strings.
- var eventSplitter = /\s+/;
-
- // Implement fancy features of the Events API such as multiple event
- // names `"change blur"` and jQuery-style event maps `{change: action}`
- // in terms of the existing API.
- var eventsApi = function(obj, action, name, rest) {
- if (!name) return true;
-
- // Handle event maps.
- if (typeof name === 'object') {
- for (var key in name) {
- obj[action].apply(obj, [key, name[key]].concat(rest));
- }
- return false;
- }
-
- // Handle space separated event names.
- if (eventSplitter.test(name)) {
- var names = name.split(eventSplitter);
- for (var i = 0, l = names.length; i < l; i++) {
- obj[action].apply(obj, [names[i]].concat(rest));
- }
- return false;
- }
-
- return true;
- };
-
- // A difficult-to-believe, but optimized internal dispatch function for
- // triggering events. Tries to keep the usual cases speedy (most internal
- // Backbone events have 3 arguments).
- var triggerEvents = function(events, args) {
- var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
- switch (args.length) {
- case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
- case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
- case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
- case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
- default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
- }
- };
-
- var listenMethods = {listenTo: 'on', listenToOnce: 'once'};
-
- // Inversion-of-control versions of `on` and `once`. Tell *this* object to
- // listen to an event in another object ... keeping track of what it's
- // listening to.
- _.each(listenMethods, function(implementation, method) {
- Events[method] = function(obj, name, callback) {
- var listeningTo = this._listeningTo || (this._listeningTo = {});
- var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
- listeningTo[id] = obj;
- if (!callback && typeof name === 'object') callback = this;
- obj[implementation](name, callback, this);
- return this;
- };
- });
-
- // Aliases for backwards compatibility.
- Events.bind = Events.on;
- Events.unbind = Events.off;
-
- // Allow the `Backbone` object to serve as a global event bus, for folks who
- // want global "pubsub" in a convenient place.
- _.extend(Backbone, Events);
-
- // Backbone.Model
- // --------------
-
- // Backbone **Models** are the basic data object in the framework --
- // frequently representing a row in a table in a database on your server.
- // A discrete chunk of data and a bunch of useful, related methods for
- // performing computations and transformations on that data.
-
- // Create a new model with the specified attributes. A client id (`cid`)
- // is automatically generated and assigned for you.
- var Model = Backbone.Model = function(attributes, options) {
- var attrs = attributes || {};
- options || (options = {});
- this.cid = _.uniqueId('c');
- this.attributes = {};
- if (options.collection) this.collection = options.collection;
- if (options.parse) attrs = this.parse(attrs, options) || {};
- attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
- this.set(attrs, options);
- this.changed = {};
- this.initialize.apply(this, arguments);
- };
-
- // Attach all inheritable methods to the Model prototype.
- _.extend(Model.prototype, Events, {
-
- // A hash of attributes whose current and previous value differ.
- changed: null,
-
- // The value returned during the last failed validation.
- validationError: null,
-
- // The default name for the JSON `id` attribute is `"id"`. MongoDB and
- // CouchDB users may want to set this to `"_id"`.
- idAttribute: 'id',
-
- // Initialize is an empty function by default. Override it with your own
- // initialization logic.
- initialize: function(){},
-
- // Return a copy of the model's `attributes` object.
- toJSON: function(options) {
- return _.clone(this.attributes);
- },
-
- // Proxy `Backbone.sync` by default -- but override this if you need
- // custom syncing semantics for *this* particular model.
- sync: function() {
- return Backbone.sync.apply(this, arguments);
- },
-
- // Get the value of an attribute.
- get: function(attr) {
- return this.attributes[attr];
- },
-
- // Get the HTML-escaped value of an attribute.
- escape: function(attr) {
- return _.escape(this.get(attr));
- },
-
- // Returns `true` if the attribute contains a value that is not null
- // or undefined.
- has: function(attr) {
- return this.get(attr) != null;
- },
-
- // Set a hash of model attributes on the object, firing `"change"`. This is
- // the core primitive operation of a model, updating the data and notifying
- // anyone who needs to know about the change in state. The heart of the beast.
- set: function(key, val, options) {
- var attr, attrs, unset, changes, silent, changing, prev, current;
- if (key == null) return this;
-
- // Handle both `"key", value` and `{key: value}` -style arguments.
- if (typeof key === 'object') {
- attrs = key;
- options = val;
- } else {
- (attrs = {})[key] = val;
- }
-
- options || (options = {});
-
- // Run validation.
- if (!this._validate(attrs, options)) return false;
-
- // Extract attributes and options.
- unset = options.unset;
- silent = options.silent;
- changes = [];
- changing = this._changing;
- this._changing = true;
-
- if (!changing) {
- this._previousAttributes = _.clone(this.attributes);
- this.changed = {};
- }
- current = this.attributes, prev = this._previousAttributes;
-
- // Check for changes of `id`.
- if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
-
- // For each `set` attribute, update or delete the current value.
- for (attr in attrs) {
- val = attrs[attr];
- if (!_.isEqual(current[attr], val)) changes.push(attr);
- if (!_.isEqual(prev[attr], val)) {
- this.changed[attr] = val;
- } else {
- delete this.changed[attr];
- }
- unset ? delete current[attr] : current[attr] = val;
- }
-
- // Trigger all relevant attribute changes.
- if (!silent) {
- if (changes.length) this._pending = options;
- for (var i = 0, l = changes.length; i < l; i++) {
- this.trigger('change:' + changes[i], this, current[changes[i]], options);
- }
- }
-
- // You might be wondering why there's a `while` loop here. Changes can
- // be recursively nested within `"change"` events.
- if (changing) return this;
- if (!silent) {
- while (this._pending) {
- options = this._pending;
- this._pending = false;
- this.trigger('change', this, options);
- }
- }
- this._pending = false;
- this._changing = false;
- return this;
- },
-
- // Remove an attribute from the model, firing `"change"`. `unset` is a noop
- // if the attribute doesn't exist.
- unset: function(attr, options) {
- return this.set(attr, void 0, _.extend({}, options, {unset: true}));
- },
-
- // Clear all attributes on the model, firing `"change"`.
- clear: function(options) {
- var attrs = {};
- for (var key in this.attributes) attrs[key] = void 0;
- return this.set(attrs, _.extend({}, options, {unset: true}));
- },
-
- // Determine if the model has changed since the last `"change"` event.
- // If you specify an attribute name, determine if that attribute has changed.
- hasChanged: function(attr) {
- if (attr == null) return !_.isEmpty(this.changed);
- return _.has(this.changed, attr);
- },
-
- // Return an object containing all the attributes that have changed, or
- // false if there are no changed attributes. Useful for determining what
- // parts of a view need to be updated and/or what attributes need to be
- // persisted to the server. Unset attributes will be set to undefined.
- // You can also pass an attributes object to diff against the model,
- // determining if there *would be* a change.
- changedAttributes: function(diff) {
- if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
- var val, changed = false;
- var old = this._changing ? this._previousAttributes : this.attributes;
- for (var attr in diff) {
- if (_.isEqual(old[attr], (val = diff[attr]))) continue;
- (changed || (changed = {}))[attr] = val;
- }
- return changed;
- },
-
- // Get the previous value of an attribute, recorded at the time the last
- // `"change"` event was fired.
- previous: function(attr) {
- if (attr == null || !this._previousAttributes) return null;
- return this._previousAttributes[attr];
- },
-
- // Get all of the attributes of the model at the time of the previous
- // `"change"` event.
- previousAttributes: function() {
- return _.clone(this._previousAttributes);
- },
-
- // Fetch the model from the server. If the server's representation of the
- // model differs from its current attributes, they will be overridden,
- // triggering a `"change"` event.
- fetch: function(options) {
- options = options ? _.clone(options) : {};
- if (options.parse === void 0) options.parse = true;
- var model = this;
- var success = options.success;
- options.success = function(resp) {
- if (!model.set(model.parse(resp, options), options)) return false;
- if (success) success(model, resp, options);
- model.trigger('sync', model, resp, options);
- };
- wrapError(this, options);
- return this.sync('read', this, options);
- },
-
- // Set a hash of model attributes, and sync the model to the server.
- // If the server returns an attributes hash that differs, the model's
- // state will be `set` again.
- save: function(key, val, options) {
- var attrs, method, xhr, attributes = this.attributes;
-
- // Handle both `"key", value` and `{key: value}` -style arguments.
- if (key == null || typeof key === 'object') {
- attrs = key;
- options = val;
- } else {
- (attrs = {})[key] = val;
- }
-
- options = _.extend({validate: true}, options);
-
- // If we're not waiting and attributes exist, save acts as
- // `set(attr).save(null, opts)` with validation. Otherwise, check if
- // the model will be valid when the attributes, if any, are set.
- if (attrs && !options.wait) {
- if (!this.set(attrs, options)) return false;
- } else {
- if (!this._validate(attrs, options)) return false;
- }
-
- // Set temporary attributes if `{wait: true}`.
- if (attrs && options.wait) {
- this.attributes = _.extend({}, attributes, attrs);
- }
-
- // After a successful server-side save, the client is (optionally)
- // updated with the server-side state.
- if (options.parse === void 0) options.parse = true;
- var model = this;
- var success = options.success;
- options.success = function(resp) {
- // Ensure attributes are restored during synchronous saves.
- model.attributes = attributes;
- var serverAttrs = model.parse(resp, options);
- if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
- if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
- return false;
- }
- if (success) success(model, resp, options);
- model.trigger('sync', model, resp, options);
- };
- wrapError(this, options);
-
- method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
- if (method === 'patch') options.attrs = attrs;
- xhr = this.sync(method, this, options);
-
- // Restore attributes.
- if (attrs && options.wait) this.attributes = attributes;
-
- return xhr;
- },
-
- // Destroy this model on the server if it was already persisted.
- // Optimistically removes the model from its collection, if it has one.
- // If `wait: true` is passed, waits for the server to respond before removal.
- destroy: function(options) {
- options = options ? _.clone(options) : {};
- var model = this;
- var success = options.success;
-
- var destroy = function() {
- model.trigger('destroy', model, model.collection, options);
- };
-
- options.success = function(resp) {
- if (options.wait || model.isNew()) destroy();
- if (success) success(model, resp, options);
- if (!model.isNew()) model.trigger('sync', model, resp, options);
- };
-
- if (this.isNew()) {
- options.success();
- return false;
- }
- wrapError(this, options);
-
- var xhr = this.sync('delete', this, options);
- if (!options.wait) destroy();
- return xhr;
- },
-
- // Default URL for the model's representation on the server -- if you're
- // using Backbone's restful methods, override this to change the endpoint
- // that will be called.
- url: function() {
- var base =
- _.result(this, 'urlRoot') ||
- _.result(this.collection, 'url') ||
- urlError();
- if (this.isNew()) return base;
- return base.replace(/([^\/])$/, '$1/') + encodeURIComponent(this.id);
- },
-
- // **parse** converts a response into the hash of attributes to be `set` on
- // the model. The default implementation is just to pass the response along.
- parse: function(resp, options) {
- return resp;
- },
-
- // Create a new model with identical attributes to this one.
- clone: function() {
- return new this.constructor(this.attributes);
- },
-
- // A model is new if it has never been saved to the server, and lacks an id.
- isNew: function() {
- return !this.has(this.idAttribute);
- },
-
- // Check if the model is currently in a valid state.
- isValid: function(options) {
- return this._validate({}, _.extend(options || {}, { validate: true }));
- },
-
- // Run validation against the next complete set of model attributes,
- // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
- _validate: function(attrs, options) {
- if (!options.validate || !this.validate) return true;
- attrs = _.extend({}, this.attributes, attrs);
- var error = this.validationError = this.validate(attrs, options) || null;
- if (!error) return true;
- this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
- return false;
- }
-
- });
-
- // Underscore methods that we want to implement on the Model.
- var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit'];
-
- // Mix in each Underscore method as a proxy to `Model#attributes`.
- _.each(modelMethods, function(method) {
- Model.prototype[method] = function() {
- var args = slice.call(arguments);
- args.unshift(this.attributes);
- return _[method].apply(_, args);
- };
- });
-
- // Backbone.Collection
- // -------------------
-
- // If models tend to represent a single row of data, a Backbone Collection is
- // more analagous to a table full of data ... or a small slice or page of that
- // table, or a collection of rows that belong together for a particular reason
- // -- all of the messages in this particular folder, all of the documents
- // belonging to this particular author, and so on. Collections maintain
- // indexes of their models, both in order, and for lookup by `id`.
-
- // Create a new **Collection**, perhaps to contain a specific type of `model`.
- // If a `comparator` is specified, the Collection will maintain
- // its models in sort order, as they're added and removed.
- var Collection = Backbone.Collection = function(models, options) {
- options || (options = {});
- if (options.model) this.model = options.model;
- if (options.comparator !== void 0) this.comparator = options.comparator;
- this._reset();
- this.initialize.apply(this, arguments);
- if (models) this.reset(models, _.extend({silent: true}, options));
- };
-
- // Default options for `Collection#set`.
- var setOptions = {add: true, remove: true, merge: true};
- var addOptions = {add: true, remove: false};
-
- // Define the Collection's inheritable methods.
- _.extend(Collection.prototype, Events, {
-
- // The default model for a collection is just a **Backbone.Model**.
- // This should be overridden in most cases.
- model: Model,
-
- // Initialize is an empty function by default. Override it with your own
- // initialization logic.
- initialize: function(){},
-
- // The JSON representation of a Collection is an array of the
- // models' attributes.
- toJSON: function(options) {
- return this.map(function(model){ return model.toJSON(options); });
- },
-
- // Proxy `Backbone.sync` by default.
- sync: function() {
- return Backbone.sync.apply(this, arguments);
- },
-
- // Add a model, or list of models to the set.
- add: function(models, options) {
- return this.set(models, _.extend({merge: false}, options, addOptions));
- },
-
- // Remove a model, or a list of models from the set.
- remove: function(models, options) {
- var singular = !_.isArray(models);
- models = singular ? [models] : _.clone(models);
- options || (options = {});
- var i, l, index, model;
- for (i = 0, l = models.length; i < l; i++) {
- model = models[i] = this.get(models[i]);
- if (!model) continue;
- delete this._byId[model.id];
- delete this._byId[model.cid];
- index = this.indexOf(model);
- this.models.splice(index, 1);
- this.length--;
- if (!options.silent) {
- options.index = index;
- model.trigger('remove', model, this, options);
- }
- this._removeReference(model, options);
- }
- return singular ? models[0] : models;
- },
-
- // Update a collection by `set`-ing a new list of models, adding new ones,
- // removing models that are no longer present, and merging models that
- // already exist in the collection, as necessary. Similar to **Model#set**,
- // the core operation for updating the data contained by the collection.
- set: function(models, options) {
- options = _.defaults({}, options, setOptions);
- if (options.parse) models = this.parse(models, options);
- var singular = !_.isArray(models);
- models = singular ? (models ? [models] : []) : _.clone(models);
- var i, l, id, model, attrs, existing, sort;
- var at = options.at;
- var targetModel = this.model;
- var sortable = this.comparator && (at == null) && options.sort !== false;
- var sortAttr = _.isString(this.comparator) ? this.comparator : null;
- var toAdd = [], toRemove = [], modelMap = {};
- var add = options.add, merge = options.merge, remove = options.remove;
- var order = !sortable && add && remove ? [] : false;
-
- // Turn bare objects into model references, and prevent invalid models
- // from being added.
- for (i = 0, l = models.length; i < l; i++) {
- attrs = models[i] || {};
- if (attrs instanceof Model) {
- id = model = attrs;
- } else {
- id = attrs[targetModel.prototype.idAttribute || 'id'];
- }
-
- // If a duplicate is found, prevent it from being added and
- // optionally merge it into the existing model.
- if (existing = this.get(id)) {
- if (remove) modelMap[existing.cid] = true;
- if (merge) {
- attrs = attrs === model ? model.attributes : attrs;
- if (options.parse) attrs = existing.parse(attrs, options);
- existing.set(attrs, options);
- if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true;
- }
- models[i] = existing;
-
- // If this is a new, valid model, push it to the `toAdd` list.
- } else if (add) {
- model = models[i] = this._prepareModel(attrs, options);
- if (!model) continue;
- toAdd.push(model);
- this._addReference(model, options);
- }
-
- // Do not add multiple models with the same `id`.
- model = existing || model;
- if (order && (model.isNew() || !modelMap[model.id])) order.push(model);
- modelMap[model.id] = true;
- }
-
- // Remove nonexistent models if appropriate.
- if (remove) {
- for (i = 0, l = this.length; i < l; ++i) {
- if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
- }
- if (toRemove.length) this.remove(toRemove, options);
- }
-
- // See if sorting is needed, update `length` and splice in new models.
- if (toAdd.length || (order && order.length)) {
- if (sortable) sort = true;
- this.length += toAdd.length;
- if (at != null) {
- for (i = 0, l = toAdd.length; i < l; i++) {
- this.models.splice(at + i, 0, toAdd[i]);
- }
- } else {
- if (order) this.models.length = 0;
- var orderedModels = order || toAdd;
- for (i = 0, l = orderedModels.length; i < l; i++) {
- this.models.push(orderedModels[i]);
- }
- }
- }
-
- // Silently sort the collection if appropriate.
- if (sort) this.sort({silent: true});
-
- // Unless silenced, it's time to fire all appropriate add/sort events.
- if (!options.silent) {
- for (i = 0, l = toAdd.length; i < l; i++) {
- (model = toAdd[i]).trigger('add', model, this, options);
- }
- if (sort || (order && order.length)) this.trigger('sort', this, options);
- }
-
- // Return the added (or merged) model (or models).
- return singular ? models[0] : models;
- },
-
- // When you have more items than you want to add or remove individually,
- // you can reset the entire set with a new list of models, without firing
- // any granular `add` or `remove` events. Fires `reset` when finished.
- // Useful for bulk operations and optimizations.
- reset: function(models, options) {
- options || (options = {});
- for (var i = 0, l = this.models.length; i < l; i++) {
- this._removeReference(this.models[i], options);
- }
- options.previousModels = this.models;
- this._reset();
- models = this.add(models, _.extend({silent: true}, options));
- if (!options.silent) this.trigger('reset', this, options);
- return models;
- },
-
- // Add a model to the end of the collection.
- push: function(model, options) {
- return this.add(model, _.extend({at: this.length}, options));
- },
-
- // Remove a model from the end of the collection.
- pop: function(options) {
- var model = this.at(this.length - 1);
- this.remove(model, options);
- return model;
- },
-
- // Add a model to the beginning of the collection.
- unshift: function(model, options) {
- return this.add(model, _.extend({at: 0}, options));
- },
-
- // Remove a model from the beginning of the collection.
- shift: function(options) {
- var model = this.at(0);
- this.remove(model, options);
- return model;
- },
-
- // Slice out a sub-array of models from the collection.
- slice: function() {
- return slice.apply(this.models, arguments);
- },
-
- // Get a model from the set by id.
- get: function(obj) {
- if (obj == null) return void 0;
- return this._byId[obj] || this._byId[obj.id] || this._byId[obj.cid];
- },
-
- // Get the model at the given index.
- at: function(index) {
- return this.models[index];
- },
-
- // Return models with matching attributes. Useful for simple cases of
- // `filter`.
- where: function(attrs, first) {
- if (_.isEmpty(attrs)) return first ? void 0 : [];
- return this[first ? 'find' : 'filter'](function(model) {
- for (var key in attrs) {
- if (attrs[key] !== model.get(key)) return false;
- }
- return true;
- });
- },
-
- // Return the first model with matching attributes. Useful for simple cases
- // of `find`.
- findWhere: function(attrs) {
- return this.where(attrs, true);
- },
-
- // Force the collection to re-sort itself. You don't need to call this under
- // normal circumstances, as the set will maintain sort order as each item
- // is added.
- sort: function(options) {
- if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
- options || (options = {});
-
- // Run sort based on type of `comparator`.
- if (_.isString(this.comparator) || this.comparator.length === 1) {
- this.models = this.sortBy(this.comparator, this);
- } else {
- this.models.sort(_.bind(this.comparator, this));
- }
-
- if (!options.silent) this.trigger('sort', this, options);
- return this;
- },
-
- // Pluck an attribute from each model in the collection.
- pluck: function(attr) {
- return _.invoke(this.models, 'get', attr);
- },
-
- // Fetch the default set of models for this collection, resetting the
- // collection when they arrive. If `reset: true` is passed, the response
- // data will be passed through the `reset` method instead of `set`.
- fetch: function(options) {
- options = options ? _.clone(options) : {};
- if (options.parse === void 0) options.parse = true;
- var success = options.success;
- var collection = this;
- options.success = function(resp) {
- var method = options.reset ? 'reset' : 'set';
- collection[method](resp, options);
- if (success) success(collection, resp, options);
- collection.trigger('sync', collection, resp, options);
- };
- wrapError(this, options);
- return this.sync('read', this, options);
- },
-
- // Create a new instance of a model in this collection. Add the model to the
- // collection immediately, unless `wait: true` is passed, in which case we
- // wait for the server to agree.
- create: function(model, options) {
- options = options ? _.clone(options) : {};
- if (!(model = this._prepareModel(model, options))) return false;
- if (!options.wait) this.add(model, options);
- var collection = this;
- var success = options.success;
- options.success = function(model, resp) {
- if (options.wait) collection.add(model, options);
- if (success) success(model, resp, options);
- };
- model.save(null, options);
- return model;
- },
-
- // **parse** converts a response into a list of models to be added to the
- // collection. The default implementation is just to pass it through.
- parse: function(resp, options) {
- return resp;
- },
-
- // Create a new collection with an identical list of models as this one.
- clone: function() {
- return new this.constructor(this.models);
- },
-
- // Private method to reset all internal state. Called when the collection
- // is first initialized or reset.
- _reset: function() {
- this.length = 0;
- this.models = [];
- this._byId = {};
- },
-
- // Prepare a hash of attributes (or other model) to be added to this
- // collection.
- _prepareModel: function(attrs, options) {
- if (attrs instanceof Model) return attrs;
- options = options ? _.clone(options) : {};
- options.collection = this;
- var model = new this.model(attrs, options);
- if (!model.validationError) return model;
- this.trigger('invalid', this, model.validationError, options);
- return false;
- },
-
- // Internal method to create a model's ties to a collection.
- _addReference: function(model, options) {
- this._byId[model.cid] = model;
- if (model.id != null) this._byId[model.id] = model;
- if (!model.collection) model.collection = this;
- model.on('all', this._onModelEvent, this);
- },
-
- // Internal method to sever a model's ties to a collection.
- _removeReference: function(model, options) {
- if (this === model.collection) delete model.collection;
- model.off('all', this._onModelEvent, this);
- },
-
- // Internal method called every time a model in the set fires an event.
- // Sets need to update their indexes when models change ids. All other
- // events simply proxy through. "add" and "remove" events that originate
- // in other collections are ignored.
- _onModelEvent: function(event, model, collection, options) {
- if ((event === 'add' || event === 'remove') && collection !== this) return;
- if (event === 'destroy') this.remove(model, options);
- if (model && event === 'change:' + model.idAttribute) {
- delete this._byId[model.previous(model.idAttribute)];
- if (model.id != null) this._byId[model.id] = model;
- }
- this.trigger.apply(this, arguments);
- }
-
- });
-
- // Underscore methods that we want to implement on the Collection.
- // 90% of the core usefulness of Backbone Collections is actually implemented
- // right here:
- var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
- 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
- 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
- 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
- 'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle',
- 'lastIndexOf', 'isEmpty', 'chain', 'sample'];
-
- // Mix in each Underscore method as a proxy to `Collection#models`.
- _.each(methods, function(method) {
- Collection.prototype[method] = function() {
- var args = slice.call(arguments);
- args.unshift(this.models);
- return _[method].apply(_, args);
- };
- });
-
- // Underscore methods that take a property name as an argument.
- var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy'];
-
- // Use attributes instead of properties.
- _.each(attributeMethods, function(method) {
- Collection.prototype[method] = function(value, context) {
- var iterator = _.isFunction(value) ? value : function(model) {
- return model.get(value);
- };
- return _[method](this.models, iterator, context);
- };
- });
-
- // Backbone.View
- // -------------
-
- // Backbone Views are almost more convention than they are actual code. A View
- // is simply a JavaScript object that represents a logical chunk of UI in the
- // DOM. This might be a single item, an entire list, a sidebar or panel, or
- // even the surrounding frame which wraps your whole app. Defining a chunk of
- // UI as a **View** allows you to define your DOM events declaratively, without
- // having to worry about render order ... and makes it easy for the view to
- // react to specific changes in the state of your models.
-
- // Creating a Backbone.View creates its initial element outside of the DOM,
- // if an existing element is not provided...
- var View = Backbone.View = function(options) {
- this.cid = _.uniqueId('view');
- options || (options = {});
- _.extend(this, _.pick(options, viewOptions));
- this._ensureElement();
- this.initialize.apply(this, arguments);
- this.delegateEvents();
- };
-
- // Cached regex to split keys for `delegate`.
- var delegateEventSplitter = /^(\S+)\s*(.*)$/;
-
- // List of view options to be merged as properties.
- var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
-
- // Set up all inheritable **Backbone.View** properties and methods.
- _.extend(View.prototype, Events, {
-
- // The default `tagName` of a View's element is `"div"`.
- tagName: 'div',
-
- // jQuery delegate for element lookup, scoped to DOM elements within the
- // current view. This should be preferred to global lookups where possible.
- $: function(selector) {
- return this.$el.find(selector);
- },
-
- // Initialize is an empty function by default. Override it with your own
- // initialization logic.
- initialize: function(){},
-
- // **render** is the core function that your view should override, in order
- // to populate its element (`this.el`), with the appropriate HTML. The
- // convention is for **render** to always return `this`.
- render: function() {
- return this;
- },
-
- // Remove this view by taking the element out of the DOM, and removing any
- // applicable Backbone.Events listeners.
- remove: function() {
- this.$el.remove();
- this.stopListening();
- return this;
- },
-
- // Change the view's element (`this.el` property), including event
- // re-delegation.
- setElement: function(element, delegate) {
- if (this.$el) this.undelegateEvents();
- this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
- this.el = this.$el[0];
- if (delegate !== false) this.delegateEvents();
- return this;
- },
-
- // Set callbacks, where `this.events` is a hash of
- //
- // *{"event selector": "callback"}*
- //
- // {
- // 'mousedown .title': 'edit',
- // 'click .button': 'save',
- // 'click .open': function(e) { ... }
- // }
- //
- // pairs. Callbacks will be bound to the view, with `this` set properly.
- // Uses event delegation for efficiency.
- // Omitting the selector binds the event to `this.el`.
- // This only works for delegate-able events: not `focus`, `blur`, and
- // not `change`, `submit`, and `reset` in Internet Explorer.
- delegateEvents: function(events) {
- if (!(events || (events = _.result(this, 'events')))) return this;
- this.undelegateEvents();
- for (var key in events) {
- var method = events[key];
- if (!_.isFunction(method)) method = this[events[key]];
- if (!method) continue;
-
- var match = key.match(delegateEventSplitter);
- var eventName = match[1], selector = match[2];
- method = _.bind(method, this);
- eventName += '.delegateEvents' + this.cid;
- if (selector === '') {
- this.$el.on(eventName, method);
- } else {
- this.$el.on(eventName, selector, method);
- }
- }
- return this;
- },
-
- // Clears all callbacks previously bound to the view with `delegateEvents`.
- // You usually don't need to use this, but may wish to if you have multiple
- // Backbone views attached to the same DOM element.
- undelegateEvents: function() {
- this.$el.off('.delegateEvents' + this.cid);
- return this;
- },
-
- // Ensure that the View has a DOM element to render into.
- // If `this.el` is a string, pass it through `$()`, take the first
- // matching element, and re-assign it to `el`. Otherwise, create
- // an element from the `id`, `className` and `tagName` properties.
- _ensureElement: function() {
- if (!this.el) {
- var attrs = _.extend({}, _.result(this, 'attributes'));
- if (this.id) attrs.id = _.result(this, 'id');
- if (this.className) attrs['class'] = _.result(this, 'className');
- var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);
- this.setElement($el, false);
- } else {
- this.setElement(_.result(this, 'el'), false);
- }
- }
-
- });
-
- // Backbone.sync
- // -------------
-
- // Override this function to change the manner in which Backbone persists
- // models to the server. You will be passed the type of request, and the
- // model in question. By default, makes a RESTful Ajax request
- // to the model's `url()`. Some possible customizations could be:
- //
- // * Use `setTimeout` to batch rapid-fire updates into a single request.
- // * Send up the models as XML instead of JSON.
- // * Persist models via WebSockets instead of Ajax.
- //
- // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
- // as `POST`, with a `_method` parameter containing the true HTTP method,
- // as well as all requests with the body as `application/x-www-form-urlencoded`
- // instead of `application/json` with the model in a param named `model`.
- // Useful when interfacing with server-side languages like **PHP** that make
- // it difficult to read the body of `PUT` requests.
- Backbone.sync = function(method, model, options) {
- var type = methodMap[method];
-
- // Default options, unless specified.
- _.defaults(options || (options = {}), {
- emulateHTTP: Backbone.emulateHTTP,
- emulateJSON: Backbone.emulateJSON
- });
-
- // Default JSON-request options.
- var params = {type: type, dataType: 'json'};
-
- // Ensure that we have a URL.
- if (!options.url) {
- params.url = _.result(model, 'url') || urlError();
- }
-
- // Ensure that we have the appropriate request data.
- if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
- params.contentType = 'application/json';
- params.data = JSON.stringify(options.attrs || model.toJSON(options));
- }
-
- // For older servers, emulate JSON by encoding the request into an HTML-form.
- if (options.emulateJSON) {
- params.contentType = 'application/x-www-form-urlencoded';
- params.data = params.data ? {model: params.data} : {};
- }
-
- // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
- // And an `X-HTTP-Method-Override` header.
- if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
- params.type = 'POST';
- if (options.emulateJSON) params.data._method = type;
- var beforeSend = options.beforeSend;
- options.beforeSend = function(xhr) {
- xhr.setRequestHeader('X-HTTP-Method-Override', type);
- if (beforeSend) return beforeSend.apply(this, arguments);
- };
- }
-
- // Don't process data on a non-GET request.
- if (params.type !== 'GET' && !options.emulateJSON) {
- params.processData = false;
- }
-
- // If we're sending a `PATCH` request, and we're in an old Internet Explorer
- // that still has ActiveX enabled by default, override jQuery to use that
- // for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
- if (params.type === 'PATCH' && noXhrPatch) {
- params.xhr = function() {
- return new ActiveXObject("Microsoft.XMLHTTP");
- };
- }
-
- // Make the request, allowing the user to override any Ajax options.
- var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
- model.trigger('request', model, xhr, options);
- return xhr;
- };
-
- var noXhrPatch =
- typeof window !== 'undefined' && !!window.ActiveXObject &&
- !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
-
- // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
- var methodMap = {
- 'create': 'POST',
- 'update': 'PUT',
- 'patch': 'PATCH',
- 'delete': 'DELETE',
- 'read': 'GET'
- };
-
- // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
- // Override this if you'd like to use a different library.
- Backbone.ajax = function() {
- return Backbone.$.ajax.apply(Backbone.$, arguments);
- };
-
- // Backbone.Router
- // ---------------
-
- // Routers map faux-URLs to actions, and fire events when routes are
- // matched. Creating a new one sets its `routes` hash, if not set statically.
- var Router = Backbone.Router = function(options) {
- options || (options = {});
- if (options.routes) this.routes = options.routes;
- this._bindRoutes();
- this.initialize.apply(this, arguments);
- };
-
- // Cached regular expressions for matching named param parts and splatted
- // parts of route strings.
- var optionalParam = /\((.*?)\)/g;
- var namedParam = /(\(\?)?:\w+/g;
- var splatParam = /\*\w+/g;
- var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
-
- // Set up all inheritable **Backbone.Router** properties and methods.
- _.extend(Router.prototype, Events, {
-
- // Initialize is an empty function by default. Override it with your own
- // initialization logic.
- initialize: function(){},
-
- // Manually bind a single named route to a callback. For example:
- //
- // this.route('search/:query/p:num', 'search', function(query, num) {
- // ...
- // });
- //
- route: function(route, name, callback) {
- if (!_.isRegExp(route)) route = this._routeToRegExp(route);
- if (_.isFunction(name)) {
- callback = name;
- name = '';
- }
- if (!callback) callback = this[name];
- var router = this;
- Backbone.history.route(route, function(fragment) {
- var args = router._extractParameters(route, fragment);
- router.execute(callback, args);
- router.trigger.apply(router, ['route:' + name].concat(args));
- router.trigger('route', name, args);
- Backbone.history.trigger('route', router, name, args);
- });
- return this;
- },
-
- // Execute a route handler with the provided parameters. This is an
- // excellent place to do pre-route setup or post-route cleanup.
- execute: function(callback, args) {
- if (callback) callback.apply(this, args);
- },
-
- // Simple proxy to `Backbone.history` to save a fragment into the history.
- navigate: function(fragment, options) {
- Backbone.history.navigate(fragment, options);
- return this;
- },
-
- // Bind all defined routes to `Backbone.history`. We have to reverse the
- // order of the routes here to support behavior where the most general
- // routes can be defined at the bottom of the route map.
- _bindRoutes: function() {
- if (!this.routes) return;
- this.routes = _.result(this, 'routes');
- var route, routes = _.keys(this.routes);
- while ((route = routes.pop()) != null) {
- this.route(route, this.routes[route]);
- }
- },
-
- // Convert a route string into a regular expression, suitable for matching
- // against the current location hash.
- _routeToRegExp: function(route) {
- route = route.replace(escapeRegExp, '\\$&')
- .replace(optionalParam, '(?:$1)?')
- .replace(namedParam, function(match, optional) {
- return optional ? match : '([^/?]+)';
- })
- .replace(splatParam, '([^?]*?)');
- return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
- },
-
- // Given a route, and a URL fragment that it matches, return the array of
- // extracted decoded parameters. Empty or unmatched parameters will be
- // treated as `null` to normalize cross-browser behavior.
- _extractParameters: function(route, fragment) {
- var params = route.exec(fragment).slice(1);
- return _.map(params, function(param, i) {
- // Don't decode the search params.
- if (i === params.length - 1) return param || null;
- return param ? decodeURIComponent(param) : null;
- });
- }
-
- });
-
- // Backbone.History
- // ----------------
-
- // Handles cross-browser history management, based on either
- // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
- // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
- // and URL fragments. If the browser supports neither (old IE, natch),
- // falls back to polling.
- var History = Backbone.History = function() {
- this.handlers = [];
- _.bindAll(this, 'checkUrl');
-
- // Ensure that `History` can be used outside of the browser.
- if (typeof window !== 'undefined') {
- this.location = window.location;
- this.history = window.history;
- }
- };
-
- // Cached regex for stripping a leading hash/slash and trailing space.
- var routeStripper = /^[#\/]|\s+$/g;
-
- // Cached regex for stripping leading and trailing slashes.
- var rootStripper = /^\/+|\/+$/g;
-
- // Cached regex for detecting MSIE.
- var isExplorer = /msie [\w.]+/;
-
- // Cached regex for removing a trailing slash.
- var trailingSlash = /\/$/;
-
- // Cached regex for stripping urls of hash.
- var pathStripper = /#.*$/;
-
- // Has the history handling already been started?
- History.started = false;
-
- // Set up all inheritable **Backbone.History** properties and methods.
- _.extend(History.prototype, Events, {
-
- // The default interval to poll for hash changes, if necessary, is
- // twenty times a second.
- interval: 50,
-
- // Are we at the app root?
- atRoot: function() {
- return this.location.pathname.replace(/[^\/]$/, '$&/') === this.root;
- },
-
- // Gets the true hash value. Cannot use location.hash directly due to bug
- // in Firefox where location.hash will always be decoded.
- getHash: function(window) {
- var match = (window || this).location.href.match(/#(.*)$/);
- return match ? match[1] : '';
- },
-
- // Get the cross-browser normalized URL fragment, either from the URL,
- // the hash, or the override.
- getFragment: function(fragment, forcePushState) {
- if (fragment == null) {
- if (this._hasPushState || !this._wantsHashChange || forcePushState) {
- fragment = decodeURI(this.location.pathname + this.location.search);
- var root = this.root.replace(trailingSlash, '');
- if (!fragment.indexOf(root)) fragment = fragment.slice(root.length);
- } else {
- fragment = this.getHash();
- }
- }
- return fragment.replace(routeStripper, '');
- },
-
- // Start the hash change handling, returning `true` if the current URL matches
- // an existing route, and `false` otherwise.
- start: function(options) {
- if (History.started) throw new Error("Backbone.history has already been started");
- History.started = true;
-
- // Figure out the initial configuration. Do we need an iframe?
- // Is pushState desired ... is it available?
- this.options = _.extend({root: '/'}, this.options, options);
- this.root = this.options.root;
- this._wantsHashChange = this.options.hashChange !== false;
- this._wantsPushState = !!this.options.pushState;
- this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
- var fragment = this.getFragment();
- var docMode = document.documentMode;
- var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
-
- // Normalize root to always include a leading and trailing slash.
- this.root = ('/' + this.root + '/').replace(rootStripper, '/');
-
- if (oldIE && this._wantsHashChange) {
- var frame = Backbone.$('<iframe src="javascript:0" tabindex="-1">');
- this.iframe = frame.hide().appendTo('body')[0].contentWindow;
- this.navigate(fragment);
- }
-
- // Depending on whether we're using pushState or hashes, and whether
- // 'onhashchange' is supported, determine how we check the URL state.
- if (this._hasPushState) {
- Backbone.$(window).on('popstate', this.checkUrl);
- } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
- Backbone.$(window).on('hashchange', this.checkUrl);
- } else if (this._wantsHashChange) {
- this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
- }
-
- // Determine if we need to change the base url, for a pushState link
- // opened by a non-pushState browser.
- this.fragment = fragment;
- var loc = this.location;
-
- // Transition from hashChange to pushState or vice versa if both are
- // requested.
- if (this._wantsHashChange && this._wantsPushState) {
-
- // If we've started off with a route from a `pushState`-enabled
- // browser, but we're currently in a browser that doesn't support it...
- if (!this._hasPushState && !this.atRoot()) {
- this.fragment = this.getFragment(null, true);
- this.location.replace(this.root + '#' + this.fragment);
- // Return immediately as browser will do redirect to new url
- return true;
-
- // Or if we've started out with a hash-based route, but we're currently
- // in a browser where it could be `pushState`-based instead...
- } else if (this._hasPushState && this.atRoot() && loc.hash) {
- this.fragment = this.getHash().replace(routeStripper, '');
- this.history.replaceState({}, document.title, this.root + this.fragment);
- }
-
- }
-
- if (!this.options.silent) return this.loadUrl();
- },
-
- // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
- // but possibly useful for unit testing Routers.
- stop: function() {
- Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
- if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
- History.started = false;
- },
-
- // Add a route to be tested when the fragment changes. Routes added later
- // may override previous routes.
- route: function(route, callback) {
- this.handlers.unshift({route: route, callback: callback});
- },
-
- // Checks the current URL to see if it has changed, and if it has,
- // calls `loadUrl`, normalizing across the hidden iframe.
- checkUrl: function(e) {
- var current = this.getFragment();
- if (current === this.fragment && this.iframe) {
- current = this.getFragment(this.getHash(this.iframe));
- }
- if (current === this.fragment) return false;
- if (this.iframe) this.navigate(current);
- this.loadUrl();
- },
-
- // Attempt to load the current URL fragment. If a route succeeds with a
- // match, returns `true`. If no defined routes matches the fragment,
- // returns `false`.
- loadUrl: function(fragment) {
- fragment = this.fragment = this.getFragment(fragment);
- return _.any(this.handlers, function(handler) {
- if (handler.route.test(fragment)) {
- handler.callback(fragment);
- return true;
- }
- });
- },
-
- // Save a fragment into the hash history, or replace the URL state if the
- // 'replace' option is passed. You are responsible for properly URL-encoding
- // the fragment in advance.
- //
- // The options object can contain `trigger: true` if you wish to have the
- // route callback be fired (not usually desirable), or `replace: true`, if
- // you wish to modify the current URL without adding an entry to the history.
- navigate: function(fragment, options) {
- if (!History.started) return false;
- if (!options || options === true) options = {trigger: !!options};
-
- var url = this.root + (fragment = this.getFragment(fragment || ''));
-
- // Strip the hash for matching.
- fragment = fragment.replace(pathStripper, '');
-
- if (this.fragment === fragment) return;
- this.fragment = fragment;
-
- // Don't include a trailing slash on the root.
- if (fragment === '' && url !== '/') url = url.slice(0, -1);
-
- // If pushState is available, we use it to set the fragment as a real URL.
- if (this._hasPushState) {
- this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
-
- // If hash changes haven't been explicitly disabled, update the hash
- // fragment to store history.
- } else if (this._wantsHashChange) {
- this._updateHash(this.location, fragment, options.replace);
- if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {
- // Opening and closing the iframe tricks IE7 and earlier to push a
- // history entry on hash-tag change. When replace is true, we don't
- // want this.
- if(!options.replace) this.iframe.document.open().close();
- this._updateHash(this.iframe.location, fragment, options.replace);
- }
-
- // If you've told us that you explicitly don't want fallback hashchange-
- // based history, then `navigate` becomes a page refresh.
- } else {
- return this.location.assign(url);
- }
- if (options.trigger) return this.loadUrl(fragment);
- },
-
- // Update the hash location, either replacing the current entry, or adding
- // a new one to the browser history.
- _updateHash: function(location, fragment, replace) {
- if (replace) {
- var href = location.href.replace(/(javascript:|#).*$/, '');
- location.replace(href + '#' + fragment);
- } else {
- // Some browsers require that `hash` contains a leading #.
- location.hash = '#' + fragment;
- }
- }
-
- });
-
- // Create the default Backbone.history.
- Backbone.history = new History;
-
- // Helpers
- // -------
-
- // Helper function to correctly set up the prototype chain, for subclasses.
- // Similar to `goog.inherits`, but uses a hash of prototype properties and
- // class properties to be extended.
- var extend = function(protoProps, staticProps) {
- var parent = this;
- var child;
-
- // The constructor function for the new subclass is either defined by you
- // (the "constructor" property in your `extend` definition), or defaulted
- // by us to simply call the parent's constructor.
- if (protoProps && _.has(protoProps, 'constructor')) {
- child = protoProps.constructor;
- } else {
- child = function(){ return parent.apply(this, arguments); };
- }
-
- // Add static properties to the constructor function, if supplied.
- _.extend(child, parent, staticProps);
-
- // Set the prototype chain to inherit from `parent`, without calling
- // `parent`'s constructor function.
- var Surrogate = function(){ this.constructor = child; };
- Surrogate.prototype = parent.prototype;
- child.prototype = new Surrogate;
-
- // Add prototype properties (instance properties) to the subclass,
- // if supplied.
- if (protoProps) _.extend(child.prototype, protoProps);
-
- // Set a convenience property in case the parent's prototype is needed
- // later.
- child.__super__ = parent.prototype;
-
- return child;
- };
-
- // Set up inheritance for the model, collection, router, view and history.
- Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
-
- // Throw an error when a URL is needed, and none is supplied.
- var urlError = function() {
- throw new Error('A "url" property or function must be specified');
- };
-
- // Wrap an optional error callback with a fallback error event.
- var wrapError = function(model, options) {
- var error = options.error;
- options.error = function(resp) {
- if (error) error(model, resp, options);
- model.trigger('error', model, resp, options);
- };
- };
-
- return Backbone;
-
-}));
\ No newline at end of file
[41/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
HTRACE-154. Move go and web to htrace-htraced (abe via cmccabe)
Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/39e89ea0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/39e89ea0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/39e89ea0
Branch: refs/heads/master
Commit: 39e89ea021f4982d9145fdcd1c9d286c25e13073
Parents: af0bf3f
Author: Colin P. Mccabe <cm...@apache.org>
Authored: Wed Apr 22 16:02:14 2015 -0700
Committer: Colin P. Mccabe <cm...@apache.org>
Committed: Wed Apr 22 16:07:39 2015 -0700
----------------------------------------------------------------------
.gitignore | 8 +-
htrace-c/src/CMakeLists.txt | 4 +-
htrace-core/pom.xml | 47 -
htrace-core/src/go/BUILDING.txt | 30 -
htrace-core/src/go/Godeps/Godeps.json | 26 -
htrace-core/src/go/format.sh | 40 -
htrace-core/src/go/gobuild.sh | 111 -
.../go/src/org/apache/htrace/client/client.go | 244 -
.../go/src/org/apache/htrace/client/hclient.go | 151 -
.../src/go/src/org/apache/htrace/common/log.go | 268 -
.../go/src/org/apache/htrace/common/log_test.go | 122 -
.../go/src/org/apache/htrace/common/process.go | 67 -
.../go/src/org/apache/htrace/common/query.go | 117 -
.../src/org/apache/htrace/common/query_test.go | 50 -
.../src/go/src/org/apache/htrace/common/rest.go | 29 -
.../src/go/src/org/apache/htrace/common/rpc.go | 81 -
.../src/go/src/org/apache/htrace/common/span.go | 136 -
.../src/org/apache/htrace/common/span_test.go | 66 -
.../src/org/apache/htrace/common/test_util.go | 74 -
.../src/go/src/org/apache/htrace/conf/config.go | 266 -
.../src/org/apache/htrace/conf/config_keys.go | 86 -
.../src/org/apache/htrace/conf/config_test.go | 138 -
.../src/go/src/org/apache/htrace/conf/xml.go | 61 -
.../src/go/src/org/apache/htrace/htrace/cmd.go | 317 -
.../src/go/src/org/apache/htrace/htrace/file.go | 138 -
.../src/org/apache/htrace/htrace/file_test.go | 164 -
.../go/src/org/apache/htrace/htrace/graph.go | 116 -
.../src/org/apache/htrace/htrace/graph_test.go | 84 -
.../go/src/org/apache/htrace/htrace/queries.go | 161 -
.../org/apache/htrace/htraced/client_test.go | 206 -
.../src/org/apache/htrace/htraced/datastore.go | 929 --
.../org/apache/htrace/htraced/datastore_test.go | 445 -
.../go/src/org/apache/htrace/htraced/hrpc.go | 197 -
.../go/src/org/apache/htrace/htraced/htraced.go | 140 -
.../org/apache/htrace/htraced/mini_htraced.go | 165 -
.../go/src/org/apache/htrace/htraced/rest.go | 304 -
.../src/go/src/org/apache/htrace/test/random.go | 72 -
.../src/go/src/org/apache/htrace/test/util.go | 33 -
htrace-core/src/web/app/app.js | 20 -
htrace-core/src/web/app/models/span.js | 144 -
htrace-core/src/web/app/setup.js | 192 -
.../src/web/app/views/details/details.js | 47 -
htrace-core/src/web/app/views/graph/graph.js | 262 -
htrace-core/src/web/app/views/search/field.js | 124 -
htrace-core/src/web/app/views/search/search.js | 105 -
.../src/web/app/views/swimlane/swimlane.js | 178 -
htrace-core/src/web/index.html | 196 -
.../lib/bootstrap-3.3.1/css/bootstrap-theme.css | 470 -
.../bootstrap-3.3.1/css/bootstrap-theme.css.map | 1 -
.../bootstrap-3.3.1/css/bootstrap-theme.min.css | 5 -
.../web/lib/bootstrap-3.3.1/css/bootstrap.css | 6332 ------------
.../lib/bootstrap-3.3.1/css/bootstrap.css.map | 1 -
.../lib/bootstrap-3.3.1/css/bootstrap.min.css | 5 -
.../src/web/lib/bootstrap-3.3.1/js/bootstrap.js | 2320 -----
.../web/lib/bootstrap-3.3.1/js/bootstrap.min.js | 7 -
.../src/web/lib/bootstrap-3.3.1/js/npm.js | 13 -
.../src/web/lib/css/backgrid-0.3.5.min.css | 1 -
.../lib/css/backgrid-paginator-0.3.5.min.css | 1 -
htrace-core/src/web/lib/css/main.css | 45 -
htrace-core/src/web/lib/js/backbone-1.1.2.js | 1608 ---
.../web/lib/js/backbone.marionette-2.4.1.min.js | 23 -
.../src/web/lib/js/backbone.paginator-2.0.2.js | 1325 ---
htrace-core/src/web/lib/js/backgrid-0.3.5.js | 2883 ------
.../src/web/lib/js/backgrid-paginator-0.3.5.js | 433 -
htrace-core/src/web/lib/js/d3-3.5.5.js | 9504 ------------------
htrace-core/src/web/lib/js/jquery-2.1.3.min.js | 4 -
htrace-core/src/web/lib/js/moment-2.9.0.min.js | 7 -
htrace-core/src/web/lib/js/underscore-1.7.0.js | 1416 ---
htrace-core/src/web/lib/rome-2.1.0/rome.css | 94 -
htrace-core/src/web/lib/rome-2.1.0/rome.js | 4796 ---------
htrace-core/src/web/lib/rome-2.1.0/rome.min.css | 2 -
htrace-core/src/web/lib/rome-2.1.0/rome.min.js | 3 -
.../src/web/lib/rome-2.1.0/rome.standalone.js | 1860 ----
.../web/lib/rome-2.1.0/rome.standalone.min.js | 2 -
htrace-htraced/pom.xml | 47 +
htrace-htraced/src/go/BUILDING.txt | 30 +
htrace-htraced/src/go/Godeps/Godeps.json | 26 +
htrace-htraced/src/go/format.sh | 40 +
htrace-htraced/src/go/gobuild.sh | 111 +
.../go/src/org/apache/htrace/client/client.go | 244 +
.../go/src/org/apache/htrace/client/hclient.go | 151 +
.../src/go/src/org/apache/htrace/common/log.go | 268 +
.../go/src/org/apache/htrace/common/log_test.go | 122 +
.../go/src/org/apache/htrace/common/process.go | 67 +
.../go/src/org/apache/htrace/common/query.go | 117 +
.../src/org/apache/htrace/common/query_test.go | 50 +
.../src/go/src/org/apache/htrace/common/rest.go | 29 +
.../src/go/src/org/apache/htrace/common/rpc.go | 81 +
.../src/go/src/org/apache/htrace/common/span.go | 136 +
.../src/org/apache/htrace/common/span_test.go | 66 +
.../src/org/apache/htrace/common/test_util.go | 74 +
.../src/go/src/org/apache/htrace/conf/config.go | 266 +
.../src/org/apache/htrace/conf/config_keys.go | 86 +
.../src/org/apache/htrace/conf/config_test.go | 138 +
.../src/go/src/org/apache/htrace/conf/xml.go | 61 +
.../src/go/src/org/apache/htrace/htrace/cmd.go | 317 +
.../src/go/src/org/apache/htrace/htrace/file.go | 138 +
.../src/org/apache/htrace/htrace/file_test.go | 164 +
.../go/src/org/apache/htrace/htrace/graph.go | 116 +
.../src/org/apache/htrace/htrace/graph_test.go | 84 +
.../go/src/org/apache/htrace/htrace/queries.go | 161 +
.../org/apache/htrace/htraced/client_test.go | 206 +
.../src/org/apache/htrace/htraced/datastore.go | 929 ++
.../org/apache/htrace/htraced/datastore_test.go | 445 +
.../go/src/org/apache/htrace/htraced/hrpc.go | 197 +
.../go/src/org/apache/htrace/htraced/htraced.go | 140 +
.../org/apache/htrace/htraced/mini_htraced.go | 165 +
.../go/src/org/apache/htrace/htraced/rest.go | 304 +
.../src/go/src/org/apache/htrace/test/random.go | 72 +
.../src/go/src/org/apache/htrace/test/util.go | 33 +
.../org/apache/htrace/util/HTracedProcess.java | 2 +-
htrace-htraced/src/web/app/app.js | 20 +
htrace-htraced/src/web/app/models/span.js | 144 +
htrace-htraced/src/web/app/setup.js | 192 +
.../src/web/app/views/details/details.js | 47 +
htrace-htraced/src/web/app/views/graph/graph.js | 262 +
.../src/web/app/views/search/field.js | 124 +
.../src/web/app/views/search/search.js | 105 +
.../src/web/app/views/swimlane/swimlane.js | 178 +
htrace-htraced/src/web/index.html | 196 +
.../lib/bootstrap-3.3.1/css/bootstrap-theme.css | 470 +
.../bootstrap-3.3.1/css/bootstrap-theme.css.map | 1 +
.../bootstrap-3.3.1/css/bootstrap-theme.min.css | 5 +
.../web/lib/bootstrap-3.3.1/css/bootstrap.css | 6332 ++++++++++++
.../lib/bootstrap-3.3.1/css/bootstrap.css.map | 1 +
.../lib/bootstrap-3.3.1/css/bootstrap.min.css | 5 +
.../src/web/lib/bootstrap-3.3.1/js/bootstrap.js | 2320 +++++
.../web/lib/bootstrap-3.3.1/js/bootstrap.min.js | 7 +
.../src/web/lib/bootstrap-3.3.1/js/npm.js | 13 +
.../src/web/lib/css/backgrid-0.3.5.min.css | 1 +
.../lib/css/backgrid-paginator-0.3.5.min.css | 1 +
htrace-htraced/src/web/lib/css/main.css | 45 +
htrace-htraced/src/web/lib/js/backbone-1.1.2.js | 1608 +++
.../web/lib/js/backbone.marionette-2.4.1.min.js | 23 +
.../src/web/lib/js/backbone.paginator-2.0.2.js | 1325 +++
htrace-htraced/src/web/lib/js/backgrid-0.3.5.js | 2883 ++++++
.../src/web/lib/js/backgrid-paginator-0.3.5.js | 433 +
htrace-htraced/src/web/lib/js/d3-3.5.5.js | 9504 ++++++++++++++++++
.../src/web/lib/js/jquery-2.1.3.min.js | 4 +
.../src/web/lib/js/moment-2.9.0.min.js | 7 +
.../src/web/lib/js/underscore-1.7.0.js | 1416 +++
htrace-htraced/src/web/lib/rome-2.1.0/rome.css | 94 +
htrace-htraced/src/web/lib/rome-2.1.0/rome.js | 4796 +++++++++
.../src/web/lib/rome-2.1.0/rome.min.css | 2 +
.../src/web/lib/rome-2.1.0/rome.min.js | 3 +
.../src/web/lib/rome-2.1.0/rome.standalone.js | 1860 ++++
.../web/lib/rome-2.1.0/rome.standalone.min.js | 2 +
147 files changed, 40117 insertions(+), 40117 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index ac643a3..66ca845 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,7 @@
*~
*.swp
dependency-reduced-pom.xml
-htrace-core/src/go/src/org/apache/htrace/resource
-!htrace-core/src/go/src/org/apache/htrace/resource/catalog.go
-htrace-core/src/go/build
-htrace-core/src/go/pkg
+htrace-htraced/src/go/src/org/apache/htrace/resource
+!htrace-htraced/src/go/src/org/apache/htrace/resource/catalog.go
+htrace-htraced/src/go/build
+htrace-htraced/src/go/pkg
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-c/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/htrace-c/src/CMakeLists.txt b/htrace-c/src/CMakeLists.txt
index c9b124d..f3465f6 100644
--- a/htrace-c/src/CMakeLists.txt
+++ b/htrace-c/src/CMakeLists.txt
@@ -44,8 +44,8 @@ INCLUDE(CheckCSourceCompiles)
CHECK_C_SOURCE_COMPILES("int main(void) { static __thread int i = 0; return 0; }" HAVE_IMPROVED_TLS)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/util/build.h.cmake ${CMAKE_BINARY_DIR}/util/build.h)
-get_filename_component(HTRACE_ABSPATH "../../htrace-core/src/go/build/htrace" ABSOLUTE)
-get_filename_component(HTRACED_ABSPATH "../../htrace-core/src/go/build/htraced" ABSOLUTE)
+get_filename_component(HTRACE_ABSPATH "../../htrace-htraced/src/go/build/htrace" ABSOLUTE)
+get_filename_component(HTRACED_ABSPATH "../../htrace-htraced/src/go/build/htraced" ABSOLUTE)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/test/test_config.h.cmake ${CMAKE_BINARY_DIR}/test/test_config.h)
find_package(CURL REQUIRED)
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/pom.xml
----------------------------------------------------------------------
diff --git a/htrace-core/pom.xml b/htrace-core/pom.xml
index bbc3de8..71c8ee9 100644
--- a/htrace-core/pom.xml
+++ b/htrace-core/pom.xml
@@ -67,53 +67,6 @@ language governing permissions and limitations under the License. -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>compile</phase>
- <id>go_compile</id>
- <goals><goal>run</goal></goals>
- <configuration>
- <tasks>
- <exec executable="./gobuild.sh"
- dir="${basedir}/src/go/"
- failonerror="true">
- <env key="RELEASE_VERSION" value="${project.version}"/>
- </exec>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <phase>test</phase>
- <id>go_test</id>
- <goals><goal>run</goal></goals>
- <configuration>
- <tasks>
- <exec executable="bash" failonerror="true" dir="${basedir}/src/go">
- <arg value="-c"/>
- <arg value="[ x$SKIPTESTS = xtrue ] || ./gobuild.sh test"/>
- <env key="SKIPTESTS" value="${skipTests}"/>
- </exec>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <phase>clean</phase>
- <id>go_clean</id>
- <goals><goal>run</goal></goals>
- <configuration>
- <tasks>
- <exec executable="bash" failonerror="true" dir="${basedir}/src/go">
- <arg value="-c"/>
- <arg value="./gobuild.sh clean"/>
- </exec>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/BUILDING.txt
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/BUILDING.txt b/htrace-core/src/go/BUILDING.txt
deleted file mode 100644
index d54d410..0000000
--- a/htrace-core/src/go/BUILDING.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Building the HTrace Go code
-===========================
-The htrace go code consists of 4 main parts:
-* The "htraced" standalone server
- This is a server which accepts trace spans, and services REST queries.
-
-* The "htrace" command-line program which can query the server
- This is a simple command-line program which can query the htrace server.
-
-* The htraced Javascript Web UI (not yet implemented)
-
-* The htrace go client library (not yet implemented)
- This is the equivalent of the Java HTrace client library, but written in Go.
-
-You can build all these parts simply by running "gobuild.sh".
-The binaries will be created in bin/.
-
-Dependencies
-============
-You will need to install:
-* The Go programming language
-* The development package for leveldb (some Linux distros call this "leveldb-devel") containing libleveldb.so
-
-htraced requires libleveldb.so to be in your shared library path in order to run.
-You can set LD_LIBRARY_PATH to the path for this library, or simply install
-libleveldb.so to your system library path.
-
-Testing
-=======
-You can run the unit tests by running "./gobuild.sh test"
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/Godeps/Godeps.json b/htrace-core/src/go/Godeps/Godeps.json
deleted file mode 100644
index 10c8e5d..0000000
--- a/htrace-core/src/go/Godeps/Godeps.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "ImportPath": "git-wip-us.apache.org/repos/asf/incubator-htrace.git",
- "GoVersion": "go1.3.1",
- "Deps": [
- {
- "ImportPath": "github.com/alecthomas/kingpin",
- "Rev": "afafa8aab106d31c9dc8f5e562b3f30f6246c3d4"
- },
- {
- "ImportPath": "github.com/alecthomas/units",
- "Rev": "6b4e7dc5e3143b85ea77909c72caf89416fc2915"
- },
- {
- "ImportPath": "github.com/gorilla/context",
- "Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd"
- },
- {
- "ImportPath": "github.com/gorilla/mux",
- "Rev": "e444e69cbd2e2e3e0749a2f3c717cec491552bbf"
- },
- {
- "ImportPath": "github.com/jmhodges/levigo",
- "Rev": "2c43dde93d0e056173706534afd514fcbc1dd578"
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/format.sh
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/format.sh b/htrace-core/src/go/format.sh
deleted file mode 100755
index 46aa5b1..0000000
--- a/htrace-core/src/go/format.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Reformats the HTrace code.
-#
-# ./format.sh Reformats all code.
-#
-
-die() {
- echo $@
- exit 1
-}
-
-# Check for gofmt. It should be installed whenever the go developement tools
-# are installed.
-which gofmt &> /dev/null
-[ $? -ne 0 ] && die "You must install the gofmt code reformatting formatting tool."
-
-# Find go sources. We assume no newlines or whitespace in file names.
-SCRIPT_DIR="$(cd "$( dirname $0 )" && pwd)"
-find "${SCRIPT_DIR}/src" -noleaf -xdev -name '*.go' | xargs -L 1 gofmt -w
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/gobuild.sh
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/gobuild.sh b/htrace-core/src/go/gobuild.sh
deleted file mode 100755
index 1a4e5f1..0000000
--- a/htrace-core/src/go/gobuild.sh
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Builds the HTrace server code.
-#
-# ./build.sh Builds the code.
-# ./build.sh test Builds and runs all unit tests.
-# ./build.sh bench Builds and runs all benchmarks
-#
-
-die() {
- echo $@
- exit 1
-}
-
-ACTION=install
-if [ $# -gt 0 ]; then
- ACTION="${1}"
- shift
-fi
-RELEASE_VERSION=${RELEASE_VERSION:-unknown}
-
-# Set up directories. The build/ directory is where build dependencies and
-# build binaries should go.
-SCRIPT_DIR="$(cd "$( dirname $0 )" && pwd)"
-export GOBIN="${SCRIPT_DIR}/build"
-mkdir -p "${GOBIN}" || die "failed to mkdir -p ${GOBIN}"
-cd "${GOBIN}" || die "failed to cd to ${SCRIPT_DIR}"
-export GOPATH="${GOBIN}:${SCRIPT_DIR}"
-
-# Check for go
-which go &> /dev/null
-if [ $? -ne 0 ]; then
- cat <<EOF
-You must install the Golang programming language.
-
-If you are using Debian, try "apt-get install golang".
-For Red Hat, try "yum install go".
-For other distributions and operating systems use your packaging tool.
-EOF
-exit 1
-fi
-
-# Check for libleveldb.so
-if [ -x "/sbin/ldconfig" ]; then
- # Suse requires ldconfig to be run via the absolute path
- ldconfig=/sbin/ldconfig
-else
- which ldconfig &> /dev/null
- [ $? -eq 0 ] && ldconfig=ldconfig
-fi
-if [ -n "${ldconfig}" ]; then
- if "${ldconfig}" -p | grep -q libleveldb; then
- :
- else
- echo "You must install the leveldb-devel package (or distro-specific equivalent.)"
- exit 1
- fi
-fi
-
-case $ACTION in
-clean)
- rm -rf -- "${GOBIN}" ${SCRIPT_DIR}/pkg
- ;;
-install)
- # Ensure that we have the godep program.
- PATH="${PATH}:${GOBIN}"
- which godep &> /dev/null
- if [ $? -ne 0 ]; then
- echo "Installing godep..."
- go get github.com/tools/godep || die "failed to get godep"
- fi
-
- # Download dependencies into the build directory.
- echo "godep restore..."
- godep restore || die "failed to set up dependencies"
-
- # Discover the git version
- GIT_VERSION=$(git rev-parse HEAD)
- [ $? -eq 0 ] || GIT_VERSION="unknown"
-
- # Inject the release and git version into the htraced ldflags.
- FLAGS="-X main.RELEASE_VERSION ${RELEASE_VERSION} -X main.GIT_VERSION ${GIT_VERSION}"
- go install -ldflags "${FLAGS}" -v org/apache/htrace/... "$@"
- ;;
-bench)
- go test org/apache/htrace/... -test.bench=. "$@"
- ;;
-*)
- go ${ACTION} org/apache/htrace/... "$@"
- ;;
-esac
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/client/client.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/client/client.go b/htrace-core/src/go/src/org/apache/htrace/client/client.go
deleted file mode 100644
index 44e2f69..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/client/client.go
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package client
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
-)
-
-// A golang client for htraced.
-// TODO: fancier APIs for streaming spans in the background, optimize TCP stuff
-
-func NewClient(cnf *conf.Config) (*Client, error) {
- hcl := Client{}
- hcl.restAddr = cnf.Get(conf.HTRACE_WEB_ADDRESS)
- if cnf.Get(conf.HTRACE_HRPC_ADDRESS) != "" {
- var err error
- hcl.hcr, err = newHClient(cnf)
- if err != nil {
- return nil, err
- }
- }
- return &hcl, nil
-}
-
-type Client struct {
- // REST address of the htraced server.
- restAddr string
-
- // The HRPC client, or null if it is not enabled.
- hcr *hClient
-}
-
-// Get the htraced server information.
-func (hcl *Client) GetServerInfo() (*common.ServerInfo, error) {
- buf, _, err := hcl.makeGetRequest("server/info")
- if err != nil {
- return nil, err
- }
- var info common.ServerInfo
- err = json.Unmarshal(buf, &info)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error: error unmarshalling response "+
- "body %s: %s", string(buf), err.Error()))
- }
- return &info, nil
-}
-
-// Get information about a trace span. Returns nil, nil if the span was not found.
-func (hcl *Client) FindSpan(sid common.SpanId) (*common.Span, error) {
- buf, rc, err := hcl.makeGetRequest(fmt.Sprintf("span/%016x", uint64(sid)))
- if err != nil {
- if rc == http.StatusNoContent {
- return nil, nil
- }
- return nil, err
- }
- var span common.Span
- err = json.Unmarshal(buf, &span)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error unmarshalling response "+
- "body %s: %s", string(buf), err.Error()))
- }
- return &span, nil
-}
-
-func (hcl *Client) WriteSpans(req *common.WriteSpansReq) error {
- if hcl.hcr != nil {
- return hcl.hcr.writeSpans(req)
- } else {
- return hcl.writeSpansHttp(req)
- }
-}
-
-func (hcl *Client) writeSpansHttp(req *common.WriteSpansReq) error {
- var w bytes.Buffer
- var err error
- for i := range req.Spans {
- var buf []byte
- buf, err = json.Marshal(req.Spans[i])
- if err != nil {
- return errors.New(fmt.Sprintf("Error serializing span: %s",
- err.Error()))
- }
- _, err = w.Write(buf)
- if err != nil {
- return errors.New(fmt.Sprintf("Error writing span: %s",
- err.Error()))
- }
- _, err = w.Write([]byte{'\n'})
- //err = io.WriteString(&w, "\n")
- if err != nil {
- return errors.New(fmt.Sprintf("Error writing: %s",
- err.Error()))
- }
- }
- customHeaders := make(map[string]string)
- if req.DefaultPid != "" {
- customHeaders["htrace-pid"] = req.DefaultPid
- }
- _, _, err = hcl.makeRestRequest("POST", "writeSpans",
- &w, customHeaders)
- if err != nil {
- return err
- }
- return nil
-}
-
-// Find the child IDs of a given span ID.
-func (hcl *Client) FindChildren(sid common.SpanId, lim int) ([]common.SpanId, error) {
- buf, _, err := hcl.makeGetRequest(fmt.Sprintf("span/%016x/children?lim=%d",
- uint64(sid), lim))
- if err != nil {
- return nil, err
- }
- var spanIds []common.SpanId
- err = json.Unmarshal(buf, &spanIds)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error: error unmarshalling response "+
- "body %s: %s", string(buf), err.Error()))
- }
- return spanIds, nil
-}
-
-// Make a query
-func (hcl *Client) Query(query *common.Query) ([]common.Span, error) {
- in, err := json.Marshal(query)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error marshalling query: %s", err.Error()))
- }
- var out []byte
- var url = fmt.Sprintf("query?query=%s", in)
- out, _, err = hcl.makeGetRequest(url)
- if err != nil {
- return nil, err
- }
- var spans []common.Span
- err = json.Unmarshal(out, &spans)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error unmarshalling results: %s", err.Error()))
- }
- return spans, nil
-}
-
-var EMPTY = make(map[string]string)
-
-func (hcl *Client) makeGetRequest(reqName string) ([]byte, int, error) {
- return hcl.makeRestRequest("GET", reqName, nil, EMPTY)
-}
-
-// Make a general JSON REST request.
-// Returns the request body, the response code, and the error.
-// Note: if the response code is non-zero, the error will also be non-zero.
-func (hcl *Client) makeRestRequest(reqType string, reqName string, reqBody io.Reader,
- customHeaders map[string]string) ([]byte, int, error) {
- url := fmt.Sprintf("http://%s/%s",
- hcl.restAddr, reqName)
- req, err := http.NewRequest(reqType, url, reqBody)
- req.Header.Set("Content-Type", "application/json")
- for k, v := range customHeaders {
- req.Header.Set(k, v)
- }
- client := &http.Client{}
- resp, err := client.Do(req)
- if err != nil {
- return nil, -1, errors.New(fmt.Sprintf("Error: error making http request to %s: %s\n", url,
- err.Error()))
- }
- defer resp.Body.Close()
- if resp.StatusCode != http.StatusOK {
- return nil, resp.StatusCode,
- errors.New(fmt.Sprintf("Error: got bad response status from %s: %s\n", url, resp.Status))
- }
- var body []byte
- body, err = ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, -1, errors.New(fmt.Sprintf("Error: error reading response body: %s\n", err.Error()))
- }
- return body, 0, nil
-}
-
-// Dump all spans from the htraced daemon.
-func (hcl *Client) DumpAll(lim int, out chan *common.Span) error {
- defer func() {
- close(out)
- }()
- searchId := common.SpanId(0)
- for {
- q := common.Query{
- Lim: lim,
- Predicates: []common.Predicate{
- common.Predicate{
- Op: "ge",
- Field: "spanid",
- Val: searchId.String(),
- },
- },
- }
- spans, err := hcl.Query(&q)
- if err != nil {
- return errors.New(fmt.Sprintf("Error querying spans with IDs at or after "+
- "%s: %s", searchId.String(), err.Error()))
- }
- if len(spans) == 0 {
- return nil
- }
- for i := range spans {
- out <- &spans[i]
- }
- searchId = spans[len(spans)-1].Id + 1
- }
-}
-
-func (hcl *Client) Close() {
- if hcl.hcr != nil {
- hcl.hcr.Close()
- }
- hcl.restAddr = ""
- hcl.hcr = nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/client/hclient.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/client/hclient.go b/htrace-core/src/go/src/org/apache/htrace/client/hclient.go
deleted file mode 100644
index 1730c02..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/client/hclient.go
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package client
-
-import (
- "encoding/binary"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net"
- "net/rpc"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
-)
-
-type hClient struct {
- rpcClient *rpc.Client
-}
-
-type HrpcClientCodec struct {
- rwc io.ReadWriteCloser
- length uint32
-}
-
-func (cdc *HrpcClientCodec) WriteRequest(req *rpc.Request, msg interface{}) error {
- methodId := common.HrpcMethodNameToId(req.ServiceMethod)
- if methodId == common.METHOD_ID_NONE {
- return errors.New(fmt.Sprintf("HrpcClientCodec: Unknown method name %s",
- req.ServiceMethod))
- }
- buf, err := json.Marshal(msg)
- if err != nil {
- return errors.New(fmt.Sprintf("HrpcClientCodec: Unable to marshal "+
- "message as JSON: %s", err.Error()))
- }
- if len(buf) > common.MAX_HRPC_BODY_LENGTH {
- return errors.New(fmt.Sprintf("HrpcClientCodec: message body is %d "+
- "bytes, but the maximum message size is %d bytes.",
- len(buf), common.MAX_HRPC_BODY_LENGTH))
- }
- hdr := common.HrpcRequestHeader{
- Magic: common.HRPC_MAGIC,
- MethodId: methodId,
- Seq: req.Seq,
- Length: uint32(len(buf)),
- }
- err = binary.Write(cdc.rwc, binary.BigEndian, &hdr)
- if err != nil {
- return errors.New(fmt.Sprintf("Error writing header bytes: %s",
- err.Error()))
- }
- _, err = cdc.rwc.Write(buf)
- if err != nil {
- return errors.New(fmt.Sprintf("Error writing body bytes: %s",
- err.Error()))
- }
- return nil
-}
-
-func (cdc *HrpcClientCodec) ReadResponseHeader(resp *rpc.Response) error {
- hdr := common.HrpcResponseHeader{}
- err := binary.Read(cdc.rwc, binary.BigEndian, &hdr)
- if err != nil {
- return errors.New(fmt.Sprintf("Error reading response header "+
- "bytes: %s", err.Error()))
- }
- resp.ServiceMethod = common.HrpcMethodIdToMethodName(hdr.MethodId)
- if resp.ServiceMethod == "" {
- return errors.New(fmt.Sprintf("Error reading response header: "+
- "invalid method ID %d.", hdr.MethodId))
- }
- resp.Seq = hdr.Seq
- if hdr.ErrLength > 0 {
- if hdr.ErrLength > common.MAX_HRPC_ERROR_LENGTH {
- return errors.New(fmt.Sprintf("Error reading response header: "+
- "error message was %d bytes long, but "+
- "MAX_HRPC_ERROR_LENGTH is %d.",
- hdr.ErrLength, common.MAX_HRPC_ERROR_LENGTH))
- }
- buf := make([]byte, hdr.ErrLength)
- var nread int
- nread, err = cdc.rwc.Read(buf)
- if uint32(nread) != hdr.ErrLength {
- return errors.New(fmt.Sprintf("Error reading response header: "+
- "failed to read %d bytes of error message.", nread))
- }
- if err != nil {
- return errors.New(fmt.Sprintf("Error reading response header: "+
- "failed to read %d bytes of error message: %s",
- nread, err.Error()))
- }
- resp.Error = string(buf)
- } else {
- resp.Error = ""
- }
- cdc.length = hdr.Length
- return nil
-}
-
-func (cdc *HrpcClientCodec) ReadResponseBody(body interface{}) error {
- dec := json.NewDecoder(io.LimitReader(cdc.rwc, int64(cdc.length)))
- err := dec.Decode(body)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to read response body: %s",
- err.Error()))
- }
- return nil
-}
-
-func (cdc *HrpcClientCodec) Close() error {
- return cdc.rwc.Close()
-}
-
-func newHClient(cnf *conf.Config) (*hClient, error) {
- hcr := hClient{}
- addr := cnf.Get(conf.HTRACE_HRPC_ADDRESS)
- conn, err := net.Dial("tcp", addr)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Error contacting the HRPC server "+
- "at %s: %s", addr, err.Error()))
- }
- hcr.rpcClient = rpc.NewClientWithCodec(&HrpcClientCodec{rwc: conn})
- return &hcr, nil
-}
-
-func (hcr *hClient) writeSpans(req *common.WriteSpansReq) error {
- resp := common.WriteSpansResp{}
- return hcr.rpcClient.Call(common.METHOD_NAME_WRITE_SPANS, req, &resp)
-}
-
-func (hcr *hClient) Close() {
- hcr.rpcClient.Close()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/log.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/log.go b/htrace-core/src/go/src/org/apache/htrace/common/log.go
deleted file mode 100644
index c5f495d..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/log.go
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "errors"
- "fmt"
- "org/apache/htrace/conf"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "sync"
- "time"
-)
-
-// A logSink is a place logs can be written to.
-type logSink struct {
- path logPath
- file *os.File
- lock sync.Mutex
- refCount int // protected by logFilesLock
-}
-
-// Write to the logSink.
-func (sink *logSink) write(str string) {
- sink.lock.Lock()
- defer sink.lock.Unlock()
- _, err := sink.file.Write([]byte(str))
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error logging to '%s': %s\n", sink.path, err.Error())
- }
-}
-
-// Unreference the logSink. If there are no more references, and the logSink is
-// closeable, then we will close it here.
-func (sink *logSink) Unref() {
- logFilesLock.Lock()
- defer logFilesLock.Unlock()
- sink.refCount--
- if sink.refCount <= 0 {
- if sink.path.IsCloseable() {
- err := sink.file.Close()
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error closing log file %s: %s\n",
- sink.path, err.Error())
- }
- }
- logSinks[sink.path] = nil
- }
-}
-
-type logPath string
-
-// An empty LogPath represents "stdout."
-const STDOUT_LOG_PATH = ""
-
-// Convert a path to a logPath.
-func logPathFromString(path string) logPath {
- if path == STDOUT_LOG_PATH {
- return logPath("")
- }
- absPath, err := filepath.Abs(path)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Failed to get absolute path of %s: %s\n",
- path, err.Error())
- return logPath(path)
- }
- return logPath(absPath)
-}
-
-// Convert the path to a human-readable string.
-func (path logPath) String() string {
- if path == "" {
- return "(stdout)"
- } else {
- return string(path)
- }
-}
-
-// Return true if the path is closeable. stdout is not closeable.
-func (path logPath) IsCloseable() bool {
- return path != STDOUT_LOG_PATH
-}
-
-func (path logPath) Open() *logSink {
- if path == STDOUT_LOG_PATH {
- return &logSink{path: path, file: os.Stdout}
- }
- file, err := os.OpenFile(string(path), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0777)
- if err != nil {
- sink := &logSink{path: STDOUT_LOG_PATH, file: os.Stdout}
- fmt.Fprintf(os.Stderr, "Failed to open log file %s: %s\n",
- path, err.Error())
- return sink
- }
- return &logSink{path: path, file: file}
-}
-
-var logFilesLock sync.Mutex
-
-var logSinks map[logPath]*logSink = make(map[logPath]*logSink)
-
-func getOrCreateLogSink(pathStr string) *logSink {
- path := logPathFromString(pathStr)
- logFilesLock.Lock()
- defer logFilesLock.Unlock()
- sink := logSinks[path]
- if sink == nil {
- sink = path.Open()
- logSinks[path] = sink
- }
- sink.refCount++
- return sink
-}
-
-type Level int
-
-const (
- TRACE Level = iota
- DEBUG
- INFO
- WARN
- ERROR
-)
-
-var levelToString map[Level]string = map[Level]string{
- TRACE: "TRACE",
- DEBUG: "DEBUG",
- INFO: "INFO",
- WARN: "WARN",
- ERROR: "ERROR",
-}
-
-func (level Level) String() string {
- return levelToString[level]
-}
-
-func (level Level) LogString() string {
- return level.String()[0:1]
-}
-
-func LevelFromString(str string) (Level, error) {
- for k, v := range levelToString {
- if strings.ToLower(v) == strings.ToLower(str) {
- return k, nil
- }
- }
- var levelNames sort.StringSlice
- levelNames = make([]string, len(levelToString))
- var i int
- for _, v := range levelToString {
- levelNames[i] = v
- i++
- }
- sort.Sort(levelNames)
- return TRACE, errors.New(fmt.Sprintf("No such level as '%s'. Valid "+
- "levels are '%v'\n", str, levelNames))
-}
-
-type Logger struct {
- sink *logSink
- Level Level
-}
-
-func NewLogger(faculty string, cnf *conf.Config) *Logger {
- path, level := parseConf(faculty, cnf)
- sink := getOrCreateLogSink(path)
- return &Logger{sink: sink, Level: level}
-}
-
-func parseConf(faculty string, cnf *conf.Config) (string, Level) {
- facultyLogPathKey := faculty + "." + conf.HTRACE_LOG_PATH
- var facultyLogPath string
- if cnf.Contains(facultyLogPathKey) {
- facultyLogPath = cnf.Get(facultyLogPathKey)
- } else {
- facultyLogPath = cnf.Get(conf.HTRACE_LOG_PATH)
- }
- facultyLogLevelKey := faculty + conf.HTRACE_LOG_LEVEL
- var facultyLogLevelStr string
- if cnf.Contains(facultyLogLevelKey) {
- facultyLogLevelStr = cnf.Get(facultyLogLevelKey)
- } else {
- facultyLogLevelStr = cnf.Get(conf.HTRACE_LOG_LEVEL)
- }
- level, err := LevelFromString(facultyLogLevelStr)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Error configuring log level: %s. Using TRACE.\n")
- level = TRACE
- }
- return facultyLogPath, level
-}
-
-func (lg *Logger) Trace(str string) {
- lg.write(TRACE, str)
-}
-
-func (lg *Logger) Tracef(format string, v ...interface{}) {
- lg.write(TRACE, fmt.Sprintf(format, v...))
-}
-
-func (lg *Logger) Debug(str string) {
- lg.write(DEBUG, str)
-}
-
-func (lg *Logger) Debugf(format string, v ...interface{}) {
- lg.write(DEBUG, fmt.Sprintf(format, v...))
-}
-
-func (lg *Logger) Info(str string) {
- lg.write(INFO, str)
-}
-
-func (lg *Logger) Infof(format string, v ...interface{}) {
- lg.write(INFO, fmt.Sprintf(format, v...))
-}
-
-func (lg *Logger) Warn(str string) error {
- lg.write(WARN, str)
- return errors.New(str)
-}
-
-func (lg *Logger) Warnf(format string, v ...interface{}) error {
- str := fmt.Sprintf(format, v...)
- lg.write(WARN, str)
- return errors.New(str)
-}
-
-func (lg *Logger) Error(str string) error {
- lg.write(ERROR, str)
- return errors.New(str)
-}
-
-func (lg *Logger) Errorf(format string, v ...interface{}) error {
- str := fmt.Sprintf(format, v...)
- lg.write(ERROR, str)
- return errors.New(str)
-}
-
-func (lg *Logger) write(level Level, str string) {
- if level >= lg.Level {
- lg.sink.write(time.Now().Format(time.RFC3339) + " " +
- level.LogString() + ": " + str)
- }
-}
-
-func (lg *Logger) Close() {
- lg.sink.Unref()
- lg.sink = nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/log_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/log_test.go b/htrace-core/src/go/src/org/apache/htrace/common/log_test.go
deleted file mode 100644
index b415ce2..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/log_test.go
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "bufio"
- "fmt"
- "io"
- "io/ioutil"
- "org/apache/htrace/conf"
- "os"
- "strings"
- "testing"
-)
-
-func newLogger(faculty string, args ...string) *Logger {
- cnfBld := conf.Builder{Defaults: conf.DEFAULTS}
- cnf, err := cnfBld.Build()
- if err != nil {
- panic(fmt.Sprintf("failed to create conf: %s", err.Error()))
- }
- cnf2 := cnf.Clone(args...)
- lg := NewLogger(faculty, cnf2)
- return lg
-}
-
-func TestNewLogger(t *testing.T) {
- lg := newLogger("foo", "log.level", "TRACE")
- lg.Close()
-}
-
-func verifyLines(t *testing.T, rdr io.Reader, lines []string) {
- scanner := bufio.NewScanner(rdr)
- lineIdx := 0
- for scanner.Scan() {
- line := scanner.Text()
- if !strings.Contains(line, lines[lineIdx]) {
- t.Fatalf("Error on line %d: didn't find substring '%s' in line '%s'\n",
- (lineIdx + 1), lines[lineIdx], line)
- }
- lineIdx++
- }
- if err := scanner.Err(); err != nil {
- t.Fatal(err.Error())
- }
-}
-
-func TestFileLogs(t *testing.T) {
- tempDir, err := ioutil.TempDir(os.TempDir(), "testFileLogs")
- if err != nil {
- panic(fmt.Sprintf("error creating tempdir: %s\n", err.Error()))
- }
- defer os.RemoveAll(tempDir)
- logPath := tempDir + conf.PATH_SEP + "log"
- lg := newLogger("foo", "log.level", "DEBUG",
- "foo.log.level", "INFO",
- "log.path", logPath)
- lg.Tracef("Non-important stuff, ignore this.\n")
- lg.Infof("problem with the foobar\n")
- lg.Tracef("More non-important stuff, also ignore this.\n")
- lg.Infof("and another problem with the foobar\n")
- logFile, err := os.Open(logPath)
- if err != nil {
- t.Fatalf("failed to open file %s: %s\n", logPath, err.Error())
- }
- verifyLines(t, logFile, []string{
- "problem with the foobar",
- "and another problem with the foobar",
- })
- logFile.Close()
- lg.Close()
-}
-
-func TestMultipleFileLogs(t *testing.T) {
- tempDir, err := ioutil.TempDir(os.TempDir(), "testMultipleFileLogs")
- if err != nil {
- panic(fmt.Sprintf("error creating tempdir: %s\n", err.Error()))
- }
- defer os.RemoveAll(tempDir)
- logPath := tempDir + conf.PATH_SEP + "log"
- fooLg := newLogger("foo", "log.level", "DEBUG",
- "foo.log.level", "INFO",
- "log.path", logPath)
- fooLg.Infof("The foo needs maintenance.\n")
- barLg := newLogger("bar", "log.level", "DEBUG",
- "foo.log.level", "INFO",
- "log.path", logPath)
- barLg.Debugf("The bar is open\n")
- fooLg.Errorf("Fizz buzz\n")
- logFile, err := os.Open(logPath)
- if err != nil {
- t.Fatalf("failed to open file %s: %s\n", logPath, err.Error())
- }
- fooLg.Tracef("Fizz buzz2\n")
- barLg.Tracef("Fizz buzz3\n")
- verifyLines(t, logFile, []string{
- "The foo needs maintenance.",
- "The bar is open",
- "Fizz buzz",
- "Fizz buzz3",
- })
- logFile.Close()
- fooLg.Close()
- barLg.Close()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/process.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/process.go b/htrace-core/src/go/src/org/apache/htrace/common/process.go
deleted file mode 100644
index d138178..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/process.go
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "bufio"
- "org/apache/htrace/conf"
- "os"
- "os/signal"
- "syscall"
-)
-
-func LoadApplicationConfig() *conf.Config {
- cnf, dlog := conf.LoadApplicationConfig()
- lg := NewLogger("conf", cnf)
- defer lg.Close()
- if lg.Level <= DEBUG {
- // Print out the debug information from loading the configuration.
- scanner := bufio.NewScanner(dlog)
- for scanner.Scan() {
- lg.Debugf(scanner.Text() + "\n")
- }
- }
- return cnf
-}
-
-func InstallSignalHandlers(cnf *conf.Config) {
- fatalSigs := []os.Signal{
- os.Interrupt,
- os.Kill,
- syscall.SIGINT,
- syscall.SIGABRT,
- syscall.SIGALRM,
- syscall.SIGBUS,
- syscall.SIGFPE,
- syscall.SIGILL,
- syscall.SIGQUIT,
- syscall.SIGSEGV,
- syscall.SIGTERM,
- }
- sigChan := make(chan os.Signal, len(fatalSigs))
- signal.Notify(sigChan, fatalSigs...)
- lg := NewLogger("exit", cnf)
- go func() {
- sig := <-sigChan
- lg.Errorf("Terminating on signal: %v\n", sig)
- lg.Close()
- os.Exit(1)
- }()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/query.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/query.go b/htrace-core/src/go/src/org/apache/htrace/common/query.go
deleted file mode 100644
index a32909e..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/query.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "encoding/json"
-)
-
-//
-// Represents queries that can be sent to htraced.
-//
-// Each query consists of set of predicates that will be 'AND'ed together to
-// return a set of spans. Predicates contain an operation, a field, and a
-// value.
-//
-// For example, a query might be "return the first 100 spans between 5:00pm
-// and 5:01pm" This query would have two predicates: time greater than or
-// equal to 5:00pm, and time less than or equal to 5:01pm.
-// In HTrace, times are always expressed in milliseconds since the Epoch.
-// So this would become:
-// { "lim" : 100, "pred" : [
-// { "op" : "ge", "field" : "begin", "val" : 1234 },
-// { "op" : "le", "field" : "begin", "val" : 5678 },
-// ] }
-//
-// Where '1234' and '5678' were replaced by times since the epoch in
-// milliseconds.
-//
-
-type Op string
-
-const (
- CONTAINS Op = "cn"
- EQUALS Op = "eq"
- LESS_THAN_OR_EQUALS Op = "le"
- GREATER_THAN_OR_EQUALS Op = "ge"
- GREATER_THAN Op = "gt"
-)
-
-func (op Op) IsDescending() bool {
- return op == LESS_THAN_OR_EQUALS
-}
-
-func (op Op) IsValid() bool {
- ops := ValidOps()
- for i := range ops {
- if ops[i] == op {
- return true
- }
- }
- return false
-}
-
-func ValidOps() []Op {
- return []Op{CONTAINS, EQUALS, LESS_THAN_OR_EQUALS, GREATER_THAN_OR_EQUALS,
- GREATER_THAN}
-}
-
-type Field string
-
-const (
- SPAN_ID Field = "spanid"
- DESCRIPTION Field = "description"
- BEGIN_TIME Field = "begin"
- END_TIME Field = "end"
- DURATION Field = "duration"
-)
-
-func (field Field) IsValid() bool {
- fields := ValidFields()
- for i := range fields {
- if fields[i] == field {
- return true
- }
- }
- return false
-}
-
-func ValidFields() []Field {
- return []Field{SPAN_ID, DESCRIPTION, BEGIN_TIME, END_TIME, DURATION}
-}
-
-type Predicate struct {
- Op Op `json:"op"`
- Field Field `json:"field"`
- Val string `val:"val"`
-}
-
-type Query struct {
- Predicates []Predicate `json:"pred"`
- Lim int `json:"lim"`
-}
-
-func (query *Query) String() string {
- buf, err := json.Marshal(query)
- if err != nil {
- panic(err)
- }
- return string(buf)
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/query_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/query_test.go b/htrace-core/src/go/src/org/apache/htrace/common/query_test.go
deleted file mode 100644
index 2697d9c..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/query_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "testing"
-)
-
-func TestValidOps(t *testing.T) {
- for i := range ValidOps() {
- op := ValidOps()[i]
- if !op.IsValid() {
- t.Fatalf("op %s was in ValidOps, but IsValid returned false.\n", op)
- }
- }
- invalidOp := Op("completelybogus")
- if invalidOp.IsValid() {
- t.Fatalf("op %s was invalid, but IsValid returned true.\n", invalidOp)
- }
-}
-
-func TestValidFields(t *testing.T) {
- for i := range ValidFields() {
- field := ValidFields()[i]
- if !field.IsValid() {
- t.Fatalf("field %s was in ValidFields, but IsValid returned false.\n", field)
- }
- }
- invalidField := Field("completelybogus")
- if invalidField.IsValid() {
- t.Fatalf("field %s was invalid, but IsValid returned true.\n", invalidField)
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/rest.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/rest.go b/htrace-core/src/go/src/org/apache/htrace/common/rest.go
deleted file mode 100644
index eeb9568..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/rest.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-// Info returned by /serverInfo
-type ServerInfo struct {
- // The server release version.
- ReleaseVersion string
-
- // The git hash that this software was built with.
- GitVersion string
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/rpc.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/rpc.go b/htrace-core/src/go/src/org/apache/htrace/common/rpc.go
deleted file mode 100644
index cdf7e08..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/rpc.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-// The 4-byte magic number which is sent first in the HRPC header
-const HRPC_MAGIC = 0x48545243
-
-// Method ID codes. Do not reorder these.
-const (
- METHOD_ID_NONE = 0
- METHOD_ID_WRITE_SPANS = iota
-)
-
-const METHOD_NAME_WRITE_SPANS = "HrpcHandler.WriteSpans"
-
-// Maximum length of the error message passed in an HRPC response
-const MAX_HRPC_ERROR_LENGTH = 4 * 1024 * 1024
-
-// Maximum length of HRPC message body
-const MAX_HRPC_BODY_LENGTH = 64 * 1024 * 1024
-
-// A request to write spans to htraced.
-type WriteSpansReq struct {
- DefaultPid string
- Spans []*Span
-}
-
-// A response to a WriteSpansReq
-type WriteSpansResp struct {
-}
-
-// The header which is sent over the wire for HRPC
-type HrpcRequestHeader struct {
- Magic uint32
- MethodId uint32
- Seq uint64
- Length uint32
-}
-
-// The response which is sent over the wire for HRPC
-type HrpcResponseHeader struct {
- Seq uint64
- MethodId uint32
- ErrLength uint32
- Length uint32
-}
-
-func HrpcMethodIdToMethodName(id uint32) string {
- switch id {
- case METHOD_ID_WRITE_SPANS:
- return METHOD_NAME_WRITE_SPANS
- default:
- return ""
- }
-}
-
-func HrpcMethodNameToId(name string) uint32 {
- switch name {
- case METHOD_NAME_WRITE_SPANS:
- return METHOD_ID_WRITE_SPANS
- default:
- return METHOD_ID_NONE
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/span.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/span.go b/htrace-core/src/go/src/org/apache/htrace/common/span.go
deleted file mode 100644
index c273ad9..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/span.go
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- "strconv"
-)
-
-//
-// Represents a trace span.
-//
-// Compatibility notes:
-// When converting to JSON, we store the 64-bit numbers as hexadecimal strings rather than as
-// integers. This is because JavaScript lacks the ability to handle 64-bit integers. Numbers above
-// about 55 bits will be rounded by Javascript. Since the Javascript UI is a primary consumer of
-// this JSON data, we have to simply pass it as a string.
-//
-
-type TraceInfoMap map[string]string
-
-type TimelineAnnotation struct {
- Time int64 `json:"t"`
- Msg string `json:"m"`
-}
-
-type SpanId uint64
-
-func (id SpanId) String() string {
- return fmt.Sprintf("%016x", uint64(id))
-}
-
-func (id SpanId) Val() uint64 {
- return uint64(id)
-}
-
-func (id SpanId) MarshalJSON() ([]byte, error) {
- return []byte(`"` + fmt.Sprintf("%016x", uint64(id)) + `"`), nil
-}
-
-type SpanSlice []*Span
-
-func (s SpanSlice) Len() int {
- return len(s)
-}
-
-func (s SpanSlice) Less(i, j int) bool {
- return s[i].Id < s[j].Id
-}
-
-func (s SpanSlice) Swap(i, j int) {
- s[i], s[j] = s[j], s[i]
-}
-
-type SpanIdSlice []SpanId
-
-func (s SpanIdSlice) Len() int {
- return len(s)
-}
-
-func (s SpanIdSlice) Less(i, j int) bool {
- return s[i] < s[j]
-}
-
-func (s SpanIdSlice) Swap(i, j int) {
- s[i], s[j] = s[j], s[i]
-}
-
-const DOUBLE_QUOTE = 0x22
-
-func (id *SpanId) UnmarshalJSON(b []byte) error {
- if b[0] != DOUBLE_QUOTE {
- return errors.New("Expected spanID to start with a string quote.")
- }
- if b[len(b)-1] != DOUBLE_QUOTE {
- return errors.New("Expected spanID to end with a string quote.")
- }
- return id.FromString(string(b[1 : len(b)-1]))
-}
-
-func (id *SpanId) FromString(str string) error {
- v, err := strconv.ParseUint(str, 16, 64)
- if err != nil {
- return err
- }
- *id = SpanId(v)
- return nil
-}
-
-type SpanData struct {
- Begin int64 `json:"b"`
- End int64 `json:"e"`
- Description string `json:"d"`
- TraceId SpanId `json:"i"`
- Parents []SpanId `json:"p"`
- Info TraceInfoMap `json:"n,omitempty"`
- ProcessId string `json:"r"`
- TimelineAnnotations []TimelineAnnotation `json:"t,omitempty"`
-}
-
-type Span struct {
- Id SpanId `json:"s"`
- SpanData
-}
-
-func (span *Span) ToJson() []byte {
- jbytes, err := json.Marshal(*span)
- if err != nil {
- panic(err)
- }
- return jbytes
-}
-
-// Compute the span duration. We ignore overflow since we never deal with negative times.
-func (span *Span) Duration() int64 {
- return span.End - span.Begin
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/span_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/span_test.go b/htrace-core/src/go/src/org/apache/htrace/common/span_test.go
deleted file mode 100644
index f218b3a..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/span_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "testing"
-)
-
-func TestSpanToJson(t *testing.T) {
- t.Parallel()
- span := Span{Id: 2305843009213693952,
- SpanData: SpanData{
- Begin: 123,
- End: 456,
- Description: "getFileDescriptors",
- TraceId: 999,
- Parents: []SpanId{},
- ProcessId: "testProcessId",
- }}
- ExpectStrEqual(t,
- `{"s":"2000000000000000","b":123,"e":456,"d":"getFileDescriptors","i":"00000000000003e7","p":[],"r":"testProcessId"}`,
- string(span.ToJson()))
-}
-
-func TestAnnotatedSpanToJson(t *testing.T) {
- t.Parallel()
- span := Span{Id: 1305813009213693952,
- SpanData: SpanData{
- Begin: 1234,
- End: 4567,
- Description: "getFileDescriptors2",
- TraceId: 999,
- Parents: []SpanId{},
- ProcessId: "testAnnotatedProcessId",
- TimelineAnnotations: []TimelineAnnotation{
- TimelineAnnotation{
- Time: 7777,
- Msg: "contactedServer",
- },
- TimelineAnnotation{
- Time: 8888,
- Msg: "passedFd",
- },
- },
- }}
- ExpectStrEqual(t,
- `{"s":"121f2e036d442000","b":1234,"e":4567,"d":"getFileDescriptors2","i":"00000000000003e7","p":[],"r":"testAnnotatedProcessId","t":[{"t":7777,"m":"contactedServer"},{"t":8888,"m":"passedFd"}]}`,
- string(span.ToJson()))
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/common/test_util.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/common/test_util.go b/htrace-core/src/go/src/org/apache/htrace/common/test_util.go
deleted file mode 100644
index 871c847..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/common/test_util.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package common
-
-import (
- "fmt"
- "testing"
- "time"
-)
-
-type Int64Slice []int64
-
-func (p Int64Slice) Len() int { return len(p) }
-func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] }
-func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-
-type SupplierFun func() bool
-
-//
-// Wait for a configurable amount of time for a precondition to become true.
-//
-// Example:
-// WaitFor(time.Minute * 1, time.Millisecond * 1, func() bool {
-// return ht.Store.GetStatistics().NumSpansWritten >= 3
-// })
-//
-func WaitFor(dur time.Duration, poll time.Duration, fun SupplierFun) {
- if poll == 0 {
- poll = dur / 10
- }
- if poll <= 0 {
- panic("Can't have a polling time less than zero.")
- }
- endTime := time.Now().Add(dur)
- for {
- if fun() {
- return
- }
- if !time.Now().Before(endTime) {
- break
- }
- time.Sleep(poll)
- }
- panic(fmt.Sprintf("Timed out after %s", dur))
-}
-
-// Trigger a test failure if two strings are not equal.
-func ExpectStrEqual(t *testing.T, expect string, actual string) {
- if expect != actual {
- t.Fatalf("Expected:\n%s\nGot:\n%s\n", expect, actual)
- }
-}
-
-// Trigger a test failure if the JSON representation of two spans are not equals.
-func ExpectSpansEqual(t *testing.T, spanA *Span, spanB *Span) {
- ExpectStrEqual(t, string(spanA.ToJson()), string(spanB.ToJson()))
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/conf/config.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/conf/config.go b/htrace-core/src/go/src/org/apache/htrace/conf/config.go
deleted file mode 100644
index 6093649..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/conf/config.go
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package conf
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "log"
- "os"
- "path/filepath"
- "sort"
- "strconv"
- "strings"
- "syscall"
-)
-
-//
-// The configuration code for HTraced.
-//
-// HTraced can be configured via Hadoop-style XML configuration files, or by passing -Dkey=value
-// command line arguments. Command-line arguments without an equals sign, such as "-Dkey", will be
-// treated as setting the key to "true".
-//
-// Configuration key constants should be defined in config_keys.go. Each key should have a default,
-// which will be used if the user supplies no value, or supplies an invalid value.
-// For that reason, it is not necessary for the Get, GetInt, etc. functions to take a default value
-// argument.
-//
-// Configuration objects are immutable. However, you can make a copy of a configuration which adds
-// some changes using Configuration#Clone().
-//
-
-type Config struct {
- settings map[string]string
- defaults map[string]string
-}
-
-type Builder struct {
- // If non-nil, the XML configuration file to read.
- Reader io.Reader
-
- // If non-nil, the configuration values to use.
- Values map[string]string
-
- // If non-nil, the default configuration values to use.
- Defaults map[string]string
-
- // If non-nil, the command-line arguments to use.
- Argv []string
-}
-
-func getHTracedConfDirs(dlog io.Writer) []string {
- confDir := os.Getenv("HTRACED_CONF_DIR")
- io.WriteString(dlog, fmt.Sprintf("HTRACED_CONF_DIR=%s\n", confDir))
- paths := filepath.SplitList(confDir)
- if len(paths) < 1 {
- return []string{"."}
- }
- return paths
-}
-
-// Load a configuration from the application's argv, configuration file, and the standard
-// defaults.
-func LoadApplicationConfig() (*Config, io.Reader) {
- dlog := new(bytes.Buffer)
- reader := openFile(CONFIG_FILE_NAME, getHTracedConfDirs(dlog), dlog)
- bld := Builder{}
- if reader != nil {
- defer reader.Close()
- bld.Reader = bufio.NewReader(reader)
- }
- bld.Argv = os.Args[1:]
- bld.Defaults = DEFAULTS
- cnf, err := bld.Build()
- if err != nil {
- log.Fatal("Error building configuration: " + err.Error())
- }
- os.Args = append(os.Args[0:1], bld.Argv...)
- keys := make(sort.StringSlice, 0, 20)
- for k, _ := range cnf.settings {
- keys = append(keys, k)
- }
- sort.Sort(keys)
- for i := range keys {
- io.WriteString(dlog, fmt.Sprintf("%s = %s\n",
- keys[i], cnf.settings[keys[i]]))
- }
- return cnf, dlog
-}
-
-// Attempt to open a configuration file somewhere on the provided list of paths.
-func openFile(cnfName string, paths []string, dlog io.Writer) io.ReadCloser {
- for p := range paths {
- path := fmt.Sprintf("%s%c%s", paths[p], os.PathSeparator, cnfName)
- file, err := os.Open(path)
- if err == nil {
- io.WriteString(dlog, fmt.Sprintf("Reading configuration from %s.\n", path))
- return file
- }
- if e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOENT {
- continue
- }
- io.WriteString(dlog, fmt.Sprintf("Error opening %s for read: %s\n", path, err.Error()))
- }
- return nil
-}
-
-// Try to parse a command-line element as a key=value pair.
-func parseAsConfigFlag(flag string) (string, string) {
- var confPart string
- if strings.HasPrefix(flag, "-D") {
- confPart = flag[2:]
- } else if strings.HasPrefix(flag, "--D") {
- confPart = flag[3:]
- } else {
- return "", ""
- }
- if len(confPart) == 0 {
- return "", ""
- }
- idx := strings.Index(confPart, "=")
- if idx == -1 {
- return confPart, "true"
- }
- return confPart[0:idx], confPart[idx+1:]
-}
-
-// Build a new configuration object from the provided conf.Builder.
-func (bld *Builder) Build() (*Config, error) {
- // Load values and defaults
- cnf := Config{}
- cnf.settings = make(map[string]string)
- if bld.Values != nil {
- for k, v := range bld.Values {
- cnf.settings[k] = v
- }
- }
- cnf.defaults = make(map[string]string)
- if bld.Defaults != nil {
- for k, v := range bld.Defaults {
- cnf.defaults[k] = v
- }
- }
-
- // Process the configuration file, if we have one
- if bld.Reader != nil {
- parseXml(bld.Reader, cnf.settings)
- }
-
- // Process command line arguments
- var i int
- for i < len(bld.Argv) {
- str := bld.Argv[i]
- key, val := parseAsConfigFlag(str)
- if key != "" {
- if val == "" {
- cnf.settings[key] = "true"
- } else {
- cnf.settings[key] = val
- }
- bld.Argv = append(bld.Argv[:i], bld.Argv[i+1:]...)
- } else {
- i++
- }
- }
- return &cnf, nil
-}
-
-// Returns true if the configuration has a non-default value for the given key.
-func (cnf *Config) Contains(key string) bool {
- _, ok := cnf.settings[key]
- return ok
-}
-
-// Get a string configuration key.
-func (cnf *Config) Get(key string) string {
- ret := cnf.settings[key]
- if ret != "" {
- return ret
- }
- return cnf.defaults[key]
-}
-
-// Get a boolean configuration key.
-func (cnf *Config) GetBool(key string) bool {
- str := cnf.settings[key]
- ret, err := strconv.ParseBool(str)
- if err == nil {
- return ret
- }
- str = cnf.defaults[key]
- ret, err = strconv.ParseBool(str)
- if err == nil {
- return ret
- }
- return false
-}
-
-// Get an integer configuration key.
-func (cnf *Config) GetInt(key string) int {
- str := cnf.settings[key]
- ret, err := strconv.Atoi(str)
- if err == nil {
- return ret
- }
- str = cnf.defaults[key]
- ret, err = strconv.Atoi(str)
- if err == nil {
- return ret
- }
- return 0
-}
-
-// Get an int64 configuration key.
-func (cnf *Config) GetInt64(key string) int64 {
- str := cnf.settings[key]
- ret, err := strconv.ParseInt(str, 10, 64)
- if err == nil {
- return ret
- }
- str = cnf.defaults[key]
- ret, err = strconv.ParseInt(str, 10, 64)
- if err == nil {
- return ret
- }
- return 0
-}
-
-// Make a deep copy of the given configuration.
-// Optionally, you can specify particular key/value pairs to change.
-// Example:
-// cnf2 := cnf.Copy("my.changed.key", "my.new.value")
-func (cnf *Config) Clone(args ...string) *Config {
- if len(args)%2 != 0 {
- panic("The arguments to Config#copy are key1, value1, " +
- "key2, value2, and so on. You must specify an even number of arguments.")
- }
- ncnf := &Config{defaults: cnf.defaults}
- ncnf.settings = make(map[string]string)
- for k, v := range cnf.settings {
- ncnf.settings[k] = v
- }
- for i := 0; i < len(args); i += 2 {
- ncnf.settings[args[i]] = args[i+1]
- }
- return ncnf
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/conf/config_keys.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/conf/config_keys.go b/htrace-core/src/go/src/org/apache/htrace/conf/config_keys.go
deleted file mode 100644
index ccb09e0..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/conf/config_keys.go
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package conf
-
-import (
- "fmt"
- "os"
-)
-
-//
-// Configuration keys for HTrace.
-//
-
-// The platform-specific path separator. Usually slash.
-var PATH_SEP string = fmt.Sprintf("%c", os.PathSeparator)
-
-// The platform-specific path list separator. Usually colon.
-var PATH_LIST_SEP string = fmt.Sprintf("%c", os.PathListSeparator)
-
-// The name of the XML configuration file to look for.
-const CONFIG_FILE_NAME = "htraced-conf.xml"
-
-// An environment variable containing a list of paths to search for the
-// configuration file in.
-const HTRACED_CONF_DIR = "HTRACED_CONF_DIR"
-
-// The web address to start the REST server on.
-const HTRACE_WEB_ADDRESS = "web.address"
-
-// The default port for the Htrace web address.
-const HTRACE_WEB_ADDRESS_DEFAULT_PORT = 9095
-
-// The web address to start the REST server on.
-const HTRACE_HRPC_ADDRESS = "hrpc.address"
-
-// The default port for the Htrace HRPC address.
-const HTRACE_HRPC_ADDRESS_DEFAULT_PORT = 9075
-
-// The directories to put the data store into. Separated by PATH_LIST_SEP.
-const HTRACE_DATA_STORE_DIRECTORIES = "data.store.directories"
-
-// Boolean key which indicates whether we should clear data on startup.
-const HTRACE_DATA_STORE_CLEAR = "data.store.clear"
-
-// How many writes to buffer before applying backpressure to span senders.
-const HTRACE_DATA_STORE_SPAN_BUFFER_SIZE = "data.store.span.buffer.size"
-
-// Path to put the logs from htrace, or the empty string to use stdout.
-const HTRACE_LOG_PATH = "log.path"
-
-// The log level to use for the logs in htrace.
-const HTRACE_LOG_LEVEL = "log.level"
-
-// A host:port pair to send information to on startup. This is used in unit
-// tests to determine the (random) port of the htraced process that has been
-// started.
-const HTRACE_STARTUP_NOTIFICATION_ADDRESS = "startup.notification.address"
-
-// Default values for HTrace configuration keys.
-var DEFAULTS = map[string]string{
- HTRACE_WEB_ADDRESS: fmt.Sprintf("0.0.0.0:%d", HTRACE_WEB_ADDRESS_DEFAULT_PORT),
- HTRACE_HRPC_ADDRESS: fmt.Sprintf("0.0.0.0:%d", HTRACE_HRPC_ADDRESS_DEFAULT_PORT),
- HTRACE_DATA_STORE_DIRECTORIES: PATH_SEP + "tmp" + PATH_SEP + "htrace1" +
- PATH_LIST_SEP + PATH_SEP + "tmp" + PATH_SEP + "htrace2",
- HTRACE_DATA_STORE_CLEAR: "false",
- HTRACE_DATA_STORE_SPAN_BUFFER_SIZE: "100",
- HTRACE_LOG_PATH: "",
- HTRACE_LOG_LEVEL: "INFO",
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/conf/config_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/conf/config_test.go b/htrace-core/src/go/src/org/apache/htrace/conf/config_test.go
deleted file mode 100644
index 42c1c71..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/conf/config_test.go
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package conf
-
-import (
- "bytes"
- "os"
- "strings"
- "testing"
-)
-
-// Test that parsing command-line arguments of the form -Dfoo=bar works.
-func TestParseArgV(t *testing.T) {
- t.Parallel()
- argv := []string{"-Dfoo=bar", "-Dbaz=123", "-DsillyMode"}
- bld := &Builder{Argv: argv}
- cnf, err := bld.Build()
- if err != nil {
- t.Fatal()
- }
- if "bar" != cnf.Get("foo") {
- t.Fatal()
- }
- if 123 != cnf.GetInt("baz") {
- t.Fatal()
- }
- if !cnf.GetBool("sillyMode") {
- t.Fatal()
- }
- if cnf.GetBool("otherSillyMode") {
- t.Fatal()
- }
-}
-
-// Test that default values work.
-// Defaults are used only when the configuration option is not present or can't be parsed.
-func TestDefaults(t *testing.T) {
- t.Parallel()
- argv := []string{"-Dfoo=bar", "-Dbaz=invalidNumber"}
- defaults := map[string]string{
- "foo": "notbar",
- "baz": "456",
- "foo2": "4611686018427387904",
- }
- bld := &Builder{Argv: argv, Defaults: defaults}
- cnf, err := bld.Build()
- if err != nil {
- t.Fatal()
- }
- if "bar" != cnf.Get("foo") {
- t.Fatal()
- }
- if 456 != cnf.GetInt("baz") {
- t.Fatal()
- }
- if 4611686018427387904 != cnf.GetInt64("foo2") {
- t.Fatal()
- }
-}
-
-// Test that we can parse our XML configuration file.
-func TestXmlConfigurationFile(t *testing.T) {
- t.Parallel()
- xml := `
-<?xml version="1.0"?>
-<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>
-<configuration>
- <property>
- <name>foo.bar</name>
- <value>123</value>
- </property>
- <property>
- <name>foo.baz</name>
- <value>xmlValue</value>
- </property>
- <!--<property>
- <name>commented.out</name>
- <value>stuff</value>
- </property>-->
-</configuration>
-`
- xmlReader := strings.NewReader(xml)
- argv := []string{"-Dfoo.bar=456"}
- defaults := map[string]string{
- "foo.bar": "789",
- "cmdline.opt": "4611686018427387904",
- }
- bld := &Builder{Argv: argv, Defaults: defaults, Reader: xmlReader}
- cnf, err := bld.Build()
- if err != nil {
- t.Fatal()
- }
- // The command-line argument takes precedence over the XML and the defaults.
- if 456 != cnf.GetInt("foo.bar") {
- t.Fatal()
- }
- if "xmlValue" != cnf.Get("foo.baz") {
- t.Fatalf("foo.baz = %s", cnf.Get("foo.baz"))
- }
- if "" != cnf.Get("commented.out") {
- t.Fatal()
- }
- if 4611686018427387904 != cnf.GetInt64("cmdline.opt") {
- t.Fatal()
- }
-}
-
-// Test our handling of the HTRACE_CONF_DIR environment variable.
-func TestGetHTracedConfDirs(t *testing.T) {
- os.Setenv("HTRACED_CONF_DIR", "")
- dlog := new(bytes.Buffer)
- dirs := getHTracedConfDirs(dlog)
- if len(dirs) != 1 || dirs[0] != "." {
- t.Fatal()
- }
- os.Setenv("HTRACED_CONF_DIR", "/foo/bar:/baz")
- dirs = getHTracedConfDirs(dlog)
- if len(dirs) != 2 || dirs[0] != "/foo/bar" || dirs[1] != "/baz" {
- t.Fatal()
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/conf/xml.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/conf/xml.go b/htrace-core/src/go/src/org/apache/htrace/conf/xml.go
deleted file mode 100644
index de14bc5..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/conf/xml.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package conf
-
-import (
- "encoding/xml"
- "io"
- "log"
-)
-
-type configuration struct {
- Properties []propertyXml `xml:"property"`
-}
-
-type propertyXml struct {
- Name string `xml:"name"`
- Value string `xml:"value"`
-}
-
-// Parse an XML configuration file.
-func parseXml(reader io.Reader, m map[string]string) error {
- dec := xml.NewDecoder(reader)
- configurationXml := configuration{}
- err := dec.Decode(&configurationXml)
- if err != nil {
- return err
- }
- props := configurationXml.Properties
- for p := range props {
- key := props[p].Name
- value := props[p].Value
- if key == "" {
- log.Println("Warning: ignoring element with missing or empty <name>.")
- continue
- }
- if value == "" {
- log.Println("Warning: ignoring element with key " + key + " with missing or empty <value>.")
- continue
- }
- //log.Printf("setting %s to %s\n", key, value)
- m[key] = value
- }
- return nil
-}
[29/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/backgrid-0.3.5.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/backgrid-0.3.5.js b/htrace-core/src/web/lib/js/backgrid-0.3.5.js
deleted file mode 100644
index 6f8da79..0000000
--- a/htrace-core/src/web/lib/js/backgrid-0.3.5.js
+++ /dev/null
@@ -1,2883 +0,0 @@
-/*!
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2014 Jimmy Yuen Ho Wong and contributors <wy...@gmail.com>
- Licensed under the MIT license.
-*/
-
-(function (factory) {
-
- // CommonJS
- if (typeof exports == "object") {
- module.exports = factory(module.exports,
- require("underscore"),
- require("backbone"));
- }
- // Browser
- else factory(this, this._, this.Backbone);
-}(function (root, _, Backbone) {
-
- "use strict";
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-// Copyright 2009, 2010 Kristopher Michael Kowal
-// https://github.com/kriskowal/es5-shim
-// ES5 15.5.4.20
-// http://es5.github.com/#x15.5.4.20
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- // http://blog.stevenlevithan.com/archives/faster-trim-javascript
- // http://perfectionkills.com/whitespace-deviations/
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- if (this === undefined || this === null) {
- throw new TypeError("can't convert " + this + " to object");
- }
- return String(this)
- .replace(trimBeginRegexp, "")
- .replace(trimEndRegexp, "");
- };
-}
-
-function lpad(str, length, padstr) {
- var paddingLen = length - (str + '').length;
- paddingLen = paddingLen < 0 ? 0 : paddingLen;
- var padding = '';
- for (var i = 0; i < paddingLen; i++) {
- padding = padding + padstr;
- }
- return padding + str;
-}
-
-var $ = Backbone.$;
-
-var Backgrid = root.Backgrid = {
-
- Extension: {},
-
- resolveNameToClass: function (name, suffix) {
- if (_.isString(name)) {
- var key = _.map(name.split('-'), function (e) {
- return e.slice(0, 1).toUpperCase() + e.slice(1);
- }).join('') + suffix;
- var klass = Backgrid[key] || Backgrid.Extension[key];
- if (_.isUndefined(klass)) {
- throw new ReferenceError("Class '" + key + "' not found");
- }
- return klass;
- }
-
- return name;
- },
-
- callByNeed: function () {
- var value = arguments[0];
- if (!_.isFunction(value)) return value;
-
- var context = arguments[1];
- var args = [].slice.call(arguments, 2);
- return value.apply(context, !!(args + '') ? args : []);
- }
-
-};
-_.extend(Backgrid, Backbone.Events);
-
-/**
- Command translates a DOM Event into commands that Backgrid
- recognizes. Interested parties can listen on selected Backgrid events that
- come with an instance of this class and act on the commands.
-
- It is also possible to globally rebind the keyboard shortcuts by replacing
- the methods in this class' prototype.
-
- @class Backgrid.Command
- @constructor
- */
-var Command = Backgrid.Command = function (evt) {
- _.extend(this, {
- altKey: !!evt.altKey,
- "char": evt["char"],
- charCode: evt.charCode,
- ctrlKey: !!evt.ctrlKey,
- key: evt.key,
- keyCode: evt.keyCode,
- locale: evt.locale,
- location: evt.location,
- metaKey: !!evt.metaKey,
- repeat: !!evt.repeat,
- shiftKey: !!evt.shiftKey,
- which: evt.which
- });
-};
-_.extend(Command.prototype, {
- /**
- Up Arrow
-
- @member Backgrid.Command
- */
- moveUp: function () { return this.keyCode == 38; },
- /**
- Down Arrow
-
- @member Backgrid.Command
- */
- moveDown: function () { return this.keyCode === 40; },
- /**
- Shift Tab
-
- @member Backgrid.Command
- */
- moveLeft: function () { return this.shiftKey && this.keyCode === 9; },
- /**
- Tab
-
- @member Backgrid.Command
- */
- moveRight: function () { return !this.shiftKey && this.keyCode === 9; },
- /**
- Enter
-
- @member Backgrid.Command
- */
- save: function () { return this.keyCode === 13; },
- /**
- Esc
-
- @member Backgrid.Command
- */
- cancel: function () { return this.keyCode === 27; },
- /**
- None of the above.
-
- @member Backgrid.Command
- */
- passThru: function () {
- return !(this.moveUp() || this.moveDown() || this.moveLeft() ||
- this.moveRight() || this.save() || this.cancel());
- }
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- Just a convenient class for interested parties to subclass.
-
- The default Cell classes don't require the formatter to be a subclass of
- Formatter as long as the fromRaw(rawData) and toRaw(formattedData) methods
- are defined.
-
- @abstract
- @class Backgrid.CellFormatter
- @constructor
-*/
-var CellFormatter = Backgrid.CellFormatter = function () {};
-_.extend(CellFormatter.prototype, {
-
- /**
- Takes a raw value from a model and returns an optionally formatted string
- for display. The default implementation simply returns the supplied value
- as is without any type conversion.
-
- @member Backgrid.CellFormatter
- @param {*} rawData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {*}
- */
- fromRaw: function (rawData, model) {
- return rawData;
- },
-
- /**
- Takes a formatted string, usually from user input, and returns a
- appropriately typed value for persistence in the model.
-
- If the user input is invalid or unable to be converted to a raw value
- suitable for persistence in the model, toRaw must return `undefined`.
-
- @member Backgrid.CellFormatter
- @param {string} formattedData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {*|undefined}
- */
- toRaw: function (formattedData, model) {
- return formattedData;
- }
-
-});
-
-/**
- A floating point number formatter. Doesn't understand scientific notation at
- the moment.
-
- @class Backgrid.NumberFormatter
- @extends Backgrid.CellFormatter
- @constructor
- @throws {RangeError} If decimals < 0 or > 20.
-*/
-var NumberFormatter = Backgrid.NumberFormatter = function (options) {
- _.extend(this, this.defaults, options || {});
-
- if (this.decimals < 0 || this.decimals > 20) {
- throw new RangeError("decimals must be between 0 and 20");
- }
-};
-NumberFormatter.prototype = new CellFormatter();
-_.extend(NumberFormatter.prototype, {
-
- /**
- @member Backgrid.NumberFormatter
- @cfg {Object} options
-
- @cfg {number} [options.decimals=2] Number of decimals to display. Must be an integer.
-
- @cfg {string} [options.decimalSeparator='.'] The separator to use when
- displaying decimals.
-
- @cfg {string} [options.orderSeparator=','] The separator to use to
- separator thousands. May be an empty string.
- */
- defaults: {
- decimals: 2,
- decimalSeparator: '.',
- orderSeparator: ','
- },
-
- HUMANIZED_NUM_RE: /(\d)(?=(?:\d{3})+$)/g,
-
- /**
- Takes a floating point number and convert it to a formatted string where
- every thousand is separated by `orderSeparator`, with a `decimal` number of
- decimals separated by `decimalSeparator`. The number returned is rounded
- the usual way.
-
- @member Backgrid.NumberFormatter
- @param {number} number
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string}
- */
- fromRaw: function (number, model) {
- if (_.isNull(number) || _.isUndefined(number)) return '';
-
- number = number.toFixed(~~this.decimals);
-
- var parts = number.split('.');
- var integerPart = parts[0];
- var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : '';
-
- return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart;
- },
-
- /**
- Takes a string, possibly formatted with `orderSeparator` and/or
- `decimalSeparator`, and convert it back to a number.
-
- @member Backgrid.NumberFormatter
- @param {string} formattedData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {number|undefined} Undefined if the string cannot be converted to
- a number.
- */
- toRaw: function (formattedData, model) {
- formattedData = formattedData.trim();
-
- if (formattedData === '') return null;
-
- var rawData = '';
-
- var thousands = formattedData.split(this.orderSeparator);
- for (var i = 0; i < thousands.length; i++) {
- rawData += thousands[i];
- }
-
- var decimalParts = rawData.split(this.decimalSeparator);
- rawData = '';
- for (var i = 0; i < decimalParts.length; i++) {
- rawData = rawData + decimalParts[i] + '.';
- }
-
- if (rawData[rawData.length - 1] === '.') {
- rawData = rawData.slice(0, rawData.length - 1);
- }
-
- var result = (rawData * 1).toFixed(~~this.decimals) * 1;
- if (_.isNumber(result) && !_.isNaN(result)) return result;
- }
-
-});
-
-/**
- A number formatter that converts a floating point number, optionally
- multiplied by a multiplier, to a percentage string and vice versa.
-
- @class Backgrid.PercentFormatter
- @extends Backgrid.NumberFormatter
- @constructor
- @throws {RangeError} If decimals < 0 or > 20.
- */
-var PercentFormatter = Backgrid.PercentFormatter = function () {
- Backgrid.NumberFormatter.apply(this, arguments);
-};
-
-PercentFormatter.prototype = new Backgrid.NumberFormatter(),
-
-_.extend(PercentFormatter.prototype, {
-
- /**
- @member Backgrid.PercentFormatter
- @cfg {Object} options
-
- @cfg {number} [options.multiplier=1] The number used to multiply the model
- value for display.
-
- @cfg {string} [options.symbol='%'] The symbol to append to the percentage
- string.
- */
- defaults: _.extend({}, NumberFormatter.prototype.defaults, {
- multiplier: 1,
- symbol: "%"
- }),
-
- /**
- Takes a floating point number, where the number is first multiplied by
- `multiplier`, then converted to a formatted string like
- NumberFormatter#fromRaw, then finally append `symbol` to the end.
-
- @member Backgrid.PercentFormatter
- @param {number} rawValue
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string}
- */
- fromRaw: function (number, model) {
- var args = [].slice.call(arguments, 1);
- args.unshift(number * this.multiplier);
- return (NumberFormatter.prototype.fromRaw.apply(this, args) || "0") + this.symbol;
- },
-
- /**
- Takes a string, possibly appended with `symbol` and/or `decimalSeparator`,
- and convert it back to a number for the model like NumberFormatter#toRaw,
- and then dividing it by `multiplier`.
-
- @member Backgrid.PercentFormatter
- @param {string} formattedData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {number|undefined} Undefined if the string cannot be converted to
- a number.
- */
- toRaw: function (formattedValue, model) {
- var tokens = formattedValue.split(this.symbol);
- if (tokens && tokens[0] && tokens[1] === "" || tokens[1] == null) {
- var rawValue = NumberFormatter.prototype.toRaw.call(this, tokens[0]);
- if (_.isUndefined(rawValue)) return rawValue;
- return rawValue / this.multiplier;
- }
- }
-
-});
-
-/**
- Formatter to converts between various datetime formats.
-
- This class only understands ISO-8601 formatted datetime strings and UNIX
- offset (number of milliseconds since UNIX Epoch). See
- Backgrid.Extension.MomentFormatter if you need a much more flexible datetime
- formatter.
-
- @class Backgrid.DatetimeFormatter
- @extends Backgrid.CellFormatter
- @constructor
- @throws {Error} If both `includeDate` and `includeTime` are false.
-*/
-var DatetimeFormatter = Backgrid.DatetimeFormatter = function (options) {
- _.extend(this, this.defaults, options || {});
-
- if (!this.includeDate && !this.includeTime) {
- throw new Error("Either includeDate or includeTime must be true");
- }
-};
-DatetimeFormatter.prototype = new CellFormatter();
-_.extend(DatetimeFormatter.prototype, {
-
- /**
- @member Backgrid.DatetimeFormatter
-
- @cfg {Object} options
-
- @cfg {boolean} [options.includeDate=true] Whether the values include the
- date part.
-
- @cfg {boolean} [options.includeTime=true] Whether the values include the
- time part.
-
- @cfg {boolean} [options.includeMilli=false] If `includeTime` is true,
- whether to include the millisecond part, if it exists.
- */
- defaults: {
- includeDate: true,
- includeTime: true,
- includeMilli: false
- },
-
- DATE_RE: /^([+\-]?\d{4})-(\d{2})-(\d{2})$/,
- TIME_RE: /^(\d{2}):(\d{2}):(\d{2})(\.(\d{3}))?$/,
- ISO_SPLITTER_RE: /T|Z| +/,
-
- _convert: function (data, validate) {
- if ((data + '').trim() === '') return null;
-
- var date, time = null;
- if (_.isNumber(data)) {
- var jsDate = new Date(data);
- date = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);
- time = lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);
- }
- else {
- data = data.trim();
- var parts = data.split(this.ISO_SPLITTER_RE) || [];
- date = this.DATE_RE.test(parts[0]) ? parts[0] : '';
- time = date && parts[1] ? parts[1] : this.TIME_RE.test(parts[0]) ? parts[0] : '';
- }
-
- var YYYYMMDD = this.DATE_RE.exec(date) || [];
- var HHmmssSSS = this.TIME_RE.exec(time) || [];
-
- if (validate) {
- if (this.includeDate && _.isUndefined(YYYYMMDD[0])) return;
- if (this.includeTime && _.isUndefined(HHmmssSSS[0])) return;
- if (!this.includeDate && date) return;
- if (!this.includeTime && time) return;
- }
-
- var jsDate = new Date(Date.UTC(YYYYMMDD[1] * 1 || 0,
- YYYYMMDD[2] * 1 - 1 || 0,
- YYYYMMDD[3] * 1 || 0,
- HHmmssSSS[1] * 1 || null,
- HHmmssSSS[2] * 1 || null,
- HHmmssSSS[3] * 1 || null,
- HHmmssSSS[5] * 1 || null));
-
- var result = '';
-
- if (this.includeDate) {
- result = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);
- }
-
- if (this.includeTime) {
- result = result + (this.includeDate ? 'T' : '') + lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);
-
- if (this.includeMilli) {
- result = result + '.' + lpad(jsDate.getUTCMilliseconds(), 3, 0);
- }
- }
-
- if (this.includeDate && this.includeTime) {
- result += "Z";
- }
-
- return result;
- },
-
- /**
- Converts an ISO-8601 formatted datetime string to a datetime string, date
- string or a time string. The timezone is ignored if supplied.
-
- @member Backgrid.DatetimeFormatter
- @param {string} rawData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string|null|undefined} ISO-8601 string in UTC. Null and undefined
- values are returned as is.
- */
- fromRaw: function (rawData, model) {
- if (_.isNull(rawData) || _.isUndefined(rawData)) return '';
- return this._convert(rawData);
- },
-
- /**
- Converts an ISO-8601 formatted datetime string to a datetime string, date
- string or a time string. The timezone is ignored if supplied. This method
- parses the input values exactly the same way as
- Backgrid.Extension.MomentFormatter#fromRaw(), in addition to doing some
- sanity checks.
-
- @member Backgrid.DatetimeFormatter
- @param {string} formattedData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string|undefined} ISO-8601 string in UTC. Undefined if a date is
- found when `includeDate` is false, or a time is found when `includeTime` is
- false, or if `includeDate` is true and a date is not found, or if
- `includeTime` is true and a time is not found.
- */
- toRaw: function (formattedData, model) {
- return this._convert(formattedData, true);
- }
-
-});
-
-/**
- Formatter to convert any value to string.
-
- @class Backgrid.StringFormatter
- @extends Backgrid.CellFormatter
- @constructor
- */
-var StringFormatter = Backgrid.StringFormatter = function () {};
-StringFormatter.prototype = new CellFormatter();
-_.extend(StringFormatter.prototype, {
- /**
- Converts any value to a string using Ecmascript's implicit type
- conversion. If the given value is `null` or `undefined`, an empty string is
- returned instead.
-
- @member Backgrid.StringFormatter
- @param {*} rawValue
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string}
- */
- fromRaw: function (rawValue, model) {
- if (_.isUndefined(rawValue) || _.isNull(rawValue)) return '';
- return rawValue + '';
- }
-});
-
-/**
- Simple email validation formatter.
-
- @class Backgrid.EmailFormatter
- @extends Backgrid.CellFormatter
- @constructor
- */
-var EmailFormatter = Backgrid.EmailFormatter = function () {};
-EmailFormatter.prototype = new CellFormatter();
-_.extend(EmailFormatter.prototype, {
- /**
- Return the input if it is a string that contains an '@' character and if
- the strings before and after '@' are non-empty. If the input does not
- validate, `undefined` is returned.
-
- @member Backgrid.EmailFormatter
- @param {*} formattedData
- @param {Backbone.Model} model Used for more complicated formatting
- @return {string|undefined}
- */
- toRaw: function (formattedData, model) {
- var parts = formattedData.trim().split("@");
- if (parts.length === 2 && _.all(parts)) {
- return formattedData;
- }
- }
-});
-
-/**
- Formatter for SelectCell.
-
- If the type of a model value is not a string, it is expected that a subclass
- of this formatter is provided to the SelectCell, with #toRaw overridden to
- convert the string value returned from the DOM back to whatever value is
- expected in the model.
-
- @class Backgrid.SelectFormatter
- @extends Backgrid.CellFormatter
- @constructor
-*/
-var SelectFormatter = Backgrid.SelectFormatter = function () {};
-SelectFormatter.prototype = new CellFormatter();
-_.extend(SelectFormatter.prototype, {
-
- /**
- Normalizes raw scalar or array values to an array.
-
- @member Backgrid.SelectFormatter
- @param {*} rawValue
- @param {Backbone.Model} model Used for more complicated formatting
- @return {Array.<*>}
- */
- fromRaw: function (rawValue, model) {
- return _.isArray(rawValue) ? rawValue : rawValue != null ? [rawValue] : [];
- }
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- Generic cell editor base class. Only defines an initializer for a number of
- required parameters.
-
- @abstract
- @class Backgrid.CellEditor
- @extends Backbone.View
-*/
-var CellEditor = Backgrid.CellEditor = Backbone.View.extend({
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backgrid.CellFormatter} options.formatter
- @param {Backgrid.Column} options.column
- @param {Backbone.Model} options.model
-
- @throws {TypeError} If `formatter` is not a formatter instance, or when
- `model` or `column` are undefined.
- */
- initialize: function (options) {
- this.formatter = options.formatter;
- this.column = options.column;
- if (!(this.column instanceof Column)) {
- this.column = new Column(this.column);
- }
-
- this.listenTo(this.model, "backgrid:editing", this.postRender);
- },
-
- /**
- Post-rendering setup and initialization. Focuses the cell editor's `el` in
- this default implementation. **Should** be called by Cell classes after
- calling Backgrid.CellEditor#render.
- */
- postRender: function (model, column) {
- if (column == null || column.get("name") == this.column.get("name")) {
- this.$el.focus();
- }
- return this;
- }
-
-});
-
-/**
- InputCellEditor the cell editor type used by most core cell types. This cell
- editor renders a text input box as its editor. The input will render a
- placeholder if the value is empty on supported browsers.
-
- @class Backgrid.InputCellEditor
- @extends Backgrid.CellEditor
-*/
-var InputCellEditor = Backgrid.InputCellEditor = CellEditor.extend({
-
- /** @property */
- tagName: "input",
-
- /** @property */
- attributes: {
- type: "text"
- },
-
- /** @property */
- events: {
- "blur": "saveOrCancel",
- "keydown": "saveOrCancel"
- },
-
- /**
- Initializer. Removes this `el` from the DOM when a `done` event is
- triggered.
-
- @param {Object} options
- @param {Backgrid.CellFormatter} options.formatter
- @param {Backgrid.Column} options.column
- @param {Backbone.Model} options.model
- @param {string} [options.placeholder]
- */
- initialize: function (options) {
- InputCellEditor.__super__.initialize.apply(this, arguments);
-
- if (options.placeholder) {
- this.$el.attr("placeholder", options.placeholder);
- }
- },
-
- /**
- Renders a text input with the cell value formatted for display, if it
- exists.
- */
- render: function () {
- var model = this.model;
- this.$el.val(this.formatter.fromRaw(model.get(this.column.get("name")), model));
- return this;
- },
-
- /**
- If the key pressed is `enter`, `tab`, `up`, or `down`, converts the value
- in the editor to a raw value for saving into the model using the formatter.
-
- If the key pressed is `esc` the changes are undone.
-
- If the editor goes out of focus (`blur`) but the value is invalid, the
- event is intercepted and cancelled so the cell remains in focus pending for
- further action. The changes are saved otherwise.
-
- Triggers a Backbone `backgrid:edited` event from the model when successful,
- and `backgrid:error` if the value cannot be converted. Classes listening to
- the `error` event, usually the Cell classes, should respond appropriately,
- usually by rendering some kind of error feedback.
-
- @param {Event} e
- */
- saveOrCancel: function (e) {
-
- var formatter = this.formatter;
- var model = this.model;
- var column = this.column;
-
- var command = new Command(e);
- var blurred = e.type === "blur";
-
- if (command.moveUp() || command.moveDown() || command.moveLeft() || command.moveRight() ||
- command.save() || blurred) {
-
- e.preventDefault();
- e.stopPropagation();
-
- var val = this.$el.val();
- var newValue = formatter.toRaw(val, model);
- if (_.isUndefined(newValue)) {
- model.trigger("backgrid:error", model, column, val);
- }
- else {
- model.set(column.get("name"), newValue);
- model.trigger("backgrid:edited", model, column, command);
- }
- }
- // esc
- else if (command.cancel()) {
- // undo
- e.stopPropagation();
- model.trigger("backgrid:edited", model, column, command);
- }
- },
-
- postRender: function (model, column) {
- if (column == null || column.get("name") == this.column.get("name")) {
- // move the cursor to the end on firefox if text is right aligned
- if (this.$el.css("text-align") === "right") {
- var val = this.$el.val();
- this.$el.focus().val(null).val(val);
- }
- else this.$el.focus();
- }
- return this;
- }
-
-});
-
-/**
- The super-class for all Cell types. By default, this class renders a plain
- table cell with the model value converted to a string using the
- formatter. The table cell is clickable, upon which the cell will go into
- editor mode, which is rendered by a Backgrid.InputCellEditor instance by
- default. Upon encountering any formatting errors, this class will add an
- `error` CSS class to the table cell.
-
- @abstract
- @class Backgrid.Cell
- @extends Backbone.View
-*/
-var Cell = Backgrid.Cell = Backbone.View.extend({
-
- /** @property */
- tagName: "td",
-
- /**
- @property {Backgrid.CellFormatter|Object|string} [formatter=CellFormatter]
- */
- formatter: CellFormatter,
-
- /**
- @property {Backgrid.CellEditor} [editor=Backgrid.InputCellEditor] The
- default editor for all cell instances of this class. This value must be a
- class, it will be automatically instantiated upon entering edit mode.
-
- See Backgrid.CellEditor
- */
- editor: InputCellEditor,
-
- /** @property */
- events: {
- "click": "enterEditMode"
- },
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Model} options.model
- @param {Backgrid.Column} options.column
-
- @throws {ReferenceError} If formatter is a string but a formatter class of
- said name cannot be found in the Backgrid module.
- */
- initialize: function (options) {
- this.column = options.column;
- if (!(this.column instanceof Column)) {
- this.column = new Column(this.column);
- }
-
- var column = this.column, model = this.model, $el = this.$el;
-
- var formatter = Backgrid.resolveNameToClass(column.get("formatter") ||
- this.formatter, "Formatter");
-
- if (!_.isFunction(formatter.fromRaw) && !_.isFunction(formatter.toRaw)) {
- formatter = new formatter();
- }
-
- this.formatter = formatter;
-
- this.editor = Backgrid.resolveNameToClass(this.editor, "CellEditor");
-
- this.listenTo(model, "change:" + column.get("name"), function () {
- if (!$el.hasClass("editor")) this.render();
- });
-
- this.listenTo(model, "backgrid:error", this.renderError);
-
- this.listenTo(column, "change:editable change:sortable change:renderable",
- function (column) {
- var changed = column.changedAttributes();
- for (var key in changed) {
- if (changed.hasOwnProperty(key)) {
- $el.toggleClass(key, changed[key]);
- }
- }
- });
-
- if (Backgrid.callByNeed(column.editable(), column, model)) $el.addClass("editable");
- if (Backgrid.callByNeed(column.sortable(), column, model)) $el.addClass("sortable");
- if (Backgrid.callByNeed(column.renderable(), column, model)) $el.addClass("renderable");
- },
-
- /**
- Render a text string in a table cell. The text is converted from the
- model's raw value for this cell's column.
- */
- render: function () {
- this.$el.empty();
- var model = this.model;
- this.$el.text(this.formatter.fromRaw(model.get(this.column.get("name")), model));
- this.delegateEvents();
- return this;
- },
-
- /**
- If this column is editable, a new CellEditor instance is instantiated with
- its required parameters. An `editor` CSS class is added to the cell upon
- entering edit mode.
-
- This method triggers a Backbone `backgrid:edit` event from the model when
- the cell is entering edit mode and an editor instance has been constructed,
- but before it is rendered and inserted into the DOM. The cell and the
- constructed cell editor instance are sent as event parameters when this
- event is triggered.
-
- When this cell has finished switching to edit mode, a Backbone
- `backgrid:editing` event is triggered from the model. The cell and the
- constructed cell instance are also sent as parameters in the event.
-
- When the model triggers a `backgrid:error` event, it means the editor is
- unable to convert the current user input to an apprpriate value for the
- model's column, and an `error` CSS class is added to the cell accordingly.
- */
- enterEditMode: function () {
- var model = this.model;
- var column = this.column;
-
- var editable = Backgrid.callByNeed(column.editable(), column, model);
- if (editable) {
-
- this.currentEditor = new this.editor({
- column: this.column,
- model: this.model,
- formatter: this.formatter
- });
-
- model.trigger("backgrid:edit", model, column, this, this.currentEditor);
-
- // Need to redundantly undelegate events for Firefox
- this.undelegateEvents();
- this.$el.empty();
- this.$el.append(this.currentEditor.$el);
- this.currentEditor.render();
- this.$el.addClass("editor");
-
- model.trigger("backgrid:editing", model, column, this, this.currentEditor);
- }
- },
-
- /**
- Put an `error` CSS class on the table cell.
- */
- renderError: function (model, column) {
- if (column == null || column.get("name") == this.column.get("name")) {
- this.$el.addClass("error");
- }
- },
-
- /**
- Removes the editor and re-render in display mode.
- */
- exitEditMode: function () {
- this.$el.removeClass("error");
- this.currentEditor.remove();
- this.stopListening(this.currentEditor);
- delete this.currentEditor;
- this.$el.removeClass("editor");
- this.render();
- },
-
- /**
- Clean up this cell.
-
- @chainable
- */
- remove: function () {
- if (this.currentEditor) {
- this.currentEditor.remove.apply(this.currentEditor, arguments);
- delete this.currentEditor;
- }
- return Cell.__super__.remove.apply(this, arguments);
- }
-
-});
-
-/**
- StringCell displays HTML escaped strings and accepts anything typed in.
-
- @class Backgrid.StringCell
- @extends Backgrid.Cell
-*/
-var StringCell = Backgrid.StringCell = Cell.extend({
-
- /** @property */
- className: "string-cell",
-
- formatter: StringFormatter
-
-});
-
-/**
- UriCell renders an HTML `<a>` anchor for the value and accepts URIs as user
- input values. No type conversion or URL validation is done by the formatter
- of this cell. Users who need URL validation are encourage to subclass UriCell
- to take advantage of the parsing capabilities of the HTMLAnchorElement
- available on HTML5-capable browsers or using a third-party library like
- [URI.js](https://github.com/medialize/URI.js).
-
- @class Backgrid.UriCell
- @extends Backgrid.Cell
-*/
-var UriCell = Backgrid.UriCell = Cell.extend({
-
- /** @property */
- className: "uri-cell",
-
- /**
- @property {string} [title] The title attribute of the generated anchor. It
- uses the display value formatted by the `formatter.fromRaw` by default.
- */
- title: null,
-
- /**
- @property {string} [target="_blank"] The target attribute of the generated
- anchor.
- */
- target: "_blank",
-
- initialize: function (options) {
- UriCell.__super__.initialize.apply(this, arguments);
- this.title = options.title || this.title;
- this.target = options.target || this.target;
- },
-
- render: function () {
- this.$el.empty();
- var rawValue = this.model.get(this.column.get("name"));
- var formattedValue = this.formatter.fromRaw(rawValue, this.model);
- this.$el.append($("<a>", {
- tabIndex: -1,
- href: rawValue,
- title: this.title || formattedValue,
- target: this.target
- }).text(formattedValue));
- this.delegateEvents();
- return this;
- }
-
-});
-
-/**
- Like Backgrid.UriCell, EmailCell renders an HTML `<a>` anchor for the
- value. The `href` in the anchor is prefixed with `mailto:`. EmailCell will
- complain if the user enters a string that doesn't contain the `@` sign.
-
- @class Backgrid.EmailCell
- @extends Backgrid.StringCell
-*/
-var EmailCell = Backgrid.EmailCell = StringCell.extend({
-
- /** @property */
- className: "email-cell",
-
- formatter: EmailFormatter,
-
- render: function () {
- this.$el.empty();
- var model = this.model;
- var formattedValue = this.formatter.fromRaw(model.get(this.column.get("name")), model);
- this.$el.append($("<a>", {
- tabIndex: -1,
- href: "mailto:" + formattedValue,
- title: formattedValue
- }).text(formattedValue));
- this.delegateEvents();
- return this;
- }
-
-});
-
-/**
- NumberCell is a generic cell that renders all numbers. Numbers are formatted
- using a Backgrid.NumberFormatter.
-
- @class Backgrid.NumberCell
- @extends Backgrid.Cell
-*/
-var NumberCell = Backgrid.NumberCell = Cell.extend({
-
- /** @property */
- className: "number-cell",
-
- /**
- @property {number} [decimals=2] Must be an integer.
- */
- decimals: NumberFormatter.prototype.defaults.decimals,
-
- /** @property {string} [decimalSeparator='.'] */
- decimalSeparator: NumberFormatter.prototype.defaults.decimalSeparator,
-
- /** @property {string} [orderSeparator=','] */
- orderSeparator: NumberFormatter.prototype.defaults.orderSeparator,
-
- /** @property {Backgrid.CellFormatter} [formatter=Backgrid.NumberFormatter] */
- formatter: NumberFormatter,
-
- /**
- Initializes this cell and the number formatter.
-
- @param {Object} options
- @param {Backbone.Model} options.model
- @param {Backgrid.Column} options.column
- */
- initialize: function (options) {
- NumberCell.__super__.initialize.apply(this, arguments);
- var formatter = this.formatter;
- formatter.decimals = this.decimals;
- formatter.decimalSeparator = this.decimalSeparator;
- formatter.orderSeparator = this.orderSeparator;
- }
-
-});
-
-/**
- An IntegerCell is just a Backgrid.NumberCell with 0 decimals. If a floating
- point number is supplied, the number is simply rounded the usual way when
- displayed.
-
- @class Backgrid.IntegerCell
- @extends Backgrid.NumberCell
-*/
-var IntegerCell = Backgrid.IntegerCell = NumberCell.extend({
-
- /** @property */
- className: "integer-cell",
-
- /**
- @property {number} decimals Must be an integer.
- */
- decimals: 0
-});
-
-/**
- A PercentCell is another Backgrid.NumberCell that takes a floating number,
- optionally multiplied by a multiplier and display it as a percentage.
-
- @class Backgrid.PercentCell
- @extends Backgrid.NumberCell
- */
-var PercentCell = Backgrid.PercentCell = NumberCell.extend({
-
- /** @property */
- className: "percent-cell",
-
- /** @property {number} [multiplier=1] */
- multiplier: PercentFormatter.prototype.defaults.multiplier,
-
- /** @property {string} [symbol='%'] */
- symbol: PercentFormatter.prototype.defaults.symbol,
-
- /** @property {Backgrid.CellFormatter} [formatter=Backgrid.PercentFormatter] */
- formatter: PercentFormatter,
-
- /**
- Initializes this cell and the percent formatter.
-
- @param {Object} options
- @param {Backbone.Model} options.model
- @param {Backgrid.Column} options.column
- */
- initialize: function () {
- PercentCell.__super__.initialize.apply(this, arguments);
- var formatter = this.formatter;
- formatter.multiplier = this.multiplier;
- formatter.symbol = this.symbol;
- }
-
-});
-
-/**
- DatetimeCell is a basic cell that accepts datetime string values in RFC-2822
- or W3C's subset of ISO-8601 and displays them in ISO-8601 format. For a much
- more sophisticated date time cell with better datetime formatting, take a
- look at the Backgrid.Extension.MomentCell extension.
-
- @class Backgrid.DatetimeCell
- @extends Backgrid.Cell
-
- See:
-
- - Backgrid.Extension.MomentCell
- - Backgrid.DatetimeFormatter
-*/
-var DatetimeCell = Backgrid.DatetimeCell = Cell.extend({
-
- /** @property */
- className: "datetime-cell",
-
- /**
- @property {boolean} [includeDate=true]
- */
- includeDate: DatetimeFormatter.prototype.defaults.includeDate,
-
- /**
- @property {boolean} [includeTime=true]
- */
- includeTime: DatetimeFormatter.prototype.defaults.includeTime,
-
- /**
- @property {boolean} [includeMilli=false]
- */
- includeMilli: DatetimeFormatter.prototype.defaults.includeMilli,
-
- /** @property {Backgrid.CellFormatter} [formatter=Backgrid.DatetimeFormatter] */
- formatter: DatetimeFormatter,
-
- /**
- Initializes this cell and the datetime formatter.
-
- @param {Object} options
- @param {Backbone.Model} options.model
- @param {Backgrid.Column} options.column
- */
- initialize: function (options) {
- DatetimeCell.__super__.initialize.apply(this, arguments);
- var formatter = this.formatter;
- formatter.includeDate = this.includeDate;
- formatter.includeTime = this.includeTime;
- formatter.includeMilli = this.includeMilli;
-
- var placeholder = this.includeDate ? "YYYY-MM-DD" : "";
- placeholder += (this.includeDate && this.includeTime) ? "T" : "";
- placeholder += this.includeTime ? "HH:mm:ss" : "";
- placeholder += (this.includeTime && this.includeMilli) ? ".SSS" : "";
-
- this.editor = this.editor.extend({
- attributes: _.extend({}, this.editor.prototype.attributes, this.editor.attributes, {
- placeholder: placeholder
- })
- });
- }
-
-});
-
-/**
- DateCell is a Backgrid.DatetimeCell without the time part.
-
- @class Backgrid.DateCell
- @extends Backgrid.DatetimeCell
-*/
-var DateCell = Backgrid.DateCell = DatetimeCell.extend({
-
- /** @property */
- className: "date-cell",
-
- /** @property */
- includeTime: false
-
-});
-
-/**
- TimeCell is a Backgrid.DatetimeCell without the date part.
-
- @class Backgrid.TimeCell
- @extends Backgrid.DatetimeCell
-*/
-var TimeCell = Backgrid.TimeCell = DatetimeCell.extend({
-
- /** @property */
- className: "time-cell",
-
- /** @property */
- includeDate: false
-
-});
-
-/**
- BooleanCellEditor renders a checkbox as its editor.
-
- @class Backgrid.BooleanCellEditor
- @extends Backgrid.CellEditor
-*/
-var BooleanCellEditor = Backgrid.BooleanCellEditor = CellEditor.extend({
-
- /** @property */
- tagName: "input",
-
- /** @property */
- attributes: {
- tabIndex: -1,
- type: "checkbox"
- },
-
- /** @property */
- events: {
- "mousedown": function () {
- this.mouseDown = true;
- },
- "blur": "enterOrExitEditMode",
- "mouseup": function () {
- this.mouseDown = false;
- },
- "change": "saveOrCancel",
- "keydown": "saveOrCancel"
- },
-
- /**
- Renders a checkbox and check it if the model value of this column is true,
- uncheck otherwise.
- */
- render: function () {
- var model = this.model;
- var val = this.formatter.fromRaw(model.get(this.column.get("name")), model);
- this.$el.prop("checked", val);
- return this;
- },
-
- /**
- Event handler. Hack to deal with the case where `blur` is fired before
- `change` and `click` on a checkbox.
- */
- enterOrExitEditMode: function (e) {
- if (!this.mouseDown) {
- var model = this.model;
- model.trigger("backgrid:edited", model, this.column, new Command(e));
- }
- },
-
- /**
- Event handler. Save the value into the model if the event is `change` or
- one of the keyboard navigation key presses. Exit edit mode without saving
- if `escape` was pressed.
- */
- saveOrCancel: function (e) {
- var model = this.model;
- var column = this.column;
- var formatter = this.formatter;
- var command = new Command(e);
- // skip ahead to `change` when space is pressed
- if (command.passThru() && e.type != "change") return true;
- if (command.cancel()) {
- e.stopPropagation();
- model.trigger("backgrid:edited", model, column, command);
- }
-
- var $el = this.$el;
- if (command.save() || command.moveLeft() || command.moveRight() || command.moveUp() ||
- command.moveDown()) {
- e.preventDefault();
- e.stopPropagation();
- var val = formatter.toRaw($el.prop("checked"), model);
- model.set(column.get("name"), val);
- model.trigger("backgrid:edited", model, column, command);
- }
- else if (e.type == "change") {
- var val = formatter.toRaw($el.prop("checked"), model);
- model.set(column.get("name"), val);
- $el.focus();
- }
- }
-
-});
-
-/**
- BooleanCell renders a checkbox both during display mode and edit mode. The
- checkbox is checked if the model value is true, unchecked otherwise.
-
- @class Backgrid.BooleanCell
- @extends Backgrid.Cell
-*/
-var BooleanCell = Backgrid.BooleanCell = Cell.extend({
-
- /** @property */
- className: "boolean-cell",
-
- /** @property */
- editor: BooleanCellEditor,
-
- /** @property */
- events: {
- "click": "enterEditMode"
- },
-
- /**
- Renders a checkbox and check it if the model value of this column is true,
- uncheck otherwise.
- */
- render: function () {
- this.$el.empty();
- var model = this.model, column = this.column;
- var editable = Backgrid.callByNeed(column.editable(), column, model);
- this.$el.append($("<input>", {
- tabIndex: -1,
- type: "checkbox",
- checked: this.formatter.fromRaw(model.get(column.get("name")), model),
- disabled: !editable
- }));
- this.delegateEvents();
- return this;
- }
-
-});
-
-/**
- SelectCellEditor renders an HTML `<select>` fragment as the editor.
-
- @class Backgrid.SelectCellEditor
- @extends Backgrid.CellEditor
-*/
-var SelectCellEditor = Backgrid.SelectCellEditor = CellEditor.extend({
-
- /** @property */
- tagName: "select",
-
- /** @property */
- events: {
- "change": "save",
- "blur": "close",
- "keydown": "close"
- },
-
- /** @property {function(Object, ?Object=): string} template */
- template: _.template('<option value="<%- value %>" <%= selected ? \'selected="selected"\' : "" %>><%- text %></option>', null, {variable: null}),
-
- setOptionValues: function (optionValues) {
- this.optionValues = optionValues;
- this.optionValues = _.result(this, "optionValues");
- },
-
- setMultiple: function (multiple) {
- this.multiple = multiple;
- this.$el.prop("multiple", multiple);
- },
-
- _renderOptions: function (nvps, selectedValues) {
- var options = '';
- for (var i = 0; i < nvps.length; i++) {
- options = options + this.template({
- text: nvps[i][0],
- value: nvps[i][1],
- selected: _.indexOf(selectedValues, nvps[i][1]) > -1
- });
- }
- return options;
- },
-
- /**
- Renders the options if `optionValues` is a list of name-value pairs. The
- options are contained inside option groups if `optionValues` is a list of
- object hashes. The name is rendered at the option text and the value is the
- option value. If `optionValues` is a function, it is called without a
- parameter.
- */
- render: function () {
- this.$el.empty();
-
- var optionValues = _.result(this, "optionValues");
- var model = this.model;
- var selectedValues = this.formatter.fromRaw(model.get(this.column.get("name")), model);
-
- if (!_.isArray(optionValues)) throw new TypeError("optionValues must be an array");
-
- var optionValue = null;
- var optionText = null;
- var optionValue = null;
- var optgroupName = null;
- var optgroup = null;
-
- for (var i = 0; i < optionValues.length; i++) {
- var optionValue = optionValues[i];
-
- if (_.isArray(optionValue)) {
- optionText = optionValue[0];
- optionValue = optionValue[1];
-
- this.$el.append(this.template({
- text: optionText,
- value: optionValue,
- selected: _.indexOf(selectedValues, optionValue) > -1
- }));
- }
- else if (_.isObject(optionValue)) {
- optgroupName = optionValue.name;
- optgroup = $("<optgroup></optgroup>", { label: optgroupName });
- optgroup.append(this._renderOptions.call(this, optionValue.values, selectedValues));
- this.$el.append(optgroup);
- }
- else {
- throw new TypeError("optionValues elements must be a name-value pair or an object hash of { name: 'optgroup label', value: [option name-value pairs] }");
- }
- }
-
- this.delegateEvents();
-
- return this;
- },
-
- /**
- Saves the value of the selected option to the model attribute.
- */
- save: function (e) {
- var model = this.model;
- var column = this.column;
- model.set(column.get("name"), this.formatter.toRaw(this.$el.val(), model));
- },
-
- /**
- Triggers a `backgrid:edited` event from the model so the body can close
- this editor.
- */
- close: function (e) {
- var model = this.model;
- var column = this.column;
- var command = new Command(e);
- if (command.cancel()) {
- e.stopPropagation();
- model.trigger("backgrid:edited", model, column, new Command(e));
- }
- else if (command.save() || command.moveLeft() || command.moveRight() ||
- command.moveUp() || command.moveDown() || e.type == "blur") {
- e.preventDefault();
- e.stopPropagation();
- this.save(e);
- model.trigger("backgrid:edited", model, column, new Command(e));
- }
- }
-
-});
-
-/**
- SelectCell is also a different kind of cell in that upon going into edit mode
- the cell renders a list of options to pick from, as opposed to an input box.
-
- SelectCell cannot be referenced by its string name when used in a column
- definition because it requires an `optionValues` class attribute to be
- defined. `optionValues` can either be a list of name-value pairs, to be
- rendered as options, or a list of object hashes which consist of a key *name*
- which is the option group name, and a key *values* which is a list of
- name-value pairs to be rendered as options under that option group.
-
- In addition, `optionValues` can also be a parameter-less function that
- returns one of the above. If the options are static, it is recommended the
- returned values to be memoized. `_.memoize()` is a good function to help with
- that.
-
- During display mode, the default formatter will normalize the raw model value
- to an array of values whether the raw model value is a scalar or an
- array. Each value is compared with the `optionValues` values using
- Ecmascript's implicit type conversion rules. When exiting edit mode, no type
- conversion is performed when saving into the model. This behavior is not
- always desirable when the value type is anything other than string. To
- control type conversion on the client-side, you should subclass SelectCell to
- provide a custom formatter or provide the formatter to your column
- definition.
-
- See:
- [$.fn.val()](http://api.jquery.com/val/)
-
- @class Backgrid.SelectCell
- @extends Backgrid.Cell
-*/
-var SelectCell = Backgrid.SelectCell = Cell.extend({
-
- /** @property */
- className: "select-cell",
-
- /** @property */
- editor: SelectCellEditor,
-
- /** @property */
- multiple: false,
-
- /** @property */
- formatter: SelectFormatter,
-
- /**
- @property {Array.<Array>|Array.<{name: string, values: Array.<Array>}>} optionValues
- */
- optionValues: undefined,
-
- /** @property */
- delimiter: ', ',
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Model} options.model
- @param {Backgrid.Column} options.column
-
- @throws {TypeError} If `optionsValues` is undefined.
- */
- initialize: function (options) {
- SelectCell.__super__.initialize.apply(this, arguments);
- this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) {
- if (column.get("name") == this.column.get("name")) {
- editor.setOptionValues(this.optionValues);
- editor.setMultiple(this.multiple);
- }
- });
- },
-
- /**
- Renders the label using the raw value as key to look up from `optionValues`.
-
- @throws {TypeError} If `optionValues` is malformed.
- */
- render: function () {
- this.$el.empty();
-
- var optionValues = _.result(this, "optionValues");
- var model = this.model;
- var rawData = this.formatter.fromRaw(model.get(this.column.get("name")), model);
-
- var selectedText = [];
-
- try {
- if (!_.isArray(optionValues) || _.isEmpty(optionValues)) throw new TypeError;
-
- for (var k = 0; k < rawData.length; k++) {
- var rawDatum = rawData[k];
-
- for (var i = 0; i < optionValues.length; i++) {
- var optionValue = optionValues[i];
-
- if (_.isArray(optionValue)) {
- var optionText = optionValue[0];
- var optionValue = optionValue[1];
-
- if (optionValue == rawDatum) selectedText.push(optionText);
- }
- else if (_.isObject(optionValue)) {
- var optionGroupValues = optionValue.values;
-
- for (var j = 0; j < optionGroupValues.length; j++) {
- var optionGroupValue = optionGroupValues[j];
- if (optionGroupValue[1] == rawDatum) {
- selectedText.push(optionGroupValue[0]);
- }
- }
- }
- else {
- throw new TypeError;
- }
- }
- }
-
- this.$el.append(selectedText.join(this.delimiter));
- }
- catch (ex) {
- if (ex instanceof TypeError) {
- throw new TypeError("'optionValues' must be of type {Array.<Array>|Array.<{name: string, values: Array.<Array>}>}");
- }
- throw ex;
- }
-
- this.delegateEvents();
-
- return this;
- }
-
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- A Column is a placeholder for column metadata.
-
- You usually don't need to create an instance of this class yourself as a
- collection of column instances will be created for you from a list of column
- attributes in the Backgrid.js view class constructors.
-
- @class Backgrid.Column
- @extends Backbone.Model
-*/
-var Column = Backgrid.Column = Backbone.Model.extend({
-
- /**
- @cfg {Object} defaults Column defaults. To override any of these default
- values, you can either change the prototype directly to override
- Column.defaults globally or extend Column and supply the custom class to
- Backgrid.Grid:
-
- // Override Column defaults globally
- Column.prototype.defaults.sortable = false;
-
- // Override Column defaults locally
- var MyColumn = Column.extend({
- defaults: _.defaults({
- editable: false
- }, Column.prototype.defaults)
- });
-
- var grid = new Backgrid.Grid(columns: new Columns([{...}, {...}], {
- model: MyColumn
- }));
-
- @cfg {string} [defaults.name] The default name of the model attribute.
-
- @cfg {string} [defaults.label] The default label to show in the header.
-
- @cfg {string|Backgrid.Cell} [defaults.cell] The default cell type. If this
- is a string, the capitalized form will be used to look up a cell class in
- Backbone, i.e.: string => StringCell. If a Cell subclass is supplied, it is
- initialized with a hash of parameters. If a Cell instance is supplied, it
- is used directly.
-
- @cfg {string|Backgrid.HeaderCell} [defaults.headerCell] The default header
- cell type.
-
- @cfg {boolean|string|function(): boolean} [defaults.sortable=true] Whether
- this column is sortable. If the value is a string, a method will the same
- name will be looked up from the column instance to determine whether the
- column should be sortable. The method's signature must be `function
- (Backgrid.Column, Backbone.Model): boolean`.
-
- @cfg {boolean|string|function(): boolean} [defaults.editable=true] Whether
- this column is editable. If the value is a string, a method will the same
- name will be looked up from the column instance to determine whether the
- column should be editable. The method's signature must be `function
- (Backgrid.Column, Backbone.Model): boolean`.
-
- @cfg {boolean|string|function(): boolean} [defaults.renderable=true]
- Whether this column is renderable. If the value is a string, a method will
- the same name will be looked up from the column instance to determine
- whether the column should be renderable. The method's signature must be
- `function (Backrid.Column, Backbone.Model): boolean`.
-
- @cfg {Backgrid.CellFormatter | Object | string} [defaults.formatter] The
- formatter to use to convert between raw model values and user input.
-
- @cfg {"toggle"|"cycle"} [defaults.sortType="cycle"] Whether sorting will
- toggle between ascending and descending order, or cycle between insertion
- order, ascending and descending order.
-
- @cfg {(function(Backbone.Model, string): *) | string} [defaults.sortValue]
- The function to use to extract a value from the model for comparison during
- sorting. If this value is a string, a method with the same name will be
- looked up from the column instance.
-
- @cfg {"ascending"|"descending"|null} [defaults.direction=null] The initial
- sorting direction for this column. The default is ordered by
- Backbone.Model.cid, which usually means the collection is ordered by
- insertion order.
- */
- defaults: {
- name: undefined,
- label: undefined,
- sortable: true,
- editable: true,
- renderable: true,
- formatter: undefined,
- sortType: "cycle",
- sortValue: undefined,
- direction: null,
- cell: undefined,
- headerCell: undefined
- },
-
- /**
- Initializes this Column instance.
-
- @param {Object} attrs
-
- @param {string} attrs.name The model attribute this column is responsible
- for.
-
- @param {string|Backgrid.Cell} attrs.cell The cell type to use to render
- this column.
-
- @param {string} [attrs.label]
-
- @param {string|Backgrid.HeaderCell} [attrs.headerCell]
-
- @param {boolean|string|function(): boolean} [attrs.sortable=true]
-
- @param {boolean|string|function(): boolean} [attrs.editable=true]
-
- @param {boolean|string|function(): boolean} [attrs.renderable=true]
-
- @param {Backgrid.CellFormatter | Object | string} [attrs.formatter]
-
- @param {"toggle"|"cycle"} [attrs.sortType="cycle"]
-
- @param {(function(Backbone.Model, string): *) | string} [attrs.sortValue]
-
- @throws {TypeError} If attrs.cell or attrs.options are not supplied.
-
- @throws {ReferenceError} If formatter is a string but a formatter class of
- said name cannot be found in the Backgrid module.
-
- See:
-
- - Backgrid.Column.defaults
- - Backgrid.Cell
- - Backgrid.CellFormatter
- */
- initialize: function () {
- if (!this.has("label")) {
- this.set({ label: this.get("name") }, { silent: true });
- }
-
- var headerCell = Backgrid.resolveNameToClass(this.get("headerCell"), "HeaderCell");
-
- var cell = Backgrid.resolveNameToClass(this.get("cell"), "Cell");
-
- this.set({cell: cell, headerCell: headerCell}, { silent: true });
- },
-
- /**
- Returns an appropriate value extraction function from a model for sorting.
-
- If the column model contains an attribute `sortValue`, if it is a string, a
- method from the column instance identifified by the `sortValue` string is
- returned. If it is a function, it it returned as is. If `sortValue` isn't
- found from the column model's attributes, a default value extraction
- function is returned which will compare according to the natural order of
- the value's type.
-
- @return {function(Backbone.Model, string): *}
- */
- sortValue: function () {
- var sortValue = this.get("sortValue");
- if (_.isString(sortValue)) return this[sortValue];
- else if (_.isFunction(sortValue)) return sortValue;
-
- return function (model, colName) {
- return model.get(colName);
- };
- }
-
- /**
- @member Backgrid.Column
- @protected
- @method sortable
- @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
- */
-
- /**
- @member Backgrid.Column
- @protected
- @method editable
- @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
- */
-
- /**
- @member Backgrid.Column
- @protected
- @method renderable
- @return {function(Backgrid.Column, Backbone.Model): boolean | boolean}
- */
-});
-
-_.each(["sortable", "renderable", "editable"], function (key) {
- Column.prototype[key] = function () {
- var value = this.get(key);
- if (_.isString(value)) return this[value];
- else if (_.isFunction(value)) return value;
-
- return !!value;
- };
-});
-
-/**
- A Backbone collection of Column instances.
-
- @class Backgrid.Columns
- @extends Backbone.Collection
- */
-var Columns = Backgrid.Columns = Backbone.Collection.extend({
-
- /**
- @property {Backgrid.Column} model
- */
- model: Column
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- Row is a simple container view that takes a model instance and a list of
- column metadata describing how each of the model's attribute is to be
- rendered, and apply the appropriate cell to each attribute.
-
- @class Backgrid.Row
- @extends Backbone.View
-*/
-var Row = Backgrid.Row = Backbone.View.extend({
-
- /** @property */
- tagName: "tr",
-
- /**
- Initializes a row view instance.
-
- @param {Object} options
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
- @param {Backbone.Model} options.model The model instance to render.
-
- @throws {TypeError} If options.columns or options.model is undefined.
- */
- initialize: function (options) {
-
- var columns = this.columns = options.columns;
- if (!(columns instanceof Backbone.Collection)) {
- columns = this.columns = new Columns(columns);
- }
-
- var cells = this.cells = [];
- for (var i = 0; i < columns.length; i++) {
- cells.push(this.makeCell(columns.at(i), options));
- }
-
- this.listenTo(columns, "add", function (column, columns) {
- var i = columns.indexOf(column);
- var cell = this.makeCell(column, options);
- cells.splice(i, 0, cell);
-
- var $el = this.$el;
- if (i === 0) {
- $el.prepend(cell.render().$el);
- }
- else if (i === columns.length - 1) {
- $el.append(cell.render().$el);
- }
- else {
- $el.children().eq(i).before(cell.render().$el);
- }
- });
-
- this.listenTo(columns, "remove", function (column, columns, opts) {
- cells[opts.index].remove();
- cells.splice(opts.index, 1);
- });
- },
-
- /**
- Factory method for making a cell. Used by #initialize internally. Override
- this to provide an appropriate cell instance for a custom Row subclass.
-
- @protected
-
- @param {Backgrid.Column} column
- @param {Object} options The options passed to #initialize.
-
- @return {Backgrid.Cell}
- */
- makeCell: function (column) {
- return new (column.get("cell"))({
- column: column,
- model: this.model
- });
- },
-
- /**
- Renders a row of cells for this row's model.
- */
- render: function () {
- this.$el.empty();
-
- var fragment = document.createDocumentFragment();
- for (var i = 0; i < this.cells.length; i++) {
- fragment.appendChild(this.cells[i].render().el);
- }
-
- this.el.appendChild(fragment);
-
- this.delegateEvents();
-
- return this;
- },
-
- /**
- Clean up this row and its cells.
-
- @chainable
- */
- remove: function () {
- for (var i = 0; i < this.cells.length; i++) {
- var cell = this.cells[i];
- cell.remove.apply(cell, arguments);
- }
- return Backbone.View.prototype.remove.apply(this, arguments);
- }
-
-});
-
-/**
- EmptyRow is a simple container view that takes a list of column and render a
- row with a single column.
-
- @class Backgrid.EmptyRow
- @extends Backbone.View
-*/
-var EmptyRow = Backgrid.EmptyRow = Backbone.View.extend({
-
- /** @property */
- tagName: "tr",
-
- /** @property {string|function(): string} */
- emptyText: null,
-
- /**
- Initializer.
-
- @param {Object} options
- @param {string|function(): string} options.emptyText
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
- */
- initialize: function (options) {
- this.emptyText = options.emptyText;
- this.columns = options.columns;
- },
-
- /**
- Renders an empty row.
- */
- render: function () {
- this.$el.empty();
-
- var td = document.createElement("td");
- td.setAttribute("colspan", this.columns.length);
- td.appendChild(document.createTextNode(_.result(this, "emptyText")));
-
- this.el.className = "empty";
- this.el.appendChild(td);
-
- return this;
- }
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- HeaderCell is a special cell class that renders a column header cell. If the
- column is sortable, a sorter is also rendered and will trigger a table
- refresh after sorting.
-
- @class Backgrid.HeaderCell
- @extends Backbone.View
- */
-var HeaderCell = Backgrid.HeaderCell = Backbone.View.extend({
-
- /** @property */
- tagName: "th",
-
- /** @property */
- events: {
- "click a": "onClick"
- },
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backgrid.Column|Object} options.column
-
- @throws {TypeError} If options.column or options.collection is undefined.
- */
- initialize: function (options) {
- this.column = options.column;
- if (!(this.column instanceof Column)) {
- this.column = new Column(this.column);
- }
-
- var column = this.column, collection = this.collection, $el = this.$el;
-
- this.listenTo(column, "change:editable change:sortable change:renderable",
- function (column) {
- var changed = column.changedAttributes();
- for (var key in changed) {
- if (changed.hasOwnProperty(key)) {
- $el.toggleClass(key, changed[key]);
- }
- }
- });
- this.listenTo(column, "change:direction", this.setCellDirection);
- this.listenTo(column, "change:name change:label", this.render);
-
- if (Backgrid.callByNeed(column.editable(), column, collection)) $el.addClass("editable");
- if (Backgrid.callByNeed(column.sortable(), column, collection)) $el.addClass("sortable");
- if (Backgrid.callByNeed(column.renderable(), column, collection)) $el.addClass("renderable");
-
- this.listenTo(collection.fullCollection || collection, "sort", this.removeCellDirection);
- },
-
- /**
- Event handler for the collection's `sort` event. Removes all the CSS
- direction classes.
- */
- removeCellDirection: function () {
- this.$el.removeClass("ascending").removeClass("descending");
- this.column.set("direction", null);
- },
-
- /**
- Event handler for the column's `change:direction` event. If this
- HeaderCell's column is being sorted on, it applies the direction given as a
- CSS class to the header cell. Removes all the CSS direction classes
- otherwise.
- */
- setCellDirection: function (column, direction) {
- this.$el.removeClass("ascending").removeClass("descending");
- if (column.cid == this.column.cid) this.$el.addClass(direction);
- },
-
- /**
- Event handler for the `click` event on the cell's anchor. If the column is
- sortable, clicking on the anchor will cycle through 3 sorting orderings -
- `ascending`, `descending`, and default.
- */
- onClick: function (e) {
- e.preventDefault();
-
- var column = this.column;
- var collection = this.collection;
- var event = "backgrid:sort";
-
- function cycleSort(header, col) {
- if (column.get("direction") === "ascending") collection.trigger(event, col, "descending");
- else if (column.get("direction") === "descending") collection.trigger(event, col, null);
- else collection.trigger(event, col, "ascending");
- }
-
- function toggleSort(header, col) {
- if (column.get("direction") === "ascending") collection.trigger(event, col, "descending");
- else collection.trigger(event, col, "ascending");
- }
-
- var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
- if (sortable) {
- var sortType = column.get("sortType");
- if (sortType === "toggle") toggleSort(this, column);
- else cycleSort(this, column);
- }
- },
-
- /**
- Renders a header cell with a sorter, a label, and a class name for this
- column.
- */
- render: function () {
- this.$el.empty();
- var column = this.column;
- var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
- var label;
- if(sortable){
- label = $("<a>").text(column.get("label")).append("<b class='sort-caret'></b>");
- } else {
- label = document.createTextNode(column.get("label"));
- }
-
- this.$el.append(label);
- this.$el.addClass(column.get("name"));
- this.$el.addClass(column.get("direction"));
- this.delegateEvents();
- return this;
- }
-
-});
-
-/**
- HeaderRow is a controller for a row of header cells.
-
- @class Backgrid.HeaderRow
- @extends Backgrid.Row
- */
-var HeaderRow = Backgrid.HeaderRow = Backgrid.Row.extend({
-
- requiredOptions: ["columns", "collection"],
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
- @param {Backgrid.HeaderCell} [options.headerCell] Customized default
- HeaderCell for all the columns. Supply a HeaderCell class or instance to a
- the `headerCell` key in a column definition for column-specific header
- rendering.
-
- @throws {TypeError} If options.columns or options.collection is undefined.
- */
- initialize: function () {
- Backgrid.Row.prototype.initialize.apply(this, arguments);
- },
-
- makeCell: function (column, options) {
- var headerCell = column.get("headerCell") || options.headerCell || HeaderCell;
- headerCell = new headerCell({
- column: column,
- collection: this.collection
- });
- return headerCell;
- }
-
-});
-
-/**
- Header is a special structural view class that renders a table head with a
- single row of header cells.
-
- @class Backgrid.Header
- @extends Backbone.View
- */
-var Header = Backgrid.Header = Backbone.View.extend({
-
- /** @property */
- tagName: "thead",
-
- /**
- Initializer. Initializes this table head view to contain a single header
- row view.
-
- @param {Object} options
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
- @param {Backbone.Model} options.model The model instance to render.
-
- @throws {TypeError} If options.columns or options.model is undefined.
- */
- initialize: function (options) {
- this.columns = options.columns;
- if (!(this.columns instanceof Backbone.Collection)) {
- this.columns = new Columns(this.columns);
- }
-
- this.row = new Backgrid.HeaderRow({
- columns: this.columns,
- collection: this.collection
- });
- },
-
- /**
- Renders this table head with a single row of header cells.
- */
- render: function () {
- this.$el.append(this.row.render().$el);
- this.delegateEvents();
- return this;
- },
-
- /**
- Clean up this header and its row.
-
- @chainable
- */
- remove: function () {
- this.row.remove.apply(this.row, arguments);
- return Backbone.View.prototype.remove.apply(this, arguments);
- }
-
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- Body is the table body which contains the rows inside a table. Body is
- responsible for refreshing the rows after sorting, insertion and removal.
-
- @class Backgrid.Body
- @extends Backbone.View
-*/
-var Body = Backgrid.Body = Backbone.View.extend({
-
- /** @property */
- tagName: "tbody",
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Collection} options.collection
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
- Column metadata.
- @param {Backgrid.Row} [options.row=Backgrid.Row] The Row class to use.
- @param {string|function(): string} [options.emptyText] The text to display in the empty row.
-
- @throws {TypeError} If options.columns or options.collection is undefined.
-
- See Backgrid.Row.
- */
- initialize: function (options) {
-
- this.columns = options.columns;
- if (!(this.columns instanceof Backbone.Collection)) {
- this.columns = new Columns(this.columns);
- }
-
- this.row = options.row || Row;
- this.rows = this.collection.map(function (model) {
- var row = new this.row({
- columns: this.columns,
- model: model
- });
-
- return row;
- }, this);
-
- this.emptyText = options.emptyText;
- this._unshiftEmptyRowMayBe();
-
- var collection = this.collection;
- this.listenTo(collection, "add", this.insertRow);
- this.listenTo(collection, "remove", this.removeRow);
- this.listenTo(collection, "sort", this.refresh);
- this.listenTo(collection, "reset", this.refresh);
- this.listenTo(collection, "backgrid:sort", this.sort);
- this.listenTo(collection, "backgrid:edited", this.moveToNextCell);
- },
-
- _unshiftEmptyRowMayBe: function () {
- if (this.rows.length === 0 && this.emptyText != null) {
- this.rows.unshift(new EmptyRow({
- emptyText: this.emptyText,
- columns: this.columns
- }));
- }
- },
-
- /**
- This method can be called either directly or as a callback to a
- [Backbone.Collecton#add](http://backbonejs.org/#Collection-add) event.
-
- When called directly, it accepts a model or an array of models and an
- option hash just like
- [Backbone.Collection#add](http://backbonejs.org/#Collection-add) and
- delegates to it. Once the model is added, a new row is inserted into the
- body and automatically rendered.
-
- When called as a callback of an `add` event, splices a new row into the
- body and renders it.
-
- @param {Backbone.Model} model The model to render as a row.
- @param {Backbone.Collection} collection When called directly, this
- parameter is actually the options to
- [Backbone.Collection#add](http://backbonejs.org/#Collection-add).
- @param {Object} options When called directly, this must be null.
-
- See:
-
- - [Backbone.Collection#add](http://backbonejs.org/#Collection-add)
- */
- insertRow: function (model, collection, options) {
-
- if (this.rows[0] instanceof EmptyRow) this.rows.pop().remove();
-
- // insertRow() is called directly
- if (!(collection instanceof Backbone.Collection) && !options) {
- this.collection.add(model, (options = collection));
- return;
- }
-
- var row = new this.row({
- columns: this.columns,
- model: model
- });
-
- var index = collection.indexOf(model);
- this.rows.splice(index, 0, row);
-
- var $el = this.$el;
- var $children = $el.children();
- var $rowEl = row.render().$el;
-
- if (index >= $children.length) {
- $el.append($rowEl);
- }
- else {
- $children.eq(index).before($rowEl);
- }
-
- return this;
- },
-
- /**
- The method can be called either directly or as a callback to a
- [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)
- event.
-
- When called directly, it accepts a model or an array of models and an
- option hash just like
- [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove) and
- delegates to it. Once the model is removed, a corresponding row is removed
- from the body.
-
- When called as a callback of a `remove` event, splices into the rows and
- removes the row responsible for rendering the model.
-
- @param {Backbone.Model} model The model to remove from the body.
- @param {Backbone.Collection} collection When called directly, this
- parameter is actually the options to
- [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove).
- @param {Object} options When called directly, this must be null.
-
- See:
-
- - [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)
- */
- removeRow: function (model, collection, options) {
-
- // removeRow() is called directly
- if (!options) {
- this.collection.remove(model, (options = collection));
- this._unshiftEmptyRowMayBe();
- return;
- }
-
- if (_.isUndefined(options.render) || options.render) {
- this.rows[options.index].remove();
- }
-
- this.rows.splice(options.index, 1);
- this._unshiftEmptyRowMayBe();
-
- return this;
- },
-
- /**
- Reinitialize all the rows inside the body and re-render them. Triggers a
- Backbone `backgrid:refresh` event from the collection along with the body
- instance as its sole parameter when done.
- */
- refresh: function () {
- for (var i = 0; i < this.rows.length; i++) {
- this.rows[i].remove();
- }
-
- this.rows = this.collection.map(function (model) {
- var row = new this.row({
- columns: this.columns,
- model: model
- });
-
- return row;
- }, this);
- this._unshiftEmptyRowMayBe();
-
- this.render();
-
- this.collection.trigger("backgrid:refresh", this);
-
- return this;
- },
-
- /**
- Renders all the rows inside this body. If the collection is empty and
- `options.emptyText` is defined and not null in the constructor, an empty
- row is rendered, otherwise no row is rendered.
- */
- render: function () {
- this.$el.empty();
-
- var fragment = document.createDocumentFragment();
- for (var i = 0; i < this.rows.length; i++) {
- var row = this.rows[i];
- fragment.appendChild(row.render().el);
- }
-
- this.el.appendChild(fragment);
-
- this.delegateEvents();
-
- return this;
- },
-
- /**
- Clean up this body and it's rows.
-
- @chainable
- */
- remove: function () {
- for (var i = 0; i < this.rows.length; i++) {
- var row = this.rows[i];
- row.remove.apply(row, arguments);
- }
- return Backbone.View.prototype.remove.apply(this, arguments);
- },
-
- /**
- If the underlying collection is a Backbone.PageableCollection in
- server-mode or infinite-mode, a page of models is fetched after sorting is
- done on the server.
-
- If the underlying collection is a Backbone.PageableCollection in
- client-mode, or any
- [Backbone.Collection](http://backbonejs.org/#Collection) instance, sorting
- is done on the client side. If the collection is an instance of a
- Backbone.PageableCollection, sorting will be done globally on all the pages
- and the current page will then be returned.
-
- Triggers a Backbone `backgrid:sorted` event from the collection when done
- with the column, direction and a reference to the collection.
-
- @param {Backgrid.Column} column
- @param {null|"ascending"|"descending"} direction
-
- See [Backbone.Collection#comparator](http://backbonejs.org/#Collection-comparator)
- */
- sort: function (column, direction) {
-
- if (!_.contains(["ascending", "descending", null], direction)) {
- throw new RangeError('direction must be one of "ascending", "descending" or `null`');
- }
-
- if (_.isString(column)) column = this.columns.findWhere({name: column});
-
- var collection = this.collection;
-
- var order;
- if (direction === "ascending") order = -1;
- else if (direction === "descending") order = 1;
- else order = null;
-
- var comparator = this.makeComparator(column.get("name"), order,
- order ?
- column.sortValue() :
- function (model) {
- return model.cid.replace('c', '') * 1;
- });
-
- if (Backbone.PageableCollection &&
- collection instanceof Backbone.PageableCollection) {
-
- collection.setSorting(order && column.get("name"), order,
- {sortValue: column.sortValue()});
-
- if (collection.fullCollection) {
- // If order is null, pageable will remove the comparator on both sides,
- // in this case the default insertion order comparator needs to be
- // attached to get back to the order before sorting.
- if (collection.fullCollection.comparator == null) {
- collection.fullCollection.comparator = comparator;
- }
- collection.fullCollection.sort();
- collection.trigger("backgrid:sorted", column, direction, collection);
- }
- else collection.fetch({reset: true, success: function () {
- collection.trigger("backgrid:sorted", column, direction, collection);
- }});
- }
- else {
- collection.comparator = comparator;
- collection.sort();
- collection.trigger("backgrid:sorted", column, direction, collection);
- }
-
- column.set("direction", direction);
-
- return this;
- },
-
- makeComparator: function (attr, order, func) {
-
- return function (left, right) {
- // extract the values from the models
- var l = func(left, attr), r = func(right, attr), t;
-
- // if descending order, swap left and right
- if (order === 1) t = l, l = r, r = t;
-
- // compare as usual
- if (l === r) return 0;
- else if (l < r) return -1;
- return 1;
- };
- },
-
- /**
- Moves focus to the next renderable and editable cell and return the
- currently editing cell to display mode.
-
- Triggers a `backgrid:next` event on the model with the indices of the row
- and column the user *intended* to move to, and whether the intended move
- was going to go out of bounds. Note that *out of bound* always means an
- attempt to go past the end of the last row.
-
- @param {Backbone.Model} model The originating model
- @param {Backgrid.Column} column The originating model column
- @param {Backgrid.Command} command The Command object constructed from a DOM
- event
- */
- moveToNextCell: function (model, column, command) {
- var i = this.collection.indexOf(model);
- var j = this.columns.indexOf(column);
- var cell, renderable, editable, m, n;
-
- this.rows[i].cells[j].exitEditMode();
-
- if (command.moveUp() || command.moveDown() || command.moveLeft() ||
- command.moveRight() || command.save()) {
- var l = this.columns.length;
- var maxOffset = l * this.collection.length;
-
- if (command.moveUp() || command.moveDown()) {
- m = i + (command.moveUp() ? -1 : 1);
- var row = this.rows[m];
- if (row) {
- cell = row.cells[j];
- if (Backgrid.callByNeed(cell.column.editable(), cell.column, model)) {
- cell.enterEditMode();
- model.trigger("backgrid:next", m, j, false);
- }
- }
- else model.trigger("backgrid:next", m, j, true);
- }
- else if (command.moveLeft() || command.moveRight()) {
- var right = command.moveRight();
- for (var offset = i * l + j + (right ? 1 : -1);
- offset >= 0 && offset < maxOffset;
- right ? offset++ : offset--) {
- m = ~~(offset / l);
- n = offset - m * l;
- cell = this.rows[m].cells[n];
- renderable = Backgrid.callByNeed(cell.column.renderable(), cell.column, cell.model);
- editable = Backgrid.callByNeed(cell.column.editable(), cell.column, model);
- if (renderable && editable) {
- cell.enterEditMode();
- model.trigger("backgrid:next", m, n, false);
- break;
- }
- }
-
- if (offset == maxOffset) {
- model.trigger("backgrid:next", ~~(offset / l), offset - m * l, true);
- }
- }
- }
-
- return this;
- }
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- A Footer is a generic class that only defines a default tag `tfoot` and
- number of required parameters in the initializer.
-
- @abstract
- @class Backgrid.Footer
- @extends Backbone.View
- */
-var Footer = Backgrid.Footer = Backbone.View.extend({
-
- /** @property */
- tagName: "tfoot",
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
- Column metadata.
- @param {Backbone.Collection} options.collection
-
- @throws {TypeError} If options.columns or options.collection is undefined.
- */
- initialize: function (options) {
- this.columns = options.columns;
- if (!(this.columns instanceof Backbone.Collection)) {
- this.columns = new Backgrid.Columns(this.columns);
- }
- }
-
-});
-
-/*
- backgrid
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT license.
-*/
-
-/**
- Grid represents a data grid that has a header, body and an optional footer.
-
- By default, a Grid treats each model in a collection as a row, and each
- attribute in a model as a column. To render a grid you must provide a list of
- column metadata and a collection to the Grid constructor. Just like any
- Backbone.View class, the grid is rendered as a DOM node fragment when you
- call render().
-
- var grid = Backgrid.Grid({
- columns: [{ name: "id", label: "ID", type: "string" },
- // ...
- ],
- collections: books
- });
-
- $("#table-container").append(grid.render().el);
-
- Optionally, if you want to customize the rendering of the grid's header and
- footer, you may choose to extend Backgrid.Header and Backgrid.Footer, and
- then supply that class or an instance of that class to the Grid constructor.
- See the documentation for Header and Footer for further details.
-
- var grid = Backgrid.Grid({
- columns: [{ name: "id", label: "ID", type: "string" }],
- collections: books,
- header: Backgrid.Header.extend({
- //...
- }),
- footer: Backgrid.Paginator
- });
-
- Finally, if you want to override how the rows are rendered in the table body,
- you can supply a Body subclass as the `body` attribute that uses a different
- Row class.
-
- @class Backgrid.Grid
- @extends Backbone.View
-
- See:
-
- - Backgrid.Column
- - Backgrid.Header
- - Backgrid.Body
- - Backgrid.Row
- - Backgrid.Footer
-*/
-var Grid = Backgrid.Grid = Backbone.View.extend({
-
- /** @property */
- tagName: "table",
-
- /** @property */
- className: "backgrid",
-
- /** @property */
- header: Header,
-
- /** @property */
- body: Body,
-
- /** @property */
- footer: null,
-
- /**
- Initializes a Grid instance.
-
- @param {Object} options
- @param {Backbone.Collection.<Backgrid.Columns>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.
- @param {Backbone.Collection} options.collection The collection of tabular model data to display.
- @param {Backgrid.Header} [options.header=Backgrid.Header] An optional Header class to override the default.
- @param {Backgrid.Body} [options.body=Backgrid.Body] An optional Body class to override the default.
- @param {Backgrid.Row} [options.row=Backgrid.Row] An optional Row class to override the default.
- @param {Backgrid.Footer} [options.footer=Backgrid.Footer] An optional Footer class.
- */
- initialize: function (options) {
- // Convert the list of column objects here first so the subviews don't have
- // to.
- if (!(options.columns instanceof Backbone.Collection)) {
- options.columns = new Columns(options.columns);
- }
- this.columns = options.columns;
-
- var filteredOptions = _.omit(options, ["el", "id", "attributes",
- "className", "tagName", "events"]);
-
- // must construct body first so it listens to backgrid:sort first
- this.body = options.body || this.body;
- this.body = new this.body(filteredOptions);
-
- this.header = options.header || this.header;
- if (this.header) {
- this.header = new this.header(filteredOptions);
- }
-
- this.footer = options.footer || this.footer;
- if (this.footer) {
- this.footer = new this.footer(filteredOptions);
- }
-
- this.listenTo(this.columns, "reset", function () {
- if (this.header) {
- this.header = new (this.header.remove().constructor)(filteredOptions);
- }
- this.body = new (this.body.remove().constructor)(filteredOptions);
- if (this.footer) {
- this.footer = new (this.footer.remove().constructor)(filteredOptions);
- }
- this.render();
- });
- },
-
- /**
- Delegates to Backgrid.Body#insertRow.
- */
- insertRow: function () {
- this.body.insertRow.apply(this.body, arguments);
- return this;
- },
-
- /**
- Delegates to Backgrid.Body#removeRow.
- */
- removeRow: function () {
- this.body.removeRow.apply(this.body, arguments);
- return this;
- },
-
- /**
- Delegates to Backgrid.Columns#add for adding a column. Subviews can listen
- to the `add` event from their internal `columns` if rerendering needs to
- happen.
-
- @param {Object} [options] Options for `Backgrid.Columns#add`.
- */
- insertColumn: function () {
- this.columns.add.apply(this.columns, arguments);
- return this;
- },
-
- /**
- Delegates to Backgrid.Columns#remove for removing a column. Subviews can
- listen to the `remove` event from the internal `columns` if rerendering
- needs to happen.
-
- @param {Object} [options] Options for `Backgrid.Columns#remove`.
- */
- removeColumn: function () {
- this.columns.remove.apply(this.columns, arguments);
- return this;
- },
-
- /**
- Delegates to Backgrid.Body#sort.
- */
- sort: function () {
- this.body.sort.apply(this.body, arguments);
- return this;
- },
-
- /**
- Renders the grid's header, then footer, then finally the body. Triggers a
- Backbone `backgrid:rendered` event along with a reference to the grid when
- the it has successfully been rendered.
- */
- render: function () {
- this.$el.empty();
-
- if (this.header) {
- this.$el.append(this.header.render().$el);
- }
-
- if (this.footer) {
- this.$el.append(this.footer.render().$el);
- }
-
- this.$el.append(this.body.render().$el);
-
- this.delegateEvents();
-
- this.trigger("backgrid:rendered", this);
-
- return this;
- },
-
- /**
- Clean up this grid and its subviews.
-
- @chainable
- */
- remove: function () {
- this.header && this.header.remove.apply(this.header, arguments);
- this.body.remove.apply(this.body, arguments);
- this.footer && this.footer.remove.apply(this.footer, arguments);
- return Backbone.View.prototype.remove.apply(this, arguments);
- }
-
-});
-return Backgrid;
-}));
\ No newline at end of file
[19/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
new file mode 100644
index 0000000..9696cbc
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bufio"
+ "encoding/binary"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "net/rpc"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+)
+
+// Handles HRPC calls
+type HrpcHandler struct {
+ lg *common.Logger
+ store *dataStore
+}
+
+// The HRPC server
+type HrpcServer struct {
+ *rpc.Server
+ hand *HrpcHandler
+ listener net.Listener
+}
+
+// Codec which encodes HRPC data via JSON
+type HrpcServerCodec struct {
+ rwc io.ReadWriteCloser
+ length uint32
+}
+
+func (cdc *HrpcServerCodec) ReadRequestHeader(req *rpc.Request) error {
+ hdr := common.HrpcRequestHeader{}
+ err := binary.Read(cdc.rwc, binary.BigEndian, &hdr)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error reading header bytes: %s", err.Error()))
+ }
+ if hdr.Magic != common.HRPC_MAGIC {
+ return errors.New(fmt.Sprintf("Invalid request header: expected "+
+ "magic number of 0x%04x, but got 0x%04x", common.HRPC_MAGIC, hdr.Magic))
+ }
+ if hdr.Length > common.MAX_HRPC_BODY_LENGTH {
+ return errors.New(fmt.Sprintf("Length prefix was too long. Maximum "+
+ "length is %d, but we got %d.", common.MAX_HRPC_BODY_LENGTH, hdr.Length))
+ }
+ req.ServiceMethod = common.HrpcMethodIdToMethodName(hdr.MethodId)
+ if req.ServiceMethod == "" {
+ return errors.New(fmt.Sprintf("Unknown MethodID code 0x%04x",
+ hdr.MethodId))
+ }
+ req.Seq = hdr.Seq
+ cdc.length = hdr.Length
+ return nil
+}
+
+func (cdc *HrpcServerCodec) ReadRequestBody(body interface{}) error {
+ dec := json.NewDecoder(io.LimitReader(cdc.rwc, int64(cdc.length)))
+ err := dec.Decode(body)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to read request body: %s",
+ err.Error()))
+ }
+ return nil
+}
+
+var EMPTY []byte = make([]byte, 0)
+
+func (cdc *HrpcServerCodec) WriteResponse(resp *rpc.Response, msg interface{}) error {
+ var err error
+ buf := EMPTY
+ if msg != nil {
+ buf, err = json.Marshal(msg)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to marshal response message: %s",
+ err.Error()))
+ }
+ }
+ hdr := common.HrpcResponseHeader{}
+ hdr.MethodId = common.HrpcMethodNameToId(resp.ServiceMethod)
+ hdr.Seq = resp.Seq
+ hdr.ErrLength = uint32(len(resp.Error))
+ hdr.Length = uint32(len(buf))
+ writer := bufio.NewWriterSize(cdc.rwc, 256)
+ err = binary.Write(writer, binary.BigEndian, &hdr)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to write response header: %s",
+ err.Error()))
+ }
+ if hdr.ErrLength > 0 {
+ _, err = io.WriteString(writer, resp.Error)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to write error string: %s",
+ err.Error()))
+ }
+ }
+ if hdr.Length > 0 {
+ var length int
+ length, err = writer.Write(buf)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to write response "+
+ "message: %s", err.Error()))
+ }
+ if uint32(length) != hdr.Length {
+ return errors.New(fmt.Sprintf("Failed to write all of response "+
+ "message: %s", err.Error()))
+ }
+ }
+ err = writer.Flush()
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to write the response bytes: "+
+ "%s", err.Error()))
+ }
+ return nil
+}
+
+func (cdc *HrpcServerCodec) Close() error {
+ return cdc.rwc.Close()
+}
+
+func (hand *HrpcHandler) WriteSpans(req *common.WriteSpansReq,
+ resp *common.WriteSpansResp) (err error) {
+ hand.lg.Debugf("hrpc writeSpansHandler: received %d span(s). "+
+ "defaultPid = %s\n", len(req.Spans), req.DefaultPid)
+ for i := range req.Spans {
+ span := req.Spans[i]
+ if span.ProcessId == "" {
+ span.ProcessId = req.DefaultPid
+ }
+ hand.lg.Tracef("writing span %d: %s\n", i, span.ToJson())
+ hand.store.WriteSpan(span)
+ }
+ return nil
+}
+
+func CreateHrpcServer(cnf *conf.Config, store *dataStore) (*HrpcServer, error) {
+ lg := common.NewLogger("hrpc", cnf)
+ hsv := &HrpcServer{
+ Server: rpc.NewServer(),
+ hand: &HrpcHandler{
+ lg: lg,
+ store: store,
+ },
+ }
+ var err error
+ hsv.listener, err = net.Listen("tcp", cnf.Get(conf.HTRACE_HRPC_ADDRESS))
+ if err != nil {
+ return nil, err
+ }
+ hsv.Server.Register(hsv.hand)
+ go hsv.run()
+ lg.Infof("Started HRPC server on %s...\n", hsv.listener.Addr().String())
+ return hsv, nil
+}
+
+func (hsv *HrpcServer) run() {
+ lg := hsv.hand.lg
+ for {
+ conn, err := hsv.listener.Accept()
+ if err != nil {
+ lg.Errorf("HRPC Accept error: %s\n", err.Error())
+ continue
+ }
+ go hsv.ServeCodec(&HrpcServerCodec{
+ rwc: conn,
+ })
+ }
+}
+
+func (hsv *HrpcServer) Addr() net.Addr {
+ return hsv.listener.Addr()
+}
+
+func (hsv *HrpcServer) Close() {
+ hsv.listener.Close()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/htraced.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/htraced.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/htraced.go
new file mode 100644
index 0000000..64da457
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/htraced.go
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "encoding/json"
+ "fmt"
+ "net"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "os"
+ "strings"
+ "time"
+)
+
+var RELEASE_VERSION string
+var GIT_VERSION string
+
+const USAGE = `htraced: the HTrace server daemon.
+
+htraced receives trace spans sent from HTrace clients. It exposes a REST
+interface which others can query. It also runs a web server with a graphical
+user interface. htraced stores its span data in levelDB files on the local
+disks.
+
+Usage:
+--help: this help message
+
+-Dk=v: set configuration key 'k' to value 'v'
+For example -Dweb.address=127.0.0.1:8080 sets the web address to localhost,
+port 8080.
+
+-Dk: set configuration key 'k' to 'true'
+
+Normally, configuration options should be set in the ` + conf.CONFIG_FILE_NAME + `
+configuration file. We find this file by searching the paths in the
+` + conf.HTRACED_CONF_DIR + `. The command-line options are just an alternate way
+of setting configuration when launching the daemon.
+`
+
+func main() {
+ for idx := range os.Args {
+ arg := os.Args[idx]
+ if strings.HasPrefix(arg, "--h") || strings.HasPrefix(arg, "-h") {
+ fmt.Fprintf(os.Stderr, USAGE)
+ os.Exit(0)
+ }
+ }
+ cnf := common.LoadApplicationConfig()
+ common.InstallSignalHandlers(cnf)
+ lg := common.NewLogger("main", cnf)
+ defer lg.Close()
+ store, err := CreateDataStore(cnf, nil)
+ if err != nil {
+ lg.Errorf("Error creating datastore: %s\n", err.Error())
+ os.Exit(1)
+ }
+ var rsv *RestServer
+ rsv, err = CreateRestServer(cnf, store)
+ if err != nil {
+ lg.Errorf("Error creating REST server: %s\n", err.Error())
+ os.Exit(1)
+ }
+ var hsv *HrpcServer
+ if cnf.Get(conf.HTRACE_HRPC_ADDRESS) != "" {
+ hsv, err = CreateHrpcServer(cnf, store)
+ if err != nil {
+ lg.Errorf("Error creating HRPC server: %s\n", err.Error())
+ os.Exit(1)
+ }
+ } else {
+ lg.Infof("Not starting HRPC server because no value was given for %s.\n",
+ conf.HTRACE_HRPC_ADDRESS)
+ }
+ naddr := cnf.Get(conf.HTRACE_STARTUP_NOTIFICATION_ADDRESS)
+ if naddr != "" {
+ notif := StartupNotification{
+ HttpAddr: rsv.Addr().String(),
+ ProcessId: os.Getpid(),
+ }
+ if hsv != nil {
+ notif.HrpcAddr = hsv.Addr().String()
+ }
+ err = sendStartupNotification(naddr, ¬if)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to send startup notification: "+
+ "%s\n", err.Error())
+ os.Exit(1)
+ }
+ }
+ for {
+ time.Sleep(time.Duration(10) * time.Hour)
+ }
+}
+
+// A startup notification message that we optionally send on startup.
+// Used by unit tests.
+type StartupNotification struct {
+ HttpAddr string
+ HrpcAddr string
+ ProcessId int
+}
+
+func sendStartupNotification(naddr string, notif *StartupNotification) error {
+ conn, err := net.Dial("tcp", naddr)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if conn != nil {
+ conn.Close()
+ }
+ }()
+ var buf []byte
+ buf, err = json.Marshal(notif)
+ if err != nil {
+ return err
+ }
+ _, err = conn.Write(buf)
+ conn.Close()
+ conn = nil
+ return nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/mini_htraced.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/mini_htraced.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/mini_htraced.go
new file mode 100644
index 0000000..a54f2cb
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/mini_htraced.go
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "fmt"
+ "io/ioutil"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "os"
+ "strings"
+)
+
+//
+// MiniHTraceD is used in unit tests to set up a daemon with certain settings.
+// It takes care of things like creating and cleaning up temporary directories.
+//
+
+// The default number of managed data directories to use.
+const DEFAULT_NUM_DATA_DIRS = 2
+
+// Builds a MiniHTraced object.
+type MiniHTracedBuilder struct {
+ // The name of the MiniHTraced to build. This shows up in the test directory name and some
+ // other places.
+ Name string
+
+ // The configuration values to use for the MiniHTraced.
+ // If ths is nil, we use the default configuration for everything.
+ Cnf map[string]string
+
+ // The DataDirs to use. Empty entries will turn into random names.
+ DataDirs []string
+
+ // If true, we will keep the data dirs around after MiniHTraced#Close
+ KeepDataDirsOnClose bool
+
+ // If non-null, the WrittenSpans channel to use when creating the DataStore.
+ WrittenSpans chan *common.Span
+}
+
+type MiniHTraced struct {
+ Name string
+ Cnf *conf.Config
+ DataDirs []string
+ Store *dataStore
+ Rsv *RestServer
+ Hsv *HrpcServer
+ Lg *common.Logger
+ KeepDataDirsOnClose bool
+}
+
+func (bld *MiniHTracedBuilder) Build() (*MiniHTraced, error) {
+ var err error
+ var store *dataStore
+ var rsv *RestServer
+ var hsv *HrpcServer
+ if bld.Name == "" {
+ bld.Name = "HTraceTest"
+ }
+ if bld.Cnf == nil {
+ bld.Cnf = make(map[string]string)
+ }
+ if bld.DataDirs == nil {
+ bld.DataDirs = make([]string, 2)
+ }
+ for idx := range bld.DataDirs {
+ if bld.DataDirs[idx] == "" {
+ bld.DataDirs[idx], err = ioutil.TempDir(os.TempDir(),
+ fmt.Sprintf("%s%d", bld.Name, idx+1))
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+ bld.Cnf[conf.HTRACE_DATA_STORE_DIRECTORIES] =
+ strings.Join(bld.DataDirs, conf.PATH_LIST_SEP)
+ bld.Cnf[conf.HTRACE_WEB_ADDRESS] = ":0" // use a random port for the REST server
+ bld.Cnf[conf.HTRACE_HRPC_ADDRESS] = ":0" // use a random port for the HRPC server
+ bld.Cnf[conf.HTRACE_LOG_LEVEL] = "TRACE"
+ cnfBld := conf.Builder{Values: bld.Cnf, Defaults: conf.DEFAULTS}
+ cnf, err := cnfBld.Build()
+ if err != nil {
+ return nil, err
+ }
+ lg := common.NewLogger("mini.htraced", cnf)
+ defer func() {
+ if err != nil {
+ if store != nil {
+ store.Close()
+ }
+ for idx := range bld.DataDirs {
+ if bld.DataDirs[idx] != "" {
+ os.RemoveAll(bld.DataDirs[idx])
+ }
+ }
+ if rsv != nil {
+ rsv.Close()
+ }
+ lg.Infof("Failed to create MiniHTraced %s: %s\n", bld.Name, err.Error())
+ lg.Close()
+ }
+ }()
+ store, err = CreateDataStore(cnf, bld.WrittenSpans)
+ if err != nil {
+ return nil, err
+ }
+ rsv, err = CreateRestServer(cnf, store)
+ if err != nil {
+ return nil, err
+ }
+ hsv, err = CreateHrpcServer(cnf, store)
+ if err != nil {
+ return nil, err
+ }
+
+ lg.Infof("Created MiniHTraced %s\n", bld.Name)
+ return &MiniHTraced{
+ Name: bld.Name,
+ Cnf: cnf,
+ DataDirs: bld.DataDirs,
+ Store: store,
+ Rsv: rsv,
+ Hsv: hsv,
+ Lg: lg,
+ KeepDataDirsOnClose: bld.KeepDataDirsOnClose,
+ }, nil
+}
+
+// Return a Config object that clients can use to connect to this MiniHTraceD.
+func (ht *MiniHTraced) ClientConf() *conf.Config {
+ return ht.Cnf.Clone(conf.HTRACE_WEB_ADDRESS, ht.Rsv.Addr().String(),
+ conf.HTRACE_HRPC_ADDRESS, ht.Hsv.Addr().String())
+}
+
+func (ht *MiniHTraced) Close() {
+ ht.Lg.Infof("Closing MiniHTraced %s\n", ht.Name)
+ ht.Rsv.Close()
+ ht.Store.Close()
+ if !ht.KeepDataDirsOnClose {
+ for idx := range ht.DataDirs {
+ ht.Lg.Infof("Removing %s...\n", ht.DataDirs[idx])
+ os.RemoveAll(ht.DataDirs[idx])
+ }
+ }
+ ht.Lg.Infof("Finished closing MiniHTraced %s\n", ht.Name)
+ ht.Lg.Close()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/rest.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/rest.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/rest.go
new file mode 100644
index 0000000..1449802
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/rest.go
@@ -0,0 +1,304 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "github.com/gorilla/mux"
+ "io"
+ "net"
+ "net/http"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "os"
+ "path/filepath"
+ "strconv"
+ "strings"
+)
+
+// Set the response headers.
+func setResponseHeaders(hdr http.Header) {
+ hdr.Set("Content-Type", "application/json")
+}
+
+// Write a JSON error response.
+func writeError(lg *common.Logger, w http.ResponseWriter, errCode int,
+ errStr string) {
+ str := strings.Replace(errStr, `"`, `'`, -1)
+ lg.Info(str + "\n")
+ w.WriteHeader(errCode)
+ w.Write([]byte(`{ "error" : "` + str + `"}`))
+}
+
+type serverInfoHandler struct {
+ lg *common.Logger
+}
+
+func (hand *serverInfoHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ setResponseHeaders(w.Header())
+ version := common.ServerInfo{ReleaseVersion: RELEASE_VERSION,
+ GitVersion: GIT_VERSION}
+ buf, err := json.Marshal(&version)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusInternalServerError,
+ fmt.Sprintf("error marshalling ServerInfo: %s\n", err.Error()))
+ return
+ }
+ hand.lg.Debugf("Returned serverInfo %s\n", string(buf))
+ w.Write(buf)
+}
+
+type dataStoreHandler struct {
+ lg *common.Logger
+ store *dataStore
+}
+
+func (hand *dataStoreHandler) parseSid(w http.ResponseWriter,
+ str string) (common.SpanId, bool) {
+ val, err := strconv.ParseUint(str, 16, 64)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusBadRequest,
+ fmt.Sprintf("Failed to parse span ID %s: %s", str, err.Error()))
+ w.Write([]byte("Error parsing : " + err.Error()))
+ return 0, false
+ }
+ return common.SpanId(val), true
+}
+
+func (hand *dataStoreHandler) getReqField32(fieldName string, w http.ResponseWriter,
+ req *http.Request) (int32, bool) {
+ str := req.FormValue(fieldName)
+ if str == "" {
+ writeError(hand.lg, w, http.StatusBadRequest, fmt.Sprintf("No %s specified.", fieldName))
+ return -1, false
+ }
+ val, err := strconv.ParseUint(str, 16, 32)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusBadRequest,
+ fmt.Sprintf("Error parsing %s: %s.", fieldName, err.Error()))
+ return -1, false
+ }
+ return int32(val), true
+}
+
+type findSidHandler struct {
+ dataStoreHandler
+}
+
+func (hand *findSidHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ setResponseHeaders(w.Header())
+ req.ParseForm()
+ vars := mux.Vars(req)
+ stringSid := vars["id"]
+ sid, ok := hand.parseSid(w, stringSid)
+ if !ok {
+ return
+ }
+ hand.lg.Debugf("findSidHandler(sid=%s)\n", sid.String())
+ span := hand.store.FindSpan(sid)
+ if span == nil {
+ writeError(hand.lg, w, http.StatusNoContent,
+ fmt.Sprintf("No such span as %s\n", sid.String()))
+ return
+ }
+ w.Write(span.ToJson())
+}
+
+type findChildrenHandler struct {
+ dataStoreHandler
+}
+
+func (hand *findChildrenHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ setResponseHeaders(w.Header())
+ req.ParseForm()
+ vars := mux.Vars(req)
+ stringSid := vars["id"]
+ sid, ok := hand.parseSid(w, stringSid)
+ if !ok {
+ return
+ }
+ var lim int32
+ lim, ok = hand.getReqField32("lim", w, req)
+ if !ok {
+ return
+ }
+ hand.lg.Debugf("findChildrenHandler(sid=%s, lim=%d)\n", sid.String(), lim)
+ children := hand.store.FindChildren(sid, lim)
+ jbytes, err := json.Marshal(children)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusInternalServerError,
+ fmt.Sprintf("Error marshalling children: %s", err.Error()))
+ return
+ }
+ w.Write(jbytes)
+}
+
+type writeSpansHandler struct {
+ dataStoreHandler
+}
+
+func (hand *writeSpansHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ setResponseHeaders(w.Header())
+ dec := json.NewDecoder(req.Body)
+ spans := make([]*common.Span, 0, 32)
+ defaultPid := req.Header.Get("htrace-pid")
+ for {
+ var span common.Span
+ err := dec.Decode(&span)
+ if err != nil {
+ if err != io.EOF {
+ writeError(hand.lg, w, http.StatusBadRequest,
+ fmt.Sprintf("Error parsing spans: %s", err.Error()))
+ return
+ }
+ break
+ }
+ if span.ProcessId == "" {
+ span.ProcessId = defaultPid
+ }
+ spans = append(spans, &span)
+ }
+ hand.lg.Debugf("writeSpansHandler: received %d span(s). defaultPid = %s\n",
+ len(spans), defaultPid)
+ for spanIdx := range spans {
+ hand.lg.Debugf("writing span %s\n", spans[spanIdx].ToJson())
+ hand.store.WriteSpan(spans[spanIdx])
+ }
+}
+
+type queryHandler struct {
+ lg *common.Logger
+ dataStoreHandler
+}
+
+func (hand *queryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ setResponseHeaders(w.Header())
+ queryString := req.FormValue("query")
+ if queryString == "" {
+ writeError(hand.lg, w, http.StatusBadRequest, "No query provided.\n")
+ return
+ }
+ var query common.Query
+ reader := bytes.NewBufferString(queryString)
+ dec := json.NewDecoder(reader)
+ err := dec.Decode(&query)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusBadRequest,
+ fmt.Sprintf("Error parsing query: %s", err.Error()))
+ return
+ }
+ var results []*common.Span
+ results, err = hand.store.HandleQuery(&query)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusInternalServerError,
+ fmt.Sprintf("Internal error processing query %s: %s",
+ query.String(), err.Error()))
+ return
+ }
+ var jbytes []byte
+ jbytes, err = json.Marshal(results)
+ if err != nil {
+ writeError(hand.lg, w, http.StatusInternalServerError,
+ fmt.Sprintf("Error marshalling results: %s", err.Error()))
+ return
+ }
+ w.Write(jbytes)
+}
+
+type logErrorHandler struct {
+ lg *common.Logger
+}
+
+func (hand *logErrorHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+ hand.lg.Errorf("Got unknown request %s\n", req.RequestURI)
+ writeError(hand.lg, w, http.StatusBadRequest, "Unknown request.")
+}
+
+type RestServer struct {
+ listener net.Listener
+ lg *common.Logger
+}
+
+func CreateRestServer(cnf *conf.Config, store *dataStore) (*RestServer, error) {
+ var err error
+ rsv := &RestServer{}
+ rsv.listener, err = net.Listen("tcp", cnf.Get(conf.HTRACE_WEB_ADDRESS))
+ if err != nil {
+ return nil, err
+ }
+ var success bool
+ defer func() {
+ if !success {
+ rsv.Close()
+ }
+ }()
+ rsv.lg = common.NewLogger("rest", cnf)
+
+ r := mux.NewRouter().StrictSlash(false)
+
+ r.Handle("/server/info", &serverInfoHandler{lg: rsv.lg}).Methods("GET")
+
+ writeSpansH := &writeSpansHandler{dataStoreHandler: dataStoreHandler{
+ store: store, lg: rsv.lg}}
+ r.Handle("/writeSpans", writeSpansH).Methods("POST")
+
+ queryH := &queryHandler{lg: rsv.lg, dataStoreHandler: dataStoreHandler{store: store}}
+ r.Handle("/query", queryH).Methods("GET")
+
+ span := r.PathPrefix("/span").Subrouter()
+ findSidH := &findSidHandler{dataStoreHandler: dataStoreHandler{store: store, lg: rsv.lg}}
+ span.Handle("/{id}", findSidH).Methods("GET")
+
+ findChildrenH := &findChildrenHandler{dataStoreHandler: dataStoreHandler{store: store,
+ lg: rsv.lg}}
+ span.Handle("/{id}/children", findChildrenH).Methods("GET")
+
+ // Default Handler. This will serve requests for static requests.
+ webdir := os.Getenv("HTRACED_WEB_DIR")
+ if webdir == "" {
+ webdir, err = filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "..", "..", "web"))
+
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ rsv.lg.Infof("Serving static files from %s\n.", webdir)
+ r.PathPrefix("/").Handler(http.FileServer(http.Dir(webdir))).Methods("GET")
+
+ // Log an error message for unknown non-GET requests.
+ r.PathPrefix("/").Handler(&logErrorHandler{lg: rsv.lg})
+
+ go http.Serve(rsv.listener, r)
+
+ rsv.lg.Infof("Started REST server on %s...\n", rsv.listener.Addr().String())
+ success = true
+ return rsv, nil
+}
+
+func (rsv *RestServer) Addr() net.Addr {
+ return rsv.listener.Addr()
+}
+
+func (rsv *RestServer) Close() {
+ rsv.listener.Close()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/test/random.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/test/random.go b/htrace-htraced/src/go/src/org/apache/htrace/test/random.go
new file mode 100644
index 0000000..d10e2f9
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/test/random.go
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test
+
+import (
+ "fmt"
+ "math/rand"
+ "org/apache/htrace/common"
+)
+
+func NonZeroRand64(rnd *rand.Rand) int64 {
+ for {
+ r := rnd.Int63()
+ if r == 0 {
+ continue
+ }
+ if rnd.Intn(1) != 0 {
+ return -r
+ }
+ return r
+ }
+}
+
+func NonZeroRand32(rnd *rand.Rand) int32 {
+ for {
+ r := rnd.Int31()
+ if r == 0 {
+ continue
+ }
+ if rnd.Intn(1) != 0 {
+ return -r
+ }
+ return r
+ }
+}
+
+// Create a random span.
+func NewRandomSpan(rnd *rand.Rand, potentialParents []*common.Span) *common.Span {
+ parents := []common.SpanId{}
+ if potentialParents != nil {
+ parentIdx := rnd.Intn(len(potentialParents) + 1)
+ if parentIdx < len(potentialParents) {
+ parents = []common.SpanId{potentialParents[parentIdx].Id}
+ }
+ }
+ return &common.Span{Id: common.SpanId(NonZeroRand64(rnd)),
+ SpanData: common.SpanData{
+ Begin: NonZeroRand64(rnd),
+ End: NonZeroRand64(rnd),
+ Description: "getFileDescriptors",
+ TraceId: common.SpanId(NonZeroRand64(rnd)),
+ Parents: parents,
+ ProcessId: fmt.Sprintf("process%d", NonZeroRand32(rnd)),
+ }}
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/test/util.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/test/util.go b/htrace-htraced/src/go/src/org/apache/htrace/test/util.go
new file mode 100644
index 0000000..cc058e0
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/test/util.go
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test
+
+import (
+ "org/apache/htrace/common"
+)
+
+func SpanId(str string) common.SpanId {
+ var spanId common.SpanId
+ err := spanId.FromString(str)
+ if err != nil {
+ panic(err.Error())
+ }
+ return spanId
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/test/java/org/apache/htrace/util/HTracedProcess.java
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/test/java/org/apache/htrace/util/HTracedProcess.java b/htrace-htraced/src/test/java/org/apache/htrace/util/HTracedProcess.java
index 9623a8f..5fa5d95 100644
--- a/htrace-htraced/src/test/java/org/apache/htrace/util/HTracedProcess.java
+++ b/htrace-htraced/src/test/java/org/apache/htrace/util/HTracedProcess.java
@@ -166,7 +166,7 @@ public class HTracedProcess extends Process {
* @return Path to the htraced binary.
*/
public static File getPathToHTraceBinaryFromTopLevel(final File topLevel) {
- return new File(new File(new File(new File(new File(topLevel, "htrace-core"), "src"), "go"),
+ return new File(new File(new File(new File(new File(topLevel, "htrace-htraced"), "src"), "go"),
"build"), "htraced");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/app.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/app.js b/htrace-htraced/src/web/app/app.js
new file mode 100644
index 0000000..0bc7100
--- /dev/null
+++ b/htrace-htraced/src/web/app/app.js
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+window.app = new Marionette.Application();
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/models/span.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/models/span.js b/htrace-htraced/src/web/app/models/span.js
new file mode 100644
index 0000000..b8dc114
--- /dev/null
+++ b/htrace-htraced/src/web/app/models/span.js
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Span model
+app.Span = Backbone.Model.extend({
+ "defaults": {
+ "spanId": null,
+ "traceId": null,
+ "processId": null,
+ "parents": null,
+ "description": null,
+ "beginTime": 0,
+ "stopTime": 0
+ },
+
+ shorthand: {
+ "s": "spanId",
+ "b": "beginTime",
+ "e": "stopTime",
+ "d": "description",
+ "r": "processId",
+ "p": "parents",
+ "i": "traceId"
+ },
+
+ parse: function(response, options) {
+ var attrs = {};
+ var $this = this;
+ $.each(response, function(key, value) {
+ attrs[(key in $this.shorthand) ? $this.shorthand[key] : key] = value;
+ });
+ return attrs;
+ },
+
+ duration: function() {
+ return this.get('stopTime') - this.get('beginTime');
+ }
+});
+
+app.Spans = Backbone.PageableCollection.extend({
+ model: app.Span,
+ mode: "infinite",
+ url: "/query",
+ state: {
+ pageSize: 10,
+ lastSpanId: null,
+ finished: false,
+ predicates: []
+ },
+ queryParams: {
+ totalPages: null,
+ totalRecords: null,
+ firstPage: null,
+ lastPage: null,
+ currentPage: null,
+ pageSize: null,
+ sortKey: null,
+ order: null,
+ directions: null,
+
+ /**
+ * Query parameter for htraced.
+ */
+ query: function() {
+ var predicates = this.state.predicates.slice(0);
+ var lastSpanId = this.state.lastSpanId;
+
+ /**
+ * Use last pulled span ID to paginate.
+ * The htraced API works such that order is defined by the first predicate.
+ * Adding a predicate to the end of the predicates list won't change the order.
+ * Providing the predicate on spanid will filter all previous spanids.
+ */
+ if (lastSpanId) {
+ predicates.push({
+ "op": "gt",
+ "field": "spanid",
+ "val": lastSpanId
+ });
+ }
+
+ return JSON.stringify({
+ lim: this.state.pageSize + 1,
+ pred: predicates
+ });
+ }
+ },
+
+ initialize: function() {
+ this.on("reset", function(collection, response, options) {
+ if (response.length == 0) {
+ delete this.links[this.state.currentPage];
+ this.getPreviousPage();
+ }
+ }, this);
+ },
+
+ parseLinks: function(resp, xhr) {
+ this.state.finished = resp.length <= this.state.pageSize;
+
+ if (this.state.finished) {
+ this.state.lastSpanId = null;
+ } else {
+ this.state.lastSpanId = resp[this.state.pageSize - 1].s;
+ }
+
+ if (this.state.finished) {
+ return {};
+ }
+
+ return {
+ "next": "/query?query=" + this.queryParams.query.call(this)
+ };
+ },
+
+ parseRecords: function(resp) {
+ return resp.slice(0, 10);
+ },
+
+ setPredicates: function(predicates) {
+ if (!$.isArray(predicates)) {
+ console.error("predicates should be an array");
+ return;
+ }
+
+ this.state.predicates = predicates;
+ }
+});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/setup.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/setup.js b/htrace-htraced/src/web/app/setup.js
new file mode 100644
index 0000000..beb06db
--- /dev/null
+++ b/htrace-htraced/src/web/app/setup.js
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var BaseView = Backbone.Marionette.LayoutView.extend({
+ "el": "body",
+ "regions": {
+ "header": "#header",
+ "app": "#app"
+ }
+});
+
+var Router = Backbone.Marionette.AppRouter.extend({
+ "routes": {
+ "": "init",
+ "!/search(?:query)": "search",
+ "!/spans/:id": "span",
+ "!/swimlane/:id": "swimlane",
+ "!/swimlane/:id:?:lim": "swimlane"
+ },
+
+ "initialize": function() {
+ // Collection
+ this.spansCollection = new app.Spans();
+ },
+
+ "init": function() {
+ Backbone.history.navigate("!/search", {"trigger": true});
+ },
+
+ "search": function(query) {
+ app.root.app.show(new app.SearchView());
+
+ var predicates;
+
+ this.spansCollection.switchMode("infinite", {
+ fetch: false,
+ resetState: true
+ });
+
+ if (query) {
+ predicates = _(query.split(";"))
+ .map(function(predicate) {
+ return _(predicate.split('&'))
+ .reduce(function(mem, op) {
+ var op = op.split('=');
+ mem[op[0]] = op[1];
+ return mem;
+ }, {});
+ });
+ this.spansCollection.fullCollection.reset();
+ this.spansCollection.setPredicates(predicates);
+ }
+ else {
+ this.spansCollection.fullCollection.reset();
+ this.spansCollection.setPredicates([{"op":"cn","field":"description","val":""}]);
+ }
+ this.spansCollection.fetch();
+
+ app.root.app.currentView.controls.show(
+ new app.SearchControlsView({
+ "collection": this.spansCollection,
+ "predicates": predicates
+ }));
+ app.root.app.currentView.main.show(
+ new Backgrid.Grid({
+ "collection": this.spansCollection,
+ "columns": [{
+ "label": "Begin",
+ "cell": Backgrid.Cell.extend({
+ className: "begin-cell",
+ formatter: {
+ fromRaw: function(rawData, model) {
+ var beginMs = model.get("beginTime")
+ return moment(beginMs).format('YYYY/MM/DD HH:mm:ss,SSS');
+ },
+ toRaw: function(formattedData, model) {
+ return formattedData // data entry not supported for this cell
+ }
+ }
+ }),
+ "editable": false,
+ "sortable": false
+ }, {
+ "name": "spanId",
+ "label": "ID",
+ "cell": "string",
+ "editable": false,
+ "sortable": false
+ }, {
+ "name": "processId",
+ "label": "processId",
+ "cell": "string",
+ "editable": false,
+ "sortable": false
+ }, {
+ "label": "Duration",
+ "cell": Backgrid.Cell.extend({
+ className: "duration-cell",
+ formatter: {
+ fromRaw: function(rawData, model) {
+ return model.duration() + " ms"
+ },
+ toRaw: function(formattedData, model) {
+ return formattedData // data entry not supported for this cell
+ }
+ }
+ }),
+ "editable": false,
+ "sortable": false
+ }, {
+ "name": "description",
+ "label": "Description",
+ "cell": "string",
+ "editable": false,
+ "sortable": false
+ }],
+ "row": Backgrid.Row.extend({
+ "events": {
+ "click": "details"
+ },
+ "details": function() {
+ Backbone.history.navigate("!/spans/" + this.model.get("spanId"), {"trigger": true});
+ }
+ })
+ }));
+ app.root.app.currentView.pagination.show(
+ new Backgrid.Extension.Paginator({
+ collection: this.spansCollection,
+ }));
+ },
+
+ "span": function(id) {
+ var span = this.spansCollection.findWhere({
+ "spanId": id
+ });
+
+ if (!span) {
+ Backbone.history.navigate("!/search", {"trigger": true});
+ return;
+ }
+
+ var graphView = new app.GraphView({
+ "collection": this.spansCollection,
+ "id": "span-graph"
+ });
+
+ graphView.on("update:span", function(d) {
+ app.root.app.currentView.span.show(
+ new app.SpanDetailsView({
+ "model": d.span
+ }));
+ });
+
+ app.root.app.show(new app.DetailsView());
+ app.root.app.currentView.content.show(graphView);
+ app.root.app.currentView.content.currentView.setSpanId(id);
+ },
+
+ "swimlane": function(id, lim) {
+ var top = new app.SwimlaneView();
+ app.root.app.show(top);
+ top.swimlane.show(new app.SwimlaneGraphView({
+ "spanId": id,
+ "lim": lim
+ }));
+ }
+});
+
+app.on("start", function(options) {
+ app.root = new BaseView();
+ app.routes = new Router();
+
+ Backbone.history.start();
+});
+
+app.start();
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/views/details/details.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/views/details/details.js b/htrace-htraced/src/web/app/views/details/details.js
new file mode 100644
index 0000000..2f79e1b
--- /dev/null
+++ b/htrace-htraced/src/web/app/views/details/details.js
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+app.DetailsView = Backbone.Marionette.LayoutView.extend({
+ "template": "#details-layout-template",
+ "regions": {
+ "span": "div[role='complementary']",
+ "content": "div[role='main']"
+ }
+});
+
+app.SpanDetailsView = Backbone.Marionette.ItemView.extend({
+ "className": "span",
+ "template": "#span-details-template",
+
+ "serializeData": function() {
+ var context = {
+ "span": this.model.toJSON()
+ };
+ context["span"]["duration"] = this.model.duration();
+ return context;
+ },
+
+ "events": {
+ "click": "swimlane"
+ },
+ "swimlane": function() {
+ Backbone.history.navigate("!/swimlane/" + this.model.get("spanId"),
+ {"trigger": true});
+ }
+});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/views/graph/graph.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/views/graph/graph.js b/htrace-htraced/src/web/app/views/graph/graph.js
new file mode 100644
index 0000000..7b4f89e
--- /dev/null
+++ b/htrace-htraced/src/web/app/views/graph/graph.js
@@ -0,0 +1,262 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+app.GraphView = Backbone.View.extend({
+ initialize: function(options) {
+ options = options || {};
+
+ if (!options.id) {
+ console.error("GraphView requires argument 'id' to uniquely identify this graph.");
+ return;
+ }
+
+ _.bindAll(this, "render");
+ this.collection.bind('change', this.render);
+
+ var links = this.links = [];
+ var linkTable = this.linkTable = {};
+ var nodes = this.nodes = [];
+ var nodeTable = this.nodeTable = {};
+ var force = this.force
+ = d3.layout.force().size([$(window).width(), $(window).height() * 3/4])
+ .linkDistance($(window).height() / 5)
+ .charge(-120)
+ .gravity(0)
+ ;
+ force.nodes(nodes)
+ .links(links);
+
+ force.on("tick", function(e) {
+ var root = d3.select("#" + options.id);
+
+ if (!root.node()) {
+ return;
+ }
+
+ var selectedDatum = root.select(".selected").datum();
+
+ // center selected node
+ root.select("svg").attr("width", $(root.node()).width());
+ selectedDatum.x = root.select("svg").attr("width") / 2;
+ selectedDatum.y = root.select("svg").attr("height") / 2;
+
+ // Push sources up and targets down to form a weak tree.
+ var k = 10 * e.alpha;
+ force.links().forEach(function(d, i) {
+ d.source.y -= k;
+ d.target.y += k;
+ });
+
+ var nodes = root.selectAll(".node").data(force.nodes());
+ nodes.select("circle")
+ .attr("cx", function(d) { return d.x; })
+ .attr("cy", function(d) { return d.y; });
+ nodes.select("text")
+ .attr("x", function(d) { return d.x - this.getComputedTextLength() / 2; })
+ .attr("y", function(d) { return d.y; });
+ root.selectAll(".link").data(force.links())
+ .attr("d", function(d) {
+ var start = {},
+ end = {},
+ angle = Math.atan2((d.target.x - d.source.x), (d.target.y - d.source.y));
+ start.x = d.source.x + d.source.r * Math.sin(angle);
+ end.x = d.target.x - d.source.r * Math.sin(angle);
+ start.y = d.source.y + d.source.r * Math.cos(angle);
+ end.y = d.target.y - d.source.r * Math.cos(angle);
+ return "M" + start.x + " " + start.y
+ + " L" + end.x + " " + end.y;
+ });
+ });
+ },
+
+ updateLinksAndNodes: function() {
+ if (!this.spanId) {
+ return;
+ }
+
+ var $this = this, collection = this.collection;
+
+ var selectedSpan = this.collection.findWhere({
+ "spanId": this.spanId
+ });
+
+ var findChildren = function(span) {
+ var spanId = span.get("spanId");
+ var spans = collection.filter(function(model) {
+ return _(model.get("parents")).contains(spanId);
+ });
+ return _(spans).reject(function(span) {
+ return span == null;
+ });
+ };
+ var findParents = function(span) {
+ var spans = _(span.get("parents")).map(function(parentSpanId) {
+ return collection.findWhere({
+ "spanId": parentSpanId
+ });
+ });
+ return _(spans).reject(function(span) {
+ return span == null;
+ });
+ };
+ var spanToNode = function(span, level) {
+ var table = $this.nodeTable;
+ if (!(span.get("spanId") in table)) {
+ table[span.get("spanId")] = {
+ "name": span.get("spanId"),
+ "span": span,
+ "level": level,
+ "group": 0,
+ "x": parseInt($this.svg.attr('width')) / 2,
+ "y": 250 + level * 50
+ };
+ $this.nodes.push(table[span.get("spanId")]);
+ }
+
+ return table[span.get("spanId")];
+ };
+ var createLink = function(source, target) {
+ var table = $this.linkTable;
+ var name = source.span.get("spanId") + "-" + target.span.get("spanId");
+ if (!(name in table)) {
+ table[name] = {
+ "source": source,
+ "target": target
+ };
+ $this.links.push(table[name]);
+ }
+
+ return table[name];
+ };
+
+ var parents = [], children = [];
+ var selectedSpanNode = spanToNode(selectedSpan, 1);
+
+ Array.prototype.push.apply(parents, findParents(selectedSpan));
+ _(parents).each(function(span) {
+ Array.prototype.push.apply(parents, findParents(span));
+ createLink(spanToNode(span, 0), selectedSpanNode)
+ });
+
+ Array.prototype.push.apply(children, findChildren(selectedSpan));
+ _(children).each(function(span) {
+ Array.prototype.push.apply(children, findChildren(span));
+ createLink(selectedSpanNode, spanToNode(span, 2))
+ });
+ },
+
+ renderLinks: function(selection) {
+ var path = selection.enter().append("path")
+ .classed("link", true)
+ .style("marker-end", "url(#suit)");
+ selection.exit().remove();
+ return selection;
+ },
+
+ renderNodes: function(selection) {
+ var $this = this;
+ var g = selection.enter().append("g").attr("class", "node");
+ var circle = g.append("circle")
+ .attr("r", function(d) {
+ if (!d.radius) {
+ d.r = Math.log(d.span.duration());
+
+ if (d.r > app.GraphView.MAX_NODE_SIZE) {
+ d.r = app.GraphView.MAX_NODE_SIZE;
+ }
+
+ if (d.r < app.GraphView.MIN_NODE_SIZE) {
+ d.r = app.GraphView.MIN_NODE_SIZE;
+ }
+ }
+
+ return d.r;
+ });
+ var text = g.append("text").text(function(d) {
+ return d.span.get("description");
+ });
+
+ selection.exit().remove();
+
+ circle.on("click", function(d) {
+ $this.setSpanId(d.name);
+ });
+
+ selection.classed("selected", null);
+ selection.filter(function(d) {
+ return d.span.get("spanId") == $this.spanId;
+ }).classed("selected", true);
+
+ return selection;
+ },
+
+ setSpanId: function(spanId) {
+ var $this = this;
+ this.spanId = spanId;
+
+ this.updateLinksAndNodes();
+
+ this.renderNodes(
+ this.svg.selectAll(".node")
+ .data(this.force.nodes(), function(d) {
+ return d.name;
+ }));
+
+ this.renderLinks(
+ this.svg.selectAll(".link")
+ .data(this.force.links(), function(d) {
+ return d.source.name + "-" + d.target.name;
+ }));
+
+ this.force.start();
+
+ Backbone.history.navigate("!/spans/" + spanId);
+ this.trigger("update:span", {"span": this.collection.findWhere({
+ "spanId": spanId
+ })});
+ },
+
+ render: function() {
+ this.svg = d3.select(this.$el[0]).append("svg");
+ this.svg.attr("height", 500)
+ .attr("width", $(window).width())
+ .attr("id", this.id);
+
+ // Arrows
+ this.svg.append("defs").selectAll("marker")
+ .data(["suit", "licensing", "resolved"])
+ .enter().append("marker")
+ .attr("id", function(d) { return d; })
+ .attr("viewBox", "0 -5 10 10")
+ .attr("refX", 25)
+ .attr("refY", 0)
+ .attr("markerWidth", 6)
+ .attr("markerHeight", 6)
+ .attr("orient", "auto")
+ .append("path")
+ .attr("d", "M0,-5L10,0L0,5 L10,0 L0, -5")
+ .style("stroke", "#4679BD")
+ .style("opacity", "0.6");
+
+ return this;
+ }
+});
+
+app.GraphView.MAX_NODE_SIZE = 150;
+app.GraphView.MIN_NODE_SIZE = 50;
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/views/search/field.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/views/search/field.js b/htrace-htraced/src/web/app/views/search/field.js
new file mode 100644
index 0000000..c9f048a
--- /dev/null
+++ b/htrace-htraced/src/web/app/views/search/field.js
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+app.SearchFieldView = Backbone.View.extend({
+ 'className': 'search-field',
+
+ 'template': _.template($("#search-field-template").html()),
+
+ 'events': {
+ 'change .field': 'showSearchField',
+ 'click .remove-field': 'destroyField'
+ },
+
+ 'initialize': function(options) {
+ this.options = options;
+ this.field = options.field;
+ },
+
+ 'render': function() {
+ this.$el.html(this.template({ field: this.field }));
+ this.showSearchField();
+ if (this.options.value) this.setValue();
+ return this;
+ },
+
+ 'showSearchField': function() {
+ // this.$el.find('.value').hide();
+ // this.$el.find('.op').hide();
+ // this.$el.find('label').hide();
+ this.$el.find('.search-field').hide();
+ switch (this.field) {
+ case 'begin':
+ case 'end':
+ this.$el.find('.op').show();
+ this.$el.find('.start-end-date-time').show();
+ this.$el.find('label.start-end-date-time').text(this.field === 'begin' ? 'Begin' : 'End');
+ rome(this.$el.find('#start-end-date-time')[0]);
+ break;
+ case 'duration':
+ this.op = 'ge'
+ this.$el.find('.duration').show();
+ break;
+ case 'description':
+ this.op = 'cn'
+ this.$el.find('.description').show();
+ break;
+ default:
+ break;
+ }
+ },
+
+ 'destroyField': function(e) {
+ this.undelegateEvents();
+
+ $(this.el).removeData().unbind();
+
+ this.remove();
+ Backbone.View.prototype.remove.call(this);
+ this.options.manager.trigger('removeSearchField', [this.cid]);
+ },
+
+ 'addPredicate': function() {
+ this.options.predicates.push(
+ {
+ 'op': this.op ? this.op : this.$('.op:visible').val(),
+ 'field': this.field,
+ 'val': this.getValue()
+ }
+ );
+ },
+
+ 'getPredicate': function() {
+ return {
+ 'op': this.op ? this.op : this.$('.op:visible').val(),
+ 'field': this.field,
+ 'val': this.getValue()
+ };
+ },
+
+ 'getValue': function() {
+ switch (this.field) {
+ case 'begin':
+ case 'end':
+ var now = new moment();
+ var datetime = new moment(this.$('input.start-end-date-time:visible').val()).unix();
+ return datetime.toString();
+ case 'duration':
+ return this.$("input.duration:visible").val().toString();
+ case 'description':
+ return this.$('input.description').val();
+ default:
+ return '';
+ }
+ },
+
+ 'setValue': function() {
+ switch (this.field) {
+ case 'begin':
+ case 'end':
+ this.$('select.op').val(this.options.op);
+ this.$('input.start-end-date-time').val(moment.unix(this.options.value).format('YYYY-MM-DD HH:mm'));
+ case 'duration':
+ this.$("input.duration").val(this.options.value);
+ case 'description':
+ this.$('input.description').val(this.options.value);
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/views/search/search.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/views/search/search.js b/htrace-htraced/src/web/app/views/search/search.js
new file mode 100644
index 0000000..b9acee5
--- /dev/null
+++ b/htrace-htraced/src/web/app/views/search/search.js
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+app.SearchView = Backbone.Marionette.LayoutView.extend({
+ "template": "#search-layout-template",
+ "regions": {
+ "controls": "div[role='form']",
+ "main": "div[role='main']",
+ "pagination": "div[role='complementary']"
+ }
+});
+
+app.SearchControlsView = Backbone.Marionette.View.extend({
+ "template": _.template($("#search-controls-template").html()),
+ "events": {
+ "click a.add-field": "addSearchField",
+ "click button.search": "search",
+ },
+
+ "initialize": function(options) {
+ this.options = options;
+ this.predicates = [];
+ this.searchFields = [];
+ this.searchFields.push(new app.SearchFieldView({
+ predicates: this.predicates,
+ manager: this,
+ field: 'description'
+ }));
+ this.on('removeSearchField', this.removeSearchField, this);
+ },
+
+ "render": function() {
+ this.$el.html(this.template());
+ this.$el.find('.search-fields').append(this.searchFields[0].render().$el);
+
+ _(this.options.predicates).each(function(pred) {
+ if (pred.field === 'description') {
+ this.$el.find('input.description').val(pred.val);
+ } else {
+ this.addSearchField(pred);
+ }
+ }.bind(this));
+
+ return this;
+ },
+
+ "addSearchField": function(e) {
+ var target = e.target ? $(e.target) : e;
+ if (e.target) $('button.field').text(target.text());
+ var searchOptions = {
+ predicates: this.predicates,
+ manager: this,
+ field: target.data ? target.data('field') : target.field,
+ };
+ if (!e.target) _.extend(searchOptions, { value: target.val, op: target.op})
+
+ var newSearchField = new app.SearchFieldView(searchOptions);
+ this.$el.find('.search-fields').append(newSearchField.render().$el);
+ this.searchFields.push(newSearchField);
+ },
+
+ "removeSearchField": function(cid) {
+ var removedFieldIndex = _(this.searchFields).indexOf(_(this.searchFields).findWhere({cid: cid}));
+ this.searchFields.splice(removedFieldIndex, 1);
+ },
+
+ "search": function(e) {
+ this.predicates = _(this.searchFields).map(function(field) {
+ return field.getPredicate();
+ }).filter(function(predicate) {
+ return predicate.val;
+ });
+
+ this.searchParams = _(this.predicates).map(function(predicate) {
+ return $.param(predicate);
+ }).join(';');
+ Backbone.history.navigate('!/search?' + this.searchParams, { trigger: false });
+
+ this.collection.switchMode("infinite", {
+ fetch: false,
+ resetState: true
+ });
+
+ this.collection.fullCollection.reset();
+ this.collection.setPredicates(this.predicates);
+ this.collection.fetch();
+ return false;
+ }
+});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/app/views/swimlane/swimlane.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/app/views/swimlane/swimlane.js b/htrace-htraced/src/web/app/views/swimlane/swimlane.js
new file mode 100644
index 0000000..99f0b88
--- /dev/null
+++ b/htrace-htraced/src/web/app/views/swimlane/swimlane.js
@@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+app.SwimlaneView = Backbone.Marionette.LayoutView.extend({
+ "template": "#swimlane-layout-template",
+ "regions": {
+ "swimlane": "div[role='main']",
+ }
+});
+
+app.SwimlaneGraphView = Backbone.Marionette.View.extend({
+ className: "swimlane",
+
+ initialize: function() {
+ this.spans = this.getSpans(0, [],
+ this.getJsonSync("/span/" + this.options.spanId),
+ this.options.lim || "lim=100",
+ this.getJsonSync);
+ },
+
+ onShow: function() {
+ this.appendSVG(this.spans);
+ },
+
+ getSpans: function getSpans(depth, spans, span, lim, getJSON) {
+ span.depth = depth;
+ spans.push(span);
+ var children = [];
+ getJSON("/span/" + span.s + "/children?" + lim).forEach(function(childId) {
+ children.push(getJSON("/span/" + childId));
+ });
+ children.sort(function(x, y) {
+ return x.b < y.b ? -1 : x.b > y.b ? 1 : 0;
+ });
+ children.forEach(function(child) {
+ spans = getSpans(depth + 1, spans, child, lim, getJSON);
+ });
+ return spans;
+ },
+
+ getJsonSync: function getJsonSync(url) {
+ return $.ajax({
+ type: "GET",
+ url: url,
+ async: false,
+ dataType: "json"
+ }).responseJSON;
+ },
+
+ appendSVG: function appendSVG(spans) {
+ const height_span = 20;
+ const width_span = 700;
+ const size_tl = 6;
+ const margin = {top: 50, bottom: 50, left: 20, right: 1000, process: 300};
+
+ var height_screen = spans.length * height_span;
+ var dmax = d3.max(spans, function(s) { return s.depth; });
+ var tmin = d3.min(spans, function(s) { return s.b; });
+ var tmax = d3.max(spans, function(s) { return s.e; });
+ var xscale = d3.time.scale()
+ .domain([new Date(tmin), new Date(tmax)]).range([0, width_span]);
+
+ var svg = d3.select("div[role='main']").append("svg")
+ .attr("id", "svg-swimlane")
+ .attr("width", width_span + margin.process + margin.left + margin.right)
+ .attr("height", height_screen + margin.top + margin.bottom)
+ .append("g")
+ .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+ var bars = svg.append("g")
+ .attr("id", "bars")
+ .attr("width", width_span)
+ .attr("height", height_screen)
+ .attr("transform", "translate(" + (10 * dmax + margin.process) + ", 0)");
+
+ var axis = d3.svg.axis()
+ .scale(xscale)
+ .orient("top")
+ .tickValues(xscale.domain())
+ .tickFormat(d3.time.format("%x %X.%L"))
+ .tickSize(6, 3);
+
+ bars.append("g").attr("class", "axis").call(axis);
+
+ var span_g = bars.selectAll("g.span")
+ .data(spans)
+ .enter()
+ .append("g")
+ .attr("transform", function(s, i) {
+ return "translate(0, " + (i * height_span + 5) + ")";
+ })
+ .classed("timeline", function(d) { return d.t; });
+
+ span_g.append("text")
+ .text(function(s) { return s.r; })
+ .style("alignment-baseline", "hanging")
+ .style("font-size", "14px")
+ .attr("transform", function(s) {
+ return "translate(" + (s.depth * 10 - margin.process - 10 * dmax) + ", 0)";
+ });
+
+ var rect_g = span_g.append("g")
+ .attr("transform", function(s) {
+ return "translate(" + xscale(new Date(s.b)) + ", 0)";
+ });
+
+ rect_g.append("rect")
+ .attr("height", height_span - 1)
+ .attr("width", function (s) {
+ return (width_span * (s.e - s.b)) / (tmax - tmin) + 1;
+ })
+ .style("fill", "lightblue")
+ .attr("class", "span")
+
+ rect_g.append("text")
+ .text(function(s){ return s.d; })
+ .style("alignment-baseline", "hanging")
+ .style("font-size", "14px");
+
+ rect_g.append("text")
+ .text(function(s){ return s.e - s.b; })
+ .style("alignment-baseline", "baseline")
+ .style("text-anchor", "end")
+ .style("font-size", "10px")
+ .attr("transform", function(s, i) { return "translate(0, 10)"; });
+
+ bars.selectAll("g.timeline").selectAll("rect.timeline")
+ .data(function(s) { return s.t; })
+ .enter()
+ .append("rect")
+ .style("fill", "red")
+ .attr("class", "timeline")
+ .attr("height", size_tl)
+ .attr("width", size_tl)
+ .attr("transform", function(t) {
+ return "translate(" + xscale(t.t) + "," + (height_span - 1 - size_tl) + ")";
+ });
+
+ var popup = d3.select("div[role='main']").append("div")
+ .attr("class", "popup")
+ .style("opacity", 0);
+
+ bars.selectAll("g.timeline")
+ .on("mouseover", function(d) {
+ popup.transition().duration(300).style("opacity", .95);
+ var text = "<table>";
+ d.t.forEach(function (t) {
+ text += "<tr><td>" + (t.t - tmin) + "</td>";
+ text += "<td> : " + t.m + "</td></tr>";
+ });
+ text += "</table>"
+ popup.html(text)
+ .style("left", (document.body.scrollLeft + 50) + "px")
+ .style("top", (document.body.scrollTop + 70) + "px")
+ .style("width", "700px")
+ .style("background", "orange")
+ .style("position", "absolute");
+ })
+ .on("mouseout", function(d) {
+ popup.transition().duration(300).style("opacity", 0);
+ });
+ }
+});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/index.html
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/index.html b/htrace-htraced/src/web/index.html
new file mode 100644
index 0000000..d403860
--- /dev/null
+++ b/htrace-htraced/src/web/index.html
@@ -0,0 +1,196 @@
+<!doctype html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html lang="en-US">
+ <head>
+ <meta charset="utf-8">
+ <title>HTrace</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <!-- TODO: Add Favicon -->
+ <link rel="icon" href="//favicon.ico" type="image/x-icon" sizes="16x16">
+ <link href="lib/bootstrap-3.3.1/css/bootstrap.css" rel="stylesheet">
+ <link href="lib/css/backgrid-0.3.5.min.css" rel="stylesheet">
+ <link href="lib/css/backgrid-paginator-0.3.5.min.css" rel="stylesheet">
+ <link href="lib/rome-2.1.0/rome.min.css" rel="stylesheet">
+ <link href="lib/css/main.css" rel="stylesheet">
+
+ <!-- TODO: Remove shiv -->
+ <!--[if lt IE 9]>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
+ <![endif]-->
+ </head>
+ <body>
+ <header id="header" role="banner">
+ <nav class="navbar navbar-default navbar-static-top" role="navigation">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="#">HTrace</a>
+ </div>
+ </nav>
+ </header>
+
+ <div id="app" class="container-fluid" role="application"></div>
+
+ <footer></footer>
+
+ <script id="search-layout-template" type="text/html">
+ <div class="container-fluid" id="list" role="application">
+ <div class="row">
+ <div class="col-md-4" role="form"></div>
+ <div class="col-md-8">
+ <div class="row">
+ <div class="col-md-12" role="main"></div>
+ </div>
+ <div class="row">
+ <div class="col-md-12" role="complementary"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </script>
+
+ <script id="search-controls-template" type="text/html">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Controls</h3>
+ </div>
+ <div class="panel-body">
+ <form class="form-horizontal">
+ <div class="search-fields"></div>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <div class="btn-group">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
+ Add Field <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="javascript:void(0)" class="add-field" data-field="begin">Start Date/Time</a></li>
+ <li><a href="javascript:void(0)" class="add-field" data-field="end">End Date/Time</a></li>
+ <li><a href="javascript:void(0)" class="add-field" data-field="duration">Duration</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <button type="button" class="search btn btn-default">Search</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </script>
+
+ <script id='search-field-template' type='text/html'>
+ <div class='form-group search-field start-end-date-time'>
+ <label for="start-end-date-time" class="start-end-date-time control-label col-sm-3">Date</label>
+ <div class="col-sm-3">
+ <select class='op form-control'>
+ <option selected value='ge'>After</option>
+ <option value='le'>Before</option>
+ </select>
+ </div>
+ <div class='col-sm-5'>
+ <input placeholder="Date/Time" id="start-end-date-time" class="start-end-date-time date form-control value" />
+ </div>
+ <button class="btn btn-link remove-field" type="button">x</button>
+ </div>
+ <div class='form-group search-field duration'>
+ <label for="duration" class="duration control-label col-sm-3">Duration</label>
+ <div class='col-sm-8'>
+ <input type="text" class="duration form-control value" placeholder="Duration" />
+ </div>
+ <button class="btn btn-link remove-field" type="button">x</button>
+ </div>
+ <div class='form-group search-field description'>
+ <label for="description" class="description control-label col-sm-3">Description</label>
+ <div class='col-sm-8'>
+ <input type="search" id="description" class="description value form-control" placeholder="Search description" />
+ </div>
+ </div>
+ </script>
+
+ <script id="details-layout-template" type="text/html">
+ <div class="container-fluid" id="list" role="application">
+ <div class="row">
+ <div class="col-md-12" role="main"></div>
+ </div>
+
+ <hr>
+
+ <div class="row">
+ <div class="col-md-12" role="complementary"></div>
+ </div>
+ </div>
+ </script>
+
+ <script id="span-details-template" type="text/html">
+ <table class="table table-condensed">
+ <thead>
+ <tr>
+ <th>Description</th>
+ <th>Span ID</th>
+ <th>Process ID</th>
+ <th>Start time</th>
+ <th>End time</th>
+ <th>Duration</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><%- span.description %></td>
+ <td><%- span.spanId %></td>
+ <td><%- span.processId %></td>
+ <td><%- span.beginTime %></td>
+ <td><%- span.stopTime %></td>
+ <td><%- span.duration %></td>
+ </tr>
+ </tbody>
+ </table>
+ </script>
+
+ <script id="swimlane-layout-template" type="text/html">
+ <div class="container-fluid" id="list" role="application">
+ <div class="row">
+ <div class="col-md-12" role="main"></div>
+ </div>
+ </div>
+ </script>
+
+ <script src="lib/js/jquery-2.1.3.min.js" type="text/javascript"></script>
+ <script src="lib/js/d3-3.5.5.js" type="text/javascript"></script>
+ <script src="lib/bootstrap-3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
+ <script src="lib/js/underscore-1.7.0.js" type="text/javascript"></script>
+ <script src="lib/js/backbone-1.1.2.js" type="text/javascript"></script>
+ <script src="lib/js/backbone.marionette-2.4.1.min.js" type="text/javascript"></script>
+ <script src="lib/js/backbone.paginator-2.0.2.js" type="text/javascript"></script>
+ <script src="lib/js/backgrid-0.3.5.js" type="text/javascript"></script>
+ <script src="lib/js/backgrid-paginator-0.3.5.js" type="text/javascript"></script>
+ <script src="lib/js/moment-2.9.0.min.js" type="text/javascript"></script>
+ <script src="lib/rome-2.1.0/rome.standalone.min.js" type="text/javascript"></script>
+
+ <script src="app/app.js" type="text/javascript"></script>
+ <script src="app/models/span.js" type="text/javascript"></script>
+ <script src="app/views/graph/graph.js" type="text/javascript"></script>
+ <script src="app/views/search/field.js" type="text/javascript"></script>
+ <script src="app/views/search/search.js" type="text/javascript"></script>
+ <script src="app/views/details/details.js" type="text/javascript"></script>
+ <script src="app/views/swimlane/swimlane.js" type="text/javascript"></script>
+ <script src="app/setup.js" type="text/javascript"></script>
+ </body>
+</html>
[28/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/backgrid-paginator-0.3.5.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/backgrid-paginator-0.3.5.js b/htrace-core/src/web/lib/js/backgrid-paginator-0.3.5.js
deleted file mode 100644
index 64dd434..0000000
--- a/htrace-core/src/web/lib/js/backgrid-paginator-0.3.5.js
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- backgrid-paginator
- http://github.com/wyuenho/backgrid
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT @license.
-*/
-(function (root, factory) {
-
- // CommonJS
- if (typeof exports == "object") {
- module.exports = factory(require("underscore"),
- require("backbone"),
- require("backgrid"),
- require("backbone.paginator"));
- }
- // AMD. Register as an anonymous module.
- else if (typeof define === 'function' && define.amd) {
- define(['underscore', 'backbone', 'backgrid', 'backbone.paginator'], factory);
- }
- // Browser
- else {
- factory(root._, root.Backbone, root.Backgrid);
- }
-
-}(this, function (_, Backbone, Backgrid) {
-
- "use strict";
-
- /**
- PageHandle is a class that renders the actual page handles and reacts to
- click events for pagination.
-
- This class acts in two modes - control or discrete page handle modes. If
- one of the `is*` flags is `true`, an instance of this class is under
- control page handle mode. Setting a `pageIndex` to an instance of this
- class under control mode has no effect and the correct page index will
- always be inferred from the `is*` flag. Only one of the `is*` flags should
- be set to `true` at a time. For example, an instance of this class cannot
- simultaneously be a rewind control and a fast forward control. A `label`
- and a `title` function or a string are required to be passed to the
- constuctor under this mode. If a `title` function is provided, it __MUST__
- accept a hash parameter `data`, which contains a key `label`. Its result
- will be used to render the generated anchor's title attribute.
-
- If all of the `is*` flags is set to `false`, which is the default, an
- instance of this class will be in discrete page handle mode. An instance
- under this mode requires the `pageIndex` to be passed from the constructor
- as an option and it __MUST__ be a 0-based index of the list of page numbers
- to render. The constuctor will normalize the base to the same base the
- underlying PageableCollection collection instance uses. A `label` is not
- required under this mode, which will default to the equivalent 1-based page
- index calculated from `pageIndex` and the underlying PageableCollection
- instance. A provided `label` will still be honored however. The `title`
- parameter is also not required under this mode, in which case the default
- `title` function will be used. You are encouraged to provide your own
- `title` function however if you wish to localize the title strings.
-
- If this page handle represents the current page, an `active` class will be
- placed on the root list element.
-
- If this page handle is at the border of the list of pages, a `disabled`
- class will be placed on the root list element.
-
- Only page handles that are neither `active` nor `disabled` will respond to
- click events and triggers pagination.
-
- @class Backgrid.Extension.PageHandle
- */
- var PageHandle = Backgrid.Extension.PageHandle = Backbone.View.extend({
-
- /** @property */
- tagName: "li",
-
- /** @property */
- events: {
- "click a": "changePage"
- },
-
- /**
- @property {string|function(Object.<string, string>): string} title
- The title to use for the `title` attribute of the generated page handle
- anchor elements. It can be a string or a function that takes a `data`
- parameter, which contains a mandatory `label` key which provides the
- label value to be displayed.
- */
- title: function (data) {
- return 'Page ' + data.label;
- },
-
- /**
- @property {boolean} isRewind Whether this handle represents a rewind
- control
- */
- isRewind: false,
-
- /**
- @property {boolean} isBack Whether this handle represents a back
- control
- */
- isBack: false,
-
- /**
- @property {boolean} isForward Whether this handle represents a forward
- control
- */
- isForward: false,
-
- /**
- @property {boolean} isFastForward Whether this handle represents a fast
- forward control
- */
- isFastForward: false,
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Collection} options.collection
- @param {number} pageIndex 0-based index of the page number this handle
- handles. This parameter will be normalized to the base the underlying
- PageableCollection uses.
- @param {string} [options.label] If provided it is used to render the
- anchor text, otherwise the normalized pageIndex will be used
- instead. Required if any of the `is*` flags is set to `true`.
- @param {string} [options.title]
- @param {boolean} [options.isRewind=false]
- @param {boolean} [options.isBack=false]
- @param {boolean} [options.isForward=false]
- @param {boolean} [options.isFastForward=false]
- */
- initialize: function (options) {
- var collection = this.collection;
- var state = collection.state;
- var currentPage = state.currentPage;
- var firstPage = state.firstPage;
- var lastPage = state.lastPage;
-
- _.extend(this, _.pick(options,
- ["isRewind", "isBack", "isForward", "isFastForward"]));
-
- var pageIndex;
- if (this.isRewind) pageIndex = firstPage;
- else if (this.isBack) pageIndex = Math.max(firstPage, currentPage - 1);
- else if (this.isForward) pageIndex = Math.min(lastPage, currentPage + 1);
- else if (this.isFastForward) pageIndex = lastPage;
- else {
- pageIndex = +options.pageIndex;
- pageIndex = (firstPage ? pageIndex + 1 : pageIndex);
- }
- this.pageIndex = pageIndex;
-
- this.label = (options.label || (firstPage ? pageIndex : pageIndex + 1)) + '';
- var title = options.title || this.title;
- this.title = _.isFunction(title) ? title({label: this.label}) : title;
- },
-
- /**
- Renders a clickable anchor element under a list item.
- */
- render: function () {
- this.$el.empty();
- var anchor = document.createElement("a");
- anchor.href = '#';
- if (this.title) anchor.title = this.title;
- anchor.innerHTML = this.label;
- this.el.appendChild(anchor);
-
- var collection = this.collection;
- var state = collection.state;
- var currentPage = state.currentPage;
- var pageIndex = this.pageIndex;
-
- if (this.isRewind && currentPage == state.firstPage ||
- this.isBack && !collection.hasPreviousPage() ||
- this.isForward && !collection.hasNextPage() ||
- this.isFastForward && (currentPage == state.lastPage || state.totalPages < 1)) {
- this.$el.addClass("disabled");
- }
- else if (!(this.isRewind ||
- this.isBack ||
- this.isForward ||
- this.isFastForward) &&
- state.currentPage == pageIndex) {
- this.$el.addClass("active");
- }
-
- this.delegateEvents();
- return this;
- },
-
- /**
- jQuery click event handler. Goes to the page this PageHandle instance
- represents. No-op if this page handle is currently active or disabled.
- */
- changePage: function (e) {
- e.preventDefault();
- var $el = this.$el, col = this.collection;
- if (!$el.hasClass("active") && !$el.hasClass("disabled")) {
- if (this.isRewind) col.getFirstPage();
- else if (this.isBack) col.getPreviousPage();
- else if (this.isForward) col.getNextPage();
- else if (this.isFastForward) col.getLastPage();
- else col.getPage(this.pageIndex, {reset: true});
- }
- return this;
- }
-
- });
-
- /**
- Paginator is a Backgrid extension that renders a series of configurable
- pagination handles. This extension is best used for splitting a large data
- set across multiple pages. If the number of pages is larger then a
- threshold, which is set to 10 by default, the page handles are rendered
- within a sliding window, plus the rewind, back, forward and fast forward
- control handles. The individual control handles can be turned off.
-
- @class Backgrid.Extension.Paginator
- */
- var Paginator = Backgrid.Extension.Paginator = Backbone.View.extend({
-
- /** @property */
- className: "backgrid-paginator",
-
- /** @property */
- windowSize: 10,
-
- /**
- @property {number} slideScale the number used by #slideHowMuch to scale
- `windowSize` to yield the number of pages to slide. For example, the
- default windowSize(10) * slideScale(0.5) yields 5, which means the window
- will slide forward 5 pages as soon as you've reached page 6. The smaller
- the scale factor the less pages to slide, and vice versa.
-
- Also See:
-
- - #slideMaybe
- - #slideHowMuch
- */
- slideScale: 0.5,
-
- /**
- @property {Object.<string, Object.<string, string>>} controls You can
- disable specific control handles by setting the keys in question to
- null. The defaults will be merged with your controls object, with your
- changes taking precedent.
- */
- controls: {
- rewind: {
- label: "《",
- title: "First"
- },
- back: {
- label: "〈",
- title: "Previous"
- },
- forward: {
- label: "〉",
- title: "Next"
- },
- fastForward: {
- label: "》",
- title: "Last"
- }
- },
-
- /** @property */
- renderIndexedPageHandles: true,
-
- /**
- @property {Backgrid.Extension.PageHandle} pageHandle. The PageHandle
- class to use for rendering individual handles
- */
- pageHandle: PageHandle,
-
- /** @property */
- goBackFirstOnSort: true,
-
- /**
- Initializer.
-
- @param {Object} options
- @param {Backbone.Collection} options.collection
- @param {boolean} [options.controls]
- @param {boolean} [options.pageHandle=Backgrid.Extension.PageHandle]
- @param {boolean} [options.goBackFirstOnSort=true]
- */
- initialize: function (options) {
- var self = this;
- self.controls = _.defaults(options.controls || {}, self.controls,
- Paginator.prototype.controls);
-
- _.extend(self, _.pick(options || {}, "windowSize", "pageHandle",
- "slideScale", "goBackFirstOnSort",
- "renderIndexedPageHandles"));
-
- var col = self.collection;
- self.listenTo(col, "add", self.render);
- self.listenTo(col, "remove", self.render);
- self.listenTo(col, "reset", self.render);
- self.listenTo(col, "backgrid:sorted", function () {
- if (self.goBackFirstOnSort) col.getFirstPage({reset: true});
- });
- },
-
- /**
- Decides whether the window should slide. This method should return 1 if
- sliding should occur and 0 otherwise. The default is sliding should occur
- if half of the pages in a window has been reached.
-
- __Note__: All the parameters have been normalized to be 0-based.
-
- @param {number} firstPage
- @param {number} lastPage
- @param {number} currentPage
- @param {number} windowSize
- @param {number} slideScale
-
- @return {0|1}
- */
- slideMaybe: function (firstPage, lastPage, currentPage, windowSize, slideScale) {
- return Math.round(currentPage % windowSize / windowSize);
- },
-
- /**
- Decides how many pages to slide when sliding should occur. The default
- simply scales the `windowSize` to arrive at a fraction of the `windowSize`
- to increment.
-
- __Note__: All the parameters have been normalized to be 0-based.
-
- @param {number} firstPage
- @param {number} lastPage
- @param {number} currentPage
- @param {number} windowSize
- @param {number} slideScale
-
- @return {number}
- */
- slideThisMuch: function (firstPage, lastPage, currentPage, windowSize, slideScale) {
- return ~~(windowSize * slideScale);
- },
-
- _calculateWindow: function () {
- var collection = this.collection;
- var state = collection.state;
-
- // convert all indices to 0-based here
- var firstPage = state.firstPage;
- var lastPage = +state.lastPage;
- lastPage = Math.max(0, firstPage ? lastPage - 1 : lastPage);
- var currentPage = Math.max(state.currentPage, state.firstPage);
- currentPage = firstPage ? currentPage - 1 : currentPage;
- var windowSize = this.windowSize;
- var slideScale = this.slideScale;
- var windowStart = Math.floor(currentPage / windowSize) * windowSize;
- if (currentPage <= lastPage - this.slideThisMuch()) {
- windowStart += (this.slideMaybe(firstPage, lastPage, currentPage, windowSize, slideScale) *
- this.slideThisMuch(firstPage, lastPage, currentPage, windowSize, slideScale));
- }
- var windowEnd = Math.min(lastPage + 1, windowStart + windowSize);
- return [windowStart, windowEnd];
- },
-
- /**
- Creates a list of page handle objects for rendering.
-
- @return {Array.<Object>} an array of page handle objects hashes
- */
- makeHandles: function () {
-
- var handles = [];
- var collection = this.collection;
-
- var window = this._calculateWindow();
- var winStart = window[0], winEnd = window[1];
-
- if (this.renderIndexedPageHandles) {
- for (var i = winStart; i < winEnd; i++) {
- handles.push(new this.pageHandle({
- collection: collection,
- pageIndex: i
- }));
- }
- }
-
- var controls = this.controls;
- _.each(["back", "rewind", "forward", "fastForward"], function (key) {
- var value = controls[key];
- if (value) {
- var handleCtorOpts = {
- collection: collection,
- title: value.title,
- label: value.label
- };
- handleCtorOpts["is" + key.slice(0, 1).toUpperCase() + key.slice(1)] = true;
- var handle = new this.pageHandle(handleCtorOpts);
- if (key == "rewind" || key == "back") handles.unshift(handle);
- else handles.push(handle);
- }
- }, this);
-
- return handles;
- },
-
- /**
- Render the paginator handles inside an unordered list.
- */
- render: function () {
- this.$el.empty();
-
- if (this.handles) {
- for (var i = 0, l = this.handles.length; i < l; i++) {
- this.handles[i].remove();
- }
- }
-
- var handles = this.handles = this.makeHandles();
-
- var ul = document.createElement("ul");
- for (var i = 0; i < handles.length; i++) {
- ul.appendChild(handles[i].render().el);
- }
-
- this.el.appendChild(ul);
-
- return this;
- }
-
- });
-
-}));
\ No newline at end of file
[18/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
new file mode 100644
index 0000000..c4cadf1
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
@@ -0,0 +1,470 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+.btn-default,
+.btn-primary,
+.btn-success,
+.btn-info,
+.btn-warning,
+.btn-danger {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+}
+.btn-default:active,
+.btn-primary:active,
+.btn-success:active,
+.btn-info:active,
+.btn-warning:active,
+.btn-danger:active,
+.btn-default.active,
+.btn-primary.active,
+.btn-success.active,
+.btn-info.active,
+.btn-warning.active,
+.btn-danger.active {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-default .badge,
+.btn-primary .badge,
+.btn-success .badge,
+.btn-info .badge,
+.btn-warning .badge,
+.btn-danger .badge {
+ text-shadow: none;
+}
+.btn:active,
+.btn.active {
+ background-image: none;
+}
+.btn-default {
+ text-shadow: 0 1px 0 #fff;
+ background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+ background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+ background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #dbdbdb;
+ border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus {
+ background-color: #e0e0e0;
+ background-position: 0 -15px;
+}
+.btn-default:active,
+.btn-default.active {
+ background-color: #e0e0e0;
+ border-color: #dbdbdb;
+}
+.btn-default:disabled,
+.btn-default[disabled] {
+ background-color: #e0e0e0;
+ background-image: none;
+}
+.btn-primary {
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #245580;
+}
+.btn-primary:hover,
+.btn-primary:focus {
+ background-color: #265a88;
+ background-position: 0 -15px;
+}
+.btn-primary:active,
+.btn-primary.active {
+ background-color: #265a88;
+ border-color: #245580;
+}
+.btn-primary:disabled,
+.btn-primary[disabled] {
+ background-color: #265a88;
+ background-image: none;
+}
+.btn-success {
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
+ background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #3e8f3e;
+}
+.btn-success:hover,
+.btn-success:focus {
+ background-color: #419641;
+ background-position: 0 -15px;
+}
+.btn-success:active,
+.btn-success.active {
+ background-color: #419641;
+ border-color: #3e8f3e;
+}
+.btn-success:disabled,
+.btn-success[disabled] {
+ background-color: #419641;
+ background-image: none;
+}
+.btn-info {
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+ background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #28a4c9;
+}
+.btn-info:hover,
+.btn-info:focus {
+ background-color: #2aabd2;
+ background-position: 0 -15px;
+}
+.btn-info:active,
+.btn-info.active {
+ background-color: #2aabd2;
+ border-color: #28a4c9;
+}
+.btn-info:disabled,
+.btn-info[disabled] {
+ background-color: #2aabd2;
+ background-image: none;
+}
+.btn-warning {
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+ background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #e38d13;
+}
+.btn-warning:hover,
+.btn-warning:focus {
+ background-color: #eb9316;
+ background-position: 0 -15px;
+}
+.btn-warning:active,
+.btn-warning.active {
+ background-color: #eb9316;
+ border-color: #e38d13;
+}
+.btn-warning:disabled,
+.btn-warning[disabled] {
+ background-color: #eb9316;
+ background-image: none;
+}
+.btn-danger {
+ background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+ background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-color: #b92c28;
+}
+.btn-danger:hover,
+.btn-danger:focus {
+ background-color: #c12e2a;
+ background-position: 0 -15px;
+}
+.btn-danger:active,
+.btn-danger.active {
+ background-color: #c12e2a;
+ border-color: #b92c28;
+}
+.btn-danger:disabled,
+.btn-danger[disabled] {
+ background-color: #c12e2a;
+ background-image: none;
+}
+.thumbnail,
+.img-thumbnail {
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ background-color: #e8e8e8;
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+ background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+ background-repeat: repeat-x;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ background-color: #2e6da4;
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+ background-repeat: repeat-x;
+}
+.navbar-default {
+ background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+ background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
+ background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .active > a {
+ background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+ background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
+ background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
+ background-repeat: repeat-x;
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+}
+.navbar-brand,
+.navbar-nav > li > a {
+ text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
+}
+.navbar-inverse {
+ background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
+ background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
+ background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ background-repeat: repeat-x;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .active > a {
+ background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+ background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
+ background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
+ background-repeat: repeat-x;
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+}
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-nav > li > a {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
+}
+.navbar-static-top,
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ border-radius: 0;
+}
+@media (max-width: 767px) {
+ .navbar .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #fff;
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+ background-repeat: repeat-x;
+ }
+}
+.alert {
+ text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+}
+.alert-success {
+ background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+ background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #b2dba1;
+}
+.alert-info {
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+ background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #9acfea;
+}
+.alert-warning {
+ background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+ background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #f5e79e;
+}
+.alert-danger {
+ background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+ background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
+ background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #dca7a7;
+}
+.progress {
+ background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+ background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar {
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar-success {
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+ background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar-info {
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+ background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar-warning {
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+ background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar-danger {
+ background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+ background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
+ background-repeat: repeat-x;
+}
+.progress-bar-striped {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.list-group {
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+ text-shadow: 0 -1px 0 #286090;
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #2b669a;
+}
+.list-group-item.active .badge,
+.list-group-item.active:hover .badge,
+.list-group-item.active:focus .badge {
+ text-shadow: none;
+}
+.panel {
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+}
+.panel-default > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+ background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+ background-repeat: repeat-x;
+}
+.panel-primary > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+ background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+ background-repeat: repeat-x;
+}
+.panel-success > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+ background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
+ background-repeat: repeat-x;
+}
+.panel-info > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+ background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
+ background-repeat: repeat-x;
+}
+.panel-warning > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+ background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
+ background-repeat: repeat-x;
+}
+.panel-danger > .panel-heading {
+ background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+ background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
+ background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
+ background-repeat: repeat-x;
+}
+.well {
+ background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+ background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
+ background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
+ background-repeat: repeat-x;
+ border-color: #dcdcdc;
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+}
+/*# sourceMappingURL=bootstrap-theme.css.map */
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
new file mode 100644
index 0000000..016a8da
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAcA;;;;;;EAME,0CAAA;ECgDA,6FAAA;EACQ,qFAAA;EC5DT;AFgBC;;;;;;;;;;;;EC2CA,0DAAA;EACQ,kDAAA;EC7CT;AFVD;;;;;;EAiBI,mBAAA;EECH;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AFhJD;;;EAQI,mBAAA;EE6IH;AFnID;EChLE,mDAAA;EACQ,2CAAA;ECsTT;AF7HD;EGzOI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDyWH;AFnID;EG1OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDgXH;AFzID;EG3OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDuXH;AF/ID;EG5OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED8XH;AFrJD;EG7OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDqYH;AF3JD;EG9OI,0EAAA;EACA,qEAAA;EACA,+FAAA
;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED4YH;AF3JD;EGrPI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHmPF,uBAAA;ECxMA,2FAAA;EACQ,mFAAA;EC0WT","file":"bootstrap-theme.css","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n
.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &:disabled,\n &[disabled] {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n
.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-co
lor: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end
-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating n
ew styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\
n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n
\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start
-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-t
iming-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-sh
adow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-p
laceholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scal
eY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n
-o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-pr
operty) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @
select; // IE10+\n user-select: @select;\n}\n",".btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image
: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default:disabled,\n.btn-default[disabled] {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 10
0%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary:disabled,\n.btn-primary[disabled] {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff4
19641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success:disabled,\n.btn-success[disabled] {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn
-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info:disabled,\n.btn-info[disabled] {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-
warning:disabled,\n.btn-warning[disabled] {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger:disabled,\n.btn-danger[disabled] {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.0
75);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4
', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-
gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -we
bkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-i
nfo {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c
3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startCo
lorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image
: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.1
5) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-
color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DX
ImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -web
kit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f
5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); /
/ Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom,
@start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\
n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientTyp
e=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use thi
s to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
new file mode 100644
index 0000000..4c3e7ba
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left b
ottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endCol
orstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{backgroun
d-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image
:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,lef
t top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f
5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f
8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9p
x rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 1
00%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr=
'#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(t
o bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTran
sform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', Gradien
tType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linea
r-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,25
5,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(st
artColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left
top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-grad
ient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.
Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
\ No newline at end of file
[36/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
deleted file mode 100644
index a02f6ba..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labe
ls.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA,6DAA4D;ACQ5D;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EDND;ACaD;EACE,WAAA;EDXD;ACwBD;;;;;;;;;;;;;EAaE,gBAAA;EDtBD;AC8BD;;;;EAIE,uBAAA;EACA,0BAAA;ED5BD;ACoCD;EACE,eAAA;EACA,WAAA;EDlCD;AC0CD;;EAEE,eAAA;EDxCD;ACkDD;EACE,+BAAA;EDhDD;ACuDD;;EAEE,YAAA;EDrDD;AC+DD;EACE,2BAAA;ED7DD;ACoED;;EAEE,mBAAA;EDlED;ACyED;EACE,oBAAA;EDvE
D;AC+ED;EACE,gBAAA;EACA,kBAAA;ED7ED;ACoFD;EACE,kBAAA;EACA,aAAA;EDlFD;ACyFD;EACE,gBAAA;EDvFD;AC8FD;;EAEE,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,0BAAA;ED5FD;AC+FD;EACE,aAAA;ED7FD;ACgGD;EACE,iBAAA;ED9FD;ACwGD;EACE,WAAA;EDtGD;AC6GD;EACE,kBAAA;ED3GD;ACqHD;EACE,kBAAA;EDnHD;AC0HD;EACE,8BAAA;EACA,iCAAA;UAAA,yBAAA;EACA,WAAA;EDxHD;AC+HD;EACE,gBAAA;ED7HD;ACoID;;;;EAIE,mCAAA;EACA,gBAAA;EDlID;ACoJD;;;;;EAKE,gBAAA;EACA,eAAA;EACA,WAAA;EDlJD;ACyJD;EACE,mBAAA;EDvJD;ACiKD;;EAEE,sBAAA;ED/JD;AC0KD;;;;EAIE,4BAAA;EACA,iBAAA;EDx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*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-
size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n -moz-box-s
izing: content-box;\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n -moz-box-sizing
: content-box;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n
a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n select {\n background: #fff !important;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot')
;\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\2a\";\n}\n.glyphicon-plus:before {\n content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.gly
phicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before
{\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volum
e-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}
\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n conte
nt: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\
n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111
\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\
e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e1
45\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n
content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.gl
yphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}
\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #ffffff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertica
l-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;
\n margin: 0;\n overflow: visible;\n clip: auto;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .sm
all,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary
{\n color: #337ab7;\n}\na.text-primary:hover {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n borde
r-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n paddi
ng: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-r
ight small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #ffffff;\n background-color: #333333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\
n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-l
g-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n rig
ht: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n
left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9
{\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n
.col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }
\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;
\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n
}\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-lef
t: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right
: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-le
ft: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.tab
le > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #dddddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n.table .table {\n background-color: #ffffff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-border
ed {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1p
<TRUNCATED>
[12/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/backbone-1.1.2.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/backbone-1.1.2.js b/htrace-htraced/src/web/lib/js/backbone-1.1.2.js
new file mode 100644
index 0000000..5da4943
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/backbone-1.1.2.js
@@ -0,0 +1,1608 @@
+// Backbone.js 1.1.2
+
+// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Backbone may be freely distributed under the MIT license.
+// For all details and documentation:
+// http://backbonejs.org
+
+(function(root, factory) {
+
+ // Set up Backbone appropriately for the environment. Start with AMD.
+ if (typeof define === 'function' && define.amd) {
+ define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
+ // Export global even in AMD case in case this script is loaded with
+ // others that may still expect a global Backbone.
+ root.Backbone = factory(root, exports, _, $);
+ });
+
+ // Next for Node.js or CommonJS. jQuery may not be needed as a module.
+ } else if (typeof exports !== 'undefined') {
+ var _ = require('underscore');
+ factory(root, exports, _);
+
+ // Finally, as a browser global.
+ } else {
+ root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
+ }
+
+}(this, function(root, Backbone, _, $) {
+
+ // Initial Setup
+ // -------------
+
+ // Save the previous value of the `Backbone` variable, so that it can be
+ // restored later on, if `noConflict` is used.
+ var previousBackbone = root.Backbone;
+
+ // Create local references to array methods we'll want to use later.
+ var array = [];
+ var push = array.push;
+ var slice = array.slice;
+ var splice = array.splice;
+
+ // Current version of the library. Keep in sync with `package.json`.
+ Backbone.VERSION = '1.1.2';
+
+ // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
+ // the `$` variable.
+ Backbone.$ = $;
+
+ // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
+ // to its previous owner. Returns a reference to this Backbone object.
+ Backbone.noConflict = function() {
+ root.Backbone = previousBackbone;
+ return this;
+ };
+
+ // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
+ // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
+ // set a `X-Http-Method-Override` header.
+ Backbone.emulateHTTP = false;
+
+ // Turn on `emulateJSON` to support legacy servers that can't deal with direct
+ // `application/json` requests ... will encode the body as
+ // `application/x-www-form-urlencoded` instead and will send the model in a
+ // form param named `model`.
+ Backbone.emulateJSON = false;
+
+ // Backbone.Events
+ // ---------------
+
+ // A module that can be mixed in to *any object* in order to provide it with
+ // custom events. You may bind with `on` or remove with `off` callback
+ // functions to an event; `trigger`-ing an event fires all callbacks in
+ // succession.
+ //
+ // var object = {};
+ // _.extend(object, Backbone.Events);
+ // object.on('expand', function(){ alert('expanded'); });
+ // object.trigger('expand');
+ //
+ var Events = Backbone.Events = {
+
+ // Bind an event to a `callback` function. Passing `"all"` will bind
+ // the callback to all events fired.
+ on: function(name, callback, context) {
+ if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
+ this._events || (this._events = {});
+ var events = this._events[name] || (this._events[name] = []);
+ events.push({callback: callback, context: context, ctx: context || this});
+ return this;
+ },
+
+ // Bind an event to only be triggered a single time. After the first time
+ // the callback is invoked, it will be removed.
+ once: function(name, callback, context) {
+ if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
+ var self = this;
+ var once = _.once(function() {
+ self.off(name, once);
+ callback.apply(this, arguments);
+ });
+ once._callback = callback;
+ return this.on(name, once, context);
+ },
+
+ // Remove one or many callbacks. If `context` is null, removes all
+ // callbacks with that function. If `callback` is null, removes all
+ // callbacks for the event. If `name` is null, removes all bound
+ // callbacks for all events.
+ off: function(name, callback, context) {
+ var retain, ev, events, names, i, l, j, k;
+ if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
+ if (!name && !callback && !context) {
+ this._events = void 0;
+ return this;
+ }
+ names = name ? [name] : _.keys(this._events);
+ for (i = 0, l = names.length; i < l; i++) {
+ name = names[i];
+ if (events = this._events[name]) {
+ this._events[name] = retain = [];
+ if (callback || context) {
+ for (j = 0, k = events.length; j < k; j++) {
+ ev = events[j];
+ if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||
+ (context && context !== ev.context)) {
+ retain.push(ev);
+ }
+ }
+ }
+ if (!retain.length) delete this._events[name];
+ }
+ }
+
+ return this;
+ },
+
+ // Trigger one or many events, firing all bound callbacks. Callbacks are
+ // passed the same arguments as `trigger` is, apart from the event name
+ // (unless you're listening on `"all"`, which will cause your callback to
+ // receive the true name of the event as the first argument).
+ trigger: function(name) {
+ if (!this._events) return this;
+ var args = slice.call(arguments, 1);
+ if (!eventsApi(this, 'trigger', name, args)) return this;
+ var events = this._events[name];
+ var allEvents = this._events.all;
+ if (events) triggerEvents(events, args);
+ if (allEvents) triggerEvents(allEvents, arguments);
+ return this;
+ },
+
+ // Tell this object to stop listening to either specific events ... or
+ // to every object it's currently listening to.
+ stopListening: function(obj, name, callback) {
+ var listeningTo = this._listeningTo;
+ if (!listeningTo) return this;
+ var remove = !name && !callback;
+ if (!callback && typeof name === 'object') callback = this;
+ if (obj) (listeningTo = {})[obj._listenId] = obj;
+ for (var id in listeningTo) {
+ obj = listeningTo[id];
+ obj.off(name, callback, this);
+ if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];
+ }
+ return this;
+ }
+
+ };
+
+ // Regular expression used to split event strings.
+ var eventSplitter = /\s+/;
+
+ // Implement fancy features of the Events API such as multiple event
+ // names `"change blur"` and jQuery-style event maps `{change: action}`
+ // in terms of the existing API.
+ var eventsApi = function(obj, action, name, rest) {
+ if (!name) return true;
+
+ // Handle event maps.
+ if (typeof name === 'object') {
+ for (var key in name) {
+ obj[action].apply(obj, [key, name[key]].concat(rest));
+ }
+ return false;
+ }
+
+ // Handle space separated event names.
+ if (eventSplitter.test(name)) {
+ var names = name.split(eventSplitter);
+ for (var i = 0, l = names.length; i < l; i++) {
+ obj[action].apply(obj, [names[i]].concat(rest));
+ }
+ return false;
+ }
+
+ return true;
+ };
+
+ // A difficult-to-believe, but optimized internal dispatch function for
+ // triggering events. Tries to keep the usual cases speedy (most internal
+ // Backbone events have 3 arguments).
+ var triggerEvents = function(events, args) {
+ var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
+ switch (args.length) {
+ case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
+ case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
+ case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
+ case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
+ default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
+ }
+ };
+
+ var listenMethods = {listenTo: 'on', listenToOnce: 'once'};
+
+ // Inversion-of-control versions of `on` and `once`. Tell *this* object to
+ // listen to an event in another object ... keeping track of what it's
+ // listening to.
+ _.each(listenMethods, function(implementation, method) {
+ Events[method] = function(obj, name, callback) {
+ var listeningTo = this._listeningTo || (this._listeningTo = {});
+ var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
+ listeningTo[id] = obj;
+ if (!callback && typeof name === 'object') callback = this;
+ obj[implementation](name, callback, this);
+ return this;
+ };
+ });
+
+ // Aliases for backwards compatibility.
+ Events.bind = Events.on;
+ Events.unbind = Events.off;
+
+ // Allow the `Backbone` object to serve as a global event bus, for folks who
+ // want global "pubsub" in a convenient place.
+ _.extend(Backbone, Events);
+
+ // Backbone.Model
+ // --------------
+
+ // Backbone **Models** are the basic data object in the framework --
+ // frequently representing a row in a table in a database on your server.
+ // A discrete chunk of data and a bunch of useful, related methods for
+ // performing computations and transformations on that data.
+
+ // Create a new model with the specified attributes. A client id (`cid`)
+ // is automatically generated and assigned for you.
+ var Model = Backbone.Model = function(attributes, options) {
+ var attrs = attributes || {};
+ options || (options = {});
+ this.cid = _.uniqueId('c');
+ this.attributes = {};
+ if (options.collection) this.collection = options.collection;
+ if (options.parse) attrs = this.parse(attrs, options) || {};
+ attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
+ this.set(attrs, options);
+ this.changed = {};
+ this.initialize.apply(this, arguments);
+ };
+
+ // Attach all inheritable methods to the Model prototype.
+ _.extend(Model.prototype, Events, {
+
+ // A hash of attributes whose current and previous value differ.
+ changed: null,
+
+ // The value returned during the last failed validation.
+ validationError: null,
+
+ // The default name for the JSON `id` attribute is `"id"`. MongoDB and
+ // CouchDB users may want to set this to `"_id"`.
+ idAttribute: 'id',
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Return a copy of the model's `attributes` object.
+ toJSON: function(options) {
+ return _.clone(this.attributes);
+ },
+
+ // Proxy `Backbone.sync` by default -- but override this if you need
+ // custom syncing semantics for *this* particular model.
+ sync: function() {
+ return Backbone.sync.apply(this, arguments);
+ },
+
+ // Get the value of an attribute.
+ get: function(attr) {
+ return this.attributes[attr];
+ },
+
+ // Get the HTML-escaped value of an attribute.
+ escape: function(attr) {
+ return _.escape(this.get(attr));
+ },
+
+ // Returns `true` if the attribute contains a value that is not null
+ // or undefined.
+ has: function(attr) {
+ return this.get(attr) != null;
+ },
+
+ // Set a hash of model attributes on the object, firing `"change"`. This is
+ // the core primitive operation of a model, updating the data and notifying
+ // anyone who needs to know about the change in state. The heart of the beast.
+ set: function(key, val, options) {
+ var attr, attrs, unset, changes, silent, changing, prev, current;
+ if (key == null) return this;
+
+ // Handle both `"key", value` and `{key: value}` -style arguments.
+ if (typeof key === 'object') {
+ attrs = key;
+ options = val;
+ } else {
+ (attrs = {})[key] = val;
+ }
+
+ options || (options = {});
+
+ // Run validation.
+ if (!this._validate(attrs, options)) return false;
+
+ // Extract attributes and options.
+ unset = options.unset;
+ silent = options.silent;
+ changes = [];
+ changing = this._changing;
+ this._changing = true;
+
+ if (!changing) {
+ this._previousAttributes = _.clone(this.attributes);
+ this.changed = {};
+ }
+ current = this.attributes, prev = this._previousAttributes;
+
+ // Check for changes of `id`.
+ if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
+
+ // For each `set` attribute, update or delete the current value.
+ for (attr in attrs) {
+ val = attrs[attr];
+ if (!_.isEqual(current[attr], val)) changes.push(attr);
+ if (!_.isEqual(prev[attr], val)) {
+ this.changed[attr] = val;
+ } else {
+ delete this.changed[attr];
+ }
+ unset ? delete current[attr] : current[attr] = val;
+ }
+
+ // Trigger all relevant attribute changes.
+ if (!silent) {
+ if (changes.length) this._pending = options;
+ for (var i = 0, l = changes.length; i < l; i++) {
+ this.trigger('change:' + changes[i], this, current[changes[i]], options);
+ }
+ }
+
+ // You might be wondering why there's a `while` loop here. Changes can
+ // be recursively nested within `"change"` events.
+ if (changing) return this;
+ if (!silent) {
+ while (this._pending) {
+ options = this._pending;
+ this._pending = false;
+ this.trigger('change', this, options);
+ }
+ }
+ this._pending = false;
+ this._changing = false;
+ return this;
+ },
+
+ // Remove an attribute from the model, firing `"change"`. `unset` is a noop
+ // if the attribute doesn't exist.
+ unset: function(attr, options) {
+ return this.set(attr, void 0, _.extend({}, options, {unset: true}));
+ },
+
+ // Clear all attributes on the model, firing `"change"`.
+ clear: function(options) {
+ var attrs = {};
+ for (var key in this.attributes) attrs[key] = void 0;
+ return this.set(attrs, _.extend({}, options, {unset: true}));
+ },
+
+ // Determine if the model has changed since the last `"change"` event.
+ // If you specify an attribute name, determine if that attribute has changed.
+ hasChanged: function(attr) {
+ if (attr == null) return !_.isEmpty(this.changed);
+ return _.has(this.changed, attr);
+ },
+
+ // Return an object containing all the attributes that have changed, or
+ // false if there are no changed attributes. Useful for determining what
+ // parts of a view need to be updated and/or what attributes need to be
+ // persisted to the server. Unset attributes will be set to undefined.
+ // You can also pass an attributes object to diff against the model,
+ // determining if there *would be* a change.
+ changedAttributes: function(diff) {
+ if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
+ var val, changed = false;
+ var old = this._changing ? this._previousAttributes : this.attributes;
+ for (var attr in diff) {
+ if (_.isEqual(old[attr], (val = diff[attr]))) continue;
+ (changed || (changed = {}))[attr] = val;
+ }
+ return changed;
+ },
+
+ // Get the previous value of an attribute, recorded at the time the last
+ // `"change"` event was fired.
+ previous: function(attr) {
+ if (attr == null || !this._previousAttributes) return null;
+ return this._previousAttributes[attr];
+ },
+
+ // Get all of the attributes of the model at the time of the previous
+ // `"change"` event.
+ previousAttributes: function() {
+ return _.clone(this._previousAttributes);
+ },
+
+ // Fetch the model from the server. If the server's representation of the
+ // model differs from its current attributes, they will be overridden,
+ // triggering a `"change"` event.
+ fetch: function(options) {
+ options = options ? _.clone(options) : {};
+ if (options.parse === void 0) options.parse = true;
+ var model = this;
+ var success = options.success;
+ options.success = function(resp) {
+ if (!model.set(model.parse(resp, options), options)) return false;
+ if (success) success(model, resp, options);
+ model.trigger('sync', model, resp, options);
+ };
+ wrapError(this, options);
+ return this.sync('read', this, options);
+ },
+
+ // Set a hash of model attributes, and sync the model to the server.
+ // If the server returns an attributes hash that differs, the model's
+ // state will be `set` again.
+ save: function(key, val, options) {
+ var attrs, method, xhr, attributes = this.attributes;
+
+ // Handle both `"key", value` and `{key: value}` -style arguments.
+ if (key == null || typeof key === 'object') {
+ attrs = key;
+ options = val;
+ } else {
+ (attrs = {})[key] = val;
+ }
+
+ options = _.extend({validate: true}, options);
+
+ // If we're not waiting and attributes exist, save acts as
+ // `set(attr).save(null, opts)` with validation. Otherwise, check if
+ // the model will be valid when the attributes, if any, are set.
+ if (attrs && !options.wait) {
+ if (!this.set(attrs, options)) return false;
+ } else {
+ if (!this._validate(attrs, options)) return false;
+ }
+
+ // Set temporary attributes if `{wait: true}`.
+ if (attrs && options.wait) {
+ this.attributes = _.extend({}, attributes, attrs);
+ }
+
+ // After a successful server-side save, the client is (optionally)
+ // updated with the server-side state.
+ if (options.parse === void 0) options.parse = true;
+ var model = this;
+ var success = options.success;
+ options.success = function(resp) {
+ // Ensure attributes are restored during synchronous saves.
+ model.attributes = attributes;
+ var serverAttrs = model.parse(resp, options);
+ if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
+ if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
+ return false;
+ }
+ if (success) success(model, resp, options);
+ model.trigger('sync', model, resp, options);
+ };
+ wrapError(this, options);
+
+ method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
+ if (method === 'patch') options.attrs = attrs;
+ xhr = this.sync(method, this, options);
+
+ // Restore attributes.
+ if (attrs && options.wait) this.attributes = attributes;
+
+ return xhr;
+ },
+
+ // Destroy this model on the server if it was already persisted.
+ // Optimistically removes the model from its collection, if it has one.
+ // If `wait: true` is passed, waits for the server to respond before removal.
+ destroy: function(options) {
+ options = options ? _.clone(options) : {};
+ var model = this;
+ var success = options.success;
+
+ var destroy = function() {
+ model.trigger('destroy', model, model.collection, options);
+ };
+
+ options.success = function(resp) {
+ if (options.wait || model.isNew()) destroy();
+ if (success) success(model, resp, options);
+ if (!model.isNew()) model.trigger('sync', model, resp, options);
+ };
+
+ if (this.isNew()) {
+ options.success();
+ return false;
+ }
+ wrapError(this, options);
+
+ var xhr = this.sync('delete', this, options);
+ if (!options.wait) destroy();
+ return xhr;
+ },
+
+ // Default URL for the model's representation on the server -- if you're
+ // using Backbone's restful methods, override this to change the endpoint
+ // that will be called.
+ url: function() {
+ var base =
+ _.result(this, 'urlRoot') ||
+ _.result(this.collection, 'url') ||
+ urlError();
+ if (this.isNew()) return base;
+ return base.replace(/([^\/])$/, '$1/') + encodeURIComponent(this.id);
+ },
+
+ // **parse** converts a response into the hash of attributes to be `set` on
+ // the model. The default implementation is just to pass the response along.
+ parse: function(resp, options) {
+ return resp;
+ },
+
+ // Create a new model with identical attributes to this one.
+ clone: function() {
+ return new this.constructor(this.attributes);
+ },
+
+ // A model is new if it has never been saved to the server, and lacks an id.
+ isNew: function() {
+ return !this.has(this.idAttribute);
+ },
+
+ // Check if the model is currently in a valid state.
+ isValid: function(options) {
+ return this._validate({}, _.extend(options || {}, { validate: true }));
+ },
+
+ // Run validation against the next complete set of model attributes,
+ // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
+ _validate: function(attrs, options) {
+ if (!options.validate || !this.validate) return true;
+ attrs = _.extend({}, this.attributes, attrs);
+ var error = this.validationError = this.validate(attrs, options) || null;
+ if (!error) return true;
+ this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
+ return false;
+ }
+
+ });
+
+ // Underscore methods that we want to implement on the Model.
+ var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit'];
+
+ // Mix in each Underscore method as a proxy to `Model#attributes`.
+ _.each(modelMethods, function(method) {
+ Model.prototype[method] = function() {
+ var args = slice.call(arguments);
+ args.unshift(this.attributes);
+ return _[method].apply(_, args);
+ };
+ });
+
+ // Backbone.Collection
+ // -------------------
+
+ // If models tend to represent a single row of data, a Backbone Collection is
+ // more analagous to a table full of data ... or a small slice or page of that
+ // table, or a collection of rows that belong together for a particular reason
+ // -- all of the messages in this particular folder, all of the documents
+ // belonging to this particular author, and so on. Collections maintain
+ // indexes of their models, both in order, and for lookup by `id`.
+
+ // Create a new **Collection**, perhaps to contain a specific type of `model`.
+ // If a `comparator` is specified, the Collection will maintain
+ // its models in sort order, as they're added and removed.
+ var Collection = Backbone.Collection = function(models, options) {
+ options || (options = {});
+ if (options.model) this.model = options.model;
+ if (options.comparator !== void 0) this.comparator = options.comparator;
+ this._reset();
+ this.initialize.apply(this, arguments);
+ if (models) this.reset(models, _.extend({silent: true}, options));
+ };
+
+ // Default options for `Collection#set`.
+ var setOptions = {add: true, remove: true, merge: true};
+ var addOptions = {add: true, remove: false};
+
+ // Define the Collection's inheritable methods.
+ _.extend(Collection.prototype, Events, {
+
+ // The default model for a collection is just a **Backbone.Model**.
+ // This should be overridden in most cases.
+ model: Model,
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // The JSON representation of a Collection is an array of the
+ // models' attributes.
+ toJSON: function(options) {
+ return this.map(function(model){ return model.toJSON(options); });
+ },
+
+ // Proxy `Backbone.sync` by default.
+ sync: function() {
+ return Backbone.sync.apply(this, arguments);
+ },
+
+ // Add a model, or list of models to the set.
+ add: function(models, options) {
+ return this.set(models, _.extend({merge: false}, options, addOptions));
+ },
+
+ // Remove a model, or a list of models from the set.
+ remove: function(models, options) {
+ var singular = !_.isArray(models);
+ models = singular ? [models] : _.clone(models);
+ options || (options = {});
+ var i, l, index, model;
+ for (i = 0, l = models.length; i < l; i++) {
+ model = models[i] = this.get(models[i]);
+ if (!model) continue;
+ delete this._byId[model.id];
+ delete this._byId[model.cid];
+ index = this.indexOf(model);
+ this.models.splice(index, 1);
+ this.length--;
+ if (!options.silent) {
+ options.index = index;
+ model.trigger('remove', model, this, options);
+ }
+ this._removeReference(model, options);
+ }
+ return singular ? models[0] : models;
+ },
+
+ // Update a collection by `set`-ing a new list of models, adding new ones,
+ // removing models that are no longer present, and merging models that
+ // already exist in the collection, as necessary. Similar to **Model#set**,
+ // the core operation for updating the data contained by the collection.
+ set: function(models, options) {
+ options = _.defaults({}, options, setOptions);
+ if (options.parse) models = this.parse(models, options);
+ var singular = !_.isArray(models);
+ models = singular ? (models ? [models] : []) : _.clone(models);
+ var i, l, id, model, attrs, existing, sort;
+ var at = options.at;
+ var targetModel = this.model;
+ var sortable = this.comparator && (at == null) && options.sort !== false;
+ var sortAttr = _.isString(this.comparator) ? this.comparator : null;
+ var toAdd = [], toRemove = [], modelMap = {};
+ var add = options.add, merge = options.merge, remove = options.remove;
+ var order = !sortable && add && remove ? [] : false;
+
+ // Turn bare objects into model references, and prevent invalid models
+ // from being added.
+ for (i = 0, l = models.length; i < l; i++) {
+ attrs = models[i] || {};
+ if (attrs instanceof Model) {
+ id = model = attrs;
+ } else {
+ id = attrs[targetModel.prototype.idAttribute || 'id'];
+ }
+
+ // If a duplicate is found, prevent it from being added and
+ // optionally merge it into the existing model.
+ if (existing = this.get(id)) {
+ if (remove) modelMap[existing.cid] = true;
+ if (merge) {
+ attrs = attrs === model ? model.attributes : attrs;
+ if (options.parse) attrs = existing.parse(attrs, options);
+ existing.set(attrs, options);
+ if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true;
+ }
+ models[i] = existing;
+
+ // If this is a new, valid model, push it to the `toAdd` list.
+ } else if (add) {
+ model = models[i] = this._prepareModel(attrs, options);
+ if (!model) continue;
+ toAdd.push(model);
+ this._addReference(model, options);
+ }
+
+ // Do not add multiple models with the same `id`.
+ model = existing || model;
+ if (order && (model.isNew() || !modelMap[model.id])) order.push(model);
+ modelMap[model.id] = true;
+ }
+
+ // Remove nonexistent models if appropriate.
+ if (remove) {
+ for (i = 0, l = this.length; i < l; ++i) {
+ if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
+ }
+ if (toRemove.length) this.remove(toRemove, options);
+ }
+
+ // See if sorting is needed, update `length` and splice in new models.
+ if (toAdd.length || (order && order.length)) {
+ if (sortable) sort = true;
+ this.length += toAdd.length;
+ if (at != null) {
+ for (i = 0, l = toAdd.length; i < l; i++) {
+ this.models.splice(at + i, 0, toAdd[i]);
+ }
+ } else {
+ if (order) this.models.length = 0;
+ var orderedModels = order || toAdd;
+ for (i = 0, l = orderedModels.length; i < l; i++) {
+ this.models.push(orderedModels[i]);
+ }
+ }
+ }
+
+ // Silently sort the collection if appropriate.
+ if (sort) this.sort({silent: true});
+
+ // Unless silenced, it's time to fire all appropriate add/sort events.
+ if (!options.silent) {
+ for (i = 0, l = toAdd.length; i < l; i++) {
+ (model = toAdd[i]).trigger('add', model, this, options);
+ }
+ if (sort || (order && order.length)) this.trigger('sort', this, options);
+ }
+
+ // Return the added (or merged) model (or models).
+ return singular ? models[0] : models;
+ },
+
+ // When you have more items than you want to add or remove individually,
+ // you can reset the entire set with a new list of models, without firing
+ // any granular `add` or `remove` events. Fires `reset` when finished.
+ // Useful for bulk operations and optimizations.
+ reset: function(models, options) {
+ options || (options = {});
+ for (var i = 0, l = this.models.length; i < l; i++) {
+ this._removeReference(this.models[i], options);
+ }
+ options.previousModels = this.models;
+ this._reset();
+ models = this.add(models, _.extend({silent: true}, options));
+ if (!options.silent) this.trigger('reset', this, options);
+ return models;
+ },
+
+ // Add a model to the end of the collection.
+ push: function(model, options) {
+ return this.add(model, _.extend({at: this.length}, options));
+ },
+
+ // Remove a model from the end of the collection.
+ pop: function(options) {
+ var model = this.at(this.length - 1);
+ this.remove(model, options);
+ return model;
+ },
+
+ // Add a model to the beginning of the collection.
+ unshift: function(model, options) {
+ return this.add(model, _.extend({at: 0}, options));
+ },
+
+ // Remove a model from the beginning of the collection.
+ shift: function(options) {
+ var model = this.at(0);
+ this.remove(model, options);
+ return model;
+ },
+
+ // Slice out a sub-array of models from the collection.
+ slice: function() {
+ return slice.apply(this.models, arguments);
+ },
+
+ // Get a model from the set by id.
+ get: function(obj) {
+ if (obj == null) return void 0;
+ return this._byId[obj] || this._byId[obj.id] || this._byId[obj.cid];
+ },
+
+ // Get the model at the given index.
+ at: function(index) {
+ return this.models[index];
+ },
+
+ // Return models with matching attributes. Useful for simple cases of
+ // `filter`.
+ where: function(attrs, first) {
+ if (_.isEmpty(attrs)) return first ? void 0 : [];
+ return this[first ? 'find' : 'filter'](function(model) {
+ for (var key in attrs) {
+ if (attrs[key] !== model.get(key)) return false;
+ }
+ return true;
+ });
+ },
+
+ // Return the first model with matching attributes. Useful for simple cases
+ // of `find`.
+ findWhere: function(attrs) {
+ return this.where(attrs, true);
+ },
+
+ // Force the collection to re-sort itself. You don't need to call this under
+ // normal circumstances, as the set will maintain sort order as each item
+ // is added.
+ sort: function(options) {
+ if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
+ options || (options = {});
+
+ // Run sort based on type of `comparator`.
+ if (_.isString(this.comparator) || this.comparator.length === 1) {
+ this.models = this.sortBy(this.comparator, this);
+ } else {
+ this.models.sort(_.bind(this.comparator, this));
+ }
+
+ if (!options.silent) this.trigger('sort', this, options);
+ return this;
+ },
+
+ // Pluck an attribute from each model in the collection.
+ pluck: function(attr) {
+ return _.invoke(this.models, 'get', attr);
+ },
+
+ // Fetch the default set of models for this collection, resetting the
+ // collection when they arrive. If `reset: true` is passed, the response
+ // data will be passed through the `reset` method instead of `set`.
+ fetch: function(options) {
+ options = options ? _.clone(options) : {};
+ if (options.parse === void 0) options.parse = true;
+ var success = options.success;
+ var collection = this;
+ options.success = function(resp) {
+ var method = options.reset ? 'reset' : 'set';
+ collection[method](resp, options);
+ if (success) success(collection, resp, options);
+ collection.trigger('sync', collection, resp, options);
+ };
+ wrapError(this, options);
+ return this.sync('read', this, options);
+ },
+
+ // Create a new instance of a model in this collection. Add the model to the
+ // collection immediately, unless `wait: true` is passed, in which case we
+ // wait for the server to agree.
+ create: function(model, options) {
+ options = options ? _.clone(options) : {};
+ if (!(model = this._prepareModel(model, options))) return false;
+ if (!options.wait) this.add(model, options);
+ var collection = this;
+ var success = options.success;
+ options.success = function(model, resp) {
+ if (options.wait) collection.add(model, options);
+ if (success) success(model, resp, options);
+ };
+ model.save(null, options);
+ return model;
+ },
+
+ // **parse** converts a response into a list of models to be added to the
+ // collection. The default implementation is just to pass it through.
+ parse: function(resp, options) {
+ return resp;
+ },
+
+ // Create a new collection with an identical list of models as this one.
+ clone: function() {
+ return new this.constructor(this.models);
+ },
+
+ // Private method to reset all internal state. Called when the collection
+ // is first initialized or reset.
+ _reset: function() {
+ this.length = 0;
+ this.models = [];
+ this._byId = {};
+ },
+
+ // Prepare a hash of attributes (or other model) to be added to this
+ // collection.
+ _prepareModel: function(attrs, options) {
+ if (attrs instanceof Model) return attrs;
+ options = options ? _.clone(options) : {};
+ options.collection = this;
+ var model = new this.model(attrs, options);
+ if (!model.validationError) return model;
+ this.trigger('invalid', this, model.validationError, options);
+ return false;
+ },
+
+ // Internal method to create a model's ties to a collection.
+ _addReference: function(model, options) {
+ this._byId[model.cid] = model;
+ if (model.id != null) this._byId[model.id] = model;
+ if (!model.collection) model.collection = this;
+ model.on('all', this._onModelEvent, this);
+ },
+
+ // Internal method to sever a model's ties to a collection.
+ _removeReference: function(model, options) {
+ if (this === model.collection) delete model.collection;
+ model.off('all', this._onModelEvent, this);
+ },
+
+ // Internal method called every time a model in the set fires an event.
+ // Sets need to update their indexes when models change ids. All other
+ // events simply proxy through. "add" and "remove" events that originate
+ // in other collections are ignored.
+ _onModelEvent: function(event, model, collection, options) {
+ if ((event === 'add' || event === 'remove') && collection !== this) return;
+ if (event === 'destroy') this.remove(model, options);
+ if (model && event === 'change:' + model.idAttribute) {
+ delete this._byId[model.previous(model.idAttribute)];
+ if (model.id != null) this._byId[model.id] = model;
+ }
+ this.trigger.apply(this, arguments);
+ }
+
+ });
+
+ // Underscore methods that we want to implement on the Collection.
+ // 90% of the core usefulness of Backbone Collections is actually implemented
+ // right here:
+ var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
+ 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
+ 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
+ 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
+ 'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle',
+ 'lastIndexOf', 'isEmpty', 'chain', 'sample'];
+
+ // Mix in each Underscore method as a proxy to `Collection#models`.
+ _.each(methods, function(method) {
+ Collection.prototype[method] = function() {
+ var args = slice.call(arguments);
+ args.unshift(this.models);
+ return _[method].apply(_, args);
+ };
+ });
+
+ // Underscore methods that take a property name as an argument.
+ var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy'];
+
+ // Use attributes instead of properties.
+ _.each(attributeMethods, function(method) {
+ Collection.prototype[method] = function(value, context) {
+ var iterator = _.isFunction(value) ? value : function(model) {
+ return model.get(value);
+ };
+ return _[method](this.models, iterator, context);
+ };
+ });
+
+ // Backbone.View
+ // -------------
+
+ // Backbone Views are almost more convention than they are actual code. A View
+ // is simply a JavaScript object that represents a logical chunk of UI in the
+ // DOM. This might be a single item, an entire list, a sidebar or panel, or
+ // even the surrounding frame which wraps your whole app. Defining a chunk of
+ // UI as a **View** allows you to define your DOM events declaratively, without
+ // having to worry about render order ... and makes it easy for the view to
+ // react to specific changes in the state of your models.
+
+ // Creating a Backbone.View creates its initial element outside of the DOM,
+ // if an existing element is not provided...
+ var View = Backbone.View = function(options) {
+ this.cid = _.uniqueId('view');
+ options || (options = {});
+ _.extend(this, _.pick(options, viewOptions));
+ this._ensureElement();
+ this.initialize.apply(this, arguments);
+ this.delegateEvents();
+ };
+
+ // Cached regex to split keys for `delegate`.
+ var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ // List of view options to be merged as properties.
+ var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
+
+ // Set up all inheritable **Backbone.View** properties and methods.
+ _.extend(View.prototype, Events, {
+
+ // The default `tagName` of a View's element is `"div"`.
+ tagName: 'div',
+
+ // jQuery delegate for element lookup, scoped to DOM elements within the
+ // current view. This should be preferred to global lookups where possible.
+ $: function(selector) {
+ return this.$el.find(selector);
+ },
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // **render** is the core function that your view should override, in order
+ // to populate its element (`this.el`), with the appropriate HTML. The
+ // convention is for **render** to always return `this`.
+ render: function() {
+ return this;
+ },
+
+ // Remove this view by taking the element out of the DOM, and removing any
+ // applicable Backbone.Events listeners.
+ remove: function() {
+ this.$el.remove();
+ this.stopListening();
+ return this;
+ },
+
+ // Change the view's element (`this.el` property), including event
+ // re-delegation.
+ setElement: function(element, delegate) {
+ if (this.$el) this.undelegateEvents();
+ this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
+ this.el = this.$el[0];
+ if (delegate !== false) this.delegateEvents();
+ return this;
+ },
+
+ // Set callbacks, where `this.events` is a hash of
+ //
+ // *{"event selector": "callback"}*
+ //
+ // {
+ // 'mousedown .title': 'edit',
+ // 'click .button': 'save',
+ // 'click .open': function(e) { ... }
+ // }
+ //
+ // pairs. Callbacks will be bound to the view, with `this` set properly.
+ // Uses event delegation for efficiency.
+ // Omitting the selector binds the event to `this.el`.
+ // This only works for delegate-able events: not `focus`, `blur`, and
+ // not `change`, `submit`, and `reset` in Internet Explorer.
+ delegateEvents: function(events) {
+ if (!(events || (events = _.result(this, 'events')))) return this;
+ this.undelegateEvents();
+ for (var key in events) {
+ var method = events[key];
+ if (!_.isFunction(method)) method = this[events[key]];
+ if (!method) continue;
+
+ var match = key.match(delegateEventSplitter);
+ var eventName = match[1], selector = match[2];
+ method = _.bind(method, this);
+ eventName += '.delegateEvents' + this.cid;
+ if (selector === '') {
+ this.$el.on(eventName, method);
+ } else {
+ this.$el.on(eventName, selector, method);
+ }
+ }
+ return this;
+ },
+
+ // Clears all callbacks previously bound to the view with `delegateEvents`.
+ // You usually don't need to use this, but may wish to if you have multiple
+ // Backbone views attached to the same DOM element.
+ undelegateEvents: function() {
+ this.$el.off('.delegateEvents' + this.cid);
+ return this;
+ },
+
+ // Ensure that the View has a DOM element to render into.
+ // If `this.el` is a string, pass it through `$()`, take the first
+ // matching element, and re-assign it to `el`. Otherwise, create
+ // an element from the `id`, `className` and `tagName` properties.
+ _ensureElement: function() {
+ if (!this.el) {
+ var attrs = _.extend({}, _.result(this, 'attributes'));
+ if (this.id) attrs.id = _.result(this, 'id');
+ if (this.className) attrs['class'] = _.result(this, 'className');
+ var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);
+ this.setElement($el, false);
+ } else {
+ this.setElement(_.result(this, 'el'), false);
+ }
+ }
+
+ });
+
+ // Backbone.sync
+ // -------------
+
+ // Override this function to change the manner in which Backbone persists
+ // models to the server. You will be passed the type of request, and the
+ // model in question. By default, makes a RESTful Ajax request
+ // to the model's `url()`. Some possible customizations could be:
+ //
+ // * Use `setTimeout` to batch rapid-fire updates into a single request.
+ // * Send up the models as XML instead of JSON.
+ // * Persist models via WebSockets instead of Ajax.
+ //
+ // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
+ // as `POST`, with a `_method` parameter containing the true HTTP method,
+ // as well as all requests with the body as `application/x-www-form-urlencoded`
+ // instead of `application/json` with the model in a param named `model`.
+ // Useful when interfacing with server-side languages like **PHP** that make
+ // it difficult to read the body of `PUT` requests.
+ Backbone.sync = function(method, model, options) {
+ var type = methodMap[method];
+
+ // Default options, unless specified.
+ _.defaults(options || (options = {}), {
+ emulateHTTP: Backbone.emulateHTTP,
+ emulateJSON: Backbone.emulateJSON
+ });
+
+ // Default JSON-request options.
+ var params = {type: type, dataType: 'json'};
+
+ // Ensure that we have a URL.
+ if (!options.url) {
+ params.url = _.result(model, 'url') || urlError();
+ }
+
+ // Ensure that we have the appropriate request data.
+ if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
+ params.contentType = 'application/json';
+ params.data = JSON.stringify(options.attrs || model.toJSON(options));
+ }
+
+ // For older servers, emulate JSON by encoding the request into an HTML-form.
+ if (options.emulateJSON) {
+ params.contentType = 'application/x-www-form-urlencoded';
+ params.data = params.data ? {model: params.data} : {};
+ }
+
+ // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
+ // And an `X-HTTP-Method-Override` header.
+ if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
+ params.type = 'POST';
+ if (options.emulateJSON) params.data._method = type;
+ var beforeSend = options.beforeSend;
+ options.beforeSend = function(xhr) {
+ xhr.setRequestHeader('X-HTTP-Method-Override', type);
+ if (beforeSend) return beforeSend.apply(this, arguments);
+ };
+ }
+
+ // Don't process data on a non-GET request.
+ if (params.type !== 'GET' && !options.emulateJSON) {
+ params.processData = false;
+ }
+
+ // If we're sending a `PATCH` request, and we're in an old Internet Explorer
+ // that still has ActiveX enabled by default, override jQuery to use that
+ // for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
+ if (params.type === 'PATCH' && noXhrPatch) {
+ params.xhr = function() {
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ };
+ }
+
+ // Make the request, allowing the user to override any Ajax options.
+ var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
+ model.trigger('request', model, xhr, options);
+ return xhr;
+ };
+
+ var noXhrPatch =
+ typeof window !== 'undefined' && !!window.ActiveXObject &&
+ !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
+
+ // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
+ var methodMap = {
+ 'create': 'POST',
+ 'update': 'PUT',
+ 'patch': 'PATCH',
+ 'delete': 'DELETE',
+ 'read': 'GET'
+ };
+
+ // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
+ // Override this if you'd like to use a different library.
+ Backbone.ajax = function() {
+ return Backbone.$.ajax.apply(Backbone.$, arguments);
+ };
+
+ // Backbone.Router
+ // ---------------
+
+ // Routers map faux-URLs to actions, and fire events when routes are
+ // matched. Creating a new one sets its `routes` hash, if not set statically.
+ var Router = Backbone.Router = function(options) {
+ options || (options = {});
+ if (options.routes) this.routes = options.routes;
+ this._bindRoutes();
+ this.initialize.apply(this, arguments);
+ };
+
+ // Cached regular expressions for matching named param parts and splatted
+ // parts of route strings.
+ var optionalParam = /\((.*?)\)/g;
+ var namedParam = /(\(\?)?:\w+/g;
+ var splatParam = /\*\w+/g;
+ var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
+
+ // Set up all inheritable **Backbone.Router** properties and methods.
+ _.extend(Router.prototype, Events, {
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Manually bind a single named route to a callback. For example:
+ //
+ // this.route('search/:query/p:num', 'search', function(query, num) {
+ // ...
+ // });
+ //
+ route: function(route, name, callback) {
+ if (!_.isRegExp(route)) route = this._routeToRegExp(route);
+ if (_.isFunction(name)) {
+ callback = name;
+ name = '';
+ }
+ if (!callback) callback = this[name];
+ var router = this;
+ Backbone.history.route(route, function(fragment) {
+ var args = router._extractParameters(route, fragment);
+ router.execute(callback, args);
+ router.trigger.apply(router, ['route:' + name].concat(args));
+ router.trigger('route', name, args);
+ Backbone.history.trigger('route', router, name, args);
+ });
+ return this;
+ },
+
+ // Execute a route handler with the provided parameters. This is an
+ // excellent place to do pre-route setup or post-route cleanup.
+ execute: function(callback, args) {
+ if (callback) callback.apply(this, args);
+ },
+
+ // Simple proxy to `Backbone.history` to save a fragment into the history.
+ navigate: function(fragment, options) {
+ Backbone.history.navigate(fragment, options);
+ return this;
+ },
+
+ // Bind all defined routes to `Backbone.history`. We have to reverse the
+ // order of the routes here to support behavior where the most general
+ // routes can be defined at the bottom of the route map.
+ _bindRoutes: function() {
+ if (!this.routes) return;
+ this.routes = _.result(this, 'routes');
+ var route, routes = _.keys(this.routes);
+ while ((route = routes.pop()) != null) {
+ this.route(route, this.routes[route]);
+ }
+ },
+
+ // Convert a route string into a regular expression, suitable for matching
+ // against the current location hash.
+ _routeToRegExp: function(route) {
+ route = route.replace(escapeRegExp, '\\$&')
+ .replace(optionalParam, '(?:$1)?')
+ .replace(namedParam, function(match, optional) {
+ return optional ? match : '([^/?]+)';
+ })
+ .replace(splatParam, '([^?]*?)');
+ return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
+ },
+
+ // Given a route, and a URL fragment that it matches, return the array of
+ // extracted decoded parameters. Empty or unmatched parameters will be
+ // treated as `null` to normalize cross-browser behavior.
+ _extractParameters: function(route, fragment) {
+ var params = route.exec(fragment).slice(1);
+ return _.map(params, function(param, i) {
+ // Don't decode the search params.
+ if (i === params.length - 1) return param || null;
+ return param ? decodeURIComponent(param) : null;
+ });
+ }
+
+ });
+
+ // Backbone.History
+ // ----------------
+
+ // Handles cross-browser history management, based on either
+ // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
+ // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
+ // and URL fragments. If the browser supports neither (old IE, natch),
+ // falls back to polling.
+ var History = Backbone.History = function() {
+ this.handlers = [];
+ _.bindAll(this, 'checkUrl');
+
+ // Ensure that `History` can be used outside of the browser.
+ if (typeof window !== 'undefined') {
+ this.location = window.location;
+ this.history = window.history;
+ }
+ };
+
+ // Cached regex for stripping a leading hash/slash and trailing space.
+ var routeStripper = /^[#\/]|\s+$/g;
+
+ // Cached regex for stripping leading and trailing slashes.
+ var rootStripper = /^\/+|\/+$/g;
+
+ // Cached regex for detecting MSIE.
+ var isExplorer = /msie [\w.]+/;
+
+ // Cached regex for removing a trailing slash.
+ var trailingSlash = /\/$/;
+
+ // Cached regex for stripping urls of hash.
+ var pathStripper = /#.*$/;
+
+ // Has the history handling already been started?
+ History.started = false;
+
+ // Set up all inheritable **Backbone.History** properties and methods.
+ _.extend(History.prototype, Events, {
+
+ // The default interval to poll for hash changes, if necessary, is
+ // twenty times a second.
+ interval: 50,
+
+ // Are we at the app root?
+ atRoot: function() {
+ return this.location.pathname.replace(/[^\/]$/, '$&/') === this.root;
+ },
+
+ // Gets the true hash value. Cannot use location.hash directly due to bug
+ // in Firefox where location.hash will always be decoded.
+ getHash: function(window) {
+ var match = (window || this).location.href.match(/#(.*)$/);
+ return match ? match[1] : '';
+ },
+
+ // Get the cross-browser normalized URL fragment, either from the URL,
+ // the hash, or the override.
+ getFragment: function(fragment, forcePushState) {
+ if (fragment == null) {
+ if (this._hasPushState || !this._wantsHashChange || forcePushState) {
+ fragment = decodeURI(this.location.pathname + this.location.search);
+ var root = this.root.replace(trailingSlash, '');
+ if (!fragment.indexOf(root)) fragment = fragment.slice(root.length);
+ } else {
+ fragment = this.getHash();
+ }
+ }
+ return fragment.replace(routeStripper, '');
+ },
+
+ // Start the hash change handling, returning `true` if the current URL matches
+ // an existing route, and `false` otherwise.
+ start: function(options) {
+ if (History.started) throw new Error("Backbone.history has already been started");
+ History.started = true;
+
+ // Figure out the initial configuration. Do we need an iframe?
+ // Is pushState desired ... is it available?
+ this.options = _.extend({root: '/'}, this.options, options);
+ this.root = this.options.root;
+ this._wantsHashChange = this.options.hashChange !== false;
+ this._wantsPushState = !!this.options.pushState;
+ this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
+ var fragment = this.getFragment();
+ var docMode = document.documentMode;
+ var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
+
+ // Normalize root to always include a leading and trailing slash.
+ this.root = ('/' + this.root + '/').replace(rootStripper, '/');
+
+ if (oldIE && this._wantsHashChange) {
+ var frame = Backbone.$('<iframe src="javascript:0" tabindex="-1">');
+ this.iframe = frame.hide().appendTo('body')[0].contentWindow;
+ this.navigate(fragment);
+ }
+
+ // Depending on whether we're using pushState or hashes, and whether
+ // 'onhashchange' is supported, determine how we check the URL state.
+ if (this._hasPushState) {
+ Backbone.$(window).on('popstate', this.checkUrl);
+ } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
+ Backbone.$(window).on('hashchange', this.checkUrl);
+ } else if (this._wantsHashChange) {
+ this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
+ }
+
+ // Determine if we need to change the base url, for a pushState link
+ // opened by a non-pushState browser.
+ this.fragment = fragment;
+ var loc = this.location;
+
+ // Transition from hashChange to pushState or vice versa if both are
+ // requested.
+ if (this._wantsHashChange && this._wantsPushState) {
+
+ // If we've started off with a route from a `pushState`-enabled
+ // browser, but we're currently in a browser that doesn't support it...
+ if (!this._hasPushState && !this.atRoot()) {
+ this.fragment = this.getFragment(null, true);
+ this.location.replace(this.root + '#' + this.fragment);
+ // Return immediately as browser will do redirect to new url
+ return true;
+
+ // Or if we've started out with a hash-based route, but we're currently
+ // in a browser where it could be `pushState`-based instead...
+ } else if (this._hasPushState && this.atRoot() && loc.hash) {
+ this.fragment = this.getHash().replace(routeStripper, '');
+ this.history.replaceState({}, document.title, this.root + this.fragment);
+ }
+
+ }
+
+ if (!this.options.silent) return this.loadUrl();
+ },
+
+ // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
+ // but possibly useful for unit testing Routers.
+ stop: function() {
+ Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
+ if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
+ History.started = false;
+ },
+
+ // Add a route to be tested when the fragment changes. Routes added later
+ // may override previous routes.
+ route: function(route, callback) {
+ this.handlers.unshift({route: route, callback: callback});
+ },
+
+ // Checks the current URL to see if it has changed, and if it has,
+ // calls `loadUrl`, normalizing across the hidden iframe.
+ checkUrl: function(e) {
+ var current = this.getFragment();
+ if (current === this.fragment && this.iframe) {
+ current = this.getFragment(this.getHash(this.iframe));
+ }
+ if (current === this.fragment) return false;
+ if (this.iframe) this.navigate(current);
+ this.loadUrl();
+ },
+
+ // Attempt to load the current URL fragment. If a route succeeds with a
+ // match, returns `true`. If no defined routes matches the fragment,
+ // returns `false`.
+ loadUrl: function(fragment) {
+ fragment = this.fragment = this.getFragment(fragment);
+ return _.any(this.handlers, function(handler) {
+ if (handler.route.test(fragment)) {
+ handler.callback(fragment);
+ return true;
+ }
+ });
+ },
+
+ // Save a fragment into the hash history, or replace the URL state if the
+ // 'replace' option is passed. You are responsible for properly URL-encoding
+ // the fragment in advance.
+ //
+ // The options object can contain `trigger: true` if you wish to have the
+ // route callback be fired (not usually desirable), or `replace: true`, if
+ // you wish to modify the current URL without adding an entry to the history.
+ navigate: function(fragment, options) {
+ if (!History.started) return false;
+ if (!options || options === true) options = {trigger: !!options};
+
+ var url = this.root + (fragment = this.getFragment(fragment || ''));
+
+ // Strip the hash for matching.
+ fragment = fragment.replace(pathStripper, '');
+
+ if (this.fragment === fragment) return;
+ this.fragment = fragment;
+
+ // Don't include a trailing slash on the root.
+ if (fragment === '' && url !== '/') url = url.slice(0, -1);
+
+ // If pushState is available, we use it to set the fragment as a real URL.
+ if (this._hasPushState) {
+ this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
+
+ // If hash changes haven't been explicitly disabled, update the hash
+ // fragment to store history.
+ } else if (this._wantsHashChange) {
+ this._updateHash(this.location, fragment, options.replace);
+ if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {
+ // Opening and closing the iframe tricks IE7 and earlier to push a
+ // history entry on hash-tag change. When replace is true, we don't
+ // want this.
+ if(!options.replace) this.iframe.document.open().close();
+ this._updateHash(this.iframe.location, fragment, options.replace);
+ }
+
+ // If you've told us that you explicitly don't want fallback hashchange-
+ // based history, then `navigate` becomes a page refresh.
+ } else {
+ return this.location.assign(url);
+ }
+ if (options.trigger) return this.loadUrl(fragment);
+ },
+
+ // Update the hash location, either replacing the current entry, or adding
+ // a new one to the browser history.
+ _updateHash: function(location, fragment, replace) {
+ if (replace) {
+ var href = location.href.replace(/(javascript:|#).*$/, '');
+ location.replace(href + '#' + fragment);
+ } else {
+ // Some browsers require that `hash` contains a leading #.
+ location.hash = '#' + fragment;
+ }
+ }
+
+ });
+
+ // Create the default Backbone.history.
+ Backbone.history = new History;
+
+ // Helpers
+ // -------
+
+ // Helper function to correctly set up the prototype chain, for subclasses.
+ // Similar to `goog.inherits`, but uses a hash of prototype properties and
+ // class properties to be extended.
+ var extend = function(protoProps, staticProps) {
+ var parent = this;
+ var child;
+
+ // The constructor function for the new subclass is either defined by you
+ // (the "constructor" property in your `extend` definition), or defaulted
+ // by us to simply call the parent's constructor.
+ if (protoProps && _.has(protoProps, 'constructor')) {
+ child = protoProps.constructor;
+ } else {
+ child = function(){ return parent.apply(this, arguments); };
+ }
+
+ // Add static properties to the constructor function, if supplied.
+ _.extend(child, parent, staticProps);
+
+ // Set the prototype chain to inherit from `parent`, without calling
+ // `parent`'s constructor function.
+ var Surrogate = function(){ this.constructor = child; };
+ Surrogate.prototype = parent.prototype;
+ child.prototype = new Surrogate;
+
+ // Add prototype properties (instance properties) to the subclass,
+ // if supplied.
+ if (protoProps) _.extend(child.prototype, protoProps);
+
+ // Set a convenience property in case the parent's prototype is needed
+ // later.
+ child.__super__ = parent.prototype;
+
+ return child;
+ };
+
+ // Set up inheritance for the model, collection, router, view and history.
+ Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
+
+ // Throw an error when a URL is needed, and none is supplied.
+ var urlError = function() {
+ throw new Error('A "url" property or function must be specified');
+ };
+
+ // Wrap an optional error callback with a fallback error event.
+ var wrapError = function(model, options) {
+ var error = options.error;
+ options.error = function(resp) {
+ if (error) error(model, resp, options);
+ model.trigger('error', model, resp, options);
+ };
+ };
+
+ return Backbone;
+
+}));
\ No newline at end of file
[37/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
deleted file mode 100644
index c6f3d21..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
+++ /dev/null
@@ -1,6332 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
-html {
- font-family: sans-serif;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
-}
-body {
- margin: 0;
-}
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-menu,
-nav,
-section,
-summary {
- display: block;
-}
-audio,
-canvas,
-progress,
-video {
- display: inline-block;
- vertical-align: baseline;
-}
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-[hidden],
-template {
- display: none;
-}
-a {
- background-color: transparent;
-}
-a:active,
-a:hover {
- outline: 0;
-}
-abbr[title] {
- border-bottom: 1px dotted;
-}
-b,
-strong {
- font-weight: bold;
-}
-dfn {
- font-style: italic;
-}
-h1 {
- margin: .67em 0;
- font-size: 2em;
-}
-mark {
- color: #000;
- background: #ff0;
-}
-small {
- font-size: 80%;
-}
-sub,
-sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline;
-}
-sup {
- top: -.5em;
-}
-sub {
- bottom: -.25em;
-}
-img {
- border: 0;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-figure {
- margin: 1em 40px;
-}
-hr {
- height: 0;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-pre {
- overflow: auto;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- font-size: 1em;
-}
-button,
-input,
-optgroup,
-select,
-textarea {
- margin: 0;
- font: inherit;
- color: inherit;
-}
-button {
- overflow: visible;
-}
-button,
-select {
- text-transform: none;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button;
- cursor: pointer;
-}
-button[disabled],
-html input[disabled] {
- cursor: default;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-input {
- line-height: normal;
-}
-input[type="checkbox"],
-input[type="radio"] {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0;
-}
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-input[type="search"] {
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- -webkit-appearance: textfield;
-}
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-fieldset {
- padding: .35em .625em .75em;
- margin: 0 2px;
- border: 1px solid #c0c0c0;
-}
-legend {
- padding: 0;
- border: 0;
-}
-textarea {
- overflow: auto;
-}
-optgroup {
- font-weight: bold;
-}
-table {
- border-spacing: 0;
- border-collapse: collapse;
-}
-td,
-th {
- padding: 0;
-}
-/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
-@media print {
- *,
- *:before,
- *:after {
- color: #000 !important;
- text-shadow: none !important;
- background: transparent !important;
- -webkit-box-shadow: none !important;
- box-shadow: none !important;
- }
- a,
- a:visited {
- text-decoration: underline;
- }
- a[href]:after {
- content: " (" attr(href) ")";
- }
- abbr[title]:after {
- content: " (" attr(title) ")";
- }
- a[href^="#"]:after,
- a[href^="javascript:"]:after {
- content: "";
- }
- pre,
- blockquote {
- border: 1px solid #999;
-
- page-break-inside: avoid;
- }
- thead {
- display: table-header-group;
- }
- tr,
- img {
- page-break-inside: avoid;
- }
- img {
- max-width: 100% !important;
- }
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3;
- }
- h2,
- h3 {
- page-break-after: avoid;
- }
- select {
- background: #fff !important;
- }
- .navbar {
- display: none;
- }
- .btn > .caret,
- .dropup > .btn > .caret {
- border-top-color: #000 !important;
- }
- .label {
- border: 1px solid #000;
- }
- .table {
- border-collapse: collapse !important;
- }
- .table td,
- .table th {
- background-color: #fff !important;
- }
- .table-bordered th,
- .table-bordered td {
- border: 1px solid #ddd !important;
- }
-}
-@font-face {
- font-family: 'Glyphicons Halflings';
-
- src: url('../fonts/glyphicons-halflings-regular.eot');
- src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
-}
-.glyphicon {
- position: relative;
- top: 1px;
- display: inline-block;
- font-family: 'Glyphicons Halflings';
- font-style: normal;
- font-weight: normal;
- line-height: 1;
-
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.glyphicon-asterisk:before {
- content: "\2a";
-}
-.glyphicon-plus:before {
- content: "\2b";
-}
-.glyphicon-euro:before,
-.glyphicon-eur:before {
- content: "\20ac";
-}
-.glyphicon-minus:before {
- content: "\2212";
-}
-.glyphicon-cloud:before {
- content: "\2601";
-}
-.glyphicon-envelope:before {
- content: "\2709";
-}
-.glyphicon-pencil:before {
- content: "\270f";
-}
-.glyphicon-glass:before {
- content: "\e001";
-}
-.glyphicon-music:before {
- content: "\e002";
-}
-.glyphicon-search:before {
- content: "\e003";
-}
-.glyphicon-heart:before {
- content: "\e005";
-}
-.glyphicon-star:before {
- content: "\e006";
-}
-.glyphicon-star-empty:before {
- content: "\e007";
-}
-.glyphicon-user:before {
- content: "\e008";
-}
-.glyphicon-film:before {
- content: "\e009";
-}
-.glyphicon-th-large:before {
- content: "\e010";
-}
-.glyphicon-th:before {
- content: "\e011";
-}
-.glyphicon-th-list:before {
- content: "\e012";
-}
-.glyphicon-ok:before {
- content: "\e013";
-}
-.glyphicon-remove:before {
- content: "\e014";
-}
-.glyphicon-zoom-in:before {
- content: "\e015";
-}
-.glyphicon-zoom-out:before {
- content: "\e016";
-}
-.glyphicon-off:before {
- content: "\e017";
-}
-.glyphicon-signal:before {
- content: "\e018";
-}
-.glyphicon-cog:before {
- content: "\e019";
-}
-.glyphicon-trash:before {
- content: "\e020";
-}
-.glyphicon-home:before {
- content: "\e021";
-}
-.glyphicon-file:before {
- content: "\e022";
-}
-.glyphicon-time:before {
- content: "\e023";
-}
-.glyphicon-road:before {
- content: "\e024";
-}
-.glyphicon-download-alt:before {
- content: "\e025";
-}
-.glyphicon-download:before {
- content: "\e026";
-}
-.glyphicon-upload:before {
- content: "\e027";
-}
-.glyphicon-inbox:before {
- content: "\e028";
-}
-.glyphicon-play-circle:before {
- content: "\e029";
-}
-.glyphicon-repeat:before {
- content: "\e030";
-}
-.glyphicon-refresh:before {
- content: "\e031";
-}
-.glyphicon-list-alt:before {
- content: "\e032";
-}
-.glyphicon-lock:before {
- content: "\e033";
-}
-.glyphicon-flag:before {
- content: "\e034";
-}
-.glyphicon-headphones:before {
- content: "\e035";
-}
-.glyphicon-volume-off:before {
- content: "\e036";
-}
-.glyphicon-volume-down:before {
- content: "\e037";
-}
-.glyphicon-volume-up:before {
- content: "\e038";
-}
-.glyphicon-qrcode:before {
- content: "\e039";
-}
-.glyphicon-barcode:before {
- content: "\e040";
-}
-.glyphicon-tag:before {
- content: "\e041";
-}
-.glyphicon-tags:before {
- content: "\e042";
-}
-.glyphicon-book:before {
- content: "\e043";
-}
-.glyphicon-bookmark:before {
- content: "\e044";
-}
-.glyphicon-print:before {
- content: "\e045";
-}
-.glyphicon-camera:before {
- content: "\e046";
-}
-.glyphicon-font:before {
- content: "\e047";
-}
-.glyphicon-bold:before {
- content: "\e048";
-}
-.glyphicon-italic:before {
- content: "\e049";
-}
-.glyphicon-text-height:before {
- content: "\e050";
-}
-.glyphicon-text-width:before {
- content: "\e051";
-}
-.glyphicon-align-left:before {
- content: "\e052";
-}
-.glyphicon-align-center:before {
- content: "\e053";
-}
-.glyphicon-align-right:before {
- content: "\e054";
-}
-.glyphicon-align-justify:before {
- content: "\e055";
-}
-.glyphicon-list:before {
- content: "\e056";
-}
-.glyphicon-indent-left:before {
- content: "\e057";
-}
-.glyphicon-indent-right:before {
- content: "\e058";
-}
-.glyphicon-facetime-video:before {
- content: "\e059";
-}
-.glyphicon-picture:before {
- content: "\e060";
-}
-.glyphicon-map-marker:before {
- content: "\e062";
-}
-.glyphicon-adjust:before {
- content: "\e063";
-}
-.glyphicon-tint:before {
- content: "\e064";
-}
-.glyphicon-edit:before {
- content: "\e065";
-}
-.glyphicon-share:before {
- content: "\e066";
-}
-.glyphicon-check:before {
- content: "\e067";
-}
-.glyphicon-move:before {
- content: "\e068";
-}
-.glyphicon-step-backward:before {
- content: "\e069";
-}
-.glyphicon-fast-backward:before {
- content: "\e070";
-}
-.glyphicon-backward:before {
- content: "\e071";
-}
-.glyphicon-play:before {
- content: "\e072";
-}
-.glyphicon-pause:before {
- content: "\e073";
-}
-.glyphicon-stop:before {
- content: "\e074";
-}
-.glyphicon-forward:before {
- content: "\e075";
-}
-.glyphicon-fast-forward:before {
- content: "\e076";
-}
-.glyphicon-step-forward:before {
- content: "\e077";
-}
-.glyphicon-eject:before {
- content: "\e078";
-}
-.glyphicon-chevron-left:before {
- content: "\e079";
-}
-.glyphicon-chevron-right:before {
- content: "\e080";
-}
-.glyphicon-plus-sign:before {
- content: "\e081";
-}
-.glyphicon-minus-sign:before {
- content: "\e082";
-}
-.glyphicon-remove-sign:before {
- content: "\e083";
-}
-.glyphicon-ok-sign:before {
- content: "\e084";
-}
-.glyphicon-question-sign:before {
- content: "\e085";
-}
-.glyphicon-info-sign:before {
- content: "\e086";
-}
-.glyphicon-screenshot:before {
- content: "\e087";
-}
-.glyphicon-remove-circle:before {
- content: "\e088";
-}
-.glyphicon-ok-circle:before {
- content: "\e089";
-}
-.glyphicon-ban-circle:before {
- content: "\e090";
-}
-.glyphicon-arrow-left:before {
- content: "\e091";
-}
-.glyphicon-arrow-right:before {
- content: "\e092";
-}
-.glyphicon-arrow-up:before {
- content: "\e093";
-}
-.glyphicon-arrow-down:before {
- content: "\e094";
-}
-.glyphicon-share-alt:before {
- content: "\e095";
-}
-.glyphicon-resize-full:before {
- content: "\e096";
-}
-.glyphicon-resize-small:before {
- content: "\e097";
-}
-.glyphicon-exclamation-sign:before {
- content: "\e101";
-}
-.glyphicon-gift:before {
- content: "\e102";
-}
-.glyphicon-leaf:before {
- content: "\e103";
-}
-.glyphicon-fire:before {
- content: "\e104";
-}
-.glyphicon-eye-open:before {
- content: "\e105";
-}
-.glyphicon-eye-close:before {
- content: "\e106";
-}
-.glyphicon-warning-sign:before {
- content: "\e107";
-}
-.glyphicon-plane:before {
- content: "\e108";
-}
-.glyphicon-calendar:before {
- content: "\e109";
-}
-.glyphicon-random:before {
- content: "\e110";
-}
-.glyphicon-comment:before {
- content: "\e111";
-}
-.glyphicon-magnet:before {
- content: "\e112";
-}
-.glyphicon-chevron-up:before {
- content: "\e113";
-}
-.glyphicon-chevron-down:before {
- content: "\e114";
-}
-.glyphicon-retweet:before {
- content: "\e115";
-}
-.glyphicon-shopping-cart:before {
- content: "\e116";
-}
-.glyphicon-folder-close:before {
- content: "\e117";
-}
-.glyphicon-folder-open:before {
- content: "\e118";
-}
-.glyphicon-resize-vertical:before {
- content: "\e119";
-}
-.glyphicon-resize-horizontal:before {
- content: "\e120";
-}
-.glyphicon-hdd:before {
- content: "\e121";
-}
-.glyphicon-bullhorn:before {
- content: "\e122";
-}
-.glyphicon-bell:before {
- content: "\e123";
-}
-.glyphicon-certificate:before {
- content: "\e124";
-}
-.glyphicon-thumbs-up:before {
- content: "\e125";
-}
-.glyphicon-thumbs-down:before {
- content: "\e126";
-}
-.glyphicon-hand-right:before {
- content: "\e127";
-}
-.glyphicon-hand-left:before {
- content: "\e128";
-}
-.glyphicon-hand-up:before {
- content: "\e129";
-}
-.glyphicon-hand-down:before {
- content: "\e130";
-}
-.glyphicon-circle-arrow-right:before {
- content: "\e131";
-}
-.glyphicon-circle-arrow-left:before {
- content: "\e132";
-}
-.glyphicon-circle-arrow-up:before {
- content: "\e133";
-}
-.glyphicon-circle-arrow-down:before {
- content: "\e134";
-}
-.glyphicon-globe:before {
- content: "\e135";
-}
-.glyphicon-wrench:before {
- content: "\e136";
-}
-.glyphicon-tasks:before {
- content: "\e137";
-}
-.glyphicon-filter:before {
- content: "\e138";
-}
-.glyphicon-briefcase:before {
- content: "\e139";
-}
-.glyphicon-fullscreen:before {
- content: "\e140";
-}
-.glyphicon-dashboard:before {
- content: "\e141";
-}
-.glyphicon-paperclip:before {
- content: "\e142";
-}
-.glyphicon-heart-empty:before {
- content: "\e143";
-}
-.glyphicon-link:before {
- content: "\e144";
-}
-.glyphicon-phone:before {
- content: "\e145";
-}
-.glyphicon-pushpin:before {
- content: "\e146";
-}
-.glyphicon-usd:before {
- content: "\e148";
-}
-.glyphicon-gbp:before {
- content: "\e149";
-}
-.glyphicon-sort:before {
- content: "\e150";
-}
-.glyphicon-sort-by-alphabet:before {
- content: "\e151";
-}
-.glyphicon-sort-by-alphabet-alt:before {
- content: "\e152";
-}
-.glyphicon-sort-by-order:before {
- content: "\e153";
-}
-.glyphicon-sort-by-order-alt:before {
- content: "\e154";
-}
-.glyphicon-sort-by-attributes:before {
- content: "\e155";
-}
-.glyphicon-sort-by-attributes-alt:before {
- content: "\e156";
-}
-.glyphicon-unchecked:before {
- content: "\e157";
-}
-.glyphicon-expand:before {
- content: "\e158";
-}
-.glyphicon-collapse-down:before {
- content: "\e159";
-}
-.glyphicon-collapse-up:before {
- content: "\e160";
-}
-.glyphicon-log-in:before {
- content: "\e161";
-}
-.glyphicon-flash:before {
- content: "\e162";
-}
-.glyphicon-log-out:before {
- content: "\e163";
-}
-.glyphicon-new-window:before {
- content: "\e164";
-}
-.glyphicon-record:before {
- content: "\e165";
-}
-.glyphicon-save:before {
- content: "\e166";
-}
-.glyphicon-open:before {
- content: "\e167";
-}
-.glyphicon-saved:before {
- content: "\e168";
-}
-.glyphicon-import:before {
- content: "\e169";
-}
-.glyphicon-export:before {
- content: "\e170";
-}
-.glyphicon-send:before {
- content: "\e171";
-}
-.glyphicon-floppy-disk:before {
- content: "\e172";
-}
-.glyphicon-floppy-saved:before {
- content: "\e173";
-}
-.glyphicon-floppy-remove:before {
- content: "\e174";
-}
-.glyphicon-floppy-save:before {
- content: "\e175";
-}
-.glyphicon-floppy-open:before {
- content: "\e176";
-}
-.glyphicon-credit-card:before {
- content: "\e177";
-}
-.glyphicon-transfer:before {
- content: "\e178";
-}
-.glyphicon-cutlery:before {
- content: "\e179";
-}
-.glyphicon-header:before {
- content: "\e180";
-}
-.glyphicon-compressed:before {
- content: "\e181";
-}
-.glyphicon-earphone:before {
- content: "\e182";
-}
-.glyphicon-phone-alt:before {
- content: "\e183";
-}
-.glyphicon-tower:before {
- content: "\e184";
-}
-.glyphicon-stats:before {
- content: "\e185";
-}
-.glyphicon-sd-video:before {
- content: "\e186";
-}
-.glyphicon-hd-video:before {
- content: "\e187";
-}
-.glyphicon-subtitles:before {
- content: "\e188";
-}
-.glyphicon-sound-stereo:before {
- content: "\e189";
-}
-.glyphicon-sound-dolby:before {
- content: "\e190";
-}
-.glyphicon-sound-5-1:before {
- content: "\e191";
-}
-.glyphicon-sound-6-1:before {
- content: "\e192";
-}
-.glyphicon-sound-7-1:before {
- content: "\e193";
-}
-.glyphicon-copyright-mark:before {
- content: "\e194";
-}
-.glyphicon-registration-mark:before {
- content: "\e195";
-}
-.glyphicon-cloud-download:before {
- content: "\e197";
-}
-.glyphicon-cloud-upload:before {
- content: "\e198";
-}
-.glyphicon-tree-conifer:before {
- content: "\e199";
-}
-.glyphicon-tree-deciduous:before {
- content: "\e200";
-}
-* {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-*:before,
-*:after {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-html {
- font-size: 10px;
-
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 1.42857143;
- color: #333;
- background-color: #fff;
-}
-input,
-button,
-select,
-textarea {
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
-}
-a {
- color: #337ab7;
- text-decoration: none;
-}
-a:hover,
-a:focus {
- color: #23527c;
- text-decoration: underline;
-}
-a:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-figure {
- margin: 0;
-}
-img {
- vertical-align: middle;
-}
-.img-responsive,
-.thumbnail > img,
-.thumbnail a > img,
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- display: block;
- max-width: 100%;
- height: auto;
-}
-.img-rounded {
- border-radius: 6px;
-}
-.img-thumbnail {
- display: inline-block;
- max-width: 100%;
- height: auto;
- padding: 4px;
- line-height: 1.42857143;
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: 4px;
- -webkit-transition: all .2s ease-in-out;
- -o-transition: all .2s ease-in-out;
- transition: all .2s ease-in-out;
-}
-.img-circle {
- border-radius: 50%;
-}
-hr {
- margin-top: 20px;
- margin-bottom: 20px;
- border: 0;
- border-top: 1px solid #eee;
-}
-.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
-}
-.sr-only-focusable:active,
-.sr-only-focusable:focus {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip: auto;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
- font-family: inherit;
- font-weight: 500;
- line-height: 1.1;
- color: inherit;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small,
-.h1 small,
-.h2 small,
-.h3 small,
-.h4 small,
-.h5 small,
-.h6 small,
-h1 .small,
-h2 .small,
-h3 .small,
-h4 .small,
-h5 .small,
-h6 .small,
-.h1 .small,
-.h2 .small,
-.h3 .small,
-.h4 .small,
-.h5 .small,
-.h6 .small {
- font-weight: normal;
- line-height: 1;
- color: #777;
-}
-h1,
-.h1,
-h2,
-.h2,
-h3,
-.h3 {
- margin-top: 20px;
- margin-bottom: 10px;
-}
-h1 small,
-.h1 small,
-h2 small,
-.h2 small,
-h3 small,
-.h3 small,
-h1 .small,
-.h1 .small,
-h2 .small,
-.h2 .small,
-h3 .small,
-.h3 .small {
- font-size: 65%;
-}
-h4,
-.h4,
-h5,
-.h5,
-h6,
-.h6 {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-h4 small,
-.h4 small,
-h5 small,
-.h5 small,
-h6 small,
-.h6 small,
-h4 .small,
-.h4 .small,
-h5 .small,
-.h5 .small,
-h6 .small,
-.h6 .small {
- font-size: 75%;
-}
-h1,
-.h1 {
- font-size: 36px;
-}
-h2,
-.h2 {
- font-size: 30px;
-}
-h3,
-.h3 {
- font-size: 24px;
-}
-h4,
-.h4 {
- font-size: 18px;
-}
-h5,
-.h5 {
- font-size: 14px;
-}
-h6,
-.h6 {
- font-size: 12px;
-}
-p {
- margin: 0 0 10px;
-}
-.lead {
- margin-bottom: 20px;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.4;
-}
-@media (min-width: 768px) {
- .lead {
- font-size: 21px;
- }
-}
-small,
-.small {
- font-size: 85%;
-}
-mark,
-.mark {
- padding: .2em;
- background-color: #fcf8e3;
-}
-.text-left {
- text-align: left;
-}
-.text-right {
- text-align: right;
-}
-.text-center {
- text-align: center;
-}
-.text-justify {
- text-align: justify;
-}
-.text-nowrap {
- white-space: nowrap;
-}
-.text-lowercase {
- text-transform: lowercase;
-}
-.text-uppercase {
- text-transform: uppercase;
-}
-.text-capitalize {
- text-transform: capitalize;
-}
-.text-muted {
- color: #777;
-}
-.text-primary {
- color: #337ab7;
-}
-a.text-primary:hover {
- color: #286090;
-}
-.text-success {
- color: #3c763d;
-}
-a.text-success:hover {
- color: #2b542c;
-}
-.text-info {
- color: #31708f;
-}
-a.text-info:hover {
- color: #245269;
-}
-.text-warning {
- color: #8a6d3b;
-}
-a.text-warning:hover {
- color: #66512c;
-}
-.text-danger {
- color: #a94442;
-}
-a.text-danger:hover {
- color: #843534;
-}
-.bg-primary {
- color: #fff;
- background-color: #337ab7;
-}
-a.bg-primary:hover {
- background-color: #286090;
-}
-.bg-success {
- background-color: #dff0d8;
-}
-a.bg-success:hover {
- background-color: #c1e2b3;
-}
-.bg-info {
- background-color: #d9edf7;
-}
-a.bg-info:hover {
- background-color: #afd9ee;
-}
-.bg-warning {
- background-color: #fcf8e3;
-}
-a.bg-warning:hover {
- background-color: #f7ecb5;
-}
-.bg-danger {
- background-color: #f2dede;
-}
-a.bg-danger:hover {
- background-color: #e4b9b9;
-}
-.page-header {
- padding-bottom: 9px;
- margin: 40px 0 20px;
- border-bottom: 1px solid #eee;
-}
-ul,
-ol {
- margin-top: 0;
- margin-bottom: 10px;
-}
-ul ul,
-ol ul,
-ul ol,
-ol ol {
- margin-bottom: 0;
-}
-.list-unstyled {
- padding-left: 0;
- list-style: none;
-}
-.list-inline {
- padding-left: 0;
- margin-left: -5px;
- list-style: none;
-}
-.list-inline > li {
- display: inline-block;
- padding-right: 5px;
- padding-left: 5px;
-}
-dl {
- margin-top: 0;
- margin-bottom: 20px;
-}
-dt,
-dd {
- line-height: 1.42857143;
-}
-dt {
- font-weight: bold;
-}
-dd {
- margin-left: 0;
-}
-@media (min-width: 768px) {
- .dl-horizontal dt {
- float: left;
- width: 160px;
- overflow: hidden;
- clear: left;
- text-align: right;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .dl-horizontal dd {
- margin-left: 180px;
- }
-}
-abbr[title],
-abbr[data-original-title] {
- cursor: help;
- border-bottom: 1px dotted #777;
-}
-.initialism {
- font-size: 90%;
- text-transform: uppercase;
-}
-blockquote {
- padding: 10px 20px;
- margin: 0 0 20px;
- font-size: 17.5px;
- border-left: 5px solid #eee;
-}
-blockquote p:last-child,
-blockquote ul:last-child,
-blockquote ol:last-child {
- margin-bottom: 0;
-}
-blockquote footer,
-blockquote small,
-blockquote .small {
- display: block;
- font-size: 80%;
- line-height: 1.42857143;
- color: #777;
-}
-blockquote footer:before,
-blockquote small:before,
-blockquote .small:before {
- content: '\2014 \00A0';
-}
-.blockquote-reverse,
-blockquote.pull-right {
- padding-right: 15px;
- padding-left: 0;
- text-align: right;
- border-right: 5px solid #eee;
- border-left: 0;
-}
-.blockquote-reverse footer:before,
-blockquote.pull-right footer:before,
-.blockquote-reverse small:before,
-blockquote.pull-right small:before,
-.blockquote-reverse .small:before,
-blockquote.pull-right .small:before {
- content: '';
-}
-.blockquote-reverse footer:after,
-blockquote.pull-right footer:after,
-.blockquote-reverse small:after,
-blockquote.pull-right small:after,
-.blockquote-reverse .small:after,
-blockquote.pull-right .small:after {
- content: '\00A0 \2014';
-}
-address {
- margin-bottom: 20px;
- font-style: normal;
- line-height: 1.42857143;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
-}
-code {
- padding: 2px 4px;
- font-size: 90%;
- color: #c7254e;
- background-color: #f9f2f4;
- border-radius: 4px;
-}
-kbd {
- padding: 2px 4px;
- font-size: 90%;
- color: #fff;
- background-color: #333;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
-}
-kbd kbd {
- padding: 0;
- font-size: 100%;
- font-weight: bold;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-pre {
- display: block;
- padding: 9.5px;
- margin: 0 0 10px;
- font-size: 13px;
- line-height: 1.42857143;
- color: #333;
- word-break: break-all;
- word-wrap: break-word;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- border-radius: 4px;
-}
-pre code {
- padding: 0;
- font-size: inherit;
- color: inherit;
- white-space: pre-wrap;
- background-color: transparent;
- border-radius: 0;
-}
-.pre-scrollable {
- max-height: 340px;
- overflow-y: scroll;
-}
-.container {
- padding-right: 15px;
- padding-left: 15px;
- margin-right: auto;
- margin-left: auto;
-}
-@media (min-width: 768px) {
- .container {
- width: 750px;
- }
-}
-@media (min-width: 992px) {
- .container {
- width: 970px;
- }
-}
-@media (min-width: 1200px) {
- .container {
- width: 1170px;
- }
-}
-.container-fluid {
- padding-right: 15px;
- padding-left: 15px;
- margin-right: auto;
- margin-left: auto;
-}
-.row {
- margin-right: -15px;
- margin-left: -15px;
-}
-.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
- position: relative;
- min-height: 1px;
- padding-right: 15px;
- padding-left: 15px;
-}
-.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
- float: left;
-}
-.col-xs-12 {
- width: 100%;
-}
-.col-xs-11 {
- width: 91.66666667%;
-}
-.col-xs-10 {
- width: 83.33333333%;
-}
-.col-xs-9 {
- width: 75%;
-}
-.col-xs-8 {
- width: 66.66666667%;
-}
-.col-xs-7 {
- width: 58.33333333%;
-}
-.col-xs-6 {
- width: 50%;
-}
-.col-xs-5 {
- width: 41.66666667%;
-}
-.col-xs-4 {
- width: 33.33333333%;
-}
-.col-xs-3 {
- width: 25%;
-}
-.col-xs-2 {
- width: 16.66666667%;
-}
-.col-xs-1 {
- width: 8.33333333%;
-}
-.col-xs-pull-12 {
- right: 100%;
-}
-.col-xs-pull-11 {
- right: 91.66666667%;
-}
-.col-xs-pull-10 {
- right: 83.33333333%;
-}
-.col-xs-pull-9 {
- right: 75%;
-}
-.col-xs-pull-8 {
- right: 66.66666667%;
-}
-.col-xs-pull-7 {
- right: 58.33333333%;
-}
-.col-xs-pull-6 {
- right: 50%;
-}
-.col-xs-pull-5 {
- right: 41.66666667%;
-}
-.col-xs-pull-4 {
- right: 33.33333333%;
-}
-.col-xs-pull-3 {
- right: 25%;
-}
-.col-xs-pull-2 {
- right: 16.66666667%;
-}
-.col-xs-pull-1 {
- right: 8.33333333%;
-}
-.col-xs-pull-0 {
- right: auto;
-}
-.col-xs-push-12 {
- left: 100%;
-}
-.col-xs-push-11 {
- left: 91.66666667%;
-}
-.col-xs-push-10 {
- left: 83.33333333%;
-}
-.col-xs-push-9 {
- left: 75%;
-}
-.col-xs-push-8 {
- left: 66.66666667%;
-}
-.col-xs-push-7 {
- left: 58.33333333%;
-}
-.col-xs-push-6 {
- left: 50%;
-}
-.col-xs-push-5 {
- left: 41.66666667%;
-}
-.col-xs-push-4 {
- left: 33.33333333%;
-}
-.col-xs-push-3 {
- left: 25%;
-}
-.col-xs-push-2 {
- left: 16.66666667%;
-}
-.col-xs-push-1 {
- left: 8.33333333%;
-}
-.col-xs-push-0 {
- left: auto;
-}
-.col-xs-offset-12 {
- margin-left: 100%;
-}
-.col-xs-offset-11 {
- margin-left: 91.66666667%;
-}
-.col-xs-offset-10 {
- margin-left: 83.33333333%;
-}
-.col-xs-offset-9 {
- margin-left: 75%;
-}
-.col-xs-offset-8 {
- margin-left: 66.66666667%;
-}
-.col-xs-offset-7 {
- margin-left: 58.33333333%;
-}
-.col-xs-offset-6 {
- margin-left: 50%;
-}
-.col-xs-offset-5 {
- margin-left: 41.66666667%;
-}
-.col-xs-offset-4 {
- margin-left: 33.33333333%;
-}
-.col-xs-offset-3 {
- margin-left: 25%;
-}
-.col-xs-offset-2 {
- margin-left: 16.66666667%;
-}
-.col-xs-offset-1 {
- margin-left: 8.33333333%;
-}
-.col-xs-offset-0 {
- margin-left: 0;
-}
-@media (min-width: 768px) {
- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
- float: left;
- }
- .col-sm-12 {
- width: 100%;
- }
- .col-sm-11 {
- width: 91.66666667%;
- }
- .col-sm-10 {
- width: 83.33333333%;
- }
- .col-sm-9 {
- width: 75%;
- }
- .col-sm-8 {
- width: 66.66666667%;
- }
- .col-sm-7 {
- width: 58.33333333%;
- }
- .col-sm-6 {
- width: 50%;
- }
- .col-sm-5 {
- width: 41.66666667%;
- }
- .col-sm-4 {
- width: 33.33333333%;
- }
- .col-sm-3 {
- width: 25%;
- }
- .col-sm-2 {
- width: 16.66666667%;
- }
- .col-sm-1 {
- width: 8.33333333%;
- }
- .col-sm-pull-12 {
- right: 100%;
- }
- .col-sm-pull-11 {
- right: 91.66666667%;
- }
- .col-sm-pull-10 {
- right: 83.33333333%;
- }
- .col-sm-pull-9 {
- right: 75%;
- }
- .col-sm-pull-8 {
- right: 66.66666667%;
- }
- .col-sm-pull-7 {
- right: 58.33333333%;
- }
- .col-sm-pull-6 {
- right: 50%;
- }
- .col-sm-pull-5 {
- right: 41.66666667%;
- }
- .col-sm-pull-4 {
- right: 33.33333333%;
- }
- .col-sm-pull-3 {
- right: 25%;
- }
- .col-sm-pull-2 {
- right: 16.66666667%;
- }
- .col-sm-pull-1 {
- right: 8.33333333%;
- }
- .col-sm-pull-0 {
- right: auto;
- }
- .col-sm-push-12 {
- left: 100%;
- }
- .col-sm-push-11 {
- left: 91.66666667%;
- }
- .col-sm-push-10 {
- left: 83.33333333%;
- }
- .col-sm-push-9 {
- left: 75%;
- }
- .col-sm-push-8 {
- left: 66.66666667%;
- }
- .col-sm-push-7 {
- left: 58.33333333%;
- }
- .col-sm-push-6 {
- left: 50%;
- }
- .col-sm-push-5 {
- left: 41.66666667%;
- }
- .col-sm-push-4 {
- left: 33.33333333%;
- }
- .col-sm-push-3 {
- left: 25%;
- }
- .col-sm-push-2 {
- left: 16.66666667%;
- }
- .col-sm-push-1 {
- left: 8.33333333%;
- }
- .col-sm-push-0 {
- left: auto;
- }
- .col-sm-offset-12 {
- margin-left: 100%;
- }
- .col-sm-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-sm-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-sm-offset-9 {
- margin-left: 75%;
- }
- .col-sm-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-sm-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-sm-offset-6 {
- margin-left: 50%;
- }
- .col-sm-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-sm-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-sm-offset-3 {
- margin-left: 25%;
- }
- .col-sm-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-sm-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-sm-offset-0 {
- margin-left: 0;
- }
-}
-@media (min-width: 992px) {
- .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
- float: left;
- }
- .col-md-12 {
- width: 100%;
- }
- .col-md-11 {
- width: 91.66666667%;
- }
- .col-md-10 {
- width: 83.33333333%;
- }
- .col-md-9 {
- width: 75%;
- }
- .col-md-8 {
- width: 66.66666667%;
- }
- .col-md-7 {
- width: 58.33333333%;
- }
- .col-md-6 {
- width: 50%;
- }
- .col-md-5 {
- width: 41.66666667%;
- }
- .col-md-4 {
- width: 33.33333333%;
- }
- .col-md-3 {
- width: 25%;
- }
- .col-md-2 {
- width: 16.66666667%;
- }
- .col-md-1 {
- width: 8.33333333%;
- }
- .col-md-pull-12 {
- right: 100%;
- }
- .col-md-pull-11 {
- right: 91.66666667%;
- }
- .col-md-pull-10 {
- right: 83.33333333%;
- }
- .col-md-pull-9 {
- right: 75%;
- }
- .col-md-pull-8 {
- right: 66.66666667%;
- }
- .col-md-pull-7 {
- right: 58.33333333%;
- }
- .col-md-pull-6 {
- right: 50%;
- }
- .col-md-pull-5 {
- right: 41.66666667%;
- }
- .col-md-pull-4 {
- right: 33.33333333%;
- }
- .col-md-pull-3 {
- right: 25%;
- }
- .col-md-pull-2 {
- right: 16.66666667%;
- }
- .col-md-pull-1 {
- right: 8.33333333%;
- }
- .col-md-pull-0 {
- right: auto;
- }
- .col-md-push-12 {
- left: 100%;
- }
- .col-md-push-11 {
- left: 91.66666667%;
- }
- .col-md-push-10 {
- left: 83.33333333%;
- }
- .col-md-push-9 {
- left: 75%;
- }
- .col-md-push-8 {
- left: 66.66666667%;
- }
- .col-md-push-7 {
- left: 58.33333333%;
- }
- .col-md-push-6 {
- left: 50%;
- }
- .col-md-push-5 {
- left: 41.66666667%;
- }
- .col-md-push-4 {
- left: 33.33333333%;
- }
- .col-md-push-3 {
- left: 25%;
- }
- .col-md-push-2 {
- left: 16.66666667%;
- }
- .col-md-push-1 {
- left: 8.33333333%;
- }
- .col-md-push-0 {
- left: auto;
- }
- .col-md-offset-12 {
- margin-left: 100%;
- }
- .col-md-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-md-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-md-offset-9 {
- margin-left: 75%;
- }
- .col-md-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-md-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-md-offset-6 {
- margin-left: 50%;
- }
- .col-md-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-md-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-md-offset-3 {
- margin-left: 25%;
- }
- .col-md-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-md-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-md-offset-0 {
- margin-left: 0;
- }
-}
-@media (min-width: 1200px) {
- .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
- float: left;
- }
- .col-lg-12 {
- width: 100%;
- }
- .col-lg-11 {
- width: 91.66666667%;
- }
- .col-lg-10 {
- width: 83.33333333%;
- }
- .col-lg-9 {
- width: 75%;
- }
- .col-lg-8 {
- width: 66.66666667%;
- }
- .col-lg-7 {
- width: 58.33333333%;
- }
- .col-lg-6 {
- width: 50%;
- }
- .col-lg-5 {
- width: 41.66666667%;
- }
- .col-lg-4 {
- width: 33.33333333%;
- }
- .col-lg-3 {
- width: 25%;
- }
- .col-lg-2 {
- width: 16.66666667%;
- }
- .col-lg-1 {
- width: 8.33333333%;
- }
- .col-lg-pull-12 {
- right: 100%;
- }
- .col-lg-pull-11 {
- right: 91.66666667%;
- }
- .col-lg-pull-10 {
- right: 83.33333333%;
- }
- .col-lg-pull-9 {
- right: 75%;
- }
- .col-lg-pull-8 {
- right: 66.66666667%;
- }
- .col-lg-pull-7 {
- right: 58.33333333%;
- }
- .col-lg-pull-6 {
- right: 50%;
- }
- .col-lg-pull-5 {
- right: 41.66666667%;
- }
- .col-lg-pull-4 {
- right: 33.33333333%;
- }
- .col-lg-pull-3 {
- right: 25%;
- }
- .col-lg-pull-2 {
- right: 16.66666667%;
- }
- .col-lg-pull-1 {
- right: 8.33333333%;
- }
- .col-lg-pull-0 {
- right: auto;
- }
- .col-lg-push-12 {
- left: 100%;
- }
- .col-lg-push-11 {
- left: 91.66666667%;
- }
- .col-lg-push-10 {
- left: 83.33333333%;
- }
- .col-lg-push-9 {
- left: 75%;
- }
- .col-lg-push-8 {
- left: 66.66666667%;
- }
- .col-lg-push-7 {
- left: 58.33333333%;
- }
- .col-lg-push-6 {
- left: 50%;
- }
- .col-lg-push-5 {
- left: 41.66666667%;
- }
- .col-lg-push-4 {
- left: 33.33333333%;
- }
- .col-lg-push-3 {
- left: 25%;
- }
- .col-lg-push-2 {
- left: 16.66666667%;
- }
- .col-lg-push-1 {
- left: 8.33333333%;
- }
- .col-lg-push-0 {
- left: auto;
- }
- .col-lg-offset-12 {
- margin-left: 100%;
- }
- .col-lg-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-lg-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-lg-offset-9 {
- margin-left: 75%;
- }
- .col-lg-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-lg-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-lg-offset-6 {
- margin-left: 50%;
- }
- .col-lg-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-lg-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-lg-offset-3 {
- margin-left: 25%;
- }
- .col-lg-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-lg-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-lg-offset-0 {
- margin-left: 0;
- }
-}
-table {
- background-color: transparent;
-}
-caption {
- padding-top: 8px;
- padding-bottom: 8px;
- color: #777;
- text-align: left;
-}
-th {
- text-align: left;
-}
-.table {
- width: 100%;
- max-width: 100%;
- margin-bottom: 20px;
-}
-.table > thead > tr > th,
-.table > tbody > tr > th,
-.table > tfoot > tr > th,
-.table > thead > tr > td,
-.table > tbody > tr > td,
-.table > tfoot > tr > td {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: top;
- border-top: 1px solid #ddd;
-}
-.table > thead > tr > th {
- vertical-align: bottom;
- border-bottom: 2px solid #ddd;
-}
-.table > caption + thead > tr:first-child > th,
-.table > colgroup + thead > tr:first-child > th,
-.table > thead:first-child > tr:first-child > th,
-.table > caption + thead > tr:first-child > td,
-.table > colgroup + thead > tr:first-child > td,
-.table > thead:first-child > tr:first-child > td {
- border-top: 0;
-}
-.table > tbody + tbody {
- border-top: 2px solid #ddd;
-}
-.table .table {
- background-color: #fff;
-}
-.table-condensed > thead > tr > th,
-.table-condensed > tbody > tr > th,
-.table-condensed > tfoot > tr > th,
-.table-condensed > thead > tr > td,
-.table-condensed > tbody > tr > td,
-.table-condensed > tfoot > tr > td {
- padding: 5px;
-}
-.table-bordered {
- border: 1px solid #ddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > tbody > tr > th,
-.table-bordered > tfoot > tr > th,
-.table-bordered > thead > tr > td,
-.table-bordered > tbody > tr > td,
-.table-bordered > tfoot > tr > td {
- border: 1px solid #ddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > thead > tr > td {
- border-bottom-width: 2px;
-}
-.table-striped > tbody > tr:nth-child(odd) {
- background-color: #f9f9f9;
-}
-.table-hover > tbody > tr:hover {
- background-color: #f5f5f5;
-}
-table col[class*="col-"] {
- position: static;
- display: table-column;
- float: none;
-}
-table td[class*="col-"],
-table th[class*="col-"] {
- position: static;
- display: table-cell;
- float: none;
-}
-.table > thead > tr > td.active,
-.table > tbody > tr > td.active,
-.table > tfoot > tr > td.active,
-.table > thead > tr > th.active,
-.table > tbody > tr > th.active,
-.table > tfoot > tr > th.active,
-.table > thead > tr.active > td,
-.table > tbody > tr.active > td,
-.table > tfoot > tr.active > td,
-.table > thead > tr.active > th,
-.table > tbody > tr.active > th,
-.table > tfoot > tr.active > th {
- background-color: #f5f5f5;
-}
-.table-hover > tbody > tr > td.active:hover,
-.table-hover > tbody > tr > th.active:hover,
-.table-hover > tbody > tr.active:hover > td,
-.table-hover > tbody > tr:hover > .active,
-.table-hover > tbody > tr.active:hover > th {
- background-color: #e8e8e8;
-}
-.table > thead > tr > td.success,
-.table > tbody > tr > td.success,
-.table > tfoot > tr > td.success,
-.table > thead > tr > th.success,
-.table > tbody > tr > th.success,
-.table > tfoot > tr > th.success,
-.table > thead > tr.success > td,
-.table > tbody > tr.success > td,
-.table > tfoot > tr.success > td,
-.table > thead > tr.success > th,
-.table > tbody > tr.success > th,
-.table > tfoot > tr.success > th {
- background-color: #dff0d8;
-}
-.table-hover > tbody > tr > td.success:hover,
-.table-hover > tbody > tr > th.success:hover,
-.table-hover > tbody > tr.success:hover > td,
-.table-hover > tbody > tr:hover > .success,
-.table-hover > tbody > tr.success:hover > th {
- background-color: #d0e9c6;
-}
-.table > thead > tr > td.info,
-.table > tbody > tr > td.info,
-.table > tfoot > tr > td.info,
-.table > thead > tr > th.info,
-.table > tbody > tr > th.info,
-.table > tfoot > tr > th.info,
-.table > thead > tr.info > td,
-.table > tbody > tr.info > td,
-.table > tfoot > tr.info > td,
-.table > thead > tr.info > th,
-.table > tbody > tr.info > th,
-.table > tfoot > tr.info > th {
- background-color: #d9edf7;
-}
-.table-hover > tbody > tr > td.info:hover,
-.table-hover > tbody > tr > th.info:hover,
-.table-hover > tbody > tr.info:hover > td,
-.table-hover > tbody > tr:hover > .info,
-.table-hover > tbody > tr.info:hover > th {
- background-color: #c4e3f3;
-}
-.table > thead > tr > td.warning,
-.table > tbody > tr > td.warning,
-.table > tfoot > tr > td.warning,
-.table > thead > tr > th.warning,
-.table > tbody > tr > th.warning,
-.table > tfoot > tr > th.warning,
-.table > thead > tr.warning > td,
-.table > tbody > tr.warning > td,
-.table > tfoot > tr.warning > td,
-.table > thead > tr.warning > th,
-.table > tbody > tr.warning > th,
-.table > tfoot > tr.warning > th {
- background-color: #fcf8e3;
-}
-.table-hover > tbody > tr > td.warning:hover,
-.table-hover > tbody > tr > th.warning:hover,
-.table-hover > tbody > tr.warning:hover > td,
-.table-hover > tbody > tr:hover > .warning,
-.table-hover > tbody > tr.warning:hover > th {
- background-color: #faf2cc;
-}
-.table > thead > tr > td.danger,
-.table > tbody > tr > td.danger,
-.table > tfoot > tr > td.danger,
-.table > thead > tr > th.danger,
-.table > tbody > tr > th.danger,
-.table > tfoot > tr > th.danger,
-.table > thead > tr.danger > td,
-.table > tbody > tr.danger > td,
-.table > tfoot > tr.danger > td,
-.table > thead > tr.danger > th,
-.table > tbody > tr.danger > th,
-.table > tfoot > tr.danger > th {
- background-color: #f2dede;
-}
-.table-hover > tbody > tr > td.danger:hover,
-.table-hover > tbody > tr > th.danger:hover,
-.table-hover > tbody > tr.danger:hover > td,
-.table-hover > tbody > tr:hover > .danger,
-.table-hover > tbody > tr.danger:hover > th {
- background-color: #ebcccc;
-}
-.table-responsive {
- min-height: .01%;
- overflow-x: auto;
-}
-@media screen and (max-width: 767px) {
- .table-responsive {
- width: 100%;
- margin-bottom: 15px;
- overflow-y: hidden;
- -ms-overflow-style: -ms-autohiding-scrollbar;
- border: 1px solid #ddd;
- }
- .table-responsive > .table {
- margin-bottom: 0;
- }
- .table-responsive > .table > thead > tr > th,
- .table-responsive > .table > tbody > tr > th,
- .table-responsive > .table > tfoot > tr > th,
- .table-responsive > .table > thead > tr > td,
- .table-responsive > .table > tbody > tr > td,
- .table-responsive > .table > tfoot > tr > td {
- white-space: nowrap;
- }
- .table-responsive > .table-bordered {
- border: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:first-child,
- .table-responsive > .table-bordered > tbody > tr > th:first-child,
- .table-responsive > .table-bordered > tfoot > tr > th:first-child,
- .table-responsive > .table-bordered > thead > tr > td:first-child,
- .table-responsive > .table-bordered > tbody > tr > td:first-child,
- .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:last-child,
- .table-responsive > .table-bordered > tbody > tr > th:last-child,
- .table-responsive > .table-bordered > tfoot > tr > th:last-child,
- .table-responsive > .table-bordered > thead > tr > td:last-child,
- .table-responsive > .table-bordered > tbody > tr > td:last-child,
- .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
- }
- .table-responsive > .table-bordered > tbody > tr:last-child > th,
- .table-responsive > .table-bordered > tfoot > tr:last-child > th,
- .table-responsive > .table-bordered > tbody > tr:last-child > td,
- .table-responsive > .table-bordered > tfoot > tr:last-child > td {
- border-bottom: 0;
- }
-}
-fieldset {
- min-width: 0;
- padding: 0;
- margin: 0;
- border: 0;
-}
-legend {
- display: block;
- width: 100%;
- padding: 0;
- margin-bottom: 20px;
- font-size: 21px;
- line-height: inherit;
- color: #333;
- border: 0;
- border-bottom: 1px solid #e5e5e5;
-}
-label {
- display: inline-block;
- max-width: 100%;
- margin-bottom: 5px;
- font-weight: bold;
-}
-input[type="search"] {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-input[type="radio"],
-input[type="checkbox"] {
- margin: 4px 0 0;
- margin-top: 1px \9;
- line-height: normal;
-}
-input[type="file"] {
- display: block;
-}
-input[type="range"] {
- display: block;
- width: 100%;
-}
-select[multiple],
-select[size] {
- height: auto;
-}
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-output {
- display: block;
- padding-top: 7px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
-}
-.form-control {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-}
-.form-control:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
-}
-.form-control::-moz-placeholder {
- color: #999;
- opacity: 1;
-}
-.form-control:-ms-input-placeholder {
- color: #999;
-}
-.form-control::-webkit-input-placeholder {
- color: #999;
-}
-.form-control[disabled],
-.form-control[readonly],
-fieldset[disabled] .form-control {
- cursor: not-allowed;
- background-color: #eee;
- opacity: 1;
-}
-textarea.form-control {
- height: auto;
-}
-input[type="search"] {
- -webkit-appearance: none;
-}
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
- input[type="date"],
- input[type="time"],
- input[type="datetime-local"],
- input[type="month"] {
- line-height: 34px;
- }
- input[type="date"].input-sm,
- input[type="time"].input-sm,
- input[type="datetime-local"].input-sm,
- input[type="month"].input-sm {
- line-height: 30px;
- }
- input[type="date"].input-lg,
- input[type="time"].input-lg,
- input[type="datetime-local"].input-lg,
- input[type="month"].input-lg {
- line-height: 46px;
- }
-}
-.form-group {
- margin-bottom: 15px;
-}
-.radio,
-.checkbox {
- position: relative;
- display: block;
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.radio label,
-.checkbox label {
- min-height: 20px;
- padding-left: 20px;
- margin-bottom: 0;
- font-weight: normal;
- cursor: pointer;
-}
-.radio input[type="radio"],
-.radio-inline input[type="radio"],
-.checkbox input[type="checkbox"],
-.checkbox-inline input[type="checkbox"] {
- position: absolute;
- margin-top: 4px \9;
- margin-left: -20px;
-}
-.radio + .radio,
-.checkbox + .checkbox {
- margin-top: -5px;
-}
-.radio-inline,
-.checkbox-inline {
- display: inline-block;
- padding-left: 20px;
- margin-bottom: 0;
- font-weight: normal;
- vertical-align: middle;
- cursor: pointer;
-}
-.radio-inline + .radio-inline,
-.checkbox-inline + .checkbox-inline {
- margin-top: 0;
- margin-left: 10px;
-}
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-input[type="radio"].disabled,
-input[type="checkbox"].disabled,
-fieldset[disabled] input[type="radio"],
-fieldset[disabled] input[type="checkbox"] {
- cursor: not-allowed;
-}
-.radio-inline.disabled,
-.checkbox-inline.disabled,
-fieldset[disabled] .radio-inline,
-fieldset[disabled] .checkbox-inline {
- cursor: not-allowed;
-}
-.radio.disabled label,
-.checkbox.disabled label,
-fieldset[disabled] .radio label,
-fieldset[disabled] .checkbox label {
- cursor: not-allowed;
-}
-.form-control-static {
- padding-top: 7px;
- padding-bottom: 7px;
- margin-bottom: 0;
-}
-.form-control-static.input-lg,
-.form-control-static.input-sm {
- padding-right: 0;
- padding-left: 0;
-}
-.input-sm,
-.form-group-sm .form-control {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-sm,
-select.form-group-sm .form-control {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-sm,
-textarea.form-group-sm .form-control,
-select[multiple].input-sm,
-select[multiple].form-group-sm .form-control {
- height: auto;
-}
-.input-lg,
-.form-group-lg .form-control {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.33;
- border-radius: 6px;
-}
-select.input-lg,
-select.form-group-lg .form-control {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-lg,
-textarea.form-group-lg .form-control,
-select[multiple].input-lg,
-select[multiple].form-group-lg .form-control {
- height: auto;
-}
-.has-feedback {
- position: relative;
-}
-.has-feedback .form-control {
- padding-right: 42.5px;
-}
-.form-control-feedback {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 2;
- display: block;
- width: 34px;
- height: 34px;
- line-height: 34px;
- text-align: center;
- pointer-events: none;
-}
-.input-lg + .form-control-feedback {
- width: 46px;
- height: 46px;
- line-height: 46px;
-}
-.input-sm + .form-control-feedback {
- width: 30px;
- height: 30px;
- line-height: 30px;
-}
-.has-success .help-block,
-.has-success .control-label,
-.has-success .radio,
-.has-success .checkbox,
-.has-success .radio-inline,
-.has-success .checkbox-inline,
-.has-success.radio label,
-.has-success.checkbox label,
-.has-success.radio-inline label,
-.has-success.checkbox-inline label {
- color: #3c763d;
-}
-.has-success .form-control {
- border-color: #3c763d;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-success .form-control:focus {
- border-color: #2b542c;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
-}
-.has-success .input-group-addon {
- color: #3c763d;
- background-color: #dff0d8;
- border-color: #3c763d;
-}
-.has-success .form-control-feedback {
- color: #3c763d;
-}
-.has-warning .help-block,
-.has-warning .control-label,
-.has-warning .radio,
-.has-warning .checkbox,
-.has-warning .radio-inline,
-.has-warning .checkbox-inline,
-.has-warning.radio label,
-.has-warning.checkbox label,
-.has-warning.radio-inline label,
-.has-warning.checkbox-inline label {
- color: #8a6d3b;
-}
-.has-warning .form-control {
- border-color: #8a6d3b;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-warning .form-control:focus {
- border-color: #66512c;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
-}
-.has-warning .input-group-addon {
- color: #8a6d3b;
- background-color: #fcf8e3;
- border-color: #8a6d3b;
-}
-.has-warning .form-control-feedback {
- color: #8a6d3b;
-}
-.has-error .help-block,
-.has-error .control-label,
-.has-error .radio,
-.has-error .checkbox,
-.has-error .radio-inline,
-.has-error .checkbox-inline,
-.has-error.radio label,
-.has-error.checkbox label,
-.has-error.radio-inline label,
-.has-error.checkbox-inline label {
- color: #a94442;
-}
-.has-error .form-control {
- border-color: #a94442;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-error .form-control:focus {
- border-color: #843534;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
-}
-.has-error .input-group-addon {
- color: #a94442;
- background-color: #f2dede;
- border-color: #a94442;
-}
-.has-error .form-control-feedback {
- color: #a94442;
-}
-.has-feedback label ~ .form-control-feedback {
- top: 25px;
-}
-.has-feedback label.sr-only ~ .form-control-feedback {
- top: 0;
-}
-.help-block {
- display: block;
- margin-top: 5px;
- margin-bottom: 10px;
- color: #737373;
-}
-@media (min-width: 768px) {
- .form-inline .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .form-inline .form-control-static {
- display: inline-block;
- }
- .form-inline .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .form-inline .input-group .input-group-addon,
- .form-inline .input-group .input-group-btn,
- .form-inline .input-group .form-control {
- width: auto;
- }
- .form-inline .input-group > .form-control {
- width: 100%;
- }
- .form-inline .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio,
- .form-inline .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio label,
- .form-inline .checkbox label {
- padding-left: 0;
- }
- .form-inline .radio input[type="radio"],
- .form-inline .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .form-inline .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
- padding-top: 7px;
- margin-top: 0;
- margin-bottom: 0;
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox {
- min-height: 27px;
-}
-.form-horizontal .form-group {
- margin-right: -15px;
- margin-left: -15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .control-label {
- padding-top: 7px;
- margin-bottom: 0;
- text-align: right;
- }
-}
-.form-horizontal .has-feedback .form-control-feedback {
- right: 15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-lg .control-label {
- padding-top: 14.3px;
- }
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-sm .control-label {
- padding-top: 6px;
- }
-}
-.btn {
- display: inline-block;
- padding: 6px 12px;
- margin-bottom: 0;
- font-size: 14px;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus,
-.btn.focus,
-.btn:active.focus,
-.btn.active.focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.btn:hover,
-.btn:focus,
-.btn.focus {
- color: #333;
- text-decoration: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
- outline: 0;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
- pointer-events: none;
- cursor: not-allowed;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
- opacity: .65;
-}
-.btn-default {
- color: #333;
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default:hover,
-.btn-default:focus,
-.btn-default.focus,
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- color: #333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- background-image: none;
-}
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default .badge {
- color: #fff;
- background-color: #333;
-}
-.btn-primary {
- color: #fff;
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary:hover,
-.btn-primary:focus,
-.btn-primary.focus,
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- color: #fff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- background-image: none;
-}
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary .badge {
- color: #337ab7;
- background-color: #fff;
-}
-.btn-success {
- color: #fff;
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success:hover,
-.btn-success:focus,
-.btn-success.focus,
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- color: #fff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- background-image: none;
-}
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success .badge {
- color: #5cb85c;
- background-color: #fff;
-}
-.btn-info {
- color: #fff;
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info:hover,
-.btn-info:focus,
-.btn-info.focus,
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- color: #fff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- background-image: none;
-}
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info .badge {
- color: #5bc0de;
- background-color: #fff;
-}
-.btn-warning {
- color: #fff;
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning:hover,
-.btn-warning:focus,
-.btn-warning.focus,
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- color: #fff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- background-image: none;
-}
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning .badge {
- color: #f0ad4e;
- background-color: #fff;
-}
-.btn-danger {
- color: #fff;
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger:hover,
-.btn-danger:focus,
-.btn-danger.focus,
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- color: #fff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- background-image: none;
-}
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger .badge {
- color: #d9534f;
- background-color: #fff;
-}
-.btn-link {
- font-weight: normal;
- color: #337ab7;
- border-radius: 0;
-}
-.btn-link,
-.btn-link:active,
-.btn-link.active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
- background-color: transparent;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn-link,
-.btn-link:hover,
-.btn-link:focus,
-.btn-link:active {
- border-color: transparent;
-}
-.btn-link:hover,
-.btn-link:focus {
- color: #23527c;
- text-decoration: underline;
- background-color: transparent;
-}
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover,
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
- color: #777;
- text-decoration: none;
-}
-.btn-lg,
-.btn-group-lg > .btn {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.33;
- border-radius: 6px;
-}
-.btn-sm,
-.btn-group-sm > .btn {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-xs,
-.btn-group-xs > .btn {
- padding: 1px 5px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-block {
- display: block;
- width: 100%;
-}
-.btn-block + .btn-block {
- margin-top: 5px;
-}
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
- width: 100%;
-}
-.fade {
- opacity: 0;
- -webkit-transition: opacity .15s linear;
- -o-transition: opacity .15s linear;
- transition: opacity .15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.collapse {
- display: none;
- visibility: hidden;
-}
-.collapse.in {
- display: block;
- visibility: visible;
-}
-tr.collapse.in {
- display: table-row;
-}
-tbody.collapse.in {
- display: table-row-group;
-}
-.collapsing {
- position: relative;
- height: 0;
- overflow: hidden;
- -webkit-transition-timing-function: ease;
- -o-transition-timing-function: ease;
- transition-timing-function: ease;
- -webkit-transition-duration: .35s;
- -o-transition-duration: .35s;
- transition-duration: .35s;
- -webkit-transition-property: height, visibility;
- -o-transition-property: height, visibility;
- transition-property: height, visibility;
-}
-.caret {
- display: inline-block;
- width: 0;
- height: 0;
- margin-left: 2px;
- vertical-align: middle;
- border-top: 4px solid;
- border-right: 4px solid transparent;
- border-left: 4px solid transparent;
-}
-.dropdown {
- position: relative;
-}
-.dropdown-toggle:focus {
- outline: 0;
-}
-.dropdown-menu {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- display: none;
- float: left;
- min-width: 160px;
- padding: 5px 0;
- margin: 2px 0 0;
- font-size: 14px;
- text-align: left;
- list-style: none;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, .15);
- border-radius: 4px;
- -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
- box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
-}
-.dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu .divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.dropdown-menu > li > a {
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 1.42857143;
- color: #333;
- white-space: nowrap;
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- color: #262626;
- text-decoration: none;
- background-color: #f5f5f5;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- color: #fff;
- text-decoration: none;
- background-color: #337ab7;
- outline: 0;
-}
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: #777;
-}
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- text-decoration: none;
- cursor: not-allowed;
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-}
-.open > .dropdown-menu {
- display: block;
-}
-.open > a {
- outline: 0;
-}
-.dropdown-menu-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu-left {
- right: auto;
- left: 0;
-}
-.dropdown-header {
- display: block;
- padding: 3px 20px;
- font-size: 12px;
- line-height: 1.42857143;
- color: #777;
- white-space: nowrap;
-}
-.dropdown-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 990;
-}
-.pull-right > .dropdown-menu {
- right: 0;
- left: auto;
-}
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
- content: "";
- border-top: 0;
- border-bottom: 4px solid;
-}
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto;
- bottom: 100%;
- margin-bottom: 1px;
-}
-@media (min-width: 768px) {
- .navbar-right .dropdown-menu {
- right: 0;
- left: auto;
- }
- .navbar-right .dropdown-menu-left {
- right: auto;
- left: 0;
- }
-}
-.btn-group,
-.btn-group-vertical {
- position: relative;
- display: inline-block;
- vertical-align: middle;
-}
-.btn-group > .btn,
-.btn-group-vertical > .btn {
- position: relative;
- float: left;
-}
-.btn-group > .btn:hover,
-.btn-group-vertical > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group-vertical > .btn:focus,
-.btn-group > .btn:active,
-.btn-group-vertical > .btn:active,
-.btn-group > .btn.active,
-.btn-group-vertical > .btn.active {
- z-index: 2;
-}
-.btn-group .btn + .btn,
-.btn-group .btn + .btn-group,
-.btn-group .btn-group + .btn,
-.btn-group .btn-group + .btn-group {
- margin-left: -1px;
-}
-.btn-toolbar {
- margin-left: -5px;
-}
-.btn-toolbar .btn-group,
-.btn-toolbar .input-group {
- float: left;
-}
-.btn-toolbar > .btn,
-.btn-toolbar > .btn-group,
-.btn-toolbar > .input-group {
- margin-left: 5px;
-}
-.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
- border-radius: 0;
-}
-.btn-group > .btn:first-child {
- margin-left: 0;
-}
-.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.btn-group > .btn:last-child:not(:first-child),
-.btn-group > .dropdown-toggle:not(:first-child) {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group > .btn-group {
- float: left;
-}
-.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group > .btn-group:first-child > .btn:last-child,
-.btn-group > .btn-group:first-child > .dropdown-toggle {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.btn-group > .btn-group:last-child > .btn:first-child {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
- outline: 0;
-}
-.btn-group > .btn + .dropdown-toggle {
- padding-right: 8px;
- padding-left: 8px;
-}
-.btn-group > .btn-lg + .dropdown-toggle {
- padding-right: 12px;
- padding-left: 12px;
-}
-.btn-group.open .dropdown-toggle {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn-group.open .dropdown-toggle.btn-link {
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn .caret {
- margin-left: 0;
-}
-.btn-lg .caret {
- border-width: 5px 5px 0;
- border-bottom-width: 0;
-}
-.dropup .btn-lg .caret {
- border-width: 0 5px 5px;
-}
-.btn-group-vertical > .btn,
-.btn-group-vertical > .btn-group,
-.btn-group-vertical > .btn-group > .btn {
- display: block;
- float: none;
- width: 100%;
- max-width: 100%;
-}
-.btn-group-vertical > .btn-group > .btn {
- float: none;
-}
-.btn-group-vertical > .btn + .btn,
-.btn-group-vertical > .btn + .btn-group,
-.btn-group-vertical > .btn-group + .btn,
-.btn-group-vertical > .btn-group + .btn-group {
- margin-top: -1px;
- margin-left: 0;
-}
-.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.btn-group-vertical > .btn:first-child:not(:last-child) {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn:last-child:not(:first-child) {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-left-radius: 4px;
-}
-.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.btn-group-justified {
- display: table;
- width: 100%;
- table-layout: fixed;
- border-collapse: separate;
-}
-.btn-group-justified > .btn,
-.btn-group-justified > .btn-group {
- display: table-cell;
- float: none;
- width: 1%;
-}
-.btn-group-justified > .btn-group .btn {
- width: 100%;
-}
-.btn-group-justified > .btn-group .dropdown-menu {
- left: auto;
-}
-[data-toggle="buttons"] > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn input[type="checkbox"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- pointer-events: none;
-}
-.input-group {
- position: relative;
- display: table;
- border-collapse: separate;
-}
-.input-group[class*="col-"] {
- float: none;
- padding-right: 0;
- padding-left: 0;
-}
-.input-group .form-control {
- position: relative;
- z-index: 2;
- float: left;
- width: 100%;
- margin-bottom: 0;
-}
-.input-group-lg > .form-control,
-.input-group-lg > .input-group-addon,
-.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.33;
- border-radius: 6px;
-}
-select.input-group-lg > .form-control,
-select.input-group-lg > .input-group-addon,
-select.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-group-lg > .form-control,
-textarea.input-group-lg > .input-group-addon,
-textarea.input-group-lg > .input-group-btn > .btn,
-select[multiple].input-group-lg > .form-control,
-select[multiple].input-group-lg > .input-group-addon,
-select[multiple].input-group-lg > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-sm > .form-control,
-.input-group-sm > .input-group-addon,
-.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-group-sm > .form-control,
-select.input-group-sm > .input-group-addon,
-select.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-group-sm > .form-control,
-textarea.input-group-sm > .input-group-addon,
-textarea.input-group-sm > .input-group-btn > .btn,
-select[multiple].input-group-sm > .form-control,
-select[multiple].input-group-sm > .input-group-addon,
-select[multiple].input-group-sm > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-addon,
-.input-group-btn,
-.input-group .form-control {
- display: table-cell;
-}
-.input-group-addon:not(:first-child):not(:last-child),
-.input-group-btn:not(:first-child):not(:last-child),
-.input-group .form-control:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.input-group-addon,
-.input-group-btn {
- width: 1%;
- white-space: nowrap;
- vertical-align: middle;
-}
-.input-group-addon {
- padding: 6px 12px;
- font-size: 14px;
- font-weight: normal;
- line-height: 1;
- color: #555;
- text-align: center;
- background-color: #eee;
- border: 1px solid #ccc;
- border-radius: 4px;
-}
-.input-group-addon.input-sm {
- padding: 5px 10px;
- font-size: 12px;
- border-radius: 3px;
-}
-.input-group-addon.input-lg {
- padding: 10px 16px;
- font-size: 18px;
- border-radius: 6px;
-}
-.input-group-addon input[type="radio"],
-.input-group-addon input[type="checkbox"] {
- margin-top: 0;
-}
-.input-group .form-control:first-child,
-.input-group-addon:first-child,
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group > .btn,
-.input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.input-group-addon:first-child {
- border-right: 0;
-}
-.input-group .form-control:last-child,
-.input-group-addon:last-child,
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group > .btn,
-.input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child),
-.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.input-group-addon:last-child {
- border-left: 0;
-}
-.input-group-btn {
- position: relative;
- font-size: 0;
- white-space: nowrap;
-}
-.input-group-btn > .btn {
- position: relative;
-}
-.input-group-btn > .btn + .btn {
- margin-left: -1px;
-}
-.input-group-btn > .btn:hover,
-.input-group-btn > .btn:focus,
-.input-group-btn > .btn:active {
- z-index: 2;
-}
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group {
- margin-right: -1px;
-}
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group {
- margin-left: -1px;
-}
-.nav {
- padding-left: 0;
- margin-bottom: 0;
- list-style: none;
-}
-.nav > li {
- position: relative;
- display: block;
-}
-.nav > li > a {
- position: relative;
- display: block;
- padding: 10px 15px;
-}
-.nav > li > a:hover,
-.nav > li > a:focus {
- text-decoration: none;
- background-color: #eee;
-}
-.nav > li.disabled > a {
- color: #777;
-}
-.nav > li.disabled > a:hover,
-.nav > li.disabled > a:focus {
- color: #777;
- text-decoration: none;
- cursor: not-allowed;
- background-color: transparent;
-}
-.nav .open > a,
-.nav .open > a:hover,
-.nav .open > a:focus {
- background-color: #eee;
- border-color: #337ab7;
-}
-.nav .nav-divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.nav > li > a > img {
- max-width: none;
-}
-.nav-tabs {
- border-bottom: 1px solid #ddd;
-}
-.nav-tabs > li {
- float: left;
- margin-bottom: -1px;
-}
-.nav-tabs > li > a {
- margin-right: 2px;
- line-height: 1.42857143;
- border: 1px solid transparent;
- border-radius: 4px 4px 0 0;
-}
-.nav-tabs > li > a:hover {
- border-color: #eee #eee #ddd;
-}
-.nav-tabs > li.active > a,
-.nav-tabs > li.active > a:hover,
-.nav-tabs > li.active > a:focus {
- color: #555;
- cursor: default;
- background-color: #fff;
- border: 1px solid #ddd;
- border-bottom-color: transparent;
-}
-.nav-tabs.nav-justified {
- width: 100%;
- border-bottom: 0;
-}
-.nav-tabs.nav-justified > li {
- float: none;
-}
-.nav-tabs.nav-justified > li > a {
- margin-bottom: 5px;
- text-align: center;
-}
-.nav-tabs.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-tabs.nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs.nav-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs.nav-justified > .active > a,
-.nav-tabs.nav-justified > .active > a:hover,
-.nav-tabs.nav-justified > .active > a:focus {
- border: 1px solid #ddd;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li > a {
- border-bottom: 1px solid #ddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs.nav-justified > .active > a,
- .nav-tabs.nav-justified > .active > a:hover,
- .nav-tabs.nav-justified > .active > a:focus {
- border-bottom-color: #fff;
- }
-}
-.nav-pills > li {
- float: left;
-}
-.nav-pills > li > a {
- border-radius: 4px;
-}
-.nav-pills > li + li {
- margin-left: 2px;
-}
-.nav-pills > li.active > a,
-.nav-pills > li.active > a:hover,
-.nav-pills > li.active > a:focus {
- color: #fff;
- background-color: #337ab7;
-}
-.nav-stacked > li {
- float: none;
-}
-.nav-stacked > li + li {
- margin-top: 2px;
- margin-left: 0;
-}
-.nav-justified {
- width: 100%;
-}
-.nav-justified > li {
- float: none;
-}
-.nav-justified > li > a {
- margin-bottom: 5px;
- text-align: center;
-}
-.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs-justified {
- border-bottom: 0;
-}
-.nav-tabs-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs-justified > .active > a,
-.nav-tabs-justified > .active > a:hover,
-.nav-tabs-justified > .active > a:focus {
- border: 1px solid #ddd;
-}
-@media (min-width: 768px) {
- .nav-tabs-justified > li > a {
- border-bottom: 1px solid #ddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs-justified > .active > a,
- .nav-tabs-justified > .active > a:hover,
- .nav-tabs-justified > .active > a:focus {
- border-bottom-color: #fff;
- }
-}
-.tab-content > .tab-pane {
- display: none;
- visibility: hidden;
-}
-.tab-content > .active {
- display: block;
- visibility: visible;
-}
-.nav-tabs .dropdown-menu {
- margin-top: -1px;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.navbar {
- position: relative;
- min-height: 50px;
- margin-bottom: 20px;
- border: 1px solid transparent;
-}
-@media (min-width: 768px) {
- .navbar {
- border-radius: 4px;
- }
-}
-@media (min-width: 768px) {
- .navbar-header {
- float: left;
- }
-}
-.navbar-collapse {
- padding-right: 15px;
- padding-left: 15px;
- overflow-x: visible;
- -webkit-overflow-scrolling: touch;
- border-top: 1px solid transparent;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
-}
-.navbar-collapse.in {
- overflow-y: auto;
-}
-@media (min-width: 768px) {
- .navbar-collapse {
- width: auto;
- border-top: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .navbar-collapse.collapse {
- display: block !important;
- height: auto !important;
- padding-bottom: 0;
- overflow: visible !important;
- visibility: visible !important;
- }
- .navbar-collapse.in {
- overflow-y: visible;
- }
- .navbar-fixed-top .navbar-collapse,
- .navbar-static-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- padding-right: 0;
- padding-left: 0;
- }
-}
-.navbar-fixed-top .navbar-collapse,
-.navbar-fixed-bottom .navbar-collapse {
- max-height: 340px;
-}
-@media (max-device-width: 480px) and (orientation: landscape) {
- .navbar-fixed-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- max-height: 200px;
- }
-}
-.container > .navbar-header,
-.container-fluid > .navbar-header,
-.container > .navbar-collapse,
-.container-fluid > .navbar-collapse {
- margin-right: -15px;
- margin-left: -15px;
-}
-@media (min-width: 768px) {
- .container > .navbar-header,
- .container-fluid > .navbar-header,
- .container > .navbar-collapse,
- .container-fluid > .navbar-collapse {
- margin-right: 0;
- margin-left: 0;
- }
-}
-.navbar-static-top {
- z-index: 1000;
- border-width: 0 0 1px;
-}
-@media (min-width: 768px) {
- .navbar-static-top {
- border-radius: 0;
- }
-}
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 1030;
-}
-@media (min-width: 768px) {
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- border-radius: 0;
- }
-}
-.navbar-fixed-top {
- top: 0;
- border-width: 0 0 1px;
-}
-.navbar-fixed-bottom {
- bottom: 0;
- margin-bottom: 0;
- border-width: 1px 0 0;
-}
-.navbar-brand {
- float: left;
- height: 50px;
- padding: 15px 15px;
- font-size: 18px;
- line-height: 20px;
-}
-.navbar-brand:hover,
-.navbar-brand:focus {
- text-decoration: none;
-}
-.navbar-brand > img {
- display: block;
-}
-@media (min-width: 768px) {
- .navbar > .container .navbar-brand,
- .navbar > .container-fluid .navbar-brand {
- margin-left: -15px;
- }
-}
-.navbar-toggle {
- position: relative;
- float: right;
- padding: 9px 10px;
- margin-top: 8px;
- margin-right: 15px;
- margin-bottom: 8px;
- background-color: transparent;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.navbar-toggle:focus {
- outline: 0;
-}
-.navbar-toggle .icon-bar {
- display: block;
- width: 22px;
- height: 2px;
- border-radius: 1px;
-}
-.navbar-toggle .icon-bar + .icon-bar {
- margin-top: 4px;
-}
-@media (min-width: 768px) {
- .navbar-toggle {
- display: none;
- }
-}
-.navbar-nav {
- margin: 7.5px -15px;
-}
-.navbar-nav > li > a {
- padding-top: 10px;
- padding-bottom: 10px;
- line-height: 20px;
-}
-@media (max-width: 767px) {
- .navbar-nav .open .dropdown-menu {
- position: static;
- float: none;
- width: auto;
- margin-top: 0;
- background-color: transparent;
- border: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .navbar-nav .open .dropdown-menu > li > a,
- .navbar-nav .open .dropdown-menu .dropdown-header {
- padding: 5px 15px 5px 25px;
- }
- .navbar-nav .open .dropdown-menu > li > a {
- line-height: 20px;
- }
- .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-nav .open .dropdown-menu > li > a:focus {
- background-image: none;
- }
-}
-@media (min-width: 768px) {
- .navbar-nav {
- float: left;
- margin: 0;
- }
- .navbar-nav > li {
- float: left;
- }
- .navbar-nav > li > a {
- padding-top: 15px;
- padding-bottom: 15px;
- }
-}
-.navbar-form {
- padding: 10px 15px;
- margin-top: 8px;
- margin-right: -15px;
- margin-bottom: 8px;
- margin-left: -15px;
- border-top: 1px solid transparent;
- border-bottom: 1px solid transparent;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
-}
-@media (min-width: 768px) {
- .navbar-form .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .navbar-form .form-control-static {
- display: inline-block;
- }
- .navbar-form .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .navbar-form .input-group .input-group-addon,
- .navbar-form .input-group .input-group-btn,
- .navbar-form .input-group .form-control {
- width: auto;
- }
- .navbar-form .input-group > .form-control {
- width: 100%;
- }
- .navbar-form .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio,
- .navbar-form .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio label,
- .navbar-form .checkbox label {
- padding-left: 0;
- }
- .navbar-form .radio input[type="radio"],
- .navbar-form .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .navbar-form .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-@media (max-width: 767px) {
- .navbar-form .form-group {
- margin-bottom: 5px;
- }
- .navbar-form .form-group:last-child {
- margin-bottom: 0;
- }
-}
-@media (min-width: 768px) {
- .navbar-form {
- width: auto;
- padding-top: 0;
- padding-bottom: 0;
- margin-right: 0;
- margin-left: 0;
- border: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-}
-.navbar-nav > li > .dropdown-menu {
- margin-top: 0;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.navbar-btn {
- margin-top: 8px;
- margin-bottom: 8px;
-}
-.navbar-btn.btn-sm {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.navbar-btn.btn-xs {
- margin-top: 14px;
- margin-bottom: 14px;
-}
-.navbar-text {
- margin-top: 15px;
- margin-bottom: 15px;
-}
-@media (min-width: 768px) {
- .navbar-text {
- float: left;
- margin-right: 15px;
- margin-left: 15px;
- }
-}
-@media (min-width: 768px) {
- .navbar-left {
- float: left !important;
- }
- .navbar-right {
- float: right !important;
- margin-right: -15px;
- }
- .navbar-right ~ .navbar-right {
- margin-right: 0;
- }
-}
-.navbar-default {
- background-color: #f8f8f8;
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-brand {
- color: #777;
-}
-.navbar-default .navbar-brand:hover,
-.navbar-default .navbar-brand:focus {
- color: #5e5e5e;
- background-color: transparent;
-}
-.navbar-default .navbar-text {
- color: #777;
-}
-.navbar-default .navbar-nav > li > a {
- color: #777;
-}
-.navbar-default .navbar-nav > li > a:hover,
-.navbar-default .navbar-nav > li > a:focus {
- color: #333;
- background-color: transparent;
-}
-.navbar-default .navbar-nav > .active > a,
-.navbar-default .navbar-nav > .active > a:hover,
-.navbar-default .navbar-nav > .active > a:focus {
- color: #555;
- background-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .disabled > a,
-.navbar-default .navbar-nav > .disabled > a:hover,
-.navbar-default .navbar-nav > .disabled > a:focus {
- color: #ccc;
- background-color: transparent;
-}
-.navbar-default .navbar-toggle {
- border-color: #ddd;
-}
-.navbar-default .navbar-toggle:hover,
-.navbar-default .navbar-toggle:focus {
- background-color: #ddd;
-}
-.navbar-default .navbar-toggle .icon-bar {
- background-color: #888;
-}
-.navbar-default .navbar-collapse,
-.navbar-default .navbar-form {
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .open > a:hover,
-.navbar-default .navbar-nav > .open > a:focus {
- color: #555;
- background-color: #e7e7e7;
-}
-@media (max-width: 767px) {
- .navbar-default .navbar-nav .open .dropdown-menu > li > a {
- color: #777;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
- color: #333;
- background-color: transparent;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #555;
- background-color: #e7e7e7;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .di
<TRUNCATED>
[03/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.css b/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.css
new file mode 100644
index 0000000..7967e65
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.css
@@ -0,0 +1,2 @@
+/* rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome */
+.rd-container{display:inline-block;border:1px solid #333;background-color:#fff;padding:10px;text-align:center}.rd-container-attachment{position:absolute}.rd-month{display:inline-block;margin-right:25px}.rd-month:last-child{margin-right:0}.rd-back,.rd-next{cursor:pointer;border:none;outline:0;background:0 0;padding:0;margin:0}.rd-back[disabled],.rd-next[disabled]{cursor:default}.rd-back{float:left}.rd-next{float:right}.rd-back:before{display:block;content:'\2190'}.rd-next:before{display:block;content:'\2192'}.rd-day-body{cursor:pointer;text-align:center}.rd-day-selected,.rd-time-option:hover,.rd-time-selected{cursor:pointer;background-color:#333;color:#fff}.rd-day-next-month,.rd-day-prev-month{color:#999}.rd-day-disabled{cursor:default;color:#fcc}.rd-time{position:relative;display:inline-block;margin-top:5px;min-width:80px}.rd-time-list{display:none;position:absolute;overflow-y:scroll;max-height:160px;left:0;right:0;background-color:#fff;color:#333}.rd-time-option,.rd-time-selected{p
adding:5px}.rd-day-concealed{visibility:hidden}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.js b/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.js
new file mode 100644
index 0000000..8514e04
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.min.js
@@ -0,0 +1,3 @@
+// rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.rome=t()}}(function(){var t;return function e(t,n,r){function a(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return a(n?n:e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEven
tListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(t,e){e.exports=t("./src/contra.emitter.js")},{"./src/contra.emitter.js":3}],3:[function(t,e){(function(t){!function(n,r){"use strict";function a(t,e){return Array.prototype.slice.call(t,e)}function i(t,e,n){t&&s(function(){t.apply(n||null,e||[])})}function o(t,e){var n=e||{},o={};return t===r&&(t={}),t.on=function(e,n){return o[e]?o[e].push(n):o[e]=[n],t},t.once=function(e,n){return n._once=!0,t.on(e,n),
t},t.off=function(e,n){var r=arguments.length;if(1===r)delete o[e];else if(0===r)o={};else{var a=o[e];if(!a)return t;a.splice(a.indexOf(n),1)}return t},t.emit=function(){var e=a(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var r=(o[e]||[]).slice(0);return function(){var s=a(arguments),u=this||t;if("error"===e&&n.throws!==!1&&!r.length)throw 1===s.length?s[0]:s;return o[e]=r.filter(function(t){return n.async?i(t,s,u):t.apply(u,s),!t._once}),t}},t}var s,u=""+r,c="function"==typeof setImmediate;s=c?function(t){setImmediate(t)}:typeof t!==u&&t.nextTick?t.nextTick:function(t){setTimeout(t,0)},typeof e!==u&&e.exports?e.exports=o:(n.contra=n.contra||{},n.contra.emitter=o)}(this)}).call(this,t("FWaASH"))},{FWaASH:1}],4:[function(e,n){(function(r){(function(a){function i(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function o(t,e){return Oe.call(t,e)}functi
on s(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function u(t){De.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function c(t,e){var n=!0;return p(function(){return n&&(u(t),n=!1),e.apply(this,arguments)},e)}function l(t,e){bn[t]||(u(e),bn[t]=!0)}function d(t,e){return function(n){return g(t.call(this,n),e)}}function f(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function h(){}function m(t,e){e!==!1&&H(t),_(this,t),this._d=new Date(+t._d)}function y(t){var e=S(t),n=e.year||0,r=e.quarter||0,a=e.month||0,i=e.week||0,o=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+36e5*s,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=De.localeData(),this._bubble()}function p(t,e){for(var n in e)o(e,n)&&(t[n]=e[n]);retur
n o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function _(t,e){var n,r,a;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Le.length>0)for(n in Le)r=Le[n],a=e[r],"undefined"!=typeof a&&(t[r]=a);return t}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function g(t,e,n){for(var r=""+Math.abs(t),a=t>=0;r.length<e;)r="0"+r;return(a?n?"+":"":"-")+r}function w(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.millisecon
ds=+e-+t.clone().add(n.months,"M"),n}function b(t,e){var n;return e=U(e,t),t.isBefore(e)?n=w(t,e):(n=w(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function M(t,e){return function(n,r){var a,i;return null===r||isNaN(+r)||(l(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,a=De.duration(n,r),D(this,a,t),this}}function D(t,e,n,r){var a=e._milliseconds,i=e._days,o=e._months;r=null==r?!0:r,a&&t._d.setTime(+t._d+a*n),i&&_e(t,"Date",pe(t,"Date")+i*n),o&&ye(t,pe(t,"Month")+o*n),r&&De.updateOffset(t,i||o)}function k(t){return"[object Array]"===Object.prototype.toString.call(t)}function Y(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function T(t,e,n){var r,a=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),o=0;for(r=0;a>r;r++)(n&&t[r]!==e[r]||!n&&F(t[r])!==F(e[r]))&&o++;return o+i}function x(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=mn[t]||
yn[e]||e}return t}function S(t){var e,n,r={};for(n in t)o(t,n)&&(e=x(n),e&&(r[e]=t[n]));return r}function O(t){var e,n;if(0===t.indexOf("week"))e=7,n="day";else{if(0!==t.indexOf("month"))return;e=12,n="month"}De[t]=function(r,i){var o,s,u=De._locale[t],c=[];if("number"==typeof r&&(i=r,r=a),s=function(t){var e=De().utc().set(n,t);return u.call(De._locale,e,r||"")},null!=i)return s(i);for(o=0;e>o;o++)c.push(s(o));return c}}function F(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function C(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function I(t,e,n){return de(De([t,11,31+e-n]),e,n).week}function A(t){return E(t)?366:365}function E(t){return t%4===0&&t%100!==0||t%400===0}function H(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Ce]<0||t._a[Ce]>11?Ce:t._a[Ie]<1||t._a[Ie]>C(t._a[Fe],t._a[Ce])?Ie:t._a[Ae]<0||t._a[Ae]>24||24===t._a[Ae]&&(0!==t._a[Ee]||0!==t._a[He]||0!==t._a[Pe])?Ae:t._a[Ee]<0||t._a[Ee]>59?Ee:t._a[He]<0||t._a[He]>59?He:t._a[Pe]<0||t
._a[Pe]>999?Pe:-1,t._pf._overflowDayOfYear&&(Fe>e||e>Ie)&&(e=Ie),t._pf.overflow=e)}function P(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===a)),t._isValid}function W(t){return t?t.toLowerCase().replace("_","-"):t}function L(t){for(var e,n,r,a,i=0;i<t.length;){for(a=W(t[i]).split("-"),e=a.length,n=W(t[i+1]),n=n?n.split("-"):null;e>0;){if(r=G(a.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(a,n,!0)>=e-1)break;e--}i++}return null}function G(t){var n=null;if(!We[t]&&Ge)try{n=De.locale(),e("./locale/"+t),De.locale(n)}catch(r){}return We[t]}function U(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(De.isMoment(t)||Y(t)?+t:+De(t))-+n,n._d.setTime(+n._d+r),De.updateOffset(n,!1),n):De(t).local()}function N(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]
$/g,""):t.replace(/\\/g,"")}function z(t){var e,n,r=t.match(je);for(e=0,n=r.length;n>e;e++)r[e]=wn[r[e]]?wn[r[e]]:N(r[e]);return function(a){var i="";for(e=0;n>e;e++)i+=r[e]instanceof Function?r[e].call(a,t):r[e];return i}}function j(t,e){return t.isValid()?(e=V(e,t.localeData()),pn[e]||(pn[e]=z(e)),pn[e](t)):t.localeData().invalidDate()}function V(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ve.lastIndex=0;r>=0&&Ve.test(t);)t=t.replace(Ve,n),Ve.lastIndex=0,r-=1;return t}function B(t,e){var n,r=e._strict;switch(t){case"Q":return en;case"DDDD":return rn;case"YYYY":case"GGGG":case"gggg":return r?an:qe;case"Y":case"G":case"g":return sn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?on:Re;case"S":if(r)return en;case"SS":if(r)return nn;case"SSS":if(r)return rn;case"DDD":return Ze;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Je;case"a":case"A":return e._locale._meridiemParse;case"x":return Ke;case"X":return tn;case"Z":case"ZZ":return Qe;case"T":retu
rn Xe;case"SSSS":return $e;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?nn:Be;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Be;case"Do":return r?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return n=new RegExp(te(K(t.replace("\\","")),"i"))}}function Z(t){t=t||"";var e=t.match(Qe)||[],n=e[e.length-1]||[],r=(n+"").match(fn)||["-",0,0],a=+(60*r[1])+F(r[2]);return"+"===r[0]?-a:a}function q(t,e,n){var r,a=n._a;switch(t){case"Q":null!=e&&(a[Ce]=3*(F(e)-1));break;case"M":case"MM":null!=e&&(a[Ce]=F(e)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(e,t,n._strict),null!=r?a[Ce]=r:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(a[Ie]=F(e));break;case"Do":null!=e&&(a[Ie]=F(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=F(e));break;case"YY":a[Fe]=De.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":a[F
e]=F(e);break;case"a":case"A":n._isPm=n._locale.isPM(e);break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":a[Ae]=F(e);break;case"m":case"mm":a[Ee]=F(e);break;case"s":case"ss":a[He]=F(e);break;case"S":case"SS":case"SSS":case"SSSS":a[Pe]=F(1e3*("0."+e));break;case"x":n._d=new Date(F(e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=Z(e);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(e),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=F(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=De.parseTwoDigitYear(e)}}function R(t){var e,n,r,a,o,s,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,s=4,n=i(e.GG,t._a[Fe],de(De(),1,4).year),r=i(e.W,1),a=i(e.E,1)):(o=t._locale._week.dow,s=t._locale._week.doy,n=i(e.gg,t._a[Fe],de(De(),o,s).year),r=i(e.w,1),null!=e.d?(a=e.d,o>a&&
++r):a=null!=e.e?e.e+o:o),u=fe(n,r,a,s,o),t._a[Fe]=u.year,t._dayOfYear=u.dayOfYear}function $(t){var e,n,r,a,o=[];if(!t._d){for(r=Q(t),t._w&&null==t._a[Ie]&&null==t._a[Ce]&&R(t),t._dayOfYear&&(a=i(t._a[Fe],r[Fe]),t._dayOfYear>A(a)&&(t._pf._overflowDayOfYear=!0),n=se(a,0,t._dayOfYear),t._a[Ce]=n.getUTCMonth(),t._a[Ie]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ae]&&0===t._a[Ee]&&0===t._a[He]&&0===t._a[Pe]&&(t._nextDay=!0,t._a[Ae]=0),t._d=(t._useUTC?se:oe).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()+t._tzm),t._nextDay&&(t._a[Ae]=24)}}function J(t){var e;t._d||(e=S(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],$(t))}function Q(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function X(t){if(t._f===De.ISO_8601)return ne(t),void 0;t._a=[],t._pf.empty=!0;var e,n,r,i
,o,s=""+t._i,u=s.length,c=0;for(r=V(t._f,t._locale).match(je)||[],e=0;e<r.length;e++)i=r[e],n=(s.match(B(i,t))||[])[0],n&&(o=s.substr(0,s.indexOf(n)),o.length>0&&t._pf.unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),wn[i]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(i),q(i,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-c,s.length>0&&t._pf.unusedInput.push(s),t._pf.bigHour===!0&&t._a[Ae]<=12&&(t._pf.bigHour=a),t._isPm&&t._a[Ae]<12&&(t._a[Ae]+=12),t._isPm===!1&&12===t._a[Ae]&&(t._a[Ae]=0),$(t),H(t)}function K(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,a){return e||n||r||a})}function te(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ee(t){var e,n,r,a,i;if(0===t._f.length)return t._pf.invalidFormat=!0,t._d=new Date(0/0),void 0;for(a=0;a<t._f.length;a++)i=0,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._pf=s(),e._f=t._f[a],X(e),P(e)&&(i+=e._pf.charsLeftOver,i+=10*e._pf.unusedTokens.length,e._pf.scor
e=i,(null==r||r>i)&&(r=i,n=e));p(t,n||e)}function ne(t){var e,n,r=t._i,a=un.exec(r);if(a){for(t._pf.iso=!0,e=0,n=ln.length;n>e;e++)if(ln[e][1].exec(r)){t._f=ln[e][0]+(a[6]||" ");break}for(e=0,n=dn.length;n>e;e++)if(dn[e][1].exec(r)){t._f+=dn[e][0];break}r.match(Qe)&&(t._f+="Z"),X(t)}else t._isValid=!1}function re(t){ne(t),t._isValid===!1&&(delete t._isValid,De.createFromInputFallback(t))}function ae(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function ie(t){var e,n=t._i;n===a?t._d=new Date:Y(n)?t._d=new Date(+n):null!==(e=Ue.exec(n))?t._d=new Date(+e[1]):"string"==typeof n?re(t):k(n)?(t._a=ae(n.slice(0),function(t){return parseInt(t,10)}),$(t)):"object"==typeof n?J(t):"number"==typeof n?t._d=new Date(n):De.createFromInputFallback(t)}function oe(t,e,n,r,a,i,o){var s=new Date(t,e,n,r,a,i,o);return 1970>t&&s.setFullYear(t),s}function se(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ue(t,e){if("string"==typeof t)if(
isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function ce(t,e,n,r,a){return a.relativeTime(e||1,!!n,t,r)}function le(t,e,n){var r=De.duration(t).abs(),a=Se(r.as("s")),i=Se(r.as("m")),o=Se(r.as("h")),s=Se(r.as("d")),u=Se(r.as("M")),c=Se(r.as("y")),l=a<_n.s&&["s",a]||1===i&&["m"]||i<_n.m&&["mm",i]||1===o&&["h"]||o<_n.h&&["hh",o]||1===s&&["d"]||s<_n.d&&["dd",s]||1===u&&["M"]||u<_n.M&&["MM",u]||1===c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,ce.apply({},l)}function de(t,e,n){var r,a=n-e,i=n-t.day();return i>a&&(i-=7),a-7>i&&(i+=7),r=De(t).add(i,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function fe(t,e,n,r,a){var i,o,s=se(t,0,1).getUTCDay();return s=0===s?7:s,n=null!=n?n:a,i=a-s+(s>r?7:0)-(a>s?7:0),o=7*(e-1)+(n-a)+i+1,{year:o>0?t:t-1,dayOfYear:o>0?o:A(t-1)+o}}function he(t){var e,n=t._i,r=t._f;return t._locale=t._locale||De.localeData(t._l),null===n||r===a&&""===n?De.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t.
_locale.preparse(n)),De.isMoment(n)?new m(n,!0):(r?k(r)?ee(t):X(t):ie(t),e=new m(t),e._nextDay&&(e.add(1,"d"),e._nextDay=a),e))}function me(t,e){var n,r;if(1===e.length&&k(e[0])&&(e=e[0]),!e.length)return De();for(n=e[0],r=1;r<e.length;++r)e[r][t](n)&&(n=e[r]);return n}function ye(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),C(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function pe(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function _e(t,e,n){return"Month"===e?ye(t,n):t._d["set"+(t._isUTC?"UTC":"")+e](n)}function ve(t,e){return function(n){return null!=n?(_e(this,t,n),De.updateOffset(this,e),this):pe(this,t)}}function ge(t){return 400*t/146097}function we(t){return 146097*t/400}function be(t){De.duration.fn[t]=function(){return this._data[t]}}function Me(t){"undefined"==typeof ender&&(ke=xe.moment,xe.moment=t?c("Accessing Moment through the global scope is deprecated, and will be removed in an
upcoming release.",De):De)}for(var De,ke,Ye,Te="2.8.4",xe="undefined"!=typeof r?r:this,Se=Math.round,Oe=Object.prototype.hasOwnProperty,Fe=0,Ce=1,Ie=2,Ae=3,Ee=4,He=5,Pe=6,We={},Le=[],Ge="undefined"!=typeof n&&n&&n.exports,Ue=/^\/?Date\((\-?\d+)/i,Ne=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,ze=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,je=/(\[[^\[]*\])|(\\)?(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,Ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Be=/\d\d?/,Ze=/\d{1,3}/,qe=/\d{1,4}/,Re=/[+\-]?\d{1,6}/,$e=/\d+/,Je=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qe=/Z|[\+\-]\d\d:?\d\d/gi,Xe=/T/i,Ke=/[\+\-]?\d+/,tn=/[\+\-]?\d+(\.\d{1,3})?/,en=/\d/,nn=/\d\d/,rn=/\d{3}/,an=/\d{4}/,on=/[+-]?\d{6}/,sn=/[+-]?\d+/,un=/^\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)?)?$/,cn="YYYY-MM-DDTHH:mm:ssZ",ln=[["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}/]],dn=[["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/]],fn=/([\+\-]|\d\d)/gi,hn=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),mn={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"},yn={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},pn={},_n={s:45,m:45,h:22,d:26,M:11},vn="DDD w W M D d".sp
lit(" "),gn="M D H h m s w W".split(" "),wn={M:function(){return this.month()+1},MMM:function(t){return this.localeData().monthsShort(this,t)},MMMM:function(t){return this.localeData().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.localeData().weekdaysMin(this,t)},ddd:function(t){return this.localeData().weekdaysShort(this,t)},dddd:function(t){return this.localeData().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return g(this.year()%100,2)},YYYY:function(){return g(this.year(),4)},YYYYY:function(){return g(this.year(),5)},YYYYYY:function(){var t=this.year(),e=t>=0?"+":"-";return e+g(Math.abs(t),6)},gg:function(){return g(this.weekYear()%100,2)},gggg:function(){return g(this.weekYear(),4)},ggggg:function(){return g(this.weekYear(),5)},GG:function(){return g(this.isoWeekYear()%100,2)},GGGG:function(){return g(this.isoWeekYear(),4
)},GGGGG:function(){return g(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 F(this.milliseconds()/100)},SS:function(){return g(F(this.milliseconds()/10),2)},SSS:function(){return g(this.milliseconds(),3)},SSSS:function(){return g(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+g(F(t/60),2)+":"+g(F(t)%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+g(F(t/60),2)+g(F(t)%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
()}},bn={},Mn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];vn.length;)Ye=vn.pop(),wn[Ye+"o"]=f(wn[Ye],Ye);for(;gn.length;)Ye=gn.pop(),wn[Ye+Ye]=d(wn[Ye],2);wn.DDDD=d(wn.DDD,3),p(h.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;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(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t,e,n){var r,a,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(a=De.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegEx
p("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=De([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i"
)),this._weekdaysParse[e].test(t))return e},_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(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>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(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.apply(e,[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(t,e,n,r){var a=this._relativeTime[n];return"function"==typeof a?a(t,e,n,r):a.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return de(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),De=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=a),i={},i._isAMomentObject=!0,i._i=t,i._f=e,i._l=n,i._strict=r,i._isUTC=!1,i._pf=s(),he(i)},De.suppressDeprecationWarnings=!1,De.createFromInputFallback=c("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(t){t._
d=new Date(t._i+(t._useUTC?" UTC":""))}),De.min=function(){var t=[].slice.call(arguments,0);return me("isBefore",t)},De.max=function(){var t=[].slice.call(arguments,0);return me("isAfter",t)},De.utc=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=a),i={},i._isAMomentObject=!0,i._useUTC=!0,i._isUTC=!0,i._l=n,i._i=t,i._f=e,i._strict=r,i._pf=s(),he(i).utc()},De.unix=function(t){return De(1e3*t)},De.duration=function(t,e){var n,r,a,i,s=t,u=null;return De.isDuration(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(u=Ne.exec(t))?(n="-"===u[1]?-1:1,s={y:0,d:F(u[Ie])*n,h:F(u[Ae])*n,m:F(u[Ee])*n,s:F(u[He])*n,ms:F(u[Pe])*n}):(u=ze.exec(t))?(n="-"===u[1]?-1:1,a=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n},s={y:a(u[2]),M:a(u[3]),d:a(u[4]),h:a(u[5]),m:a(u[6]),s:a(u[7]),w:a(u[8])}):"object"==typeof s&&("from"in s||"to"in s)&&(i=b(De(s.from),De(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new y(s),De.is
Duration(t)&&o(t,"_locale")&&(r._locale=t._locale),r},De.version=Te,De.defaultFormat=cn,De.ISO_8601=function(){},De.momentProperties=Le,De.updateOffset=function(){},De.relativeTimeThreshold=function(t,e){return _n[t]===a?!1:e===a?_n[t]:(_n[t]=e,!0)},De.lang=c("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return De.locale(t,e)}),De.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?De.defineLocale(t,e):De.localeData(t),n&&(De.duration._locale=De._locale=n)),De._locale._abbr},De.defineLocale=function(t,e){return null!==e?(e.abbr=t,We[t]||(We[t]=new h),We[t].set(e),De.locale(t),We[t]):(delete We[t],null)},De.langData=c("moment.langData is deprecated. Use moment.localeData instead.",function(t){return De.localeData(t)}),De.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return De._locale;if(!k(t)){if(e=G(t))return e;t=[t]}return L(t)},De.isMoment=function(t){return t instanceof m||null!=t&&o(t,"_isAMomentObject")},
De.isDuration=function(t){return t instanceof y};for(Ye=Mn.length-1;Ye>=0;--Ye)O(Mn[Ye]);De.normalizeUnits=function(t){return x(t)},De.invalid=function(t){var e=De.utc(0/0);return null!=t?p(e._pf,t):e._pf.userInvalidated=!0,e},De.parseZone=function(){return De.apply(null,arguments).parseZone()},De.parseTwoDigitYear=function(t){return F(t)+(F(t)>68?1900:2e3)},p(De.fn=m.prototype,{clone:function(){return De(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 t=De(this).utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():j(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):j(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.se
conds(),t.milliseconds()]},isValid:function(){return P(this)},isDSTShifted:function(){return this._a?this.isValid()&&T(this._a,(this._isUTC?De.utc(this._a):De(this._a)).toArray())>0:!1},parsingFlags:function(){return p({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.zone(0,t)},local:function(t){return this._isUTC&&(this.zone(0,t),this._isUTC=!1,t&&this.add(this._dateTzOffset(),"m")),this},format:function(t){var e=j(this,t||De.defaultFormat);return this.localeData().postformat(e)},add:M(1,"add"),subtract:M(-1,"subtract"),diff:function(t,e,n){var r,a,i,o=U(t,this),s=6e4*(this.zone()-o.zone());return e=x(e),"year"===e||"month"===e?(r=432e5*(this.daysInMonth()+o.daysInMonth()),a=12*(this.year()-o.year())+(this.month()-o.month()),i=this-De(this).startOf("month")-(o-De(o).startOf("month")),i-=6e4*(this.zone()-De(this).startOf("month").zone()-(o.zone()-De(o).startOf("month").zone())),a+=i/r,"year"===e&&(a/=12)):(r=this-o,a="second"===e?r/1e3:"minute
"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-s)/864e5:"week"===e?(r-s)/6048e5:r),n?a:v(a)},from:function(t,e){return De.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(De(),t)},calendar:function(t){var e=t||De(),n=U(e,this).startOf("day"),r=this.diff(n,"days",!0),a=-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(a,this,De(e)))},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(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ue(t,this.localeData()),this.add(t-e,"d")):e},month:ve("Month",!0),startOf:function(t){switch(t=x(t)){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"s
econd":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=x(t),t===a||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){var n;return e=x("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this>+t):(n=De.isMoment(t)?+t:+De(t),n<+this.clone().startOf(e))},isBefore:function(t,e){var n;return e=x("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+t>+this):(n=De.isMoment(t)?+t:+De(t),+this.clone().endOf(e)<n)},isSame:function(t,e){var n;return e=x(e||"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this===+t):(n=+De(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))},min:c("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),this>t?
this:t}),max:c("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),t>this?this:t}),zone:function(t,e){var n,r=this._offset||0;return null==t?this._isUTC?r:this._dateTzOffset():("string"==typeof t&&(t=Z(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateTzOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.subtract(n,"m"),r!==t&&(!e||this._changeInProgress?D(this,De.duration(r-t,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,De.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(t){return t=t?De(t).zone():0,(this.zone()-t)%60===0},daysInMonth:function(){return C(this.year(),this.month())},dayOfYear:functi
on(t){var e=Se((De(this).startOf("day")-De(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=de(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=de(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=de(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return I(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return I(this.year(),t.dow,t.doy)},get:function(t){return t=x(t),this[t]()},set:function(t,e){ret
urn t=x(t),"function"==typeof this[t]&&this[t](e),this},locale:function(t){var e;return t===a?this._locale._abbr:(e=De.localeData(t),null!=e&&(this._locale=e),this)
+},lang:c("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===a?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),De.fn.millisecond=De.fn.milliseconds=ve("Milliseconds",!1),De.fn.second=De.fn.seconds=ve("Seconds",!1),De.fn.minute=De.fn.minutes=ve("Minutes",!1),De.fn.hour=De.fn.hours=ve("Hours",!0),De.fn.date=ve("Date",!0),De.fn.dates=c("dates accessor is deprecated. Use date instead.",ve("Date",!0)),De.fn.year=ve("FullYear",!0),De.fn.years=c("years accessor is deprecated. Use year instead.",ve("FullYear",!0)),De.fn.days=De.fn.day,De.fn.months=De.fn.month,De.fn.weeks=De.fn.week,De.fn.isoWeeks=De.fn.isoWeek,De.fn.quarters=De.fn.quarter,De.fn.toJSON=De.fn.toISOString,p(De.duration.fn=y.prototype,{_bubble:function(){var t,e,n,r=this._milliseconds,a=this._days,i=this
._months,o=this._data,s=0;o.milliseconds=r%1e3,t=v(r/1e3),o.seconds=t%60,e=v(t/60),o.minutes=e%60,n=v(e/60),o.hours=n%24,a+=v(n/24),s=v(ge(a)),a-=v(we(s)),i+=v(a/30),a%=30,s+=v(i/12),i%=12,o.days=a,o.months=i,o.years=s},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 v(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12)},humanize:function(t){var e=le(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=De.duration(t,e);return
this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=De.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=x(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=x(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*ge(e),"month"===t?n:n/12;switch(e=this._days+Math.round(we(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:De.fn.lang,locale:De.fn.locale,toIsoString:c("toIsoString() is deprecated. Please use toISOString() instead (notice th
e capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),a=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||a||i?"T":"")+(r?r+"H":"")+(a?a+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}}),De.duration.fn.toString=De.duration.fn.toISOString;for(Ye in hn)o(hn,Ye)&&be(Ye.toLowerCase());De.duration.fn.asMilliseconds=function(){return this.as("ms")},De.duration.fn.asSeconds=function(){return this.as("s")},De.duration.fn.asMinutes=function(){return this.as("m")},De.duration.fn.asHours=function(){return this.as("h")},De.duration.fn.asDays=function(){return this.as("d")},De.duration.fn.asWeeks=function(){return this.as("weeks")},De.duration.fn.asMonths=function(){return this.as("M")},De.duration.fn.asYears=function(){return
this.as("y")},De.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ge?n.exports=De:"function"==typeof t&&t.amd?(t("moment",function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(xe.moment=ke),De}),Me(!0)):Me()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e){for(var n=t("performance-now"),r="undefined"==typeof window?{}:window,a=["moz","webkit"],i="AnimationFrame",o=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],u=!0,c=0;c<a.length&&!o;c++)o=r[a[c]+"Request"+i],s=r[a[c]+"Cancel"+i]||r[a[c]+"CancelRequest"+i];if(!o||!s){u=!1;var l=0,d=0,f=[],h=1e3/60;o=function(t){if(0===f.length){var e=n(),r=Math.max(0,h-(e-l));l=r+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(n){setTimeout(function(){throw n},0)}},Math.round(r))}r
eturn f.push({handle:++d,callback:t,cancelled:!1}),d},s=function(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0)}}e.exports=function(t){return u?o.call(r,function(){try{t.apply(this,arguments)}catch(e){setTimeout(function(){throw e},0)}}):o.call(r,t)},e.exports.cancel=function(){s.apply(r,arguments)}},{"performance-now":6}],6:[function(t,e){(function(t){(function(){var n,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var t;return t=r(),1e9*t[0]+t[1]},a=n()):Date.now?(e.exports=function(){return Date.now()-a},a=Date.now()):(e.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)}).call(this,t("FWaASH"))},{FWaASH:1}],7:[function(t,e){"use strict";function n(t,e){var n=u[t.id];return n&&n[e.id]}function r(t,e){var n=u[t.id];n||(n=u[t.id]={});var r=i(e);n[e.id
]=r,t.on("data",r),t.on("destroyed",a.bind(null,t,e))}function a(t,e){var n=u[t.id];if(n){var r=n[e.id];t.off("data",r),delete n[e.id]}}function i(t){return function(){t.refresh()}}function o(t,e){s(e.associated)||n(t,e)||r(t,e)}var s=t("./isInput"),u={};e.exports={add:o,remove:a}},{"./isInput":18}],8:[function(t,e){"use strict";function n(t){function e(){return Te}function n(n){return de=l(n||t,Te),me||(me=o({className:de.styles.container})),ye=de.weekdayFormat,pe=ye.length,ve=r,_e=r,ge=r,we=r,de.appendTo.appendChild(me),R(me),xe=!1,fe=de.initialValue?de.initialValue:d.moment(),he=fe.clone(),Te.container=me,Te.destroyed=!1,Te.destroy=p.bind(Te,!1),Te.emitValues=B,Te.getDate=ue,Te.getDateString=ce,Te.getMoment=le,Te.hide=C,Te.options=v,Te.options.reset=g,Te.refresh=Z,Te.restore=e,Te.setValue=q,Te.show=F,F(),_(),y(),Te}function y(){Te.emit("ready",c(de))}function p(t){me&&me.parentNode.removeChild(me),de&&_(!0);var r=Te.emitterSnapshot("destroyed");return Te.destroyed=!0,Te.destroy=e
,Te.emitValues=e,Te.getDate=m,Te.getDateString=m,Te.getMoment=m,Te.hide=e,Te.options=e,Te.options.reset=e,Te.refresh=e,Te.restore=n,Te.setValue=e,Te.show=e,Te.off(),t!==!0&&r(),Te}function _(t){var e=t?"remove":"add";de.autoHideOnBlur&&h[e](document.documentElement,"focus",E,!0),de.autoHideOnClick&&h[e](document,"click",H)}function v(t){return 0===arguments.length?c(de):(p(),n(t),Te)}function g(){return v({appendTo:de.appendTo})}function w(){xe||(xe=!0,b(),M(),Te.emit("render"))}function b(){function t(t){var e=o({className:de.styles.month,parent:be});0===t&&(Me=o({type:"button",className:de.styles.back,attributes:{type:"button"},parent:e})),t===de.monthsInCalendar-1&&(De=o({type:"button",className:de.styles.next,attributes:{type:"button"},parent:e}));var n,r=o({className:de.styles.monthLabel,parent:e}),a=o({type:"table",className:de.styles.dayTable,parent:e}),i=o({type:"thead",className:de.styles.dayHead,parent:a}),s=o({type:"tr",className:de.styles.dayRow,parent:i}),u=o({type:"tbo
dy",className:de.styles.dayBody,parent:a});for(n=0;pe>n;n++)o({type:"th",className:de.styles.dayHeadElem,parent:s,text:ye[D(n)]});u.setAttribute(Se,t),Oe.push({label:r,body:u})}if(de.date){var e;for(Oe=[],be=o({className:de.styles.date,parent:me}),e=0;e<de.monthsInCalendar;e++)t(e);h.add(Me,"click",P),h.add(De,"click",W),h.add(be,"click",re)}}function M(){if(de.time&&de.timeInterval){var t=o({className:de.styles.time,parent:me});ke=o({className:de.styles.selectedTime,parent:t,text:fe.format(de.timeFormat)}),h.add(ke,"click",Y),Ye=o({className:de.styles.timeList,parent:t}),h.add(Ye,"click",se);for(var e=d.moment("00:00:00","HH:mm:ss"),n=e.clone().add(1,"days");e.isBefore(n);)o({className:de.styles.timeOption,parent:Ye,text:e.format(de.timeFormat)}),e.add(de.timeInterval,"seconds")}}function D(t,e){var n=e?-1:1,r=t+de.weekStart*n;return(r>=pe||0>r)&&(r+=pe*-n),r}function k(){if(de.time&&xe){var t,e,n,r,a=Ye.children,i=a.length;for(r=0;i>r;r++)n=a[r],e=d.moment(s(n),de.timeFormat),t=oe
(fe.clone(),e),n.style.display=Q(t,!1,de.timeValidator)?"block":"none"}}function Y(t){var e="boolean"==typeof t?t:"none"===Ye.style.display;e?T():x()}function T(){Ye&&(Ye.style.display="block")}function x(){Ye&&(Ye.style.display="none")}function S(){me.style.display="inline-block",Te.emit("show")}function O(){me.style.display="none",Te.emit("hide")}function F(){return w(),Z(),Y(!de.date),S(),Te}function C(){return x(),i(O),Te}function I(){x();var t=f.contains(me,de.styles.positioned);return t&&i(O),Te}function A(t){var e=t.target;if(e===Te.associated)return!0;for(;e;){if(e===me)return!0;e=e.parentNode}}function E(t){A(t)||I()}function H(t){A(t)||I()}function P(){L("subtract")}function W(){L("add")}function L(t){var e,n="add"===t?-1:1,r=de.monthsInCalendar+n*ie(we);he[t](r,"months"),e=te(he.clone()),fe=e||fe,e&&(he=e.clone()),G()}function G(t){U(),V(),t!==!0&&B(),k()}function U(){function t(t,e){var n=he.clone().add(e,"months");s(t.label,n.format(de.monthFormat)),R(t.body)}if(de.date
&&xe){var e=he.year(),n=he.month(),r=he.date();if(r!==ge||n!==ve||e!==_e){var a=z();if(ge=he.date(),ve=he.month(),_e=he.year(),a)return N(),void 0;Oe.forEach(t),$()}}}function N(){function t(t){var e,n=[];for(e=0;e<t.length;e++)n.push(t[e]);return n}function e(e){return t(e.children)}function n(t){return!f.contains(t,de.styles.dayPrevMonth)&&!f.contains(t,de.styles.dayNextMonth)}var r=he.date()-1;ae(!1),Oe.forEach(function(a){var i;j(a.date,he)&&(i=t(a.body.children).map(e),i=Array.prototype.concat.apply([],i).filter(n),ae(i[r]))})}function z(){function t(t){return _e?j(t.date,he):!1}return Oe.some(t)}function j(t,e){return t&&e&&t.year()===e.year()&&t.month()===e.month()}function V(){de.time&&xe&&s(ke,fe.format(de.timeFormat))}function B(){return Te.emit("data",ce()),Te.emit("year",fe.year()),Te.emit("month",fe.month()),Te.emit("day",fe.day()),Te.emit("time",fe.format(de.timeFormat)),Te}function Z(){return _e=!1,ve=!1,ge=!1,G(!0),Te}function q(t){var e=u(t,de.inputFormat);if(null!=
=e)return fe=te(e)||fe,he=fe.clone(),G(!0),Te}function R(t,e){for(;t&&t.firstChild;)t.removeChild(t.firstChild);e===!0&&t.parentNode.removeChild(t)}function $(){var t;for(t=0;t<de.monthsInCalendar;t++)J(t)}function J(t){function e(t){var e,r,a;for(e=0;e<t.length;e++)f.children.length===pe&&(f=o({type:"tr",className:de.styles.dayRow,parent:i.body})),r=t.base.clone().add(e,"days"),a=o({type:"td",parent:f,text:r.format(de.dayFormat),className:n(r,t.cell.join(" ").split(" ")).join(" ")}),t.selectable&&r.date()===c&&ae(a)}function n(t,e){return Q(t,!0,de.dateValidator)||e.push(y),e}function r(t,e){return t&&e.push(de.styles.dayConcealed),e}var a,i=Oe[t],s=he.clone().add(t,"months"),u=s.daysInMonth(),c=s.month()!==fe.month()?-1:fe.date(),l=s.clone().date(1),d=D(l.day(),!0),f=o({type:"tr",className:de.styles.dayRow,parent:i.body}),h=r(0!==t,[de.styles.dayBodyElem,de.styles.dayPrevMonth]),m=r(t!==de.monthsInCalendar-1,[de.styles.dayBodyElem,de.styles.dayNextMonth]),y=de.styles.dayDisabled;e
({base:l.clone().subtract(d,"days"),length:d,cell:h}),e({base:l.clone(),length:u,cell:[de.styles.dayBodyElem],selectable:!0}),a=l.clone().add(u,"days"),e({base:a,length:pe-f.children.length,cell:m}),Me.disabled=!X(l,!0),De.disabled=!K(a,!0),i.date=s.clone()}function Q(t,e,n){if(!X(t,e))return!1;if(!K(t,e))return!1;var r=(n||Function.prototype).call(Te,t.toDate());return r!==!1}function X(t,e){var n=de.min?e?de.min.clone().startOf("day"):de.min:!1;return!n||!t.isBefore(n)}function K(t,e){var n=de.max?e?de.max.clone().endOf("day"):de.max:!1;return!n||!t.isAfter(n)}function te(t){if(de.min&&t.isBefore(de.min))return te(de.min.clone());if(de.max&&t.isAfter(de.max))return te(de.max.clone());var e=t.clone().subtract(1,"days");return ne(e,t,"add")?ee(e):(e=t.clone(),ne(e,t,"subtract")?ee(e):void 0)}function ee(t){var e,n=t.clone().subtract(de.timeInterval,"seconds"),r=Math.ceil(Fe/de.timeInterval);for(e=0;r>e;e++)if(n.add(de.timeInterval,"seconds"),n.date()>t.date()&&n.subtract(1,"days"),d
e.timeValidator.call(Te,n.toDate())!==!1)return n}function ne(t,e,n){for(var r=!1;r===!1&&(t[n](1,"days"),t.month()===e.month());)r=de.dateValidator.call(Te,t.toDate());return r!==!1}function re(t){var e=t.target;if(!f.contains(e,de.styles.dayDisabled)&&f.contains(e,de.styles.dayBodyElem)){var n=parseInt(s(e),10),r=f.contains(e,de.styles.dayPrevMonth),a=f.contains(e,de.styles.dayNextMonth),i=ie(e)-ie(we);fe.add(i,"months"),(r||a)&&fe.add(r?-1:1,"months"),ae(e),fe.date(n),oe(fe,te(fe)||fe),he=fe.clone(),de.autoClose===!0&&I(),G()}}function ae(t){we&&f.remove(we,de.styles.selectedDay),t&&f.add(t,de.styles.selectedDay),we=t}function ie(t){for(var e;t&&t.getAttribute;){if(e=t.getAttribute(Se),"string"==typeof e)return parseInt(e,10);t=t.parentNode}return 0}function oe(t,e){return t.hour(e.hour()).minute(e.minute()).second(e.second()),t}function se(t){var e=t.target;if(f.contains(e,de.styles.timeOption)){var n=d.moment(s(e),de.timeFormat);oe(fe,n),he=fe.clone(),B(),V(),!de.date&&de.autoC
lose===!0||"time"===de.autoClose?I():x()}}function ue(){return fe.toDate()}function ce(t){return fe.format(t||de.inputFormat)}function le(){return fe.clone()}var de,fe,he,me,ye,pe,_e,ve,ge,we,be,Me,De,ke,Ye,Te=a({}),xe=!1,Se="data-rome-offset",Oe=[],Fe=86400;return n(),i(y),Te}var r,a=t("contra.emitter"),i=t("raf"),o=t("./dom"),s=t("./text"),u=t("./parse"),c=t("./clone"),l=t("./defaults"),d=t("./momentum"),f=t("./classes"),h=t("./events"),m=t("./noop");e.exports=n},{"./classes":9,"./clone":10,"./defaults":12,"./dom":13,"./events":14,"./momentum":19,"./noop":20,"./parse":21,"./text":33,"contra.emitter":2,raf:5}],9:[function(t,e){"use strict";function n(t){return t.className.replace(s,"").split(u)}function r(t,e){t.className=e.join(" ")}function a(t,e){var n=i(t,e);n.push(e),r(t,n)}function i(t,e){var a=n(t),i=a.indexOf(e);return-1!==i&&(a.splice(i,1),r(t,a)),a}function o(t,e){return-1!==n(t).indexOf(e)}var s=/^\s+|\s+$/g,u=/\s+/;e.exports={add:a,remove:i,contains:o}},{}],10:[function
(t,e){"use strict";function n(t){var e,a={};for(var i in t)e=t[i],a[i]=e?r.isMoment(e)?e.clone():e._isStylesConfiguration?n(e):e:e;return a}var r=t("./momentum");e.exports=n},{"./momentum":19}],11:[function(t,e){"use strict";function n(t,e){var n,s=r.find(t);return s?s:(n=o(t)?a(t,e):i(t,e),n.associated=t,r.assign(t,n),n)}var r=t("./index"),a=t("./input"),i=t("./inline"),o=t("./isInput");e.exports=n},{"./index":15,"./inline":16,"./input":17,"./isInput":18}],12:[function(t,e){"use strict";function n(t,e){var n,o,s=t||{};if(s.autoHideOnClick===o&&(s.autoHideOnClick=!0),s.autoHideOnBlur===o&&(s.autoHideOnBlur=!0),s.autoClose===o&&(s.autoClose=!0),s.appendTo===o&&(s.appendTo=document.body),"parent"===s.appendTo){if(!a(e.associated))throw new Error("Inline calendars must be appended to a parent node explicitly.");s.appendTo=e.associated.parentNode}if(s.invalidate===o&&(s.invalidate=!0),s.required===o&&(s.required=!1),s.date===o&&(s.date=!0),s.time===o&&(s.time=!0),s.date===!1&&s.time===!
1)throw new Error("At least one of `date` or `time` must be `true`.");if(s.inputFormat===o&&(s.inputFormat=s.date&&s.time?"YYYY-MM-DD HH:mm":s.date?"YYYY-MM-DD":"HH:mm"),s.initialValue=s.initialValue===o?null:r(s.initialValue,s.inputFormat),s.min=s.min===o?null:r(s.min,s.inputFormat),s.max=s.max===o?null:r(s.max,s.inputFormat),s.timeInterval===o&&(s.timeInterval=1800),s.min&&s.max)if(s.max.isBefore(s.min)&&(n=s.max,s.max=s.min,s.min=n),s.date===!0){if(s.max.clone().subtract(1,"days").isBefore(s.min))throw new Error("`max` must be at least one day after `min`")}else if(1e3*s.timeInterval-s.min%(1e3*s.timeInterval)>s.max-s.min)throw new Error("`min` to `max` range must allow for at least one time option that matches `timeInterval`");if(s.dateValidator===o&&(s.dateValidator=Function.prototype),s.timeValidator===o&&(s.timeValidator=Function.prototype),s.timeFormat===o&&(s.timeFormat="HH:mm"),s.weekStart===o&&(s.weekStart=i.moment().weekday(0).day()),s.weekdayFormat===o&&(s.weekdayFormat
="min"),"long"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdays();else if("short"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysShort();else if("min"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysMin();else if(!Array.isArray(s.weekdayFormat)||s.weekdayFormat.length<7)throw new Error("`weekdays` must be `min`, `short`, or `long`");s.monthsInCalendar===o&&(s.monthsInCalendar=1),s.monthFormat===o&&(s.monthFormat="MMMM YYYY"),s.dayFormat===o&&(s.dayFormat="DD"),s.styles===o&&(s.styles={}),s.styles._isStylesConfiguration=!0;var u=s.styles;return u.back===o&&(u.back="rd-back"),u.container===o&&(u.container="rd-container"),u.positioned===o&&(u.positioned="rd-container-attachment"),u.date===o&&(u.date="rd-date"),u.dayBody===o&&(u.dayBody="rd-days-body"),u.dayBodyElem===o&&(u.dayBodyElem="rd-day-body"),u.dayPrevMonth===o&&(u.dayPrevMonth="rd-day-prev-month"),u.dayNextMonth===o&&(u.dayNextMonth="rd-day-next-month"),u.dayDisabled===o&&(u.dayDisabled="rd-day-disabled"),u.dayConceal
ed===o&&(u.dayConcealed="rd-day-concealed"),u.dayHead===o&&(u.dayHead="rd-days-head"),u.dayHeadElem===o&&(u.dayHeadElem="rd-day-head"),u.dayRow===o&&(u.dayRow="rd-days-row"),u.dayTable===o&&(u.dayTable="rd-days"),u.month===o&&(u.month="rd-month"),u.monthLabel===o&&(u.monthLabel="rd-month-label"),u.next===o&&(u.next="rd-next"),u.selectedDay===o&&(u.selectedDay="rd-day-selected"),u.selectedTime===o&&(u.selectedTime="rd-time-selected"),u.time===o&&(u.time="rd-time"),u.timeList===o&&(u.timeList="rd-time-list"),u.timeOption===o&&(u.timeOption="rd-time-option"),s}var r=t("./parse"),a=t("./isInput"),i=t("./momentum");e.exports=n},{"./isInput":18,"./momentum":19,"./parse":21}],13:[function(t,e){"use strict";function n(t){var e=t||{};e.type||(e.type="div");var n=document.createElement(e.type);return e.className&&(n.className=e.className),e.text&&(n.innerText=n.textContent=e.text),e.attributes&&Object.keys(e.attributes).forEach(function(t){n.setAttribute(t,e.attributes[t])}),e.parent&&e.paren
t.appendChild(n),n}e.exports=n},{}],14:[function(t,e){"use strict";function n(t,e,n,r){return t.addEventListener(e,n,r)}function r(t,e,n,r){return t.attachEvent("on"+e,function(e){var r=e||window.event;r.target=r.target||r.srcElement,r.preventDefault=r.preventDefault||function(){r.returnValue=!1},r.stopPropagation=r.stopPropagation||function(){r.cancelBubble=!0},n.call(t,r)},r)}function a(t,e,n){return t.removeEventListener(e,n)}function i(t,e,n){return t.detachEvent("on"+e,n)}var o=n,s=a;window.addEventListener||(o=r),window.removeEventListener||(s=i),e.exports={add:o,remove:s}},{}],15:[function(t,e){"use strict";function n(t){if("number"!=typeof t&&t&&t.getAttribute)return n(t.getAttribute(i));var e=o[t];return e!==a?e:null}function r(t,e){t.setAttribute(i,e.id=o.push(e)-1)}var a,i="data-rome-id",o=[];e.exports={find:n,assign:r}},{}],16:[function(t,e){"use strict";function n(t,e){var n=e||{};return n.appendTo=t,r(n)}var r=(t("raf"),t("./calendar"));e.exports=n},{"./calendar":8,raf
:5}],17:[function(t,e){"use strict";function n(t,e){function n(n){b=i(n||e,k),u.add(k.container,b.styles.positioned),c.add(k.container,"mousedown",h),c.add(k.container,"click",f),k.getDate=w(k.getDate),k.getDateString=w(k.getDateString),k.getMoment=w(k.getMoment),b.initialValue&&(t.value=b.initialValue.format(b.inputFormat)),k.on("data",v),k.on("show",T),d(),Y(),k.hide()}function l(){d(!0)}function d(e){var r=e?"remove":"add";c[r](t,"click",y),c[r](t,"touchend",y),c[r](t,"focusin",y),c[r](t,"change",Y),c[r](t,"keypress",Y),c[r](t,"keydown",Y),c[r](t,"input",Y),b.invalidate&&c[r](t,"blur",m),c[r](window,"resize",T),e?(k.once("ready",n),k.off("destroyed",l)):(k.off("ready",n),k.once("destroyed",l))}function f(){D=!0,t.focus(),D=!1}function h(){function t(){M=!1}M=!0,a(t)}function m(){M||g()||k.emitValues()}function y(){D||k.show()}function p(){var e=t.getBoundingClientRect(),n=document.body.scrollTop||document.documentElement.scrollTop;k.container.style.top=e.top+n+t.offsetHeight+"px"
,k.container.style.left=e.left+"px"}function _(){var e=t.value.trim();if(!g()){var n=s.moment(e,b.inputFormat,b.strictParse);k.setValue(n)}}function v(e){t.value=e}function g(){return b.required===!1&&""===t.value.trim()}function w(t){return function(){return g()?null:t.apply(this,arguments)}}var b,M,D,k=o(e),Y=r(_,30),T=r(p,30);return n(e),k}var r=t("./throttle"),a=t("raf"),i=(t("./clone"),t("./defaults")),o=t("./calendar"),s=t("./momentum"),u=t("./classes"),c=t("./events");e.exports=n},{"./calendar":8,"./classes":9,"./clone":10,"./defaults":12,"./events":14,"./momentum":19,"./throttle":34,raf:5}],18:[function(t,e){"use strict";function n(t){return t&&t.nodeName&&"input"===t.nodeName.toLowerCase()}e.exports=n},{}],19:[function(t,e){"use strict";function n(t){return t&&Object.prototype.hasOwnProperty.call(t,"_isAMomentObject")}var r={moment:null,isMoment:n};e.exports=r},{}],20:[function(t,e){"use strict";function n(){}e.exports=n},{}],21:[function(t,e){"use strict";function n(t,e){r
eturn"string"==typeof t?a.moment(t,e):"[object Date]"===Object.prototype.toString.call(t)?a.moment(t):a.isMoment(t)?t.clone():void 0}function r(t,e){var r=n(t,"string"==typeof e?e:null);return r&&r.isValid()?r:null}var a=t("./momentum");e.exports=r},{"./momentum":19}],22:[function(){"use strict";Array.prototype.filter||(Array.prototype.filter=function(t,e){var n=[];return this.forEach(function(r,a,i){t.call(e,r,a,i)&&n.push(r)},e),n})},{}],23:[function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=this,r=n.length,a=0;r>a;a++)a in n&&t.call(e,n[a],a,n)})},{}],24:[function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError;var n=this.length;for(e=+e||0,1/0===Math.abs(e)?e=0:0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1})},{}],25:[function(){"use strict";Array.isArray||(Array.is
Array=function(t){return""+t!==t&&"[object Array]"===Object.prototype.toString.call(t)})},{}],26:[function(){"use strict";Array.prototype.map||(Array.prototype.map=function(t,e){var n,r,a;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),o=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=new Array(o),a=0;o>a;)a in i&&(r[a]=t.call(n,i[a],a,i)),a++;return r})},{}],27:[function(){"use strict";Array.prototype.some||(Array.prototype.some=function(t,e){var n,r;if(null==this)throw new TypeError("this is null or not defined");var a=Object(this),i=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;i>r;){if(r in a){var o=t.call(n,a[r],r,a);if(o)return!0}r++}return!1})},{}],28:[function(){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind -
what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},a=function(){var a=this instanceof r&&t?this:t,i=e.concat(Array.prototype.slice.call(arguments));return n.apply(a,i)};return r.prototype=this.prototype,a.prototype=new r,a})},{}],29:[function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;Object.keys||(Object.keys=function(a){if("object"!=typeof a&&("function"!=typeof a||null===a))throw new TypeError("Object.keys called on non-object");var i,o,s=[];for(i in a)t.call(a,i)&&s.push(i);if(e)for(o=0;r>o;o++)t.call(a,n[o])&&s.push(n[o]);return s})},{}],30:[function(){"use strict";String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},{}],31:[function(t,e){"use strict";t("./polyfills/function.bind"),t("./poly
fills/array.foreach"),t("./polyfills/array.map"),t("./polyfills/array.filter"),t("./polyfills/array.isarray"),t("./polyfills/array.indexof"),t("./polyfills/array.some"),t("./polyfills/string.trim"),t("./polyfills/object.keys");var n=t("./core"),r=t("./index"),a=t("./use");n.use=a.bind(n),n.find=r.find,n.val=t("./validators"),e.exports=n},{"./core":11,"./index":15,"./polyfills/array.filter":22,"./polyfills/array.foreach":23,"./polyfills/array.indexof":24,"./polyfills/array.isarray":25,"./polyfills/array.map":26,"./polyfills/array.some":27,"./polyfills/function.bind":28,"./polyfills/object.keys":29,"./polyfills/string.trim":30,"./use":35,"./validators":36}],32:[function(t,e){"use strict";var n=t("moment"),r=t("./rome");r.use(n),e.exports=r},{"./rome":31,moment:4}],33:[function(t,e){"use strict";function n(t,e){return 2===arguments.length&&(t.innerText=t.textContent=e),t.innerText||t.textContent}e.exports=n},{}],34:[function(t,e){"use strict";e.exports=function(t,e){var n,r=-1/0;return
function(){function a(){clearTimeout(n),n=null;var i=r+e,o=Date.now();o>i?(r=o,t.apply(this,arguments)):n=setTimeout(a,i-o)}n||a()}}},{}],35:[function(t,e){"use strict";function n(t){this.moment=r.moment=t}var r=t("./momentum");e.exports=n},{"./momentum":19}],36:[function(t,e){"use strict";function n(t){return function(e){var n=i(e);return function(r){var s=a.find(e),u=i(r),c=n||s&&s.getMoment();return c?(s&&o.add(this,s),t(u,c)):!0}}}function r(t,e){return function(n,r){function s(t){var e,n,r=a.find(t);return r?e=n=r.getMoment():Array.isArray(t)?(e=t[0],n=t[1]):e=n=t,r&&o.add(r,this),{start:i(e).startOf("day").toDate(),end:i(n).endOf("day").toDate()}}var u,c=arguments.length;return Array.isArray(n)?u=n:1===c?u=[n]:2===c&&(u=[[n,r]]),function(n){return u.map(s.bind(this))[t](e.bind(this,n))}}}var a=t("./index"),i=t("./parse"),o=t("./association"),s=n(function(t,e){return t>=e}),u=n(function(t,e){return t>e}),c=n(function(t,e){return e>=t}),l=n(function(t,e){return e>t}),d=r("every
",function(t,e){return e.start>t||e.end<t}),f=r("some",function(t,e){return e.start<=t&&e.end>=t});e.exports={afterEq:s,after:u,beforeEq:c,before:l,except:d,only:f}},{"./association":7,"./index":15,"./parse":21}]},{},[32])(32)});
\ No newline at end of file
[21/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.min.js b/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.min.js
deleted file mode 100644
index 541911f..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.rome=t()}}(function(){return function t(e,n,r){function o(i,s){if(!n[i]){if(!e[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var c=n[i]={exports:{}};e[i][0].call(c.exports,function(t){var n=e[i][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListe
ner("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(t,e){e.exports=t("./src/contra.emitter.js")},{"./src/contra.emitter.js":3}],3:[function(t,e){(function(t){!function(n,r){"use strict";function o(t,e){return Array.prototype.slice.call(t,e)}function a(t,e,n){t&&s(function(){t.apply(n||null,e||[])})}function i(t,e){var n=e||{},i={};return t===r&&(t={}),t.on=function(e,n){return i[e]?i[e].push(n):i[e]=[n],t},t.once=function(e,n){return n._once=!0,t.on(e,n),t},t.o
ff=function(e,n){var r=arguments.length;if(1===r)delete i[e];else if(0===r)i={};else{var o=i[e];if(!o)return t;o.splice(o.indexOf(n),1)}return t},t.emit=function(){var e=o(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var r=(i[e]||[]).slice(0);return function(){var s=o(arguments),u=this||t;if("error"===e&&n.throws!==!1&&!r.length)throw 1===s.length?s[0]:s;return i[e]=r.filter(function(t){return n.async?a(t,s,u):t.apply(u,s),!t._once}),t}},t}var s,u=""+r,c="function"==typeof setImmediate;s=c?function(t){setImmediate(t)}:typeof t!==u&&t.nextTick?t.nextTick:function(t){setTimeout(t,0)},typeof e!==u&&e.exports?e.exports=i:(n.contra=n.contra||{},n.contra.emitter=i)}(this)}).call(this,t("FWaASH"))},{FWaASH:1}],4:[function(t,e){for(var n=t("performance-now"),r="undefined"==typeof window?{}:window,o=["moz","webkit"],a="AnimationFrame",i=r["request"+a],s=r["cancel"+a]||r["cancelRequest"+a],u=!0,c=0;c<o.length&&!i;c++)i=r[o[c]+"Request"+a],s=r[o[c
]+"Cancel"+a]||r[o[c]+"CancelRequest"+a];if(!i||!s){u=!1;var l=0,d=0,f=[],m=1e3/60;i=function(t){if(0===f.length){var e=n(),r=Math.max(0,m-(e-l));l=r+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(n){setTimeout(function(){throw n},0)}},Math.round(r))}return f.push({handle:++d,callback:t,cancelled:!1}),d},s=function(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0)}}e.exports=function(t){return u?i.call(r,function(){try{t.apply(this,arguments)}catch(e){setTimeout(function(){throw e},0)}}):i.call(r,t)},e.exports.cancel=function(){s.apply(r,arguments)}},{"performance-now":5}],5:[function(t,e){(function(t){(function(){var n,r,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-o)/1e6},r=t.hrtime,n=function(){var t;return t=r(),1e9*t[0]+t[1]},o=n()):Date.n
ow?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("FWaASH"))},{FWaASH:1}],6:[function(t,e){"use strict";function n(t,e){var n=u[t.id];return n&&n[e.id]}function r(t,e){var n=u[t.id];n||(n=u[t.id]={});var r=a(e);n[e.id]=r,t.on("data",r),t.on("destroyed",o.bind(null,t,e))}function o(t,e){var n=u[t.id];if(n){var r=n[e.id];t.off("data",r),delete n[e.id]}}function a(t){return function(){t.refresh()}}function i(t,e){s(e.associated)||n(t,e)||r(t,e)}var s=t("./isInput"),u={};e.exports={add:i,remove:o}},{"./isInput":17}],7:[function(t,e){"use strict";function n(t){function e(){return Te}function n(n){return de=l(n||t,Te),ye||(ye=i({className:de.styles.container})),pe=de.weekdayFormat,he=pe.length,we=r,ve=r,be=r,ge=r,de.appendTo.appendChild(ye),J(ye),De=!1,fe=de.initialValue?de.initialValue:d.moment(),me=fe.clone(),Te.container=ye,Te.destroyed=!1,Te.destroy=h.bind(Te,!1),Te.emitVal
ues=z,Te.getDate=ue,Te.getDateString=ce,Te.getMoment=le,Te.hide=O,Te.options=w,Te.options.reset=b,Te.refresh=$,Te.restore=e,Te.setValue=G,Te.show=N,N(),v(),p(),Te}function p(){Te.emit("ready",c(de))}function h(t){ye&&ye.parentNode.removeChild(ye),de&&v(!0);var r=Te.emitterSnapshot("destroyed");return Te.destroyed=!0,Te.destroy=e,Te.emitValues=e,Te.getDate=y,Te.getDateString=y,Te.getMoment=y,Te.hide=e,Te.options=e,Te.options.reset=e,Te.refresh=e,Te.restore=n,Te.setValue=e,Te.show=e,Te.off(),t!==!0&&r(),Te}function v(t){var e=t?"remove":"add";de.autoHideOnBlur&&m[e](document.documentElement,"focus",H,!0),de.autoHideOnClick&&m[e](document,"click",S)}function w(t){return 0===arguments.length?c(de):(h(),n(t),Te)}function b(){return w({appendTo:de.appendTo})}function g(){De||(De=!0,x(),k(),Te.emit("render"))}function x(){function t(t){var e=i({className:de.styles.month,parent:xe});0===t&&(ke=i({type:"button",className:de.styles.back,attributes:{type:"button"},parent:e})),t===de.monthsInCa
lendar-1&&(Ee=i({type:"button",className:de.styles.next,attributes:{type:"button"},parent:e}));var n,r=i({className:de.styles.monthLabel,parent:e}),o=i({type:"table",className:de.styles.dayTable,parent:e}),a=i({type:"thead",className:de.styles.dayHead,parent:o}),s=i({type:"tr",className:de.styles.dayRow,parent:a}),u=i({type:"tbody",className:de.styles.dayBody,parent:o});for(n=0;he>n;n++)i({type:"th",className:de.styles.dayHeadElem,parent:s,text:pe[E(n)]});u.setAttribute(Me,t),Ce.push({label:r,body:u})}if(de.date){var e;for(Ce=[],xe=i({className:de.styles.date,parent:ye}),e=0;e<de.monthsInCalendar;e++)t(e);m.add(ke,"click",V),m.add(Ee,"click",B),m.add(xe,"click",re)}}function k(){if(de.time&&de.timeInterval){var t=i({className:de.styles.time,parent:ye});Fe=i({className:de.styles.selectedTime,parent:t,text:fe.format(de.timeFormat)}),m.add(Fe,"click",A),Ae=i({className:de.styles.timeList,parent:t}),m.add(Ae,"click",se);for(var e=d.moment("00:00:00","HH:mm:ss"),n=e.clone().add(1,"days")
;e.isBefore(n);)i({className:de.styles.timeOption,parent:Ae,text:e.format(de.timeFormat)}),e.add(de.timeInterval,"seconds")}}function E(t,e){var n=e?-1:1,r=t+de.weekStart*n;return(r>=he||0>r)&&(r+=he*-n),r}function F(){if(de.time&&De){var t,e,n,r,o=Ae.children,a=o.length;for(r=0;a>r;r++)n=o[r],e=d.moment(s(n),de.timeFormat),t=ie(fe.clone(),e),n.style.display=U(t,!1,de.timeValidator)?"block":"none"}}function A(t){var e="boolean"==typeof t?t:"none"===Ae.style.display;e?T():D()}function T(){Ae&&(Ae.style.display="block")}function D(){Ae&&(Ae.style.display="none")}function M(){ye.style.display="inline-block",Te.emit("show")}function C(){ye.style.display="none",Te.emit("hide")}function N(){return g(),$(),A(!de.date),M(),Te}function O(){return D(),a(C),Te}function I(){D();var t=f.contains(ye,de.styles.positioned);return t&&a(C),Te}function j(t){var e=t.target;if(e===Te.associated)return!0;for(;e;){if(e===ye)return!0;e=e.parentNode}}function H(t){j(t)||I()}function S(t){j(t)||I()}function
V(){L("subtract")}function B(){L("add")}function L(t){var e,n="add"===t?-1:1,r=de.monthsInCalendar+n*ae(ge);me[t](r,"months"),e=te(me.clone()),fe=e||fe,e&&(me=e.clone()),q()}function q(t){P(),W(),t!==!0&&z(),F()}function P(){function t(t,e){var n=me.clone().add(e,"months");s(t.label,n.format(de.monthFormat)),J(t.body)}if(de.date&&De){var e=me.year(),n=me.month(),r=me.date();if(r!==be||n!==we||e!==ve){var o=R();if(be=me.date(),we=me.month(),ve=me.year(),o)return Y(),void 0;Ce.forEach(t),K()}}}function Y(){function t(t){var e,n=[];for(e=0;e<t.length;e++)n.push(t[e]);return n}function e(e){return t(e.children)}function n(t){return!f.contains(t,de.styles.dayPrevMonth)&&!f.contains(t,de.styles.dayNextMonth)}var r=me.date()-1;oe(!1),Ce.forEach(function(o){var a;_(o.date,me)&&(a=t(o.body.children).map(e),a=Array.prototype.concat.apply([],a).filter(n),oe(a[r]))})}function R(){function t(t){return ve?_(t.date,me):!1}return Ce.some(t)}function _(t,e){return t&&e&&t.year()===e.year()&&t.month(
)===e.month()}function W(){de.time&&De&&s(Fe,fe.format(de.timeFormat))}function z(){return Te.emit("data",ce()),Te.emit("year",fe.year()),Te.emit("month",fe.month()),Te.emit("day",fe.day()),Te.emit("time",fe.format(de.timeFormat)),Te}function $(){return ve=!1,we=!1,be=!1,q(!0),Te}function G(t){var e=u(t,de.inputFormat);if(null!==e)return fe=te(e)||fe,me=fe.clone(),q(!0),Te}function J(t,e){for(;t&&t.firstChild;)t.removeChild(t.firstChild);e===!0&&t.parentNode.removeChild(t)}function K(){var t;for(t=0;t<de.monthsInCalendar;t++)Q(t)}function Q(t){function e(t){var e,r,o;for(e=0;e<t.length;e++)f.children.length===he&&(f=i({type:"tr",className:de.styles.dayRow,parent:a.body})),r=t.base.clone().add(e,"days"),o=i({type:"td",parent:f,text:r.format(de.dayFormat),className:n(r,t.cell.join(" ").split(" ")).join(" ")}),t.selectable&&r.date()===c&&oe(o)}function n(t,e){return U(t,!0,de.dateValidator)||e.push(p),e}function r(t,e){return t&&e.push(de.styles.dayConcealed),e}var o,a=Ce[t],s=me.clone
().add(t,"months"),u=s.daysInMonth(),c=s.month()!==fe.month()?-1:fe.date(),l=s.clone().date(1),d=E(l.day(),!0),f=i({type:"tr",className:de.styles.dayRow,parent:a.body}),m=r(0!==t,[de.styles.dayBodyElem,de.styles.dayPrevMonth]),y=r(t!==de.monthsInCalendar-1,[de.styles.dayBodyElem,de.styles.dayNextMonth]),p=de.styles.dayDisabled;e({base:l.clone().subtract(d,"days"),length:d,cell:m}),e({base:l.clone(),length:u,cell:[de.styles.dayBodyElem],selectable:!0}),o=l.clone().add(u,"days"),e({base:o,length:he-f.children.length,cell:y}),ke.disabled=!X(l,!0),Ee.disabled=!Z(o,!0),a.date=s.clone()}function U(t,e,n){if(!X(t,e))return!1;if(!Z(t,e))return!1;var r=(n||Function.prototype).call(Te,t.toDate());return r!==!1}function X(t,e){var n=de.min?e?de.min.clone().startOf("day"):de.min:!1;return!n||!t.isBefore(n)}function Z(t,e){var n=de.max?e?de.max.clone().endOf("day"):de.max:!1;return!n||!t.isAfter(n)}function te(t){if(de.min&&t.isBefore(de.min))return te(de.min.clone());if(de.max&&t.isAfter(de.max
))return te(de.max.clone());var e=t.clone().subtract(1,"days");return ne(e,t,"add")?ee(e):(e=t.clone(),ne(e,t,"subtract")?ee(e):void 0)}function ee(t){var e,n=t.clone().subtract(de.timeInterval,"seconds"),r=Math.ceil(Ne/de.timeInterval);for(e=0;r>e;e++)if(n.add(de.timeInterval,"seconds"),n.date()>t.date()&&n.subtract(1,"days"),de.timeValidator.call(Te,n.toDate())!==!1)return n}function ne(t,e,n){for(var r=!1;r===!1&&(t[n](1,"days"),t.month()===e.month());)r=de.dateValidator.call(Te,t.toDate());return r!==!1}function re(t){var e=t.target;if(!f.contains(e,de.styles.dayDisabled)&&f.contains(e,de.styles.dayBodyElem)){var n=parseInt(s(e),10),r=f.contains(e,de.styles.dayPrevMonth),o=f.contains(e,de.styles.dayNextMonth),a=ae(e)-ae(ge);fe.add(a,"months"),(r||o)&&fe.add(r?-1:1,"months"),oe(e),fe.date(n),ie(fe,te(fe)||fe),me=fe.clone(),de.autoClose===!0&&I(),q()}}function oe(t){ge&&f.remove(ge,de.styles.selectedDay),t&&f.add(t,de.styles.selectedDay),ge=t}function ae(t){for(var e;t&&t.getAttri
bute;){if(e=t.getAttribute(Me),"string"==typeof e)return parseInt(e,10);t=t.parentNode}return 0}function ie(t,e){return t.hour(e.hour()).minute(e.minute()).second(e.second()),t}function se(t){var e=t.target;if(f.contains(e,de.styles.timeOption)){var n=d.moment(s(e),de.timeFormat);ie(fe,n),me=fe.clone(),z(),W(),!de.date&&de.autoClose===!0||"time"===de.autoClose?I():D()}}function ue(){return fe.toDate()}function ce(t){return fe.format(t||de.inputFormat)}function le(){return fe.clone()}var de,fe,me,ye,pe,he,ve,we,be,ge,xe,ke,Ee,Fe,Ae,Te=o({}),De=!1,Me="data-rome-offset",Ce=[],Ne=86400;return n(),a(p),Te}var r,o=t("contra.emitter"),a=t("raf"),i=t("./dom"),s=t("./text"),u=t("./parse"),c=t("./clone"),l=t("./defaults"),d=t("./momentum"),f=t("./classes"),m=t("./events"),y=t("./noop");e.exports=n},{"./classes":8,"./clone":9,"./defaults":11,"./dom":12,"./events":13,"./momentum":18,"./noop":19,"./parse":20,"./text":32,"contra.emitter":2,raf:4}],8:[function(t,e){"use strict";function n(t){retur
n t.className.replace(s,"").split(u)}function r(t,e){t.className=e.join(" ")}function o(t,e){var n=a(t,e);n.push(e),r(t,n)}function a(t,e){var o=n(t),a=o.indexOf(e);return-1!==a&&(o.splice(a,1),r(t,o)),o}function i(t,e){return-1!==n(t).indexOf(e)}var s=/^\s+|\s+$/g,u=/\s+/;e.exports={add:o,remove:a,contains:i}},{}],9:[function(t,e){"use strict";function n(t){var e,o={};for(var a in t)e=t[a],o[a]=e?r.isMoment(e)?e.clone():e._isStylesConfiguration?n(e):e:e;return o}var r=t("./momentum");e.exports=n},{"./momentum":18}],10:[function(t,e){"use strict";function n(t,e){var n,s=r.find(t);return s?s:(n=i(t)?o(t,e):a(t,e),n.associated=t,r.assign(t,n),n)}var r=t("./index"),o=t("./input"),a=t("./inline"),i=t("./isInput");e.exports=n},{"./index":14,"./inline":15,"./input":16,"./isInput":17}],11:[function(t,e){"use strict";function n(t,e){var n,i,s=t||{};if(s.autoHideOnClick===i&&(s.autoHideOnClick=!0),s.autoHideOnBlur===i&&(s.autoHideOnBlur=!0),s.autoClose===i&&(s.autoClose=!0),s.appendTo===i&&(
s.appendTo=document.body),"parent"===s.appendTo){if(!o(e.associated))throw new Error("Inline calendars must be appended to a parent node explicitly.");s.appendTo=e.associated.parentNode}if(s.invalidate===i&&(s.invalidate=!0),s.required===i&&(s.required=!1),s.date===i&&(s.date=!0),s.time===i&&(s.time=!0),s.date===!1&&s.time===!1)throw new Error("At least one of `date` or `time` must be `true`.");if(s.inputFormat===i&&(s.inputFormat=s.date&&s.time?"YYYY-MM-DD HH:mm":s.date?"YYYY-MM-DD":"HH:mm"),s.initialValue=s.initialValue===i?null:r(s.initialValue,s.inputFormat),s.min=s.min===i?null:r(s.min,s.inputFormat),s.max=s.max===i?null:r(s.max,s.inputFormat),s.timeInterval===i&&(s.timeInterval=1800),s.min&&s.max)if(s.max.isBefore(s.min)&&(n=s.max,s.max=s.min,s.min=n),s.date===!0){if(s.max.clone().subtract(1,"days").isBefore(s.min))throw new Error("`max` must be at least one day after `min`")}else if(1e3*s.timeInterval-s.min%(1e3*s.timeInterval)>s.max-s.min)throw new Error("`min` to `max` rang
e must allow for at least one time option that matches `timeInterval`");if(s.dateValidator===i&&(s.dateValidator=Function.prototype),s.timeValidator===i&&(s.timeValidator=Function.prototype),s.timeFormat===i&&(s.timeFormat="HH:mm"),s.weekStart===i&&(s.weekStart=a.moment().weekday(0).day()),s.weekdayFormat===i&&(s.weekdayFormat="min"),"long"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdays();else if("short"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdaysShort();else if("min"===s.weekdayFormat)s.weekdayFormat=a.moment.weekdaysMin();else if(!Array.isArray(s.weekdayFormat)||s.weekdayFormat.length<7)throw new Error("`weekdays` must be `min`, `short`, or `long`");s.monthsInCalendar===i&&(s.monthsInCalendar=1),s.monthFormat===i&&(s.monthFormat="MMMM YYYY"),s.dayFormat===i&&(s.dayFormat="DD"),s.styles===i&&(s.styles={}),s.styles._isStylesConfiguration=!0;var u=s.styles;return u.back===i&&(u.back="rd-back"),u.container===i&&(u.container="rd-container"),u.positioned===i&&(u.positioned=
"rd-container-attachment"),u.date===i&&(u.date="rd-date"),u.dayBody===i&&(u.dayBody="rd-days-body"),u.dayBodyElem===i&&(u.dayBodyElem="rd-day-body"),u.dayPrevMonth===i&&(u.dayPrevMonth="rd-day-prev-month"),u.dayNextMonth===i&&(u.dayNextMonth="rd-day-next-month"),u.dayDisabled===i&&(u.dayDisabled="rd-day-disabled"),u.dayConcealed===i&&(u.dayConcealed="rd-day-concealed"),u.dayHead===i&&(u.dayHead="rd-days-head"),u.dayHeadElem===i&&(u.dayHeadElem="rd-day-head"),u.dayRow===i&&(u.dayRow="rd-days-row"),u.dayTable===i&&(u.dayTable="rd-days"),u.month===i&&(u.month="rd-month"),u.monthLabel===i&&(u.monthLabel="rd-month-label"),u.next===i&&(u.next="rd-next"),u.selectedDay===i&&(u.selectedDay="rd-day-selected"),u.selectedTime===i&&(u.selectedTime="rd-time-selected"),u.time===i&&(u.time="rd-time"),u.timeList===i&&(u.timeList="rd-time-list"),u.timeOption===i&&(u.timeOption="rd-time-option"),s}var r=t("./parse"),o=t("./isInput"),a=t("./momentum");e.exports=n},{"./isInput":17,"./momentum":18,"./par
se":20}],12:[function(t,e){"use strict";function n(t){var e=t||{};e.type||(e.type="div");var n=document.createElement(e.type);return e.className&&(n.className=e.className),e.text&&(n.innerText=n.textContent=e.text),e.attributes&&Object.keys(e.attributes).forEach(function(t){n.setAttribute(t,e.attributes[t])}),e.parent&&e.parent.appendChild(n),n}e.exports=n},{}],13:[function(t,e){"use strict";function n(t,e,n,r){return t.addEventListener(e,n,r)}function r(t,e,n,r){return t.attachEvent("on"+e,function(e){var r=e||window.event;r.target=r.target||r.srcElement,r.preventDefault=r.preventDefault||function(){r.returnValue=!1},r.stopPropagation=r.stopPropagation||function(){r.cancelBubble=!0},n.call(t,r)},r)}function o(t,e,n){return t.removeEventListener(e,n)}function a(t,e,n){return t.detachEvent("on"+e,n)}var i=n,s=o;window.addEventListener||(i=r),window.removeEventListener||(s=a),e.exports={add:i,remove:s}},{}],14:[function(t,e){"use strict";function n(t){if("number"!=typeof t&&t&&t.getAt
tribute)return n(t.getAttribute(a));var e=i[t];return e!==o?e:null}function r(t,e){t.setAttribute(a,e.id=i.push(e)-1)}var o,a="data-rome-id",i=[];e.exports={find:n,assign:r}},{}],15:[function(t,e){"use strict";function n(t,e){var n=e||{};return n.appendTo=t,r(n)}var r=(t("raf"),t("./calendar"));e.exports=n},{"./calendar":7,raf:4}],16:[function(t,e){"use strict";function n(t,e){function n(n){x=a(n||e,F),u.add(F.container,x.styles.positioned),c.add(F.container,"mousedown",m),c.add(F.container,"click",f),F.getDate=g(F.getDate),F.getDateString=g(F.getDateString),F.getMoment=g(F.getMoment),x.initialValue&&(t.value=x.initialValue.format(x.inputFormat)),F.on("data",w),F.on("show",T),d(),A(),F.hide()}function l(){d(!0)}function d(e){var r=e?"remove":"add";c[r](t,"click",p),c[r](t,"touchend",p),c[r](t,"focusin",p),c[r](t,"change",A),c[r](t,"keypress",A),c[r](t,"keydown",A),c[r](t,"input",A),x.invalidate&&c[r](t,"blur",y),c[r](window,"resize",T),e?(F.once("ready",n),F.off("destroyed",l)):(F.o
ff("ready",n),F.once("destroyed",l))}function f(){E=!0,t.focus(),E=!1}function m(){function t(){k=!1}k=!0,o(t)}function y(){k||b()||F.emitValues()}function p(){E||F.show()}function h(){var e=t.getBoundingClientRect(),n=document.body.scrollTop||document.documentElement.scrollTop;F.container.style.top=e.top+n+t.offsetHeight+"px",F.container.style.left=e.left+"px"}function v(){var e=t.value.trim();if(!b()){var n=s.moment(e,x.inputFormat,x.strictParse);F.setValue(n)}}function w(e){t.value=e}function b(){return x.required===!1&&""===t.value.trim()}function g(t){return function(){return b()?null:t.apply(this,arguments)}}var x,k,E,F=i(e),A=r(v,30),T=r(h,30);return n(e),F}var r=t("./throttle"),o=t("raf"),a=(t("./clone"),t("./defaults")),i=t("./calendar"),s=t("./momentum"),u=t("./classes"),c=t("./events");e.exports=n},{"./calendar":7,"./classes":8,"./clone":9,"./defaults":11,"./events":13,"./momentum":18,"./throttle":33,raf:4}],17:[function(t,e){"use strict";function n(t){return t&&t.nodeNam
e&&"input"===t.nodeName.toLowerCase()}e.exports=n},{}],18:[function(t,e){"use strict";function n(t){return t&&Object.prototype.hasOwnProperty.call(t,"_isAMomentObject")}var r={moment:null,isMoment:n};e.exports=r},{}],19:[function(t,e){"use strict";function n(){}e.exports=n},{}],20:[function(t,e){"use strict";function n(t,e){return"string"==typeof t?o.moment(t,e):"[object Date]"===Object.prototype.toString.call(t)?o.moment(t):o.isMoment(t)?t.clone():void 0}function r(t,e){var r=n(t,"string"==typeof e?e:null);return r&&r.isValid()?r:null}var o=t("./momentum");e.exports=r},{"./momentum":18}],21:[function(){"use strict";Array.prototype.filter||(Array.prototype.filter=function(t,e){var n=[];return this.forEach(function(r,o,a){t.call(e,r,o,a)&&n.push(r)},e),n})},{}],22:[function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=this,r=n.length,o=0;r>o;o++)o in n&&t.call(e,n[o],o,
n)})},{}],23:[function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError;var n=this.length;for(e=+e||0,1/0===Math.abs(e)?e=0:0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1})},{}],24:[function(){"use strict";Array.isArray||(Array.isArray=function(t){return""+t!==t&&"[object Array]"===Object.prototype.toString.call(t)})},{}],25:[function(){"use strict";Array.prototype.map||(Array.prototype.map=function(t,e){var n,r,o;if(null==this)throw new TypeError("this is null or not defined");var a=Object(this),i=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=new Array(i),o=0;i>o;)o in a&&(r[o]=t.call(n,a[o],o,a)),o++;return r})},{}],26:[function(){"use strict";Array.prototype.some||(Array.prototype.some=function(t,e){var n,r;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),a=o.length>>>0;if("function"!
=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;a>r;){if(r in o){var i=t.call(n,o[r],r,o);if(i)return!0}r++}return!1})},{}],27:[function(){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},o=function(){var o=this instanceof r&&t?this:t,a=e.concat(Array.prototype.slice.call(arguments));return n.apply(o,a)};return r.prototype=this.prototype,o.prototype=new r,o})},{}],28:[function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;Object.keys||(Object.keys=function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on
non-object");var a,i,s=[];for(a in o)t.call(o,a)&&s.push(a);if(e)for(i=0;r>i;i++)t.call(o,n[i])&&s.push(n[i]);return s})},{}],29:[function(){"use strict";String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},{}],30:[function(t,e){"use strict";t("./polyfills/function.bind"),t("./polyfills/array.foreach"),t("./polyfills/array.map"),t("./polyfills/array.filter"),t("./polyfills/array.isarray"),t("./polyfills/array.indexof"),t("./polyfills/array.some"),t("./polyfills/string.trim"),t("./polyfills/object.keys");var n=t("./core"),r=t("./index"),o=t("./use");n.use=o.bind(n),n.find=r.find,n.val=t("./validators"),e.exports=n},{"./core":10,"./index":14,"./polyfills/array.filter":21,"./polyfills/array.foreach":22,"./polyfills/array.indexof":23,"./polyfills/array.isarray":24,"./polyfills/array.map":25,"./polyfills/array.some":26,"./polyfills/function.bind":27,"./polyfills/object.keys":28,"./polyfills/string.trim":29,"./use":34,"./validators":35}],31:[fu
nction(t,e){(function(n){var r=t("./rome"),o=t("./momentum");if(r.use(n.moment),void 0===o.moment)throw new Error("rome depends on moment.js, you can get it at http://momentjs.com, or you could use the bundled distribution file instead.");e.exports=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./momentum":18,"./rome":30}],32:[function(t,e){"use strict";function n(t,e){return 2===arguments.length&&(t.innerText=t.textContent=e),t.innerText||t.textContent}e.exports=n},{}],33:[function(t,e){"use strict";e.exports=function(t,e){var n,r=-1/0;return function(){function o(){clearTimeout(n),n=null;var a=r+e,i=Date.now();i>a?(r=i,t.apply(this,arguments)):n=setTimeout(o,a-i)}n||o()}}},{}],34:[function(t,e){"use strict";function n(t){this.moment=r.moment=t}var r=t("./momentum");e.exports=n},{"./momentum":18}],35:[function(t,e){"use strict";function n(t){return function(e){var n=a(e);return function(r){var s=o.find(e),u=a(r),c=n||s&&s.getMoment();return c?(
s&&i.add(this,s),t(u,c)):!0}}}function r(t,e){return function(n,r){function s(t){var e,n,r=o.find(t);return r?e=n=r.getMoment():Array.isArray(t)?(e=t[0],n=t[1]):e=n=t,r&&i.add(r,this),{start:a(e).startOf("day").toDate(),end:a(n).endOf("day").toDate()}}var u,c=arguments.length;return Array.isArray(n)?u=n:1===c?u=[n]:2===c&&(u=[[n,r]]),function(n){return u.map(s.bind(this))[t](e.bind(this,n))}}}var o=t("./index"),a=t("./parse"),i=t("./association"),s=n(function(t,e){return t>=e}),u=n(function(t,e){return t>e}),c=n(function(t,e){return e>=t}),l=n(function(t,e){return e>t}),d=r("every",function(t,e){return e.start>t||e.end<t}),f=r("some",function(t,e){return e.start<=t&&e.end>=t});e.exports={afterEq:s,after:u,beforeEq:c,before:l,except:d,only:f}},{"./association":6,"./index":14,"./parse":20}]},{},[31])(31)});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/pom.xml
----------------------------------------------------------------------
diff --git a/htrace-htraced/pom.xml b/htrace-htraced/pom.xml
index 6995ed4..0e951ad 100644
--- a/htrace-htraced/pom.xml
+++ b/htrace-htraced/pom.xml
@@ -99,6 +99,53 @@ language governing permissions and limitations under the License. -->
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <id>go_compile</id>
+ <goals><goal>run</goal></goals>
+ <configuration>
+ <tasks>
+ <exec executable="./gobuild.sh"
+ dir="${basedir}/src/go/"
+ failonerror="true">
+ <env key="RELEASE_VERSION" value="${project.version}"/>
+ </exec>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test</phase>
+ <id>go_test</id>
+ <goals><goal>run</goal></goals>
+ <configuration>
+ <tasks>
+ <exec executable="bash" failonerror="true" dir="${basedir}/src/go">
+ <arg value="-c"/>
+ <arg value="[ x$SKIPTESTS = xtrue ] || ./gobuild.sh test"/>
+ <env key="SKIPTESTS" value="${skipTests}"/>
+ </exec>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>clean</phase>
+ <id>go_clean</id>
+ <goals><goal>run</goal></goals>
+ <configuration>
+ <tasks>
+ <exec executable="bash" failonerror="true" dir="${basedir}/src/go">
+ <arg value="-c"/>
+ <arg value="./gobuild.sh clean"/>
+ </exec>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/BUILDING.txt
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/BUILDING.txt b/htrace-htraced/src/go/BUILDING.txt
new file mode 100644
index 0000000..d54d410
--- /dev/null
+++ b/htrace-htraced/src/go/BUILDING.txt
@@ -0,0 +1,30 @@
+Building the HTrace Go code
+===========================
+The htrace go code consists of 4 main parts:
+* The "htraced" standalone server
+ This is a server which accepts trace spans, and services REST queries.
+
+* The "htrace" command-line program which can query the server
+ This is a simple command-line program which can query the htrace server.
+
+* The htraced Javascript Web UI (not yet implemented)
+
+* The htrace go client library (not yet implemented)
+ This is the equivalent of the Java HTrace client library, but written in Go.
+
+You can build all these parts simply by running "gobuild.sh".
+The binaries will be created in bin/.
+
+Dependencies
+============
+You will need to install:
+* The Go programming language
+* The development package for leveldb (some Linux distros call this "leveldb-devel") containing libleveldb.so
+
+htraced requires libleveldb.so to be in your shared library path in order to run.
+You can set LD_LIBRARY_PATH to the path for this library, or simply install
+libleveldb.so to your system library path.
+
+Testing
+=======
+You can run the unit tests by running "./gobuild.sh test"
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/Godeps/Godeps.json b/htrace-htraced/src/go/Godeps/Godeps.json
new file mode 100644
index 0000000..10c8e5d
--- /dev/null
+++ b/htrace-htraced/src/go/Godeps/Godeps.json
@@ -0,0 +1,26 @@
+{
+ "ImportPath": "git-wip-us.apache.org/repos/asf/incubator-htrace.git",
+ "GoVersion": "go1.3.1",
+ "Deps": [
+ {
+ "ImportPath": "github.com/alecthomas/kingpin",
+ "Rev": "afafa8aab106d31c9dc8f5e562b3f30f6246c3d4"
+ },
+ {
+ "ImportPath": "github.com/alecthomas/units",
+ "Rev": "6b4e7dc5e3143b85ea77909c72caf89416fc2915"
+ },
+ {
+ "ImportPath": "github.com/gorilla/context",
+ "Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd"
+ },
+ {
+ "ImportPath": "github.com/gorilla/mux",
+ "Rev": "e444e69cbd2e2e3e0749a2f3c717cec491552bbf"
+ },
+ {
+ "ImportPath": "github.com/jmhodges/levigo",
+ "Rev": "2c43dde93d0e056173706534afd514fcbc1dd578"
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/format.sh
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/format.sh b/htrace-htraced/src/go/format.sh
new file mode 100755
index 0000000..46aa5b1
--- /dev/null
+++ b/htrace-htraced/src/go/format.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Reformats the HTrace code.
+#
+# ./format.sh Reformats all code.
+#
+
+die() {
+ echo $@
+ exit 1
+}
+
+# Check for gofmt. It should be installed whenever the go developement tools
+# are installed.
+which gofmt &> /dev/null
+[ $? -ne 0 ] && die "You must install the gofmt code reformatting formatting tool."
+
+# Find go sources. We assume no newlines or whitespace in file names.
+SCRIPT_DIR="$(cd "$( dirname $0 )" && pwd)"
+find "${SCRIPT_DIR}/src" -noleaf -xdev -name '*.go' | xargs -L 1 gofmt -w
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/gobuild.sh
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/gobuild.sh b/htrace-htraced/src/go/gobuild.sh
new file mode 100755
index 0000000..1a4e5f1
--- /dev/null
+++ b/htrace-htraced/src/go/gobuild.sh
@@ -0,0 +1,111 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Builds the HTrace server code.
+#
+# ./build.sh Builds the code.
+# ./build.sh test Builds and runs all unit tests.
+# ./build.sh bench Builds and runs all benchmarks
+#
+
+die() {
+ echo $@
+ exit 1
+}
+
+ACTION=install
+if [ $# -gt 0 ]; then
+ ACTION="${1}"
+ shift
+fi
+RELEASE_VERSION=${RELEASE_VERSION:-unknown}
+
+# Set up directories. The build/ directory is where build dependencies and
+# build binaries should go.
+SCRIPT_DIR="$(cd "$( dirname $0 )" && pwd)"
+export GOBIN="${SCRIPT_DIR}/build"
+mkdir -p "${GOBIN}" || die "failed to mkdir -p ${GOBIN}"
+cd "${GOBIN}" || die "failed to cd to ${SCRIPT_DIR}"
+export GOPATH="${GOBIN}:${SCRIPT_DIR}"
+
+# Check for go
+which go &> /dev/null
+if [ $? -ne 0 ]; then
+ cat <<EOF
+You must install the Golang programming language.
+
+If you are using Debian, try "apt-get install golang".
+For Red Hat, try "yum install go".
+For other distributions and operating systems use your packaging tool.
+EOF
+exit 1
+fi
+
+# Check for libleveldb.so
+if [ -x "/sbin/ldconfig" ]; then
+ # Suse requires ldconfig to be run via the absolute path
+ ldconfig=/sbin/ldconfig
+else
+ which ldconfig &> /dev/null
+ [ $? -eq 0 ] && ldconfig=ldconfig
+fi
+if [ -n "${ldconfig}" ]; then
+ if "${ldconfig}" -p | grep -q libleveldb; then
+ :
+ else
+ echo "You must install the leveldb-devel package (or distro-specific equivalent.)"
+ exit 1
+ fi
+fi
+
+case $ACTION in
+clean)
+ rm -rf -- "${GOBIN}" ${SCRIPT_DIR}/pkg
+ ;;
+install)
+ # Ensure that we have the godep program.
+ PATH="${PATH}:${GOBIN}"
+ which godep &> /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Installing godep..."
+ go get github.com/tools/godep || die "failed to get godep"
+ fi
+
+ # Download dependencies into the build directory.
+ echo "godep restore..."
+ godep restore || die "failed to set up dependencies"
+
+ # Discover the git version
+ GIT_VERSION=$(git rev-parse HEAD)
+ [ $? -eq 0 ] || GIT_VERSION="unknown"
+
+ # Inject the release and git version into the htraced ldflags.
+ FLAGS="-X main.RELEASE_VERSION ${RELEASE_VERSION} -X main.GIT_VERSION ${GIT_VERSION}"
+ go install -ldflags "${FLAGS}" -v org/apache/htrace/... "$@"
+ ;;
+bench)
+ go test org/apache/htrace/... -test.bench=. "$@"
+ ;;
+*)
+ go ${ACTION} org/apache/htrace/... "$@"
+ ;;
+esac
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/client/client.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/client/client.go b/htrace-htraced/src/go/src/org/apache/htrace/client/client.go
new file mode 100644
index 0000000..44e2f69
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/client/client.go
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package client
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+)
+
+// A golang client for htraced.
+// TODO: fancier APIs for streaming spans in the background, optimize TCP stuff
+
+func NewClient(cnf *conf.Config) (*Client, error) {
+ hcl := Client{}
+ hcl.restAddr = cnf.Get(conf.HTRACE_WEB_ADDRESS)
+ if cnf.Get(conf.HTRACE_HRPC_ADDRESS) != "" {
+ var err error
+ hcl.hcr, err = newHClient(cnf)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return &hcl, nil
+}
+
+type Client struct {
+ // REST address of the htraced server.
+ restAddr string
+
+ // The HRPC client, or null if it is not enabled.
+ hcr *hClient
+}
+
+// Get the htraced server information.
+func (hcl *Client) GetServerInfo() (*common.ServerInfo, error) {
+ buf, _, err := hcl.makeGetRequest("server/info")
+ if err != nil {
+ return nil, err
+ }
+ var info common.ServerInfo
+ err = json.Unmarshal(buf, &info)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error: error unmarshalling response "+
+ "body %s: %s", string(buf), err.Error()))
+ }
+ return &info, nil
+}
+
+// Get information about a trace span. Returns nil, nil if the span was not found.
+func (hcl *Client) FindSpan(sid common.SpanId) (*common.Span, error) {
+ buf, rc, err := hcl.makeGetRequest(fmt.Sprintf("span/%016x", uint64(sid)))
+ if err != nil {
+ if rc == http.StatusNoContent {
+ return nil, nil
+ }
+ return nil, err
+ }
+ var span common.Span
+ err = json.Unmarshal(buf, &span)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error unmarshalling response "+
+ "body %s: %s", string(buf), err.Error()))
+ }
+ return &span, nil
+}
+
+func (hcl *Client) WriteSpans(req *common.WriteSpansReq) error {
+ if hcl.hcr != nil {
+ return hcl.hcr.writeSpans(req)
+ } else {
+ return hcl.writeSpansHttp(req)
+ }
+}
+
+func (hcl *Client) writeSpansHttp(req *common.WriteSpansReq) error {
+ var w bytes.Buffer
+ var err error
+ for i := range req.Spans {
+ var buf []byte
+ buf, err = json.Marshal(req.Spans[i])
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error serializing span: %s",
+ err.Error()))
+ }
+ _, err = w.Write(buf)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error writing span: %s",
+ err.Error()))
+ }
+ _, err = w.Write([]byte{'\n'})
+ //err = io.WriteString(&w, "\n")
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error writing: %s",
+ err.Error()))
+ }
+ }
+ customHeaders := make(map[string]string)
+ if req.DefaultPid != "" {
+ customHeaders["htrace-pid"] = req.DefaultPid
+ }
+ _, _, err = hcl.makeRestRequest("POST", "writeSpans",
+ &w, customHeaders)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// Find the child IDs of a given span ID.
+func (hcl *Client) FindChildren(sid common.SpanId, lim int) ([]common.SpanId, error) {
+ buf, _, err := hcl.makeGetRequest(fmt.Sprintf("span/%016x/children?lim=%d",
+ uint64(sid), lim))
+ if err != nil {
+ return nil, err
+ }
+ var spanIds []common.SpanId
+ err = json.Unmarshal(buf, &spanIds)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error: error unmarshalling response "+
+ "body %s: %s", string(buf), err.Error()))
+ }
+ return spanIds, nil
+}
+
+// Make a query
+func (hcl *Client) Query(query *common.Query) ([]common.Span, error) {
+ in, err := json.Marshal(query)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error marshalling query: %s", err.Error()))
+ }
+ var out []byte
+ var url = fmt.Sprintf("query?query=%s", in)
+ out, _, err = hcl.makeGetRequest(url)
+ if err != nil {
+ return nil, err
+ }
+ var spans []common.Span
+ err = json.Unmarshal(out, &spans)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error unmarshalling results: %s", err.Error()))
+ }
+ return spans, nil
+}
+
+var EMPTY = make(map[string]string)
+
+func (hcl *Client) makeGetRequest(reqName string) ([]byte, int, error) {
+ return hcl.makeRestRequest("GET", reqName, nil, EMPTY)
+}
+
+// Make a general JSON REST request.
+// Returns the request body, the response code, and the error.
+// Note: if the response code is non-zero, the error will also be non-zero.
+func (hcl *Client) makeRestRequest(reqType string, reqName string, reqBody io.Reader,
+ customHeaders map[string]string) ([]byte, int, error) {
+ url := fmt.Sprintf("http://%s/%s",
+ hcl.restAddr, reqName)
+ req, err := http.NewRequest(reqType, url, reqBody)
+ req.Header.Set("Content-Type", "application/json")
+ for k, v := range customHeaders {
+ req.Header.Set(k, v)
+ }
+ client := &http.Client{}
+ resp, err := client.Do(req)
+ if err != nil {
+ return nil, -1, errors.New(fmt.Sprintf("Error: error making http request to %s: %s\n", url,
+ err.Error()))
+ }
+ defer resp.Body.Close()
+ if resp.StatusCode != http.StatusOK {
+ return nil, resp.StatusCode,
+ errors.New(fmt.Sprintf("Error: got bad response status from %s: %s\n", url, resp.Status))
+ }
+ var body []byte
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return nil, -1, errors.New(fmt.Sprintf("Error: error reading response body: %s\n", err.Error()))
+ }
+ return body, 0, nil
+}
+
+// Dump all spans from the htraced daemon.
+func (hcl *Client) DumpAll(lim int, out chan *common.Span) error {
+ defer func() {
+ close(out)
+ }()
+ searchId := common.SpanId(0)
+ for {
+ q := common.Query{
+ Lim: lim,
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: "ge",
+ Field: "spanid",
+ Val: searchId.String(),
+ },
+ },
+ }
+ spans, err := hcl.Query(&q)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error querying spans with IDs at or after "+
+ "%s: %s", searchId.String(), err.Error()))
+ }
+ if len(spans) == 0 {
+ return nil
+ }
+ for i := range spans {
+ out <- &spans[i]
+ }
+ searchId = spans[len(spans)-1].Id + 1
+ }
+}
+
+func (hcl *Client) Close() {
+ if hcl.hcr != nil {
+ hcl.hcr.Close()
+ }
+ hcl.restAddr = ""
+ hcl.hcr = nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/client/hclient.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/client/hclient.go b/htrace-htraced/src/go/src/org/apache/htrace/client/hclient.go
new file mode 100644
index 0000000..1730c02
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/client/hclient.go
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package client
+
+import (
+ "encoding/binary"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "net/rpc"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+)
+
+type hClient struct {
+ rpcClient *rpc.Client
+}
+
+type HrpcClientCodec struct {
+ rwc io.ReadWriteCloser
+ length uint32
+}
+
+func (cdc *HrpcClientCodec) WriteRequest(req *rpc.Request, msg interface{}) error {
+ methodId := common.HrpcMethodNameToId(req.ServiceMethod)
+ if methodId == common.METHOD_ID_NONE {
+ return errors.New(fmt.Sprintf("HrpcClientCodec: Unknown method name %s",
+ req.ServiceMethod))
+ }
+ buf, err := json.Marshal(msg)
+ if err != nil {
+ return errors.New(fmt.Sprintf("HrpcClientCodec: Unable to marshal "+
+ "message as JSON: %s", err.Error()))
+ }
+ if len(buf) > common.MAX_HRPC_BODY_LENGTH {
+ return errors.New(fmt.Sprintf("HrpcClientCodec: message body is %d "+
+ "bytes, but the maximum message size is %d bytes.",
+ len(buf), common.MAX_HRPC_BODY_LENGTH))
+ }
+ hdr := common.HrpcRequestHeader{
+ Magic: common.HRPC_MAGIC,
+ MethodId: methodId,
+ Seq: req.Seq,
+ Length: uint32(len(buf)),
+ }
+ err = binary.Write(cdc.rwc, binary.BigEndian, &hdr)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error writing header bytes: %s",
+ err.Error()))
+ }
+ _, err = cdc.rwc.Write(buf)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error writing body bytes: %s",
+ err.Error()))
+ }
+ return nil
+}
+
+func (cdc *HrpcClientCodec) ReadResponseHeader(resp *rpc.Response) error {
+ hdr := common.HrpcResponseHeader{}
+ err := binary.Read(cdc.rwc, binary.BigEndian, &hdr)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error reading response header "+
+ "bytes: %s", err.Error()))
+ }
+ resp.ServiceMethod = common.HrpcMethodIdToMethodName(hdr.MethodId)
+ if resp.ServiceMethod == "" {
+ return errors.New(fmt.Sprintf("Error reading response header: "+
+ "invalid method ID %d.", hdr.MethodId))
+ }
+ resp.Seq = hdr.Seq
+ if hdr.ErrLength > 0 {
+ if hdr.ErrLength > common.MAX_HRPC_ERROR_LENGTH {
+ return errors.New(fmt.Sprintf("Error reading response header: "+
+ "error message was %d bytes long, but "+
+ "MAX_HRPC_ERROR_LENGTH is %d.",
+ hdr.ErrLength, common.MAX_HRPC_ERROR_LENGTH))
+ }
+ buf := make([]byte, hdr.ErrLength)
+ var nread int
+ nread, err = cdc.rwc.Read(buf)
+ if uint32(nread) != hdr.ErrLength {
+ return errors.New(fmt.Sprintf("Error reading response header: "+
+ "failed to read %d bytes of error message.", nread))
+ }
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error reading response header: "+
+ "failed to read %d bytes of error message: %s",
+ nread, err.Error()))
+ }
+ resp.Error = string(buf)
+ } else {
+ resp.Error = ""
+ }
+ cdc.length = hdr.Length
+ return nil
+}
+
+func (cdc *HrpcClientCodec) ReadResponseBody(body interface{}) error {
+ dec := json.NewDecoder(io.LimitReader(cdc.rwc, int64(cdc.length)))
+ err := dec.Decode(body)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Failed to read response body: %s",
+ err.Error()))
+ }
+ return nil
+}
+
+func (cdc *HrpcClientCodec) Close() error {
+ return cdc.rwc.Close()
+}
+
+func newHClient(cnf *conf.Config) (*hClient, error) {
+ hcr := hClient{}
+ addr := cnf.Get(conf.HTRACE_HRPC_ADDRESS)
+ conn, err := net.Dial("tcp", addr)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Error contacting the HRPC server "+
+ "at %s: %s", addr, err.Error()))
+ }
+ hcr.rpcClient = rpc.NewClientWithCodec(&HrpcClientCodec{rwc: conn})
+ return &hcr, nil
+}
+
+func (hcr *hClient) writeSpans(req *common.WriteSpansReq) error {
+ resp := common.WriteSpansResp{}
+ return hcr.rpcClient.Call(common.METHOD_NAME_WRITE_SPANS, req, &resp)
+}
+
+func (hcr *hClient) Close() {
+ hcr.rpcClient.Close()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/log.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/log.go b/htrace-htraced/src/go/src/org/apache/htrace/common/log.go
new file mode 100644
index 0000000..c5f495d
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/log.go
@@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "errors"
+ "fmt"
+ "org/apache/htrace/conf"
+ "os"
+ "path/filepath"
+ "sort"
+ "strings"
+ "sync"
+ "time"
+)
+
+// A logSink is a place logs can be written to.
+type logSink struct {
+ path logPath
+ file *os.File
+ lock sync.Mutex
+ refCount int // protected by logFilesLock
+}
+
+// Write to the logSink.
+func (sink *logSink) write(str string) {
+ sink.lock.Lock()
+ defer sink.lock.Unlock()
+ _, err := sink.file.Write([]byte(str))
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error logging to '%s': %s\n", sink.path, err.Error())
+ }
+}
+
+// Unreference the logSink. If there are no more references, and the logSink is
+// closeable, then we will close it here.
+func (sink *logSink) Unref() {
+ logFilesLock.Lock()
+ defer logFilesLock.Unlock()
+ sink.refCount--
+ if sink.refCount <= 0 {
+ if sink.path.IsCloseable() {
+ err := sink.file.Close()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error closing log file %s: %s\n",
+ sink.path, err.Error())
+ }
+ }
+ logSinks[sink.path] = nil
+ }
+}
+
+type logPath string
+
+// An empty LogPath represents "stdout."
+const STDOUT_LOG_PATH = ""
+
+// Convert a path to a logPath.
+func logPathFromString(path string) logPath {
+ if path == STDOUT_LOG_PATH {
+ return logPath("")
+ }
+ absPath, err := filepath.Abs(path)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to get absolute path of %s: %s\n",
+ path, err.Error())
+ return logPath(path)
+ }
+ return logPath(absPath)
+}
+
+// Convert the path to a human-readable string.
+func (path logPath) String() string {
+ if path == "" {
+ return "(stdout)"
+ } else {
+ return string(path)
+ }
+}
+
+// Return true if the path is closeable. stdout is not closeable.
+func (path logPath) IsCloseable() bool {
+ return path != STDOUT_LOG_PATH
+}
+
+func (path logPath) Open() *logSink {
+ if path == STDOUT_LOG_PATH {
+ return &logSink{path: path, file: os.Stdout}
+ }
+ file, err := os.OpenFile(string(path), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0777)
+ if err != nil {
+ sink := &logSink{path: STDOUT_LOG_PATH, file: os.Stdout}
+ fmt.Fprintf(os.Stderr, "Failed to open log file %s: %s\n",
+ path, err.Error())
+ return sink
+ }
+ return &logSink{path: path, file: file}
+}
+
+var logFilesLock sync.Mutex
+
+var logSinks map[logPath]*logSink = make(map[logPath]*logSink)
+
+func getOrCreateLogSink(pathStr string) *logSink {
+ path := logPathFromString(pathStr)
+ logFilesLock.Lock()
+ defer logFilesLock.Unlock()
+ sink := logSinks[path]
+ if sink == nil {
+ sink = path.Open()
+ logSinks[path] = sink
+ }
+ sink.refCount++
+ return sink
+}
+
+type Level int
+
+const (
+ TRACE Level = iota
+ DEBUG
+ INFO
+ WARN
+ ERROR
+)
+
+var levelToString map[Level]string = map[Level]string{
+ TRACE: "TRACE",
+ DEBUG: "DEBUG",
+ INFO: "INFO",
+ WARN: "WARN",
+ ERROR: "ERROR",
+}
+
+func (level Level) String() string {
+ return levelToString[level]
+}
+
+func (level Level) LogString() string {
+ return level.String()[0:1]
+}
+
+func LevelFromString(str string) (Level, error) {
+ for k, v := range levelToString {
+ if strings.ToLower(v) == strings.ToLower(str) {
+ return k, nil
+ }
+ }
+ var levelNames sort.StringSlice
+ levelNames = make([]string, len(levelToString))
+ var i int
+ for _, v := range levelToString {
+ levelNames[i] = v
+ i++
+ }
+ sort.Sort(levelNames)
+ return TRACE, errors.New(fmt.Sprintf("No such level as '%s'. Valid "+
+ "levels are '%v'\n", str, levelNames))
+}
+
+type Logger struct {
+ sink *logSink
+ Level Level
+}
+
+func NewLogger(faculty string, cnf *conf.Config) *Logger {
+ path, level := parseConf(faculty, cnf)
+ sink := getOrCreateLogSink(path)
+ return &Logger{sink: sink, Level: level}
+}
+
+func parseConf(faculty string, cnf *conf.Config) (string, Level) {
+ facultyLogPathKey := faculty + "." + conf.HTRACE_LOG_PATH
+ var facultyLogPath string
+ if cnf.Contains(facultyLogPathKey) {
+ facultyLogPath = cnf.Get(facultyLogPathKey)
+ } else {
+ facultyLogPath = cnf.Get(conf.HTRACE_LOG_PATH)
+ }
+ facultyLogLevelKey := faculty + conf.HTRACE_LOG_LEVEL
+ var facultyLogLevelStr string
+ if cnf.Contains(facultyLogLevelKey) {
+ facultyLogLevelStr = cnf.Get(facultyLogLevelKey)
+ } else {
+ facultyLogLevelStr = cnf.Get(conf.HTRACE_LOG_LEVEL)
+ }
+ level, err := LevelFromString(facultyLogLevelStr)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error configuring log level: %s. Using TRACE.\n")
+ level = TRACE
+ }
+ return facultyLogPath, level
+}
+
+func (lg *Logger) Trace(str string) {
+ lg.write(TRACE, str)
+}
+
+func (lg *Logger) Tracef(format string, v ...interface{}) {
+ lg.write(TRACE, fmt.Sprintf(format, v...))
+}
+
+func (lg *Logger) Debug(str string) {
+ lg.write(DEBUG, str)
+}
+
+func (lg *Logger) Debugf(format string, v ...interface{}) {
+ lg.write(DEBUG, fmt.Sprintf(format, v...))
+}
+
+func (lg *Logger) Info(str string) {
+ lg.write(INFO, str)
+}
+
+func (lg *Logger) Infof(format string, v ...interface{}) {
+ lg.write(INFO, fmt.Sprintf(format, v...))
+}
+
+func (lg *Logger) Warn(str string) error {
+ lg.write(WARN, str)
+ return errors.New(str)
+}
+
+func (lg *Logger) Warnf(format string, v ...interface{}) error {
+ str := fmt.Sprintf(format, v...)
+ lg.write(WARN, str)
+ return errors.New(str)
+}
+
+func (lg *Logger) Error(str string) error {
+ lg.write(ERROR, str)
+ return errors.New(str)
+}
+
+func (lg *Logger) Errorf(format string, v ...interface{}) error {
+ str := fmt.Sprintf(format, v...)
+ lg.write(ERROR, str)
+ return errors.New(str)
+}
+
+func (lg *Logger) write(level Level, str string) {
+ if level >= lg.Level {
+ lg.sink.write(time.Now().Format(time.RFC3339) + " " +
+ level.LogString() + ": " + str)
+ }
+}
+
+func (lg *Logger) Close() {
+ lg.sink.Unref()
+ lg.sink = nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/log_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/log_test.go b/htrace-htraced/src/go/src/org/apache/htrace/common/log_test.go
new file mode 100644
index 0000000..b415ce2
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/log_test.go
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "org/apache/htrace/conf"
+ "os"
+ "strings"
+ "testing"
+)
+
+func newLogger(faculty string, args ...string) *Logger {
+ cnfBld := conf.Builder{Defaults: conf.DEFAULTS}
+ cnf, err := cnfBld.Build()
+ if err != nil {
+ panic(fmt.Sprintf("failed to create conf: %s", err.Error()))
+ }
+ cnf2 := cnf.Clone(args...)
+ lg := NewLogger(faculty, cnf2)
+ return lg
+}
+
+func TestNewLogger(t *testing.T) {
+ lg := newLogger("foo", "log.level", "TRACE")
+ lg.Close()
+}
+
+func verifyLines(t *testing.T, rdr io.Reader, lines []string) {
+ scanner := bufio.NewScanner(rdr)
+ lineIdx := 0
+ for scanner.Scan() {
+ line := scanner.Text()
+ if !strings.Contains(line, lines[lineIdx]) {
+ t.Fatalf("Error on line %d: didn't find substring '%s' in line '%s'\n",
+ (lineIdx + 1), lines[lineIdx], line)
+ }
+ lineIdx++
+ }
+ if err := scanner.Err(); err != nil {
+ t.Fatal(err.Error())
+ }
+}
+
+func TestFileLogs(t *testing.T) {
+ tempDir, err := ioutil.TempDir(os.TempDir(), "testFileLogs")
+ if err != nil {
+ panic(fmt.Sprintf("error creating tempdir: %s\n", err.Error()))
+ }
+ defer os.RemoveAll(tempDir)
+ logPath := tempDir + conf.PATH_SEP + "log"
+ lg := newLogger("foo", "log.level", "DEBUG",
+ "foo.log.level", "INFO",
+ "log.path", logPath)
+ lg.Tracef("Non-important stuff, ignore this.\n")
+ lg.Infof("problem with the foobar\n")
+ lg.Tracef("More non-important stuff, also ignore this.\n")
+ lg.Infof("and another problem with the foobar\n")
+ logFile, err := os.Open(logPath)
+ if err != nil {
+ t.Fatalf("failed to open file %s: %s\n", logPath, err.Error())
+ }
+ verifyLines(t, logFile, []string{
+ "problem with the foobar",
+ "and another problem with the foobar",
+ })
+ logFile.Close()
+ lg.Close()
+}
+
+func TestMultipleFileLogs(t *testing.T) {
+ tempDir, err := ioutil.TempDir(os.TempDir(), "testMultipleFileLogs")
+ if err != nil {
+ panic(fmt.Sprintf("error creating tempdir: %s\n", err.Error()))
+ }
+ defer os.RemoveAll(tempDir)
+ logPath := tempDir + conf.PATH_SEP + "log"
+ fooLg := newLogger("foo", "log.level", "DEBUG",
+ "foo.log.level", "INFO",
+ "log.path", logPath)
+ fooLg.Infof("The foo needs maintenance.\n")
+ barLg := newLogger("bar", "log.level", "DEBUG",
+ "foo.log.level", "INFO",
+ "log.path", logPath)
+ barLg.Debugf("The bar is open\n")
+ fooLg.Errorf("Fizz buzz\n")
+ logFile, err := os.Open(logPath)
+ if err != nil {
+ t.Fatalf("failed to open file %s: %s\n", logPath, err.Error())
+ }
+ fooLg.Tracef("Fizz buzz2\n")
+ barLg.Tracef("Fizz buzz3\n")
+ verifyLines(t, logFile, []string{
+ "The foo needs maintenance.",
+ "The bar is open",
+ "Fizz buzz",
+ "Fizz buzz3",
+ })
+ logFile.Close()
+ fooLg.Close()
+ barLg.Close()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/process.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/process.go b/htrace-htraced/src/go/src/org/apache/htrace/common/process.go
new file mode 100644
index 0000000..d138178
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/process.go
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "bufio"
+ "org/apache/htrace/conf"
+ "os"
+ "os/signal"
+ "syscall"
+)
+
+func LoadApplicationConfig() *conf.Config {
+ cnf, dlog := conf.LoadApplicationConfig()
+ lg := NewLogger("conf", cnf)
+ defer lg.Close()
+ if lg.Level <= DEBUG {
+ // Print out the debug information from loading the configuration.
+ scanner := bufio.NewScanner(dlog)
+ for scanner.Scan() {
+ lg.Debugf(scanner.Text() + "\n")
+ }
+ }
+ return cnf
+}
+
+func InstallSignalHandlers(cnf *conf.Config) {
+ fatalSigs := []os.Signal{
+ os.Interrupt,
+ os.Kill,
+ syscall.SIGINT,
+ syscall.SIGABRT,
+ syscall.SIGALRM,
+ syscall.SIGBUS,
+ syscall.SIGFPE,
+ syscall.SIGILL,
+ syscall.SIGQUIT,
+ syscall.SIGSEGV,
+ syscall.SIGTERM,
+ }
+ sigChan := make(chan os.Signal, len(fatalSigs))
+ signal.Notify(sigChan, fatalSigs...)
+ lg := NewLogger("exit", cnf)
+ go func() {
+ sig := <-sigChan
+ lg.Errorf("Terminating on signal: %v\n", sig)
+ lg.Close()
+ os.Exit(1)
+ }()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/query.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/query.go b/htrace-htraced/src/go/src/org/apache/htrace/common/query.go
new file mode 100644
index 0000000..a32909e
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/query.go
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "encoding/json"
+)
+
+//
+// Represents queries that can be sent to htraced.
+//
+// Each query consists of set of predicates that will be 'AND'ed together to
+// return a set of spans. Predicates contain an operation, a field, and a
+// value.
+//
+// For example, a query might be "return the first 100 spans between 5:00pm
+// and 5:01pm" This query would have two predicates: time greater than or
+// equal to 5:00pm, and time less than or equal to 5:01pm.
+// In HTrace, times are always expressed in milliseconds since the Epoch.
+// So this would become:
+// { "lim" : 100, "pred" : [
+// { "op" : "ge", "field" : "begin", "val" : 1234 },
+// { "op" : "le", "field" : "begin", "val" : 5678 },
+// ] }
+//
+// Where '1234' and '5678' were replaced by times since the epoch in
+// milliseconds.
+//
+
+type Op string
+
+const (
+ CONTAINS Op = "cn"
+ EQUALS Op = "eq"
+ LESS_THAN_OR_EQUALS Op = "le"
+ GREATER_THAN_OR_EQUALS Op = "ge"
+ GREATER_THAN Op = "gt"
+)
+
+func (op Op) IsDescending() bool {
+ return op == LESS_THAN_OR_EQUALS
+}
+
+func (op Op) IsValid() bool {
+ ops := ValidOps()
+ for i := range ops {
+ if ops[i] == op {
+ return true
+ }
+ }
+ return false
+}
+
+func ValidOps() []Op {
+ return []Op{CONTAINS, EQUALS, LESS_THAN_OR_EQUALS, GREATER_THAN_OR_EQUALS,
+ GREATER_THAN}
+}
+
+type Field string
+
+const (
+ SPAN_ID Field = "spanid"
+ DESCRIPTION Field = "description"
+ BEGIN_TIME Field = "begin"
+ END_TIME Field = "end"
+ DURATION Field = "duration"
+)
+
+func (field Field) IsValid() bool {
+ fields := ValidFields()
+ for i := range fields {
+ if fields[i] == field {
+ return true
+ }
+ }
+ return false
+}
+
+func ValidFields() []Field {
+ return []Field{SPAN_ID, DESCRIPTION, BEGIN_TIME, END_TIME, DURATION}
+}
+
+type Predicate struct {
+ Op Op `json:"op"`
+ Field Field `json:"field"`
+ Val string `val:"val"`
+}
+
+type Query struct {
+ Predicates []Predicate `json:"pred"`
+ Lim int `json:"lim"`
+}
+
+func (query *Query) String() string {
+ buf, err := json.Marshal(query)
+ if err != nil {
+ panic(err)
+ }
+ return string(buf)
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/query_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/query_test.go b/htrace-htraced/src/go/src/org/apache/htrace/common/query_test.go
new file mode 100644
index 0000000..2697d9c
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/query_test.go
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "testing"
+)
+
+func TestValidOps(t *testing.T) {
+ for i := range ValidOps() {
+ op := ValidOps()[i]
+ if !op.IsValid() {
+ t.Fatalf("op %s was in ValidOps, but IsValid returned false.\n", op)
+ }
+ }
+ invalidOp := Op("completelybogus")
+ if invalidOp.IsValid() {
+ t.Fatalf("op %s was invalid, but IsValid returned true.\n", invalidOp)
+ }
+}
+
+func TestValidFields(t *testing.T) {
+ for i := range ValidFields() {
+ field := ValidFields()[i]
+ if !field.IsValid() {
+ t.Fatalf("field %s was in ValidFields, but IsValid returned false.\n", field)
+ }
+ }
+ invalidField := Field("completelybogus")
+ if invalidField.IsValid() {
+ t.Fatalf("field %s was invalid, but IsValid returned true.\n", invalidField)
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/rest.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/rest.go b/htrace-htraced/src/go/src/org/apache/htrace/common/rest.go
new file mode 100644
index 0000000..eeb9568
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/rest.go
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+// Info returned by /serverInfo
+type ServerInfo struct {
+ // The server release version.
+ ReleaseVersion string
+
+ // The git hash that this software was built with.
+ GitVersion string
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/rpc.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/rpc.go b/htrace-htraced/src/go/src/org/apache/htrace/common/rpc.go
new file mode 100644
index 0000000..cdf7e08
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/rpc.go
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+// The 4-byte magic number which is sent first in the HRPC header
+const HRPC_MAGIC = 0x48545243
+
+// Method ID codes. Do not reorder these.
+const (
+ METHOD_ID_NONE = 0
+ METHOD_ID_WRITE_SPANS = iota
+)
+
+const METHOD_NAME_WRITE_SPANS = "HrpcHandler.WriteSpans"
+
+// Maximum length of the error message passed in an HRPC response
+const MAX_HRPC_ERROR_LENGTH = 4 * 1024 * 1024
+
+// Maximum length of HRPC message body
+const MAX_HRPC_BODY_LENGTH = 64 * 1024 * 1024
+
+// A request to write spans to htraced.
+type WriteSpansReq struct {
+ DefaultPid string
+ Spans []*Span
+}
+
+// A response to a WriteSpansReq
+type WriteSpansResp struct {
+}
+
+// The header which is sent over the wire for HRPC
+type HrpcRequestHeader struct {
+ Magic uint32
+ MethodId uint32
+ Seq uint64
+ Length uint32
+}
+
+// The response which is sent over the wire for HRPC
+type HrpcResponseHeader struct {
+ Seq uint64
+ MethodId uint32
+ ErrLength uint32
+ Length uint32
+}
+
+func HrpcMethodIdToMethodName(id uint32) string {
+ switch id {
+ case METHOD_ID_WRITE_SPANS:
+ return METHOD_NAME_WRITE_SPANS
+ default:
+ return ""
+ }
+}
+
+func HrpcMethodNameToId(name string) uint32 {
+ switch name {
+ case METHOD_NAME_WRITE_SPANS:
+ return METHOD_ID_WRITE_SPANS
+ default:
+ return METHOD_ID_NONE
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/span.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/span.go b/htrace-htraced/src/go/src/org/apache/htrace/common/span.go
new file mode 100644
index 0000000..c273ad9
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/span.go
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "strconv"
+)
+
+//
+// Represents a trace span.
+//
+// Compatibility notes:
+// When converting to JSON, we store the 64-bit numbers as hexadecimal strings rather than as
+// integers. This is because JavaScript lacks the ability to handle 64-bit integers. Numbers above
+// about 55 bits will be rounded by Javascript. Since the Javascript UI is a primary consumer of
+// this JSON data, we have to simply pass it as a string.
+//
+
+type TraceInfoMap map[string]string
+
+type TimelineAnnotation struct {
+ Time int64 `json:"t"`
+ Msg string `json:"m"`
+}
+
+type SpanId uint64
+
+func (id SpanId) String() string {
+ return fmt.Sprintf("%016x", uint64(id))
+}
+
+func (id SpanId) Val() uint64 {
+ return uint64(id)
+}
+
+func (id SpanId) MarshalJSON() ([]byte, error) {
+ return []byte(`"` + fmt.Sprintf("%016x", uint64(id)) + `"`), nil
+}
+
+type SpanSlice []*Span
+
+func (s SpanSlice) Len() int {
+ return len(s)
+}
+
+func (s SpanSlice) Less(i, j int) bool {
+ return s[i].Id < s[j].Id
+}
+
+func (s SpanSlice) Swap(i, j int) {
+ s[i], s[j] = s[j], s[i]
+}
+
+type SpanIdSlice []SpanId
+
+func (s SpanIdSlice) Len() int {
+ return len(s)
+}
+
+func (s SpanIdSlice) Less(i, j int) bool {
+ return s[i] < s[j]
+}
+
+func (s SpanIdSlice) Swap(i, j int) {
+ s[i], s[j] = s[j], s[i]
+}
+
+const DOUBLE_QUOTE = 0x22
+
+func (id *SpanId) UnmarshalJSON(b []byte) error {
+ if b[0] != DOUBLE_QUOTE {
+ return errors.New("Expected spanID to start with a string quote.")
+ }
+ if b[len(b)-1] != DOUBLE_QUOTE {
+ return errors.New("Expected spanID to end with a string quote.")
+ }
+ return id.FromString(string(b[1 : len(b)-1]))
+}
+
+func (id *SpanId) FromString(str string) error {
+ v, err := strconv.ParseUint(str, 16, 64)
+ if err != nil {
+ return err
+ }
+ *id = SpanId(v)
+ return nil
+}
+
+type SpanData struct {
+ Begin int64 `json:"b"`
+ End int64 `json:"e"`
+ Description string `json:"d"`
+ TraceId SpanId `json:"i"`
+ Parents []SpanId `json:"p"`
+ Info TraceInfoMap `json:"n,omitempty"`
+ ProcessId string `json:"r"`
+ TimelineAnnotations []TimelineAnnotation `json:"t,omitempty"`
+}
+
+type Span struct {
+ Id SpanId `json:"s"`
+ SpanData
+}
+
+func (span *Span) ToJson() []byte {
+ jbytes, err := json.Marshal(*span)
+ if err != nil {
+ panic(err)
+ }
+ return jbytes
+}
+
+// Compute the span duration. We ignore overflow since we never deal with negative times.
+func (span *Span) Duration() int64 {
+ return span.End - span.Begin
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/span_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/span_test.go b/htrace-htraced/src/go/src/org/apache/htrace/common/span_test.go
new file mode 100644
index 0000000..f218b3a
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/span_test.go
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "testing"
+)
+
+func TestSpanToJson(t *testing.T) {
+ t.Parallel()
+ span := Span{Id: 2305843009213693952,
+ SpanData: SpanData{
+ Begin: 123,
+ End: 456,
+ Description: "getFileDescriptors",
+ TraceId: 999,
+ Parents: []SpanId{},
+ ProcessId: "testProcessId",
+ }}
+ ExpectStrEqual(t,
+ `{"s":"2000000000000000","b":123,"e":456,"d":"getFileDescriptors","i":"00000000000003e7","p":[],"r":"testProcessId"}`,
+ string(span.ToJson()))
+}
+
+func TestAnnotatedSpanToJson(t *testing.T) {
+ t.Parallel()
+ span := Span{Id: 1305813009213693952,
+ SpanData: SpanData{
+ Begin: 1234,
+ End: 4567,
+ Description: "getFileDescriptors2",
+ TraceId: 999,
+ Parents: []SpanId{},
+ ProcessId: "testAnnotatedProcessId",
+ TimelineAnnotations: []TimelineAnnotation{
+ TimelineAnnotation{
+ Time: 7777,
+ Msg: "contactedServer",
+ },
+ TimelineAnnotation{
+ Time: 8888,
+ Msg: "passedFd",
+ },
+ },
+ }}
+ ExpectStrEqual(t,
+ `{"s":"121f2e036d442000","b":1234,"e":4567,"d":"getFileDescriptors2","i":"00000000000003e7","p":[],"r":"testAnnotatedProcessId","t":[{"t":7777,"m":"contactedServer"},{"t":8888,"m":"passedFd"}]}`,
+ string(span.ToJson()))
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/common/test_util.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/common/test_util.go b/htrace-htraced/src/go/src/org/apache/htrace/common/test_util.go
new file mode 100644
index 0000000..871c847
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/common/test_util.go
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import (
+ "fmt"
+ "testing"
+ "time"
+)
+
+type Int64Slice []int64
+
+func (p Int64Slice) Len() int { return len(p) }
+func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] }
+func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
+
+type SupplierFun func() bool
+
+//
+// Wait for a configurable amount of time for a precondition to become true.
+//
+// Example:
+// WaitFor(time.Minute * 1, time.Millisecond * 1, func() bool {
+// return ht.Store.GetStatistics().NumSpansWritten >= 3
+// })
+//
+func WaitFor(dur time.Duration, poll time.Duration, fun SupplierFun) {
+ if poll == 0 {
+ poll = dur / 10
+ }
+ if poll <= 0 {
+ panic("Can't have a polling time less than zero.")
+ }
+ endTime := time.Now().Add(dur)
+ for {
+ if fun() {
+ return
+ }
+ if !time.Now().Before(endTime) {
+ break
+ }
+ time.Sleep(poll)
+ }
+ panic(fmt.Sprintf("Timed out after %s", dur))
+}
+
+// Trigger a test failure if two strings are not equal.
+func ExpectStrEqual(t *testing.T, expect string, actual string) {
+ if expect != actual {
+ t.Fatalf("Expected:\n%s\nGot:\n%s\n", expect, actual)
+ }
+}
+
+// Trigger a test failure if the JSON representation of two spans are not equals.
+func ExpectSpansEqual(t *testing.T, spanA *Span, spanB *Span) {
+ ExpectStrEqual(t, string(spanA.ToJson()), string(spanB.ToJson()))
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/conf/config.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/conf/config.go b/htrace-htraced/src/go/src/org/apache/htrace/conf/config.go
new file mode 100644
index 0000000..6093649
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/conf/config.go
@@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conf
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "path/filepath"
+ "sort"
+ "strconv"
+ "strings"
+ "syscall"
+)
+
+//
+// The configuration code for HTraced.
+//
+// HTraced can be configured via Hadoop-style XML configuration files, or by passing -Dkey=value
+// command line arguments. Command-line arguments without an equals sign, such as "-Dkey", will be
+// treated as setting the key to "true".
+//
+// Configuration key constants should be defined in config_keys.go. Each key should have a default,
+// which will be used if the user supplies no value, or supplies an invalid value.
+// For that reason, it is not necessary for the Get, GetInt, etc. functions to take a default value
+// argument.
+//
+// Configuration objects are immutable. However, you can make a copy of a configuration which adds
+// some changes using Configuration#Clone().
+//
+
+type Config struct {
+ settings map[string]string
+ defaults map[string]string
+}
+
+type Builder struct {
+ // If non-nil, the XML configuration file to read.
+ Reader io.Reader
+
+ // If non-nil, the configuration values to use.
+ Values map[string]string
+
+ // If non-nil, the default configuration values to use.
+ Defaults map[string]string
+
+ // If non-nil, the command-line arguments to use.
+ Argv []string
+}
+
+func getHTracedConfDirs(dlog io.Writer) []string {
+ confDir := os.Getenv("HTRACED_CONF_DIR")
+ io.WriteString(dlog, fmt.Sprintf("HTRACED_CONF_DIR=%s\n", confDir))
+ paths := filepath.SplitList(confDir)
+ if len(paths) < 1 {
+ return []string{"."}
+ }
+ return paths
+}
+
+// Load a configuration from the application's argv, configuration file, and the standard
+// defaults.
+func LoadApplicationConfig() (*Config, io.Reader) {
+ dlog := new(bytes.Buffer)
+ reader := openFile(CONFIG_FILE_NAME, getHTracedConfDirs(dlog), dlog)
+ bld := Builder{}
+ if reader != nil {
+ defer reader.Close()
+ bld.Reader = bufio.NewReader(reader)
+ }
+ bld.Argv = os.Args[1:]
+ bld.Defaults = DEFAULTS
+ cnf, err := bld.Build()
+ if err != nil {
+ log.Fatal("Error building configuration: " + err.Error())
+ }
+ os.Args = append(os.Args[0:1], bld.Argv...)
+ keys := make(sort.StringSlice, 0, 20)
+ for k, _ := range cnf.settings {
+ keys = append(keys, k)
+ }
+ sort.Sort(keys)
+ for i := range keys {
+ io.WriteString(dlog, fmt.Sprintf("%s = %s\n",
+ keys[i], cnf.settings[keys[i]]))
+ }
+ return cnf, dlog
+}
+
+// Attempt to open a configuration file somewhere on the provided list of paths.
+func openFile(cnfName string, paths []string, dlog io.Writer) io.ReadCloser {
+ for p := range paths {
+ path := fmt.Sprintf("%s%c%s", paths[p], os.PathSeparator, cnfName)
+ file, err := os.Open(path)
+ if err == nil {
+ io.WriteString(dlog, fmt.Sprintf("Reading configuration from %s.\n", path))
+ return file
+ }
+ if e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOENT {
+ continue
+ }
+ io.WriteString(dlog, fmt.Sprintf("Error opening %s for read: %s\n", path, err.Error()))
+ }
+ return nil
+}
+
+// Try to parse a command-line element as a key=value pair.
+func parseAsConfigFlag(flag string) (string, string) {
+ var confPart string
+ if strings.HasPrefix(flag, "-D") {
+ confPart = flag[2:]
+ } else if strings.HasPrefix(flag, "--D") {
+ confPart = flag[3:]
+ } else {
+ return "", ""
+ }
+ if len(confPart) == 0 {
+ return "", ""
+ }
+ idx := strings.Index(confPart, "=")
+ if idx == -1 {
+ return confPart, "true"
+ }
+ return confPart[0:idx], confPart[idx+1:]
+}
+
+// Build a new configuration object from the provided conf.Builder.
+func (bld *Builder) Build() (*Config, error) {
+ // Load values and defaults
+ cnf := Config{}
+ cnf.settings = make(map[string]string)
+ if bld.Values != nil {
+ for k, v := range bld.Values {
+ cnf.settings[k] = v
+ }
+ }
+ cnf.defaults = make(map[string]string)
+ if bld.Defaults != nil {
+ for k, v := range bld.Defaults {
+ cnf.defaults[k] = v
+ }
+ }
+
+ // Process the configuration file, if we have one
+ if bld.Reader != nil {
+ parseXml(bld.Reader, cnf.settings)
+ }
+
+ // Process command line arguments
+ var i int
+ for i < len(bld.Argv) {
+ str := bld.Argv[i]
+ key, val := parseAsConfigFlag(str)
+ if key != "" {
+ if val == "" {
+ cnf.settings[key] = "true"
+ } else {
+ cnf.settings[key] = val
+ }
+ bld.Argv = append(bld.Argv[:i], bld.Argv[i+1:]...)
+ } else {
+ i++
+ }
+ }
+ return &cnf, nil
+}
+
+// Returns true if the configuration has a non-default value for the given key.
+func (cnf *Config) Contains(key string) bool {
+ _, ok := cnf.settings[key]
+ return ok
+}
+
+// Get a string configuration key.
+func (cnf *Config) Get(key string) string {
+ ret := cnf.settings[key]
+ if ret != "" {
+ return ret
+ }
+ return cnf.defaults[key]
+}
+
+// Get a boolean configuration key.
+func (cnf *Config) GetBool(key string) bool {
+ str := cnf.settings[key]
+ ret, err := strconv.ParseBool(str)
+ if err == nil {
+ return ret
+ }
+ str = cnf.defaults[key]
+ ret, err = strconv.ParseBool(str)
+ if err == nil {
+ return ret
+ }
+ return false
+}
+
+// Get an integer configuration key.
+func (cnf *Config) GetInt(key string) int {
+ str := cnf.settings[key]
+ ret, err := strconv.Atoi(str)
+ if err == nil {
+ return ret
+ }
+ str = cnf.defaults[key]
+ ret, err = strconv.Atoi(str)
+ if err == nil {
+ return ret
+ }
+ return 0
+}
+
+// Get an int64 configuration key.
+func (cnf *Config) GetInt64(key string) int64 {
+ str := cnf.settings[key]
+ ret, err := strconv.ParseInt(str, 10, 64)
+ if err == nil {
+ return ret
+ }
+ str = cnf.defaults[key]
+ ret, err = strconv.ParseInt(str, 10, 64)
+ if err == nil {
+ return ret
+ }
+ return 0
+}
+
+// Make a deep copy of the given configuration.
+// Optionally, you can specify particular key/value pairs to change.
+// Example:
+// cnf2 := cnf.Copy("my.changed.key", "my.new.value")
+func (cnf *Config) Clone(args ...string) *Config {
+ if len(args)%2 != 0 {
+ panic("The arguments to Config#copy are key1, value1, " +
+ "key2, value2, and so on. You must specify an even number of arguments.")
+ }
+ ncnf := &Config{defaults: cnf.defaults}
+ ncnf.settings = make(map[string]string)
+ for k, v := range cnf.settings {
+ ncnf.settings[k] = v
+ }
+ for i := 0; i < len(args); i += 2 {
+ ncnf.settings[args[i]] = args[i+1]
+ }
+ return ncnf
+}
[22/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.js b/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.js
deleted file mode 100644
index a27667f..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.standalone.js
+++ /dev/null
@@ -1,1860 +0,0 @@
-/**
- * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
- * @version v2.1.0
- * @link https://github.com/bevacqua/rome
- * @license MIT
- */
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.rome=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- var source = ev.source;
- if ((source === window || source === null) && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-
-// TODO(shtylman)
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},{}],2:[function(_dereq_,module,exports){
-module.exports = _dereq_('./src/contra.emitter.js');
-
-},{"./src/contra.emitter.js":3}],3:[function(_dereq_,module,exports){
-(function (process){
-(function (root, undefined) {
- 'use strict';
-
- var undef = '' + undefined;
- function atoa (a, n) { return Array.prototype.slice.call(a, n); }
- function debounce (fn, args, ctx) { if (!fn) { return; } tick(function run () { fn.apply(ctx || null, args || []); }); }
-
- // cross-platform ticker
- var si = typeof setImmediate === 'function', tick;
- if (si) {
- tick = function (fn) { setImmediate(fn); };
- } else if (typeof process !== undef && process.nextTick) {
- tick = process.nextTick;
- } else {
- tick = function (fn) { setTimeout(fn, 0); };
- }
-
- function _emitter (thing, options) {
- var opts = options || {};
- var evt = {};
- if (thing === undefined) { thing = {}; }
- thing.on = function (type, fn) {
- if (!evt[type]) {
- evt[type] = [fn];
- } else {
- evt[type].push(fn);
- }
- return thing;
- };
- thing.once = function (type, fn) {
- fn._once = true; // thing.off(fn) still works!
- thing.on(type, fn);
- return thing;
- };
- thing.off = function (type, fn) {
- var c = arguments.length;
- if (c === 1) {
- delete evt[type];
- } else if (c === 0) {
- evt = {};
- } else {
- var et = evt[type];
- if (!et) { return thing; }
- et.splice(et.indexOf(fn), 1);
- }
- return thing;
- };
- thing.emit = function () {
- var args = atoa(arguments);
- return thing.emitterSnapshot(args.shift()).apply(this, args);
- };
- thing.emitterSnapshot = function (type) {
- var et = (evt[type] || []).slice(0);
- return function () {
- var args = atoa(arguments);
- var ctx = this || thing;
- if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
- evt[type] = et.filter(function emitter (listen) {
- if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
- return !listen._once;
- });
- return thing;
- };
- }
- return thing;
- }
-
- // cross-platform export
- if (typeof module !== undef && module.exports) {
- module.exports = _emitter;
- } else {
- root.contra = root.contra || {};
- root.contra.emitter = _emitter;
- }
-})(this);
-
-}).call(this,_dereq_("FWaASH"))
-},{"FWaASH":1}],4:[function(_dereq_,module,exports){
-var now = _dereq_('performance-now')
- , global = typeof window === 'undefined' ? {} : window
- , vendors = ['moz', 'webkit']
- , suffix = 'AnimationFrame'
- , raf = global['request' + suffix]
- , caf = global['cancel' + suffix] || global['cancelRequest' + suffix]
- , isNative = true
-
-for(var i = 0; i < vendors.length && !raf; i++) {
- raf = global[vendors[i] + 'Request' + suffix]
- caf = global[vendors[i] + 'Cancel' + suffix]
- || global[vendors[i] + 'CancelRequest' + suffix]
-}
-
-// Some versions of FF have rAF but not cAF
-if(!raf || !caf) {
- isNative = false
-
- var last = 0
- , id = 0
- , queue = []
- , frameDuration = 1000 / 60
-
- raf = function(callback) {
- if(queue.length === 0) {
- var _now = now()
- , next = Math.max(0, frameDuration - (_now - last))
- last = next + _now
- setTimeout(function() {
- var cp = queue.slice(0)
- // Clear queue here to prevent
- // callbacks from appending listeners
- // to the current frame's queue
- queue.length = 0
- for(var i = 0; i < cp.length; i++) {
- if(!cp[i].cancelled) {
- try{
- cp[i].callback(last)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- }
- }
- }, Math.round(next))
- }
- queue.push({
- handle: ++id,
- callback: callback,
- cancelled: false
- })
- return id
- }
-
- caf = function(handle) {
- for(var i = 0; i < queue.length; i++) {
- if(queue[i].handle === handle) {
- queue[i].cancelled = true
- }
- }
- }
-}
-
-module.exports = function(fn) {
- // Wrap in a new function to prevent
- // `cancel` potentially being assigned
- // to the native rAF function
- if(!isNative) {
- return raf.call(global, fn)
- }
- return raf.call(global, function() {
- try{
- fn.apply(this, arguments)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- })
-}
-module.exports.cancel = function() {
- caf.apply(global, arguments)
-}
-
-},{"performance-now":5}],5:[function(_dereq_,module,exports){
-(function (process){
-// Generated by CoffeeScript 1.6.3
-(function() {
- var getNanoSeconds, hrtime, loadTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - loadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- loadTime = getNanoSeconds();
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
-}).call(this);
-
-/*
-//@ sourceMappingURL=performance-now.map
-*/
-
-}).call(this,_dereq_("FWaASH"))
-},{"FWaASH":1}],6:[function(_dereq_,module,exports){
-'use strict';
-
-var isInput = _dereq_('./isInput');
-var bindings = {};
-
-function has (source, target) {
- var binding = bindings[source.id];
- return binding && binding[target.id];
-}
-
-function insert (source, target) {
- var binding = bindings[source.id];
- if (!binding) {
- binding = bindings[source.id] = {};
- }
- var invalidate = invalidator(target);
- binding[target.id] = invalidate;
- source.on('data', invalidate);
- source.on('destroyed', remove.bind(null, source, target));
-}
-
-function remove (source, target) {
- var binding = bindings[source.id];
- if (!binding) {
- return;
- }
- var invalidate = binding[target.id];
- source.off('data', invalidate);
- delete binding[target.id];
-}
-
-function invalidator (target) {
- return function invalidate () {
- target.refresh();
- };
-}
-
-function add (source, target) {
- if (isInput(target.associated) || has(source, target)) {
- return;
- }
- insert(source, target);
-}
-
-module.exports = {
- add: add,
- remove: remove
-};
-
-},{"./isInput":17}],7:[function(_dereq_,module,exports){
-'use strict';
-
-var emitter = _dereq_('contra.emitter');
-var raf = _dereq_('raf');
-var dom = _dereq_('./dom');
-var text = _dereq_('./text');
-var parse = _dereq_('./parse');
-var clone = _dereq_('./clone');
-var defaults = _dereq_('./defaults');
-var momentum = _dereq_('./momentum');
-var classes = _dereq_('./classes');
-var events = _dereq_('./events');
-var noop = _dereq_('./noop');
-var no;
-
-function calendar (calendarOptions) {
- var o;
- var api = emitter({});
- var ref;
- var refCal;
- var container;
- var rendered = false;
-
- // date variables
- var monthOffsetAttribute = 'data-rome-offset';
- var weekdays;
- var weekdayCount;
- var calendarMonths = [];
- var lastYear;
- var lastMonth;
- var lastDay;
- var lastDayElement;
- var datewrapper;
- var back;
- var next;
-
- // time variables
- var secondsInDay = 60 * 60 * 24;
- var time;
- var timelist;
-
- init();
- raf(ready);
-
- return api;
-
- function napi () { return api; }
-
- function init (initOptions) {
- o = defaults(initOptions || calendarOptions, api);
- if (!container) { container = dom({ className: o.styles.container }); }
- weekdays = o.weekdayFormat;
- weekdayCount = weekdays.length;
- lastMonth = no;
- lastYear = no;
- lastDay = no;
- lastDayElement = no;
- o.appendTo.appendChild(container);
-
- removeChildren(container);
- rendered = false;
- ref = o.initialValue ? o.initialValue : momentum.moment();
- refCal = ref.clone();
-
- api.container = container;
- api.destroyed = false;
- api.destroy = destroy.bind(api, false);
- api.emitValues = emitValues;
- api.getDate = getDate;
- api.getDateString = getDateString;
- api.getMoment = getMoment;
- api.hide = hide;
- api.options = changeOptions;
- api.options.reset = resetOptions;
- api.refresh = refresh;
- api.restore = napi;
- api.setValue = setValue;
- api.show = show;
-
- show();
- eventListening();
- ready();
-
- return api;
- }
-
- function ready () {
- api.emit('ready', clone(o));
- }
-
- function destroy (silent) {
- if (container) {
- container.parentNode.removeChild(container);
- }
-
- if (o) {
- eventListening(true);
- }
-
- var destroyed = api.emitterSnapshot('destroyed');
- api.destroyed = true;
- api.destroy = napi;
- api.emitValues = napi;
- api.getDate = noop;
- api.getDateString = noop;
- api.getMoment = noop;
- api.hide = napi;
- api.options = napi;
- api.options.reset = napi;
- api.refresh = napi;
- api.restore = init;
- api.setValue = napi;
- api.show = napi;
- api.off();
-
- if (silent !== true) {
- destroyed();
- }
-
- return api;
- }
-
- function eventListening (remove) {
- var op = remove ? 'remove' : 'add';
- if (o.autoHideOnBlur) { events[op](document.documentElement, 'focus', hideOnBlur, true); }
- if (o.autoHideOnClick) { events[op](document, 'click', hideOnClick); }
- }
-
- function changeOptions (options) {
- if (arguments.length === 0) {
- return clone(o);
- }
- destroy();
- init(options);
- return api;
- }
-
- function resetOptions () {
- return changeOptions({ appendTo: o.appendTo });
- }
-
- function render () {
- if (rendered) {
- return;
- }
- rendered = true;
- renderDates();
- renderTime();
- api.emit('render');
- }
-
- function renderDates () {
- if (!o.date) {
- return;
- }
- var i;
- calendarMonths = [];
-
- datewrapper = dom({ className: o.styles.date, parent: container });
-
- for (i = 0; i < o.monthsInCalendar; i++) {
- renderMonth(i);
- }
-
- events.add(back, 'click', subtractMonth);
- events.add(next, 'click', addMonth);
- events.add(datewrapper, 'click', pickDay);
-
- function renderMonth (i) {
- var month = dom({ className: o.styles.month, parent: datewrapper });
- if (i === 0) {
- back = dom({ type: 'button', className: o.styles.back, attributes: { type: 'button' }, parent: month });
- }
- if (i === o.monthsInCalendar -1) {
- next = dom({ type: 'button', className: o.styles.next, attributes: { type: 'button' }, parent: month });
- }
- var label = dom({ className: o.styles.monthLabel, parent: month });
- var date = dom({ type: 'table', className: o.styles.dayTable, parent: month });
- var datehead = dom({ type: 'thead', className: o.styles.dayHead, parent: date });
- var dateheadrow = dom({ type: 'tr', className: o.styles.dayRow, parent: datehead });
- var datebody = dom({ type: 'tbody', className: o.styles.dayBody, parent: date });
- var j;
-
- for (j = 0; j < weekdayCount; j++) {
- dom({ type: 'th', className: o.styles.dayHeadElem, parent: dateheadrow, text: weekdays[weekday(j)] });
- }
-
- datebody.setAttribute(monthOffsetAttribute, i);
- calendarMonths.push({
- label: label,
- body: datebody
- });
- }
- }
-
- function renderTime () {
- if (!o.time || !o.timeInterval) {
- return;
- }
- var timewrapper = dom({ className: o.styles.time, parent: container });
- time = dom({ className: o.styles.selectedTime, parent: timewrapper, text: ref.format(o.timeFormat) });
- events.add(time, 'click', toggleTimeList);
- timelist = dom({ className: o.styles.timeList, parent: timewrapper });
- events.add(timelist, 'click', pickTime);
- var next = momentum.moment('00:00:00', 'HH:mm:ss');
- var latest = next.clone().add(1, 'days');
- while (next.isBefore(latest)) {
- dom({ className: o.styles.timeOption, parent: timelist, text: next.format(o.timeFormat) });
- next.add(o.timeInterval, 'seconds');
- }
- }
-
- function weekday (index, backwards) {
- var factor = backwards ? -1 : 1;
- var offset = index + o.weekStart * factor;
- if (offset >= weekdayCount || offset < 0) {
- offset += weekdayCount * -factor;
- }
- return offset;
- }
-
- function displayValidTimesOnly () {
- if (!o.time || !rendered) {
- return;
- }
- var times = timelist.children;
- var length = times.length;
- var date;
- var time;
- var item;
- var i;
- for (i = 0; i < length; i++) {
- item = times[i];
- time = momentum.moment(text(item), o.timeFormat);
- date = setTime(ref.clone(), time);
- item.style.display = isInRange(date, false, o.timeValidator) ? 'block' : 'none';
- }
- }
-
- function toggleTimeList (show) {
- var display = typeof show === 'boolean' ? show : timelist.style.display === 'none';
- if (display) {
- showTimeList();
- } else {
- hideTimeList();
- }
- }
-
- function showTimeList () { if (timelist) { timelist.style.display = 'block'; } }
- function hideTimeList () { if (timelist) { timelist.style.display = 'none'; } }
- function showCalendar () { container.style.display = 'inline-block'; api.emit('show'); }
- function hideCalendar () { container.style.display = 'none'; api.emit('hide'); }
-
- function show () {
- render();
- refresh();
- toggleTimeList(!o.date);
- showCalendar();
- return api;
- }
-
- function hide () {
- hideTimeList();
- raf(hideCalendar);
- return api;
- }
-
- function hideConditionally () {
- hideTimeList();
-
- var pos = classes.contains(container, o.styles.positioned);
- if (pos) {
- raf(hideCalendar);
- }
- return api;
- }
-
- function calendarEventTarget (e) {
- var target = e.target;
- if (target === api.associated) {
- return true;
- }
- while (target) {
- if (target === container) {
- return true;
- }
- target = target.parentNode;
- }
- }
-
- function hideOnBlur (e) {
- if (calendarEventTarget(e)) {
- return;
- }
- hideConditionally();
- }
-
- function hideOnClick (e) {
- if (calendarEventTarget(e)) {
- return;
- }
- hideConditionally();
- }
-
- function subtractMonth () { changeMonth('subtract'); }
- function addMonth () { changeMonth('add'); }
- function changeMonth (op) {
- var bound;
- var direction = op === 'add' ? -1 : 1;
- var offset = o.monthsInCalendar + direction * getMonthOffset(lastDayElement);
- refCal[op](offset, 'months');
- bound = inRange(refCal.clone());
- ref = bound || ref;
- if (bound) { refCal = bound.clone(); }
- update();
- }
-
- function update (silent) {
- updateCalendar();
- updateTime();
- if (silent !== true) { emitValues(); }
- displayValidTimesOnly();
- }
-
- function updateCalendar () {
- if (!o.date || !rendered) {
- return;
- }
- var y = refCal.year();
- var m = refCal.month();
- var d = refCal.date();
- if (d === lastDay && m === lastMonth && y === lastYear) {
- return;
- }
- var canStay = isDisplayed();
- lastDay = refCal.date();
- lastMonth = refCal.month();
- lastYear = refCal.year();
- if (canStay) { updateCalendarSelection(); return; }
- calendarMonths.forEach(updateMonth);
- renderAllDays();
-
- function updateMonth (month, i) {
- var offsetCal = refCal.clone().add(i, 'months');
- text(month.label, offsetCal.format(o.monthFormat));
- removeChildren(month.body);
- }
- }
-
- function updateCalendarSelection () {
- var day = refCal.date() - 1;
- selectDayElement(false);
- calendarMonths.forEach(function (cal) {
- var days;
- if (sameCalendarMonth(cal.date, refCal)) {
- days = cast(cal.body.children).map(aggregate);
- days = Array.prototype.concat.apply([], days).filter(inside);
- selectDayElement(days[day]);
- }
- });
-
- function cast (like) {
- var dest = [];
- var i;
- for (i = 0; i < like.length; i++) {
- dest.push(like[i]);
- }
- return dest;
- }
-
- function aggregate (child) {
- return cast(child.children);
- }
-
- function inside (child) {
- return !classes.contains(child, o.styles.dayPrevMonth) &&
- !classes.contains(child, o.styles.dayNextMonth);
- }
- }
-
- function isDisplayed () {
- return calendarMonths.some(matches);
-
- function matches (cal) {
- if (!lastYear) { return false; }
- return sameCalendarMonth(cal.date, refCal);
- }
- }
-
- function sameCalendarMonth (left, right) {
- return left && right && left.year() === right.year() && left.month() === right.month();
- }
-
- function updateTime () {
- if (!o.time || !rendered) {
- return;
- }
- text(time, ref.format(o.timeFormat));
- }
-
- function emitValues () {
- api.emit('data', getDateString());
- api.emit('year', ref.year());
- api.emit('month', ref.month());
- api.emit('day', ref.day());
- api.emit('time', ref.format(o.timeFormat));
- return api;
- }
-
- function refresh () {
- lastYear = false;
- lastMonth = false;
- lastDay = false;
- update(true);
- return api;
- }
-
- function setValue (value) {
- var date = parse(value, o.inputFormat);
- if (date === null) {
- return;
- }
- ref = inRange(date) || ref;
- refCal = ref.clone();
- update(true);
-
- return api;
- }
-
- function removeChildren (elem, self) {
- while (elem && elem.firstChild) {
- elem.removeChild(elem.firstChild);
- }
- if (self === true) {
- elem.parentNode.removeChild(elem);
- }
- }
-
- function renderAllDays () {
- var i;
- for (i = 0; i < o.monthsInCalendar; i++) {
- renderDays(i);
- }
- }
-
- function renderDays (offset) {
- var month = calendarMonths[offset];
- var offsetCal = refCal.clone().add(offset, 'months');
- var total = offsetCal.daysInMonth();
- var current = offsetCal.month() !== ref.month() ? -1 : ref.date(); // -1 : 1..31
- var first = offsetCal.clone().date(1);
- var firstDay = weekday(first.day(), true); // 0..6
- var tr = dom({ type: 'tr', className: o.styles.dayRow, parent: month.body });
- var prevMonth = hiddenWhen(offset !== 0, [o.styles.dayBodyElem, o.styles.dayPrevMonth]);
- var nextMonth = hiddenWhen(offset !== o.monthsInCalendar - 1, [o.styles.dayBodyElem, o.styles.dayNextMonth]);
- var disabled = o.styles.dayDisabled;
- var lastDay;
-
- part({
- base: first.clone().subtract(firstDay, 'days'),
- length: firstDay,
- cell: prevMonth
- });
-
- part({
- base: first.clone(),
- length: total,
- cell: [o.styles.dayBodyElem],
- selectable: true
- });
-
- lastDay = first.clone().add(total, 'days');
-
- part({
- base: lastDay,
- length: weekdayCount - tr.children.length,
- cell: nextMonth
- });
-
- back.disabled = !isInRangeLeft(first, true);
- next.disabled = !isInRangeRight(lastDay, true);
- month.date = offsetCal.clone();
-
- function part (data) {
- var i, day, node;
- for (i = 0; i < data.length; i++) {
- if (tr.children.length === weekdayCount) {
- tr = dom({ type: 'tr', className: o.styles.dayRow, parent: month.body });
- }
- day = data.base.clone().add(i, 'days');
- node = dom({
- type: 'td',
- parent: tr,
- text: day.format(o.dayFormat),
- className: validationTest(day, data.cell.join(' ').split(' ')).join(' ')
- });
- if (data.selectable && day.date() === current) {
- selectDayElement(node);
- }
- }
- }
-
- function validationTest (day, cell) {
- if (!isInRange(day, true, o.dateValidator)) { cell.push(disabled); }
- return cell;
- }
-
- function hiddenWhen (value, cell) {
- if (value) { cell.push(o.styles.dayConcealed); }
- return cell;
- }
- }
-
- function isInRange (date, allday, validator) {
- if (!isInRangeLeft(date, allday)) {
- return false;
- }
- if (!isInRangeRight(date, allday)) {
- return false;
- }
- var valid = (validator || Function.prototype).call(api, date.toDate());
- return valid !== false;
- }
-
- function isInRangeLeft (date, allday) {
- var min = !o.min ? false : (allday ? o.min.clone().startOf('day') : o.min);
- return !min || !date.isBefore(min);
- }
-
- function isInRangeRight (date, allday) {
- var max = !o.max ? false : (allday ? o.max.clone().endOf('day') : o.max);
- return !max || !date.isAfter(max);
- }
-
- function inRange (date) {
- if (o.min && date.isBefore(o.min)) {
- return inRange(o.min.clone());
- } else if (o.max && date.isAfter(o.max)) {
- return inRange(o.max.clone());
- }
- var value = date.clone().subtract(1, 'days');
- if (validateTowards(value, date, 'add')) {
- return inTimeRange(value);
- }
- value = date.clone();
- if (validateTowards(value, date, 'subtract')) {
- return inTimeRange(value);
- }
- }
-
- function inTimeRange (value) {
- var copy = value.clone().subtract(o.timeInterval, 'seconds');
- var times = Math.ceil(secondsInDay / o.timeInterval);
- var i;
- for (i = 0; i < times; i++) {
- copy.add(o.timeInterval, 'seconds');
- if (copy.date() > value.date()) {
- copy.subtract(1, 'days');
- }
- if (o.timeValidator.call(api, copy.toDate()) !== false) {
- return copy;
- }
- }
- }
-
- function validateTowards (value, date, op) {
- var valid = false;
- while (valid === false) {
- value[op](1, 'days');
- if (value.month() !== date.month()) {
- break;
- }
- valid = o.dateValidator.call(api, value.toDate());
- }
- return valid !== false;
- }
-
- function pickDay (e) {
- var target = e.target;
- if (classes.contains(target, o.styles.dayDisabled) || !classes.contains(target, o.styles.dayBodyElem)) {
- return;
- }
- var day = parseInt(text(target), 10);
- var prev = classes.contains(target, o.styles.dayPrevMonth);
- var next = classes.contains(target, o.styles.dayNextMonth);
- var offset = getMonthOffset(target) - getMonthOffset(lastDayElement);
- ref.add(offset, 'months');
- if (prev || next) {
- ref.add(prev ? -1 : 1, 'months');
- }
- selectDayElement(target);
- ref.date(day); // must run after setting the month
- setTime(ref, inRange(ref) || ref);
- refCal = ref.clone();
- if (o.autoClose === true) { hideConditionally(); }
- update();
- }
-
- function selectDayElement (node) {
- if (lastDayElement) {
- classes.remove(lastDayElement, o.styles.selectedDay);
- }
- if (node) {
- classes.add(node, o.styles.selectedDay);
- }
- lastDayElement = node;
- }
-
- function getMonthOffset (elem) {
- var offset;
- while (elem && elem.getAttribute) {
- offset = elem.getAttribute(monthOffsetAttribute);
- if (typeof offset === 'string') {
- return parseInt(offset, 10);
- }
- elem = elem.parentNode;
- }
- return 0;
- }
-
- function setTime (to, from) {
- to.hour(from.hour()).minute(from.minute()).second(from.second());
- return to;
- }
-
- function pickTime (e) {
- var target = e.target;
- if (!classes.contains(target, o.styles.timeOption)) {
- return;
- }
- var value = momentum.moment(text(target), o.timeFormat);
- setTime(ref, value);
- refCal = ref.clone();
- emitValues();
- updateTime();
- if ((!o.date && o.autoClose === true) || o.autoClose === 'time') {
- hideConditionally();
- } else {
- hideTimeList();
- }
- }
-
- function getDate () {
- return ref.toDate();
- }
-
- function getDateString (format) {
- return ref.format(format || o.inputFormat);
- }
-
- function getMoment () {
- return ref.clone();
- }
-}
-
-module.exports = calendar;
-
-},{"./classes":8,"./clone":9,"./defaults":11,"./dom":12,"./events":13,"./momentum":18,"./noop":19,"./parse":20,"./text":32,"contra.emitter":2,"raf":4}],8:[function(_dereq_,module,exports){
-'use strict';
-
-var trim = /^\s+|\s+$/g;
-var whitespace = /\s+/;
-
-function classes (node) {
- return node.className.replace(trim, '').split(whitespace);
-}
-
-function set (node, value) {
- node.className = value.join(' ');
-}
-
-function add (node, value) {
- var values = remove(node, value);
- values.push(value);
- set(node, values);
-}
-
-function remove (node, value) {
- var values = classes(node);
- var i = values.indexOf(value);
- if (i !== -1) {
- values.splice(i, 1);
- set(node, values);
- }
- return values;
-}
-
-function contains (node, value) {
- return classes(node).indexOf(value) !== -1;
-}
-
-module.exports = {
- add: add,
- remove: remove,
- contains: contains
-};
-
-},{}],9:[function(_dereq_,module,exports){
-'use strict';
-
-var momentum = _dereq_('./momentum');
-
-// naïve implementation, specifically meant to clone `options` objects
-function clone (thing) {
- var copy = {};
- var value;
-
- for (var key in thing) {
- value = thing[key];
-
- if (!value) {
- copy[key] = value;
- } else if (momentum.isMoment(value)) {
- copy[key] = value.clone();
- } else if (value._isStylesConfiguration) {
- copy[key] = clone(value);
- } else {
- copy[key] = value;
- }
- }
-
- return copy;
-}
-
-module.exports = clone;
-
-},{"./momentum":18}],10:[function(_dereq_,module,exports){
-'use strict';
-
-var index = _dereq_('./index');
-var input = _dereq_('./input');
-var inline = _dereq_('./inline');
-var isInput = _dereq_('./isInput');
-
-function core (elem, options) {
- var cal;
- var existing = index.find(elem);
- if (existing) {
- return existing;
- }
-
- if (isInput(elem)) {
- cal = input(elem, options);
- } else {
- cal = inline(elem, options);
- }
- cal.associated = elem;
- index.assign(elem, cal);
-
- return cal;
-}
-
-module.exports = core;
-
-},{"./index":14,"./inline":15,"./input":16,"./isInput":17}],11:[function(_dereq_,module,exports){
-'use strict';
-
-var parse = _dereq_('./parse');
-var isInput = _dereq_('./isInput');
-var momentum = _dereq_('./momentum');
-
-function defaults (options, cal) {
- var temp;
- var no;
- var o = options || {};
- if (o.autoHideOnClick === no) { o.autoHideOnClick = true; }
- if (o.autoHideOnBlur === no) { o.autoHideOnBlur = true; }
- if (o.autoClose === no) { o.autoClose = true; }
- if (o.appendTo === no) { o.appendTo = document.body; }
- if (o.appendTo === 'parent') {
- if (isInput(cal.associated)) {
- o.appendTo = cal.associated.parentNode;
- } else {
- throw new Error('Inline calendars must be appended to a parent node explicitly.');
- }
- }
- if (o.invalidate === no) { o.invalidate = true; }
- if (o.required === no) { o.required = false; }
- if (o.date === no) { o.date = true; }
- if (o.time === no) { o.time = true; }
- if (o.date === false && o.time === false) { throw new Error('At least one of `date` or `time` must be `true`.'); }
- if (o.inputFormat === no) {
- if (o.date && o.time) {
- o.inputFormat = 'YYYY-MM-DD HH:mm';
- } else if (o.date) {
- o.inputFormat = 'YYYY-MM-DD';
- } else {
- o.inputFormat = 'HH:mm';
- }
- }
- if (o.initialValue === no) {
- o.initialValue = null;
- } else {
- o.initialValue = parse(o.initialValue, o.inputFormat);
- }
- if (o.min === no) { o.min = null; } else { o.min = parse(o.min, o.inputFormat); }
- if (o.max === no) { o.max = null; } else { o.max = parse(o.max, o.inputFormat); }
- if (o.timeInterval === no) { o.timeInterval = 60 * 30; } // 30 minutes by default
- if (o.min && o.max) {
- if (o.max.isBefore(o.min)) {
- temp = o.max;
- o.max = o.min;
- o.min = temp;
- }
- if (o.date === true) {
- if (o.max.clone().subtract(1, 'days').isBefore(o.min)) {
- throw new Error('`max` must be at least one day after `min`');
- }
- } else if (o.timeInterval * 1000 - o.min % (o.timeInterval * 1000) > o.max - o.min) {
- throw new Error('`min` to `max` range must allow for at least one time option that matches `timeInterval`');
- }
- }
- if (o.dateValidator === no) { o.dateValidator = Function.prototype; }
- if (o.timeValidator === no) { o.timeValidator = Function.prototype; }
- if (o.timeFormat === no) { o.timeFormat = 'HH:mm'; }
- if (o.weekStart === no) { o.weekStart = momentum.moment().weekday(0).day(); }
- if (o.weekdayFormat === no) { o.weekdayFormat = 'min'; }
- if (o.weekdayFormat === 'long') {
- o.weekdayFormat = momentum.moment.weekdays();
- } else if (o.weekdayFormat === 'short') {
- o.weekdayFormat = momentum.moment.weekdaysShort();
- } else if (o.weekdayFormat === 'min') {
- o.weekdayFormat = momentum.moment.weekdaysMin();
- } else if (!Array.isArray(o.weekdayFormat) || o.weekdayFormat.length < 7) {
- throw new Error('`weekdays` must be `min`, `short`, or `long`');
- }
- if (o.monthsInCalendar === no) { o.monthsInCalendar = 1; }
- if (o.monthFormat === no) { o.monthFormat = 'MMMM YYYY'; }
- if (o.dayFormat === no) { o.dayFormat = 'DD'; }
- if (o.styles === no) { o.styles = {}; }
-
- o.styles._isStylesConfiguration = true;
-
- var styl = o.styles;
- if (styl.back === no) { styl.back = 'rd-back'; }
- if (styl.container === no) { styl.container = 'rd-container'; }
- if (styl.positioned === no) { styl.positioned = 'rd-container-attachment'; }
- if (styl.date === no) { styl.date = 'rd-date'; }
- if (styl.dayBody === no) { styl.dayBody = 'rd-days-body'; }
- if (styl.dayBodyElem === no) { styl.dayBodyElem = 'rd-day-body'; }
- if (styl.dayPrevMonth === no) { styl.dayPrevMonth = 'rd-day-prev-month'; }
- if (styl.dayNextMonth === no) { styl.dayNextMonth = 'rd-day-next-month'; }
- if (styl.dayDisabled === no) { styl.dayDisabled = 'rd-day-disabled'; }
- if (styl.dayConcealed === no) { styl.dayConcealed = 'rd-day-concealed'; }
- if (styl.dayHead === no) { styl.dayHead = 'rd-days-head'; }
- if (styl.dayHeadElem === no) { styl.dayHeadElem = 'rd-day-head'; }
- if (styl.dayRow === no) { styl.dayRow = 'rd-days-row'; }
- if (styl.dayTable === no) { styl.dayTable = 'rd-days'; }
- if (styl.month === no) { styl.month = 'rd-month'; }
- if (styl.monthLabel === no) { styl.monthLabel = 'rd-month-label'; }
- if (styl.next === no) { styl.next = 'rd-next'; }
- if (styl.selectedDay === no) { styl.selectedDay = 'rd-day-selected'; }
- if (styl.selectedTime === no) { styl.selectedTime = 'rd-time-selected'; }
- if (styl.time === no) { styl.time = 'rd-time'; }
- if (styl.timeList === no) { styl.timeList = 'rd-time-list'; }
- if (styl.timeOption === no) { styl.timeOption = 'rd-time-option'; }
-
- return o;
-}
-
-module.exports = defaults;
-
-},{"./isInput":17,"./momentum":18,"./parse":20}],12:[function(_dereq_,module,exports){
-'use strict';
-
-function dom (options) {
- var o = options || {};
- if (!o.type) { o.type = 'div'; }
- var elem = document.createElement(o.type);
- if (o.className) { elem.className = o.className; }
- if (o.text) { elem.innerText = elem.textContent = o.text; }
- if (o.attributes) {
- Object.keys(o.attributes).forEach(function(key) {
- elem.setAttribute(key, o.attributes[key]);
- });
- }
- if (o.parent) { o.parent.appendChild(elem); }
- return elem;
-}
-
-module.exports = dom;
-
-},{}],13:[function(_dereq_,module,exports){
-'use strict';
-
-var addEvent = addEventEasy;
-var removeEvent = removeEventEasy;
-
-if (!window.addEventListener) {
- addEvent = addEventHard;
-}
-
-if (!window.removeEventListener) {
- removeEvent = removeEventHard;
-}
-
-function addEventEasy (element, evt, fn, capture) {
- return element.addEventListener(evt, fn, capture);
-}
-
-function addEventHard (element, evt, fn, capture) {
- return element.attachEvent('on' + evt, function (ae) {
- var e = ae || window.event;
- e.target = e.target || e.srcElement;
- e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
- e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
- fn.call(element, e);
- }, capture);
-}
-
-function removeEventEasy (element, evt, fn) {
- return element.removeEventListener(evt, fn);
-}
-
-function removeEventHard (element, evt, fn) {
- return element.detachEvent('on' + evt, fn);
-}
-
-module.exports = {
- add: addEvent,
- remove: removeEvent
-};
-
-},{}],14:[function(_dereq_,module,exports){
-'use strict';
-var no;
-var ikey = 'data-rome-id';
-var index = [];
-
-function find (thing) { // can be a DOM element or a number
- if (typeof thing !== 'number' && thing && thing.getAttribute) {
- return find(thing.getAttribute(ikey));
- }
- var existing = index[thing];
- if (existing !== no) {
- return existing;
- }
- return null;
-}
-
-function assign (elem, instance) {
- elem.setAttribute(ikey, instance.id = index.push(instance) - 1);
-}
-
-module.exports = {
- find: find,
- assign: assign
-};
-
-},{}],15:[function(_dereq_,module,exports){
-'use strict';
-
-var raf = _dereq_('raf');
-var calendar = _dereq_('./calendar');
-
-function inline (elem, calendarOptions) {
- var o = calendarOptions || {};
-
- o.appendTo = elem;
-
- return calendar(o);
-}
-
-module.exports = inline;
-
-},{"./calendar":7,"raf":4}],16:[function(_dereq_,module,exports){
-'use strict';
-
-var throttle = _dereq_('./throttle');
-var raf = _dereq_('raf');
-var clone = _dereq_('./clone');
-var defaults = _dereq_('./defaults');
-var calendar = _dereq_('./calendar');
-var momentum = _dereq_('./momentum');
-var classes = _dereq_('./classes');
-var events = _dereq_('./events');
-
-function inputCalendar (input, calendarOptions) {
- var o;
- var api = calendar(calendarOptions);
- var throttledTakeInput = throttle(takeInput, 30);
- var throttledPosition = throttle(position, 30);
- var ignoreInvalidation;
- var ignoreShow;
-
- init(calendarOptions);
-
- return api;
-
- function init (initOptions) {
- o = defaults(initOptions || calendarOptions, api);
-
- classes.add(api.container, o.styles.positioned);
- events.add(api.container, 'mousedown', containerMouseDown);
- events.add(api.container, 'click', containerClick);
-
- api.getDate = unrequire(api.getDate);
- api.getDateString = unrequire(api.getDateString);
- api.getMoment = unrequire(api.getMoment);
-
- if (o.initialValue) {
- input.value = o.initialValue.format(o.inputFormat);
- }
-
- api.on('data', updateInput);
- api.on('show', throttledPosition);
-
- eventListening();
- throttledTakeInput();
-
- api.hide();
- }
-
- function destroy () {
- eventListening(true);
- }
-
- function eventListening (remove) {
- var op = remove ? 'remove' : 'add';
- events[op](input, 'click', show);
- events[op](input, 'touchend', show);
- events[op](input, 'focusin', show);
- events[op](input, 'change', throttledTakeInput);
- events[op](input, 'keypress', throttledTakeInput);
- events[op](input, 'keydown', throttledTakeInput);
- events[op](input, 'input', throttledTakeInput);
- if (o.invalidate) { events[op](input, 'blur', invalidateInput); }
- events[op](window, 'resize', throttledPosition);
-
- if (remove) {
- api.once('ready', init);
- api.off('destroyed', destroy);
- } else {
- api.off('ready', init);
- api.once('destroyed', destroy);
- }
- }
-
- function containerClick () {
- ignoreShow = true;
- input.focus();
- ignoreShow = false;
- }
-
- function containerMouseDown () {
- ignoreInvalidation = true;
- raf(unignore);
-
- function unignore () {
- ignoreInvalidation = false;
- }
- }
-
- function invalidateInput () {
- if (!ignoreInvalidation && !isEmpty()) {
- api.emitValues();
- }
- }
-
- function show () {
- if (ignoreShow) {
- return;
- }
- api.show();
- }
-
- function position () {
- var bounds = input.getBoundingClientRect();
- var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
- api.container.style.top = bounds.top + scrollTop + input.offsetHeight + 'px';
- api.container.style.left = bounds.left + 'px';
- }
-
- function takeInput () {
- var value = input.value.trim();
- if (isEmpty()) {
- return;
- }
- var date = momentum.moment(value, o.inputFormat, o.strictParse);
- api.setValue(date);
- }
-
- function updateInput (data) {
- input.value = data;
- }
-
- function isEmpty () {
- return o.required === false && input.value.trim() === '';
- }
-
- function unrequire (fn) {
- return function maybe () {
- return isEmpty() ? null : fn.apply(this, arguments);
- };
- }
-}
-
-module.exports = inputCalendar;
-
-},{"./calendar":7,"./classes":8,"./clone":9,"./defaults":11,"./events":13,"./momentum":18,"./throttle":33,"raf":4}],17:[function(_dereq_,module,exports){
-'use strict';
-
-function isInput (elem) {
- return elem && elem.nodeName && elem.nodeName.toLowerCase() === 'input';
-}
-
-module.exports = isInput;
-
-},{}],18:[function(_dereq_,module,exports){
-'use strict';
-
-function isMoment (value) {
- return value && Object.prototype.hasOwnProperty.call(value, '_isAMomentObject');
-}
-
-var api = {
- moment: null,
- isMoment: isMoment
-};
-
-module.exports = api;
-
-},{}],19:[function(_dereq_,module,exports){
-'use strict';
-
-function noop () {}
-
-module.exports = noop;
-
-},{}],20:[function(_dereq_,module,exports){
-'use strict';
-
-var momentum = _dereq_('./momentum');
-
-function raw (date, format) {
- if (typeof date === 'string') {
- return momentum.moment(date, format);
- }
- if (Object.prototype.toString.call(date) === '[object Date]') {
- return momentum.moment(date);
- }
- if (momentum.isMoment(date)) {
- return date.clone();
- }
-}
-
-function parse (date, format) {
- var m = raw(date, typeof format === 'string' ? format : null);
- return m && m.isValid() ? m : null;
-}
-
-module.exports = parse;
-
-},{"./momentum":18}],21:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Array.prototype.filter) {
- Array.prototype.filter = function (fn, ctx) {
- var f = [];
- this.forEach(function (v, i, t) {
- if (fn.call(ctx, v, i, t)) { f.push(v); }
- }, ctx);
- return f;
- };
-}
-
-},{}],22:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function (fn, ctx) {
- if (this === void 0 || this === null || typeof fn !== 'function') {
- throw new TypeError();
- }
- var t = this;
- var len = t.length;
- for (var i = 0; i < len; i++) {
- if (i in t) { fn.call(ctx, t[i], i, t); }
- }
- };
-}
-
-},{}],23:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function (what, start) {
- if (this === undefined || this === null) {
- throw new TypeError();
- }
- var length = this.length;
- start = +start || 0;
- if (Math.abs(start) === Infinity) {
- start = 0;
- } else if (start < 0) {
- start += length;
- if (start < 0) { start = 0; }
- }
- for (; start < length; start++) {
- if (this[start] === what) {
- return start;
- }
- }
- return -1;
- };
-}
-
-},{}],24:[function(_dereq_,module,exports){
-'use strict';
-
-Array.isArray || (Array.isArray = function (a) {
- return '' + a !== a && Object.prototype.toString.call(a) === '[object Array]';
-});
-
-},{}],25:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Array.prototype.map) {
- Array.prototype.map = function (fn, ctx) {
- var context, result, i;
-
- if (this == null) {
- throw new TypeError('this is null or not defined');
- }
-
- var source = Object(this);
- var len = source.length >>> 0;
-
- if (typeof fn !== 'function') {
- throw new TypeError(fn + ' is not a function');
- }
-
- if (arguments.length > 1) {
- context = ctx;
- }
-
- result = new Array(len);
- i = 0;
-
- while (i < len) {
- if (i in source) {
- result[i] = fn.call(context, source[i], i, source);
- }
- i++;
- }
- return result;
- };
-}
-
-},{}],26:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Array.prototype.some) {
- Array.prototype.some = function (fn, ctx) {
- var context, i;
-
- if (this == null) {
- throw new TypeError('this is null or not defined');
- }
-
- var source = Object(this);
- var len = source.length >>> 0;
-
- if (typeof fn !== 'function') {
- throw new TypeError(fn + ' is not a function');
- }
-
- if (arguments.length > 1) {
- context = ctx;
- }
-
- i = 0;
-
- while (i < len) {
- if (i in source) {
- var test = fn.call(context, source[i], i, source);
- if (test) {
- return true;
- }
- }
- i++;
- }
- return false;
- };
-}
-
-},{}],27:[function(_dereq_,module,exports){
-'use strict';
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function (context) {
- if (typeof this !== 'function') {
- throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
- }
- var curried = Array.prototype.slice.call(arguments, 1);
- var original = this;
- var NoOp = function () {};
- var bound = function () {
- var ctx = this instanceof NoOp && context ? this : context;
- var args = curried.concat(Array.prototype.slice.call(arguments));
- return original.apply(ctx, args);
- };
- NoOp.prototype = this.prototype;
- bound.prototype = new NoOp();
- return bound;
- };
-}
-
-},{}],28:[function(_dereq_,module,exports){
-'use strict';
-
-var hasOwn = Object.prototype.hasOwnProperty;
-var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
-var dontEnums = [
- 'toString',
- 'toLocaleString',
- 'valueOf',
- 'hasOwnProperty',
- 'isPrototypeOf',
- 'propertyIsEnumerable',
- 'constructor'
-];
-var dontEnumsLength = dontEnums.length;
-
-if (!Object.keys) {
- Object.keys = function(obj) {
- if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
- throw new TypeError('Object.keys called on non-object');
- }
-
- var result = [], prop, i;
-
- for (prop in obj) {
- if (hasOwn.call(obj, prop)) {
- result.push(prop);
- }
- }
-
- if (hasDontEnumBug) {
- for (i = 0; i < dontEnumsLength; i++) {
- if (hasOwn.call(obj, dontEnums[i])) {
- result.push(dontEnums[i]);
- }
- }
- }
- return result;
- };
-}
-
-},{}],29:[function(_dereq_,module,exports){
-'use strict';
-
-if (!String.prototype.trim) {
- String.prototype.trim = function () {
- return this.replace(/^\s+|\s+$/g, '');
- };
-}
-
-},{}],30:[function(_dereq_,module,exports){
-'use strict';
-
-// these are only required for IE < 9
-// maybe move to IE-specific distro?
-_dereq_('./polyfills/function.bind');
-_dereq_('./polyfills/array.foreach');
-_dereq_('./polyfills/array.map');
-_dereq_('./polyfills/array.filter');
-_dereq_('./polyfills/array.isarray');
-_dereq_('./polyfills/array.indexof');
-_dereq_('./polyfills/array.some');
-_dereq_('./polyfills/string.trim');
-_dereq_('./polyfills/object.keys');
-
-var core = _dereq_('./core');
-var index = _dereq_('./index');
-var use = _dereq_('./use');
-
-core.use = use.bind(core);
-core.find = index.find;
-core.val = _dereq_('./validators');
-
-module.exports = core;
-
-},{"./core":10,"./index":14,"./polyfills/array.filter":21,"./polyfills/array.foreach":22,"./polyfills/array.indexof":23,"./polyfills/array.isarray":24,"./polyfills/array.map":25,"./polyfills/array.some":26,"./polyfills/function.bind":27,"./polyfills/object.keys":28,"./polyfills/string.trim":29,"./use":34,"./validators":35}],31:[function(_dereq_,module,exports){
-(function (global){
-var rome = _dereq_('./rome');
-var momentum = _dereq_('./momentum');
-
-rome.use(global.moment);
-
-if (momentum.moment === void 0) {
- throw new Error('rome depends on moment.js, you can get it at http://momentjs.com, or you could use the bundled distribution file instead.');
-}
-
-module.exports = rome;
-
-}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./momentum":18,"./rome":30}],32:[function(_dereq_,module,exports){
-'use strict';
-
-function text (elem, value) {
- if (arguments.length === 2) {
- elem.innerText = elem.textContent = value;
- }
- return elem.innerText || elem.textContent;
-}
-
-module.exports = text;
-
-},{}],33:[function(_dereq_,module,exports){
-'use strict';
-
-module.exports = function throttle (fn, boundary) {
- var last = -Infinity;
- var timer;
- return function bounced () {
- if (timer) {
- return;
- }
- unbound();
-
- function unbound () {
- clearTimeout(timer);
- timer = null;
- var next = last + boundary;
- var now = Date.now();
- if (now > next) {
- last = now;
- fn.apply(this, arguments);
- } else {
- timer = setTimeout(unbound, next - now);
- }
- }
- };
-};
-
-},{}],34:[function(_dereq_,module,exports){
-'use strict';
-
-var momentum = _dereq_('./momentum');
-
-function use (moment) {
- this.moment = momentum.moment = moment;
-}
-
-module.exports = use;
-
-},{"./momentum":18}],35:[function(_dereq_,module,exports){
-'use strict';
-
-var index = _dereq_('./index');
-var parse = _dereq_('./parse');
-var association = _dereq_('./association');
-
-function compareBuilder (compare) {
- return function factory (value) {
- var fixed = parse(value);
-
- return function validate (date) {
- var cal = index.find(value);
- var left = parse(date);
- var right = fixed || cal && cal.getMoment();
- if (!right) {
- return true;
- }
- if (cal) {
- association.add(this, cal);
- }
- return compare(left, right);
- };
- };
-}
-
-function rangeBuilder (how, compare) {
- return function factory (start, end) {
- var dates;
- var len = arguments.length;
-
- if (Array.isArray(start)) {
- dates = start;
- } else {
- if (len === 1) {
- dates = [start];
- } else if (len === 2) {
- dates = [[start, end]];
- }
- }
-
- return function validate (date) {
- return dates.map(expand.bind(this))[how](compare.bind(this, date));
- };
-
- function expand (value) {
- var start, end;
- var cal = index.find(value);
- if (cal) {
- start = end = cal.getMoment();
- } else if (Array.isArray(value)) {
- start = value[0]; end = value[1];
- } else {
- start = end = value;
- }
- if (cal) {
- association.add(cal, this);
- }
- return {
- start: parse(start).startOf('day').toDate(),
- end: parse(end).endOf('day').toDate()
- };
- }
- };
-}
-
-var afterEq = compareBuilder(function (left, right) { return left >= right; });
-var after = compareBuilder(function (left, right) { return left > right; });
-var beforeEq = compareBuilder(function (left, right) { return left <= right; });
-var before = compareBuilder(function (left, right) { return left < right; });
-
-var except = rangeBuilder('every', function (left, right) { return right.start > left || right.end < left; });
-var only = rangeBuilder('some', function (left, right) { return right.start <= left && right.end >= left; });
-
-module.exports = {
- afterEq: afterEq,
- after: after,
- beforeEq: beforeEq,
- before: before,
- except: except,
- only: only
-};
-
-},{"./association":6,"./index":14,"./parse":20}]},{},[31])
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaWNvL2Rldi9yb21lL25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2V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YXkgPSBpc0Rpc3BsYXllZCgpO1xuICAgIGxhc3REYXkgPSByZWZDYWwuZGF0ZSgpO1xuICAgIGxhc3RNb250aCA9IHJlZkNhbC5tb250aCgpO1xuICAgIGxhc3RZZWFyID0gcmVmQ2FsLnllYXIoKTtcbiAgICBpZiAoY2FuU3RheSkgeyB1cG
<TRUNCATED>
[38/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
deleted file mode 100644
index 016a8da..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAcA;;;;;;EAME,0CAAA;ECgDA,6FAAA;EACQ,qFAAA;EC5DT;AFgBC;;;;;;;;;;;;EC2CA,0DAAA;EACQ,kDAAA;EC7CT;AFVD;;;;;;EAiBI,mBAAA;EECH;AFgCC;;EAEE,wBAAA;EE9BH;AFmCD;EGlDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EA+B2C,2BAAA;EAA2B,oBAAA;EExBvE;AFLC;;EAEE,2BAAA;EACA,8BAAA;EEOH;AFJC;;EAEE,2BAAA;EACA,uBAAA;EEMH;AFHC;;EAEE,2BAAA;EACA,wBAAA;EEKH;AFUD;EGnDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECn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A;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED8XH;AFrJD;EG7OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EDqYH;AF3JD;EG9OI,0EAAA;EACA,qEAAA;EACA,+FAAA
;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED4YH;AF3JD;EGrPI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHmPF,uBAAA;ECxMA,2FAAA;EACQ,mFAAA;EC0WT","file":"bootstrap-theme.css","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n
.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &:disabled,\n &[disabled] {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n
.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-co
lor: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end
-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating n
ew styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\
n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n
\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start
-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-t
iming-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-sh
adow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-p
laceholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scal
eY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n
-o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-pr
operty) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @
select; // IE10+\n user-select: @select;\n}\n",".btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image
: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default:disabled,\n.btn-default[disabled] {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 10
0%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary:disabled,\n.btn-primary[disabled] {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff4
19641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success:disabled,\n.btn-success[disabled] {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn
-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info:disabled,\n.btn-info[disabled] {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-
warning:disabled,\n.btn-warning[disabled] {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger:disabled,\n.btn-danger[disabled] {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.0
75);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4
', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-
gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -we
bkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-i
nfo {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c
3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startCo
lorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image
: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.1
5) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-
color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DX
ImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -web
kit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f
5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); /
/ Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom,
@start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\
n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientTyp
e=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use thi
s to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
deleted file mode 100644
index 4c3e7ba..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left b
ottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endCol
orstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{backgroun
d-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image
:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,lef
t top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f
5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f
8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9p
x rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 1
00%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr=
'#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(t
o bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTran
sform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', Gradien
tType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linea
r-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,25
5,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(st
artColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left
top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-grad
ient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.
Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
\ No newline at end of file
[05/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/moment-2.9.0.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/moment-2.9.0.min.js b/htrace-htraced/src/web/lib/js/moment-2.9.0.min.js
new file mode 100644
index 0000000..c7f6dcd
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/moment-2.9.0.min.js
@@ -0,0 +1,7 @@
+//! moment.js
+//! version : 2.9.0
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Bb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){vb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sc[a]||(e(b),sc[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k
(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),uc===!1&&(uc=!0,vb.updateOffset(this),uc=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=vb.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tz
m=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Kb.length>0)for(c in Kb)d=Kb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function s(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function t(a,b){var c;return b=M(b,a),a.isBefore(b)?c=s(a,b):(c=s(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function u(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=vb.duration(c,d),v(th
is,e,a),this}}function v(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&pb(a,"Date",ob(a,"Date")+f*c),g&&nb(a,ob(a,"Month")+g*c),d&&vb.updateOffset(a,f||g)}function w(a){return"[object Array]"===Object.prototype.toString.call(a)}function x(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function y(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lc[a]||mc[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}vb[b]=function(e,f){var g,h,i=vb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=vb().utc().set(d,a);return i.call(vb._locale,b,e||"")},null!=f)return h(f);for(g=0
;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return jb(vb([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Db]<0||a._a[Db]>11?Db:a._a[Eb]<1||a._a[Eb]>D(a._a[Cb],a._a[Db])?Eb:a._a[Fb]<0||a._a[Fb]>24||24===a._a[Fb]&&(0!==a._a[Gb]||0!==a._a[Hb]||0!==a._a[Ib])?Fb:a._a[Gb]<0||a._a[Gb]>59?Gb:a._a[Hb]<0||a._a[Hb]>59?Hb:a._a[Ib]<0||a._a[Ib]>999?Ib:-1,a._pf._overflowDayOfYear&&(Cb>b||b>Eb)&&(b=Eb),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isVal
id}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f<a.length;){for(e=J(a[f]).split("-"),b=e.length,c=J(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Jb[a]&&Lb)try{b=vb.locale(),require("./locale/"+a),vb.locale(b)}catch(c){}return Jb[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(vb.isMoment(a)||x(a)?+a:+vb(a))-+c,c._d.setTime(+c._d+d),vb.updateOffset(c,!1),c):vb(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pb);for(b=0,c=d.length;c>b;b++)d[b]=rc[d[b]]?rc[d[b]]:N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nc[b]||(nc[b]=O(b)),nc[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDate
Format(a)||a}var d=5;for(Qb.lastIndex=0;d>=0&&Qb.test(a);)a=a.replace(Qb,c),Qb.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _b;case"DDDD":return bc;case"YYYY":case"GGGG":case"gggg":return d?cc:Tb;case"Y":case"G":case"g":return ec;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?dc:Ub;case"S":if(d)return _b;case"SS":if(d)return ac;case"SSS":if(d)return bc;case"DDD":return Sb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wb;case"a":case"A":return b._locale._meridiemParse;case"x":return Zb;case"X":return $b;case"Z":case"ZZ":return Xb;case"T":return Yb;case"SSSS":return Vb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ac:Rb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Rb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=
a||"";var b=a.match(Xb)||[],c=b[b.length-1]||[],d=(c+"").match(jc)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Db]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Db]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Db]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Eb]=C(b));break;case"Do":null!=b&&(e[Eb]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Cb]=vb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Cb]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fb]=C(b);break;case"m":case"mm":e[Gb]=C(b);break;case"s":case"ss":e[Hb]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ib]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd
":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=vb.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Cb],jb(vb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Cb],jb(vb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=kb(d,e,f,h,g),a._a[Cb]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Eb]&&null==a._a[Db]&&U(a),a._dayOfYear&&(f=b(a._a[Cb],e[Cb]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fb(f,0,a._dayOfYear),a._a[Db]=d.getUTCMonth(),a._a[Eb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]
=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fb]&&0===a._a[Gb]&&0===a._a[Hb]&&0===a._a[Ib]&&(a._nextDay=!0,a._a[Fb]=0),a._d=(a._useUTC?fb:eb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fb]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===vb.ISO_8601)return void ab(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(R(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._
pf.bigHour===!0&&b._a[Fb]<=12&&(b._pf.bigHour=a),b._a[Fb]=k(b._locale,b._a[Fb],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],Y(b),I(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));o(a,c||b)}function ab(a){var b,c,d=a._i,e=fc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hc.length;c>b;b++)if(hc[b][1].exec(d)){a._f=hc[b][0]+(e[6]||" ");break}for(b=0,c=ic.length;c>b;b++)if(ic[b][1].exec(d)){a._f+=ic[b][0];break}d.match(Xb)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function bb(a){ab(a),a._isValid===!1&&(delete a._isValid,vb.createFromInputFallback(a))}function cb(a,b){var c,d=[];for(c=0;c<a.length;++c
)d.push(b(a[c],c));return d}function db(b){var c,d=b._i;d===a?b._d=new Date:x(d)?b._d=new Date(+d):null!==(c=Mb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?bb(b):w(d)?(b._a=cb(d.slice(0),function(a){return parseInt(a,10)}),V(b)):"object"==typeof d?W(b):"number"==typeof d?b._d=new Date(d):vb.createFromInputFallback(b)}function eb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function gb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function hb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ib(a,b,c){var d=vb.duration(a).abs(),e=Ab(d.as("s")),f=Ab(d.as("m")),g=Ab(d.as("h")),h=Ab(d.as("d")),i=Ab(d.as("M")),j=Ab(d.as("y")),k=e<oc.s&&["s",e]||1===f&&["m"]||f<oc.m&&["mm",f]||1===g&&["h"]||g<oc.h&&["hh",g]||1===h&&["d"]||h<oc.d&&["dd",h]||1===i&&["M"]||i<oc.M&&["MM",i
]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,hb.apply({},k)}function jb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=vb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function kb(a,b,c,d,e){var f,g,h=fb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function lb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||vb.localeData(b._l),null===d||e===a&&""===d?vb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),vb.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):db(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function mb(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return vb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function nb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),D(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"
Month"](b,c),a)}function ob(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function pb(a,b,c){return"Month"===b?nb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function qb(a,b){return function(c){return null!=c?(pb(this,a,c),vb.updateOffset(this,b),this):ob(this,a)}}function rb(a){return 400*a/146097}function sb(a){return 146097*a/400}function tb(a){vb.duration.fn[a]=function(){return this._data[a]}}function ub(a){"undefined"==typeof ender&&(wb=zb.moment,zb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",vb):vb)}for(var vb,wb,xb,yb="2.9.0",zb="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,Ab=Math.round,Bb=Object.prototype.hasOwnProperty,Cb=0,Db=1,Eb=2,Fb=3,Gb=4,Hb=5,Ib=6,Jb={},Kb=[],Lb="undefined"!=typeof module&&module&&module.exports,Mb=/^\/?Date\((\-?\d+)/i,Nb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ob=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)
?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Pb=/(\[[^\[]*\])|(\\)?(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,Qb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Rb=/\d\d?/,Sb=/\d{1,3}/,Tb=/\d{1,4}/,Ub=/[+\-]?\d{1,6}/,Vb=/\d+/,Wb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Xb=/Z|[\+\-]\d\d:?\d\d/gi,Yb=/T/i,Zb=/[\+\-]?\d+/,$b=/[\+\-]?\d+(\.\d{1,3})?/,_b=/\d/,ac=/\d\d/,bc=/\d{3}/,cc=/\d{4}/,dc=/[+-]?\d{6}/,ec=/[+-]?\d+/,fc=/^\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)?)?$/,gc="YYYY-MM-DDTHH:mm:ssZ",hc=[["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}/]],ic=[["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/]],jc=/([\+\-]|\d\d)/gi,kc=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),lc={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"},mc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},nc={},oc={s:45,m:45,h:22,d:26,M:11},pc="DDD w W M D d".split(" "),qc="M D H h m s w W".split(" "),rc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)
},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(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:f
unction(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%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()}},sc={},tc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],uc=!1;pc.length;)xb=pc.pop(),rc[xb+"o"]=i(rc[xb],xb);for(;qc.length;)xb=qc.pop(),rc[xb+xb]=h(rc[xb],2);rc.DDDD=h(rc.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalPa
rse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=vb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}
},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=vb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_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(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,fun
ction(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"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(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_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(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,pr
eparse:function(a){return a},postformat:function(a){return a},week:function(a){return jb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),vb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),lb(g)},vb.suppressDeprecationWarnings=!1,vb.createFromInputFallback=f("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(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),vb.min=function(){var a=[].slice.call(arguments,0);return mb("isBefore",a)},vb.max=function(){var a=[].slice.call(arguments,0);return mb("isAfter",a)},vb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=
e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),lb(g).utc()},vb.unix=function(a){return vb(1e3*a)},vb.duration=function(a,b){var d,e,f,g,h=a,i=null;return vb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Nb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Eb])*d,h:C(i[Fb])*d,m:C(i[Gb])*d,s:C(i[Hb])*d,ms:C(i[Ib])*d}):(i=Ob.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(vb(h.from),vb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),vb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},vb.version=yb,vb.defaultFormat=gc,vb.ISO_8601=function(){},vb.momentProperties=Kb,vb.updateOffset=function(){},vb.relativeTimeThreshold=function(b,c){return oc[b]===a?!1:c===a?oc[b]:(oc[
b]=c,!0)},vb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return vb.locale(a,b)}),vb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?vb.defineLocale(a,b):vb.localeData(a),c&&(vb.duration._locale=vb._locale=c)),vb._locale._abbr},vb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Jb[a]||(Jb[a]=new l),Jb[a].set(b),vb.locale(a),Jb[a]):(delete Jb[a],null)},vb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return vb.localeData(a)}),vb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return vb._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},vb.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},vb.isDuration=function(a){return a instanceof n};for(xb=tc.length-1;xb>=0;--xb)B(tc[xb]);vb.normalizeUnits=function(a){return z(a)},vb.invalid=function(a){var b=vb.utc(0/0);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},vb.parseZone=
function(){return vb.apply(null,arguments).parseZone()},vb.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},vb.isDate=x,o(vb.fn=m.prototype,{clone:function(){return vb(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 a=vb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():P(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):P(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return I(this)},isDSTShifted:function(){return this._a?this.isValid()&&y(this._a,(this._isUTC?vb.utc(this._a):vb(this._a)).toArray())>0:!1},parsingFlags:function(){return o({},this._
pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||vb.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return vb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(vb(),a)},calendar:function(a){var b=a||vb(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";re
turn this.format(this.localeData().calendar(e,this,vb(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=gb(a,this.localeData()),this.add(a-b,"d")):b},month:qb("Month",!0),startOf:function(a){switch(a=z(a)){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"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a
:vb(a),+this>+a):(c=vb.isMoment(a)?+a:+vb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+a>+this):(c=vb.isMoment(a)?+a:+vb(a),+this.clone().endOf(b)<c)},isBetween:function(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)},isSame:function(a,b){var c;return b=z(b||"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+this===+a):(c=+vb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("stri
ng"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,vb.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,vb.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?vb(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(
){return D(this.year(),this.month())},dayOfYear:function(a){var b=Ab((vb(this).startOf("day")-vb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=jb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=jb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=jb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:func
tion(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=vb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),vb.fn.millisecond=vb.fn.milliseconds=qb("Milliseconds",!1),vb.fn.second=vb.fn.seconds=qb("Seconds",!1),vb.fn.minute=vb.fn.minutes=qb("Minutes",!1),vb.fn.hour=vb.fn.hours=qb("Hours",!0),vb.fn.date=qb("Date",!0),vb.fn.dates=f("dates accessor is deprecated. Use date instead.",qb("Date",!0)),vb.fn.year=qb("FullYear",!0),vb.fn.years=f("years accessor is deprecated. Use year inste
ad.",qb("FullYear",!0)),vb.fn.days=vb.fn.day,vb.fn.months=vb.fn.month,vb.fn.weeks=vb.fn.week,vb.fn.isoWeeks=vb.fn.isoWeek,vb.fn.quarters=vb.fn.quarter,vb.fn.toJSON=vb.fn.toISOString,vb.fn.isUTC=vb.fn.isUtc,o(vb.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(rb(e)),e-=q(sb(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},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 q(this.days()/7)
},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)
+},humanize:function(a){var b=ib(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=vb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=vb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*rb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*
1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:vb.fn.lang,locale:vb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),vb.duration.fn.toString=vb.duration.fn.toISOString;for(xb in kc)c(kc,xb)&&tb(xb.toLowerCase());vb.duration.fn.asMilliseconds=function(){return this.as("ms")},vb.duration.fn.asSeconds=function(){return this.as("s")},vb.duration.fn.asMinutes=function(){return this.as("m")},vb.duration.fn.asHours=funct
ion(){return this.as("h")},vb.duration.fn.asDays=function(){return this.as("d")},vb.duration.fn.asWeeks=function(){return this.as("weeks")},vb.duration.fn.asMonths=function(){return this.as("M")},vb.duration.fn.asYears=function(){return this.as("y")},vb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Lb?module.exports=vb:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(zb.moment=wb),vb}),ub(!0)):ub()}).call(this);
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/underscore-1.7.0.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/underscore-1.7.0.js b/htrace-htraced/src/web/lib/js/underscore-1.7.0.js
new file mode 100644
index 0000000..d5b3375
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/underscore-1.7.0.js
@@ -0,0 +1,1416 @@
+// Underscore.js 1.7.0
+// http://underscorejs.org
+// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `exports` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var
+ push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ concat = ArrayProto.concat,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.7.0';
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ var createCallback = function(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ case 2: return function(value, other) {
+ return func.call(context, value, other);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ };
+
+ // A mostly-internal function to generate callbacks that can be applied
+ // to each element in a collection, returning the desired result — either
+ // identity, an arbitrary callback, a property matcher, or a property accessor.
+ _.iteratee = function(value, context, argCount) {
+ if (value == null) return _.identity;
+ if (_.isFunction(value)) return createCallback(value, context, argCount);
+ if (_.isObject(value)) return _.matches(value);
+ return _.property(value);
+ };
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ _.each = _.forEach = function(obj, iteratee, context) {
+ if (obj == null) return obj;
+ iteratee = createCallback(iteratee, context);
+ var i, length = obj.length;
+ if (length === +length) {
+ for (i = 0; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var keys = _.keys(obj);
+ for (i = 0, length = keys.length; i < length; i++) {
+ iteratee(obj[keys[i]], keys[i], obj);
+ }
+ }
+ return obj;
+ };
+
+ // Return the results of applying the iteratee to each element.
+ _.map = _.collect = function(obj, iteratee, context) {
+ if (obj == null) return [];
+ iteratee = _.iteratee(iteratee, context);
+ var keys = obj.length !== +obj.length && _.keys(obj),
+ length = (keys || obj).length,
+ results = Array(length),
+ currentKey;
+ for (var index = 0; index < length; index++) {
+ currentKey = keys ? keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
+
+ var reduceError = 'Reduce of empty array with no initial value';
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ _.reduce = _.foldl = _.inject = function(obj, iteratee, memo, context) {
+ if (obj == null) obj = [];
+ iteratee = createCallback(iteratee, context, 4);
+ var keys = obj.length !== +obj.length && _.keys(obj),
+ length = (keys || obj).length,
+ index = 0, currentKey;
+ if (arguments.length < 3) {
+ if (!length) throw new TypeError(reduceError);
+ memo = obj[keys ? keys[index++] : index++];
+ }
+ for (; index < length; index++) {
+ currentKey = keys ? keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ _.reduceRight = _.foldr = function(obj, iteratee, memo, context) {
+ if (obj == null) obj = [];
+ iteratee = createCallback(iteratee, context, 4);
+ var keys = obj.length !== + obj.length && _.keys(obj),
+ index = (keys || obj).length,
+ currentKey;
+ if (arguments.length < 3) {
+ if (!index) throw new TypeError(reduceError);
+ memo = obj[keys ? keys[--index] : --index];
+ }
+ while (index--) {
+ currentKey = keys ? keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, predicate, context) {
+ var result;
+ predicate = _.iteratee(predicate, context);
+ _.some(obj, function(value, index, list) {
+ if (predicate(value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, predicate, context) {
+ var results = [];
+ if (obj == null) return results;
+ predicate = _.iteratee(predicate, context);
+ _.each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, predicate, context) {
+ return _.filter(obj, _.negate(_.iteratee(predicate)), context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, predicate, context) {
+ if (obj == null) return true;
+ predicate = _.iteratee(predicate, context);
+ var keys = obj.length !== +obj.length && _.keys(obj),
+ length = (keys || obj).length,
+ index, currentKey;
+ for (index = 0; index < length; index++) {
+ currentKey = keys ? keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Aliased as `any`.
+ _.some = _.any = function(obj, predicate, context) {
+ if (obj == null) return false;
+ predicate = _.iteratee(predicate, context);
+ var keys = obj.length !== +obj.length && _.keys(obj),
+ length = (keys || obj).length,
+ index, currentKey;
+ for (index = 0; index < length; index++) {
+ currentKey = keys ? keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+ };
+
+ // Determine if the array or object contains a given value (using `===`).
+ // Aliased as `include`.
+ _.contains = _.include = function(obj, target) {
+ if (obj == null) return false;
+ if (obj.length !== +obj.length) obj = _.values(obj);
+ return _.indexOf(obj, target) >= 0;
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ return (isFunc ? method : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, _.property(key));
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs) {
+ return _.filter(obj, _.matches(attrs));
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.find(obj, _.matches(attrs));
+ };
+
+ // Return the maximum element (or element-based computation).
+ _.max = function(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = obj.length === +obj.length ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = _.iteratee(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = obj.length === +obj.length ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = _.iteratee(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Shuffle a collection, using the modern version of the
+ // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ _.shuffle = function(obj) {
+ var set = obj && obj.length === +obj.length ? obj : _.values(obj);
+ var length = set.length;
+ var shuffled = Array(length);
+ for (var index = 0, rand; index < length; index++) {
+ rand = _.random(0, index);
+ if (rand !== index) shuffled[index] = shuffled[rand];
+ shuffled[rand] = set[index];
+ }
+ return shuffled;
+ };
+
+ // Sample **n** random values from a collection.
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `map`.
+ _.sample = function(obj, n, guard) {
+ if (n == null || guard) {
+ if (obj.length !== +obj.length) obj = _.values(obj);
+ return obj[_.random(obj.length - 1)];
+ }
+ return _.shuffle(obj).slice(0, Math.max(0, n));
+ };
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ _.sortBy = function(obj, iteratee, context) {
+ iteratee = _.iteratee(iteratee, context);
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value: value,
+ index: index,
+ criteria: iteratee(value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(behavior) {
+ return function(obj, iteratee, context) {
+ var result = {};
+ iteratee = _.iteratee(iteratee, context);
+ _.each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `groupBy`, but for
+ // when you know that your index values will be unique.
+ _.indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iteratee, context) {
+ iteratee = _.iteratee(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = low + high >>> 1;
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ };
+
+ // Safely create a real, live array from anything iterable.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (obj.length === +obj.length) return _.map(obj, _.identity);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return obj.length === +obj.length ? obj.length : _.keys(obj).length;
+ };
+
+ // Split a collection into two arrays: one whose elements all satisfy the given
+ // predicate, and one whose elements all do not satisfy the predicate.
+ _.partition = function(obj, predicate, context) {
+ predicate = _.iteratee(predicate, context);
+ var pass = [], fail = [];
+ _.each(obj, function(value, key, obj) {
+ (predicate(value, key, obj) ? pass : fail).push(value);
+ });
+ return [pass, fail];
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[0];
+ if (n < 0) return [];
+ return slice.call(array, 0, n);
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[array.length - 1];
+ return slice.call(array, Math.max(array.length - n, 0));
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, _.identity);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, strict, output) {
+ if (shallow && _.every(input, _.isArray)) {
+ return concat.apply(output, input);
+ }
+ for (var i = 0, length = input.length; i < length; i++) {
+ var value = input[i];
+ if (!_.isArray(value) && !_.isArguments(value)) {
+ if (!strict) output.push(value);
+ } else if (shallow) {
+ push.apply(output, value);
+ } else {
+ flatten(value, shallow, strict, output);
+ }
+ }
+ return output;
+ };
+
+ // Flatten out an array, either recursively (by default), or just one level.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, false, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iteratee, context) {
+ if (array == null) return [];
+ if (!_.isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = _.iteratee(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = array.length; i < length; i++) {
+ var value = array[i];
+ if (isSorted) {
+ if (!i || seen !== value) result.push(value);
+ seen = value;
+ } else if (iteratee) {
+ var computed = iteratee(value, i, array);
+ if (_.indexOf(seen, computed) < 0) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (_.indexOf(result, value) < 0) {
+ result.push(value);
+ }
+ }
+ return result;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(flatten(arguments, true, true, []));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ if (array == null) return [];
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = array.length; i < length; i++) {
+ var item = array[i];
+ if (_.contains(result, item)) continue;
+ for (var j = 1; j < argsLength; j++) {
+ if (!_.contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = flatten(slice.call(arguments, 1), true, true, []);
+ return _.filter(array, function(value){
+ return !_.contains(rest, value);
+ });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function(array) {
+ if (array == null) return [];
+ var length = _.max(arguments, 'length').length;
+ var results = Array(length);
+ for (var i = 0; i < length; i++) {
+ results[i] = _.pluck(arguments, i);
+ }
+ return results;
+ };
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ if (list == null) return {};
+ var result = {};
+ for (var i = 0, length = list.length; i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // Return the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i = 0, length = array.length;
+ if (isSorted) {
+ if (typeof isSorted == 'number') {
+ i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
+ } else {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ }
+ for (; i < length; i++) if (array[i] === item) return i;
+ return -1;
+ };
+
+ _.lastIndexOf = function(array, item, from) {
+ if (array == null) return -1;
+ var idx = array.length;
+ if (typeof from == 'number') {
+ idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
+ }
+ while (--idx >= 0) if (array[idx] === item) return idx;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = step || 1;
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
+
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Reusable constructor function for prototype setting.
+ var Ctor = function(){};
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = function(func, context) {
+ var args, bound;
+ if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
+ args = slice.call(arguments, 2);
+ bound = function() {
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+ Ctor.prototype = func.prototype;
+ var self = new Ctor;
+ Ctor.prototype = null;
+ var result = func.apply(self, args.concat(slice.call(arguments)));
+ if (_.isObject(result)) return result;
+ return self;
+ };
+ return bound;
+ };
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. _ acts
+ // as a placeholder, allowing any combination of arguments to be pre-filled.
+ _.partial = function(func) {
+ var boundArgs = slice.call(arguments, 1);
+ return function() {
+ var position = 0;
+ var args = boundArgs.slice();
+ for (var i = 0, length = args.length; i < length; i++) {
+ if (args[i] === _) args[i] = arguments[position++];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return func.apply(this, args);
+ };
+ };
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var i, length = arguments.length, key;
+ if (length <= 1) throw new Error('bindAll must be passed function names');
+ for (i = 1; i < length; i++) {
+ key = arguments[i];
+ obj[key] = _.bind(obj[key], obj);
+ }
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = hasher ? hasher.apply(this, arguments) : key;
+ if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){
+ return func.apply(null, args);
+ }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ _.throttle = function(func, wait, options) {
+ var context, args, result;
+ var timeout = null;
+ var previous = 0;
+ if (!options) options = {};
+ var later = function() {
+ previous = options.leading === false ? 0 : _.now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+ return function() {
+ var now = _.now();
+ if (!previous && options.leading === false) previous = now;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ clearTimeout(timeout);
+ timeout = null;
+ previous = now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var timeout, args, context, timestamp, result;
+
+ var later = function() {
+ var last = _.now() - timestamp;
+
+ if (last < wait && last > 0) {
+ timeout = setTimeout(later, wait - last);
+ } else {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ }
+ }
+ };
+
+ return function() {
+ context = this;
+ args = arguments;
+ timestamp = _.now();
+ var callNow = immediate && !timeout;
+ if (!timeout) timeout = setTimeout(later, wait);
+ if (callNow) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+
+ return result;
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return _.partial(wrapper, func);
+ };
+
+ // Returns a negated version of the passed-in predicate.
+ _.negate = function(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Returns a function that will only be executed before being called N times.
+ _.before = function(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ } else {
+ func = null;
+ }
+ return memo;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = _.partial(_.before, 2);
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[keys[i]];
+ }
+ return values;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [keys[i], obj[keys[i]]];
+ }
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ result[obj[keys[i]]] = keys[i];
+ }
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ var source, prop;
+ for (var i = 1, length = arguments.length; i < length; i++) {
+ source = arguments[i];
+ for (prop in source) {
+ if (hasOwnProperty.call(source, prop)) {
+ obj[prop] = source[prop];
+ }
+ }
+ }
+ return obj;
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = function(obj, iteratee, context) {
+ var result = {}, key;
+ if (obj == null) return result;
+ if (_.isFunction(iteratee)) {
+ iteratee = createCallback(iteratee, context);
+ for (key in obj) {
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ } else {
+ var keys = concat.apply([], slice.call(arguments, 1));
+ obj = new Object(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ key = keys[i];
+ if (key in obj) result[key] = obj[key];
+ }
+ }
+ return result;
+ };
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = function(obj, iteratee, context) {
+ if (_.isFunction(iteratee)) {
+ iteratee = _.negate(iteratee);
+ } else {
+ var keys = _.map(concat.apply([], slice.call(arguments, 1)), String);
+ iteratee = function(value, key) {
+ return !_.contains(keys, key);
+ };
+ }
+ return _.pick(obj, iteratee, context);
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ for (var i = 1, length = arguments.length; i < length; i++) {
+ var source = arguments[i];
+ for (var prop in source) {
+ if (obj[prop] === void 0) obj[prop] = source[prop];
+ }
+ }
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, regular expressions, dates, and booleans are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ }
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+ // Objects with different constructors are not equivalent, but `Object`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (
+ aCtor !== bCtor &&
+ // Handle Object.create(x) cases
+ 'constructor' in a && 'constructor' in b &&
+ !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
+ _.isFunction(bCtor) && bCtor instanceof bCtor)
+ ) {
+ return false;
+ }
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+ var size, result;
+ // Recursively compare objects and arrays.
+ if (className === '[object Array]') {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ size = a.length;
+ result = size === b.length;
+ if (result) {
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (size--) {
+ if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+ }
+ }
+ } else {
+ // Deep compare objects.
+ var keys = _.keys(a), key;
+ size = keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ result = _.keys(b).length === size;
+ if (result) {
+ while (size--) {
+ // Deep compare each member
+ key = keys[size];
+ if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+ }
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return result;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, [], []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)) return obj.length === 0;
+ for (var key in obj) if (_.has(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) === '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+ _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return _.has(obj, 'callee');
+ };
+ }
+
+ // Optimize `isFunction` if appropriate. Work around an IE 11 bug.
+ if (typeof /./ !== 'function') {
+ _.isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && obj !== +obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iteratees.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Predicate-generating functions. Often useful outside of Underscore.
+ _.constant = function(value) {
+ return function() {
+ return value;
+ };
+ };
+
+ _.noop = function(){};
+
+ _.property = function(key) {
+ return function(obj) {
+ return obj[key];
+ };
+ };
+
+ // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
+ _.matches = function(attrs) {
+ var pairs = _.pairs(attrs), length = pairs.length;
+ return function(obj) {
+ if (obj == null) return !length;
+ obj = new Object(obj);
+ for (var i = 0; i < length; i++) {
+ var pair = pairs[i], key = pair[0];
+ if (pair[1] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ };
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = createCallback(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ _.now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // List of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+ var unescapeMap = _.invert(escapeMap);
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ var createEscaper = function(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped
+ var source = '(?:' + _.keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ };
+ _.escape = createEscaper(escapeMap);
+ _.unescape = createEscaper(unescapeMap);
+
+ // If the value of the named `property` is a function then invoke it with the
+ // `object` as context; otherwise, return it.
+ _.result = function(object, property) {
+ if (object == null) return void 0;
+ var value = object[property];
+ return _.isFunction(value) ? object[property]() : value;
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ var escapeChar = function(match) {
+ return '\\' + escapes[match];
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ _.template = function(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escaper, escapeChar);
+ index = offset + match.length;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offest.
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
+
+ try {
+ var render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function. Start chaining a wrapped Underscore object.
+ _.chain = function(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj) {
+ return this._chain ? _(obj).chain() : obj;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ _.each(_.functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result.call(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return result.call(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ _.each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return result.call(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ // Extracts the result from a wrapped and chained object.
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // AMD registration happens at the end for compatibility with AMD loaders
+ // that may not enforce next-turn semantics on modules. Even though general
+ // practice for AMD registration is to be anonymous, underscore registers
+ // as a named module because, like jQuery, it is a base library that is
+ // popular enough to be bundled in a third party lib, but not be part of
+ // an AMD load request. Those cases could generate an error when an
+ // anonymous define() is called outside of a loader request.
+ if (typeof define === 'function' && define.amd) {
+ define('underscore', [], function() {
+ return _;
+ });
+ }
+}.call(this));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.css b/htrace-htraced/src/web/lib/rome-2.1.0/rome.css
new file mode 100644
index 0000000..3c4c861
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.css
@@ -0,0 +1,94 @@
+/**
+ * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
+ * @version v2.1.0
+ * @link https://github.com/bevacqua/rome
+ * @license MIT
+ */
+.rd-container {
+ display: inline-block;
+ border: 1px solid #333;
+ background-color: #fff;
+ padding: 10px;
+ text-align: center;
+}
+.rd-container-attachment {
+ position: absolute;
+}
+.rd-month {
+ display: inline-block;
+ margin-right: 25px;
+}
+.rd-month:last-child {
+ margin-right: 0;
+}
+.rd-back,
+.rd-next {
+ cursor: pointer;
+ border: none;
+ outline: none;
+ background: none;
+ padding: 0;
+ margin: 0;
+}
+.rd-back[disabled],
+.rd-next[disabled] {
+ cursor: default;
+}
+.rd-back {
+ float: left;
+}
+.rd-next {
+ float: right;
+}
+.rd-back:before {
+ display: block;
+ content: '\2190';
+}
+.rd-next:before {
+ display: block;
+ content: '\2192';
+}
+.rd-day-body {
+ cursor: pointer;
+ text-align: center;
+}
+.rd-day-selected,
+.rd-time-selected,
+.rd-time-option:hover {
+ cursor: pointer;
+ background-color: #333;
+ color: #fff;
+}
+.rd-day-prev-month,
+.rd-day-next-month {
+ color: #999;
+}
+.rd-day-disabled {
+ cursor: default;
+ color: #fcc;
+}
+.rd-time {
+ position: relative;
+ display: inline-block;
+ margin-top: 5px;
+ min-width: 80px;
+}
+.rd-time-list {
+ display: none;
+ position: absolute;
+ overflow-y: scroll;
+ max-height: 160px;
+ left: 0;
+ right: 0;
+ background-color: #fff;
+ color: #333;
+}
+.rd-time-selected {
+ padding: 5px;
+}
+.rd-time-option {
+ padding: 5px;
+}
+.rd-day-concealed {
+ visibility: hidden;
+}
[40/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/cmd.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/cmd.go b/htrace-core/src/go/src/org/apache/htrace/htrace/cmd.go
deleted file mode 100644
index 38cdb58..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/cmd.go
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bufio"
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "github.com/alecthomas/kingpin"
- "io"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "os"
- "time"
-)
-
-var RELEASE_VERSION string
-var GIT_VERSION string
-
-const EXIT_SUCCESS = 0
-const EXIT_FAILURE = 1
-
-var verbose *bool
-
-const USAGE = `The Apache HTrace command-line tool. This tool retrieves and modifies settings and
-other data on a running htraced daemon.
-
-If we find an ` + conf.CONFIG_FILE_NAME + ` configuration file in the list of directories
-specified in ` + conf.HTRACED_CONF_DIR + `, we will use that configuration; otherwise,
-the defaults will be used.
-`
-
-func main() {
- // Load htraced configuration
- cnf := common.LoadApplicationConfig()
-
- // Parse argv
- app := kingpin.New(os.Args[0], USAGE)
- app.Flag("Dmy.key", "Set configuration key 'my.key' to 'my.value'. Replace 'my.key' "+
- "with any key you want to set.").Default("my.value").String()
- addr := app.Flag("addr", "Server address.").String()
- verbose = app.Flag("verbose", "Verbose.").Default("false").Bool()
- version := app.Command("version", "Print the version of this program.")
- serverInfo := app.Command("serverInfo", "Print information retrieved from an htraced server.")
- findSpan := app.Command("findSpan", "Print information about a trace span with a given ID.")
- findSpanId := findSpan.Arg("id", "Span ID to find. Example: 0x123456789abcdef").Required().Uint64()
- findChildren := app.Command("findChildren", "Print out the span IDs that are children of a given span ID.")
- parentSpanId := findChildren.Arg("id", "Span ID to print children for. Example: 0x123456789abcdef").
- Required().Uint64()
- childLim := findChildren.Flag("lim", "Maximum number of child IDs to print.").Default("20").Int()
- loadFile := app.Command("loadFile", "Write whitespace-separated JSON spans from a file to the server.")
- loadFilePath := loadFile.Arg("path",
- "A file containing whitespace-separated span JSON.").Required().String()
- loadJson := app.Command("load", "Write JSON spans from the command-line to the server.")
- loadJsonArg := loadJson.Arg("json", "A JSON span to write to the server.").Required().String()
- dumpAll := app.Command("dumpAll", "Dump all spans from the htraced daemon.")
- dumpAllOutPath := dumpAll.Arg("path", "The path to dump the trace spans to.").Default("-").String()
- dumpAllLim := dumpAll.Flag("lim", "The number of spans to transfer from the server at once.").
- Default("100").Int()
- graph := app.Command("graph", "Visualize span JSON as a graph.")
- graphJsonFile := graph.Arg("input", "The JSON file to load").Required().String()
- graphDotFile := graph.Flag("output",
- "The path to write a GraphViz dotfile to. This file can be used as input to "+
- "GraphViz, in order to generate a pretty picture. See graphviz.org for more "+
- "information about generating pictures of graphs.").Default("-").String()
- query := app.Command("query", "Send a query to htraced.")
- queryLim := query.Flag("lim", "Maximum number of spans to retrieve.").Default("20").Int()
- queryArg := query.Arg("query", "The query string to send. Query strings have the format "+
- "[TYPE] [OPERATOR] [CONST], joined by AND statements.").Required().String()
- rawQuery := app.Command("rawQuery", "Send a raw JSON query to htraced.")
- rawQueryArg := query.Arg("json", "The query JSON to send.").Required().String()
- cmd := kingpin.MustParse(app.Parse(os.Args[1:]))
-
- // Add the command-line settings into the configuration.
- if *addr != "" {
- cnf = cnf.Clone(conf.HTRACE_WEB_ADDRESS, *addr)
- }
-
- // Handle commands that don't require an HTrace client.
- switch cmd {
- case version.FullCommand():
- os.Exit(printVersion())
- case graph.FullCommand():
- err := jsonSpanFileToDotFile(*graphJsonFile, *graphDotFile)
- if err != nil {
- fmt.Printf("graphing error: %s\n", err.Error())
- os.Exit(EXIT_FAILURE)
- }
- os.Exit(EXIT_SUCCESS)
- }
-
- // Create HTrace client
- hcl, err := htrace.NewClient(cnf)
- if err != nil {
- fmt.Printf("Failed to create HTrace client: %s\n", err.Error())
- os.Exit(EXIT_FAILURE)
- }
-
- // Handle commands that require an HTrace client.
- switch cmd {
- case version.FullCommand():
- os.Exit(printVersion())
- case serverInfo.FullCommand():
- os.Exit(printServerInfo(hcl))
- case findSpan.FullCommand():
- os.Exit(doFindSpan(hcl, common.SpanId(*findSpanId)))
- case findChildren.FullCommand():
- os.Exit(doFindChildren(hcl, common.SpanId(*parentSpanId), *childLim))
- case loadJson.FullCommand():
- os.Exit(doLoadSpanJson(hcl, *loadJsonArg))
- case loadFile.FullCommand():
- os.Exit(doLoadSpanJsonFile(hcl, *loadFilePath))
- case dumpAll.FullCommand():
- err := doDumpAll(hcl, *dumpAllOutPath, *dumpAllLim)
- if err != nil {
- fmt.Printf("dumpAll error: %s\n", err.Error())
- os.Exit(EXIT_FAILURE)
- }
- os.Exit(EXIT_SUCCESS)
- case query.FullCommand():
- err := doQueryFromString(hcl, *queryArg, *queryLim)
- if err != nil {
- fmt.Printf("query error: %s\n", err.Error())
- os.Exit(EXIT_FAILURE)
- }
- os.Exit(EXIT_SUCCESS)
- case rawQuery.FullCommand():
- err := doRawQuery(hcl, *rawQueryArg)
- if err != nil {
- fmt.Printf("raw query error: %s\n", err.Error())
- os.Exit(EXIT_FAILURE)
- }
- os.Exit(EXIT_SUCCESS)
- }
-
- app.UsageErrorf(os.Stderr, "You must supply a command to run.")
-}
-
-// Print the version of the htrace binary.
-func printVersion() int {
- fmt.Printf("Running htrace command version %s.\n", RELEASE_VERSION)
- return EXIT_SUCCESS
-}
-
-// Print information retrieved from an htraced server via /server/info
-func printServerInfo(hcl *htrace.Client) int {
- info, err := hcl.GetServerInfo()
- if err != nil {
- fmt.Println(err.Error())
- return EXIT_FAILURE
- }
- fmt.Printf("HTraced server version %s (%s)\n", info.ReleaseVersion, info.GitVersion)
- return EXIT_SUCCESS
-}
-
-// Print information about a trace span.
-func doFindSpan(hcl *htrace.Client, sid common.SpanId) int {
- span, err := hcl.FindSpan(sid)
- if err != nil {
- fmt.Println(err.Error())
- return EXIT_FAILURE
- }
- if span == nil {
- fmt.Printf("Span ID not found.\n")
- return EXIT_FAILURE
- }
- pbuf, err := json.MarshalIndent(span, "", " ")
- if err != nil {
- fmt.Printf("Error: error pretty-printing span to JSON: %s\n", err.Error())
- return EXIT_FAILURE
- }
- fmt.Printf("%s\n", string(pbuf))
- return EXIT_SUCCESS
-}
-
-func doLoadSpanJsonFile(hcl *htrace.Client, spanFile string) int {
- if spanFile == "" {
- fmt.Printf("You must specify the json file to load.\n")
- return EXIT_FAILURE
- }
- file, err := OpenInputFile(spanFile)
- if err != nil {
- fmt.Printf("Failed to open %s: %s\n", spanFile, err.Error())
- return EXIT_FAILURE
- }
- defer file.Close()
- return doLoadSpans(hcl, bufio.NewReader(file))
-}
-
-func doLoadSpanJson(hcl *htrace.Client, spanJson string) int {
- return doLoadSpans(hcl, bytes.NewBufferString(spanJson))
-}
-
-func doLoadSpans(hcl *htrace.Client, reader io.Reader) int {
- dec := json.NewDecoder(reader)
- spans := make([]*common.Span, 0, 32)
- var err error
- for {
- var span common.Span
- if err = dec.Decode(&span); err != nil {
- if err == io.EOF {
- break
- }
- fmt.Printf("Failed to decode JSON: %s\n", err.Error())
- return EXIT_FAILURE
- }
- spans = append(spans, &span)
- }
- if *verbose {
- fmt.Printf("Writing ")
- prefix := ""
- for i := range spans {
- fmt.Printf("%s%s", prefix, spans[i].ToJson())
- prefix = ", "
- }
- fmt.Printf("\n")
- }
- err = hcl.WriteSpans(&common.WriteSpansReq{
- Spans: spans,
- })
- if err != nil {
- fmt.Println(err.Error())
- return EXIT_FAILURE
- }
- return EXIT_SUCCESS
-}
-
-// Find information about the children of a span.
-func doFindChildren(hcl *htrace.Client, sid common.SpanId, lim int) int {
- spanIds, err := hcl.FindChildren(sid, lim)
- if err != nil {
- fmt.Printf("%s\n", err.Error())
- return EXIT_FAILURE
- }
- pbuf, err := json.MarshalIndent(spanIds, "", " ")
- if err != nil {
- fmt.Println("Error: error pretty-printing span IDs to JSON: %s", err.Error())
- return 1
- }
- fmt.Printf("%s\n", string(pbuf))
- return 0
-}
-
-// Dump all spans from the htraced daemon.
-func doDumpAll(hcl *htrace.Client, outPath string, lim int) error {
- file, err := CreateOutputFile(outPath)
- if err != nil {
- return err
- }
- w := bufio.NewWriter(file)
- defer func() {
- if file != nil {
- w.Flush()
- file.Close()
- }
- }()
- out := make(chan *common.Span, 50)
- var dumpErr error
- go func() {
- dumpErr = hcl.DumpAll(lim, out)
- }()
- var numSpans int64
- nextLogTime := time.Now().Add(time.Second * 5)
- for {
- span, channelOpen := <-out
- if !channelOpen {
- break
- }
- if err == nil {
- _, err = fmt.Fprintf(w, "%s\n", span.ToJson())
- }
- if *verbose {
- numSpans++
- now := time.Now()
- if !now.Before(nextLogTime) {
- nextLogTime = now.Add(time.Second * 5)
- fmt.Printf("received %d span(s)...\n", numSpans)
- }
- }
- }
- if err != nil {
- return errors.New(fmt.Sprintf("Write error %s", err.Error()))
- }
- if dumpErr != nil {
- return errors.New(fmt.Sprintf("Dump error %s", dumpErr.Error()))
- }
- err = w.Flush()
- if err != nil {
- return err
- }
- err = file.Close()
- file = nil
- if err != nil {
- return err
- }
- return nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/file.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/file.go b/htrace-core/src/go/src/org/apache/htrace/htrace/file.go
deleted file mode 100644
index ea214be..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/file.go
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bufio"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "org/apache/htrace/common"
- "os"
-)
-
-// A file used for input.
-// Transparently supports using stdin for input.
-type InputFile struct {
- *os.File
- path string
-}
-
-// Open an input file. Stdin will be used when path is -
-func OpenInputFile(path string) (*InputFile, error) {
- if path == "-" {
- return &InputFile{File: os.Stdin, path: path}, nil
- }
- file, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- return &InputFile{File: file, path: path}, nil
-}
-
-func (file *InputFile) Close() {
- if file.path != "-" {
- file.File.Close()
- }
-}
-
-// A file used for output.
-// Transparently supports using stdout for output.
-type OutputFile struct {
- *os.File
- path string
-}
-
-// Create an output file. Stdout will be used when path is -
-func CreateOutputFile(path string) (*OutputFile, error) {
- if path == "-" {
- return &OutputFile{File: os.Stdout, path: path}, nil
- }
- file, err := os.Create(path)
- if err != nil {
- return nil, err
- }
- return &OutputFile{File: file, path: path}, nil
-}
-
-func (file *OutputFile) Close() error {
- if file.path != "-" {
- return file.File.Close()
- }
- return nil
-}
-
-// FailureDeferringWriter is a writer which allows us to call Printf multiple
-// times and then check if all the printfs succeeded at the very end, rather
-// than checking after each call. We will not attempt to write more data
-// after the first write failure.
-type FailureDeferringWriter struct {
- io.Writer
- err error
-}
-
-func NewFailureDeferringWriter(writer io.Writer) *FailureDeferringWriter {
- return &FailureDeferringWriter{writer, nil}
-}
-
-func (w *FailureDeferringWriter) Printf(format string, v ...interface{}) {
- if w.err != nil {
- return
- }
- str := fmt.Sprintf(format, v...)
- _, err := w.Writer.Write([]byte(str))
- if err != nil {
- w.err = err
- }
-}
-
-func (w *FailureDeferringWriter) Error() error {
- return w.err
-}
-
-// Read a file full of whitespace-separated span JSON into a slice of spans.
-func readSpansFile(path string) (common.SpanSlice, error) {
- file, err := OpenInputFile(path)
- if err != nil {
- return nil, err
- }
- defer file.Close()
- return readSpans(bufio.NewReader(file))
-}
-
-// Read whitespace-separated span JSON into a slice of spans.
-func readSpans(reader io.Reader) (common.SpanSlice, error) {
- spans := make(common.SpanSlice, 0)
- dec := json.NewDecoder(reader)
- for {
- var span common.Span
- err := dec.Decode(&span)
- if err != nil {
- if err != io.EOF {
- return nil, errors.New(fmt.Sprintf("Decode error after decoding %d "+
- "span(s): %s", len(spans), err.Error()))
- }
- break
- }
- spans = append(spans, &span)
- }
- return spans, nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/file_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/file_test.go b/htrace-core/src/go/src/org/apache/htrace/htrace/file_test.go
deleted file mode 100644
index b6f9cac..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/file_test.go
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "errors"
- "io"
- "io/ioutil"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "org/apache/htrace/test"
- "os"
- "strings"
- "testing"
-)
-
-func TestInputFileAndOutputFile(t *testing.T) {
- tdir, err := ioutil.TempDir(os.TempDir(), "TestInputFileAndOutputFile")
- if err != nil {
- t.Fatalf("failed to create TempDir: %s\n", err.Error())
- }
- defer os.RemoveAll(tdir)
- tpath := tdir + conf.PATH_SEP + "test"
- var ofile *OutputFile
- ofile, err = CreateOutputFile(tpath)
- if err != nil {
- t.Fatalf("failed to create OutputFile at %s: %s\n", tpath, err.Error())
- }
- defer func() {
- if ofile != nil {
- ofile.Close()
- }
- }()
- w := NewFailureDeferringWriter(ofile)
- w.Printf("Hello, world!\n")
- w.Printf("2 + 2 = %d\n", 4)
- if w.Error() != nil {
- t.Fatalf("got unexpected error writing to %s: %s\n", tpath, w.Error().Error())
- }
- err = ofile.Close()
- ofile = nil
- if err != nil {
- t.Fatalf("error on closing OutputFile for %s: %s\n", tpath, err.Error())
- }
- var ifile *InputFile
- ifile, err = OpenInputFile(tpath)
- defer ifile.Close()
- expected := "Hello, world!\n2 + 2 = 4\n"
- buf := make([]byte, len(expected))
- _, err = io.ReadAtLeast(ifile, buf, len(buf))
- if err != nil {
- t.Fatalf("unexpected error on reading %s: %s\n", tpath, err.Error())
- }
- str := string(buf)
- if str != expected {
- t.Fatalf("Could not read back what we wrote to %s.\n"+
- "Got:\n%s\nExpected:\n%s\n", tpath, str, expected)
- }
-}
-
-type LimitedBufferWriter struct {
- buf []byte
- off int
-}
-
-const LIMITED_BUFFER_MESSAGE = "There isn't enough buffer to go around!"
-
-func (w *LimitedBufferWriter) Write(p []byte) (int, error) {
- var nwritten int
- for i := range p {
- if w.off >= len(w.buf) {
- return nwritten, errors.New(LIMITED_BUFFER_MESSAGE)
- }
- w.buf[w.off] = p[i]
- w.off = w.off + 1
- nwritten++
- }
- return nwritten, nil
-}
-
-func TestFailureDeferringWriter(t *testing.T) {
- lw := LimitedBufferWriter{buf: make([]byte, 20), off: 0}
- w := NewFailureDeferringWriter(&lw)
- w.Printf("Zippity do dah #%d\n", 1)
- w.Printf("Zippity do dah #%d\n", 2)
- if w.Error() == nil {
- t.Fatalf("expected FailureDeferringWriter to experience a failure due to " +
- "limited buffer size, but it did not.")
- }
- if w.Error().Error() != LIMITED_BUFFER_MESSAGE {
- t.Fatalf("expected FailureDeferringWriter to have the error message %s, but "+
- "the message was %s\n", LIMITED_BUFFER_MESSAGE, w.Error().Error())
- }
- expected := "Zippity do dah #1\nZi"
- if string(lw.buf) != expected {
- t.Fatalf("expected LimitedBufferWriter to contain %s, but it contained %s "+
- "instead.\n", expected, string(lw.buf))
- }
-}
-
-func TestReadSpans(t *testing.T) {
- SPAN_TEST_STR := `{"i":"bdd6d4ee48de59bf","s":"c0681027d3ea4928",` +
- `"b":1424736225037,"e":1424736225901,"d":"ClientNamenodeProtocol#getFileInfo",` +
- `"r":"FsShell","p":["60538dfb4df91418"]}
-{"i":"bdd6d4ee48de59bf","s":"60538dfb4df91418","b":1424736224969,` +
- `"e":1424736225960,"d":"getFileInfo","r":"FsShell","p":[],"n":{"path":"/"}}
-`
- r := strings.NewReader(SPAN_TEST_STR)
- spans, err := readSpans(r)
- if err != nil {
- t.Fatalf("Failed to read spans from string via readSpans: %s\n", err.Error())
- }
- SPAN_TEST_EXPECTED := common.SpanSlice{
- &common.Span{
- Id: test.SpanId("c0681027d3ea4928"),
- SpanData: common.SpanData{
- TraceId: test.SpanId("bdd6d4ee48de59bf"),
- Begin: 1424736225037,
- End: 1424736225901,
- Description: "ClientNamenodeProtocol#getFileInfo",
- ProcessId: "FsShell",
- Parents: []common.SpanId{test.SpanId("60538dfb4df91418")},
- },
- },
- &common.Span{
- Id: test.SpanId("60538dfb4df91418"),
- SpanData: common.SpanData{
- TraceId: test.SpanId("bdd6d4ee48de59bf"),
- Begin: 1424736224969,
- End: 1424736225960,
- Description: "getFileInfo",
- ProcessId: "FsShell",
- Parents: []common.SpanId{},
- Info: common.TraceInfoMap{
- "path": "/",
- },
- },
- },
- }
- if len(spans) != len(SPAN_TEST_EXPECTED) {
- t.Fatalf("Expected %d spans, but got %d\n",
- len(SPAN_TEST_EXPECTED), len(spans))
- }
- for i := range SPAN_TEST_EXPECTED {
- common.ExpectSpansEqual(t, spans[i], SPAN_TEST_EXPECTED[i])
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/graph.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/graph.go b/htrace-core/src/go/src/org/apache/htrace/htrace/graph.go
deleted file mode 100644
index dabf2df..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/graph.go
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "org/apache/htrace/common"
- "os"
- "sort"
-)
-
-// Create a dotfile from a json file.
-func jsonSpanFileToDotFile(jsonFile string, dotFile string) error {
- spans, err := readSpansFile(jsonFile)
- if err != nil {
- return errors.New(fmt.Sprintf("error reading %s: %s",
- jsonFile, err.Error()))
- }
- var file *OutputFile
- file, err = CreateOutputFile(dotFile)
- if err != nil {
- return errors.New(fmt.Sprintf("error opening %s for write: %s",
- dotFile, err.Error()))
- }
- defer func() {
- if file != nil {
- file.Close()
- }
- }()
- writer := bufio.NewWriter(file)
- err = spansToDot(spans, writer)
- if err != nil {
- return err
- }
- err = writer.Flush()
- if err != nil {
- return err
- }
- err = file.Close()
- file = nil
- return err
-}
-
-// Create output in dotfile format from a set of spans.
-func spansToDot(spans common.SpanSlice, writer io.Writer) error {
- sort.Sort(spans)
- idMap := make(map[common.SpanId]*common.Span)
- for i := range spans {
- span := spans[i]
- if idMap[span.Id] != nil {
- fmt.Fprintf(os.Stderr, "There were multiple spans listed which "+
- "had ID %s.\nFirst:%s\nOther:%s\n", span.Id.String(),
- idMap[span.Id].ToJson(), span.ToJson())
- } else {
- idMap[span.Id] = span
- }
- }
- childMap := make(map[common.SpanId]common.SpanSlice)
- for i := range spans {
- child := spans[i]
- for j := range child.Parents {
- parent := idMap[child.Parents[j]]
- if parent == nil {
- fmt.Fprintf(os.Stderr, "Can't find parent id %s for %s\n",
- child.Parents[j].String(), child.ToJson())
- } else {
- children := childMap[parent.Id]
- if children == nil {
- children = make(common.SpanSlice, 0)
- }
- children = append(children, child)
- childMap[parent.Id] = children
- }
- }
- }
- w := NewFailureDeferringWriter(writer)
- w.Printf("digraph spans {\n")
- // Write out the nodes with their descriptions.
- for i := range spans {
- w.Printf(fmt.Sprintf(` "%s" [label="%s"];`+"\n",
- spans[i].Id.String(), spans[i].Description))
- }
- // Write out the edges between nodes... the parent/children relationships
- for i := range spans {
- children := childMap[spans[i].Id]
- sort.Sort(children)
- if children != nil {
- for c := range children {
- w.Printf(fmt.Sprintf(` "%s" -> "%s";`+"\n",
- spans[i].Id.String(), children[c].Id))
- }
- }
- }
- w.Printf("}\n")
- return w.Error()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/graph_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/graph_test.go b/htrace-core/src/go/src/org/apache/htrace/htrace/graph_test.go
deleted file mode 100644
index 8698a98..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/graph_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bytes"
- "org/apache/htrace/common"
- "org/apache/htrace/test"
- "testing"
-)
-
-func TestSpansToDot(t *testing.T) {
- TEST_SPANS := common.SpanSlice{
- &common.Span{
- Id: test.SpanId("6af3cc058e5d829d"),
- SpanData: common.SpanData{
- TraceId: test.SpanId("0e4716fe911244de"),
- Begin: 1424813349020,
- End: 1424813349134,
- Description: "newDFSInputStream",
- ProcessId: "FsShell",
- Parents: []common.SpanId{},
- Info: common.TraceInfoMap{
- "path": "/",
- },
- },
- },
- &common.Span{
- Id: test.SpanId("75d16cc5b2c07d8a"),
- SpanData: common.SpanData{
- TraceId: test.SpanId("0e4716fe911244de"),
- Begin: 1424813349025,
- End: 1424813349133,
- Description: "getBlockLocations",
- ProcessId: "FsShell",
- Parents: []common.SpanId{test.SpanId("6af3cc058e5d829d")},
- },
- },
- &common.Span{
- Id: test.SpanId("e2c7273efb280a8c"),
- SpanData: common.SpanData{
- TraceId: test.SpanId("0e4716fe911244de"),
- Begin: 1424813349027,
- End: 1424813349073,
- Description: "ClientNamenodeProtocol#getBlockLocations",
- ProcessId: "FsShell",
- Parents: []common.SpanId{test.SpanId("75d16cc5b2c07d8a")},
- },
- },
- }
- w := bytes.NewBuffer(make([]byte, 0, 2048))
- err := spansToDot(TEST_SPANS, w)
- if err != nil {
- t.Fatalf("spansToDot failed: error %s\n", err.Error())
- }
- EXPECTED_STR := `digraph spans {
- "6af3cc058e5d829d" [label="newDFSInputStream"];
- "75d16cc5b2c07d8a" [label="getBlockLocations"];
- "e2c7273efb280a8c" [label="ClientNamenodeProtocol#getBlockLocations"];
- "6af3cc058e5d829d" -> "75d16cc5b2c07d8a";
- "75d16cc5b2c07d8a" -> "e2c7273efb280a8c";
-}
-`
- if w.String() != EXPECTED_STR {
- t.Fatalf("Expected to get:\n%s\nGot:\n%s\n", EXPECTED_STR, w.String())
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htrace/queries.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htrace/queries.go b/htrace-core/src/go/src/org/apache/htrace/htrace/queries.go
deleted file mode 100644
index 4ff246c..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htrace/queries.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "strings"
- "unicode"
-)
-
-// Convert a string into a whitespace-separated sequence of strings.
-func tokenize(str string) []string {
- prevQuote := rune(0)
- f := func(c rune) bool {
- switch {
- case c == prevQuote:
- prevQuote = rune(0)
- return false
- case prevQuote != rune(0):
- return false
- case unicode.In(c, unicode.Quotation_Mark):
- prevQuote = c
- return false
- default:
- return unicode.IsSpace(c)
- }
- }
- return strings.FieldsFunc(str, f)
-}
-
-// Parses a query string in the format of a series of
-// [TYPE] [OPERATOR] [CONST] tuples, joined by AND statements.
-type predicateParser struct {
- tokens []string
- curToken int
-}
-
-func (ps *predicateParser) Parse() (*common.Predicate, error) {
- if ps.curToken > len(ps.tokens) {
- return nil, nil
- }
- if ps.curToken > 0 {
- if strings.ToLower(ps.tokens[ps.curToken]) != "and" {
- return nil, errors.New(fmt.Sprintf("Error parsing on token %d: "+
- "expected predicates to be joined by 'and', but found '%s'",
- ps.curToken, ps.tokens[ps.curToken]))
- }
- ps.curToken++
- if ps.curToken > len(ps.tokens) {
- return nil, errors.New(fmt.Sprintf("Nothing found after 'and' at "+
- "token %d", ps.curToken))
- }
- }
- field := common.Field(ps.tokens[ps.curToken])
- if !field.IsValid() {
- return nil, errors.New(fmt.Sprintf("Invalid field specifier at token %d. "+
- "Can't understand %s. Valid field specifiers are %v", ps.curToken,
- ps.tokens[ps.curToken], common.ValidFields()))
- }
- ps.curToken++
- if ps.curToken > len(ps.tokens) {
- return nil, errors.New(fmt.Sprintf("Nothing found after field specifier "+
- "at token %d", ps.curToken))
- }
- op := common.Op(ps.tokens[ps.curToken])
- if !op.IsValid() {
- return nil, errors.New(fmt.Sprintf("Invalid operation specifier at token %d. "+
- "Can't understand %s. Valid operation specifiers are %v", ps.curToken,
- ps.tokens[ps.curToken], common.ValidOps()))
- }
- ps.curToken++
- if ps.curToken > len(ps.tokens) {
- return nil, errors.New(fmt.Sprintf("Nothing found after field specifier "+
- "at token %d", ps.curToken))
- }
- val := ps.tokens[ps.curToken]
- return &common.Predicate{Op: op, Field: field, Val: val}, nil
-}
-
-func parseQueryString(str string) ([]common.Predicate, error) {
- ps := predicateParser{tokens: tokenize(str)}
- preds := make([]common.Predicate, 0)
- for {
- pred, err := ps.Parse()
- if pred == nil {
- break
- }
- if err != nil {
- return nil, err
- }
- }
- if len(preds) == 0 {
- return nil, errors.New("Empty query string")
- }
- return preds, nil
-}
-
-// Send a query from a query string.
-func doQueryFromString(hcl *htrace.Client, str string, lim int) error {
- query := &common.Query{Lim: lim}
- var err error
- query.Predicates, err = parseQueryString(str)
- if err != nil {
- return err
- }
- return doQuery(hcl, query)
-}
-
-// Send a query from a raw JSON string.
-func doRawQuery(hcl *htrace.Client, str string) error {
- jsonBytes := []byte(str)
- var query common.Query
- err := json.Unmarshal(jsonBytes, &query)
- if err != nil {
- return errors.New(fmt.Sprintf("Error parsing provided JSON: %s\n", err.Error()))
- }
- return doQuery(hcl, &query)
-}
-
-// Send a query.
-func doQuery(hcl *htrace.Client, query *common.Query) error {
- if *verbose {
- qbytes, err := json.Marshal(*query)
- if err != nil {
- qbytes = []byte("marshaling error: " + err.Error())
- }
- fmt.Printf("Sending query: %s\n", string(qbytes))
- }
- spans, err := hcl.Query(query)
- if err != nil {
- return err
- }
- if *verbose {
- fmt.Printf("%d results...\n", len(spans))
- }
- for i := range spans {
- fmt.Printf("%s\n", spans[i].ToJson())
- }
- return nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/client_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/client_test.go b/htrace-core/src/go/src/org/apache/htrace/htraced/client_test.go
deleted file mode 100644
index 218c1c8..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/client_test.go
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "fmt"
- "math/rand"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/test"
- "sort"
- "testing"
- "time"
-)
-
-func TestClientGetServerInfo(t *testing.T) {
- htraceBld := &MiniHTracedBuilder{Name: "TestClientGetServerInfo",
- DataDirs: make([]string, 2)}
- ht, err := htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to create datastore: %s", err.Error())
- }
- defer ht.Close()
- var hcl *htrace.Client
- hcl, err = htrace.NewClient(ht.ClientConf())
- if err != nil {
- t.Fatalf("failed to create client: %s", err.Error())
- }
- _, err = hcl.GetServerInfo()
- if err != nil {
- t.Fatalf("failed to call GetServerInfo: %s", err.Error())
- }
-}
-
-func createRandomTestSpans(amount int) common.SpanSlice {
- rnd := rand.New(rand.NewSource(2))
- allSpans := make(common.SpanSlice, amount)
- allSpans[0] = test.NewRandomSpan(rnd, allSpans[0:0])
- for i := 1; i < amount; i++ {
- allSpans[i] = test.NewRandomSpan(rnd, allSpans[1:i])
- }
- allSpans[1].SpanData.Parents = []common.SpanId{common.SpanId(allSpans[0].Id)}
- return allSpans
-}
-
-func TestClientOperations(t *testing.T) {
- htraceBld := &MiniHTracedBuilder{Name: "TestClientOperations",
- DataDirs: make([]string, 2)}
- ht, err := htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to create datastore: %s", err.Error())
- }
- defer ht.Close()
- var hcl *htrace.Client
- hcl, err = htrace.NewClient(ht.ClientConf())
- if err != nil {
- t.Fatalf("failed to create client: %s", err.Error())
- }
-
- // Create some random trace spans.
- NUM_TEST_SPANS := 30
- allSpans := createRandomTestSpans(NUM_TEST_SPANS)
-
- // Write half of the spans to htraced via the client.
- err = hcl.WriteSpans(&common.WriteSpansReq{
- Spans: allSpans[0 : NUM_TEST_SPANS/2],
- })
- if err != nil {
- t.Fatalf("WriteSpans(0:%d) failed: %s\n", NUM_TEST_SPANS/2,
- err.Error())
- }
-
- // Look up the first half of the spans. They should be found.
- var span *common.Span
- for i := 0; i < NUM_TEST_SPANS/2; i++ {
- span, err = hcl.FindSpan(allSpans[i].Id)
- if err != nil {
- t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
- }
- common.ExpectSpansEqual(t, allSpans[i], span)
- }
-
- // Look up the second half of the spans. They should not be found.
- for i := NUM_TEST_SPANS / 2; i < NUM_TEST_SPANS; i++ {
- span, err = hcl.FindSpan(allSpans[i].Id)
- if err != nil {
- t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
- }
- if span != nil {
- t.Fatalf("Unexpectedly found a span we never write to "+
- "the server: FindSpan(%d) succeeded\n", i)
- }
- }
-
- // Test FindChildren
- childSpan := allSpans[1]
- parentId := childSpan.Parents[0]
- var children []common.SpanId
- children, err = hcl.FindChildren(parentId, 1)
- if err != nil {
- t.Fatalf("FindChildren(%s) failed: %s\n", parentId, err.Error())
- }
- if len(children) != 1 {
- t.Fatalf("FindChildren(%s) returned an invalid number of "+
- "children: expected %d, got %d\n", parentId, 1, len(children))
- }
- if children[0] != childSpan.Id {
- t.Fatalf("FindChildren(%s) returned an invalid child id: expected %s, "+
- " got %s\n", parentId, childSpan.Id, children[0])
- }
-
- // Test FindChildren on a span that has no children
- childlessSpan := allSpans[NUM_TEST_SPANS/2]
- children, err = hcl.FindChildren(childlessSpan.Id, 10)
- if err != nil {
- t.Fatalf("FindChildren(%d) failed: %s\n", childlessSpan.Id, err.Error())
- }
- if len(children) != 0 {
- t.Fatalf("FindChildren(%d) returned an invalid number of "+
- "children: expected %d, got %d\n", childlessSpan.Id, 0, len(children))
- }
-
- // Test Query
- var query common.Query
- query = common.Query{Lim: 10}
- spans, err := hcl.Query(&query)
- if err != nil {
- t.Fatalf("Query({lim: %d}) failed: %s\n", 10, err.Error())
- }
- if len(spans) != 10 {
- t.Fatalf("Query({lim: %d}) returned an invalid number of "+
- "children: expected %d, got %d\n", 10, 10, len(spans))
- }
-}
-
-func TestDumpAll(t *testing.T) {
- htraceBld := &MiniHTracedBuilder{Name: "TestDumpAll",
- DataDirs: make([]string, 2)}
- ht, err := htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to create datastore: %s", err.Error())
- }
- defer ht.Close()
- var hcl *htrace.Client
- hcl, err = htrace.NewClient(ht.ClientConf())
- if err != nil {
- t.Fatalf("failed to create client: %s", err.Error())
- }
-
- NUM_TEST_SPANS := 100
- allSpans := createRandomTestSpans(NUM_TEST_SPANS)
- sort.Sort(allSpans)
- err = hcl.WriteSpans(&common.WriteSpansReq{
- Spans: allSpans,
- })
- if err != nil {
- t.Fatalf("WriteSpans failed: %s\n", err.Error())
- }
- out := make(chan *common.Span, 50)
- var dumpErr error
- go func() {
- dumpErr = hcl.DumpAll(3, out)
- }()
- var numSpans int
- nextLogTime := time.Now().Add(time.Millisecond * 5)
- for {
- span, channelOpen := <-out
- if !channelOpen {
- break
- }
- common.ExpectSpansEqual(t, allSpans[numSpans], span)
- numSpans++
- if testing.Verbose() {
- now := time.Now()
- if !now.Before(nextLogTime) {
- nextLogTime = now
- nextLogTime = nextLogTime.Add(time.Millisecond * 5)
- fmt.Printf("read back %d span(s)...\n", numSpans)
- }
- }
- }
- if numSpans != len(allSpans) {
- t.Fatalf("expected to read %d spans... but only read %d\n",
- len(allSpans), numSpans)
- }
- if dumpErr != nil {
- t.Fatalf("got dump error %s\n", dumpErr.Error())
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/datastore.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/datastore.go b/htrace-core/src/go/src/org/apache/htrace/htraced/datastore.go
deleted file mode 100644
index faf23cd..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/datastore.go
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bytes"
- "encoding/gob"
- "errors"
- "fmt"
- "github.com/jmhodges/levigo"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "os"
- "strconv"
- "strings"
- "sync/atomic"
-)
-
-//
-// The data store code for HTraced.
-//
-// This code stores the trace spans. We use levelDB here so that we don't have to store everything
-// in memory at all times. The data is sharded across multiple levelDB databases in multiple
-// directories. Normally, these multiple directories will be on multiple disk drives.
-//
-// The main emphasis in the HTraceD data store is on quickly and efficiently storing trace span data
-// coming from many daemons. Durability is not as big a concern as in some data stores, since
-// losing a little bit of trace data if htraced goes down is not critical. We use the "gob" package
-// for serialization. We assume that there will be many more writes than reads.
-//
-// Schema
-// m -> dataStoreVersion
-// s[8-byte-big-endian-sid] -> SpanData
-// b[8-byte-big-endian-begin-time][8-byte-big-endian-child-sid] -> {}
-// e[8-byte-big-endian-end-time][8-byte-big-endian-child-sid] -> {}
-// d[8-byte-big-endian-duration][8-byte-big-endian-child-sid] -> {}
-// p[8-byte-big-endian-parent-sid][8-byte-big-endian-child-sid] -> {}
-//
-// Note that span IDs are unsigned 64-bit numbers.
-// Begin times, end times, and durations are signed 64-bit numbers.
-// In order to get LevelDB to properly compare the signed 64-bit quantities,
-// we flip the highest bit. This way, we can get leveldb to view negative
-// quantities as less than non-negative ones. This also means that we can do
-// all queries using unsigned 64-bit math, rather than having to special-case
-// the signed fields.
-//
-
-const UNKNOWN_LAYOUT_VERSION = 0
-const CURRENT_LAYOUT_VERSION = 2
-
-var EMPTY_BYTE_BUF []byte = []byte{}
-
-const VERSION_KEY = 'v'
-const SPAN_ID_INDEX_PREFIX = 's'
-const BEGIN_TIME_INDEX_PREFIX = 'b'
-const END_TIME_INDEX_PREFIX = 'e'
-const DURATION_INDEX_PREFIX = 'd'
-const PARENT_ID_INDEX_PREFIX = 'p'
-const INVALID_INDEX_PREFIX = 0
-
-type Statistics struct {
- NumSpansWritten uint64
-}
-
-func (stats *Statistics) IncrementWrittenSpans() {
- atomic.AddUint64(&stats.NumSpansWritten, 1)
-}
-
-// Make a copy of the statistics structure, using atomic operations.
-func (stats *Statistics) Copy() *Statistics {
- return &Statistics{
- NumSpansWritten: atomic.LoadUint64(&stats.NumSpansWritten),
- }
-}
-
-// Translate a span id into a leveldb key.
-func makeKey(tag byte, sid uint64) []byte {
- id := uint64(sid)
- return []byte{
- tag,
- byte(0xff & (id >> 56)),
- byte(0xff & (id >> 48)),
- byte(0xff & (id >> 40)),
- byte(0xff & (id >> 32)),
- byte(0xff & (id >> 24)),
- byte(0xff & (id >> 16)),
- byte(0xff & (id >> 8)),
- byte(0xff & (id >> 0)),
- }
-}
-
-func keyToInt(key []byte) uint64 {
- var id uint64
- id = (uint64(key[0]) << 56) |
- (uint64(key[1]) << 48) |
- (uint64(key[2]) << 40) |
- (uint64(key[3]) << 32) |
- (uint64(key[4]) << 24) |
- (uint64(key[5]) << 16) |
- (uint64(key[6]) << 8) |
- (uint64(key[7]) << 0)
- return id
-}
-
-func makeSecondaryKey(tag byte, fir uint64, sec uint64) []byte {
- return []byte{
- tag,
- byte(0xff & (fir >> 56)),
- byte(0xff & (fir >> 48)),
- byte(0xff & (fir >> 40)),
- byte(0xff & (fir >> 32)),
- byte(0xff & (fir >> 24)),
- byte(0xff & (fir >> 16)),
- byte(0xff & (fir >> 8)),
- byte(0xff & (fir >> 0)),
- byte(0xff & (sec >> 56)),
- byte(0xff & (sec >> 48)),
- byte(0xff & (sec >> 40)),
- byte(0xff & (sec >> 32)),
- byte(0xff & (sec >> 24)),
- byte(0xff & (sec >> 16)),
- byte(0xff & (sec >> 8)),
- byte(0xff & (sec >> 0)),
- }
-}
-
-// A single directory containing a levelDB instance.
-type shard struct {
- // The data store that this shard is part of
- store *dataStore
-
- // The LevelDB instance.
- ldb *levigo.DB
-
- // The path to the leveldb directory this shard is managing.
- path string
-
- // Incoming requests to write Spans.
- incoming chan *common.Span
-
- // The channel we will send a bool to when we exit.
- exited chan bool
-}
-
-// Process incoming spans for a shard.
-func (shd *shard) processIncoming() {
- lg := shd.store.lg
- for {
- span := <-shd.incoming
- if span == nil {
- lg.Infof("Shard processor for %s exiting.\n", shd.path)
- shd.exited <- true
- return
- }
- err := shd.writeSpan(span)
- if err != nil {
- lg.Errorf("Shard processor for %s got fatal error %s.\n", shd.path, err.Error())
- } else {
- lg.Tracef("Shard processor for %s wrote span %s.\n", shd.path, span.ToJson())
- }
- }
-}
-
-// Convert a signed 64-bit number into an unsigned 64-bit number. We flip the
-// highest bit, so that negative input values map to unsigned numbers which are
-// less than non-negative input values.
-func s2u64(val int64) uint64 {
- ret := uint64(val)
- ret ^= 0x8000000000000000
- return ret
-}
-
-func (shd *shard) writeSpan(span *common.Span) error {
- batch := levigo.NewWriteBatch()
- defer batch.Close()
-
- // Add SpanData to batch.
- spanDataBuf := new(bytes.Buffer)
- spanDataEnc := gob.NewEncoder(spanDataBuf)
- err := spanDataEnc.Encode(span.SpanData)
- if err != nil {
- return err
- }
- batch.Put(makeKey(SPAN_ID_INDEX_PREFIX, span.Id.Val()), spanDataBuf.Bytes())
-
- // Add this to the parent index.
- for parentIdx := range span.Parents {
- batch.Put(makeSecondaryKey(PARENT_ID_INDEX_PREFIX,
- span.Parents[parentIdx].Val(), span.Id.Val()), EMPTY_BYTE_BUF)
- }
-
- // Add to the other secondary indices.
- batch.Put(makeSecondaryKey(BEGIN_TIME_INDEX_PREFIX, s2u64(span.Begin),
- span.Id.Val()), EMPTY_BYTE_BUF)
- batch.Put(makeSecondaryKey(END_TIME_INDEX_PREFIX, s2u64(span.End),
- span.Id.Val()), EMPTY_BYTE_BUF)
- batch.Put(makeSecondaryKey(DURATION_INDEX_PREFIX, s2u64(span.Duration()),
- span.Id.Val()), EMPTY_BYTE_BUF)
-
- err = shd.ldb.Write(shd.store.writeOpts, batch)
- if err != nil {
- return err
- }
- shd.store.stats.IncrementWrittenSpans()
- if shd.store.WrittenSpans != nil {
- shd.store.WrittenSpans <- span
- }
- return nil
-}
-
-func (shd *shard) FindChildren(sid common.SpanId, childIds []common.SpanId,
- lim int32) ([]common.SpanId, int32, error) {
- searchKey := makeKey('p', sid.Val())
- iter := shd.ldb.NewIterator(shd.store.readOpts)
- defer iter.Close()
- iter.Seek(searchKey)
- for {
- if !iter.Valid() {
- break
- }
- if lim == 0 {
- break
- }
- key := iter.Key()
- if !bytes.HasPrefix(key, searchKey) {
- break
- }
- id := common.SpanId(keyToInt(key[9:]))
- childIds = append(childIds, id)
- lim--
- iter.Next()
- }
- return childIds, lim, nil
-}
-
-// Close a shard.
-func (shd *shard) Close() {
- lg := shd.store.lg
- shd.incoming <- nil
- lg.Infof("Waiting for %s to exit...\n", shd.path)
- if shd.exited != nil {
- <-shd.exited
- }
- shd.ldb.Close()
- lg.Infof("Closed %s...\n", shd.path)
-}
-
-// The Data Store.
-type dataStore struct {
- lg *common.Logger
-
- // The shards which manage our LevelDB instances.
- shards []*shard
-
- // I/O statistics for all shards.
- stats Statistics
-
- // The read options to use for LevelDB.
- readOpts *levigo.ReadOptions
-
- // The write options to use for LevelDB.
- writeOpts *levigo.WriteOptions
-
- // If non-null, a channel we will send spans to once we finish writing them. This is only used
- // for testing.
- WrittenSpans chan *common.Span
-}
-
-func CreateDataStore(cnf *conf.Config, writtenSpans chan *common.Span) (*dataStore, error) {
- // Get the configuration.
- clearStored := cnf.GetBool(conf.HTRACE_DATA_STORE_CLEAR)
- dirsStr := cnf.Get(conf.HTRACE_DATA_STORE_DIRECTORIES)
- dirs := strings.Split(dirsStr, conf.PATH_LIST_SEP)
-
- var err error
- lg := common.NewLogger("datastore", cnf)
- store := &dataStore{lg: lg, shards: []*shard{}, WrittenSpans: writtenSpans}
-
- // If we return an error, close the store.
- defer func() {
- if err != nil {
- store.Close()
- store = nil
- }
- }()
-
- store.readOpts = levigo.NewReadOptions()
- store.readOpts.SetFillCache(true)
- store.writeOpts = levigo.NewWriteOptions()
- store.writeOpts.SetSync(false)
-
- // Open all shards
- for idx := range dirs {
- path := dirs[idx] + conf.PATH_SEP + "db"
- var shd *shard
- shd, err = CreateShard(store, cnf, path, clearStored)
- if err != nil {
- lg.Errorf("Error creating shard %s: %s\n", path, err.Error())
- return nil, err
- }
- store.shards = append(store.shards, shd)
- }
- for idx := range store.shards {
- shd := store.shards[idx]
- shd.exited = make(chan bool, 1)
- go shd.processIncoming()
- }
- return store, nil
-}
-
-func CreateShard(store *dataStore, cnf *conf.Config, path string,
- clearStored bool) (*shard, error) {
- lg := store.lg
- if clearStored {
- fi, err := os.Stat(path)
- if err != nil && !os.IsNotExist(err) {
- lg.Errorf("Failed to stat %s: %s\n", path, err.Error())
- return nil, err
- }
- if fi != nil {
- err = os.RemoveAll(path)
- if err != nil {
- lg.Errorf("Failed to clear existing datastore directory %s: %s\n",
- path, err.Error())
- return nil, err
- }
- lg.Infof("Cleared existing datastore directory %s\n", path)
- }
- }
- err := os.MkdirAll(path, 0777)
- if err != nil {
- lg.Errorf("Failed to MkdirAll(%s): %s\n", path, err.Error())
- return nil, err
- }
- var shd *shard
- openOpts := levigo.NewOptions()
- defer openOpts.Close()
- newlyCreated := false
- ldb, err := levigo.Open(path, openOpts)
- if err == nil {
- store.lg.Infof("LevelDB opened %s\n", path)
- } else {
- store.lg.Debugf("LevelDB failed to open %s: %s\n", path, err.Error())
- openOpts.SetCreateIfMissing(true)
- ldb, err = levigo.Open(path, openOpts)
- if err != nil {
- store.lg.Errorf("LevelDB failed to create %s: %s\n", path, err.Error())
- return nil, err
- }
- store.lg.Infof("Created new LevelDB instance in %s\n", path)
- newlyCreated = true
- }
- defer func() {
- if shd == nil {
- ldb.Close()
- }
- }()
- lv, err := readLayoutVersion(store, ldb)
- if err != nil {
- store.lg.Errorf("Got error while reading datastore version for %s: %s\n",
- path, err.Error())
- return nil, err
- }
- if newlyCreated && (lv == UNKNOWN_LAYOUT_VERSION) {
- err = writeDataStoreVersion(store, ldb, CURRENT_LAYOUT_VERSION)
- if err != nil {
- store.lg.Errorf("Got error while writing datastore version for %s: %s\n",
- path, err.Error())
- return nil, err
- }
- store.lg.Tracef("Wrote layout version %d to shard at %s.\n",
- CURRENT_LAYOUT_VERSION, path)
- } else if lv != CURRENT_LAYOUT_VERSION {
- versionName := "unknown"
- if lv != UNKNOWN_LAYOUT_VERSION {
- versionName = fmt.Sprintf("%d", lv)
- }
- store.lg.Errorf("Can't read old datastore. Its layout version is %s, but this "+
- "software is at layout version %d. Please set %s to clear the datastore "+
- "on startup, or clear it manually.\n", versionName,
- CURRENT_LAYOUT_VERSION, conf.HTRACE_DATA_STORE_CLEAR)
- return nil, errors.New(fmt.Sprintf("Invalid layout version: got %s, expected %d.",
- versionName, CURRENT_LAYOUT_VERSION))
- } else {
- store.lg.Tracef("Found layout version %d in %s.\n", lv, path)
- }
- spanBufferSize := cnf.GetInt(conf.HTRACE_DATA_STORE_SPAN_BUFFER_SIZE)
- shd = &shard{store: store, ldb: ldb, path: path,
- incoming: make(chan *common.Span, spanBufferSize)}
- return shd, nil
-}
-
-// Read the datastore version of a leveldb instance.
-func readLayoutVersion(store *dataStore, ldb *levigo.DB) (uint32, error) {
- buf, err := ldb.Get(store.readOpts, []byte{VERSION_KEY})
- if err != nil {
- return 0, err
- }
- if len(buf) == 0 {
- return 0, nil
- }
- r := bytes.NewBuffer(buf)
- decoder := gob.NewDecoder(r)
- var v uint32
- err = decoder.Decode(&v)
- if err != nil {
- return 0, err
- }
- return v, nil
-}
-
-// Write the datastore version to a shard.
-func writeDataStoreVersion(store *dataStore, ldb *levigo.DB, v uint32) error {
- w := new(bytes.Buffer)
- encoder := gob.NewEncoder(w)
- err := encoder.Encode(&v)
- if err != nil {
- return err
- }
- return ldb.Put(store.writeOpts, []byte{VERSION_KEY}, w.Bytes())
-}
-
-func (store *dataStore) GetStatistics() *Statistics {
- return store.stats.Copy()
-}
-
-// Close the DataStore.
-func (store *dataStore) Close() {
- for idx := range store.shards {
- store.shards[idx].Close()
- store.shards[idx] = nil
- }
- if store.readOpts != nil {
- store.readOpts.Close()
- store.readOpts = nil
- }
- if store.writeOpts != nil {
- store.writeOpts.Close()
- store.writeOpts = nil
- }
- if store.lg != nil {
- store.lg.Close()
- store.lg = nil
- }
-}
-
-// Get the index of the shard which stores the given spanId.
-func (store *dataStore) getShardIndex(sid common.SpanId) int {
- return int(sid.Val() % uint64(len(store.shards)))
-}
-
-func (store *dataStore) WriteSpan(span *common.Span) {
- store.shards[store.getShardIndex(span.Id)].incoming <- span
-}
-
-func (store *dataStore) FindSpan(sid common.SpanId) *common.Span {
- return store.shards[store.getShardIndex(sid)].FindSpan(sid)
-}
-
-func (shd *shard) FindSpan(sid common.SpanId) *common.Span {
- lg := shd.store.lg
- buf, err := shd.ldb.Get(shd.store.readOpts, makeKey('s', sid.Val()))
- if err != nil {
- if strings.Index(err.Error(), "NotFound:") != -1 {
- return nil
- }
- lg.Warnf("Shard(%s): FindSpan(%016x) error: %s\n",
- shd.path, sid, err.Error())
- return nil
- }
- var span *common.Span
- span, err = shd.decodeSpan(sid, buf)
- if err != nil {
- lg.Errorf("Shard(%s): FindSpan(%016x) decode error: %s\n",
- shd.path, sid, err.Error())
- return nil
- }
- return span
-}
-
-func (shd *shard) decodeSpan(sid common.SpanId, buf []byte) (*common.Span, error) {
- r := bytes.NewBuffer(buf)
- decoder := gob.NewDecoder(r)
- data := common.SpanData{}
- err := decoder.Decode(&data)
- if err != nil {
- return nil, err
- }
- // Gob encoding translates empty slices to nil. Reverse this so that we're always dealing with
- // non-nil slices.
- if data.Parents == nil {
- data.Parents = []common.SpanId{}
- }
- return &common.Span{Id: common.SpanId(sid), SpanData: data}, nil
-}
-
-// Find the children of a given span id.
-func (store *dataStore) FindChildren(sid common.SpanId, lim int32) []common.SpanId {
- childIds := make([]common.SpanId, 0)
- var err error
-
- startIdx := store.getShardIndex(sid)
- idx := startIdx
- numShards := len(store.shards)
- for {
- if lim == 0 {
- break
- }
- shd := store.shards[idx]
- childIds, lim, err = shd.FindChildren(sid, childIds, lim)
- if err != nil {
- store.lg.Errorf("Shard(%s): FindChildren(%016x) error: %s\n",
- shd.path, sid, err.Error())
- }
- idx++
- if idx >= numShards {
- idx = 0
- }
- if idx == startIdx {
- break
- }
- }
- return childIds
-}
-
-type predicateData struct {
- *common.Predicate
- uintKey uint64
- strKey string
-}
-
-func loadPredicateData(pred *common.Predicate) (*predicateData, error) {
- p := predicateData{Predicate: pred}
-
- // Parse the input value given to make sure it matches up with the field
- // type.
- switch pred.Field {
- case common.SPAN_ID:
- // Span IDs are sent as hex strings.
- var id common.SpanId
- if err := id.FromString(pred.Val); err != nil {
- return nil, errors.New(fmt.Sprintf("Unable to parse span id '%s': %s",
- pred.Val, err.Error()))
- }
- p.uintKey = id.Val()
- break
- case common.DESCRIPTION:
- // Any string is valid for a description.
- p.strKey = pred.Val
- break
- case common.BEGIN_TIME, common.END_TIME, common.DURATION:
- // Parse a base-10 signed numeric field.
- v, err := strconv.ParseInt(pred.Val, 10, 64)
- if err != nil {
- return nil, errors.New(fmt.Sprintf("Unable to parse %s '%s': %s",
- pred.Field, pred.Val, err.Error()))
- }
- p.uintKey = s2u64(v)
- break
- default:
- return nil, errors.New(fmt.Sprintf("Unknown field %s", pred.Field))
- }
-
- // Validate the predicate operation.
- switch pred.Op {
- case common.EQUALS, common.LESS_THAN_OR_EQUALS,
- common.GREATER_THAN_OR_EQUALS, common.GREATER_THAN:
- break
- case common.CONTAINS:
- if p.fieldIsNumeric() {
- return nil, errors.New(fmt.Sprintf("Can't use CONTAINS on a "+
- "numeric field like '%s'", pred.Field))
- }
- default:
- return nil, errors.New(fmt.Sprintf("Unknown predicate operation '%s'",
- pred.Op))
- }
-
- return &p, nil
-}
-
-// Get the index prefix for this predicate, or 0 if it is not indexed.
-func (pred *predicateData) getIndexPrefix() byte {
- switch pred.Field {
- case common.SPAN_ID:
- return SPAN_ID_INDEX_PREFIX
- case common.BEGIN_TIME:
- return BEGIN_TIME_INDEX_PREFIX
- case common.END_TIME:
- return END_TIME_INDEX_PREFIX
- case common.DURATION:
- return DURATION_INDEX_PREFIX
- default:
- return INVALID_INDEX_PREFIX
- }
-}
-
-// Returns true if the predicate type is numeric.
-func (pred *predicateData) fieldIsNumeric() bool {
- switch pred.Field {
- case common.SPAN_ID, common.BEGIN_TIME, common.END_TIME, common.DURATION:
- return true
- default:
- return false
- }
-}
-
-// Get the values that this predicate cares about for a given span.
-func (pred *predicateData) extractRelevantSpanData(span *common.Span) (uint64, string) {
- switch pred.Field {
- case common.SPAN_ID:
- return span.Id.Val(), ""
- case common.DESCRIPTION:
- return 0, span.Description
- case common.BEGIN_TIME:
- return s2u64(span.Begin), ""
- case common.END_TIME:
- return s2u64(span.End), ""
- case common.DURATION:
- return s2u64(span.Duration()), ""
- default:
- panic(fmt.Sprintf("Field type %s isn't a 64-bit integer.", pred.Field))
- }
-}
-
-func (pred *predicateData) spanPtrIsBefore(a *common.Span, b *common.Span) bool {
- // nil is after everything.
- if a == nil {
- if b == nil {
- return false
- }
- return false
- } else if b == nil {
- return true
- }
- // Compare the spans according to this predicate.
- aInt, aStr := pred.extractRelevantSpanData(a)
- bInt, bStr := pred.extractRelevantSpanData(b)
- if pred.fieldIsNumeric() {
- if pred.Op.IsDescending() {
- return aInt > bInt
- } else {
- return aInt < bInt
- }
- } else {
- if pred.Op.IsDescending() {
- return aStr > bStr
- } else {
- return aStr < bStr
- }
- }
-}
-
-// Returns true if the predicate is satisfied by the given span.
-func (pred *predicateData) satisfiedBy(span *common.Span) bool {
- intVal, strVal := pred.extractRelevantSpanData(span)
- if pred.fieldIsNumeric() {
- switch pred.Op {
- case common.EQUALS:
- return intVal == pred.uintKey
- case common.LESS_THAN_OR_EQUALS:
- return intVal <= pred.uintKey
- case common.GREATER_THAN_OR_EQUALS:
- return intVal >= pred.uintKey
- case common.GREATER_THAN:
- return intVal > pred.uintKey
- default:
- panic(fmt.Sprintf("unknown Op type %s should have been caught "+
- "during normalization", pred.Op))
- }
- } else {
- switch pred.Op {
- case common.CONTAINS:
- return strings.Contains(strVal, pred.strKey)
- case common.EQUALS:
- return strVal == pred.strKey
- case common.LESS_THAN_OR_EQUALS:
- return strVal <= pred.strKey
- case common.GREATER_THAN_OR_EQUALS:
- return strVal >= pred.strKey
- case common.GREATER_THAN:
- return strVal > pred.strKey
- default:
- panic(fmt.Sprintf("unknown Op type %s should have been caught "+
- "during normalization", pred.Op))
- }
- }
-}
-
-func (pred *predicateData) createSource(store *dataStore) (*source, error) {
- var ret *source
- src := source{store: store,
- pred: pred,
- iters: make([]*levigo.Iterator, 0, len(store.shards)),
- nexts: make([]*common.Span, len(store.shards)),
- numRead: make([]int, len(store.shards)),
- keyPrefix: pred.getIndexPrefix(),
- }
- if src.keyPrefix == INVALID_INDEX_PREFIX {
- return nil, errors.New(fmt.Sprintf("Can't create source from unindexed "+
- "predicate on field %s", pred.Field))
- }
- defer func() {
- if ret == nil {
- src.Close()
- }
- }()
- for shardIdx := range store.shards {
- shd := store.shards[shardIdx]
- src.iters = append(src.iters, shd.ldb.NewIterator(store.readOpts))
- }
- searchKey := makeKey(src.keyPrefix, pred.uintKey)
- for i := range src.iters {
- src.iters[i].Seek(searchKey)
- }
- ret = &src
- return ret, nil
-}
-
-// A source of spans.
-type source struct {
- store *dataStore
- pred *predicateData
- iters []*levigo.Iterator
- nexts []*common.Span
- numRead []int
- keyPrefix byte
-}
-
-// Return true if this operation may require skipping the first result we get back from leveldb.
-func mayRequireOneSkip(op common.Op) bool {
- switch op {
- // When dealing with descending predicates, the first span we read might not satisfy
- // the predicate, even though subsequent ones will. This is because the iter.Seek()
- // function "moves the iterator the position of the key given or, if the key doesn't
- // exist, the next key that does exist in the database." So if we're on that "next
- // key" it will not satisfy the predicate, but the keys previous to it might.
- case common.LESS_THAN_OR_EQUALS:
- return true
- // iter.Seek basically takes us to the key which is "greater than or equal to" some
- // value. Since we want greater than (not greater than or equal to) we may have to
- // skip the first key.
- case common.GREATER_THAN:
- return true
- }
- return false
-}
-
-// Fill in the entry in the 'next' array for a specific shard.
-func (src *source) populateNextFromShard(shardIdx int) {
- lg := src.store.lg
- var err error
- iter := src.iters[shardIdx]
- if iter == nil {
- lg.Debugf("Can't populate: No more entries in shard %d\n", shardIdx)
- return // There are no more entries in this shard.
- }
- if src.nexts[shardIdx] != nil {
- lg.Debugf("No need to populate shard %d\n", shardIdx)
- return // We already have a valid entry for this shard.
- }
- for {
- if !iter.Valid() {
- lg.Debugf("Can't populate: Iterator for shard %d is no longer valid.\n", shardIdx)
- break // Can't read past end of DB
- }
- src.numRead[shardIdx]++
- key := iter.Key()
- if !bytes.HasPrefix(key, []byte{src.keyPrefix}) {
- lg.Debugf("Can't populate: Iterator for shard %d does not have prefix %s\n",
- shardIdx, string(src.keyPrefix))
- break // Can't read past end of indexed section
- }
- var span *common.Span
- var sid common.SpanId
- if src.keyPrefix == SPAN_ID_INDEX_PREFIX {
- // The span id maps to the span itself.
- sid = common.SpanId(keyToInt(key[1:]))
- span, err = src.store.shards[shardIdx].decodeSpan(sid, iter.Value())
- if err != nil {
- lg.Debugf("Internal error decoding span %s in shard %d: %s\n",
- sid.String(), shardIdx, err.Error())
- break
- }
- } else {
- // With a secondary index, we have to look up the span by id.
- sid = common.SpanId(keyToInt(key[9:]))
- span = src.store.shards[shardIdx].FindSpan(sid)
- if span == nil {
- lg.Debugf("Internal error rehydrating span %s in shard %d\n",
- sid.String(), shardIdx)
- break
- }
- }
- if src.pred.Op.IsDescending() {
- iter.Prev()
- } else {
- iter.Next()
- }
- if src.pred.satisfiedBy(span) {
- lg.Debugf("Populated valid span %016x from shard %d.\n", sid, shardIdx)
- src.nexts[shardIdx] = span // Found valid entry
- return
- } else {
- lg.Debugf("Span %016x from shard %d does not satisfy the predicate.\n",
- sid, shardIdx)
- if src.numRead[shardIdx] <= 1 && mayRequireOneSkip(src.pred.Op) {
- continue
- }
- // This and subsequent entries don't satisfy predicate
- break
- }
- }
- lg.Debugf("Closing iterator for shard %d.\n", shardIdx)
- iter.Close()
- src.iters[shardIdx] = nil
-}
-
-func (src *source) next() *common.Span {
- for shardIdx := range src.iters {
- src.populateNextFromShard(shardIdx)
- }
- var best *common.Span
- bestIdx := -1
- for shardIdx := range src.iters {
- span := src.nexts[shardIdx]
- if src.pred.spanPtrIsBefore(span, best) {
- best = span
- bestIdx = shardIdx
- }
- }
- if bestIdx >= 0 {
- src.nexts[bestIdx] = nil
- }
- return best
-}
-
-func (src *source) Close() {
- for i := range src.iters {
- if src.iters[i] != nil {
- src.iters[i].Close()
- }
- }
- src.iters = nil
-}
-
-func (store *dataStore) obtainSource(preds *[]*predicateData) (*source, error) {
- // Read spans from the first predicate that is indexed.
- p := *preds
- for i := range p {
- pred := p[i]
- if pred.getIndexPrefix() != INVALID_INDEX_PREFIX {
- *preds = append(p[0:i], p[i+1:]...)
- return pred.createSource(store)
- }
- }
- // If there are no predicates that are indexed, read rows in order of span id.
- spanIdPred := common.Predicate{Op: common.GREATER_THAN_OR_EQUALS,
- Field: common.SPAN_ID,
- Val: "0000000000000000",
- }
- spanIdPredData, err := loadPredicateData(&spanIdPred)
- if err != nil {
- return nil, err
- }
- return spanIdPredData.createSource(store)
-}
-
-func (store *dataStore) HandleQuery(query *common.Query) ([]*common.Span, error) {
- lg := store.lg
- // Parse predicate data.
- var err error
- preds := make([]*predicateData, len(query.Predicates))
- for i := range query.Predicates {
- preds[i], err = loadPredicateData(&query.Predicates[i])
- if err != nil {
- return nil, err
- }
- }
- // Get a source of rows.
- var src *source
- src, err = store.obtainSource(&preds)
- if err != nil {
- return nil, err
- }
- defer src.Close()
- lg.Debugf("HandleQuery %s: preds = %s, src = %v\n", query, preds, src)
-
- // Filter the spans through the remaining predicates.
- ret := make([]*common.Span, 0, 32)
- for {
- if len(ret) >= query.Lim {
- break // we hit the result size limit
- }
- span := src.next()
- if span == nil {
- break // the source has no more spans to give
- }
- lg.Debugf("src.next returned span %s\n", span.ToJson())
- satisfied := true
- for predIdx := range preds {
- if !preds[predIdx].satisfiedBy(span) {
- satisfied = false
- break
- }
- }
- if satisfied {
- ret = append(ret, span)
- }
- }
- return ret, nil
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/datastore_test.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/datastore_test.go b/htrace-core/src/go/src/org/apache/htrace/htraced/datastore_test.go
deleted file mode 100644
index 79a7c4f..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/datastore_test.go
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bytes"
- "encoding/json"
- "math/rand"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "org/apache/htrace/test"
- "os"
- "sort"
- "strings"
- "testing"
-)
-
-// Test creating and tearing down a datastore.
-func TestCreateDatastore(t *testing.T) {
- htraceBld := &MiniHTracedBuilder{Name: "TestCreateDatastore",
- DataDirs: make([]string, 3)}
- ht, err := htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to create datastore: %s", err.Error())
- }
- defer ht.Close()
-}
-
-var SIMPLE_TEST_SPANS []common.Span = []common.Span{
- common.Span{Id: 1,
- SpanData: common.SpanData{
- Begin: 123,
- End: 456,
- Description: "getFileDescriptors",
- TraceId: 999,
- Parents: []common.SpanId{},
- ProcessId: "firstd",
- }},
- common.Span{Id: 2,
- SpanData: common.SpanData{
- Begin: 125,
- End: 200,
- Description: "openFd",
- TraceId: 999,
- Parents: []common.SpanId{1},
- ProcessId: "secondd",
- }},
- common.Span{Id: 3,
- SpanData: common.SpanData{
- Begin: 200,
- End: 456,
- Description: "passFd",
- TraceId: 999,
- Parents: []common.SpanId{1},
- ProcessId: "thirdd",
- }},
-}
-
-func createSpans(spans []common.Span, store *dataStore) {
- for idx := range spans {
- store.WriteSpan(&spans[idx])
- }
- // Wait the spans to be created
- for i := 0; i < 3; i++ {
- <-store.WrittenSpans
- }
-}
-
-// Test creating a datastore and adding some spans.
-func TestDatastoreWriteAndRead(t *testing.T) {
- t.Parallel()
- htraceBld := &MiniHTracedBuilder{Name: "TestDatastoreWriteAndRead",
- WrittenSpans: make(chan *common.Span, 100)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- createSpans(SIMPLE_TEST_SPANS, ht.Store)
- if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
- t.Fatal()
- }
- span := ht.Store.FindSpan(1)
- if span == nil {
- t.Fatal()
- }
- if span.Id != 1 {
- t.Fatal()
- }
- common.ExpectSpansEqual(t, &SIMPLE_TEST_SPANS[0], span)
- children := ht.Store.FindChildren(1, 1)
- if len(children) != 1 {
- t.Fatalf("expected 1 child, but got %d\n", len(children))
- }
- children = ht.Store.FindChildren(1, 2)
- if len(children) != 2 {
- t.Fatalf("expected 2 children, but got %d\n", len(children))
- }
- sort.Sort(common.SpanIdSlice(children))
- if children[0] != 2 {
- t.Fatal()
- }
- if children[1] != 3 {
- t.Fatal()
- }
-}
-
-func testQuery(t *testing.T, ht *MiniHTraced, query *common.Query,
- expectedSpans []common.Span) {
- spans, err := ht.Store.HandleQuery(query)
- if err != nil {
- t.Fatalf("First query failed: %s\n", err.Error())
- }
- expectedBuf := new(bytes.Buffer)
- dec := json.NewEncoder(expectedBuf)
- err = dec.Encode(expectedSpans)
- if err != nil {
- t.Fatalf("Failed to encode expectedSpans to JSON: %s\n", err.Error())
- }
- spansBuf := new(bytes.Buffer)
- dec = json.NewEncoder(spansBuf)
- err = dec.Encode(spans)
- if err != nil {
- t.Fatalf("Failed to encode result spans to JSON: %s\n", err.Error())
- }
- t.Logf("len(spans) = %d, len(expectedSpans) = %d\n", len(spans),
- len(expectedSpans))
- common.ExpectStrEqual(t, string(expectedBuf.Bytes()), string(spansBuf.Bytes()))
-}
-
-// Test queries on the datastore.
-func TestSimpleQuery(t *testing.T) {
- t.Parallel()
- htraceBld := &MiniHTracedBuilder{Name: "TestSimpleQuery",
- WrittenSpans: make(chan *common.Span, 100)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- createSpans(SIMPLE_TEST_SPANS, ht.Store)
- if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
- t.Fatal()
- }
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.GREATER_THAN_OR_EQUALS,
- Field: common.BEGIN_TIME,
- Val: "125",
- },
- },
- Lim: 5,
- }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
-}
-
-func TestQueries2(t *testing.T) {
- t.Parallel()
- htraceBld := &MiniHTracedBuilder{Name: "TestQueries2",
- WrittenSpans: make(chan *common.Span, 100)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- createSpans(SIMPLE_TEST_SPANS, ht.Store)
- if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
- t.Fatal()
- }
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.LESS_THAN_OR_EQUALS,
- Field: common.BEGIN_TIME,
- Val: "125",
- },
- },
- Lim: 5,
- }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[0]})
-
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.LESS_THAN_OR_EQUALS,
- Field: common.BEGIN_TIME,
- Val: "125",
- },
- common.Predicate{
- Op: common.EQUALS,
- Field: common.DESCRIPTION,
- Val: "getFileDescriptors",
- },
- },
- Lim: 2,
- }, []common.Span{SIMPLE_TEST_SPANS[0]})
-
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.EQUALS,
- Field: common.DESCRIPTION,
- Val: "getFileDescriptors",
- },
- },
- Lim: 2,
- }, []common.Span{SIMPLE_TEST_SPANS[0]})
-}
-
-func TestQueries3(t *testing.T) {
- t.Parallel()
- htraceBld := &MiniHTracedBuilder{Name: "TestQueries3",
- WrittenSpans: make(chan *common.Span, 100)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- createSpans(SIMPLE_TEST_SPANS, ht.Store)
- if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
- t.Fatal()
- }
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.CONTAINS,
- Field: common.DESCRIPTION,
- Val: "Fd",
- },
- common.Predicate{
- Op: common.GREATER_THAN_OR_EQUALS,
- Field: common.BEGIN_TIME,
- Val: "100",
- },
- },
- Lim: 5,
- }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
-
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.LESS_THAN_OR_EQUALS,
- Field: common.SPAN_ID,
- Val: "0",
- },
- },
- Lim: 200,
- }, []common.Span{})
-
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.LESS_THAN_OR_EQUALS,
- Field: common.SPAN_ID,
- Val: "2",
- },
- },
- Lim: 200,
- }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[0]})
-}
-
-func TestQueries4(t *testing.T) {
- t.Parallel()
- htraceBld := &MiniHTracedBuilder{Name: "TestQueries4",
- WrittenSpans: make(chan *common.Span, 100)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- createSpans(SIMPLE_TEST_SPANS, ht.Store)
- if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
- t.Fatal()
- }
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.GREATER_THAN,
- Field: common.BEGIN_TIME,
- Val: "125",
- },
- },
- Lim: 5,
- }, []common.Span{SIMPLE_TEST_SPANS[2]})
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.GREATER_THAN_OR_EQUALS,
- Field: common.DESCRIPTION,
- Val: "openFd",
- },
- },
- Lim: 2,
- }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
- testQuery(t, ht, &common.Query{
- Predicates: []common.Predicate{
- common.Predicate{
- Op: common.GREATER_THAN,
- Field: common.DESCRIPTION,
- Val: "openFd",
- },
- },
- Lim: 2,
- }, []common.Span{SIMPLE_TEST_SPANS[2]})
-}
-
-func BenchmarkDatastoreWrites(b *testing.B) {
- htraceBld := &MiniHTracedBuilder{Name: "BenchmarkDatastoreWrites",
- WrittenSpans: make(chan *common.Span, b.N)}
- ht, err := htraceBld.Build()
- if err != nil {
- panic(err)
- }
- defer ht.Close()
- rnd := rand.New(rand.NewSource(1))
- allSpans := make([]*common.Span, b.N)
- // Write many random spans.
- for n := 0; n < b.N; n++ {
- span := test.NewRandomSpan(rnd, allSpans[0:n])
- ht.Store.WriteSpan(span)
- allSpans[n] = span
- }
- // Wait for all the spans to be written.
- for n := 0; n < b.N; n++ {
- <-ht.Store.WrittenSpans
- }
- spansWritten := ht.Store.GetStatistics().NumSpansWritten
- if spansWritten < uint64(b.N) {
- b.Fatal("incorrect statistics: expected %d spans to be written, but only got %d",
- b.N, spansWritten)
- }
-}
-
-func TestReloadDataStore(t *testing.T) {
- htraceBld := &MiniHTracedBuilder{Name: "TestReloadDataStore",
- DataDirs: make([]string, 2), KeepDataDirsOnClose: true}
- ht, err := htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to create datastore: %s", err.Error())
- }
- dataDirs := make([]string, len(ht.DataDirs))
- copy(dataDirs, ht.DataDirs)
- defer func() {
- if ht != nil {
- ht.Close()
- }
- for i := range dataDirs {
- os.RemoveAll(dataDirs[i])
- }
- }()
- var hcl *htrace.Client
- hcl, err = htrace.NewClient(ht.ClientConf())
- if err != nil {
- t.Fatalf("failed to create client: %s", err.Error())
- }
-
- // Create some random trace spans.
- NUM_TEST_SPANS := 5
- allSpans := createRandomTestSpans(NUM_TEST_SPANS)
- err = hcl.WriteSpans(&common.WriteSpansReq{
- Spans: allSpans,
- })
- if err != nil {
- t.Fatalf("WriteSpans failed: %s\n", err.Error())
- }
-
- // Look up the spans we wrote.
- var span *common.Span
- for i := 0; i < NUM_TEST_SPANS; i++ {
- span, err = hcl.FindSpan(allSpans[i].Id)
- if err != nil {
- t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
- }
- common.ExpectSpansEqual(t, allSpans[i], span)
- }
-
- ht.Close()
- ht = nil
-
- htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore2",
- DataDirs: dataDirs, KeepDataDirsOnClose: true}
- ht, err = htraceBld.Build()
- if err != nil {
- t.Fatalf("failed to re-create datastore: %s", err.Error())
- }
- hcl, err = htrace.NewClient(ht.ClientConf())
- if err != nil {
- t.Fatalf("failed to re-create client: %s", err.Error())
- }
-
- // Look up the spans we wrote earlier.
- for i := 0; i < NUM_TEST_SPANS; i++ {
- span, err = hcl.FindSpan(allSpans[i].Id)
- if err != nil {
- t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
- }
- common.ExpectSpansEqual(t, allSpans[i], span)
- }
-
- // Set an old datastore version number.
- for i := range ht.Store.shards {
- shard := ht.Store.shards[i]
- writeDataStoreVersion(ht.Store, shard.ldb, CURRENT_LAYOUT_VERSION-1)
- }
- ht.Close()
- ht = nil
-
- htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore3",
- DataDirs: dataDirs, KeepDataDirsOnClose: true}
- ht, err = htraceBld.Build()
- if err == nil {
- t.Fatalf("expected the datastore to fail to load after setting an " +
- "incorrect version.\n")
- }
- if !strings.Contains(err.Error(), "Invalid layout version") {
- t.Fatal(`expected the loading error to contain "invalid layout version"` + "\n")
- }
-
- // It should work with data.store.clear set.
- htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore4",
- DataDirs: dataDirs, KeepDataDirsOnClose: true,
- Cnf: map[string]string{conf.HTRACE_DATA_STORE_CLEAR: "true"}}
- ht, err = htraceBld.Build()
- if err != nil {
- t.Fatalf("expected the datastore loading to succeed after setting an "+
- "incorrect version. But it failed with error %s\n", err.Error())
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/hrpc.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/hrpc.go b/htrace-core/src/go/src/org/apache/htrace/htraced/hrpc.go
deleted file mode 100644
index 9696cbc..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/hrpc.go
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bufio"
- "encoding/binary"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net"
- "net/rpc"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
-)
-
-// Handles HRPC calls
-type HrpcHandler struct {
- lg *common.Logger
- store *dataStore
-}
-
-// The HRPC server
-type HrpcServer struct {
- *rpc.Server
- hand *HrpcHandler
- listener net.Listener
-}
-
-// Codec which encodes HRPC data via JSON
-type HrpcServerCodec struct {
- rwc io.ReadWriteCloser
- length uint32
-}
-
-func (cdc *HrpcServerCodec) ReadRequestHeader(req *rpc.Request) error {
- hdr := common.HrpcRequestHeader{}
- err := binary.Read(cdc.rwc, binary.BigEndian, &hdr)
- if err != nil {
- return errors.New(fmt.Sprintf("Error reading header bytes: %s", err.Error()))
- }
- if hdr.Magic != common.HRPC_MAGIC {
- return errors.New(fmt.Sprintf("Invalid request header: expected "+
- "magic number of 0x%04x, but got 0x%04x", common.HRPC_MAGIC, hdr.Magic))
- }
- if hdr.Length > common.MAX_HRPC_BODY_LENGTH {
- return errors.New(fmt.Sprintf("Length prefix was too long. Maximum "+
- "length is %d, but we got %d.", common.MAX_HRPC_BODY_LENGTH, hdr.Length))
- }
- req.ServiceMethod = common.HrpcMethodIdToMethodName(hdr.MethodId)
- if req.ServiceMethod == "" {
- return errors.New(fmt.Sprintf("Unknown MethodID code 0x%04x",
- hdr.MethodId))
- }
- req.Seq = hdr.Seq
- cdc.length = hdr.Length
- return nil
-}
-
-func (cdc *HrpcServerCodec) ReadRequestBody(body interface{}) error {
- dec := json.NewDecoder(io.LimitReader(cdc.rwc, int64(cdc.length)))
- err := dec.Decode(body)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to read request body: %s",
- err.Error()))
- }
- return nil
-}
-
-var EMPTY []byte = make([]byte, 0)
-
-func (cdc *HrpcServerCodec) WriteResponse(resp *rpc.Response, msg interface{}) error {
- var err error
- buf := EMPTY
- if msg != nil {
- buf, err = json.Marshal(msg)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to marshal response message: %s",
- err.Error()))
- }
- }
- hdr := common.HrpcResponseHeader{}
- hdr.MethodId = common.HrpcMethodNameToId(resp.ServiceMethod)
- hdr.Seq = resp.Seq
- hdr.ErrLength = uint32(len(resp.Error))
- hdr.Length = uint32(len(buf))
- writer := bufio.NewWriterSize(cdc.rwc, 256)
- err = binary.Write(writer, binary.BigEndian, &hdr)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to write response header: %s",
- err.Error()))
- }
- if hdr.ErrLength > 0 {
- _, err = io.WriteString(writer, resp.Error)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to write error string: %s",
- err.Error()))
- }
- }
- if hdr.Length > 0 {
- var length int
- length, err = writer.Write(buf)
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to write response "+
- "message: %s", err.Error()))
- }
- if uint32(length) != hdr.Length {
- return errors.New(fmt.Sprintf("Failed to write all of response "+
- "message: %s", err.Error()))
- }
- }
- err = writer.Flush()
- if err != nil {
- return errors.New(fmt.Sprintf("Failed to write the response bytes: "+
- "%s", err.Error()))
- }
- return nil
-}
-
-func (cdc *HrpcServerCodec) Close() error {
- return cdc.rwc.Close()
-}
-
-func (hand *HrpcHandler) WriteSpans(req *common.WriteSpansReq,
- resp *common.WriteSpansResp) (err error) {
- hand.lg.Debugf("hrpc writeSpansHandler: received %d span(s). "+
- "defaultPid = %s\n", len(req.Spans), req.DefaultPid)
- for i := range req.Spans {
- span := req.Spans[i]
- if span.ProcessId == "" {
- span.ProcessId = req.DefaultPid
- }
- hand.lg.Tracef("writing span %d: %s\n", i, span.ToJson())
- hand.store.WriteSpan(span)
- }
- return nil
-}
-
-func CreateHrpcServer(cnf *conf.Config, store *dataStore) (*HrpcServer, error) {
- lg := common.NewLogger("hrpc", cnf)
- hsv := &HrpcServer{
- Server: rpc.NewServer(),
- hand: &HrpcHandler{
- lg: lg,
- store: store,
- },
- }
- var err error
- hsv.listener, err = net.Listen("tcp", cnf.Get(conf.HTRACE_HRPC_ADDRESS))
- if err != nil {
- return nil, err
- }
- hsv.Server.Register(hsv.hand)
- go hsv.run()
- lg.Infof("Started HRPC server on %s...\n", hsv.listener.Addr().String())
- return hsv, nil
-}
-
-func (hsv *HrpcServer) run() {
- lg := hsv.hand.lg
- for {
- conn, err := hsv.listener.Accept()
- if err != nil {
- lg.Errorf("HRPC Accept error: %s\n", err.Error())
- continue
- }
- go hsv.ServeCodec(&HrpcServerCodec{
- rwc: conn,
- })
- }
-}
-
-func (hsv *HrpcServer) Addr() net.Addr {
- return hsv.listener.Addr()
-}
-
-func (hsv *HrpcServer) Close() {
- hsv.listener.Close()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/htraced.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/htraced.go b/htrace-core/src/go/src/org/apache/htrace/htraced/htraced.go
deleted file mode 100644
index 64da457..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/htraced.go
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "encoding/json"
- "fmt"
- "net"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "os"
- "strings"
- "time"
-)
-
-var RELEASE_VERSION string
-var GIT_VERSION string
-
-const USAGE = `htraced: the HTrace server daemon.
-
-htraced receives trace spans sent from HTrace clients. It exposes a REST
-interface which others can query. It also runs a web server with a graphical
-user interface. htraced stores its span data in levelDB files on the local
-disks.
-
-Usage:
---help: this help message
-
--Dk=v: set configuration key 'k' to value 'v'
-For example -Dweb.address=127.0.0.1:8080 sets the web address to localhost,
-port 8080.
-
--Dk: set configuration key 'k' to 'true'
-
-Normally, configuration options should be set in the ` + conf.CONFIG_FILE_NAME + `
-configuration file. We find this file by searching the paths in the
-` + conf.HTRACED_CONF_DIR + `. The command-line options are just an alternate way
-of setting configuration when launching the daemon.
-`
-
-func main() {
- for idx := range os.Args {
- arg := os.Args[idx]
- if strings.HasPrefix(arg, "--h") || strings.HasPrefix(arg, "-h") {
- fmt.Fprintf(os.Stderr, USAGE)
- os.Exit(0)
- }
- }
- cnf := common.LoadApplicationConfig()
- common.InstallSignalHandlers(cnf)
- lg := common.NewLogger("main", cnf)
- defer lg.Close()
- store, err := CreateDataStore(cnf, nil)
- if err != nil {
- lg.Errorf("Error creating datastore: %s\n", err.Error())
- os.Exit(1)
- }
- var rsv *RestServer
- rsv, err = CreateRestServer(cnf, store)
- if err != nil {
- lg.Errorf("Error creating REST server: %s\n", err.Error())
- os.Exit(1)
- }
- var hsv *HrpcServer
- if cnf.Get(conf.HTRACE_HRPC_ADDRESS) != "" {
- hsv, err = CreateHrpcServer(cnf, store)
- if err != nil {
- lg.Errorf("Error creating HRPC server: %s\n", err.Error())
- os.Exit(1)
- }
- } else {
- lg.Infof("Not starting HRPC server because no value was given for %s.\n",
- conf.HTRACE_HRPC_ADDRESS)
- }
- naddr := cnf.Get(conf.HTRACE_STARTUP_NOTIFICATION_ADDRESS)
- if naddr != "" {
- notif := StartupNotification{
- HttpAddr: rsv.Addr().String(),
- ProcessId: os.Getpid(),
- }
- if hsv != nil {
- notif.HrpcAddr = hsv.Addr().String()
- }
- err = sendStartupNotification(naddr, ¬if)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Failed to send startup notification: "+
- "%s\n", err.Error())
- os.Exit(1)
- }
- }
- for {
- time.Sleep(time.Duration(10) * time.Hour)
- }
-}
-
-// A startup notification message that we optionally send on startup.
-// Used by unit tests.
-type StartupNotification struct {
- HttpAddr string
- HrpcAddr string
- ProcessId int
-}
-
-func sendStartupNotification(naddr string, notif *StartupNotification) error {
- conn, err := net.Dial("tcp", naddr)
- if err != nil {
- return err
- }
- defer func() {
- if conn != nil {
- conn.Close()
- }
- }()
- var buf []byte
- buf, err = json.Marshal(notif)
- if err != nil {
- return err
- }
- _, err = conn.Write(buf)
- conn.Close()
- conn = nil
- return nil
-}
[13/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
new file mode 100644
index 0000000..d839865
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply
(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.1",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict"
;function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.1",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$ele
ment.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=thi
s.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".it
em"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c="prev"==a?-1:1,d=this.getItemIndex(b),e=(d+c)%this.$items.length;return this.$items.eq(e)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"
==b?"left":"right",i="next"==b?"first":"last",j=this;if(!f.length){if(!this.options.wrap)return;f=this.$element.find(".item")[i]()}if(f.hasClass("active"))return this.sliding=!1;var k=f[0],l=a.Event("slide.bs.carousel",{relatedTarget:k,direction:h});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var m=a(this.$indicators.children()[this.getItemIndex(f)]);m&&m.addClass("active")}var n=a.Event("slid.bs.carousel",{relatedTarget:k,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger(n)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trig
ger(n)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.
data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.1",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.di
mension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transit
ioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=
f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart
"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){
return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.1",c.TRANSITION_DURATI
ON=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.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"]',a.proxy(this.hide,this)),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){d.$element.trigger("focus").trigge
r(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off
("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("
bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.
scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevente
d()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.tooltip",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.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}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport
&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter
=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.
contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this
.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arr
ow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=this.tip(),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d=
"BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.w
idth&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$elemen
t.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.popover",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.1",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.pro
totype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process
,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.1",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")|
|d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selec
tor).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var
h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})
+})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use
strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.1",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=i?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(
){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d
=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/npm.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/npm.js b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/npm.js
new file mode 100644
index 0000000..bf6aa80
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/npm.js
@@ -0,0 +1,13 @@
+// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
+require('../../js/transition.js')
+require('../../js/alert.js')
+require('../../js/button.js')
+require('../../js/carousel.js')
+require('../../js/collapse.js')
+require('../../js/dropdown.js')
+require('../../js/modal.js')
+require('../../js/tooltip.js')
+require('../../js/popover.js')
+require('../../js/scrollspy.js')
+require('../../js/tab.js')
+require('../../js/affix.js')
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/css/backgrid-0.3.5.min.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/css/backgrid-0.3.5.min.css b/htrace-htraced/src/web/lib/css/backgrid-0.3.5.min.css
new file mode 100644
index 0000000..764e799
--- /dev/null
+++ b/htrace-htraced/src/web/lib/css/backgrid-0.3.5.min.css
@@ -0,0 +1 @@
+.backgrid-container{position:relative;display:block;width:100%;height:465px;padding:0;overflow:auto;border:0}.backgrid{width:100%;max-width:100%;background-color:transparent;border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.backgrid th,.backgrid td{display:none;height:20px;max-width:250px;padding:4px 5px;overflow:hidden;line-height:20px;text-align:left;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;border-bottom:1px solid #DDD}.backgrid th.renderable,.backgrid td.renderable{display:table-cell}.backgrid th{font-weight:bold;text-align:center}.backgrid th.sortable a{text-decoration:none;white-space:nowrap;cursor:pointer}.backgrid thead th{vertical-align:bottom;background-color:#f9f9f9}.backgrid thead th a{display:block}.backgrid.backgrid-striped tbody tr:nth-child(even){background-color:#f9f9f9}.backgrid tbody tr.empty{font-style:italic;color:gray}.backgrid tbody tr.empty td{display:inherit;text-align:center}.backgrid td.edito
r{padding:0}.backgrid td.editor,.backgrid tbody tr:nth-child(odd) td.editor{background-color:rgba(82,168,236,0.1);outline:1px solid rgba(82,168,236,0.8);outline-offset:-1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:200ms;-moz-transition-duration:200ms;-o-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:width,outline,background-color;-moz-transition-property:width,outline,background-color;-o-transition-property:width,outline,background-color;transition-property:width,outline,background-color;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;-o-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.backgrid td.editor input[type=text]{display:block;width:100%;height:100%;padding:0 5px;margin:0;background-color:transparent;border:0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-b
ox;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none}.backgrid td.editor input[type=text]::-ms-clear{display:none}.backgrid td.error,.backgrid tbody tr:nth-child(odd) td.error{background-color:rgba(255,210,77,0.1);outline:1px solid #ffd24d}.backgrid td.editor :focus,.backgrid th.editor:focus{outline:0}.backgrid .sort-caret{display:inline-block;width:0;height:0;margin-left:.3em;border:0;content:""}.backgrid .ascending .sort-caret{vertical-align:baseline;border-top:0;border-right:4px solid transparent;border-bottom:4px solid #000;border-left:4px solid transparent}.backgrid .descending .sort-caret{vertical-align:super;border-top:4px solid #000;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent}.backgrid .string-cell,.backgrid .uri-cell,.backgrid .email-cell,.backgrid .string-cell.editor input[type=text],.backgrid .uri-cell.editor input[type=text],.backgrid .email-cell.editor input[type=text]{text-align:left}.
backgrid .date-cell,.backgrid .time-cell,.backgrid .datetime-cell,.backgrid .number-cell,.backgrid .integer-cell,.backgrid .percent-cell,.backgrid .date-cell.editor input[type=text],.backgrid .time-cell.editor input[type=text],.backgrid .datetime-cell.editor input[type=text],.backgrid .number-cell.editor input[type=text],.backgrid .integer-cell.editor input[type=text],.backgrid .percent-cell.editor input[type=text]{text-align:right}.backgrid .boolean-cell,.backgrid .boolean-cell.editor input[type=checkbox]{text-align:center}.backgrid .select-cell{text-align:center}.backgrid .select-cell.editor{padding:0}.backgrid .select-cell.editor select{display:block;width:100%;height:28px;padding:4px 5px;margin:0;line-height:28px;vertical-align:middle;background-color:white;border:0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.backgrid .select-cell.editor select[multiple]{height:auto}.backgr
id .select-cell.editor :focus{border:0;outline:0}.backgrid .select-cell.editor select::-moz-focus-inner,.backgrid .select-cell.editor optgroup::-moz-focus-inner,.backgrid .select-cell.editor option::-moz-focus-inner,.backgrid .select-cell.editor select::-o-focus-inner,.backgrid .select-cell.editor optgroup::-o-focus-inner,.backgrid .select-cell.editor option::-o-focus-inner{border:0}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/css/backgrid-paginator-0.3.5.min.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/css/backgrid-paginator-0.3.5.min.css b/htrace-htraced/src/web/lib/css/backgrid-paginator-0.3.5.min.css
new file mode 100644
index 0000000..285fe81
--- /dev/null
+++ b/htrace-htraced/src/web/lib/css/backgrid-paginator-0.3.5.min.css
@@ -0,0 +1 @@
+.backgrid-paginator{text-align:center;border-top:0;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.backgrid-paginator ul{display:inline-block;*display:inline;margin:5px 0;*zoom:1}.backgrid-paginator ul>li{display:inline}.backgrid-paginator ul>li>a,.backgrid-paginator ul>li>span{float:left;width:30px;height:30px;padding:0;line-height:30px;text-decoration:none}.backgrid-paginator ul>li>a:hover,.backgrid-paginator ul>.active>a,.backgrid-paginator ul>.active>span{background-color:#f5f5f5}.backgrid-paginator ul>.active>a,.backgrid-paginator ul>.active>span{color:#999;cursor:default}.backgrid-paginator ul>.disabled>span,.backgrid-paginator ul>.disabled>a,.backgrid-paginator ul>.disabled>a:hover{color:#999;cursor:default}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/css/main.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/css/main.css b/htrace-htraced/src/web/lib/css/main.css
new file mode 100644
index 0000000..1875b60
--- /dev/null
+++ b/htrace-htraced/src/web/lib/css/main.css
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ul.spans {
+ margin: 0px;
+ padding: 0px;
+}
+
+li.span {
+ margin: 0px;
+ list-style: none;
+}
+
+/* Graph */
+svg .node circle {
+ stroke: #000000;
+ stroke-width: 3;
+ fill: #D8BFD8;
+}
+
+svg .selected circle {
+ stroke-width: 3;
+ fill: #DA70D6;
+}
+
+svg .link {
+ stroke: black;
+ stroke-width: 3;
+}
[11/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/backbone.marionette-2.4.1.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/backbone.marionette-2.4.1.min.js b/htrace-htraced/src/web/lib/js/backbone.marionette-2.4.1.min.js
new file mode 100644
index 0000000..994efee
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/backbone.marionette-2.4.1.min.js
@@ -0,0 +1,23 @@
+// MarionetteJS (Backbone.Marionette)
+// ----------------------------------
+// v2.4.1
+//
+// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC.
+// Distributed under MIT license
+//
+// http://marionettejs.com
+
+
+/*!
+ * Includes BabySitter
+ * https://github.com/marionettejs/backbone.babysitter/
+ *
+ * Includes Wreqr
+ * https://github.com/marionettejs/backbone.wreqr/
+ */
+
+
+
+!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(c,d){return a.Marionette=a.Mn=b(a,c,d)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(a,c,d)}else a.Marionette=a.Mn=b(a,a.Backbone,a._)}(this,function(a,b,c){"use strict";!function(a,b){var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findBy
Cid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.6",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}(b,c),function(a,b)
{var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.1",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){var a=Array.prototype.slice.apply(arguments);return b.callback.apply(b.context,a)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(
this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this);var c=Array.prototype.slice.call(arguments);a.Handlers.prototype.constructor.apply(this,c)},execute:function(a,b){a=arguments[0],b=Array.prototype.slice.call(arguments,1),this.hasHandler(a)?this.getHandler(a).apply(this,b):this.storage.addCommand(a,b)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this
.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d),d.RequestResponse=function(a){return a.Handlers.extend({request:function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1);return this.hasHandler(a)?this.getHandler(a).apply(this,b):void 0}})}(d),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(){var c=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(c.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===
a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),c}(d),d.radio=function(a){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,b,c){return function(d){var e=a._getChannel(d)[b],f=Array.prototype.slice.call(arguments,1);return e[c].apply(e,f)}};return new c}(d),a.Wreqr}(b,c);var d=a.Marione
tte,e=a.Mn,f=b.Marionette={};f.VERSION="2.4.1",f.noConflict=function(){return a.Marionette=d,a.Mn=e,this},b.Marionette=f,f.Deferred=b.$.Deferred,f.extend=b.Model.extend,f.isNodeAttached=function(a){return b.$.contains(document.documentElement,a)},f.mergeOptions=function(a,b){a&&c.extend(this,c.pick(a,b))},f.getOption=function(a,b){return a&&b?a.options&&void 0!==a.options[b]?a.options[b]:a[b]:void 0},f.proxyGetOption=function(a){return f.getOption(this,a)},f._getValue=function(a,b,d){return c.isFunction(a)&&(a=d?a.apply(b,d):a.call(b)),a},f.normalizeMethods=function(a){return c.reduce(a,function(a,b,d){return c.isFunction(b)||(b=this[b]),b&&(a[d]=b),a},{},this)},f.normalizeUIString=function(a,b){return a.replace(/@ui\.[a-zA-Z_$0-9]*/g,function(a){return b[a.slice(4)]})},f.normalizeUIKeys=function(a,b){return c.reduce(a,function(a,c,d){var e=f.normalizeUIString(d,b);return a[e]=c,a},{})},f.normalizeUIValues=function(a,b,d){return c.each(a,function(e,g){c.isString(e)?a[g]=f.normalizeU
IString(e,b):c.isObject(e)&&c.isArray(d)&&(c.extend(e,f.normalizeUIValues(c.pick(e,d),b)),c.each(d,function(a){var d=e[a];c.isString(d)&&(e[a]=f.normalizeUIString(d,b))}))}),a},f.actAsCollection=function(a,b){var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];c.each(d,function(d){a[d]=function(){var a=c.values(c.result(this,b)),e=[a].concat(c.toArray(arguments));return c[d].apply(c,e)}})};var g=f.deprecate=function(a,b){c.isObject(a)&&(a=a.prev+" is going to be removed in the future. Please use "+a.next+" instead."+(a.url?" See: "+a.url:"")),void 0!==b&&b||g._cache[a]||(g._warn("Deprecation warning: "+a),g._cache[a]=!0)};g._warn="undefined"!=typeof console&&(console.warn||console.log)||function(){},g._cache={},f._triggerMethod=function(){function a(a,b,c){return c.toUpperCase()}var b=/(^|:)(\w)/gi;return function(d,e,f){var g=arguments
.length<3;g&&(f=e,e=f[0]);var h,i="on"+e.replace(b,a),j=d[i];return c.isFunction(j)&&(h=j.apply(d,g?c.rest(f):f)),c.isFunction(d.trigger)&&(g+f.length>1?d.trigger.apply(d,g?f:[e].concat(c.drop(f,0))):d.trigger(e)),h}}(),f.triggerMethod=function(){return f._triggerMethod(this,arguments)},f.triggerMethodOn=function(a){var b=c.isFunction(a.triggerMethod)?a.triggerMethod:f.triggerMethod;return b.apply(a,c.rest(arguments))},f.MonitorDOMRefresh=function(a){function b(){a._isShown=!0,e()}function d(){a._isRendered=!0,e()}function e(){a._isShown&&a._isRendered&&f.isNodeAttached(a.el)&&c.isFunction(a.triggerMethod)&&a.triggerMethod("dom:refresh")}a.on({show:b,render:d})},function(a){function b(b,d,e,f){var g=f.split(/\s+/);c.each(g,function(c){var f=b[c];if(!f)throw new a.Error('Method "'+c+'" was configured as an event handler, but does not exist.');b.listenTo(d,e,f)})}function d(a,b,c,d){a.listenTo(b,c,d)}function e(a,b,d,e){var f=e.split(/\s+/);c.each(f,function(c){var e=a[c];a.stopListen
ing(b,d,e)})}function f(a,b,c,d){a.stopListening(b,c,d)}function g(b,d,e,f,g){if(d&&e){if(!c.isObject(e))throw new a.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});e=a._getValue(e,b),c.each(e,function(a,e){c.isFunction(a)?f(b,d,e,a):g(b,d,e,a)})}}a.bindEntityEvents=function(a,c,e){g(a,c,e,d,b)},a.unbindEntityEvents=function(a,b,c){g(a,b,c,f,e)},a.proxyBindEntityEvents=function(b,c){return a.bindEntityEvents(this,b,c)},a.proxyUnbindEntityEvents=function(b,c){return a.unbindEntityEvents(this,b,c)}}(f);var h=["description","fileName","lineNumber","name","message","number"];return f.Error=f.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+f.VERSION+"/",constructor:function(a,b){c.isObject(a)?(b=a,a=b.message):b||(b={});var d=Error.call(this,a);c.extend(this,c.pick(d,h),c.pick(b,h)),this.captureStackTrace(),b.url&&(this.url=this.urlRoot+b.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.cap
tureStackTrace(this,f.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),f.Error.extend=f.extend,f.Callbacks=function(){this._deferred=f.Deferred(),this._callbacks=[]},c.extend(f.Callbacks.prototype,{add:function(a,b){var d=c.result(this._deferred,"promise");this._callbacks.push({cb:a,ctx:b}),d.then(function(c){b&&(c.context=b),a.call(c.context,c.options)})},run:function(a,b){this._deferred.resolve({options:a,context:b})},reset:function(){var a=this._callbacks;this._deferred=f.Deferred(),this._callbacks=[],c.each(a,function(a){this.add(a.cb,a.ctx)},this)}}),f.Controller=function(a){this.options=a||{},c.isFunction(this.initialize)&&this.initialize(this.options)},f.Controller.extend=f.extend,c.extend(f.Controller.prototype,b.Events,{destroy:function(){return f._triggerMethod(this,"before:destroy",arguments),f._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:f.triggerMethod,mergeOptions:f.mergeOp
tions,getOption:f.proxyGetOption}),f.Object=function(a){this.options=c.extend({},c.result(this,"options"),a),this.initialize.apply(this,arguments)},f.Object.extend=f.extend,c.extend(f.Object.prototype,b.Events,{initialize:function(){},destroy:function(){return this.triggerMethod("before:destroy"),this.triggerMethod("destroy"),this.stopListening(),this},triggerMethod:f.triggerMethod,mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.Region=f.Object.extend({constructor:function(a){if(this.options=a||{},this.el=this.getOption("el"),this.el=this.el instanceof b.$?this.el[0]:this.el,!this.el)throw new f.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),f.Object.call(this,a)},show:function(a,b){if(this._ensureElement()){this._ensureViewIsIntact(a);var c=b||{},d=a!==this.currentView,e=!!c.preventDestroy,g=!!c.forceShow,h=!!this.currentView,i=d
&&!e,j=d||g;if(h&&this.triggerMethod("before:swapOut",this.currentView,this,b),this.currentView&&delete this.currentView._parent,i?this.empty():h&&j&&this.currentView.off("destroy",this.empty,this),j){a.once("destroy",this.empty,this),a.render(),a._parent=this,h&&this.triggerMethod("before:swap",a,this,b),this.triggerMethod("before:show",a,this,b),f.triggerMethodOn(a,"before:show",a,this,b),h&&this.triggerMethod("swapOut",this.currentView,this,b);var k=f.isNodeAttached(this.el),l=[],m=c.triggerBeforeAttach||this.triggerBeforeAttach,n=c.triggerAttach||this.triggerAttach;return k&&m&&(l=this._displayedViews(a),this._triggerAttach(l,"before:")),this.attachHtml(a),this.currentView=a,k&&n&&(l=this._displayedViews(a),this._triggerAttach(l)),h&&this.triggerMethod("swap",a,this,b),this.triggerMethod("show",a,this,b),f.triggerMethodOn(a,"show",a,this,b),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(a,b){var d=(b||"")+"attach";c.each(a,function(a){f.trigge
rMethodOn(a,d,a,this)},this)},_displayedViews:function(a){return c.union([a],c.result(a,"_getNestedViews")||[])},_ensureElement:function(){if(c.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0]),!this.$el||0===this.$el.length){if(this.getOption("allowMissingEl"))return!1;throw new f.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(a){if(!a)throw new f.Error({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(a.isDestroyed)throw new f.Error({name:"ViewDestroyedError",message:'View (cid: "'+a.cid+'") has already been destroyed and cannot be used.'})},getEl:function(a){return b.$(a,f._getValue(this.options.parentEl,this))},attachHtml:function(a){this.$el.contents().detach(),this.el.appendChild(a.el)},empty:function(a){var b=this.currentView,c=f._getValue(a,"preventDestroy",this);return b?(b.off("destroy",this.empty,this),this.triggerMethod("before
:empty",b),c||this._destroyView(),this.triggerMethod("empty",b),delete this.currentView,c&&this.$el.contents().detach(),this):void 0},_destroyView:function(){var a=this.currentView;a.destroy&&!a.isDestroyed?a.destroy():a.remove&&(a.remove(),a.isDestroyed=!0)},attachView:function(a){return this.currentView=a,this},hasView:function(){return!!this.currentView},reset:function(){return this.empty(),this.$el&&(this.el=this.$el.selector),delete this.$el,this}},{buildRegion:function(a,b){if(c.isString(a))return this._buildRegionFromSelector(a,b);if(a.selector||a.el||a.regionClass)return this._buildRegionFromObject(a,b);if(c.isFunction(a))return this._buildRegionFromRegionClass(a);throw new f.Error({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})},_buildRegionFromSelector:function(a,b){return new b({el:a})},_buildRegionFromObject:function(a,b){var d=a.regionClass||b,e=c.omit(a,"selector","regionClass");return a.selector&&!e.el&&(e.el=a.
selector),new d(e)},_buildRegionFromRegionClass:function(a){return new a}}),f.RegionManager=f.Controller.extend({constructor:function(a){this._regions={},this.length=0,f.Controller.call(this,a),this.addRegions(this.getOption("regions"))},addRegions:function(a,b){return a=f._getValue(a,this,arguments),c.reduce(a,function(a,d,e){return c.isString(d)&&(d={selector:d}),d.selector&&(d=c.defaults({},d,b)),a[e]=this.addRegion(e,d),a},{},this)},addRegion:function(a,b){var c;return c=b instanceof f.Region?b:f.Region.buildRegion(b,f.Region),this.triggerMethod("before:add:region",a,c),c._parent=this,this._store(a,c),this.triggerMethod("add:region",a,c),c},get:function(a){return this._regions[a]},getRegions:function(){return c.clone(this._regions)},removeRegion:function(a){var b=this._regions[a];return this._remove(a,b),b},removeRegions:function(){var a=this.getRegions();return c.each(this._regions,function(a,b){this._remove(b,a)},this),a},emptyRegions:function(){var a=this.getRegions();return
c.invoke(a,"empty"),a},destroy:function(){return this.removeRegions(),f.Controller.prototype.destroy.apply(this,arguments)},_store:function(a,b){this._regions[a]||this.length++,this._regions[a]=b},_remove:function(a,b){this.triggerMethod("before:remove:region",a,b),b.empty(),b.stopListening(),delete b._parent,delete this._regions[a],this.length--,this.triggerMethod("remove:region",a,b)}}),f.actAsCollection(f.RegionManager.prototype,"_regions"),f.TemplateCache=function(a){this.templateId=a},c.extend(f.TemplateCache,{templateCaches:{},get:function(a,b){var c=this.templateCaches[a];return c||(c=new f.TemplateCache(a),this.templateCaches[a]=c),c.load(b)},clear:function(){var a,b=c.toArray(arguments),d=b.length;if(d>0)for(a=0;d>a;a++)delete this.templateCaches[b[a]];else this.templateCaches={}}}),c.extend(f.TemplateCache.prototype,{load:function(a){if(this.compiledTemplate)return this.compiledTemplate;var b=this.loadTemplate(this.templateId,a);return this.compiledTemplate=this.compileTem
plate(b,a),this.compiledTemplate},loadTemplate:function(a){var c=b.$(a).html();if(!c||0===c.length)throw new f.Error({name:"NoTemplateError",message:'Could not find template: "'+a+'"'});return c},compileTemplate:function(a,b){return c.template(a,b)}}),f.Renderer={render:function(a,b){if(!a)throw new f.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var d=c.isFunction(a)?a:f.TemplateCache.get(a);return d(b)}},f.View=b.View.extend({isDestroyed:!1,constructor:function(a){c.bindAll(this,"render"),a=f._getValue(a,this),this.options=c.extend({},c.result(this,"options"),a),this._behaviors=f.Behaviors(this),b.View.call(this,this.options),f.MonitorDOMRefresh(this)},getTemplate:function(){return this.getOption("template")},serializeModel:function(a){return a.toJSON.apply(a,c.rest(arguments))},mixinTemplateHelpers:function(a){a=a||{};var b=this.getOption("templateHelpers");return b=f._getValue(b,this),c.extend(a,b)},normalizeUIKeys
:function(a){var b=c.result(this,"_uiBindings");return f.normalizeUIKeys(a,b||c.result(this,"ui"))},normalizeUIValues:function(a,b){var d=c.result(this,"ui"),e=c.result(this,"_uiBindings");return f.normalizeUIValues(a,e||d,b)},configureTriggers:function(){if(this.triggers){var a=this.normalizeUIKeys(c.result(this,"triggers"));return c.reduce(a,function(a,b,c){return a[c]=this._buildViewTrigger(b),a},{},this)}},delegateEvents:function(a){return this._delegateDOMEvents(a),this.bindEntityEvents(this.model,this.getOption("modelEvents")),this.bindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.bindEntityEvents(this.model,a.getOption("modelEvents")),a.bindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_delegateDOMEvents:function(a){var d=f._getValue(a||this.events,this);d=this.normalizeUIKeys(d),c.isUndefined(a)&&(this.events=d);var e={},g=c.result(this,"behaviorEvents")||{},h=this.configureTriggers(),i=c.re
sult(this,"behaviorTriggers")||{};c.extend(e,g,d,h,i),b.View.prototype.delegateEvents.call(this,e)},undelegateEvents:function(){return b.View.prototype.undelegateEvents.apply(this,arguments),this.unbindEntityEvents(this.model,this.getOption("modelEvents")),this.unbindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.unbindEntityEvents(this.model,a.getOption("modelEvents")),a.unbindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_ensureViewIsIntact:function(){if(this.isDestroyed)throw new f.Error({name:"ViewDestroyedError",message:'View (cid: "'+this.cid+'") has already been destroyed and cannot be used.'})},destroy:function(){if(this.isDestroyed)return this;var a=c.toArray(arguments);return this.triggerMethod.apply(this,["before:destroy"].concat(a)),this.isDestroyed=!0,this.triggerMethod.apply(this,["destroy"].concat(a)),this.unbindUIElements(),this.isRendered=!1,this.remove(),c.invoke(this._behaviors,"de
stroy",a),this},bindUIElements:function(){this._bindUIElements(),c.invoke(this._behaviors,this._bindUIElements)},_bindUIElements:function(){if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var a=c.result(this,"_uiBindings");this.ui={},c.each(a,function(a,b){this.ui[b]=this.$(a)},this)}},unbindUIElements:function(){this._unbindUIElements(),c.invoke(this._behaviors,this._unbindUIElements)},_unbindUIElements:function(){this.ui&&this._uiBindings&&(c.each(this.ui,function(a,b){delete this.ui[b]},this),this.ui=this._uiBindings,delete this._uiBindings)},_buildViewTrigger:function(a){var b=c.isObject(a),d=c.defaults({},b?a:{},{preventDefault:!0,stopPropagation:!0}),e=b?d.event:a;return function(a){a&&(a.preventDefault&&d.preventDefault&&a.preventDefault(),a.stopPropagation&&d.stopPropagation&&a.stopPropagation());var b={view:this,model:this.model,collection:this.collection};this.triggerMethod(e,b)}},setElement:function(){var a=b.View.prototype.setElement.apply(this,arguments);return
c.invoke(this._behaviors,"proxyViewProperties",this),a},triggerMethod:function(){var a=f._triggerMethod(this,arguments);return this._triggerEventOnBehaviors(arguments),this._triggerEventOnParentLayout(arguments[0],c.rest(arguments)),a},_triggerEventOnBehaviors:function(a){for(var b=f._triggerMethod,c=this._behaviors,d=0,e=c&&c.length;e>d;d++)b(c[d],a)},_triggerEventOnParentLayout:function(a,b){var d=this._parentLayoutView();if(d){var e=f.getOption(d,"childViewEventPrefix"),g=e+":"+a;f._triggerMethod(d,[g,this].concat(b));var h=f.getOption(d,"childEvents"),i=d.normalizeMethods(h);i&&c.isFunction(i[a])&&i[a].apply(d,[this].concat(b))}},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var a=this._getImmediateChildren();return a.length?c.reduce(a,function(a,b){return b._getNestedViews?a.concat(b._getNestedViews()):a},a):a},_getAncestors:function(){for(var a=[],b=this._parent;b;)a.push(b),b=b._parent;return a},_parentLayoutView:function(){var a=this._getAncestors();
return c.find(a,function(a){return a instanceof f.LayoutView})},normalizeMethods:f.normalizeMethods,mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.ItemView=f.View.extend({constructor:function(){f.View.apply(this,arguments)},serializeData:function(){if(!this.model&&!this.collection)return{};var a=[this.model||this.collection];return arguments.length&&a.push.apply(a,arguments),this.model?this.serializeModel.apply(this,a):{items:this.serializeCollection.apply(this,a)}},serializeCollection:function(a){return a.toJSON.apply(a,c.rest(arguments))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderTemplate(),this.isRendered=!0,this.bindUIElements(),this.triggerMethod("render",this),this},_renderTemplate:function(){var a=this.getTemplate();if(a!==!1){if(!a)throw new f.Error({name:"UndefinedTemplateError",message:"Cannot render the template s
ince it is null or undefined."});var b=this.mixinTemplateHelpers(this.serializeData()),c=f.Renderer.render(a,b,this);return this.attachElContent(c),this}},attachElContent:function(a){return this.$el.html(a),this}}),f.CollectionView=f.View.extend({childViewEventPrefix:"childview",sort:!0,constructor:function(){this.once("render",this._initialEvents),this._initChildViewStorage(),f.View.apply(this,arguments),this.on("show",this._onShowCalled),this.initRenderBuffer()},initRenderBuffer:function(){this._bufferedChildren=[]},startBuffering:function(){this.initRenderBuffer(),this.isBuffering=!0},endBuffering:function(){this.isBuffering=!1,this._triggerBeforeShowBufferedChildren(),this.attachBuffer(this),this._triggerShowBufferedChildren(),this.initRenderBuffer()},_triggerBeforeShowBufferedChildren:function(){this._isShown&&c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"before:show"))},_triggerShowBufferedChildren:function(){this._isShown&&(c.each(this._bufferedChildren,
c.partial(this._triggerMethodOnChild,"show")),this._bufferedChildren=[])},_triggerMethodOnChild:function(a,b){f.triggerMethodOn(b,a)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this.render),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(a,b,d){var e;if(e=void 0!==d.at?d.at:c.indexOf(this._filteredSortedModels(),a),this._shouldAddChild(a,e)){this.destroyEmptyView();var f=this.getChildView(a);this.addChild(a,f,e)}},_onCollectionRemove:function(a){var b=this.children.findByModel(a);this.removeChildView(b),this.checkEmpty()},_onShowCalled:function(){this.children.each(c.partial(this._triggerMethodOnChild,"show"))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderChildren(),this.isRendered=!0,this.triggerMethod("re
nder",this),this},reorder:function(){var a=this.children,b=this._filteredSortedModels(),d=c.find(b,function(b){return!a.findByModel(b)});if(d)this.render();else{var e=c.map(b,function(b){return a.findByModel(b).el});this.triggerMethod("before:reorder"),this._appendReorderedChildren(e),this.triggerMethod("reorder")}},resortView:function(){f.getOption(this,"reorderOnSort")?this.reorder():this.render()},_sortViews:function(){var a=this._filteredSortedModels(),b=c.find(a,function(a,b){var c=this.children.findByModel(a);return!c||c._index!==b},this);b&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(a){this.$el.append(a)},_renderChildren:function(){this.destroyEmptyView(),this.destroyChildren(),this.isEmpty(this.collection)?this.showEmptyView():(this.triggerMethod("before:render:collection",this),this.startBuffering(),this.showCollection(),this.endBuffering(),this.triggerMethod("render:collection",this),this.children.isEmpty()&&this.showEmptyView())},showCollectio
n:function(){var a,b=this._filteredSortedModels();c.each(b,function(b,c){a=this.getChildView(b),this.addChild(b,a,c)},this)},_filteredSortedModels:function(){var a,b=this.getViewComparator();return a=b?c.isString(b)||1===b.length?this.collection.sortBy(b,this):c.clone(this.collection.models).sort(c.bind(b,this)):this.collection.models,this.getOption("filter")&&(a=c.filter(a,function(a,b){return this._shouldAddChild(a,b)},this)),a},showEmptyView:function(){var a=this.getEmptyView();if(a&&!this._showingEmptyView){this.triggerMethod("before:render:empty"),this._showingEmptyView=!0;var c=new b.Model;this.addEmptyView(c,a),this.triggerMethod("render:empty")}},destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty"),this.destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty"))},getEmptyView:function(){return this.getOption("emptyView")},addEmptyView:function(a,b){var d=this.getOption("emptyViewOptions")||this.getOption("chil
dViewOptions");c.isFunction(d)&&(d=d.call(this,a,this._emptyViewIndex));var e=this.buildChildView(a,b,d);e._parent=this,this.proxyChildEvents(e),this._isShown&&f.triggerMethodOn(e,"before:show"),this.children.add(e),this.renderChildView(e,this._emptyViewIndex),this._isShown&&f.triggerMethodOn(e,"show")},getChildView:function(){var a=this.getOption("childView");if(!a)throw new f.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return a},addChild:function(a,b,c){var d=this.getOption("childViewOptions");d=f._getValue(d,this,[a,c]);var e=this.buildChildView(a,b,d);return this._updateIndices(e,!0,c),this._addChildView(e,c),e._parent=this,e},_updateIndices:function(a,b,c){this.getOption("sort")&&(b&&(a._index=c),this.children.each(function(c){c._index>=a._index&&(c._index+=b?1:-1)}))},_addChildView:function(a,b){this.proxyChildEvents(a),this.triggerMethod("before:add:child",a),this._isShown&&!this.isBuffering&&f.triggerMethodOn(a,"before:show"),this.children.add(
a),this.renderChildView(a,b),this._isShown&&!this.isBuffering&&f.triggerMethodOn(a,"show"),this.triggerMethod("add:child",a)},renderChildView:function(a,b){return a.render(),this.attachHtml(this,a,b),a},buildChildView:function(a,b,d){var e=c.extend({model:a},d);return new b(e)},removeChildView:function(a){return a&&(this.triggerMethod("before:remove:child",a),a.destroy?a.destroy():a.remove&&a.remove(),delete a._parent,this.stopListening(a),this.children.remove(a),this.triggerMethod("remove:child",a),this._updateIndices(a,!1)),a},isEmpty:function(){return!this.collection||0===this.collection.length},checkEmpty:function(){this.isEmpty(this.collection)&&this.showEmptyView()},attachBuffer:function(a){a.$el.append(this._createBuffer(a))},_createBuffer:function(a){var b=document.createDocumentFragment();return c.each(a._bufferedChildren,function(a){b.appendChild(a.el)}),b},attachHtml:function(a,b,c){a.isBuffering?a._bufferedChildren.splice(c,0,b):a._insertBefore(b,c)||a._insertAfter(b)},_
insertBefore:function(a,b){var c,d=this.getOption("sort")&&b<this.children.length-1;return d&&(c=this.children.find(function(a){return a._index===b+1})),c?(c.$el.before(a.el),!0):!1},_insertAfter:function(a){this.$el.append(a.el)},_initChildViewStorage:function(){this.children=new b.ChildViewContainer},destroy:function(){return this.isDestroyed?this:(this.triggerMethod("before:destroy:collection"),this.destroyChildren(),this.triggerMethod("destroy:collection"),f.View.prototype.destroy.apply(this,arguments))},destroyChildren:function(){var a=this.children.map(c.identity);return this.children.each(this.removeChildView,this),this.checkEmpty(),a},_shouldAddChild:function(a,b){var d=this.getOption("filter");return!c.isFunction(d)||d.call(this,a,b,this.collection)},proxyChildEvents:function(a){var b=this.getOption("childViewEventPrefix");this.listenTo(a,"all",function(){var d=c.toArray(arguments),e=d[0],f=this.normalizeMethods(c.result(this,"childEvents"));d[0]=b+":"+e,d.splice(1,0,a),"un
defined"!=typeof f&&c.isFunction(f[e])&&f[e].apply(this,d.slice(1)),this.triggerMethod.apply(this,d)})},_getImmediateChildren:function(){return c.values(this.children._views)},getViewComparator:function(){return this.getOption("viewComparator")}}),f.CompositeView=f.CollectionView.extend({constructor:function(){f.CollectionView.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this._renderChildren),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},getChildView:function(){var a=this.getOption("childView")||this.constructor;return a},serializeData:function(){var a={};return this.model&&(a=c.partial(this.serializeModel,this.model).apply(this,arguments)),a},render:function(){return this._ensureViewIsIntact(),this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("bef
ore:render",this),this._renderTemplate(),this._renderChildren(),this._isRendering=!1,this.isRendered=!0,this.triggerMethod("render",this),this},_renderChildren:function(){(this.isRendered||this._isRendering)&&f.CollectionView.prototype._renderChildren.call(this)},_renderTemplate:function(){var a={};a=this.serializeData(),a=this.mixinTemplateHelpers(a),this.triggerMethod("before:render:template");var b=this.getTemplate(),c=f.Renderer.render(b,a,this);this.attachElContent(c),this.bindUIElements(),this.triggerMethod("render:template")},attachElContent:function(a){return this.$el.html(a),this},attachBuffer:function(a){var b=this.getChildViewContainer(a);b.append(this._createBuffer(a))},_insertAfter:function(a){var b=this.getChildViewContainer(this,a);b.append(a.el)},_appendReorderedChildren:function(a){var b=this.getChildViewContainer(this);b.append(a)},getChildViewContainer:function(a){if("$childViewContainer"in a)return a.$childViewContainer;var b,c=f.getOption(a,"childViewContainer")
;if(c){var d=f._getValue(c,a);if(b="@"===d.charAt(0)&&a.ui?a.ui[d.substr(4)]:a.$(d),b.length<=0)throw new f.Error({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+a.childViewContainer})
+}else b=a.$el;return a.$childViewContainer=b,b},resetChildViewContainer:function(){this.$childViewContainer&&delete this.$childViewContainer}}),f.LayoutView=f.ItemView.extend({regionClass:f.Region,options:{destroyImmediate:!1},childViewEventPrefix:"childview",constructor:function(a){a=a||{},this._firstRender=!0,this._initializeRegions(a),f.ItemView.call(this,a)},render:function(){return this._ensureViewIsIntact(),this._firstRender?this._firstRender=!1:this._reInitializeRegions(),f.ItemView.prototype.render.apply(this,arguments)},destroy:function(){return this.isDestroyed?this:(this.getOption("destroyImmediate")===!0&&this.$el.remove(),this.regionManager.destroy(),f.ItemView.prototype.destroy.apply(this,arguments))},showChildView:function(a,b){return this.getRegion(a).show(b)},getChildView:function(a){return this.getRegion(a).currentView},addRegion:function(a,b){var c={};return c[a]=b,this._buildRegions(c)[a]},addRegions:function(a){return this.regions=c.extend({},this.regions,a),thi
s._buildRegions(a)},removeRegion:function(a){return delete this.regions[a],this.regionManager.removeRegion(a)},getRegion:function(a){return this.regionManager.get(a)},getRegions:function(){return this.regionManager.getRegions()},_buildRegions:function(a){var b={regionClass:this.getOption("regionClass"),parentEl:c.partial(c.result,this,"el")};return this.regionManager.addRegions(a,b)},_initializeRegions:function(a){var b;this._initRegionManager(),b=f._getValue(this.regions,this,[a])||{};var d=this.getOption.call(a,"regions");d=f._getValue(d,this,[a]),c.extend(b,d),b=this.normalizeUIValues(b,["selector","el"]),this.addRegions(b)},_reInitializeRegions:function(){this.regionManager.invoke("reset")},getRegionManager:function(){return new f.RegionManager},_initRegionManager:function(){this.regionManager=this.getRegionManager(),this.regionManager._parent=this,this.listenTo(this.regionManager,"before:add:region",function(a){this.triggerMethod("before:add:region",a)}),this.listenTo(this.regi
onManager,"add:region",function(a,b){this[a]=b,this.triggerMethod("add:region",a,b)}),this.listenTo(this.regionManager,"before:remove:region",function(a){this.triggerMethod("before:remove:region",a)}),this.listenTo(this.regionManager,"remove:region",function(a,b){delete this[a],this.triggerMethod("remove:region",a,b)})},_getImmediateChildren:function(){return c.chain(this.regionManager.getRegions()).pluck("currentView").compact().value()}}),f.Behavior=f.Object.extend({constructor:function(a,b){this.view=b,this.defaults=c.result(this,"defaults")||{},this.options=c.extend({},this.defaults,a),this.ui=c.extend({},c.result(b,"ui"),c.result(this,"ui")),f.Object.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this},proxyViewProperties:function(a){this.$el=a.$el,this.el=a.el}}),f.Behaviors=function(a,b){function c(a,d){return b.isObject(a.behaviors)?(d=c.parseBehaviors(a,d||b.result(a,"behaviors")),c.wrap(a,d,
b.keys(g)),d):{}}function d(a,b){this._view=a,this._behaviors=b,this._triggers={}}function e(a){return a._uiBindings||a.ui}var f=/^(\S+)\s*(.*)$/,g={behaviorTriggers:function(a,b){var c=new d(this,b);return c.buildBehaviorTriggers()},behaviorEvents:function(c,d){var g={};return b.each(d,function(c,d){var h={},i=b.clone(b.result(c,"events"))||{};i=a.normalizeUIKeys(i,e(c));var j=0;b.each(i,function(a,e){var g=e.match(f),i=g[1]+"."+[this.cid,d,j++," "].join(""),k=g[2],l=i+k,m=b.isFunction(a)?a:c[a];h[l]=b.bind(m,c)},this),g=b.extend(g,h)},this),g}};return b.extend(c,{behaviorsLookup:function(){throw new a.Error({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.html#behaviorslookup"})},getBehaviorClass:function(b,d){return b.behaviorClass?b.behaviorClass:a._getValue(c.behaviorsLookup,this,[b,d])[d]},parseBehaviors:function(a,d){return b.chain(d).map(function(d,e){var f=c.getBehaviorClass(d,e),g=new f(d,a),h=c.parseBehaviors(a,b.result(g,"behaviors"))
;return[g].concat(h)}).flatten().value()},wrap:function(a,c,d){b.each(d,function(d){a[d]=b.partial(g[d],a[d],c)})}}),b.extend(d.prototype,{buildBehaviorTriggers:function(){return b.each(this._behaviors,this._buildTriggerHandlersForBehavior,this),this._triggers},_buildTriggerHandlersForBehavior:function(c,d){var f=b.clone(b.result(c,"triggers"))||{};f=a.normalizeUIKeys(f,e(c)),b.each(f,b.bind(this._setHandlerForBehavior,this,c,d))},_setHandlerForBehavior:function(a,b,c,d){var e=d.replace(/^\S+/,function(a){return a+".behaviortriggers"+b});this._triggers[e]=this._view._buildViewTrigger(c)}}),c}(f,c),f.AppRouter=b.Router.extend({constructor:function(a){this.options=a||{},b.Router.apply(this,arguments);var c=this.getOption("appRoutes"),d=this._getController();this.processAppRoutes(d,c),this.on("route",this._processOnRoute,this)},appRoute:function(a,b){var c=this._getController();this._addAppRoute(c,a,b)},_processOnRoute:function(a,b){if(c.isFunction(this.onRoute)){var d=c.invert(this.ge
tOption("appRoutes"))[a];this.onRoute(a,d,b)}},processAppRoutes:function(a,b){if(b){var d=c.keys(b).reverse();c.each(d,function(c){this._addAppRoute(a,c,b[c])},this)}},_getController:function(){return this.getOption("controller")},_addAppRoute:function(a,b,d){var e=a[d];if(!e)throw new f.Error('Method "'+d+'" was not found on the controller');this.route(b,d,c.bind(e,a))},mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,triggerMethod:f.triggerMethod,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.Application=f.Object.extend({constructor:function(a){this._initializeRegions(a),this._initCallbacks=new f.Callbacks,this.submodules={},c.extend(this,a),this._initChannel(),f.Object.call(this,a)},execute:function(){this.commands.execute.apply(this.commands,arguments)},request:function(){return this.reqres.request.apply(this.reqres,arguments)},addInitializer:function(a){this._initCallbacks.add(a)},start:function(a){this.triggerMethod("before:star
t",a),this._initCallbacks.run(a,this),this.triggerMethod("start",a)},addRegions:function(a){return this._regionManager.addRegions(a)},emptyRegions:function(){return this._regionManager.emptyRegions()},removeRegion:function(a){return this._regionManager.removeRegion(a)},getRegion:function(a){return this._regionManager.get(a)},getRegions:function(){return this._regionManager.getRegions()},module:function(a,b){var d=f.Module.getClass(b),e=c.toArray(arguments);return e.unshift(this),d.create.apply(d,e)},getRegionManager:function(){return new f.RegionManager},_initializeRegions:function(a){var b=c.isFunction(this.regions)?this.regions(a):this.regions||{};this._initRegionManager();var d=f.getOption(a,"regions");return c.isFunction(d)&&(d=d.call(this,a)),c.extend(b,d),this.addRegions(b),this},_initRegionManager:function(){this._regionManager=this.getRegionManager(),this._regionManager._parent=this,this.listenTo(this._regionManager,"before:add:region",function(){f._triggerMethod(this,"befor
e:add:region",arguments)}),this.listenTo(this._regionManager,"add:region",function(a,b){this[a]=b,f._triggerMethod(this,"add:region",arguments)}),this.listenTo(this._regionManager,"before:remove:region",function(){f._triggerMethod(this,"before:remove:region",arguments)}),this.listenTo(this._regionManager,"remove:region",function(a){delete this[a],f._triggerMethod(this,"remove:region",arguments)})},_initChannel:function(){this.channelName=c.result(this,"channelName")||"global",this.channel=c.result(this,"channel")||b.Wreqr.radio.channel(this.channelName),this.vent=c.result(this,"vent")||this.channel.vent,this.commands=c.result(this,"commands")||this.channel.commands,this.reqres=c.result(this,"reqres")||this.channel.reqres}}),f.Module=function(a,b,d){this.moduleName=a,this.options=c.extend({},this.options,d),this.initialize=d.initialize||this.initialize,this.submodules={},this._setupInitializersAndFinalizers(),this.app=b,c.isFunction(this.initialize)&&this.initialize(a,b,this.options)
},f.Module.extend=f.extend,c.extend(f.Module.prototype,b.Events,{startWithParent:!0,initialize:function(){},addInitializer:function(a){this._initializerCallbacks.add(a)},addFinalizer:function(a){this._finalizerCallbacks.add(a)},start:function(a){this._isInitialized||(c.each(this.submodules,function(b){b.startWithParent&&b.start(a)}),this.triggerMethod("before:start",a),this._initializerCallbacks.run(a,this),this._isInitialized=!0,this.triggerMethod("start",a))},stop:function(){this._isInitialized&&(this._isInitialized=!1,this.triggerMethod("before:stop"),c.invoke(this.submodules,"stop"),this._finalizerCallbacks.run(void 0,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),this.triggerMethod("stop"))},addDefinition:function(a,b){this._runModuleDefinition(a,b)},_runModuleDefinition:function(a,d){if(a){var e=c.flatten([this,this.app,b,f,b.$,c,d]);a.apply(this,e)}},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new f.Callbacks,this._finalize
rCallbacks=new f.Callbacks},triggerMethod:f.triggerMethod}),c.extend(f.Module,{create:function(a,b,d){var e=a,f=c.drop(arguments,3);b=b.split(".");var g=b.length,h=[];return h[g-1]=d,c.each(b,function(b,c){var g=e;e=this._getModule(g,b,a,d),this._addModuleDefinition(g,e,h[c],f)},this),e},_getModule:function(a,b,d,e){var f=c.extend({},e),g=this.getClass(e),h=a[b];return h||(h=new g(b,d,f),a[b]=h,a.submodules[b]=h),h},getClass:function(a){var b=f.Module;return a?a.prototype instanceof b?a:a.moduleClass||b:b},_addModuleDefinition:function(a,b,c,d){var e=this._getDefine(c),f=this._getStartWithParent(c,b);e&&b.addDefinition(e,d),this._addStartWithParent(a,b,f)},_getStartWithParent:function(a,b){var d;return c.isFunction(a)&&a.prototype instanceof f.Module?(d=b.constructor.prototype.startWithParent,c.isUndefined(d)?!0:d):c.isObject(a)?(d=a.startWithParent,c.isUndefined(d)?!0:d):!0},_getDefine:function(a){return!c.isFunction(a)||a.prototype instanceof f.Module?c.isObject(a)?a.define:null:a
},_addStartWithParent:function(a,b,c){b.startWithParent=b.startWithParent&&c,b.startWithParent&&!b.startWithParentIsConfigured&&(b.startWithParentIsConfigured=!0,a.addInitializer(function(a){b.startWithParent&&b.start(a)}))}}),f});
+//# sourceMappingURL=backbone.marionette.min.js.map
\ No newline at end of file
[35/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
deleted file mode 100644
index b6fe4e0..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}butt
on,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{fo
nt-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-
bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001
"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before
{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:
before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before
{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{
content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bel
l:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{conten
t:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphic
on-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}
.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-col
or;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 smal
l,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-r
ight{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{pad
ding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:
80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;back
ground-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-
xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col
-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.
col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pul
l-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.3333333
3%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.333
33333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{
width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{l
eft:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bo
ttom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{posit
ion:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.s
uccess>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot
>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{widt
h:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bord
ered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:
focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;o
pacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline in
put[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.in
put-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:46px;line-height:46px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-con
trol-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio
-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,
0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{wi
dth:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-g
roup-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cu
rsor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.ac
tive{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-
primary.active{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,field
set[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border
-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-colo
r:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f
;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type
=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.d
ropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.dis
abled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-
group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle
:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5
px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-
bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-a
ddon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-s
m>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,
.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus
,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px
4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.activ
e>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-
justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important;visibility:visible!important}.navbar-collapse.in{overf
low-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-ra
dius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-m
enu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-f
orm .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;paddi
ng-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color
:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@
media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:ho
ver,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{backgroun
d-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open
.dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{positi
on:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;c
ursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-c
olor:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info
[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1
{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link
{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripe
s{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%
,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background
-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,25
5,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.1
5) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:
#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-it
em.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:f
ocus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item
-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border
-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:firs
t-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first
<TRUNCATED>
[07/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/d3-3.5.5.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/d3-3.5.5.js b/htrace-htraced/src/web/lib/js/d3-3.5.5.js
new file mode 100644
index 0000000..3af706a
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/d3-3.5.5.js
@@ -0,0 +1,9504 @@
+!function() {
+ var d3 = {
+ version: "3.5.5"
+ };
+ var d3_arraySlice = [].slice, d3_array = function(list) {
+ return d3_arraySlice.call(list);
+ };
+ var d3_document = this.document;
+ function d3_documentElement(node) {
+ return node && (node.ownerDocument || node.document || node).documentElement;
+ }
+ function d3_window(node) {
+ return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);
+ }
+ if (d3_document) {
+ try {
+ d3_array(d3_document.documentElement.childNodes)[0].nodeType;
+ } catch (e) {
+ d3_array = function(list) {
+ var i = list.length, array = new Array(i);
+ while (i--) array[i] = list[i];
+ return array;
+ };
+ }
+ }
+ if (!Date.now) Date.now = function() {
+ return +new Date();
+ };
+ if (d3_document) {
+ try {
+ d3_document.createElement("DIV").style.setProperty("opacity", 0, "");
+ } catch (error) {
+ var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
+ d3_element_prototype.setAttribute = function(name, value) {
+ d3_element_setAttribute.call(this, name, value + "");
+ };
+ d3_element_prototype.setAttributeNS = function(space, local, value) {
+ d3_element_setAttributeNS.call(this, space, local, value + "");
+ };
+ d3_style_prototype.setProperty = function(name, value, priority) {
+ d3_style_setProperty.call(this, name, value + "", priority);
+ };
+ }
+ }
+ d3.ascending = d3_ascending;
+ function d3_ascending(a, b) {
+ return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
+ }
+ d3.descending = function(a, b) {
+ return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
+ };
+ d3.min = function(array, f) {
+ var i = -1, n = array.length, a, b;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null && a > b) a = b;
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
+ }
+ return a;
+ };
+ d3.max = function(array, f) {
+ var i = -1, n = array.length, a, b;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null && b > a) a = b;
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
+ }
+ return a;
+ };
+ d3.extent = function(array, f) {
+ var i = -1, n = array.length, a, b, c;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = c = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null) {
+ if (a > b) a = b;
+ if (c < b) c = b;
+ }
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = c = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
+ if (a > b) a = b;
+ if (c < b) c = b;
+ }
+ }
+ return [ a, c ];
+ };
+ function d3_number(x) {
+ return x === null ? NaN : +x;
+ }
+ function d3_numeric(x) {
+ return !isNaN(x);
+ }
+ d3.sum = function(array, f) {
+ var s = 0, n = array.length, a, i = -1;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = +array[i])) s += a;
+ } else {
+ while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;
+ }
+ return s;
+ };
+ d3.mean = function(array, f) {
+ var s = 0, n = array.length, a, i = -1, j = n;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;
+ } else {
+ while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;
+ }
+ if (j) return s / j;
+ };
+ d3.quantile = function(values, p) {
+ var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;
+ return e ? v + e * (values[h] - v) : v;
+ };
+ d3.median = function(array, f) {
+ var numbers = [], n = array.length, a, i = -1;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);
+ } else {
+ while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);
+ }
+ if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);
+ };
+ d3.variance = function(array, f) {
+ var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;
+ if (arguments.length === 1) {
+ while (++i < n) {
+ if (d3_numeric(a = d3_number(array[i]))) {
+ d = a - m;
+ m += d / ++j;
+ s += d * (a - m);
+ }
+ }
+ } else {
+ while (++i < n) {
+ if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {
+ d = a - m;
+ m += d / ++j;
+ s += d * (a - m);
+ }
+ }
+ }
+ if (j > 1) return s / (j - 1);
+ };
+ d3.deviation = function() {
+ var v = d3.variance.apply(this, arguments);
+ return v ? Math.sqrt(v) : v;
+ };
+ function d3_bisector(compare) {
+ return {
+ left: function(a, x, lo, hi) {
+ if (arguments.length < 3) lo = 0;
+ if (arguments.length < 4) hi = a.length;
+ while (lo < hi) {
+ var mid = lo + hi >>> 1;
+ if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;
+ }
+ return lo;
+ },
+ right: function(a, x, lo, hi) {
+ if (arguments.length < 3) lo = 0;
+ if (arguments.length < 4) hi = a.length;
+ while (lo < hi) {
+ var mid = lo + hi >>> 1;
+ if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;
+ }
+ return lo;
+ }
+ };
+ }
+ var d3_bisect = d3_bisector(d3_ascending);
+ d3.bisectLeft = d3_bisect.left;
+ d3.bisect = d3.bisectRight = d3_bisect.right;
+ d3.bisector = function(f) {
+ return d3_bisector(f.length === 1 ? function(d, x) {
+ return d3_ascending(f(d), x);
+ } : f);
+ };
+ d3.shuffle = function(array, i0, i1) {
+ if ((m = arguments.length) < 3) {
+ i1 = array.length;
+ if (m < 2) i0 = 0;
+ }
+ var m = i1 - i0, t, i;
+ while (m) {
+ i = Math.random() * m-- | 0;
+ t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;
+ }
+ return array;
+ };
+ d3.permute = function(array, indexes) {
+ var i = indexes.length, permutes = new Array(i);
+ while (i--) permutes[i] = array[indexes[i]];
+ return permutes;
+ };
+ d3.pairs = function(array) {
+ var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);
+ while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];
+ return pairs;
+ };
+ d3.zip = function() {
+ if (!(n = arguments.length)) return [];
+ for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
+ for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
+ zip[j] = arguments[j][i];
+ }
+ }
+ return zips;
+ };
+ function d3_zipLength(d) {
+ return d.length;
+ }
+ d3.transpose = function(matrix) {
+ return d3.zip.apply(d3, matrix);
+ };
+ d3.keys = function(map) {
+ var keys = [];
+ for (var key in map) keys.push(key);
+ return keys;
+ };
+ d3.values = function(map) {
+ var values = [];
+ for (var key in map) values.push(map[key]);
+ return values;
+ };
+ d3.entries = function(map) {
+ var entries = [];
+ for (var key in map) entries.push({
+ key: key,
+ value: map[key]
+ });
+ return entries;
+ };
+ d3.merge = function(arrays) {
+ var n = arrays.length, m, i = -1, j = 0, merged, array;
+ while (++i < n) j += arrays[i].length;
+ merged = new Array(j);
+ while (--n >= 0) {
+ array = arrays[n];
+ m = array.length;
+ while (--m >= 0) {
+ merged[--j] = array[m];
+ }
+ }
+ return merged;
+ };
+ var abs = Math.abs;
+ d3.range = function(start, stop, step) {
+ if (arguments.length < 3) {
+ step = 1;
+ if (arguments.length < 2) {
+ stop = start;
+ start = 0;
+ }
+ }
+ if ((stop - start) / step === Infinity) throw new Error("infinite range");
+ var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;
+ start *= k, stop *= k, step *= k;
+ if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
+ return range;
+ };
+ function d3_range_integerScale(x) {
+ var k = 1;
+ while (x * k % 1) k *= 10;
+ return k;
+ }
+ function d3_class(ctor, properties) {
+ for (var key in properties) {
+ Object.defineProperty(ctor.prototype, key, {
+ value: properties[key],
+ enumerable: false
+ });
+ }
+ }
+ d3.map = function(object, f) {
+ var map = new d3_Map();
+ if (object instanceof d3_Map) {
+ object.forEach(function(key, value) {
+ map.set(key, value);
+ });
+ } else if (Array.isArray(object)) {
+ var i = -1, n = object.length, o;
+ if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);
+ } else {
+ for (var key in object) map.set(key, object[key]);
+ }
+ return map;
+ };
+ function d3_Map() {
+ this._ = Object.create(null);
+ }
+ var d3_map_proto = "__proto__", d3_map_zero = "\x00";
+ d3_class(d3_Map, {
+ has: d3_map_has,
+ get: function(key) {
+ return this._[d3_map_escape(key)];
+ },
+ set: function(key, value) {
+ return this._[d3_map_escape(key)] = value;
+ },
+ remove: d3_map_remove,
+ keys: d3_map_keys,
+ values: function() {
+ var values = [];
+ for (var key in this._) values.push(this._[key]);
+ return values;
+ },
+ entries: function() {
+ var entries = [];
+ for (var key in this._) entries.push({
+ key: d3_map_unescape(key),
+ value: this._[key]
+ });
+ return entries;
+ },
+ size: d3_map_size,
+ empty: d3_map_empty,
+ forEach: function(f) {
+ for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);
+ }
+ });
+ function d3_map_escape(key) {
+ return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;
+ }
+ function d3_map_unescape(key) {
+ return (key += "")[0] === d3_map_zero ? key.slice(1) : key;
+ }
+ function d3_map_has(key) {
+ return d3_map_escape(key) in this._;
+ }
+ function d3_map_remove(key) {
+ return (key = d3_map_escape(key)) in this._ && delete this._[key];
+ }
+ function d3_map_keys() {
+ var keys = [];
+ for (var key in this._) keys.push(d3_map_unescape(key));
+ return keys;
+ }
+ function d3_map_size() {
+ var size = 0;
+ for (var key in this._) ++size;
+ return size;
+ }
+ function d3_map_empty() {
+ for (var key in this._) return false;
+ return true;
+ }
+ d3.nest = function() {
+ var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
+ function map(mapType, array, depth) {
+ if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
+ var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
+ while (++i < n) {
+ if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
+ values.push(object);
+ } else {
+ valuesByKey.set(keyValue, [ object ]);
+ }
+ }
+ if (mapType) {
+ object = mapType();
+ setter = function(keyValue, values) {
+ object.set(keyValue, map(mapType, values, depth));
+ };
+ } else {
+ object = {};
+ setter = function(keyValue, values) {
+ object[keyValue] = map(mapType, values, depth);
+ };
+ }
+ valuesByKey.forEach(setter);
+ return object;
+ }
+ function entries(map, depth) {
+ if (depth >= keys.length) return map;
+ var array = [], sortKey = sortKeys[depth++];
+ map.forEach(function(key, keyMap) {
+ array.push({
+ key: key,
+ values: entries(keyMap, depth)
+ });
+ });
+ return sortKey ? array.sort(function(a, b) {
+ return sortKey(a.key, b.key);
+ }) : array;
+ }
+ nest.map = function(array, mapType) {
+ return map(mapType, array, 0);
+ };
+ nest.entries = function(array) {
+ return entries(map(d3.map, array, 0), 0);
+ };
+ nest.key = function(d) {
+ keys.push(d);
+ return nest;
+ };
+ nest.sortKeys = function(order) {
+ sortKeys[keys.length - 1] = order;
+ return nest;
+ };
+ nest.sortValues = function(order) {
+ sortValues = order;
+ return nest;
+ };
+ nest.rollup = function(f) {
+ rollup = f;
+ return nest;
+ };
+ return nest;
+ };
+ d3.set = function(array) {
+ var set = new d3_Set();
+ if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);
+ return set;
+ };
+ function d3_Set() {
+ this._ = Object.create(null);
+ }
+ d3_class(d3_Set, {
+ has: d3_map_has,
+ add: function(key) {
+ this._[d3_map_escape(key += "")] = true;
+ return key;
+ },
+ remove: d3_map_remove,
+ values: d3_map_keys,
+ size: d3_map_size,
+ empty: d3_map_empty,
+ forEach: function(f) {
+ for (var key in this._) f.call(this, d3_map_unescape(key));
+ }
+ });
+ d3.behavior = {};
+ function d3_identity(d) {
+ return d;
+ }
+ d3.rebind = function(target, source) {
+ var i = 1, n = arguments.length, method;
+ while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
+ return target;
+ };
+ function d3_rebind(target, source, method) {
+ return function() {
+ var value = method.apply(source, arguments);
+ return value === source ? target : value;
+ };
+ }
+ function d3_vendorSymbol(object, name) {
+ if (name in object) return name;
+ name = name.charAt(0).toUpperCase() + name.slice(1);
+ for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {
+ var prefixName = d3_vendorPrefixes[i] + name;
+ if (prefixName in object) return prefixName;
+ }
+ }
+ var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ];
+ function d3_noop() {}
+ d3.dispatch = function() {
+ var dispatch = new d3_dispatch(), i = -1, n = arguments.length;
+ while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+ return dispatch;
+ };
+ function d3_dispatch() {}
+ d3_dispatch.prototype.on = function(type, listener) {
+ var i = type.indexOf("."), name = "";
+ if (i >= 0) {
+ name = type.slice(i + 1);
+ type = type.slice(0, i);
+ }
+ if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
+ if (arguments.length === 2) {
+ if (listener == null) for (type in this) {
+ if (this.hasOwnProperty(type)) this[type].on(name, null);
+ }
+ return this;
+ }
+ };
+ function d3_dispatch_event(dispatch) {
+ var listeners = [], listenerByName = new d3_Map();
+ function event() {
+ var z = listeners, i = -1, n = z.length, l;
+ while (++i < n) if (l = z[i].on) l.apply(this, arguments);
+ return dispatch;
+ }
+ event.on = function(name, listener) {
+ var l = listenerByName.get(name), i;
+ if (arguments.length < 2) return l && l.on;
+ if (l) {
+ l.on = null;
+ listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
+ listenerByName.remove(name);
+ }
+ if (listener) listeners.push(listenerByName.set(name, {
+ on: listener
+ }));
+ return dispatch;
+ };
+ return event;
+ }
+ d3.event = null;
+ function d3_eventPreventDefault() {
+ d3.event.preventDefault();
+ }
+ function d3_eventSource() {
+ var e = d3.event, s;
+ while (s = e.sourceEvent) e = s;
+ return e;
+ }
+ function d3_eventDispatch(target) {
+ var dispatch = new d3_dispatch(), i = 0, n = arguments.length;
+ while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+ dispatch.of = function(thiz, argumentz) {
+ return function(e1) {
+ try {
+ var e0 = e1.sourceEvent = d3.event;
+ e1.target = target;
+ d3.event = e1;
+ dispatch[e1.type].apply(thiz, argumentz);
+ } finally {
+ d3.event = e0;
+ }
+ };
+ };
+ return dispatch;
+ }
+ d3.requote = function(s) {
+ return s.replace(d3_requote_re, "\\$&");
+ };
+ var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
+ var d3_subclass = {}.__proto__ ? function(object, prototype) {
+ object.__proto__ = prototype;
+ } : function(object, prototype) {
+ for (var property in prototype) object[property] = prototype[property];
+ };
+ function d3_selection(groups) {
+ d3_subclass(groups, d3_selectionPrototype);
+ return groups;
+ }
+ var d3_select = function(s, n) {
+ return n.querySelector(s);
+ }, d3_selectAll = function(s, n) {
+ return n.querySelectorAll(s);
+ }, d3_selectMatches = function(n, s) {
+ var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")];
+ d3_selectMatches = function(n, s) {
+ return d3_selectMatcher.call(n, s);
+ };
+ return d3_selectMatches(n, s);
+ };
+ if (typeof Sizzle === "function") {
+ d3_select = function(s, n) {
+ return Sizzle(s, n)[0] || null;
+ };
+ d3_selectAll = Sizzle;
+ d3_selectMatches = Sizzle.matchesSelector;
+ }
+ d3.selection = function() {
+ return d3.select(d3_document.documentElement);
+ };
+ var d3_selectionPrototype = d3.selection.prototype = [];
+ d3_selectionPrototype.select = function(selector) {
+ var subgroups = [], subgroup, subnode, group, node;
+ selector = d3_selection_selector(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = (group = this[j]).parentNode;
+ for (var i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroup.push(subnode = selector.call(node, node.__data__, i, j));
+ if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
+ } else {
+ subgroup.push(null);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_selector(selector) {
+ return typeof selector === "function" ? selector : function() {
+ return d3_select(selector, this);
+ };
+ }
+ d3_selectionPrototype.selectAll = function(selector) {
+ var subgroups = [], subgroup, node;
+ selector = d3_selection_selectorAll(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));
+ subgroup.parentNode = node;
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_selectorAll(selector) {
+ return typeof selector === "function" ? selector : function() {
+ return d3_selectAll(selector, this);
+ };
+ }
+ var d3_nsPrefix = {
+ svg: "http://www.w3.org/2000/svg",
+ xhtml: "http://www.w3.org/1999/xhtml",
+ xlink: "http://www.w3.org/1999/xlink",
+ xml: "http://www.w3.org/XML/1998/namespace",
+ xmlns: "http://www.w3.org/2000/xmlns/"
+ };
+ d3.ns = {
+ prefix: d3_nsPrefix,
+ qualify: function(name) {
+ var i = name.indexOf(":"), prefix = name;
+ if (i >= 0) {
+ prefix = name.slice(0, i);
+ name = name.slice(i + 1);
+ }
+ return d3_nsPrefix.hasOwnProperty(prefix) ? {
+ space: d3_nsPrefix[prefix],
+ local: name
+ } : name;
+ }
+ };
+ d3_selectionPrototype.attr = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") {
+ var node = this.node();
+ name = d3.ns.qualify(name);
+ return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
+ }
+ for (value in name) this.each(d3_selection_attr(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_attr(name, value));
+ };
+ function d3_selection_attr(name, value) {
+ name = d3.ns.qualify(name);
+ function attrNull() {
+ this.removeAttribute(name);
+ }
+ function attrNullNS() {
+ this.removeAttributeNS(name.space, name.local);
+ }
+ function attrConstant() {
+ this.setAttribute(name, value);
+ }
+ function attrConstantNS() {
+ this.setAttributeNS(name.space, name.local, value);
+ }
+ function attrFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
+ }
+ function attrFunctionNS() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
+ }
+ return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
+ }
+ function d3_collapse(s) {
+ return s.trim().replace(/\s+/g, " ");
+ }
+ d3_selectionPrototype.classed = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") {
+ var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;
+ if (value = node.classList) {
+ while (++i < n) if (!value.contains(name[i])) return false;
+ } else {
+ value = node.getAttribute("class");
+ while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
+ }
+ return true;
+ }
+ for (value in name) this.each(d3_selection_classed(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_classed(name, value));
+ };
+ function d3_selection_classedRe(name) {
+ return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
+ }
+ function d3_selection_classes(name) {
+ return (name + "").trim().split(/^|\s+/);
+ }
+ function d3_selection_classed(name, value) {
+ name = d3_selection_classes(name).map(d3_selection_classedName);
+ var n = name.length;
+ function classedConstant() {
+ var i = -1;
+ while (++i < n) name[i](this, value);
+ }
+ function classedFunction() {
+ var i = -1, x = value.apply(this, arguments);
+ while (++i < n) name[i](this, x);
+ }
+ return typeof value === "function" ? classedFunction : classedConstant;
+ }
+ function d3_selection_classedName(name) {
+ var re = d3_selection_classedRe(name);
+ return function(node, value) {
+ if (c = node.classList) return value ? c.add(name) : c.remove(name);
+ var c = node.getAttribute("class") || "";
+ if (value) {
+ re.lastIndex = 0;
+ if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name));
+ } else {
+ node.setAttribute("class", d3_collapse(c.replace(re, " ")));
+ }
+ };
+ }
+ d3_selectionPrototype.style = function(name, value, priority) {
+ var n = arguments.length;
+ if (n < 3) {
+ if (typeof name !== "string") {
+ if (n < 2) value = "";
+ for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
+ return this;
+ }
+ if (n < 2) {
+ var node = this.node();
+ return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);
+ }
+ priority = "";
+ }
+ return this.each(d3_selection_style(name, value, priority));
+ };
+ function d3_selection_style(name, value, priority) {
+ function styleNull() {
+ this.style.removeProperty(name);
+ }
+ function styleConstant() {
+ this.style.setProperty(name, value, priority);
+ }
+ function styleFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
+ }
+ return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
+ }
+ d3_selectionPrototype.property = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") return this.node()[name];
+ for (value in name) this.each(d3_selection_property(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_property(name, value));
+ };
+ function d3_selection_property(name, value) {
+ function propertyNull() {
+ delete this[name];
+ }
+ function propertyConstant() {
+ this[name] = value;
+ }
+ function propertyFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) delete this[name]; else this[name] = x;
+ }
+ return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
+ }
+ d3_selectionPrototype.text = function(value) {
+ return arguments.length ? this.each(typeof value === "function" ? function() {
+ var v = value.apply(this, arguments);
+ this.textContent = v == null ? "" : v;
+ } : value == null ? function() {
+ this.textContent = "";
+ } : function() {
+ this.textContent = value;
+ }) : this.node().textContent;
+ };
+ d3_selectionPrototype.html = function(value) {
+ return arguments.length ? this.each(typeof value === "function" ? function() {
+ var v = value.apply(this, arguments);
+ this.innerHTML = v == null ? "" : v;
+ } : value == null ? function() {
+ this.innerHTML = "";
+ } : function() {
+ this.innerHTML = value;
+ }) : this.node().innerHTML;
+ };
+ d3_selectionPrototype.append = function(name) {
+ name = d3_selection_creator(name);
+ return this.select(function() {
+ return this.appendChild(name.apply(this, arguments));
+ });
+ };
+ function d3_selection_creator(name) {
+ function create() {
+ var document = this.ownerDocument, namespace = this.namespaceURI;
+ return namespace ? document.createElementNS(namespace, name) : document.createElement(name);
+ }
+ function createNS() {
+ return this.ownerDocument.createElementNS(name.space, name.local);
+ }
+ return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;
+ }
+ d3_selectionPrototype.insert = function(name, before) {
+ name = d3_selection_creator(name);
+ before = d3_selection_selector(before);
+ return this.select(function() {
+ return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);
+ });
+ };
+ d3_selectionPrototype.remove = function() {
+ return this.each(d3_selectionRemove);
+ };
+ function d3_selectionRemove() {
+ var parent = this.parentNode;
+ if (parent) parent.removeChild(this);
+ }
+ d3_selectionPrototype.data = function(value, key) {
+ var i = -1, n = this.length, group, node;
+ if (!arguments.length) {
+ value = new Array(n = (group = this[0]).length);
+ while (++i < n) {
+ if (node = group[i]) {
+ value[i] = node.__data__;
+ }
+ }
+ return value;
+ }
+ function bind(group, groupData) {
+ var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
+ if (key) {
+ var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;
+ for (i = -1; ++i < n; ) {
+ if (nodeByKeyValue.has(keyValue = key.call(node = group[i], node.__data__, i))) {
+ exitNodes[i] = node;
+ } else {
+ nodeByKeyValue.set(keyValue, node);
+ }
+ keyValues[i] = keyValue;
+ }
+ for (i = -1; ++i < m; ) {
+ if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {
+ enterNodes[i] = d3_selection_dataNode(nodeData);
+ } else if (node !== true) {
+ updateNodes[i] = node;
+ node.__data__ = nodeData;
+ }
+ nodeByKeyValue.set(keyValue, true);
+ }
+ for (i = -1; ++i < n; ) {
+ if (nodeByKeyValue.get(keyValues[i]) !== true) {
+ exitNodes[i] = group[i];
+ }
+ }
+ } else {
+ for (i = -1; ++i < n0; ) {
+ node = group[i];
+ nodeData = groupData[i];
+ if (node) {
+ node.__data__ = nodeData;
+ updateNodes[i] = node;
+ } else {
+ enterNodes[i] = d3_selection_dataNode(nodeData);
+ }
+ }
+ for (;i < m; ++i) {
+ enterNodes[i] = d3_selection_dataNode(groupData[i]);
+ }
+ for (;i < n; ++i) {
+ exitNodes[i] = group[i];
+ }
+ }
+ enterNodes.update = updateNodes;
+ enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
+ enter.push(enterNodes);
+ update.push(updateNodes);
+ exit.push(exitNodes);
+ }
+ var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
+ if (typeof value === "function") {
+ while (++i < n) {
+ bind(group = this[i], value.call(group, group.parentNode.__data__, i));
+ }
+ } else {
+ while (++i < n) {
+ bind(group = this[i], value);
+ }
+ }
+ update.enter = function() {
+ return enter;
+ };
+ update.exit = function() {
+ return exit;
+ };
+ return update;
+ };
+ function d3_selection_dataNode(data) {
+ return {
+ __data__: data
+ };
+ }
+ d3_selectionPrototype.datum = function(value) {
+ return arguments.length ? this.property("__data__", value) : this.property("__data__");
+ };
+ d3_selectionPrototype.filter = function(filter) {
+ var subgroups = [], subgroup, group, node;
+ if (typeof filter !== "function") filter = d3_selection_filter(filter);
+ for (var j = 0, m = this.length; j < m; j++) {
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = (group = this[j]).parentNode;
+ for (var i = 0, n = group.length; i < n; i++) {
+ if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {
+ subgroup.push(node);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_filter(selector) {
+ return function() {
+ return d3_selectMatches(this, selector);
+ };
+ }
+ d3_selectionPrototype.order = function() {
+ for (var j = -1, m = this.length; ++j < m; ) {
+ for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
+ if (node = group[i]) {
+ if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
+ next = node;
+ }
+ }
+ }
+ return this;
+ };
+ d3_selectionPrototype.sort = function(comparator) {
+ comparator = d3_selection_sortComparator.apply(this, arguments);
+ for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
+ return this.order();
+ };
+ function d3_selection_sortComparator(comparator) {
+ if (!arguments.length) comparator = d3_ascending;
+ return function(a, b) {
+ return a && b ? comparator(a.__data__, b.__data__) : !a - !b;
+ };
+ }
+ d3_selectionPrototype.each = function(callback) {
+ return d3_selection_each(this, function(node, i, j) {
+ callback.call(node, node.__data__, i, j);
+ });
+ };
+ function d3_selection_each(groups, callback) {
+ for (var j = 0, m = groups.length; j < m; j++) {
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
+ if (node = group[i]) callback(node, i, j);
+ }
+ }
+ return groups;
+ }
+ d3_selectionPrototype.call = function(callback) {
+ var args = d3_array(arguments);
+ callback.apply(args[0] = this, args);
+ return this;
+ };
+ d3_selectionPrototype.empty = function() {
+ return !this.node();
+ };
+ d3_selectionPrototype.node = function() {
+ for (var j = 0, m = this.length; j < m; j++) {
+ for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+ var node = group[i];
+ if (node) return node;
+ }
+ }
+ return null;
+ };
+ d3_selectionPrototype.size = function() {
+ var n = 0;
+ d3_selection_each(this, function() {
+ ++n;
+ });
+ return n;
+ };
+ function d3_selection_enter(selection) {
+ d3_subclass(selection, d3_selection_enterPrototype);
+ return selection;
+ }
+ var d3_selection_enterPrototype = [];
+ d3.selection.enter = d3_selection_enter;
+ d3.selection.enter.prototype = d3_selection_enterPrototype;
+ d3_selection_enterPrototype.append = d3_selectionPrototype.append;
+ d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
+ d3_selection_enterPrototype.node = d3_selectionPrototype.node;
+ d3_selection_enterPrototype.call = d3_selectionPrototype.call;
+ d3_selection_enterPrototype.size = d3_selectionPrototype.size;
+ d3_selection_enterPrototype.select = function(selector) {
+ var subgroups = [], subgroup, subnode, upgroup, group, node;
+ for (var j = -1, m = this.length; ++j < m; ) {
+ upgroup = (group = this[j]).update;
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = group.parentNode;
+ for (var i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));
+ subnode.__data__ = node.__data__;
+ } else {
+ subgroup.push(null);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ d3_selection_enterPrototype.insert = function(name, before) {
+ if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);
+ return d3_selectionPrototype.insert.call(this, name, before);
+ };
+ function d3_selection_enterInsertBefore(enter) {
+ var i0, j0;
+ return function(d, i, j) {
+ var group = enter[j].update, n = group.length, node;
+ if (j != j0) j0 = j, i0 = 0;
+ if (i >= i0) i0 = i + 1;
+ while (!(node = group[i0]) && ++i0 < n) ;
+ return node;
+ };
+ }
+ d3.select = function(node) {
+ var group;
+ if (typeof node === "string") {
+ group = [ d3_select(node, d3_document) ];
+ group.parentNode = d3_document.documentElement;
+ } else {
+ group = [ node ];
+ group.parentNode = d3_documentElement(node);
+ }
+ return d3_selection([ group ]);
+ };
+ d3.selectAll = function(nodes) {
+ var group;
+ if (typeof nodes === "string") {
+ group = d3_array(d3_selectAll(nodes, d3_document));
+ group.parentNode = d3_document.documentElement;
+ } else {
+ group = nodes;
+ group.parentNode = null;
+ }
+ return d3_selection([ group ]);
+ };
+ d3_selectionPrototype.on = function(type, listener, capture) {
+ var n = arguments.length;
+ if (n < 3) {
+ if (typeof type !== "string") {
+ if (n < 2) listener = false;
+ for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
+ return this;
+ }
+ if (n < 2) return (n = this.node()["__on" + type]) && n._;
+ capture = false;
+ }
+ return this.each(d3_selection_on(type, listener, capture));
+ };
+ function d3_selection_on(type, listener, capture) {
+ var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
+ if (i > 0) type = type.slice(0, i);
+ var filter = d3_selection_onFilters.get(type);
+ if (filter) type = filter, wrap = d3_selection_onFilter;
+ function onRemove() {
+ var l = this[name];
+ if (l) {
+ this.removeEventListener(type, l, l.$);
+ delete this[name];
+ }
+ }
+ function onAdd() {
+ var l = wrap(listener, d3_array(arguments));
+ onRemove.call(this);
+ this.addEventListener(type, this[name] = l, l.$ = capture);
+ l._ = listener;
+ }
+ function removeAll() {
+ var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match;
+ for (var name in this) {
+ if (match = name.match(re)) {
+ var l = this[name];
+ this.removeEventListener(match[1], l, l.$);
+ delete this[name];
+ }
+ }
+ }
+ return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;
+ }
+ var d3_selection_onFilters = d3.map({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+ });
+ if (d3_document) {
+ d3_selection_onFilters.forEach(function(k) {
+ if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
+ });
+ }
+ function d3_selection_onListener(listener, argumentz) {
+ return function(e) {
+ var o = d3.event;
+ d3.event = e;
+ argumentz[0] = this.__data__;
+ try {
+ listener.apply(this, argumentz);
+ } finally {
+ d3.event = o;
+ }
+ };
+ }
+ function d3_selection_onFilter(listener, argumentz) {
+ var l = d3_selection_onListener(listener, argumentz);
+ return function(e) {
+ var target = this, related = e.relatedTarget;
+ if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {
+ l.call(target, e);
+ }
+ };
+ }
+ var d3_event_dragSelect, d3_event_dragId = 0;
+ function d3_event_dragSuppress(node) {
+ var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window(node)).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault);
+ if (d3_event_dragSelect == null) {
+ d3_event_dragSelect = "onselectstart" in node ? false : d3_vendorSymbol(node.style, "userSelect");
+ }
+ if (d3_event_dragSelect) {
+ var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];
+ style[d3_event_dragSelect] = "none";
+ }
+ return function(suppressClick) {
+ w.on(name, null);
+ if (d3_event_dragSelect) style[d3_event_dragSelect] = select;
+ if (suppressClick) {
+ var off = function() {
+ w.on(click, null);
+ };
+ w.on(click, function() {
+ d3_eventPreventDefault();
+ off();
+ }, true);
+ setTimeout(off, 0);
+ }
+ };
+ }
+ d3.mouse = function(container) {
+ return d3_mousePoint(container, d3_eventSource());
+ };
+ var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
+ function d3_mousePoint(container, e) {
+ if (e.changedTouches) e = e.changedTouches[0];
+ var svg = container.ownerSVGElement || container;
+ if (svg.createSVGPoint) {
+ var point = svg.createSVGPoint();
+ if (d3_mouse_bug44083 < 0) {
+ var window = d3_window(container);
+ if (window.scrollX || window.scrollY) {
+ svg = d3.select("body").append("svg").style({
+ position: "absolute",
+ top: 0,
+ left: 0,
+ margin: 0,
+ padding: 0,
+ border: "none"
+ }, "important");
+ var ctm = svg[0][0].getScreenCTM();
+ d3_mouse_bug44083 = !(ctm.f || ctm.e);
+ svg.remove();
+ }
+ }
+ if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX,
+ point.y = e.clientY;
+ point = point.matrixTransform(container.getScreenCTM().inverse());
+ return [ point.x, point.y ];
+ }
+ var rect = container.getBoundingClientRect();
+ return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
+ }
+ d3.touch = function(container, touches, identifier) {
+ if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;
+ if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {
+ if ((touch = touches[i]).identifier === identifier) {
+ return d3_mousePoint(container, touch);
+ }
+ }
+ };
+ d3.behavior.drag = function() {
+ var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, "touchmove", "touchend");
+ function drag() {
+ this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
+ }
+ function dragstart(id, position, subject, move, end) {
+ return function() {
+ var that = this, target = d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);
+ if (origin) {
+ dragOffset = origin.apply(that, arguments);
+ dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];
+ } else {
+ dragOffset = [ 0, 0 ];
+ }
+ dispatch({
+ type: "dragstart"
+ });
+ function moved() {
+ var position1 = position(parent, dragId), dx, dy;
+ if (!position1) return;
+ dx = position1[0] - position0[0];
+ dy = position1[1] - position0[1];
+ dragged |= dx | dy;
+ position0 = position1;
+ dispatch({
+ type: "drag",
+ x: position1[0] + dragOffset[0],
+ y: position1[1] + dragOffset[1],
+ dx: dx,
+ dy: dy
+ });
+ }
+ function ended() {
+ if (!position(parent, dragId)) return;
+ dragSubject.on(move + dragName, null).on(end + dragName, null);
+ dragRestore(dragged && d3.event.target === target);
+ dispatch({
+ type: "dragend"
+ });
+ }
+ };
+ }
+ drag.origin = function(x) {
+ if (!arguments.length) return origin;
+ origin = x;
+ return drag;
+ };
+ return d3.rebind(drag, event, "on");
+ };
+ function d3_behavior_dragTouchId() {
+ return d3.event.changedTouches[0].identifier;
+ }
+ d3.touches = function(container, touches) {
+ if (arguments.length < 2) touches = d3_eventSource().touches;
+ return touches ? d3_array(touches).map(function(touch) {
+ var point = d3_mousePoint(container, touch);
+ point.identifier = touch.identifier;
+ return point;
+ }) : [];
+ };
+ var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;
+ function d3_sgn(x) {
+ return x > 0 ? 1 : x < 0 ? -1 : 0;
+ }
+ function d3_cross2d(a, b, c) {
+ return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
+ }
+ function d3_acos(x) {
+ return x > 1 ? 0 : x < -1 ? π : Math.acos(x);
+ }
+ function d3_asin(x) {
+ return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);
+ }
+ function d3_sinh(x) {
+ return ((x = Math.exp(x)) - 1 / x) / 2;
+ }
+ function d3_cosh(x) {
+ return ((x = Math.exp(x)) + 1 / x) / 2;
+ }
+ function d3_tanh(x) {
+ return ((x = Math.exp(2 * x)) - 1) / (x + 1);
+ }
+ function d3_haversin(x) {
+ return (x = Math.sin(x / 2)) * x;
+ }
+ var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;
+ d3.interpolateZoom = function(p0, p1) {
+ var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2];
+ var dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1), dr = r1 - r0, S = (dr || Math.log(w1 / w0)) / ρ;
+ function interpolate(t) {
+ var s = t * S;
+ if (dr) {
+ var coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));
+ return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];
+ }
+ return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * s) ];
+ }
+ interpolate.duration = S * 1e3;
+ return interpolate;
+ };
+ d3.behavior.zoom = function() {
+ var view = {
+ x: 0,
+ y: 0,
+ k: 1
+ }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1;
+ if (!d3_behavior_zoomWheel) {
+ d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+ return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
+ }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+ return d3.event.wheelDelta;
+ }, "mousewheel") : (d3_behavior_zoomDelta = function() {
+ return -d3.event.detail;
+ }, "MozMousePixelScroll");
+ }
+ function zoom(g) {
+ g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted);
+ }
+ zoom.event = function(g) {
+ g.each(function() {
+ var dispatch = event.of(this, arguments), view1 = view;
+ if (d3_transitionInheritId) {
+ d3.select(this).transition().each("start.zoom", function() {
+ view = this.__chart__ || {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ zoomstarted(dispatch);
+ }).tween("zoom:zoom", function() {
+ var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);
+ return function(t) {
+ var l = i(t), k = dx / l[2];
+ this.__chart__ = view = {
+ x: cx - l[0] * k,
+ y: cy - l[1] * k,
+ k: k
+ };
+ zoomed(dispatch);
+ };
+ }).each("interrupt.zoom", function() {
+ zoomended(dispatch);
+ }).each("end.zoom", function() {
+ zoomended(dispatch);
+ });
+ } else {
+ this.__chart__ = view;
+ zoomstarted(dispatch);
+ zoomed(dispatch);
+ zoomended(dispatch);
+ }
+ });
+ };
+ zoom.translate = function(_) {
+ if (!arguments.length) return [ view.x, view.y ];
+ view = {
+ x: +_[0],
+ y: +_[1],
+ k: view.k
+ };
+ rescale();
+ return zoom;
+ };
+ zoom.scale = function(_) {
+ if (!arguments.length) return view.k;
+ view = {
+ x: view.x,
+ y: view.y,
+ k: +_
+ };
+ rescale();
+ return zoom;
+ };
+ zoom.scaleExtent = function(_) {
+ if (!arguments.length) return scaleExtent;
+ scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.center = function(_) {
+ if (!arguments.length) return center;
+ center = _ && [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.size = function(_) {
+ if (!arguments.length) return size;
+ size = _ && [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.duration = function(_) {
+ if (!arguments.length) return duration;
+ duration = +_;
+ return zoom;
+ };
+ zoom.x = function(z) {
+ if (!arguments.length) return x1;
+ x1 = z;
+ x0 = z.copy();
+ view = {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ return zoom;
+ };
+ zoom.y = function(z) {
+ if (!arguments.length) return y1;
+ y1 = z;
+ y0 = z.copy();
+ view = {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ return zoom;
+ };
+ function location(p) {
+ return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];
+ }
+ function point(l) {
+ return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];
+ }
+ function scaleTo(s) {
+ view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
+ }
+ function translateTo(p, l) {
+ l = point(l);
+ view.x += p[0] - l[0];
+ view.y += p[1] - l[1];
+ }
+ function zoomTo(that, p, l, k) {
+ that.__chart__ = {
+ x: view.x,
+ y: view.y,
+ k: view.k
+ };
+ scaleTo(Math.pow(2, k));
+ translateTo(center0 = p, l);
+ that = d3.select(that);
+ if (duration > 0) that = that.transition().duration(duration);
+ that.call(zoom.event);
+ }
+ function rescale() {
+ if (x1) x1.domain(x0.range().map(function(x) {
+ return (x - view.x) / view.k;
+ }).map(x0.invert));
+ if (y1) y1.domain(y0.range().map(function(y) {
+ return (y - view.y) / view.k;
+ }).map(y0.invert));
+ }
+ function zoomstarted(dispatch) {
+ if (!zooming++) dispatch({
+ type: "zoomstart"
+ });
+ }
+ function zoomed(dispatch) {
+ rescale();
+ dispatch({
+ type: "zoom",
+ scale: view.k,
+ translate: [ view.x, view.y ]
+ });
+ }
+ function zoomended(dispatch) {
+ if (!--zooming) dispatch({
+ type: "zoomend"
+ });
+ center0 = null;
+ }
+ function mousedowned() {
+ var that = this, target = d3.event.target, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
+ d3_selection_interrupt.call(that);
+ zoomstarted(dispatch);
+ function moved() {
+ dragged = 1;
+ translateTo(d3.mouse(that), location0);
+ zoomed(dispatch);
+ }
+ function ended() {
+ subject.on(mousemove, null).on(mouseup, null);
+ dragRestore(dragged && d3.event.target === target);
+ zoomended(dispatch);
+ }
+ }
+ function touchstarted() {
+ var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);
+ started();
+ zoomstarted(dispatch);
+ subject.on(mousedown, null).on(touchstart, started);
+ function relocate() {
+ var touches = d3.touches(that);
+ scale0 = view.k;
+ touches.forEach(function(t) {
+ if (t.identifier in locations0) locations0[t.identifier] = location(t);
+ });
+ return touches;
+ }
+ function started() {
+ var target = d3.event.target;
+ d3.select(target).on(touchmove, moved).on(touchend, ended);
+ targets.push(target);
+ var changed = d3.event.changedTouches;
+ for (var i = 0, n = changed.length; i < n; ++i) {
+ locations0[changed[i].identifier] = null;
+ }
+ var touches = relocate(), now = Date.now();
+ if (touches.length === 1) {
+ if (now - touchtime < 500) {
+ var p = touches[0];
+ zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);
+ d3_eventPreventDefault();
+ }
+ touchtime = now;
+ } else if (touches.length > 1) {
+ var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];
+ distance0 = dx * dx + dy * dy;
+ }
+ }
+ function moved() {
+ var touches = d3.touches(that), p0, l0, p1, l1;
+ d3_selection_interrupt.call(that);
+ for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {
+ p1 = touches[i];
+ if (l1 = locations0[p1.identifier]) {
+ if (l0) break;
+ p0 = p1, l0 = l1;
+ }
+ }
+ if (l1) {
+ var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);
+ p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
+ l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
+ scaleTo(scale1 * scale0);
+ }
+ touchtime = null;
+ translateTo(p0, l0);
+ zoomed(dispatch);
+ }
+ function ended() {
+ if (d3.event.touches.length) {
+ var changed = d3.event.changedTouches;
+ for (var i = 0, n = changed.length; i < n; ++i) {
+ delete locations0[changed[i].identifier];
+ }
+ for (var identifier in locations0) {
+ return void relocate();
+ }
+ }
+ d3.selectAll(targets).on(zoomName, null);
+ subject.on(mousedown, mousedowned).on(touchstart, touchstarted);
+ dragRestore();
+ zoomended(dispatch);
+ }
+ }
+ function mousewheeled() {
+ var dispatch = event.of(this, arguments);
+ if (mousewheelTimer) clearTimeout(mousewheelTimer); else translate0 = location(center0 = center || d3.mouse(this)),
+ d3_selection_interrupt.call(this), zoomstarted(dispatch);
+ mousewheelTimer = setTimeout(function() {
+ mousewheelTimer = null;
+ zoomended(dispatch);
+ }, 50);
+ d3_eventPreventDefault();
+ scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);
+ translateTo(center0, translate0);
+ zoomed(dispatch);
+ }
+ function dblclicked() {
+ var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;
+ zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);
+ }
+ return d3.rebind(zoom, event, "on");
+ };
+ var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;
+ d3.color = d3_color;
+ function d3_color() {}
+ d3_color.prototype.toString = function() {
+ return this.rgb() + "";
+ };
+ d3.hsl = d3_hsl;
+ function d3_hsl(h, s, l) {
+ return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);
+ }
+ var d3_hslPrototype = d3_hsl.prototype = new d3_color();
+ d3_hslPrototype.brighter = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_hsl(this.h, this.s, this.l / k);
+ };
+ d3_hslPrototype.darker = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_hsl(this.h, this.s, k * this.l);
+ };
+ d3_hslPrototype.rgb = function() {
+ return d3_hsl_rgb(this.h, this.s, this.l);
+ };
+ function d3_hsl_rgb(h, s, l) {
+ var m1, m2;
+ h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;
+ s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;
+ l = l < 0 ? 0 : l > 1 ? 1 : l;
+ m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
+ m1 = 2 * l - m2;
+ function v(h) {
+ if (h > 360) h -= 360; else if (h < 0) h += 360;
+ if (h < 60) return m1 + (m2 - m1) * h / 60;
+ if (h < 180) return m2;
+ if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
+ return m1;
+ }
+ function vv(h) {
+ return Math.round(v(h) * 255);
+ }
+ return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+ }
+ d3.hcl = d3_hcl;
+ function d3_hcl(h, c, l) {
+ return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);
+ }
+ var d3_hclPrototype = d3_hcl.prototype = new d3_color();
+ d3_hclPrototype.brighter = function(k) {
+ return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
+ };
+ d3_hclPrototype.darker = function(k) {
+ return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
+ };
+ d3_hclPrototype.rgb = function() {
+ return d3_hcl_lab(this.h, this.c, this.l).rgb();
+ };
+ function d3_hcl_lab(h, c, l) {
+ if (isNaN(h)) h = 0;
+ if (isNaN(c)) c = 0;
+ return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
+ }
+ d3.lab = d3_lab;
+ function d3_lab(l, a, b) {
+ return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);
+ }
+ var d3_lab_K = 18;
+ var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
+ var d3_labPrototype = d3_lab.prototype = new d3_color();
+ d3_labPrototype.brighter = function(k) {
+ return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+ };
+ d3_labPrototype.darker = function(k) {
+ return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+ };
+ d3_labPrototype.rgb = function() {
+ return d3_lab_rgb(this.l, this.a, this.b);
+ };
+ function d3_lab_rgb(l, a, b) {
+ var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
+ x = d3_lab_xyz(x) * d3_lab_X;
+ y = d3_lab_xyz(y) * d3_lab_Y;
+ z = d3_lab_xyz(z) * d3_lab_Z;
+ return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
+ }
+ function d3_lab_hcl(l, a, b) {
+ return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);
+ }
+ function d3_lab_xyz(x) {
+ return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
+ }
+ function d3_xyz_lab(x) {
+ return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
+ }
+ function d3_xyz_rgb(r) {
+ return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
+ }
+ d3.rgb = d3_rgb;
+ function d3_rgb(r, g, b) {
+ return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);
+ }
+ function d3_rgbNumber(value) {
+ return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);
+ }
+ function d3_rgbString(value) {
+ return d3_rgbNumber(value) + "";
+ }
+ var d3_rgbPrototype = d3_rgb.prototype = new d3_color();
+ d3_rgbPrototype.brighter = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ var r = this.r, g = this.g, b = this.b, i = 30;
+ if (!r && !g && !b) return new d3_rgb(i, i, i);
+ if (r && r < i) r = i;
+ if (g && g < i) g = i;
+ if (b && b < i) b = i;
+ return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));
+ };
+ d3_rgbPrototype.darker = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_rgb(k * this.r, k * this.g, k * this.b);
+ };
+ d3_rgbPrototype.hsl = function() {
+ return d3_rgb_hsl(this.r, this.g, this.b);
+ };
+ d3_rgbPrototype.toString = function() {
+ return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
+ };
+ function d3_rgb_hex(v) {
+ return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
+ }
+ function d3_rgb_parse(format, rgb, hsl) {
+ var r = 0, g = 0, b = 0, m1, m2, color;
+ m1 = /([a-z]+)\((.*)\)/i.exec(format);
+ if (m1) {
+ m2 = m1[2].split(",");
+ switch (m1[1]) {
+ case "hsl":
+ {
+ return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
+ }
+
+ case "rgb":
+ {
+ return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
+ }
+ }
+ }
+ if (color = d3_rgb_names.get(format.toLowerCase())) {
+ return rgb(color.r, color.g, color.b);
+ }
+ if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) {
+ if (format.length === 4) {
+ r = (color & 3840) >> 4;
+ r = r >> 4 | r;
+ g = color & 240;
+ g = g >> 4 | g;
+ b = color & 15;
+ b = b << 4 | b;
+ } else if (format.length === 7) {
+ r = (color & 16711680) >> 16;
+ g = (color & 65280) >> 8;
+ b = color & 255;
+ }
+ }
+ return rgb(r, g, b);
+ }
+ function d3_rgb_hsl(r, g, b) {
+ var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
+ if (d) {
+ s = l < .5 ? d / (max + min) : d / (2 - max - min);
+ if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
+ h *= 60;
+ } else {
+ h = NaN;
+ s = l > 0 && l < 1 ? 0 : h;
+ }
+ return new d3_hsl(h, s, l);
+ }
+ function d3_rgb_lab(r, g, b) {
+ r = d3_rgb_xyz(r);
+ g = d3_rgb_xyz(g);
+ b = d3_rgb_xyz(b);
+ var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
+ return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
+ }
+ function d3_rgb_xyz(r) {
+ return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
+ }
+ function d3_rgb_parseNumber(c) {
+ var f = parseFloat(c);
+ return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
+ }
+ var d3_rgb_names = d3.map({
+ aliceblue: 15792383,
+ antiquewhite: 16444375,
+ aqua: 65535,
+ aquamarine: 8388564,
+ azure: 15794175,
+ beige: 16119260,
+ bisque: 16770244,
+ black: 0,
+ blanchedalmond: 16772045,
+ blue: 255,
+ blueviolet: 9055202,
+ brown: 10824234,
+ burlywood: 14596231,
+ cadetblue: 6266528,
+ chartreuse: 8388352,
+ chocolate: 13789470,
+ coral: 16744272,
+ cornflowerblue: 6591981,
+ cornsilk: 16775388,
+ crimson: 14423100,
+ cyan: 65535,
+ darkblue: 139,
+ darkcyan: 35723,
+ darkgoldenrod: 12092939,
+ darkgray: 11119017,
+ darkgreen: 25600,
+ darkgrey: 11119017,
+ darkkhaki: 12433259,
+ darkmagenta: 9109643,
+ darkolivegreen: 5597999,
+ darkorange: 16747520,
+ darkorchid: 10040012,
+ darkred: 9109504,
+ darksalmon: 15308410,
+ darkseagreen: 9419919,
+ darkslateblue: 4734347,
+ darkslategray: 3100495,
+ darkslategrey: 3100495,
+ darkturquoise: 52945,
+ darkviolet: 9699539,
+ deeppink: 16716947,
+ deepskyblue: 49151,
+ dimgray: 6908265,
+ dimgrey: 6908265,
+ dodgerblue: 2003199,
+ firebrick: 11674146,
+ floralwhite: 16775920,
+ forestgreen: 2263842,
+ fuchsia: 16711935,
+ gainsboro: 14474460,
+ ghostwhite: 16316671,
+ gold: 16766720,
+ goldenrod: 14329120,
+ gray: 8421504,
+ green: 32768,
+ greenyellow: 11403055,
+ grey: 8421504,
+ honeydew: 15794160,
+ hotpink: 16738740,
+ indianred: 13458524,
+ indigo: 4915330,
+ ivory: 16777200,
+ khaki: 15787660,
+ lavender: 15132410,
+ lavenderblush: 16773365,
+ lawngreen: 8190976,
+ lemonchiffon: 16775885,
+ lightblue: 11393254,
+ lightcoral: 15761536,
+ lightcyan: 14745599,
+ lightgoldenrodyellow: 16448210,
+ lightgray: 13882323,
+ lightgreen: 9498256,
+ lightgrey: 13882323,
+ lightpink: 16758465,
+ lightsalmon: 16752762,
+ lightseagreen: 2142890,
+ lightskyblue: 8900346,
+ lightslategray: 7833753,
+ lightslategrey: 7833753,
+ lightsteelblue: 11584734,
+ lightyellow: 16777184,
+ lime: 65280,
+ limegreen: 3329330,
+ linen: 16445670,
+ magenta: 16711935,
+ maroon: 8388608,
+ mediumaquamarine: 6737322,
+ mediumblue: 205,
+ mediumorchid: 12211667,
+ mediumpurple: 9662683,
+ mediumseagreen: 3978097,
+ mediumslateblue: 8087790,
+ mediumspringgreen: 64154,
+ mediumturquoise: 4772300,
+ mediumvioletred: 13047173,
+ midnightblue: 1644912,
+ mintcream: 16121850,
+ mistyrose: 16770273,
+ moccasin: 16770229,
+ navajowhite: 16768685,
+ navy: 128,
+ oldlace: 16643558,
+ olive: 8421376,
+ olivedrab: 7048739,
+ orange: 16753920,
+ orangered: 16729344,
+ orchid: 14315734,
+ palegoldenrod: 15657130,
+ palegreen: 10025880,
+ paleturquoise: 11529966,
+ palevioletred: 14381203,
+ papayawhip: 16773077,
+ peachpuff: 16767673,
+ peru: 13468991,
+ pink: 16761035,
+ plum: 14524637,
+ powderblue: 11591910,
+ purple: 8388736,
+ rebeccapurple: 6697881,
+ red: 16711680,
+ rosybrown: 12357519,
+ royalblue: 4286945,
+ saddlebrown: 9127187,
+ salmon: 16416882,
+ sandybrown: 16032864,
+ seagreen: 3050327,
+ seashell: 16774638,
+ sienna: 10506797,
+ silver: 12632256,
+ skyblue: 8900331,
+ slateblue: 6970061,
+ slategray: 7372944,
+ slategrey: 7372944,
+ snow: 16775930,
+ springgreen: 65407,
+ steelblue: 4620980,
+ tan: 13808780,
+ teal: 32896,
+ thistle: 14204888,
+ tomato: 16737095,
+ turquoise: 4251856,
+ violet: 15631086,
+ wheat: 16113331,
+ white: 16777215,
+ whitesmoke: 16119285,
+ yellow: 16776960,
+ yellowgreen: 10145074
+ });
+ d3_rgb_names.forEach(function(key, value) {
+ d3_rgb_names.set(key, d3_rgbNumber(value));
+ });
+ function d3_functor(v) {
+ return typeof v === "function" ? v : function() {
+ return v;
+ };
+ }
+ d3.functor = d3_functor;
+ d3.xhr = d3_xhrType(d3_identity);
+ function d3_xhrType(response) {
+ return function(url, mimeType, callback) {
+ if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType,
+ mimeType = null;
+ return d3_xhr(url, mimeType, response, callback);
+ };
+ }
+ function d3_xhr(url, mimeType, response, callback) {
+ var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
+ if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
+ "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
+ request.readyState > 3 && respond();
+ };
+ function respond() {
+ var status = request.status, result;
+ if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {
+ try {
+ result = response.call(xhr, request);
+ } catch (e) {
+ dispatch.error.call(xhr, e);
+ return;
+ }
+ dispatch.load.call(xhr, result);
+ } else {
+ dispatch.error.call(xhr, request);
+ }
+ }
+ request.onprogress = function(event) {
+ var o = d3.event;
+ d3.event = event;
+ try {
+ dispatch.progress.call(xhr, request);
+ } finally {
+ d3.event = o;
+ }
+ };
+ xhr.header = function(name, value) {
+ name = (name + "").toLowerCase();
+ if (arguments.length < 2) return headers[name];
+ if (value == null) delete headers[name]; else headers[name] = value + "";
+ return xhr;
+ };
+ xhr.mimeType = function(value) {
+ if (!arguments.length) return mimeType;
+ mimeType = value == null ? null : value + "";
+ return xhr;
+ };
+ xhr.responseType = function(value) {
+ if (!arguments.length) return responseType;
+ responseType = value;
+ return xhr;
+ };
+ xhr.response = function(value) {
+ response = value;
+ return xhr;
+ };
+ [ "get", "post" ].forEach(function(method) {
+ xhr[method] = function() {
+ return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));
+ };
+ });
+ xhr.send = function(method, data, callback) {
+ if (arguments.length === 2 && typeof data === "function") callback = data, data = null;
+ request.open(method, url, true);
+ if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*";
+ if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);
+ if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);
+ if (responseType != null) request.responseType = responseType;
+ if (callback != null) xhr.on("error", callback).on("load", function(request) {
+ callback(null, request);
+ });
+ dispatch.beforesend.call(xhr, request);
+ request.send(data == null ? null : data);
+ return xhr;
+ };
+ xhr.abort = function() {
+ request.abort();
+ return xhr;
+ };
+ d3.rebind(xhr, dispatch, "on");
+ return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));
+ }
+ function d3_xhr_fixCallback(callback) {
+ return callback.length === 1 ? function(error, request) {
+ callback(error == null ? request : null);
+ } : callback;
+ }
+ function d3_xhrHasResponse(request) {
+ var type = request.responseType;
+ return type && type !== "text" ? request.response : request.responseText;
+ }
+ d3.dsv = function(delimiter, mimeType) {
+ var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
+ function dsv(url, row, callback) {
+ if (arguments.length < 3) callback = row, row = null;
+ var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
+ xhr.row = function(_) {
+ return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;
+ };
+ return xhr;
+ }
+ function response(request) {
+ return dsv.parse(request.responseText);
+ }
+ function typedResponse(f) {
+ return function(request) {
+ return dsv.parse(request.responseText, f);
+ };
+ }
+ dsv.parse = function(text, f) {
+ var o;
+ return dsv.parseRows(text, function(row, i) {
+ if (o) return o(row, i - 1);
+ var a = new Function("d", "return {" + row.map(function(name, i) {
+ return JSON.stringify(name) + ": d[" + i + "]";
+ }).join(",") + "}");
+ o = f ? function(row, i) {
+ return f(a(row), i);
+ } : a;
+ });
+ };
+ dsv.parseRows = function(text, f) {
+ var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
+ function token() {
+ if (I >= N) return EOF;
+ if (eol) return eol = false, EOL;
+ var j = I;
+ if (text.charCodeAt(j) === 34) {
+ var i = j;
+ while (i++ < N) {
+ if (text.charCodeAt(i) === 34) {
+ if (text.charCodeAt(i + 1) !== 34) break;
+ ++i;
+ }
+ }
+ I = i + 2;
+ var c = text.charCodeAt(i + 1);
+ if (c === 13) {
+ eol = true;
+ if (text.charCodeAt(i + 2) === 10) ++I;
+ } else if (c === 10) {
+ eol = true;
+ }
+ return text.slice(j + 1, i).replace(/""/g, '"');
+ }
+ while (I < N) {
+ var c = text.charCodeAt(I++), k = 1;
+ if (c === 10) eol = true; else if (c === 13) {
+ eol = true;
+ if (text.charCodeAt(I) === 10) ++I, ++k;
+ } else if (c !== delimiterCode) continue;
+ return text.slice(j, I - k);
+ }
+ return text.slice(j);
+ }
+ while ((t = token()) !== EOF) {
+ var a = [];
+ while (t !== EOL && t !== EOF) {
+ a.push(t);
+ t = token();
+ }
+ if (f && (a = f(a, n++)) == null) continue;
+ rows.push(a);
+ }
+ return rows;
+ };
+ dsv.format = function(rows) {
+ if (Array.isArray(rows[0])) return dsv.formatRows(rows);
+ var fieldSet = new d3_Set(), fields = [];
+ rows.forEach(function(row) {
+ for (var field in row) {
+ if (!fieldSet.has(field)) {
+ fields.push(fieldSet.add(field));
+ }
+ }
+ });
+ return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {
+ return fields.map(function(field) {
+ return formatValue(row[field]);
+ }).join(delimiter);
+ })).join("\n");
+ };
+ dsv.formatRows = function(rows) {
+ return rows.map(formatRow).join("\n");
+ };
+ function formatRow(row) {
+ return row.map(formatValue).join(delimiter);
+ }
+ function formatValue(text) {
+ return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
+ }
+ return dsv;
+ };
+ d3.csv = d3.dsv(",", "text/csv");
+ d3.tsv = d3.dsv(" ", "text/tab-separated-values");
+ var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) {
+ setTimeout(callback, 17);
+ };
+ d3.timer = function(callback, delay, then) {
+ var n = arguments.length;
+ if (n < 2) delay = 0;
+ if (n < 3) then = Date.now();
+ var time = then + delay, timer = {
+ c: callback,
+ t: time,
+ f: false,
+ n: null
+ };
+ if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;
+ d3_timer_queueTail = timer;
+ if (!d3_timer_interval) {
+ d3_timer_timeout = clearTimeout(d3_timer_timeout);
+ d3_timer_interval = 1;
+ d3_timer_frame(d3_timer_step);
+ }
+ };
+ function d3_timer_step() {
+ var now = d3_timer_mark(), delay = d3_timer_sweep() - now;
+ if (delay > 24) {
+ if (isFinite(delay)) {
+ clearTimeout(d3_timer_timeout);
+ d3_timer_timeout = setTimeout(d3_timer_step, delay);
+ }
+ d3_timer_interval = 0;
+ } else {
+ d3_timer_interval = 1;
+ d3_timer_frame(d3_timer_step);
+ }
+ }
+ d3.timer.flush = function() {
+ d3_timer_mark();
+ d3_timer_sweep();
+ };
+ function d3_timer_mark() {
+ var now = Date.now();
+ d3_timer_active = d3_timer_queueHead;
+ while (d3_timer_active) {
+ if (now >= d3_timer_active.t) d3_timer_active.f = d3_timer_active.c(now - d3_timer_active.t);
+ d3_timer_active = d3_timer_active.n;
+ }
+ return now;
+ }
+ function d3_timer_sweep() {
+ var t0, t1 = d3_timer_queueHead, time = Infinity;
+ while (t1) {
+ if (t1.f) {
+ t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;
+ } else {
+ if (t1.t < time) time = t1.t;
+ t1 = (t0 = t1).n;
+ }
+ }
+ d3_timer_queueTail = t0;
+ return time;
+ }
+ function d3_format_precision(x, p) {
+ return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);
+ }
+ d3.round = function(x, n) {
+ return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
+ };
+ var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
+ d3.formatPrefix = function(value, precision) {
+ var i = 0;
+ if (value) {
+ if (value < 0) value *= -1;
+ if (precision) value = d3.round(value, d3_format_precision(value, precision));
+ i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
+ i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));
+ }
+ return d3_formatPrefixes[8 + i / 3];
+ };
+ function d3_formatPrefix(d, i) {
+ var k = Math.pow(10, abs(8 - i) * 3);
+ return {
+ scale: i > 8 ? function(d) {
+ return d / k;
+ } : function(d) {
+ return d * k;
+ },
+ symbol: d
+ };
+ }
+ function d3_locale_numberFormat(locale) {
+ var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {
+ var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;
+ while (i > 0 && g > 0) {
+ if (length + g + 1 > width) g = Math.max(1, width - length);
+ t.push(value.substring(i -= g, i + g));
+ if ((length += g + 1) > width) break;
+ g = locale_grouping[j = (j + 1) % locale_grouping.length];
+ }
+ return t.reverse().join(locale_thousands);
+ } : d3_identity;
+ return function(specifier) {
+ var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "-", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = "", suffix = "", integer = false, exponent = true;
+ if (precision) precision = +precision.substring(1);
+ if (zfill || fill === "0" && align === "=") {
+ zfill = fill = "0";
+ align = "=";
+ }
+ switch (type) {
+ case "n":
+ comma = true;
+ type = "g";
+ break;
+
+ case "%":
+ scale = 100;
+ suffix = "%";
+ type = "f";
+ break;
+
+ case "p":
+ scale = 100;
+ suffix = "%";
+ type = "r";
+ break;
+
+ case "b":
+ case "o":
+ case "x":
+ case "X":
+ if (symbol === "#") prefix = "0" + type.toLowerCase();
+
+ case "c":
+ exponent = false;
+
+ case "d":
+ integer = true;
+ precision = 0;
+ break;
+
+ case "s":
+ scale = -1;
+ type = "r";
+ break;
+ }
+ if (symbol === "$") prefix = locale_currency[0], suffix = locale_currency[1];
+ if (type == "r" && !precision) type = "g";
+ if (precision != null) {
+ if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision));
+ }
+ type = d3_format_types.get(type) || d3_format_typeDefault;
+ var zcomma = zfill && comma;
+ return function(value) {
+ var fullSuffix = suffix;
+ if (integer && value % 1) return "";
+ var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign === "-" ? "" : sign;
+ if (scale < 0) {
+ var unit = d3.formatPrefix(value, precision);
+ value = unit.scale(value);
+ fullSuffix = unit.symbol + suffix;
+ } else {
+ value *= scale;
+ }
+ value = type(value, precision);
+ var i = value.lastIndexOf("."), before, after;
+ if (i < 0) {
+ var j = exponent ? value.lastIndexOf("e") : -1;
+ if (j < 0) before = value, after = ""; else before = value.substring(0, j), after = value.substring(j);
+ } else {
+ before = value.substring(0, i);
+ after = locale_decimal + value.substring(i + 1);
+ }
+ if (!zfill && comma) before = formatGroup(before, Infinity);
+ var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : "";
+ if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);
+ negative += prefix;
+ value = before + after;
+ return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;
+ };
+ };
+ }
+ var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;
+ var d3_format_types = d3.map({
+ b: function(x) {
+ return x.toString(2);
+ },
+ c: function(x) {
+ return String.fromCharCode(x);
+ },
+ o: function(x) {
+ return x.toString(8);
+ },
+ x: function(x) {
+ return x.toString(16);
+ },
+ X: function(x) {
+ return x.toString(16).toUpperCase();
+ },
+ g: function(x, p) {
+ return x.toPrecision(p);
+ },
+ e: function(x, p) {
+ return x.toExponential(p);
+ },
+ f: function(x, p) {
+ return x.toFixed(p);
+ },
+ r: function(x, p) {
+ return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));
+ }
+ });
+ function d3_format_typeDefault(x) {
+ return x + "";
+ }
+ var d3_time = d3.time = {}, d3_date = Date;
+ function d3_date_utc() {
+ this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
+ }
+ d3_date_utc.prototype = {
+ getDate: function() {
+ return this._.getUTCDate();
+ },
+ getDay: function() {
+ return this._.getUTCDay();
+ },
+ getFullYear: function() {
+ return this._.getUTCFullYear();
+ },
+ getHours: function() {
+ return this._.getUTCHours();
+ },
+ getMilliseconds: function() {
+ return this._.getUTCMilliseconds();
+ },
+ getMinutes: function() {
+ return this._.getUTCMinutes();
+ },
+ getMonth: function() {
+ return this._.getUTCMonth();
+ },
+ getSeconds: function() {
+ return this._.getUTCSeconds();
+ },
+ getTime: function() {
+ return this._.getTime();
+ },
+ getTimezoneOffset: function() {
+ return 0;
+ },
+ valueOf: function() {
+ return this._.valueOf();
+ },
+ setDate: function() {
+ d3_time_prototype.setUTCDate.apply(this._, arguments);
+ },
+ setDay: function() {
+ d3_time_prototype.setUTCDay.apply(this._, arguments);
+ },
+ setFullYear: function() {
+ d3_time_prototype.setUTCFullYear.apply(this._, arguments);
+ },
+ setHours: function() {
+ d3_time_prototype.setUTCHours.apply(this._, arguments);
+ },
+ setMilliseconds: function() {
+ d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
+ },
+ setMinutes: function() {
+ d3_time_prototype.setUTCMinutes.apply(this._, arguments);
+ },
+ setMonth: function() {
+ d3_time_prototype.setUTCMonth.apply(this._, arguments);
+ },
+ setSeconds: function() {
+ d3_time_prototype.setUTCSeconds.apply(this._, arguments);
+ },
+ setTime: function() {
+ d3_time_prototype.setTime.apply(this._, arguments);
+ }
+ };
+ var d3_time_prototype = Date.prototype;
+ function d3_time_interval(local, step, number) {
+ function round(date) {
+ var d0 = local(date), d1 = offset(d0, 1);
+ return date - d0 < d1 - date ? d0 : d1;
+ }
+ function ceil(date) {
+ step(date = local(new d3_date(date - 1)), 1);
+ return date;
+ }
+ function offset(date, k) {
+ step(date = new d3_date(+date), k);
+ return date;
+ }
+ function range(t0, t1, dt) {
+ var time = ceil(t0), times = [];
+ if (dt > 1) {
+ while (time < t1) {
+ if (!(number(time) % dt)) times.push(new Date(+time));
+ step(time, 1);
+ }
+ } else {
+ while (time < t1) times.push(new Date(+time)), step(time, 1);
+ }
+ return times;
+ }
+ function range_utc(t0, t1, dt) {
+ try {
+ d3_date = d3_date_utc;
+ var utc = new d3_date_utc();
+ utc._ = t0;
+ return range(utc, t1, dt);
+ } finally {
+ d3_date = Date;
+ }
+ }
+ local.floor = local;
+ local.round = round;
+ local.ceil = ceil;
+ local.offset = offset;
+ local.range = range;
+ var utc = local.utc = d3_time_interval_utc(local);
+ utc.floor = utc;
+ utc.round = d3_time_interval_utc(round);
+ utc.ceil = d3_time_interval_utc(ceil);
+ utc.offset = d3_time_interval_utc(offset);
+ utc.range = range_utc;
+ return local;
+ }
+ function d3_time_interval_utc(method) {
+ return function(date, k) {
+ try {
+ d3_date = d3_date_utc;
+ var utc = new d3_date_utc();
+ utc._ = date;
+ return method(utc, k)._;
+ } finally {
+ d3_date = Date;
+ }
+ };
+ }
+ d3_time.year = d3_time_interval(function(date) {
+ date = d3_time.day(date);
+ date.setMonth(0, 1);
+ return date;
+ }, function(date, offset) {
+ date.setFullYear(date.getFullYear() + offset);
+ }, function(date) {
+ return date.getFullYear();
+ });
+ d3_time.years = d3_time.year.range;
+ d3_time.years.utc = d3_time.year.utc.range;
+ d3_time.day = d3_time_interval(function(date) {
+ var day = new d3_date(2e3, 0);
+ day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
+ return day;
+ }, function(date, offset) {
+ date.setDate(date.getDate() + offset);
+ }, function(date) {
+ return date.getDate() - 1;
+ });
+ d3_time.days = d3_time.day.range;
+ d3_time.days.utc = d3_time.day.utc.range;
+ d3_time.dayOfYear = function(date) {
+ var year = d3_time.year(date);
+ return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
+ };
+ [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ].forEach(function(day, i) {
+ i = 7 - i;
+ var interval = d3_time[day] = d3_time_interval(function(date) {
+ (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
+ return date;
+ }, function(date, offset) {
+ date.setDate(date.getDate() + Math.floor(offset) * 7);
+ }, function(date) {
+ var day = d3_time.year(date).getDay();
+ return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
+ });
+ d3_time[day + "s"] = interval.range;
+ d3_time[day + "s"].utc = interval.utc.range;
+ d3_time[day + "OfYear"] = function(date) {
+ var day = d3_time.year(date).getDay();
+ return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);
+ };
+ });
+ d3_time.week = d3_time.sunday;
+ d3_time.weeks = d3_time.sunday.range;
+ d3_time.weeks.utc = d3_time.sunday.utc.range;
+ d3_time.weekOfYear = d3_time.sundayOfYear;
+ function d3_locale_timeFormat(locale) {
+ var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
+ function d3_time_format(template) {
+ var n = template.length;
+ function format(date) {
+ var string = [], i = -1, j = 0, c, p, f;
+ while (++i < n) {
+ if (template.charCodeAt(i) === 37) {
+ string.push(template.slice(j, i));
+ if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
+ if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
+ string.push(c);
+ j = i + 1;
+ }
+ }
+ string.push(template.slice(j, i));
+ return string.join("");
+ }
+ format.parse = function(string) {
+ var d = {
+ y: 1900,
+ m: 0,
+ d: 1,
+ H: 0,
+ M: 0,
+ S: 0,
+ L: 0,
+ Z: null
+ }, i = d3_time_parse(d, template, string, 0);
+ if (i != string.length) return null;
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
+ var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();
+ if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("w" in d && ("W" in d || "U" in d)) {
+ date.setFullYear(d.y, 0, 1);
+ date.se
<TRUNCATED>
[24/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.js b/htrace-core/src/web/lib/rome-2.1.0/rome.js
deleted file mode 100644
index f0b0b86..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.js
+++ /dev/null
@@ -1,4796 +0,0 @@
-/**
- * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
- * @version v2.1.0
- * @link https://github.com/bevacqua/rome
- * @license MIT
- */
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.rome=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- var source = ev.source;
- if ((source === window || source === null) && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-
-// TODO(shtylman)
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},{}],2:[function(_dereq_,module,exports){
-module.exports = _dereq_('./src/contra.emitter.js');
-
-},{"./src/contra.emitter.js":3}],3:[function(_dereq_,module,exports){
-(function (process){
-(function (root, undefined) {
- 'use strict';
-
- var undef = '' + undefined;
- function atoa (a, n) { return Array.prototype.slice.call(a, n); }
- function debounce (fn, args, ctx) { if (!fn) { return; } tick(function run () { fn.apply(ctx || null, args || []); }); }
-
- // cross-platform ticker
- var si = typeof setImmediate === 'function', tick;
- if (si) {
- tick = function (fn) { setImmediate(fn); };
- } else if (typeof process !== undef && process.nextTick) {
- tick = process.nextTick;
- } else {
- tick = function (fn) { setTimeout(fn, 0); };
- }
-
- function _emitter (thing, options) {
- var opts = options || {};
- var evt = {};
- if (thing === undefined) { thing = {}; }
- thing.on = function (type, fn) {
- if (!evt[type]) {
- evt[type] = [fn];
- } else {
- evt[type].push(fn);
- }
- return thing;
- };
- thing.once = function (type, fn) {
- fn._once = true; // thing.off(fn) still works!
- thing.on(type, fn);
- return thing;
- };
- thing.off = function (type, fn) {
- var c = arguments.length;
- if (c === 1) {
- delete evt[type];
- } else if (c === 0) {
- evt = {};
- } else {
- var et = evt[type];
- if (!et) { return thing; }
- et.splice(et.indexOf(fn), 1);
- }
- return thing;
- };
- thing.emit = function () {
- var args = atoa(arguments);
- return thing.emitterSnapshot(args.shift()).apply(this, args);
- };
- thing.emitterSnapshot = function (type) {
- var et = (evt[type] || []).slice(0);
- return function () {
- var args = atoa(arguments);
- var ctx = this || thing;
- if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
- evt[type] = et.filter(function emitter (listen) {
- if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
- return !listen._once;
- });
- return thing;
- };
- }
- return thing;
- }
-
- // cross-platform export
- if (typeof module !== undef && module.exports) {
- module.exports = _emitter;
- } else {
- root.contra = root.contra || {};
- root.contra.emitter = _emitter;
- }
-})(this);
-
-}).call(this,_dereq_("FWaASH"))
-},{"FWaASH":1}],4:[function(_dereq_,module,exports){
-(function (global){
-//! moment.js
-//! version : 2.8.4
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
-
-(function (undefined) {
- /************************************
- Constants
- ************************************/
-
- var moment,
- VERSION = '2.8.4',
- // the global-scope this is NOT the global object in Node.js
- globalScope = typeof global !== 'undefined' ? global : this,
- oldGlobalMoment,
- round = Math.round,
- hasOwnProperty = Object.prototype.hasOwnProperty,
- i,
-
- YEAR = 0,
- MONTH = 1,
- DATE = 2,
- HOUR = 3,
- MINUTE = 4,
- SECOND = 5,
- MILLISECOND = 6,
-
- // internal storage for locale config files
- locales = {},
-
- // extra moment internal properties (plugins register props here)
- momentProperties = [],
-
- // check for nodeJS
- hasModule = (typeof module !== 'undefined' && module && module.exports),
-
- // ASP.NET json date format regex
- aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
- aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
-
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
-
- // format tokens
- formattingTokens = /(\[[^\[]*\])|(\\)?(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,
- localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
-
- // parsing token regexes
- parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
- parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
- parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
- parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
- parseTokenDigits = /\d+/, // nonzero number of digits
- parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
- parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
- parseTokenT = /T/i, // T (ISO separator)
- parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123
- parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
-
- //strict parsing regexes
- parseTokenOneDigit = /\d/, // 0 - 9
- parseTokenTwoDigits = /\d\d/, // 00 - 99
- parseTokenThreeDigits = /\d{3}/, // 000 - 999
- parseTokenFourDigits = /\d{4}/, // 0000 - 9999
- parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
- parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
-
- // iso 8601 regex
- // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
- isoRegex = /^\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)?)?$/,
-
- isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
-
- isoDates = [
- ['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}/]
- ],
-
- // iso time formats and regexes
- isoTimes = [
- ['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/]
- ],
-
- // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30']
- parseTimezoneChunker = /([\+\-]|\d\d)/gi,
-
- // getter and setter names
- proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
- unitMillisecondFactors = {
- 'Milliseconds' : 1,
- 'Seconds' : 1e3,
- 'Minutes' : 6e4,
- 'Hours' : 36e5,
- 'Days' : 864e5,
- 'Months' : 2592e6,
- 'Years' : 31536e6
- },
-
- unitAliases = {
- 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'
- },
-
- camelFunctions = {
- dayofyear : 'dayOfYear',
- isoweekday : 'isoWeekday',
- isoweek : 'isoWeek',
- weekyear : 'weekYear',
- isoweekyear : 'isoWeekYear'
- },
-
- // format function strings
- formatFunctions = {},
-
- // default relative time thresholds
- relativeTimeThresholds = {
- s: 45, // seconds to minute
- m: 45, // minutes to hour
- h: 22, // hours to day
- d: 26, // days to month
- M: 11 // months to year
- },
-
- // tokens to ordinalize and pad
- ordinalizeTokens = 'DDD w W M D d'.split(' '),
- paddedTokens = 'M D H h m s w W'.split(' '),
-
- formatTokenFunctions = {
- M : function () {
- return this.month() + 1;
- },
- MMM : function (format) {
- return this.localeData().monthsShort(this, format);
- },
- MMMM : function (format) {
- return this.localeData().months(this, format);
- },
- D : function () {
- return this.date();
- },
- DDD : function () {
- return this.dayOfYear();
- },
- d : function () {
- return this.day();
- },
- dd : function (format) {
- return this.localeData().weekdaysMin(this, format);
- },
- ddd : function (format) {
- return this.localeData().weekdaysShort(this, format);
- },
- dddd : function (format) {
- return this.localeData().weekdays(this, format);
- },
- w : function () {
- return this.week();
- },
- W : function () {
- return this.isoWeek();
- },
- YY : function () {
- return leftZeroFill(this.year() % 100, 2);
- },
- YYYY : function () {
- return leftZeroFill(this.year(), 4);
- },
- YYYYY : function () {
- return leftZeroFill(this.year(), 5);
- },
- YYYYYY : function () {
- var y = this.year(), sign = y >= 0 ? '+' : '-';
- return sign + leftZeroFill(Math.abs(y), 6);
- },
- gg : function () {
- return leftZeroFill(this.weekYear() % 100, 2);
- },
- gggg : function () {
- return leftZeroFill(this.weekYear(), 4);
- },
- ggggg : function () {
- return leftZeroFill(this.weekYear(), 5);
- },
- GG : function () {
- return leftZeroFill(this.isoWeekYear() % 100, 2);
- },
- GGGG : function () {
- return leftZeroFill(this.isoWeekYear(), 4);
- },
- GGGGG : function () {
- return leftZeroFill(this.isoWeekYear(), 5);
- },
- e : function () {
- return this.weekday();
- },
- E : function () {
- return this.isoWeekday();
- },
- a : function () {
- return this.localeData().meridiem(this.hours(), this.minutes(), true);
- },
- A : function () {
- return this.localeData().meridiem(this.hours(), this.minutes(), false);
- },
- 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 toInt(this.milliseconds() / 100);
- },
- SS : function () {
- return leftZeroFill(toInt(this.milliseconds() / 10), 2);
- },
- SSS : function () {
- return leftZeroFill(this.milliseconds(), 3);
- },
- SSSS : function () {
- return leftZeroFill(this.milliseconds(), 3);
- },
- Z : function () {
- var a = -this.zone(),
- b = '+';
- if (a < 0) {
- a = -a;
- b = '-';
- }
- return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2);
- },
- ZZ : function () {
- var a = -this.zone(),
- b = '+';
- if (a < 0) {
- a = -a;
- b = '-';
- }
- return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 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();
- }
- },
-
- deprecations = {},
-
- lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
-
- // Pick the first defined of two or three arguments. dfl comes from
- // default.
- function dfl(a, b, c) {
- switch (arguments.length) {
- case 2: return a != null ? a : b;
- case 3: return a != null ? a : b != null ? b : c;
- default: throw new Error('Implement me');
- }
- }
-
- function hasOwnProp(a, b) {
- return hasOwnProperty.call(a, b);
- }
-
- function defaultParsingFlags() {
- // We need to deep clone this object, and es5 standard is not very
- // helpful.
- return {
- empty : false,
- unusedTokens : [],
- unusedInput : [],
- overflow : -2,
- charsLeftOver : 0,
- nullInput : false,
- invalidMonth : null,
- invalidFormat : false,
- userInvalidated : false,
- iso: false
- };
- }
-
- function printMsg(msg) {
- if (moment.suppressDeprecationWarnings === false &&
- typeof console !== 'undefined' && console.warn) {
- console.warn('Deprecation warning: ' + msg);
- }
- }
-
- function deprecate(msg, fn) {
- var firstTime = true;
- return extend(function () {
- if (firstTime) {
- printMsg(msg);
- firstTime = false;
- }
- return fn.apply(this, arguments);
- }, fn);
- }
-
- function deprecateSimple(name, msg) {
- if (!deprecations[name]) {
- printMsg(msg);
- deprecations[name] = true;
- }
- }
-
- function padToken(func, count) {
- return function (a) {
- return leftZeroFill(func.call(this, a), count);
- };
- }
- function ordinalizeToken(func, period) {
- return function (a) {
- return this.localeData().ordinal(func.call(this, a), period);
- };
- }
-
- while (ordinalizeTokens.length) {
- i = ordinalizeTokens.pop();
- formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
- }
- while (paddedTokens.length) {
- i = paddedTokens.pop();
- formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
- }
- formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
-
-
- /************************************
- Constructors
- ************************************/
-
- function Locale() {
- }
-
- // Moment prototype object
- function Moment(config, skipOverflow) {
- if (skipOverflow !== false) {
- checkOverflow(config);
- }
- copyConfig(this, config);
- this._d = new Date(+config._d);
- }
-
- // Duration Constructor
- function Duration(duration) {
- var normalizedInput = normalizeObjectUnits(duration),
- years = normalizedInput.year || 0,
- quarters = normalizedInput.quarter || 0,
- months = normalizedInput.month || 0,
- weeks = normalizedInput.week || 0,
- days = normalizedInput.day || 0,
- hours = normalizedInput.hour || 0,
- minutes = normalizedInput.minute || 0,
- seconds = normalizedInput.second || 0,
- milliseconds = normalizedInput.millisecond || 0;
-
- // representation for dateAddRemove
- this._milliseconds = +milliseconds +
- seconds * 1e3 + // 1000
- minutes * 6e4 + // 1000 * 60
- hours * 36e5; // 1000 * 60 * 60
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days +
- weeks * 7;
- // It is impossible translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months +
- quarters * 3 +
- years * 12;
-
- this._data = {};
-
- this._locale = moment.localeData();
-
- this._bubble();
- }
-
- /************************************
- Helpers
- ************************************/
-
-
- function extend(a, b) {
- for (var i in b) {
- if (hasOwnProp(b, i)) {
- a[i] = b[i];
- }
- }
-
- if (hasOwnProp(b, 'toString')) {
- a.toString = b.toString;
- }
-
- if (hasOwnProp(b, 'valueOf')) {
- a.valueOf = b.valueOf;
- }
-
- return a;
- }
-
- function copyConfig(to, from) {
- var i, prop, val;
-
- if (typeof from._isAMomentObject !== 'undefined') {
- to._isAMomentObject = from._isAMomentObject;
- }
- if (typeof from._i !== 'undefined') {
- to._i = from._i;
- }
- if (typeof from._f !== 'undefined') {
- to._f = from._f;
- }
- if (typeof from._l !== 'undefined') {
- to._l = from._l;
- }
- if (typeof from._strict !== 'undefined') {
- to._strict = from._strict;
- }
- if (typeof from._tzm !== 'undefined') {
- to._tzm = from._tzm;
- }
- if (typeof from._isUTC !== 'undefined') {
- to._isUTC = from._isUTC;
- }
- if (typeof from._offset !== 'undefined') {
- to._offset = from._offset;
- }
- if (typeof from._pf !== 'undefined') {
- to._pf = from._pf;
- }
- if (typeof from._locale !== 'undefined') {
- to._locale = from._locale;
- }
-
- if (momentProperties.length > 0) {
- for (i in momentProperties) {
- prop = momentProperties[i];
- val = from[prop];
- if (typeof val !== 'undefined') {
- to[prop] = val;
- }
- }
- }
-
- return to;
- }
-
- function absRound(number) {
- if (number < 0) {
- return Math.ceil(number);
- } else {
- return Math.floor(number);
- }
- }
-
- // left zero fill a number
- // see http://jsperf.com/left-zero-filling for performance comparison
- function leftZeroFill(number, targetLength, forceSign) {
- var output = '' + Math.abs(number),
- sign = number >= 0;
-
- while (output.length < targetLength) {
- output = '0' + output;
- }
- return (sign ? (forceSign ? '+' : '') : '-') + output;
- }
-
- function positiveMomentsDifference(base, other) {
- var res = {milliseconds: 0, months: 0};
-
- res.months = other.month() - base.month() +
- (other.year() - base.year()) * 12;
- if (base.clone().add(res.months, 'M').isAfter(other)) {
- --res.months;
- }
-
- res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
-
- return res;
- }
-
- function momentsDifference(base, other) {
- var res;
- other = makeAs(other, base);
- if (base.isBefore(other)) {
- res = positiveMomentsDifference(base, other);
- } else {
- res = positiveMomentsDifference(other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
-
- return res;
- }
-
- // TODO: remove 'name' arg after deprecation is removed
- function createAdder(direction, name) {
- return function (val, period) {
- var dur, tmp;
- //invert the arguments, but complain about it
- if (period !== null && !isNaN(+period)) {
- deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
- tmp = val; val = period; period = tmp;
- }
-
- val = typeof val === 'string' ? +val : val;
- dur = moment.duration(val, period);
- addOrSubtractDurationFromMoment(this, dur, direction);
- return this;
- };
- }
-
- function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) {
- var milliseconds = duration._milliseconds,
- days = duration._days,
- months = duration._months;
- updateOffset = updateOffset == null ? true : updateOffset;
-
- if (milliseconds) {
- mom._d.setTime(+mom._d + milliseconds * isAdding);
- }
- if (days) {
- rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding);
- }
- if (months) {
- rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding);
- }
- if (updateOffset) {
- moment.updateOffset(mom, days || months);
- }
- }
-
- // check if is an array
- function isArray(input) {
- return Object.prototype.toString.call(input) === '[object Array]';
- }
-
- function isDate(input) {
- return Object.prototype.toString.call(input) === '[object Date]' ||
- input instanceof Date;
- }
-
- // compare two arrays, return the number of differences
- function compareArrays(array1, array2, dontConvert) {
- var len = Math.min(array1.length, array2.length),
- lengthDiff = Math.abs(array1.length - array2.length),
- diffs = 0,
- i;
- for (i = 0; i < len; i++) {
- if ((dontConvert && array1[i] !== array2[i]) ||
- (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
- diffs++;
- }
- }
- return diffs + lengthDiff;
- }
-
- function normalizeUnits(units) {
- if (units) {
- var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
- units = unitAliases[units] || camelFunctions[lowered] || lowered;
- }
- return units;
- }
-
- function normalizeObjectUnits(inputObject) {
- var normalizedInput = {},
- normalizedProp,
- prop;
-
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
-
- return normalizedInput;
- }
-
- function makeList(field) {
- var count, setter;
-
- if (field.indexOf('week') === 0) {
- count = 7;
- setter = 'day';
- }
- else if (field.indexOf('month') === 0) {
- count = 12;
- setter = 'month';
- }
- else {
- return;
- }
-
- moment[field] = function (format, index) {
- var i, getter,
- method = moment._locale[field],
- results = [];
-
- if (typeof format === 'number') {
- index = format;
- format = undefined;
- }
-
- getter = function (i) {
- var m = moment().utc().set(setter, i);
- return method.call(moment._locale, m, format || '');
- };
-
- if (index != null) {
- return getter(index);
- }
- else {
- for (i = 0; i < count; i++) {
- results.push(getter(i));
- }
- return results;
- }
- };
- }
-
- function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
-
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- if (coercedNumber >= 0) {
- value = Math.floor(coercedNumber);
- } else {
- value = Math.ceil(coercedNumber);
- }
- }
-
- return value;
- }
-
- function daysInMonth(year, month) {
- return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
- }
-
- function weeksInYear(year, dow, doy) {
- return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week;
- }
-
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
-
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
-
- function checkOverflow(m) {
- var overflow;
- if (m._a && m._pf.overflow === -2) {
- overflow =
- m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
- m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
- m._a[HOUR] < 0 || m._a[HOUR] > 24 ||
- (m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 ||
- m._a[SECOND] !== 0 ||
- m._a[MILLISECOND] !== 0)) ? HOUR :
- m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
- m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
- m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
- -1;
-
- if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
- overflow = DATE;
- }
-
- m._pf.overflow = overflow;
- }
- }
-
- function isValid(m) {
- if (m._isValid == null) {
- m._isValid = !isNaN(m._d.getTime()) &&
- m._pf.overflow < 0 &&
- !m._pf.empty &&
- !m._pf.invalidMonth &&
- !m._pf.nullInput &&
- !m._pf.invalidFormat &&
- !m._pf.userInvalidated;
-
- if (m._strict) {
- m._isValid = m._isValid &&
- m._pf.charsLeftOver === 0 &&
- m._pf.unusedTokens.length === 0 &&
- m._pf.bigHour === undefined;
- }
- }
- return m._isValid;
- }
-
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
- }
-
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
- function chooseLocale(names) {
- var i = 0, j, next, locale, split;
-
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
- //the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return null;
- }
-
- function loadLocale(name) {
- var oldLocale = null;
- if (!locales[name] && hasModule) {
- try {
- oldLocale = moment.locale();
- _dereq_('./locale/' + name);
- // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales
- moment.locale(oldLocale);
- } catch (e) { }
- }
- return locales[name];
- }
-
- // Return a moment from input, that is local/utc/zone equivalent to model.
- function makeAs(input, model) {
- var res, diff;
- if (model._isUTC) {
- res = model.clone();
- diff = (moment.isMoment(input) || isDate(input) ?
- +input : +moment(input)) - (+res);
- // Use low-level api, because this fn is low-level api.
- res._d.setTime(+res._d + diff);
- moment.updateOffset(res, false);
- return res;
- } else {
- return moment(input).local();
- }
- }
-
- /************************************
- Locale
- ************************************/
-
-
- extend(Locale.prototype, {
-
- set : function (config) {
- var prop, i;
- for (i in config) {
- prop = config[i];
- if (typeof prop === 'function') {
- this[i] = prop;
- } else {
- this['_' + i] = prop;
- }
- }
- // Lenient ordinal parsing accepts just a number in addition to
- // number + (possibly) stuff coming from _ordinalParseLenient.
- 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 (m) {
- return this._months[m.month()];
- },
-
- _monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- monthsShort : function (m) {
- return this._monthsShort[m.month()];
- },
-
- monthsParse : function (monthName, format, strict) {
- var i, mom, regex;
-
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
-
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = moment.utc([2000, i]);
- if (strict && !this._longMonthsParse[i]) {
- this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
- this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
- return i;
- } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
- return i;
- } else if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- },
-
- _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
- weekdays : function (m) {
- return this._weekdays[m.day()];
- },
-
- _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysShort : function (m) {
- return this._weekdaysShort[m.day()];
- },
-
- _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- weekdaysMin : function (m) {
- return this._weekdaysMin[m.day()];
- },
-
- weekdaysParse : function (weekdayName) {
- var i, mom, regex;
-
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- }
-
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- if (!this._weekdaysParse[i]) {
- mom = moment([2000, 1]).day(i);
- regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
- },
-
- _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 (key) {
- var output = this._longDateFormat[key];
- if (!output && this._longDateFormat[key.toUpperCase()]) {
- output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
- return val.slice(1);
- });
- this._longDateFormat[key] = output;
- }
- return output;
- },
-
- isPM : function (input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return ((input + '').toLowerCase().charAt(0) === 'p');
- },
-
- _meridiemParse : /[ap]\.?m?\.?/i,
- meridiem : function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? '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 (key, mom, now) {
- var output = this._calendar[key];
- return typeof output === 'function' ? output.apply(mom, [now]) : output;
- },
-
- _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 (number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return (typeof output === 'function') ?
- output(number, withoutSuffix, string, isFuture) :
- output.replace(/%d/i, number);
- },
-
- pastFuture : function (diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
- },
-
- ordinal : function (number) {
- return this._ordinal.replace('%d', number);
- },
- _ordinal : '%d',
- _ordinalParse : /\d{1,2}/,
-
- preparse : function (string) {
- return string;
- },
-
- postformat : function (string) {
- return string;
- },
-
- week : function (mom) {
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
- },
-
- _week : {
- dow : 0, // Sunday is the first day of the week.
- doy : 6 // The week that contains Jan 1st is the first week of the year.
- },
-
- _invalidDate: 'Invalid date',
- invalidDate: function () {
- return this._invalidDate;
- }
- });
-
- /************************************
- Formatting
- ************************************/
-
-
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
- }
-
- function makeFormatFunction(format) {
- var array = format.match(formattingTokens), i, length;
-
- for (i = 0, length = array.length; i < length; i++) {
- if (formatTokenFunctions[array[i]]) {
- array[i] = formatTokenFunctions[array[i]];
- } else {
- array[i] = removeFormattingTokens(array[i]);
- }
- }
-
- return function (mom) {
- var output = '';
- for (i = 0; i < length; i++) {
- output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
- }
- return output;
- };
- }
-
- // format date using native date object
- function formatMoment(m, format) {
- if (!m.isValid()) {
- return m.localeData().invalidDate();
- }
-
- format = expandFormat(format, m.localeData());
-
- if (!formatFunctions[format]) {
- formatFunctions[format] = makeFormatFunction(format);
- }
-
- return formatFunctions[format](m);
- }
-
- function expandFormat(format, locale) {
- var i = 5;
-
- function replaceLongDateFormatTokens(input) {
- return locale.longDateFormat(input) || input;
- }
-
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
-
- return format;
- }
-
-
- /************************************
- Parsing
- ************************************/
-
-
- // get the regex to find the next token
- function getParseRegexForToken(token, config) {
- var a, strict = config._strict;
- switch (token) {
- case 'Q':
- return parseTokenOneDigit;
- case 'DDDD':
- return parseTokenThreeDigits;
- case 'YYYY':
- case 'GGGG':
- case 'gggg':
- return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
- case 'Y':
- case 'G':
- case 'g':
- return parseTokenSignedNumber;
- case 'YYYYYY':
- case 'YYYYY':
- case 'GGGGG':
- case 'ggggg':
- return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
- case 'S':
- if (strict) {
- return parseTokenOneDigit;
- }
- /* falls through */
- case 'SS':
- if (strict) {
- return parseTokenTwoDigits;
- }
- /* falls through */
- case 'SSS':
- if (strict) {
- return parseTokenThreeDigits;
- }
- /* falls through */
- case 'DDD':
- return parseTokenOneToThreeDigits;
- case 'MMM':
- case 'MMMM':
- case 'dd':
- case 'ddd':
- case 'dddd':
- return parseTokenWord;
- case 'a':
- case 'A':
- return config._locale._meridiemParse;
- case 'x':
- return parseTokenOffsetMs;
- case 'X':
- return parseTokenTimestampMs;
- case 'Z':
- case 'ZZ':
- return parseTokenTimezone;
- case 'T':
- return parseTokenT;
- case 'SSSS':
- return parseTokenDigits;
- case 'MM':
- case 'DD':
- case 'YY':
- case 'GG':
- case 'gg':
- case 'HH':
- case 'hh':
- case 'mm':
- case 'ss':
- case 'ww':
- case 'WW':
- return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
- case 'M':
- case 'D':
- case 'd':
- case 'H':
- case 'h':
- case 'm':
- case 's':
- case 'w':
- case 'W':
- case 'e':
- case 'E':
- return parseTokenOneOrTwoDigits;
- case 'Do':
- return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient;
- default :
- a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));
- return a;
- }
- }
-
- function timezoneMinutesFromString(string) {
- string = string || '';
- var possibleTzMatches = (string.match(parseTokenTimezone) || []),
- tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
- parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
- minutes = +(parts[1] * 60) + toInt(parts[2]);
-
- return parts[0] === '+' ? -minutes : minutes;
- }
-
- // function to convert string input to date
- function addTimeToArrayFromToken(token, input, config) {
- var a, datePartArray = config._a;
-
- switch (token) {
- // QUARTER
- case 'Q':
- if (input != null) {
- datePartArray[MONTH] = (toInt(input) - 1) * 3;
- }
- break;
- // MONTH
- case 'M' : // fall through to MM
- case 'MM' :
- if (input != null) {
- datePartArray[MONTH] = toInt(input) - 1;
- }
- break;
- case 'MMM' : // fall through to MMMM
- case 'MMMM' :
- a = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (a != null) {
- datePartArray[MONTH] = a;
- } else {
- config._pf.invalidMonth = input;
- }
- break;
- // DAY OF MONTH
- case 'D' : // fall through to DD
- case 'DD' :
- if (input != null) {
- datePartArray[DATE] = toInt(input);
- }
- break;
- case 'Do' :
- if (input != null) {
- datePartArray[DATE] = toInt(parseInt(
- input.match(/\d{1,2}/)[0], 10));
- }
- break;
- // DAY OF YEAR
- case 'DDD' : // fall through to DDDD
- case 'DDDD' :
- if (input != null) {
- config._dayOfYear = toInt(input);
- }
-
- break;
- // YEAR
- case 'YY' :
- datePartArray[YEAR] = moment.parseTwoDigitYear(input);
- break;
- case 'YYYY' :
- case 'YYYYY' :
- case 'YYYYYY' :
- datePartArray[YEAR] = toInt(input);
- break;
- // AM / PM
- case 'a' : // fall through to A
- case 'A' :
- config._isPm = config._locale.isPM(input);
- break;
- // HOUR
- case 'h' : // fall through to hh
- case 'hh' :
- config._pf.bigHour = true;
- /* falls through */
- case 'H' : // fall through to HH
- case 'HH' :
- datePartArray[HOUR] = toInt(input);
- break;
- // MINUTE
- case 'm' : // fall through to mm
- case 'mm' :
- datePartArray[MINUTE] = toInt(input);
- break;
- // SECOND
- case 's' : // fall through to ss
- case 'ss' :
- datePartArray[SECOND] = toInt(input);
- break;
- // MILLISECOND
- case 'S' :
- case 'SS' :
- case 'SSS' :
- case 'SSSS' :
- datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
- break;
- // UNIX OFFSET (MILLISECONDS)
- case 'x':
- config._d = new Date(toInt(input));
- break;
- // UNIX TIMESTAMP WITH MS
- case 'X':
- config._d = new Date(parseFloat(input) * 1000);
- break;
- // TIMEZONE
- case 'Z' : // fall through to ZZ
- case 'ZZ' :
- config._useUTC = true;
- config._tzm = timezoneMinutesFromString(input);
- break;
- // WEEKDAY - human
- case 'dd':
- case 'ddd':
- case 'dddd':
- a = config._locale.weekdaysParse(input);
- // if we didn't get a weekday name, mark the date as invalid
- if (a != null) {
- config._w = config._w || {};
- config._w['d'] = a;
- } else {
- config._pf.invalidWeekday = input;
- }
- break;
- // WEEK, WEEK DAY - numeric
- case 'w':
- case 'ww':
- case 'W':
- case 'WW':
- case 'd':
- case 'e':
- case 'E':
- token = token.substr(0, 1);
- /* falls through */
- case 'gggg':
- case 'GGGG':
- case 'GGGGG':
- token = token.substr(0, 2);
- if (input) {
- config._w = config._w || {};
- config._w[token] = toInt(input);
- }
- break;
- case 'gg':
- case 'GG':
- config._w = config._w || {};
- config._w[token] = moment.parseTwoDigitYear(input);
- }
- }
-
- function dayOfYearFromWeekInfo(config) {
- var w, weekYear, week, weekday, dow, doy, temp;
-
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
-
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
- week = dfl(w.W, 1);
- weekday = dfl(w.E, 1);
- } else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
-
- weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
- week = dfl(w.w, 1);
-
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < dow) {
- ++week;
- }
- } else if (w.e != null) {
- // local weekday -- counting starts from begining of week
- weekday = w.e + dow;
- } else {
- // default to begining of week
- weekday = dow;
- }
- }
- temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
-
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
-
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- function dateFromConfig(config) {
- var i, date, input = [], currentDate, yearToUse;
-
- if (config._d) {
- return;
- }
-
- currentDate = currentDateArray(config);
-
- //compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
-
- //if the day of the year is set, figure out what it is
- if (config._dayOfYear) {
- yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
-
- if (config._dayOfYear > daysInYear(yearToUse)) {
- config._pf._overflowDayOfYear = true;
- }
-
- date = makeUTCDate(yearToUse, 0, config._dayOfYear);
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
-
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
-
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
- }
-
- // Check for 24:00:00.000
- if (config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
-
- config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
- // Apply timezone offset from input. The actual zone can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
- }
-
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
- }
-
- function dateFromObject(config) {
- var normalizedInput;
-
- if (config._d) {
- return;
- }
-
- normalizedInput = normalizeObjectUnits(config._i);
- config._a = [
- normalizedInput.year,
- normalizedInput.month,
- normalizedInput.day || normalizedInput.date,
- normalizedInput.hour,
- normalizedInput.minute,
- normalizedInput.second,
- normalizedInput.millisecond
- ];
-
- dateFromConfig(config);
- }
-
- function currentDateArray(config) {
- var now = new Date();
- if (config._useUTC) {
- return [
- now.getUTCFullYear(),
- now.getUTCMonth(),
- now.getUTCDate()
- ];
- } else {
- return [now.getFullYear(), now.getMonth(), now.getDate()];
- }
- }
-
- // date from string and format string
- function makeDateFromStringAndFormat(config) {
- if (config._f === moment.ISO_8601) {
- parseISO(config);
- return;
- }
-
- config._a = [];
- config._pf.empty = true;
-
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- var string = '' + config._i,
- i, parsedInput, tokens, token, skipped,
- stringLength = string.length,
- totalParsedInputLength = 0;
-
- tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
-
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
- if (parsedInput) {
- skipped = string.substr(0, string.indexOf(parsedInput));
- if (skipped.length > 0) {
- config._pf.unusedInput.push(skipped);
- }
- string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- config._pf.empty = false;
- }
- else {
- config._pf.unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- }
- else if (config._strict && !parsedInput) {
- config._pf.unusedTokens.push(token);
- }
- }
-
- // add remaining unparsed input length to the string
- config._pf.charsLeftOver = stringLength - totalParsedInputLength;
- if (string.length > 0) {
- config._pf.unusedInput.push(string);
- }
-
- // clear _12h flag if hour is <= 12
- if (config._pf.bigHour === true && config._a[HOUR] <= 12) {
- config._pf.bigHour = undefined;
- }
- // handle am pm
- if (config._isPm && config._a[HOUR] < 12) {
- config._a[HOUR] += 12;
- }
- // if is 12 am, change hours to 0
- if (config._isPm === false && config._a[HOUR] === 12) {
- config._a[HOUR] = 0;
- }
- dateFromConfig(config);
- checkOverflow(config);
- }
-
- function unescapeFormat(s) {
- return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
- return p1 || p2 || p3 || p4;
- });
- }
-
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- function regexpEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
-
- // date from string and array of format strings
- function makeDateFromStringAndArray(config) {
- var tempConfig,
- bestMoment,
-
- scoreToBeat,
- i,
- currentScore;
-
- if (config._f.length === 0) {
- config._pf.invalidFormat = true;
- config._d = new Date(NaN);
- return;
- }
-
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- tempConfig = copyConfig({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._pf = defaultParsingFlags();
- tempConfig._f = config._f[i];
- makeDateFromStringAndFormat(tempConfig);
-
- if (!isValid(tempConfig)) {
- continue;
- }
-
- // if there is any input that was not parsed add a penalty for that format
- currentScore += tempConfig._pf.charsLeftOver;
-
- //or tokens
- currentScore += tempConfig._pf.unusedTokens.length * 10;
-
- tempConfig._pf.score = currentScore;
-
- if (scoreToBeat == null || currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
-
- extend(config, bestMoment || tempConfig);
- }
-
- // date from iso format
- function parseISO(config) {
- var i, l,
- string = config._i,
- match = isoRegex.exec(string);
-
- if (match) {
- config._pf.iso = true;
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(string)) {
- // match[5] should be 'T' or undefined
- config._f = isoDates[i][0] + (match[6] || ' ');
- break;
- }
- }
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(string)) {
- config._f += isoTimes[i][0];
- break;
- }
- }
- if (string.match(parseTokenTimezone)) {
- config._f += 'Z';
- }
- makeDateFromStringAndFormat(config);
- } else {
- config._isValid = false;
- }
- }
-
- // date from iso format or fallback
- function makeDateFromString(config) {
- parseISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- moment.createFromInputFallback(config);
- }
- }
-
- function map(arr, fn) {
- var res = [], i;
- for (i = 0; i < arr.length; ++i) {
- res.push(fn(arr[i], i));
- }
- return res;
- }
-
- function makeDateFromInput(config) {
- var input = config._i, matched;
- if (input === undefined) {
- config._d = new Date();
- } else if (isDate(input)) {
- config._d = new Date(+input);
- } else if ((matched = aspNetJsonRegex.exec(input)) !== null) {
- config._d = new Date(+matched[1]);
- } else if (typeof input === 'string') {
- makeDateFromString(config);
- } else if (isArray(input)) {
- config._a = map(input.slice(0), function (obj) {
- return parseInt(obj, 10);
- });
- dateFromConfig(config);
- } else if (typeof(input) === 'object') {
- dateFromObject(config);
- } else if (typeof(input) === 'number') {
- // from milliseconds
- config._d = new Date(input);
- } else {
- moment.createFromInputFallback(config);
- }
- }
-
- function makeDate(y, m, d, h, M, s, ms) {
- //can't just apply() to create a date:
- //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
- var date = new Date(y, m, d, h, M, s, ms);
-
- //the date constructor doesn't accept years < 1970
- if (y < 1970) {
- date.setFullYear(y);
- }
- return date;
- }
-
- function makeUTCDate(y) {
- var date = new Date(Date.UTC.apply(null, arguments));
- if (y < 1970) {
- date.setUTCFullYear(y);
- }
- return date;
- }
-
- function parseWeekday(input, locale) {
- if (typeof input === 'string') {
- if (!isNaN(input)) {
- input = parseInt(input, 10);
- }
- else {
- input = locale.weekdaysParse(input);
- if (typeof input !== 'number') {
- return null;
- }
- }
- }
- return input;
- }
-
- /************************************
- Relative Time
- ************************************/
-
-
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
- }
-
- function relativeTime(posNegDuration, withoutSuffix, locale) {
- var duration = moment.duration(posNegDuration).abs(),
- seconds = round(duration.as('s')),
- minutes = round(duration.as('m')),
- hours = round(duration.as('h')),
- days = round(duration.as('d')),
- months = round(duration.as('M')),
- years = round(duration.as('y')),
-
- args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
- minutes === 1 && ['m'] ||
- minutes < relativeTimeThresholds.m && ['mm', minutes] ||
- hours === 1 && ['h'] ||
- hours < relativeTimeThresholds.h && ['hh', hours] ||
- days === 1 && ['d'] ||
- days < relativeTimeThresholds.d && ['dd', days] ||
- months === 1 && ['M'] ||
- months < relativeTimeThresholds.M && ['MM', months] ||
- years === 1 && ['y'] || ['yy', years];
-
- args[2] = withoutSuffix;
- args[3] = +posNegDuration > 0;
- args[4] = locale;
- return substituteTimeAgo.apply({}, args);
- }
-
-
- /************************************
- Week of Year
- ************************************/
-
-
- // firstDayOfWeek 0 = sun, 6 = sat
- // the day of the week that starts the week
- // (usually sunday or monday)
- // firstDayOfWeekOfYear 0 = sun, 6 = sat
- // the first week is the week that contains the first
- // of this day of the week
- // (eg. ISO weeks use thursday (4))
- function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
- var end = firstDayOfWeekOfYear - firstDayOfWeek,
- daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
- adjustedMoment;
-
-
- if (daysToDayOfWeek > end) {
- daysToDayOfWeek -= 7;
- }
-
- if (daysToDayOfWeek < end - 7) {
- daysToDayOfWeek += 7;
- }
-
- adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd');
- return {
- week: Math.ceil(adjustedMoment.dayOfYear() / 7),
- year: adjustedMoment.year()
- };
- }
-
- //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
- var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
-
- d = d === 0 ? 7 : d;
- weekday = weekday != null ? weekday : firstDayOfWeek;
- daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
- dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
-
- return {
- year: dayOfYear > 0 ? year : year - 1,
- dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear
- };
- }
-
- /************************************
- Top Level Functions
- ************************************/
-
- function makeMoment(config) {
- var input = config._i,
- format = config._f,
- res;
-
- config._locale = config._locale || moment.localeData(config._l);
-
- if (input === null || (format === undefined && input === '')) {
- return moment.invalid({nullInput: true});
- }
-
- if (typeof input === 'string') {
- config._i = input = config._locale.preparse(input);
- }
-
- if (moment.isMoment(input)) {
- return new Moment(input, true);
- } else if (format) {
- if (isArray(format)) {
- makeDateFromStringAndArray(config);
- } else {
- makeDateFromStringAndFormat(config);
- }
- } else {
- makeDateFromInput(config);
- }
-
- res = new Moment(config);
- if (res._nextDay) {
- // Adding is smart enough around DST
- res.add(1, 'd');
- res._nextDay = undefined;
- }
-
- return res;
- }
-
- moment = function (input, format, locale, strict) {
- var c;
-
- if (typeof(locale) === 'boolean') {
- strict = locale;
- locale = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c = {};
- c._isAMomentObject = true;
- c._i = input;
- c._f = format;
- c._l = locale;
- c._strict = strict;
- c._isUTC = false;
- c._pf = defaultParsingFlags();
-
- return makeMoment(c);
- };
-
- moment.suppressDeprecationWarnings = false;
-
- moment.createFromInputFallback = deprecate(
- '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 (config) {
- config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
- }
- );
-
- // Pick a moment m from moments so that m[fn](other) is true for all
- // other. This relies on the function fn to be transitive.
- //
- // moments should either be an array of moment objects or an array, whose
- // first element is an array of moment objects.
- function pickBy(fn, moments) {
- var res, i;
- if (moments.length === 1 && isArray(moments[0])) {
- moments = moments[0];
- }
- if (!moments.length) {
- return moment();
- }
- res = moments[0];
- for (i = 1; i < moments.length; ++i) {
- if (moments[i][fn](res)) {
- res = moments[i];
- }
- }
- return res;
- }
-
- moment.min = function () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isBefore', args);
- };
-
- moment.max = function () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isAfter', args);
- };
-
- // creating with utc
- moment.utc = function (input, format, locale, strict) {
- var c;
-
- if (typeof(locale) === 'boolean') {
- strict = locale;
- locale = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c = {};
- c._isAMomentObject = true;
- c._useUTC = true;
- c._isUTC = true;
- c._l = locale;
- c._i = input;
- c._f = format;
- c._strict = strict;
- c._pf = defaultParsingFlags();
-
- return makeMoment(c).utc();
- };
-
- // creating with unix timestamp (in seconds)
- moment.unix = function (input) {
- return moment(input * 1000);
- };
-
- // duration
- moment.duration = function (input, key) {
- var duration = input,
- // matching against regexp is expensive, do it on demand
- match = null,
- sign,
- ret,
- parseIso,
- diffRes;
-
- if (moment.isDuration(input)) {
- duration = {
- ms: input._milliseconds,
- d: input._days,
- M: input._months
- };
- } else if (typeof input === 'number') {
- duration = {};
- if (key) {
- duration[key] = input;
- } else {
- duration.milliseconds = input;
- }
- } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : 1;
- duration = {
- y: 0,
- d: toInt(match[DATE]) * sign,
- h: toInt(match[HOUR]) * sign,
- m: toInt(match[MINUTE]) * sign,
- s: toInt(match[SECOND]) * sign,
- ms: toInt(match[MILLISECOND]) * sign
- };
- } else if (!!(match = isoDurationRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : 1;
- parseIso = function (inp) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- };
- duration = {
- y: parseIso(match[2]),
- M: parseIso(match[3]),
- d: parseIso(match[4]),
- h: parseIso(match[5]),
- m: parseIso(match[6]),
- s: parseIso(match[7]),
- w: parseIso(match[8])
- };
- } else if (typeof duration === 'object' &&
- ('from' in duration || 'to' in duration)) {
- diffRes = momentsDifference(moment(duration.from), moment(duration.to));
-
- duration = {};
- duration.ms = diffRes.milliseconds;
- duration.M = diffRes.months;
- }
-
- ret = new Duration(duration);
-
- if (moment.isDuration(input) && hasOwnProp(input, '_locale')) {
- ret._locale = input._locale;
- }
-
- return ret;
- };
-
- // version number
- moment.version = VERSION;
-
- // default format
- moment.defaultFormat = isoFormat;
-
- // constant that refers to the ISO standard
- moment.ISO_8601 = function () {};
-
- // Plugins that add properties should also add the key here (null value),
- // so we can properly clone ourselves.
- moment.momentProperties = momentProperties;
-
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- moment.updateOffset = function () {};
-
- // This function allows you to set a threshold for relative time strings
- moment.relativeTimeThreshold = function (threshold, limit) {
- if (relativeTimeThresholds[threshold] === undefined) {
- return false;
- }
- if (limit === undefined) {
- return relativeTimeThresholds[threshold];
- }
- relativeTimeThresholds[threshold] = limit;
- return true;
- };
-
- moment.lang = deprecate(
- 'moment.lang is deprecated. Use moment.locale instead.',
- function (key, value) {
- return moment.locale(key, value);
- }
- );
-
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- moment.locale = function (key, values) {
- var data;
- if (key) {
- if (typeof(values) !== 'undefined') {
- data = moment.defineLocale(key, values);
- }
- else {
- data = moment.localeData(key);
- }
-
- if (data) {
- moment.duration._locale = moment._locale = data;
- }
- }
-
- return moment._locale._abbr;
- };
-
- moment.defineLocale = function (name, values) {
- if (values !== null) {
- values.abbr = name;
- if (!locales[name]) {
- locales[name] = new Locale();
- }
- locales[name].set(values);
-
- // backwards compat for now: also set the locale
- moment.locale(name);
-
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
- };
-
- moment.langData = deprecate(
- 'moment.langData is deprecated. Use moment.localeData instead.',
- function (key) {
- return moment.localeData(key);
- }
- );
-
- // returns locale data
- moment.localeData = function (key) {
- var locale;
-
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
-
- if (!key) {
- return moment._locale;
- }
-
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
- }
- key = [key];
- }
-
- return chooseLocale(key);
- };
-
- // compare moment object
- moment.isMoment = function (obj) {
- return obj instanceof Moment ||
- (obj != null && hasOwnProp(obj, '_isAMomentObject'));
- };
-
- // for typechecking Duration objects
- moment.isDuration = function (obj) {
- return obj instanceof Duration;
- };
-
- for (i = lists.length - 1; i >= 0; --i) {
- makeList(lists[i]);
- }
-
- moment.normalizeUnits = function (units) {
- return normalizeUnits(units);
- };
-
- moment.invalid = function (flags) {
- var m = moment.utc(NaN);
- if (flags != null) {
- extend(m._pf, flags);
- }
- else {
- m._pf.userInvalidated = true;
- }
-
- return m;
- };
-
- moment.parseZone = function () {
- return moment.apply(null, arguments).parseZone();
- };
-
- moment.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- };
-
- /************************************
- Moment Prototype
- ************************************/
-
-
- extend(moment.fn = Moment.prototype, {
-
- clone : function () {
- return moment(this);
- },
-
- valueOf : function () {
- return +this._d + ((this._offset || 0) * 60000);
- },
-
- unix : function () {
- return Math.floor(+this / 1000);
- },
-
- 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 m = moment(this).utc();
- if (0 < m.year() && m.year() <= 9999) {
- if ('function' === typeof Date.prototype.toISOString) {
- // native implementation is ~50x faster, use it when we can
- return this.toDate().toISOString();
- } else {
- return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
- }
- } else {
- return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
- }
- },
-
- toArray : function () {
- var m = this;
- return [
- m.year(),
- m.month(),
- m.date(),
- m.hours(),
- m.minutes(),
- m.seconds(),
- m.milliseconds()
- ];
- },
-
- isValid : function () {
- return isValid(this);
- },
-
- isDSTShifted : function () {
- if (this._a) {
- return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
- }
-
- return false;
- },
-
- parsingFlags : function () {
- return extend({}, this._pf);
- },
-
- invalidAt: function () {
- return this._pf.overflow;
- },
-
- utc : function (keepLocalTime) {
- return this.zone(0, keepLocalTime);
- },
-
- local : function (keepLocalTime) {
- if (this._isUTC) {
- this.zone(0, keepLocalTime);
- this._isUTC = false;
-
- if (keepLocalTime) {
- this.add(this._dateTzOffset(), 'm');
- }
- }
- return this;
- },
-
- format : function (inputString) {
- var output = formatMoment(this, inputString || moment.defaultFormat);
- return this.localeData().postformat(output);
- },
-
- add : createAdder(1, 'add'),
-
- subtract : createAdder(-1, 'subtract'),
-
- diff : function (input, units, asFloat) {
- var that = makeAs(input, this),
- zoneDiff = (this.zone() - that.zone()) * 6e4,
- diff, output, daysAdjust;
-
- units = normalizeUnits(units);
-
- if (units === 'year' || units === 'month') {
- // average number of days in the months in the given dates
- diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
- // difference in months
- output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
- // adjust by taking difference in days, average number of days
- // and dst in the given months.
- daysAdjust = (this - moment(this).startOf('month')) -
- (that - moment(that).startOf('month'));
- // same as above but with zones, to negate all dst
- daysAdjust -= ((this.zone() - moment(this).startOf('month').zone()) -
- (that.zone() - moment(that).startOf('month').zone())) * 6e4;
- output += daysAdjust / diff;
- if (units === 'year') {
- output = output / 12;
- }
- } else {
- diff = (this - that);
- output = units === 'second' ? diff / 1e3 : // 1000
- units === 'minute' ? diff / 6e4 : // 1000 * 60
- units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
- units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
- units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
- diff;
- }
- return asFloat ? output : absRound(output);
- },
-
- from : function (time, withoutSuffix) {
- return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
- },
-
- fromNow : function (withoutSuffix) {
- return this.from(moment(), withoutSuffix);
- },
-
- calendar : function (time) {
- // We want to compare the start of today, vs this.
- // Getting start-of-today depends on whether we're zone'd or not.
- var now = time || moment(),
- sod = makeAs(now, this).startOf('day'),
- diff = this.diff(sod, 'days', true),
- format = diff < -6 ? 'sameElse' :
- diff < -1 ? 'lastWeek' :
- diff < 0 ? 'lastDay' :
- diff < 1 ? 'sameDay' :
- diff < 2 ? 'nextDay' :
- diff < 7 ? 'nextWeek' : 'sameElse';
- return this.format(this.localeData().calendar(format, this, moment(now)));
- },
-
- isLeapYear : function () {
- return isLeapYear(this.year());
- },
-
- isDST : function () {
- return (this.zone() < this.clone().month(0).zone() ||
- this.zone() < this.clone().month(5).zone());
- },
-
- day : function (input) {
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (input != null) {
- input = parseWeekday(input, this.localeData());
- return this.add(input - day, 'd');
- } else {
- return day;
- }
- },
-
- month : makeAccessor('Month', true),
-
- startOf : function (units) {
- units = normalizeUnits(units);
- // the following switch intentionally omits break keywords
- // to utilize falling through the cases.
- switch (units) {
- case 'year':
- this.month(0);
- /* falls through */
- case 'quarter':
- case 'month':
- this.date(1);
- /* falls through */
- case 'week':
- case 'isoWeek':
- case 'day':
- this.hours(0);
- /* falls through */
- case 'hour':
- this.minutes(0);
- /* falls through */
- case 'minute':
- this.seconds(0);
- /* falls through */
- case 'second':
- this.milliseconds(0);
- /* falls through */
- }
-
- // weeks are a special case
- if (units === 'week') {
- this.weekday(0);
- } else if (units === 'isoWeek') {
- this.isoWeekday(1);
- }
-
- // quarters are also special
- if (units === 'quarter') {
- this.month(Math.floor(this.month() / 3) * 3);
- }
-
- return this;
- },
-
- endOf: function (units) {
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond') {
- return this;
- }
- return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
- },
-
- isAfter: function (input, units) {
- var inputMs;
- units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
- if (units === 'millisecond') {
- input = moment.isMoment(input) ? input : moment(input);
- return +this > +input;
- } else {
- inputMs = moment.isMoment(input) ? +input : +moment(input);
- return inputMs < +this.clone().startOf(units);
- }
- },
-
- isBefore: function (input, units) {
- var inputMs;
- units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
- if (units === 'millisecond') {
- input = moment.isMoment(input) ? input : moment(input);
- return +this < +input;
- } else {
- inputMs = moment.isMoment(input) ? +input : +moment(input);
- return +this.clone().endOf(units) < inputMs;
- }
- },
-
- isSame: function (input, units) {
- var inputMs;
- units = normalizeUnits(units || 'millisecond');
- if (units === 'millisecond') {
- input = moment.isMoment(input) ? input : moment(input);
- return +this === +input;
- } else {
- inputMs = +moment(input);
- return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
- }
- },
-
- min: deprecate(
- 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
- function (other) {
- other = moment.apply(null, arguments);
- return other < this ? this : other;
- }
- ),
-
- max: deprecate(
- 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
- function (other) {
- other = moment.apply(null, arguments);
- return other > this ? this : other;
- }
- ),
-
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- zone : function (input, keepLocalTime) {
- var offset = this._offset || 0,
- localAdjust;
- if (input != null) {
- if (typeof input === 'string') {
- input = timezoneMinutesFromString(input);
- }
- if (Math.abs(input) < 16) {
- input = input * 60;
- }
- if (!this._isUTC && keepLocalTime) {
- localAdjust = this._dateTzOffset();
- }
- this._offset = input;
- this._isUTC = true;
- if (localAdjust != null) {
- this.subtract(localAdjust, 'm');
- }
- if (offset !== input) {
- if (!keepLocalTime || this._changeInProgress) {
- addOrSubtractDurationFromMoment(this,
- moment.duration(offset - input, 'm'), 1, false);
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- moment.updateOffset(this, true);
- this._changeInProgress = null;
- }
- }
- } else {
- return this._isUTC ? offset : this._dateTzOffset();
- }
- return this;
- },
-
- zoneAbbr : function () {
- return this._isUTC ? 'UTC' : '';
- },
-
- zoneName : function () {
- return this._isUTC ? 'Coordinated Universal Time' : '';
- },
-
- parseZone : function () {
- if (this._tzm) {
- this.zone(this._tzm);
- } else if (typeof this._i === 'string') {
- this.zone(this._i);
- }
- return this;
- },
-
- hasAlignedHourOffset : function (input) {
- if (!input) {
- input = 0;
- }
- else {
- input = moment(input).zone();
- }
-
- return (this.zone() - input) % 60 === 0;
- },
-
- daysInMonth : function () {
- return daysInMonth(this.year(), this.month());
- },
-
- dayOfYear : function (input) {
- var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
- return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
- },
-
- quarter : function (input) {
- return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
- },
-
- weekYear : function (input) {
- var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
- return input == null ? year : this.add
<TRUNCATED>
[31/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/backbone.marionette-2.4.1.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/backbone.marionette-2.4.1.min.js b/htrace-core/src/web/lib/js/backbone.marionette-2.4.1.min.js
deleted file mode 100644
index 994efee..0000000
--- a/htrace-core/src/web/lib/js/backbone.marionette-2.4.1.min.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// MarionetteJS (Backbone.Marionette)
-// ----------------------------------
-// v2.4.1
-//
-// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC.
-// Distributed under MIT license
-//
-// http://marionettejs.com
-
-
-/*!
- * Includes BabySitter
- * https://github.com/marionettejs/backbone.babysitter/
- *
- * Includes Wreqr
- * https://github.com/marionettejs/backbone.wreqr/
- */
-
-
-
-!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(c,d){return a.Marionette=a.Mn=b(a,c,d)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(a,c,d)}else a.Marionette=a.Mn=b(a,a.Backbone,a._)}(this,function(a,b,c){"use strict";!function(a,b){var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findBy
Cid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.6",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}(b,c),function(a,b)
{var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.1",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){var a=Array.prototype.slice.apply(arguments);return b.callback.apply(b.context,a)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(
this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this);var c=Array.prototype.slice.call(arguments);a.Handlers.prototype.constructor.apply(this,c)},execute:function(a,b){a=arguments[0],b=Array.prototype.slice.call(arguments,1),this.hasHandler(a)?this.getHandler(a).apply(this,b):this.storage.addCommand(a,b)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this
.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d),d.RequestResponse=function(a){return a.Handlers.extend({request:function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1);return this.hasHandler(a)?this.getHandler(a).apply(this,b):void 0}})}(d),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(){var c=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(c.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===
a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),c}(d),d.radio=function(a){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,b,c){return function(d){var e=a._getChannel(d)[b],f=Array.prototype.slice.call(arguments,1);return e[c].apply(e,f)}};return new c}(d),a.Wreqr}(b,c);var d=a.Marione
tte,e=a.Mn,f=b.Marionette={};f.VERSION="2.4.1",f.noConflict=function(){return a.Marionette=d,a.Mn=e,this},b.Marionette=f,f.Deferred=b.$.Deferred,f.extend=b.Model.extend,f.isNodeAttached=function(a){return b.$.contains(document.documentElement,a)},f.mergeOptions=function(a,b){a&&c.extend(this,c.pick(a,b))},f.getOption=function(a,b){return a&&b?a.options&&void 0!==a.options[b]?a.options[b]:a[b]:void 0},f.proxyGetOption=function(a){return f.getOption(this,a)},f._getValue=function(a,b,d){return c.isFunction(a)&&(a=d?a.apply(b,d):a.call(b)),a},f.normalizeMethods=function(a){return c.reduce(a,function(a,b,d){return c.isFunction(b)||(b=this[b]),b&&(a[d]=b),a},{},this)},f.normalizeUIString=function(a,b){return a.replace(/@ui\.[a-zA-Z_$0-9]*/g,function(a){return b[a.slice(4)]})},f.normalizeUIKeys=function(a,b){return c.reduce(a,function(a,c,d){var e=f.normalizeUIString(d,b);return a[e]=c,a},{})},f.normalizeUIValues=function(a,b,d){return c.each(a,function(e,g){c.isString(e)?a[g]=f.normalizeU
IString(e,b):c.isObject(e)&&c.isArray(d)&&(c.extend(e,f.normalizeUIValues(c.pick(e,d),b)),c.each(d,function(a){var d=e[a];c.isString(d)&&(e[a]=f.normalizeUIString(d,b))}))}),a},f.actAsCollection=function(a,b){var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];c.each(d,function(d){a[d]=function(){var a=c.values(c.result(this,b)),e=[a].concat(c.toArray(arguments));return c[d].apply(c,e)}})};var g=f.deprecate=function(a,b){c.isObject(a)&&(a=a.prev+" is going to be removed in the future. Please use "+a.next+" instead."+(a.url?" See: "+a.url:"")),void 0!==b&&b||g._cache[a]||(g._warn("Deprecation warning: "+a),g._cache[a]=!0)};g._warn="undefined"!=typeof console&&(console.warn||console.log)||function(){},g._cache={},f._triggerMethod=function(){function a(a,b,c){return c.toUpperCase()}var b=/(^|:)(\w)/gi;return function(d,e,f){var g=arguments
.length<3;g&&(f=e,e=f[0]);var h,i="on"+e.replace(b,a),j=d[i];return c.isFunction(j)&&(h=j.apply(d,g?c.rest(f):f)),c.isFunction(d.trigger)&&(g+f.length>1?d.trigger.apply(d,g?f:[e].concat(c.drop(f,0))):d.trigger(e)),h}}(),f.triggerMethod=function(){return f._triggerMethod(this,arguments)},f.triggerMethodOn=function(a){var b=c.isFunction(a.triggerMethod)?a.triggerMethod:f.triggerMethod;return b.apply(a,c.rest(arguments))},f.MonitorDOMRefresh=function(a){function b(){a._isShown=!0,e()}function d(){a._isRendered=!0,e()}function e(){a._isShown&&a._isRendered&&f.isNodeAttached(a.el)&&c.isFunction(a.triggerMethod)&&a.triggerMethod("dom:refresh")}a.on({show:b,render:d})},function(a){function b(b,d,e,f){var g=f.split(/\s+/);c.each(g,function(c){var f=b[c];if(!f)throw new a.Error('Method "'+c+'" was configured as an event handler, but does not exist.');b.listenTo(d,e,f)})}function d(a,b,c,d){a.listenTo(b,c,d)}function e(a,b,d,e){var f=e.split(/\s+/);c.each(f,function(c){var e=a[c];a.stopListen
ing(b,d,e)})}function f(a,b,c,d){a.stopListening(b,c,d)}function g(b,d,e,f,g){if(d&&e){if(!c.isObject(e))throw new a.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});e=a._getValue(e,b),c.each(e,function(a,e){c.isFunction(a)?f(b,d,e,a):g(b,d,e,a)})}}a.bindEntityEvents=function(a,c,e){g(a,c,e,d,b)},a.unbindEntityEvents=function(a,b,c){g(a,b,c,f,e)},a.proxyBindEntityEvents=function(b,c){return a.bindEntityEvents(this,b,c)},a.proxyUnbindEntityEvents=function(b,c){return a.unbindEntityEvents(this,b,c)}}(f);var h=["description","fileName","lineNumber","name","message","number"];return f.Error=f.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+f.VERSION+"/",constructor:function(a,b){c.isObject(a)?(b=a,a=b.message):b||(b={});var d=Error.call(this,a);c.extend(this,c.pick(d,h),c.pick(b,h)),this.captureStackTrace(),b.url&&(this.url=this.urlRoot+b.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.cap
tureStackTrace(this,f.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),f.Error.extend=f.extend,f.Callbacks=function(){this._deferred=f.Deferred(),this._callbacks=[]},c.extend(f.Callbacks.prototype,{add:function(a,b){var d=c.result(this._deferred,"promise");this._callbacks.push({cb:a,ctx:b}),d.then(function(c){b&&(c.context=b),a.call(c.context,c.options)})},run:function(a,b){this._deferred.resolve({options:a,context:b})},reset:function(){var a=this._callbacks;this._deferred=f.Deferred(),this._callbacks=[],c.each(a,function(a){this.add(a.cb,a.ctx)},this)}}),f.Controller=function(a){this.options=a||{},c.isFunction(this.initialize)&&this.initialize(this.options)},f.Controller.extend=f.extend,c.extend(f.Controller.prototype,b.Events,{destroy:function(){return f._triggerMethod(this,"before:destroy",arguments),f._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:f.triggerMethod,mergeOptions:f.mergeOp
tions,getOption:f.proxyGetOption}),f.Object=function(a){this.options=c.extend({},c.result(this,"options"),a),this.initialize.apply(this,arguments)},f.Object.extend=f.extend,c.extend(f.Object.prototype,b.Events,{initialize:function(){},destroy:function(){return this.triggerMethod("before:destroy"),this.triggerMethod("destroy"),this.stopListening(),this},triggerMethod:f.triggerMethod,mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.Region=f.Object.extend({constructor:function(a){if(this.options=a||{},this.el=this.getOption("el"),this.el=this.el instanceof b.$?this.el[0]:this.el,!this.el)throw new f.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),f.Object.call(this,a)},show:function(a,b){if(this._ensureElement()){this._ensureViewIsIntact(a);var c=b||{},d=a!==this.currentView,e=!!c.preventDestroy,g=!!c.forceShow,h=!!this.currentView,i=d
&&!e,j=d||g;if(h&&this.triggerMethod("before:swapOut",this.currentView,this,b),this.currentView&&delete this.currentView._parent,i?this.empty():h&&j&&this.currentView.off("destroy",this.empty,this),j){a.once("destroy",this.empty,this),a.render(),a._parent=this,h&&this.triggerMethod("before:swap",a,this,b),this.triggerMethod("before:show",a,this,b),f.triggerMethodOn(a,"before:show",a,this,b),h&&this.triggerMethod("swapOut",this.currentView,this,b);var k=f.isNodeAttached(this.el),l=[],m=c.triggerBeforeAttach||this.triggerBeforeAttach,n=c.triggerAttach||this.triggerAttach;return k&&m&&(l=this._displayedViews(a),this._triggerAttach(l,"before:")),this.attachHtml(a),this.currentView=a,k&&n&&(l=this._displayedViews(a),this._triggerAttach(l)),h&&this.triggerMethod("swap",a,this,b),this.triggerMethod("show",a,this,b),f.triggerMethodOn(a,"show",a,this,b),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(a,b){var d=(b||"")+"attach";c.each(a,function(a){f.trigge
rMethodOn(a,d,a,this)},this)},_displayedViews:function(a){return c.union([a],c.result(a,"_getNestedViews")||[])},_ensureElement:function(){if(c.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0]),!this.$el||0===this.$el.length){if(this.getOption("allowMissingEl"))return!1;throw new f.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(a){if(!a)throw new f.Error({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(a.isDestroyed)throw new f.Error({name:"ViewDestroyedError",message:'View (cid: "'+a.cid+'") has already been destroyed and cannot be used.'})},getEl:function(a){return b.$(a,f._getValue(this.options.parentEl,this))},attachHtml:function(a){this.$el.contents().detach(),this.el.appendChild(a.el)},empty:function(a){var b=this.currentView,c=f._getValue(a,"preventDestroy",this);return b?(b.off("destroy",this.empty,this),this.triggerMethod("before
:empty",b),c||this._destroyView(),this.triggerMethod("empty",b),delete this.currentView,c&&this.$el.contents().detach(),this):void 0},_destroyView:function(){var a=this.currentView;a.destroy&&!a.isDestroyed?a.destroy():a.remove&&(a.remove(),a.isDestroyed=!0)},attachView:function(a){return this.currentView=a,this},hasView:function(){return!!this.currentView},reset:function(){return this.empty(),this.$el&&(this.el=this.$el.selector),delete this.$el,this}},{buildRegion:function(a,b){if(c.isString(a))return this._buildRegionFromSelector(a,b);if(a.selector||a.el||a.regionClass)return this._buildRegionFromObject(a,b);if(c.isFunction(a))return this._buildRegionFromRegionClass(a);throw new f.Error({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})},_buildRegionFromSelector:function(a,b){return new b({el:a})},_buildRegionFromObject:function(a,b){var d=a.regionClass||b,e=c.omit(a,"selector","regionClass");return a.selector&&!e.el&&(e.el=a.
selector),new d(e)},_buildRegionFromRegionClass:function(a){return new a}}),f.RegionManager=f.Controller.extend({constructor:function(a){this._regions={},this.length=0,f.Controller.call(this,a),this.addRegions(this.getOption("regions"))},addRegions:function(a,b){return a=f._getValue(a,this,arguments),c.reduce(a,function(a,d,e){return c.isString(d)&&(d={selector:d}),d.selector&&(d=c.defaults({},d,b)),a[e]=this.addRegion(e,d),a},{},this)},addRegion:function(a,b){var c;return c=b instanceof f.Region?b:f.Region.buildRegion(b,f.Region),this.triggerMethod("before:add:region",a,c),c._parent=this,this._store(a,c),this.triggerMethod("add:region",a,c),c},get:function(a){return this._regions[a]},getRegions:function(){return c.clone(this._regions)},removeRegion:function(a){var b=this._regions[a];return this._remove(a,b),b},removeRegions:function(){var a=this.getRegions();return c.each(this._regions,function(a,b){this._remove(b,a)},this),a},emptyRegions:function(){var a=this.getRegions();return
c.invoke(a,"empty"),a},destroy:function(){return this.removeRegions(),f.Controller.prototype.destroy.apply(this,arguments)},_store:function(a,b){this._regions[a]||this.length++,this._regions[a]=b},_remove:function(a,b){this.triggerMethod("before:remove:region",a,b),b.empty(),b.stopListening(),delete b._parent,delete this._regions[a],this.length--,this.triggerMethod("remove:region",a,b)}}),f.actAsCollection(f.RegionManager.prototype,"_regions"),f.TemplateCache=function(a){this.templateId=a},c.extend(f.TemplateCache,{templateCaches:{},get:function(a,b){var c=this.templateCaches[a];return c||(c=new f.TemplateCache(a),this.templateCaches[a]=c),c.load(b)},clear:function(){var a,b=c.toArray(arguments),d=b.length;if(d>0)for(a=0;d>a;a++)delete this.templateCaches[b[a]];else this.templateCaches={}}}),c.extend(f.TemplateCache.prototype,{load:function(a){if(this.compiledTemplate)return this.compiledTemplate;var b=this.loadTemplate(this.templateId,a);return this.compiledTemplate=this.compileTem
plate(b,a),this.compiledTemplate},loadTemplate:function(a){var c=b.$(a).html();if(!c||0===c.length)throw new f.Error({name:"NoTemplateError",message:'Could not find template: "'+a+'"'});return c},compileTemplate:function(a,b){return c.template(a,b)}}),f.Renderer={render:function(a,b){if(!a)throw new f.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var d=c.isFunction(a)?a:f.TemplateCache.get(a);return d(b)}},f.View=b.View.extend({isDestroyed:!1,constructor:function(a){c.bindAll(this,"render"),a=f._getValue(a,this),this.options=c.extend({},c.result(this,"options"),a),this._behaviors=f.Behaviors(this),b.View.call(this,this.options),f.MonitorDOMRefresh(this)},getTemplate:function(){return this.getOption("template")},serializeModel:function(a){return a.toJSON.apply(a,c.rest(arguments))},mixinTemplateHelpers:function(a){a=a||{};var b=this.getOption("templateHelpers");return b=f._getValue(b,this),c.extend(a,b)},normalizeUIKeys
:function(a){var b=c.result(this,"_uiBindings");return f.normalizeUIKeys(a,b||c.result(this,"ui"))},normalizeUIValues:function(a,b){var d=c.result(this,"ui"),e=c.result(this,"_uiBindings");return f.normalizeUIValues(a,e||d,b)},configureTriggers:function(){if(this.triggers){var a=this.normalizeUIKeys(c.result(this,"triggers"));return c.reduce(a,function(a,b,c){return a[c]=this._buildViewTrigger(b),a},{},this)}},delegateEvents:function(a){return this._delegateDOMEvents(a),this.bindEntityEvents(this.model,this.getOption("modelEvents")),this.bindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.bindEntityEvents(this.model,a.getOption("modelEvents")),a.bindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_delegateDOMEvents:function(a){var d=f._getValue(a||this.events,this);d=this.normalizeUIKeys(d),c.isUndefined(a)&&(this.events=d);var e={},g=c.result(this,"behaviorEvents")||{},h=this.configureTriggers(),i=c.re
sult(this,"behaviorTriggers")||{};c.extend(e,g,d,h,i),b.View.prototype.delegateEvents.call(this,e)},undelegateEvents:function(){return b.View.prototype.undelegateEvents.apply(this,arguments),this.unbindEntityEvents(this.model,this.getOption("modelEvents")),this.unbindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.unbindEntityEvents(this.model,a.getOption("modelEvents")),a.unbindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_ensureViewIsIntact:function(){if(this.isDestroyed)throw new f.Error({name:"ViewDestroyedError",message:'View (cid: "'+this.cid+'") has already been destroyed and cannot be used.'})},destroy:function(){if(this.isDestroyed)return this;var a=c.toArray(arguments);return this.triggerMethod.apply(this,["before:destroy"].concat(a)),this.isDestroyed=!0,this.triggerMethod.apply(this,["destroy"].concat(a)),this.unbindUIElements(),this.isRendered=!1,this.remove(),c.invoke(this._behaviors,"de
stroy",a),this},bindUIElements:function(){this._bindUIElements(),c.invoke(this._behaviors,this._bindUIElements)},_bindUIElements:function(){if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var a=c.result(this,"_uiBindings");this.ui={},c.each(a,function(a,b){this.ui[b]=this.$(a)},this)}},unbindUIElements:function(){this._unbindUIElements(),c.invoke(this._behaviors,this._unbindUIElements)},_unbindUIElements:function(){this.ui&&this._uiBindings&&(c.each(this.ui,function(a,b){delete this.ui[b]},this),this.ui=this._uiBindings,delete this._uiBindings)},_buildViewTrigger:function(a){var b=c.isObject(a),d=c.defaults({},b?a:{},{preventDefault:!0,stopPropagation:!0}),e=b?d.event:a;return function(a){a&&(a.preventDefault&&d.preventDefault&&a.preventDefault(),a.stopPropagation&&d.stopPropagation&&a.stopPropagation());var b={view:this,model:this.model,collection:this.collection};this.triggerMethod(e,b)}},setElement:function(){var a=b.View.prototype.setElement.apply(this,arguments);return
c.invoke(this._behaviors,"proxyViewProperties",this),a},triggerMethod:function(){var a=f._triggerMethod(this,arguments);return this._triggerEventOnBehaviors(arguments),this._triggerEventOnParentLayout(arguments[0],c.rest(arguments)),a},_triggerEventOnBehaviors:function(a){for(var b=f._triggerMethod,c=this._behaviors,d=0,e=c&&c.length;e>d;d++)b(c[d],a)},_triggerEventOnParentLayout:function(a,b){var d=this._parentLayoutView();if(d){var e=f.getOption(d,"childViewEventPrefix"),g=e+":"+a;f._triggerMethod(d,[g,this].concat(b));var h=f.getOption(d,"childEvents"),i=d.normalizeMethods(h);i&&c.isFunction(i[a])&&i[a].apply(d,[this].concat(b))}},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var a=this._getImmediateChildren();return a.length?c.reduce(a,function(a,b){return b._getNestedViews?a.concat(b._getNestedViews()):a},a):a},_getAncestors:function(){for(var a=[],b=this._parent;b;)a.push(b),b=b._parent;return a},_parentLayoutView:function(){var a=this._getAncestors();
return c.find(a,function(a){return a instanceof f.LayoutView})},normalizeMethods:f.normalizeMethods,mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.ItemView=f.View.extend({constructor:function(){f.View.apply(this,arguments)},serializeData:function(){if(!this.model&&!this.collection)return{};var a=[this.model||this.collection];return arguments.length&&a.push.apply(a,arguments),this.model?this.serializeModel.apply(this,a):{items:this.serializeCollection.apply(this,a)}},serializeCollection:function(a){return a.toJSON.apply(a,c.rest(arguments))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderTemplate(),this.isRendered=!0,this.bindUIElements(),this.triggerMethod("render",this),this},_renderTemplate:function(){var a=this.getTemplate();if(a!==!1){if(!a)throw new f.Error({name:"UndefinedTemplateError",message:"Cannot render the template s
ince it is null or undefined."});var b=this.mixinTemplateHelpers(this.serializeData()),c=f.Renderer.render(a,b,this);return this.attachElContent(c),this}},attachElContent:function(a){return this.$el.html(a),this}}),f.CollectionView=f.View.extend({childViewEventPrefix:"childview",sort:!0,constructor:function(){this.once("render",this._initialEvents),this._initChildViewStorage(),f.View.apply(this,arguments),this.on("show",this._onShowCalled),this.initRenderBuffer()},initRenderBuffer:function(){this._bufferedChildren=[]},startBuffering:function(){this.initRenderBuffer(),this.isBuffering=!0},endBuffering:function(){this.isBuffering=!1,this._triggerBeforeShowBufferedChildren(),this.attachBuffer(this),this._triggerShowBufferedChildren(),this.initRenderBuffer()},_triggerBeforeShowBufferedChildren:function(){this._isShown&&c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"before:show"))},_triggerShowBufferedChildren:function(){this._isShown&&(c.each(this._bufferedChildren,
c.partial(this._triggerMethodOnChild,"show")),this._bufferedChildren=[])},_triggerMethodOnChild:function(a,b){f.triggerMethodOn(b,a)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this.render),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(a,b,d){var e;if(e=void 0!==d.at?d.at:c.indexOf(this._filteredSortedModels(),a),this._shouldAddChild(a,e)){this.destroyEmptyView();var f=this.getChildView(a);this.addChild(a,f,e)}},_onCollectionRemove:function(a){var b=this.children.findByModel(a);this.removeChildView(b),this.checkEmpty()},_onShowCalled:function(){this.children.each(c.partial(this._triggerMethodOnChild,"show"))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderChildren(),this.isRendered=!0,this.triggerMethod("re
nder",this),this},reorder:function(){var a=this.children,b=this._filteredSortedModels(),d=c.find(b,function(b){return!a.findByModel(b)});if(d)this.render();else{var e=c.map(b,function(b){return a.findByModel(b).el});this.triggerMethod("before:reorder"),this._appendReorderedChildren(e),this.triggerMethod("reorder")}},resortView:function(){f.getOption(this,"reorderOnSort")?this.reorder():this.render()},_sortViews:function(){var a=this._filteredSortedModels(),b=c.find(a,function(a,b){var c=this.children.findByModel(a);return!c||c._index!==b},this);b&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(a){this.$el.append(a)},_renderChildren:function(){this.destroyEmptyView(),this.destroyChildren(),this.isEmpty(this.collection)?this.showEmptyView():(this.triggerMethod("before:render:collection",this),this.startBuffering(),this.showCollection(),this.endBuffering(),this.triggerMethod("render:collection",this),this.children.isEmpty()&&this.showEmptyView())},showCollectio
n:function(){var a,b=this._filteredSortedModels();c.each(b,function(b,c){a=this.getChildView(b),this.addChild(b,a,c)},this)},_filteredSortedModels:function(){var a,b=this.getViewComparator();return a=b?c.isString(b)||1===b.length?this.collection.sortBy(b,this):c.clone(this.collection.models).sort(c.bind(b,this)):this.collection.models,this.getOption("filter")&&(a=c.filter(a,function(a,b){return this._shouldAddChild(a,b)},this)),a},showEmptyView:function(){var a=this.getEmptyView();if(a&&!this._showingEmptyView){this.triggerMethod("before:render:empty"),this._showingEmptyView=!0;var c=new b.Model;this.addEmptyView(c,a),this.triggerMethod("render:empty")}},destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty"),this.destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty"))},getEmptyView:function(){return this.getOption("emptyView")},addEmptyView:function(a,b){var d=this.getOption("emptyViewOptions")||this.getOption("chil
dViewOptions");c.isFunction(d)&&(d=d.call(this,a,this._emptyViewIndex));var e=this.buildChildView(a,b,d);e._parent=this,this.proxyChildEvents(e),this._isShown&&f.triggerMethodOn(e,"before:show"),this.children.add(e),this.renderChildView(e,this._emptyViewIndex),this._isShown&&f.triggerMethodOn(e,"show")},getChildView:function(){var a=this.getOption("childView");if(!a)throw new f.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return a},addChild:function(a,b,c){var d=this.getOption("childViewOptions");d=f._getValue(d,this,[a,c]);var e=this.buildChildView(a,b,d);return this._updateIndices(e,!0,c),this._addChildView(e,c),e._parent=this,e},_updateIndices:function(a,b,c){this.getOption("sort")&&(b&&(a._index=c),this.children.each(function(c){c._index>=a._index&&(c._index+=b?1:-1)}))},_addChildView:function(a,b){this.proxyChildEvents(a),this.triggerMethod("before:add:child",a),this._isShown&&!this.isBuffering&&f.triggerMethodOn(a,"before:show"),this.children.add(
a),this.renderChildView(a,b),this._isShown&&!this.isBuffering&&f.triggerMethodOn(a,"show"),this.triggerMethod("add:child",a)},renderChildView:function(a,b){return a.render(),this.attachHtml(this,a,b),a},buildChildView:function(a,b,d){var e=c.extend({model:a},d);return new b(e)},removeChildView:function(a){return a&&(this.triggerMethod("before:remove:child",a),a.destroy?a.destroy():a.remove&&a.remove(),delete a._parent,this.stopListening(a),this.children.remove(a),this.triggerMethod("remove:child",a),this._updateIndices(a,!1)),a},isEmpty:function(){return!this.collection||0===this.collection.length},checkEmpty:function(){this.isEmpty(this.collection)&&this.showEmptyView()},attachBuffer:function(a){a.$el.append(this._createBuffer(a))},_createBuffer:function(a){var b=document.createDocumentFragment();return c.each(a._bufferedChildren,function(a){b.appendChild(a.el)}),b},attachHtml:function(a,b,c){a.isBuffering?a._bufferedChildren.splice(c,0,b):a._insertBefore(b,c)||a._insertAfter(b)},_
insertBefore:function(a,b){var c,d=this.getOption("sort")&&b<this.children.length-1;return d&&(c=this.children.find(function(a){return a._index===b+1})),c?(c.$el.before(a.el),!0):!1},_insertAfter:function(a){this.$el.append(a.el)},_initChildViewStorage:function(){this.children=new b.ChildViewContainer},destroy:function(){return this.isDestroyed?this:(this.triggerMethod("before:destroy:collection"),this.destroyChildren(),this.triggerMethod("destroy:collection"),f.View.prototype.destroy.apply(this,arguments))},destroyChildren:function(){var a=this.children.map(c.identity);return this.children.each(this.removeChildView,this),this.checkEmpty(),a},_shouldAddChild:function(a,b){var d=this.getOption("filter");return!c.isFunction(d)||d.call(this,a,b,this.collection)},proxyChildEvents:function(a){var b=this.getOption("childViewEventPrefix");this.listenTo(a,"all",function(){var d=c.toArray(arguments),e=d[0],f=this.normalizeMethods(c.result(this,"childEvents"));d[0]=b+":"+e,d.splice(1,0,a),"un
defined"!=typeof f&&c.isFunction(f[e])&&f[e].apply(this,d.slice(1)),this.triggerMethod.apply(this,d)})},_getImmediateChildren:function(){return c.values(this.children._views)},getViewComparator:function(){return this.getOption("viewComparator")}}),f.CompositeView=f.CollectionView.extend({constructor:function(){f.CollectionView.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this._renderChildren),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},getChildView:function(){var a=this.getOption("childView")||this.constructor;return a},serializeData:function(){var a={};return this.model&&(a=c.partial(this.serializeModel,this.model).apply(this,arguments)),a},render:function(){return this._ensureViewIsIntact(),this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("bef
ore:render",this),this._renderTemplate(),this._renderChildren(),this._isRendering=!1,this.isRendered=!0,this.triggerMethod("render",this),this},_renderChildren:function(){(this.isRendered||this._isRendering)&&f.CollectionView.prototype._renderChildren.call(this)},_renderTemplate:function(){var a={};a=this.serializeData(),a=this.mixinTemplateHelpers(a),this.triggerMethod("before:render:template");var b=this.getTemplate(),c=f.Renderer.render(b,a,this);this.attachElContent(c),this.bindUIElements(),this.triggerMethod("render:template")},attachElContent:function(a){return this.$el.html(a),this},attachBuffer:function(a){var b=this.getChildViewContainer(a);b.append(this._createBuffer(a))},_insertAfter:function(a){var b=this.getChildViewContainer(this,a);b.append(a.el)},_appendReorderedChildren:function(a){var b=this.getChildViewContainer(this);b.append(a)},getChildViewContainer:function(a){if("$childViewContainer"in a)return a.$childViewContainer;var b,c=f.getOption(a,"childViewContainer")
;if(c){var d=f._getValue(c,a);if(b="@"===d.charAt(0)&&a.ui?a.ui[d.substr(4)]:a.$(d),b.length<=0)throw new f.Error({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+a.childViewContainer})
-}else b=a.$el;return a.$childViewContainer=b,b},resetChildViewContainer:function(){this.$childViewContainer&&delete this.$childViewContainer}}),f.LayoutView=f.ItemView.extend({regionClass:f.Region,options:{destroyImmediate:!1},childViewEventPrefix:"childview",constructor:function(a){a=a||{},this._firstRender=!0,this._initializeRegions(a),f.ItemView.call(this,a)},render:function(){return this._ensureViewIsIntact(),this._firstRender?this._firstRender=!1:this._reInitializeRegions(),f.ItemView.prototype.render.apply(this,arguments)},destroy:function(){return this.isDestroyed?this:(this.getOption("destroyImmediate")===!0&&this.$el.remove(),this.regionManager.destroy(),f.ItemView.prototype.destroy.apply(this,arguments))},showChildView:function(a,b){return this.getRegion(a).show(b)},getChildView:function(a){return this.getRegion(a).currentView},addRegion:function(a,b){var c={};return c[a]=b,this._buildRegions(c)[a]},addRegions:function(a){return this.regions=c.extend({},this.regions,a),thi
s._buildRegions(a)},removeRegion:function(a){return delete this.regions[a],this.regionManager.removeRegion(a)},getRegion:function(a){return this.regionManager.get(a)},getRegions:function(){return this.regionManager.getRegions()},_buildRegions:function(a){var b={regionClass:this.getOption("regionClass"),parentEl:c.partial(c.result,this,"el")};return this.regionManager.addRegions(a,b)},_initializeRegions:function(a){var b;this._initRegionManager(),b=f._getValue(this.regions,this,[a])||{};var d=this.getOption.call(a,"regions");d=f._getValue(d,this,[a]),c.extend(b,d),b=this.normalizeUIValues(b,["selector","el"]),this.addRegions(b)},_reInitializeRegions:function(){this.regionManager.invoke("reset")},getRegionManager:function(){return new f.RegionManager},_initRegionManager:function(){this.regionManager=this.getRegionManager(),this.regionManager._parent=this,this.listenTo(this.regionManager,"before:add:region",function(a){this.triggerMethod("before:add:region",a)}),this.listenTo(this.regi
onManager,"add:region",function(a,b){this[a]=b,this.triggerMethod("add:region",a,b)}),this.listenTo(this.regionManager,"before:remove:region",function(a){this.triggerMethod("before:remove:region",a)}),this.listenTo(this.regionManager,"remove:region",function(a,b){delete this[a],this.triggerMethod("remove:region",a,b)})},_getImmediateChildren:function(){return c.chain(this.regionManager.getRegions()).pluck("currentView").compact().value()}}),f.Behavior=f.Object.extend({constructor:function(a,b){this.view=b,this.defaults=c.result(this,"defaults")||{},this.options=c.extend({},this.defaults,a),this.ui=c.extend({},c.result(b,"ui"),c.result(this,"ui")),f.Object.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this},proxyViewProperties:function(a){this.$el=a.$el,this.el=a.el}}),f.Behaviors=function(a,b){function c(a,d){return b.isObject(a.behaviors)?(d=c.parseBehaviors(a,d||b.result(a,"behaviors")),c.wrap(a,d,
b.keys(g)),d):{}}function d(a,b){this._view=a,this._behaviors=b,this._triggers={}}function e(a){return a._uiBindings||a.ui}var f=/^(\S+)\s*(.*)$/,g={behaviorTriggers:function(a,b){var c=new d(this,b);return c.buildBehaviorTriggers()},behaviorEvents:function(c,d){var g={};return b.each(d,function(c,d){var h={},i=b.clone(b.result(c,"events"))||{};i=a.normalizeUIKeys(i,e(c));var j=0;b.each(i,function(a,e){var g=e.match(f),i=g[1]+"."+[this.cid,d,j++," "].join(""),k=g[2],l=i+k,m=b.isFunction(a)?a:c[a];h[l]=b.bind(m,c)},this),g=b.extend(g,h)},this),g}};return b.extend(c,{behaviorsLookup:function(){throw new a.Error({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.html#behaviorslookup"})},getBehaviorClass:function(b,d){return b.behaviorClass?b.behaviorClass:a._getValue(c.behaviorsLookup,this,[b,d])[d]},parseBehaviors:function(a,d){return b.chain(d).map(function(d,e){var f=c.getBehaviorClass(d,e),g=new f(d,a),h=c.parseBehaviors(a,b.result(g,"behaviors"))
;return[g].concat(h)}).flatten().value()},wrap:function(a,c,d){b.each(d,function(d){a[d]=b.partial(g[d],a[d],c)})}}),b.extend(d.prototype,{buildBehaviorTriggers:function(){return b.each(this._behaviors,this._buildTriggerHandlersForBehavior,this),this._triggers},_buildTriggerHandlersForBehavior:function(c,d){var f=b.clone(b.result(c,"triggers"))||{};f=a.normalizeUIKeys(f,e(c)),b.each(f,b.bind(this._setHandlerForBehavior,this,c,d))},_setHandlerForBehavior:function(a,b,c,d){var e=d.replace(/^\S+/,function(a){return a+".behaviortriggers"+b});this._triggers[e]=this._view._buildViewTrigger(c)}}),c}(f,c),f.AppRouter=b.Router.extend({constructor:function(a){this.options=a||{},b.Router.apply(this,arguments);var c=this.getOption("appRoutes"),d=this._getController();this.processAppRoutes(d,c),this.on("route",this._processOnRoute,this)},appRoute:function(a,b){var c=this._getController();this._addAppRoute(c,a,b)},_processOnRoute:function(a,b){if(c.isFunction(this.onRoute)){var d=c.invert(this.ge
tOption("appRoutes"))[a];this.onRoute(a,d,b)}},processAppRoutes:function(a,b){if(b){var d=c.keys(b).reverse();c.each(d,function(c){this._addAppRoute(a,c,b[c])},this)}},_getController:function(){return this.getOption("controller")},_addAppRoute:function(a,b,d){var e=a[d];if(!e)throw new f.Error('Method "'+d+'" was not found on the controller');this.route(b,d,c.bind(e,a))},mergeOptions:f.mergeOptions,getOption:f.proxyGetOption,triggerMethod:f.triggerMethod,bindEntityEvents:f.proxyBindEntityEvents,unbindEntityEvents:f.proxyUnbindEntityEvents}),f.Application=f.Object.extend({constructor:function(a){this._initializeRegions(a),this._initCallbacks=new f.Callbacks,this.submodules={},c.extend(this,a),this._initChannel(),f.Object.call(this,a)},execute:function(){this.commands.execute.apply(this.commands,arguments)},request:function(){return this.reqres.request.apply(this.reqres,arguments)},addInitializer:function(a){this._initCallbacks.add(a)},start:function(a){this.triggerMethod("before:star
t",a),this._initCallbacks.run(a,this),this.triggerMethod("start",a)},addRegions:function(a){return this._regionManager.addRegions(a)},emptyRegions:function(){return this._regionManager.emptyRegions()},removeRegion:function(a){return this._regionManager.removeRegion(a)},getRegion:function(a){return this._regionManager.get(a)},getRegions:function(){return this._regionManager.getRegions()},module:function(a,b){var d=f.Module.getClass(b),e=c.toArray(arguments);return e.unshift(this),d.create.apply(d,e)},getRegionManager:function(){return new f.RegionManager},_initializeRegions:function(a){var b=c.isFunction(this.regions)?this.regions(a):this.regions||{};this._initRegionManager();var d=f.getOption(a,"regions");return c.isFunction(d)&&(d=d.call(this,a)),c.extend(b,d),this.addRegions(b),this},_initRegionManager:function(){this._regionManager=this.getRegionManager(),this._regionManager._parent=this,this.listenTo(this._regionManager,"before:add:region",function(){f._triggerMethod(this,"befor
e:add:region",arguments)}),this.listenTo(this._regionManager,"add:region",function(a,b){this[a]=b,f._triggerMethod(this,"add:region",arguments)}),this.listenTo(this._regionManager,"before:remove:region",function(){f._triggerMethod(this,"before:remove:region",arguments)}),this.listenTo(this._regionManager,"remove:region",function(a){delete this[a],f._triggerMethod(this,"remove:region",arguments)})},_initChannel:function(){this.channelName=c.result(this,"channelName")||"global",this.channel=c.result(this,"channel")||b.Wreqr.radio.channel(this.channelName),this.vent=c.result(this,"vent")||this.channel.vent,this.commands=c.result(this,"commands")||this.channel.commands,this.reqres=c.result(this,"reqres")||this.channel.reqres}}),f.Module=function(a,b,d){this.moduleName=a,this.options=c.extend({},this.options,d),this.initialize=d.initialize||this.initialize,this.submodules={},this._setupInitializersAndFinalizers(),this.app=b,c.isFunction(this.initialize)&&this.initialize(a,b,this.options)
},f.Module.extend=f.extend,c.extend(f.Module.prototype,b.Events,{startWithParent:!0,initialize:function(){},addInitializer:function(a){this._initializerCallbacks.add(a)},addFinalizer:function(a){this._finalizerCallbacks.add(a)},start:function(a){this._isInitialized||(c.each(this.submodules,function(b){b.startWithParent&&b.start(a)}),this.triggerMethod("before:start",a),this._initializerCallbacks.run(a,this),this._isInitialized=!0,this.triggerMethod("start",a))},stop:function(){this._isInitialized&&(this._isInitialized=!1,this.triggerMethod("before:stop"),c.invoke(this.submodules,"stop"),this._finalizerCallbacks.run(void 0,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),this.triggerMethod("stop"))},addDefinition:function(a,b){this._runModuleDefinition(a,b)},_runModuleDefinition:function(a,d){if(a){var e=c.flatten([this,this.app,b,f,b.$,c,d]);a.apply(this,e)}},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new f.Callbacks,this._finalize
rCallbacks=new f.Callbacks},triggerMethod:f.triggerMethod}),c.extend(f.Module,{create:function(a,b,d){var e=a,f=c.drop(arguments,3);b=b.split(".");var g=b.length,h=[];return h[g-1]=d,c.each(b,function(b,c){var g=e;e=this._getModule(g,b,a,d),this._addModuleDefinition(g,e,h[c],f)},this),e},_getModule:function(a,b,d,e){var f=c.extend({},e),g=this.getClass(e),h=a[b];return h||(h=new g(b,d,f),a[b]=h,a.submodules[b]=h),h},getClass:function(a){var b=f.Module;return a?a.prototype instanceof b?a:a.moduleClass||b:b},_addModuleDefinition:function(a,b,c,d){var e=this._getDefine(c),f=this._getStartWithParent(c,b);e&&b.addDefinition(e,d),this._addStartWithParent(a,b,f)},_getStartWithParent:function(a,b){var d;return c.isFunction(a)&&a.prototype instanceof f.Module?(d=b.constructor.prototype.startWithParent,c.isUndefined(d)?!0:d):c.isObject(a)?(d=a.startWithParent,c.isUndefined(d)?!0:d):!0},_getDefine:function(a){return!c.isFunction(a)||a.prototype instanceof f.Module?c.isObject(a)?a.define:null:a
},_addStartWithParent:function(a,b,c){b.startWithParent=b.startWithParent&&c,b.startWithParent&&!b.startWithParentIsConfigured&&(b.startWithParentIsConfigured=!0,a.addInitializer(function(a){b.startWithParent&&b.start(a)}))}}),f});
-//# sourceMappingURL=backbone.marionette.min.js.map
\ No newline at end of file
[27/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/d3-3.5.5.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/d3-3.5.5.js b/htrace-core/src/web/lib/js/d3-3.5.5.js
deleted file mode 100644
index 3af706a..0000000
--- a/htrace-core/src/web/lib/js/d3-3.5.5.js
+++ /dev/null
@@ -1,9504 +0,0 @@
-!function() {
- var d3 = {
- version: "3.5.5"
- };
- var d3_arraySlice = [].slice, d3_array = function(list) {
- return d3_arraySlice.call(list);
- };
- var d3_document = this.document;
- function d3_documentElement(node) {
- return node && (node.ownerDocument || node.document || node).documentElement;
- }
- function d3_window(node) {
- return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);
- }
- if (d3_document) {
- try {
- d3_array(d3_document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = function(list) {
- var i = list.length, array = new Array(i);
- while (i--) array[i] = list[i];
- return array;
- };
- }
- }
- if (!Date.now) Date.now = function() {
- return +new Date();
- };
- if (d3_document) {
- try {
- d3_document.createElement("DIV").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_element_prototype.setAttribute = function(name, value) {
- d3_element_setAttribute.call(this, name, value + "");
- };
- d3_element_prototype.setAttributeNS = function(space, local, value) {
- d3_element_setAttributeNS.call(this, space, local, value + "");
- };
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- }
- d3.ascending = d3_ascending;
- function d3_ascending(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- }
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n) if ((b = array[i]) != null && b >= b) {
- a = b;
- break;
- }
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
- a = b;
- break;
- }
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n) if ((b = array[i]) != null && b >= b) {
- a = b;
- break;
- }
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
- a = b;
- break;
- }
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n) if ((b = array[i]) != null && b >= b) {
- a = c = b;
- break;
- }
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
- a = c = b;
- break;
- }
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- function d3_number(x) {
- return x === null ? NaN : +x;
- }
- function d3_numeric(x) {
- return !isNaN(x);
- }
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (d3_numeric(a = +array[i])) s += a;
- } else {
- while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- d3.mean = function(array, f) {
- var s = 0, n = array.length, a, i = -1, j = n;
- if (arguments.length === 1) {
- while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;
- } else {
- while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;
- }
- if (j) return s / j;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.median = function(array, f) {
- var numbers = [], n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);
- } else {
- while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);
- }
- if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);
- };
- d3.variance = function(array, f) {
- var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) {
- if (d3_numeric(a = d3_number(array[i]))) {
- d = a - m;
- m += d / ++j;
- s += d * (a - m);
- }
- }
- } else {
- while (++i < n) {
- if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {
- d = a - m;
- m += d / ++j;
- s += d * (a - m);
- }
- }
- }
- if (j > 1) return s / (j - 1);
- };
- d3.deviation = function() {
- var v = d3.variance.apply(this, arguments);
- return v ? Math.sqrt(v) : v;
- };
- function d3_bisector(compare) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- }
- var d3_bisect = d3_bisector(d3_ascending);
- d3.bisectLeft = d3_bisect.left;
- d3.bisect = d3.bisectRight = d3_bisect.right;
- d3.bisector = function(f) {
- return d3_bisector(f.length === 1 ? function(d, x) {
- return d3_ascending(f(d), x);
- } : f);
- };
- d3.shuffle = function(array, i0, i1) {
- if ((m = arguments.length) < 3) {
- i1 = array.length;
- if (m < 2) i0 = 0;
- }
- var m = i1 - i0, t, i;
- while (m) {
- i = Math.random() * m-- | 0;
- t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;
- }
- return array;
- };
- d3.permute = function(array, indexes) {
- var i = indexes.length, permutes = new Array(i);
- while (i--) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.pairs = function(array) {
- var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);
- while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];
- return pairs;
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- function d3_zipLength(d) {
- return d.length;
- }
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.merge = function(arrays) {
- var n = arrays.length, m, i = -1, j = 0, merged, array;
- while (++i < n) j += arrays[i].length;
- merged = new Array(j);
- while (--n >= 0) {
- array = arrays[n];
- m = array.length;
- while (--m >= 0) {
- merged[--j] = array[m];
- }
- }
- return merged;
- };
- var abs = Math.abs;
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_class(ctor, properties) {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- }
- d3.map = function(object, f) {
- var map = new d3_Map();
- if (object instanceof d3_Map) {
- object.forEach(function(key, value) {
- map.set(key, value);
- });
- } else if (Array.isArray(object)) {
- var i = -1, n = object.length, o;
- if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);
- } else {
- for (var key in object) map.set(key, object[key]);
- }
- return map;
- };
- function d3_Map() {
- this._ = Object.create(null);
- }
- var d3_map_proto = "__proto__", d3_map_zero = "\x00";
- d3_class(d3_Map, {
- has: d3_map_has,
- get: function(key) {
- return this._[d3_map_escape(key)];
- },
- set: function(key, value) {
- return this._[d3_map_escape(key)] = value;
- },
- remove: d3_map_remove,
- keys: d3_map_keys,
- values: function() {
- var values = [];
- for (var key in this._) values.push(this._[key]);
- return values;
- },
- entries: function() {
- var entries = [];
- for (var key in this._) entries.push({
- key: d3_map_unescape(key),
- value: this._[key]
- });
- return entries;
- },
- size: d3_map_size,
- empty: d3_map_empty,
- forEach: function(f) {
- for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);
- }
- });
- function d3_map_escape(key) {
- return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;
- }
- function d3_map_unescape(key) {
- return (key += "")[0] === d3_map_zero ? key.slice(1) : key;
- }
- function d3_map_has(key) {
- return d3_map_escape(key) in this._;
- }
- function d3_map_remove(key) {
- return (key = d3_map_escape(key)) in this._ && delete this._[key];
- }
- function d3_map_keys() {
- var keys = [];
- for (var key in this._) keys.push(d3_map_unescape(key));
- return keys;
- }
- function d3_map_size() {
- var size = 0;
- for (var key in this._) ++size;
- return size;
- }
- function d3_map_empty() {
- for (var key in this._) return false;
- return true;
- }
- d3.nest = function() {
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- function map(mapType, array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- if (mapType) {
- object = mapType();
- setter = function(keyValue, values) {
- object.set(keyValue, map(mapType, values, depth));
- };
- } else {
- object = {};
- setter = function(keyValue, values) {
- object[keyValue] = map(mapType, values, depth);
- };
- }
- valuesByKey.forEach(setter);
- return object;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var array = [], sortKey = sortKeys[depth++];
- map.forEach(function(key, keyMap) {
- array.push({
- key: key,
- values: entries(keyMap, depth)
- });
- });
- return sortKey ? array.sort(function(a, b) {
- return sortKey(a.key, b.key);
- }) : array;
- }
- nest.map = function(array, mapType) {
- return map(mapType, array, 0);
- };
- nest.entries = function(array) {
- return entries(map(d3.map, array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.set = function(array) {
- var set = new d3_Set();
- if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);
- return set;
- };
- function d3_Set() {
- this._ = Object.create(null);
- }
- d3_class(d3_Set, {
- has: d3_map_has,
- add: function(key) {
- this._[d3_map_escape(key += "")] = true;
- return key;
- },
- remove: d3_map_remove,
- values: d3_map_keys,
- size: d3_map_size,
- empty: d3_map_empty,
- forEach: function(f) {
- for (var key in this._) f.call(this, d3_map_unescape(key));
- }
- });
- d3.behavior = {};
- function d3_identity(d) {
- return d;
- }
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return value === source ? target : value;
- };
- }
- function d3_vendorSymbol(object, name) {
- if (name in object) return name;
- name = name.charAt(0).toUpperCase() + name.slice(1);
- for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {
- var prefixName = d3_vendorPrefixes[i] + name;
- if (prefixName in object) return prefixName;
- }
- }
- var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ];
- function d3_noop() {}
- d3.dispatch = function() {
- var dispatch = new d3_dispatch(), i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- function d3_dispatch() {}
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i >= 0) {
- name = type.slice(i + 1);
- type = type.slice(0, i);
- }
- if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- if (arguments.length === 2) {
- if (listener == null) for (type in this) {
- if (this.hasOwnProperty(type)) this[type].on(name, null);
- }
- return this;
- }
- };
- function d3_dispatch_event(dispatch) {
- var listeners = [], listenerByName = new d3_Map();
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- d3.event = null;
- function d3_eventPreventDefault() {
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch(), i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- var d3_subclass = {}.__proto__ ? function(object, prototype) {
- object.__proto__ = prototype;
- } : function(object, prototype) {
- for (var property in prototype) object[property] = prototype[property];
- };
- function d3_selection(groups) {
- d3_subclass(groups, d3_selectionPrototype);
- return groups;
- }
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectMatches = function(n, s) {
- var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")];
- d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- return d3_selectMatches(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = Sizzle;
- d3_selectMatches = Sizzle.matchesSelector;
- }
- d3.selection = function() {
- return d3.select(d3_document.documentElement);
- };
- var d3_selectionPrototype = d3.selection.prototype = [];
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i, j));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_selector(selector) {
- return typeof selector === "function" ? selector : function() {
- return d3_select(selector, this);
- };
- }
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_selectorAll(selector) {
- return typeof selector === "function" ? selector : function() {
- return d3_selectAll(selector, this);
- };
- }
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.slice(0, i);
- name = name.slice(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- function d3_selection_attr(name, value) {
- name = d3.ns.qualify(name);
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.getAttribute("class");
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classes(name) {
- return (name + "").trim().split(/^|\s+/);
- }
- function d3_selection_classed(name, value) {
- name = d3_selection_classes(name).map(d3_selection_classedName);
- var n = name.length;
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.getAttribute("class") || "";
- if (value) {
- re.lastIndex = 0;
- if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name));
- } else {
- node.setAttribute("class", d3_collapse(c.replace(re, " ")));
- }
- };
- }
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) {
- var node = this.node();
- return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);
- }
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- d3_selectionPrototype.text = function(value) {
- return arguments.length ? this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- }) : this.node().textContent;
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length ? this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- }) : this.node().innerHTML;
- };
- d3_selectionPrototype.append = function(name) {
- name = d3_selection_creator(name);
- return this.select(function() {
- return this.appendChild(name.apply(this, arguments));
- });
- };
- function d3_selection_creator(name) {
- function create() {
- var document = this.ownerDocument, namespace = this.namespaceURI;
- return namespace ? document.createElementNS(namespace, name) : document.createElement(name);
- }
- function createNS() {
- return this.ownerDocument.createElementNS(name.space, name.local);
- }
- return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;
- }
- d3_selectionPrototype.insert = function(name, before) {
- name = d3_selection_creator(name);
- before = d3_selection_selector(before);
- return this.select(function() {
- return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);
- });
- };
- d3_selectionPrototype.remove = function() {
- return this.each(d3_selectionRemove);
- };
- function d3_selectionRemove() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- }
- d3_selectionPrototype.data = function(value, key) {
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValue = key.call(node = group[i], node.__data__, i))) {
- exitNodes[i] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues[i] = keyValue;
- }
- for (i = -1; ++i < m; ) {
- if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- } else if (node !== true) {
- updateNodes[i] = node;
- node.__data__ = nodeData;
- }
- nodeByKeyValue.set(keyValue, true);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.get(keyValues[i]) !== true) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- }
- }
- for (;i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- }
- for (;i < n; ++i) {
- exitNodes[i] = group[i];
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- d3_selectionPrototype.datum = function(value) {
- return arguments.length ? this.property("__data__", value) : this.property("__data__");
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3_ascending;
- return function(a, b) {
- return a && b ? comparator(a.__data__, b.__data__) : !a - !b;
- };
- }
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- d3_selectionPrototype.call = function(callback) {
- var args = d3_array(arguments);
- callback.apply(args[0] = this, args);
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function() {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- d3_selectionPrototype.size = function() {
- var n = 0;
- d3_selection_each(this, function() {
- ++n;
- });
- return n;
- };
- function d3_selection_enter(selection) {
- d3_subclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.call = d3_selectionPrototype.call;
- d3_selection_enterPrototype.size = d3_selectionPrototype.size;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selection_enterPrototype.insert = function(name, before) {
- if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);
- return d3_selectionPrototype.insert.call(this, name, before);
- };
- function d3_selection_enterInsertBefore(enter) {
- var i0, j0;
- return function(d, i, j) {
- var group = enter[j].update, n = group.length, node;
- if (j != j0) j0 = j, i0 = 0;
- if (i >= i0) i0 = i + 1;
- while (!(node = group[i0]) && ++i0 < n) ;
- return node;
- };
- }
- d3.select = function(node) {
- var group;
- if (typeof node === "string") {
- group = [ d3_select(node, d3_document) ];
- group.parentNode = d3_document.documentElement;
- } else {
- group = [ node ];
- group.parentNode = d3_documentElement(node);
- }
- return d3_selection([ group ]);
- };
- d3.selectAll = function(nodes) {
- var group;
- if (typeof nodes === "string") {
- group = d3_array(d3_selectAll(nodes, d3_document));
- group.parentNode = d3_document.documentElement;
- } else {
- group = nodes;
- group.parentNode = null;
- }
- return d3_selection([ group ]);
- };
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- function d3_selection_on(type, listener, capture) {
- var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
- if (i > 0) type = type.slice(0, i);
- var filter = d3_selection_onFilters.get(type);
- if (filter) type = filter, wrap = d3_selection_onFilter;
- function onRemove() {
- var l = this[name];
- if (l) {
- this.removeEventListener(type, l, l.$);
- delete this[name];
- }
- }
- function onAdd() {
- var l = wrap(listener, d3_array(arguments));
- onRemove.call(this);
- this.addEventListener(type, this[name] = l, l.$ = capture);
- l._ = listener;
- }
- function removeAll() {
- var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match;
- for (var name in this) {
- if (match = name.match(re)) {
- var l = this[name];
- this.removeEventListener(match[1], l, l.$);
- delete this[name];
- }
- }
- }
- return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;
- }
- var d3_selection_onFilters = d3.map({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
- });
- if (d3_document) {
- d3_selection_onFilters.forEach(function(k) {
- if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
- });
- }
- function d3_selection_onListener(listener, argumentz) {
- return function(e) {
- var o = d3.event;
- d3.event = e;
- argumentz[0] = this.__data__;
- try {
- listener.apply(this, argumentz);
- } finally {
- d3.event = o;
- }
- };
- }
- function d3_selection_onFilter(listener, argumentz) {
- var l = d3_selection_onListener(listener, argumentz);
- return function(e) {
- var target = this, related = e.relatedTarget;
- if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {
- l.call(target, e);
- }
- };
- }
- var d3_event_dragSelect, d3_event_dragId = 0;
- function d3_event_dragSuppress(node) {
- var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window(node)).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault);
- if (d3_event_dragSelect == null) {
- d3_event_dragSelect = "onselectstart" in node ? false : d3_vendorSymbol(node.style, "userSelect");
- }
- if (d3_event_dragSelect) {
- var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];
- style[d3_event_dragSelect] = "none";
- }
- return function(suppressClick) {
- w.on(name, null);
- if (d3_event_dragSelect) style[d3_event_dragSelect] = select;
- if (suppressClick) {
- var off = function() {
- w.on(click, null);
- };
- w.on(click, function() {
- d3_eventPreventDefault();
- off();
- }, true);
- setTimeout(off, 0);
- }
- };
- }
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
- function d3_mousePoint(container, e) {
- if (e.changedTouches) e = e.changedTouches[0];
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0) {
- var window = d3_window(container);
- if (window.scrollX || window.scrollY) {
- svg = d3.select("body").append("svg").style({
- position: "absolute",
- top: 0,
- left: 0,
- margin: 0,
- padding: 0,
- border: "none"
- }, "important");
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- }
- if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX,
- point.y = e.clientY;
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- d3.touch = function(container, touches, identifier) {
- if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;
- if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {
- if ((touch = touches[i]).identifier === identifier) {
- return d3_mousePoint(container, touch);
- }
- }
- };
- d3.behavior.drag = function() {
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, "touchmove", "touchend");
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
- }
- function dragstart(id, position, subject, move, end) {
- return function() {
- var that = this, target = d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);
- if (origin) {
- dragOffset = origin.apply(that, arguments);
- dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];
- } else {
- dragOffset = [ 0, 0 ];
- }
- dispatch({
- type: "dragstart"
- });
- function moved() {
- var position1 = position(parent, dragId), dx, dy;
- if (!position1) return;
- dx = position1[0] - position0[0];
- dy = position1[1] - position0[1];
- dragged |= dx | dy;
- position0 = position1;
- dispatch({
- type: "drag",
- x: position1[0] + dragOffset[0],
- y: position1[1] + dragOffset[1],
- dx: dx,
- dy: dy
- });
- }
- function ended() {
- if (!position(parent, dragId)) return;
- dragSubject.on(move + dragName, null).on(end + dragName, null);
- dragRestore(dragged && d3.event.target === target);
- dispatch({
- type: "dragend"
- });
- }
- };
- }
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- function d3_behavior_dragTouchId() {
- return d3.event.changedTouches[0].identifier;
- }
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;
- function d3_sgn(x) {
- return x > 0 ? 1 : x < 0 ? -1 : 0;
- }
- function d3_cross2d(a, b, c) {
- return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
- }
- function d3_acos(x) {
- return x > 1 ? 0 : x < -1 ? π : Math.acos(x);
- }
- function d3_asin(x) {
- return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);
- }
- function d3_sinh(x) {
- return ((x = Math.exp(x)) - 1 / x) / 2;
- }
- function d3_cosh(x) {
- return ((x = Math.exp(x)) + 1 / x) / 2;
- }
- function d3_tanh(x) {
- return ((x = Math.exp(2 * x)) - 1) / (x + 1);
- }
- function d3_haversin(x) {
- return (x = Math.sin(x / 2)) * x;
- }
- var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;
- d3.interpolateZoom = function(p0, p1) {
- var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2];
- var dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1), dr = r1 - r0, S = (dr || Math.log(w1 / w0)) / ρ;
- function interpolate(t) {
- var s = t * S;
- if (dr) {
- var coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));
- return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];
- }
- return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * s) ];
- }
- interpolate.duration = S * 1e3;
- return interpolate;
- };
- d3.behavior.zoom = function() {
- var view = {
- x: 0,
- y: 0,
- k: 1
- }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1;
- if (!d3_behavior_zoomWheel) {
- d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
- return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
- }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
- return d3.event.wheelDelta;
- }, "mousewheel") : (d3_behavior_zoomDelta = function() {
- return -d3.event.detail;
- }, "MozMousePixelScroll");
- }
- function zoom(g) {
- g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted);
- }
- zoom.event = function(g) {
- g.each(function() {
- var dispatch = event.of(this, arguments), view1 = view;
- if (d3_transitionInheritId) {
- d3.select(this).transition().each("start.zoom", function() {
- view = this.__chart__ || {
- x: 0,
- y: 0,
- k: 1
- };
- zoomstarted(dispatch);
- }).tween("zoom:zoom", function() {
- var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);
- return function(t) {
- var l = i(t), k = dx / l[2];
- this.__chart__ = view = {
- x: cx - l[0] * k,
- y: cy - l[1] * k,
- k: k
- };
- zoomed(dispatch);
- };
- }).each("interrupt.zoom", function() {
- zoomended(dispatch);
- }).each("end.zoom", function() {
- zoomended(dispatch);
- });
- } else {
- this.__chart__ = view;
- zoomstarted(dispatch);
- zoomed(dispatch);
- zoomended(dispatch);
- }
- });
- };
- zoom.translate = function(_) {
- if (!arguments.length) return [ view.x, view.y ];
- view = {
- x: +_[0],
- y: +_[1],
- k: view.k
- };
- rescale();
- return zoom;
- };
- zoom.scale = function(_) {
- if (!arguments.length) return view.k;
- view = {
- x: view.x,
- y: view.y,
- k: +_
- };
- rescale();
- return zoom;
- };
- zoom.scaleExtent = function(_) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];
- return zoom;
- };
- zoom.center = function(_) {
- if (!arguments.length) return center;
- center = _ && [ +_[0], +_[1] ];
- return zoom;
- };
- zoom.size = function(_) {
- if (!arguments.length) return size;
- size = _ && [ +_[0], +_[1] ];
- return zoom;
- };
- zoom.duration = function(_) {
- if (!arguments.length) return duration;
- duration = +_;
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- view = {
- x: 0,
- y: 0,
- k: 1
- };
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- view = {
- x: 0,
- y: 0,
- k: 1
- };
- return zoom;
- };
- function location(p) {
- return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];
- }
- function point(l) {
- return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];
- }
- function scaleTo(s) {
- view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- view.x += p[0] - l[0];
- view.y += p[1] - l[1];
- }
- function zoomTo(that, p, l, k) {
- that.__chart__ = {
- x: view.x,
- y: view.y,
- k: view.k
- };
- scaleTo(Math.pow(2, k));
- translateTo(center0 = p, l);
- that = d3.select(that);
- if (duration > 0) that = that.transition().duration(duration);
- that.call(zoom.event);
- }
- function rescale() {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - view.x) / view.k;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - view.y) / view.k;
- }).map(y0.invert));
- }
- function zoomstarted(dispatch) {
- if (!zooming++) dispatch({
- type: "zoomstart"
- });
- }
- function zoomed(dispatch) {
- rescale();
- dispatch({
- type: "zoom",
- scale: view.k,
- translate: [ view.x, view.y ]
- });
- }
- function zoomended(dispatch) {
- if (!--zooming) dispatch({
- type: "zoomend"
- });
- center0 = null;
- }
- function mousedowned() {
- var that = this, target = d3.event.target, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
- d3_selection_interrupt.call(that);
- zoomstarted(dispatch);
- function moved() {
- dragged = 1;
- translateTo(d3.mouse(that), location0);
- zoomed(dispatch);
- }
- function ended() {
- subject.on(mousemove, null).on(mouseup, null);
- dragRestore(dragged && d3.event.target === target);
- zoomended(dispatch);
- }
- }
- function touchstarted() {
- var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);
- started();
- zoomstarted(dispatch);
- subject.on(mousedown, null).on(touchstart, started);
- function relocate() {
- var touches = d3.touches(that);
- scale0 = view.k;
- touches.forEach(function(t) {
- if (t.identifier in locations0) locations0[t.identifier] = location(t);
- });
- return touches;
- }
- function started() {
- var target = d3.event.target;
- d3.select(target).on(touchmove, moved).on(touchend, ended);
- targets.push(target);
- var changed = d3.event.changedTouches;
- for (var i = 0, n = changed.length; i < n; ++i) {
- locations0[changed[i].identifier] = null;
- }
- var touches = relocate(), now = Date.now();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0];
- zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);
- d3_eventPreventDefault();
- }
- touchtime = now;
- } else if (touches.length > 1) {
- var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];
- distance0 = dx * dx + dy * dy;
- }
- }
- function moved() {
- var touches = d3.touches(that), p0, l0, p1, l1;
- d3_selection_interrupt.call(that);
- for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {
- p1 = touches[i];
- if (l1 = locations0[p1.identifier]) {
- if (l0) break;
- p0 = p1, l0 = l1;
- }
- }
- if (l1) {
- var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(scale1 * scale0);
- }
- touchtime = null;
- translateTo(p0, l0);
- zoomed(dispatch);
- }
- function ended() {
- if (d3.event.touches.length) {
- var changed = d3.event.changedTouches;
- for (var i = 0, n = changed.length; i < n; ++i) {
- delete locations0[changed[i].identifier];
- }
- for (var identifier in locations0) {
- return void relocate();
- }
- }
- d3.selectAll(targets).on(zoomName, null);
- subject.on(mousedown, mousedowned).on(touchstart, touchstarted);
- dragRestore();
- zoomended(dispatch);
- }
- }
- function mousewheeled() {
- var dispatch = event.of(this, arguments);
- if (mousewheelTimer) clearTimeout(mousewheelTimer); else translate0 = location(center0 = center || d3.mouse(this)),
- d3_selection_interrupt.call(this), zoomstarted(dispatch);
- mousewheelTimer = setTimeout(function() {
- mousewheelTimer = null;
- zoomended(dispatch);
- }, 50);
- d3_eventPreventDefault();
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);
- translateTo(center0, translate0);
- zoomed(dispatch);
- }
- function dblclicked() {
- var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;
- zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);
- }
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;
- d3.color = d3_color;
- function d3_color() {}
- d3_color.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.hsl = d3_hsl;
- function d3_hsl(h, s, l) {
- return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);
- }
- var d3_hslPrototype = d3_hsl.prototype = new d3_color();
- d3_hslPrototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return new d3_hsl(this.h, this.s, this.l / k);
- };
- d3_hslPrototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return new d3_hsl(this.h, this.s, k * this.l);
- };
- d3_hslPrototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- function d3_hsl_rgb(h, s, l) {
- var m1, m2;
- h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;
- s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- d3.hcl = d3_hcl;
- function d3_hcl(h, c, l) {
- return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);
- }
- var d3_hclPrototype = d3_hcl.prototype = new d3_color();
- d3_hclPrototype.brighter = function(k) {
- return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_hclPrototype.darker = function(k) {
- return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_hclPrototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- function d3_hcl_lab(h, c, l) {
- if (isNaN(h)) h = 0;
- if (isNaN(c)) c = 0;
- return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
- }
- d3.lab = d3_lab;
- function d3_lab(l, a, b) {
- return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);
- }
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- var d3_labPrototype = d3_lab.prototype = new d3_color();
- d3_labPrototype.brighter = function(k) {
- return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_labPrototype.darker = function(k) {
- return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_labPrototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- d3.rgb = d3_rgb;
- function d3_rgb(r, g, b) {
- return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);
- }
- function d3_rgbNumber(value) {
- return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);
- }
- function d3_rgbString(value) {
- return d3_rgbNumber(value) + "";
- }
- var d3_rgbPrototype = d3_rgb.prototype = new d3_color();
- d3_rgbPrototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return new d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));
- };
- d3_rgbPrototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return new d3_rgb(k * this.r, k * this.g, k * this.b);
- };
- d3_rgbPrototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_rgbPrototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, color;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
-
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (color = d3_rgb_names.get(format.toLowerCase())) {
- return rgb(color.r, color.g, color.b);
- }
- if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) {
- if (format.length === 4) {
- r = (color & 3840) >> 4;
- r = r >> 4 | r;
- g = color & 240;
- g = g >> 4 | g;
- b = color & 15;
- b = b << 4 | b;
- } else if (format.length === 7) {
- r = (color & 16711680) >> 16;
- g = (color & 65280) >> 8;
- b = color & 255;
- }
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- h = NaN;
- s = l > 0 && l < 1 ? 0 : h;
- }
- return new d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- var d3_rgb_names = d3.map({
- aliceblue: 15792383,
- antiquewhite: 16444375,
- aqua: 65535,
- aquamarine: 8388564,
- azure: 15794175,
- beige: 16119260,
- bisque: 16770244,
- black: 0,
- blanchedalmond: 16772045,
- blue: 255,
- blueviolet: 9055202,
- brown: 10824234,
- burlywood: 14596231,
- cadetblue: 6266528,
- chartreuse: 8388352,
- chocolate: 13789470,
- coral: 16744272,
- cornflowerblue: 6591981,
- cornsilk: 16775388,
- crimson: 14423100,
- cyan: 65535,
- darkblue: 139,
- darkcyan: 35723,
- darkgoldenrod: 12092939,
- darkgray: 11119017,
- darkgreen: 25600,
- darkgrey: 11119017,
- darkkhaki: 12433259,
- darkmagenta: 9109643,
- darkolivegreen: 5597999,
- darkorange: 16747520,
- darkorchid: 10040012,
- darkred: 9109504,
- darksalmon: 15308410,
- darkseagreen: 9419919,
- darkslateblue: 4734347,
- darkslategray: 3100495,
- darkslategrey: 3100495,
- darkturquoise: 52945,
- darkviolet: 9699539,
- deeppink: 16716947,
- deepskyblue: 49151,
- dimgray: 6908265,
- dimgrey: 6908265,
- dodgerblue: 2003199,
- firebrick: 11674146,
- floralwhite: 16775920,
- forestgreen: 2263842,
- fuchsia: 16711935,
- gainsboro: 14474460,
- ghostwhite: 16316671,
- gold: 16766720,
- goldenrod: 14329120,
- gray: 8421504,
- green: 32768,
- greenyellow: 11403055,
- grey: 8421504,
- honeydew: 15794160,
- hotpink: 16738740,
- indianred: 13458524,
- indigo: 4915330,
- ivory: 16777200,
- khaki: 15787660,
- lavender: 15132410,
- lavenderblush: 16773365,
- lawngreen: 8190976,
- lemonchiffon: 16775885,
- lightblue: 11393254,
- lightcoral: 15761536,
- lightcyan: 14745599,
- lightgoldenrodyellow: 16448210,
- lightgray: 13882323,
- lightgreen: 9498256,
- lightgrey: 13882323,
- lightpink: 16758465,
- lightsalmon: 16752762,
- lightseagreen: 2142890,
- lightskyblue: 8900346,
- lightslategray: 7833753,
- lightslategrey: 7833753,
- lightsteelblue: 11584734,
- lightyellow: 16777184,
- lime: 65280,
- limegreen: 3329330,
- linen: 16445670,
- magenta: 16711935,
- maroon: 8388608,
- mediumaquamarine: 6737322,
- mediumblue: 205,
- mediumorchid: 12211667,
- mediumpurple: 9662683,
- mediumseagreen: 3978097,
- mediumslateblue: 8087790,
- mediumspringgreen: 64154,
- mediumturquoise: 4772300,
- mediumvioletred: 13047173,
- midnightblue: 1644912,
- mintcream: 16121850,
- mistyrose: 16770273,
- moccasin: 16770229,
- navajowhite: 16768685,
- navy: 128,
- oldlace: 16643558,
- olive: 8421376,
- olivedrab: 7048739,
- orange: 16753920,
- orangered: 16729344,
- orchid: 14315734,
- palegoldenrod: 15657130,
- palegreen: 10025880,
- paleturquoise: 11529966,
- palevioletred: 14381203,
- papayawhip: 16773077,
- peachpuff: 16767673,
- peru: 13468991,
- pink: 16761035,
- plum: 14524637,
- powderblue: 11591910,
- purple: 8388736,
- rebeccapurple: 6697881,
- red: 16711680,
- rosybrown: 12357519,
- royalblue: 4286945,
- saddlebrown: 9127187,
- salmon: 16416882,
- sandybrown: 16032864,
- seagreen: 3050327,
- seashell: 16774638,
- sienna: 10506797,
- silver: 12632256,
- skyblue: 8900331,
- slateblue: 6970061,
- slategray: 7372944,
- slategrey: 7372944,
- snow: 16775930,
- springgreen: 65407,
- steelblue: 4620980,
- tan: 13808780,
- teal: 32896,
- thistle: 14204888,
- tomato: 16737095,
- turquoise: 4251856,
- violet: 15631086,
- wheat: 16113331,
- white: 16777215,
- whitesmoke: 16119285,
- yellow: 16776960,
- yellowgreen: 10145074
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgbNumber(value));
- });
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- d3.functor = d3_functor;
- d3.xhr = d3_xhrType(d3_identity);
- function d3_xhrType(response) {
- return function(url, mimeType, callback) {
- if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType,
- mimeType = null;
- return d3_xhr(url, mimeType, response, callback);
- };
- }
- function d3_xhr(url, mimeType, response, callback) {
- var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
- if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
- "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
- request.readyState > 3 && respond();
- };
- function respond() {
- var status = request.status, result;
- if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {
- try {
- result = response.call(xhr, request);
- } catch (e) {
- dispatch.error.call(xhr, e);
- return;
- }
- dispatch.load.call(xhr, result);
- } else {
- dispatch.error.call(xhr, request);
- }
- }
- request.onprogress = function(event) {
- var o = d3.event;
- d3.event = event;
- try {
- dispatch.progress.call(xhr, request);
- } finally {
- d3.event = o;
- }
- };
- xhr.header = function(name, value) {
- name = (name + "").toLowerCase();
- if (arguments.length < 2) return headers[name];
- if (value == null) delete headers[name]; else headers[name] = value + "";
- return xhr;
- };
- xhr.mimeType = function(value) {
- if (!arguments.length) return mimeType;
- mimeType = value == null ? null : value + "";
- return xhr;
- };
- xhr.responseType = function(value) {
- if (!arguments.length) return responseType;
- responseType = value;
- return xhr;
- };
- xhr.response = function(value) {
- response = value;
- return xhr;
- };
- [ "get", "post" ].forEach(function(method) {
- xhr[method] = function() {
- return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));
- };
- });
- xhr.send = function(method, data, callback) {
- if (arguments.length === 2 && typeof data === "function") callback = data, data = null;
- request.open(method, url, true);
- if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*";
- if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);
- if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);
- if (responseType != null) request.responseType = responseType;
- if (callback != null) xhr.on("error", callback).on("load", function(request) {
- callback(null, request);
- });
- dispatch.beforesend.call(xhr, request);
- request.send(data == null ? null : data);
- return xhr;
- };
- xhr.abort = function() {
- request.abort();
- return xhr;
- };
- d3.rebind(xhr, dispatch, "on");
- return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));
- }
- function d3_xhr_fixCallback(callback) {
- return callback.length === 1 ? function(error, request) {
- callback(error == null ? request : null);
- } : callback;
- }
- function d3_xhrHasResponse(request) {
- var type = request.responseType;
- return type && type !== "text" ? request.response : request.responseText;
- }
- d3.dsv = function(delimiter, mimeType) {
- var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- function dsv(url, row, callback) {
- if (arguments.length < 3) callback = row, row = null;
- var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
- xhr.row = function(_) {
- return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;
- };
- return xhr;
- }
- function response(request) {
- return dsv.parse(request.responseText);
- }
- function typedResponse(f) {
- return function(request) {
- return dsv.parse(request.responseText, f);
- };
- }
- dsv.parse = function(text, f) {
- var o;
- return dsv.parseRows(text, function(row, i) {
- if (o) return o(row, i - 1);
- var a = new Function("d", "return {" + row.map(function(name, i) {
- return JSON.stringify(name) + ": d[" + i + "]";
- }).join(",") + "}");
- o = f ? function(row, i) {
- return f(a(row), i);
- } : a;
- });
- };
- dsv.parseRows = function(text, f) {
- var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
- function token() {
- if (I >= N) return EOF;
- if (eol) return eol = false, EOL;
- var j = I;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < N) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- ++i;
- }
- }
- I = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) ++I;
- } else if (c === 10) {
- eol = true;
- }
- return text.slice(j + 1, i).replace(/""/g, '"');
- }
- while (I < N) {
- var c = text.charCodeAt(I++), k = 1;
- if (c === 10) eol = true; else if (c === 13) {
- eol = true;
- if (text.charCodeAt(I) === 10) ++I, ++k;
- } else if (c !== delimiterCode) continue;
- return text.slice(j, I - k);
- }
- return text.slice(j);
- }
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && (a = f(a, n++)) == null) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- if (Array.isArray(rows[0])) return dsv.formatRows(rows);
- var fieldSet = new d3_Set(), fields = [];
- rows.forEach(function(row) {
- for (var field in row) {
- if (!fieldSet.has(field)) {
- fields.push(fieldSet.add(field));
- }
- }
- });
- return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {
- return fields.map(function(field) {
- return formatValue(row[field]);
- }).join(delimiter);
- })).join("\n");
- };
- dsv.formatRows = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- return dsv;
- };
- d3.csv = d3.dsv(",", "text/csv");
- d3.tsv = d3.dsv(" ", "text/tab-separated-values");
- var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) {
- setTimeout(callback, 17);
- };
- d3.timer = function(callback, delay, then) {
- var n = arguments.length;
- if (n < 2) delay = 0;
- if (n < 3) then = Date.now();
- var time = then + delay, timer = {
- c: callback,
- t: time,
- f: false,
- n: null
- };
- if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;
- d3_timer_queueTail = timer;
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- function d3_timer_step() {
- var now = d3_timer_mark(), delay = d3_timer_sweep() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- d3.timer.flush = function() {
- d3_timer_mark();
- d3_timer_sweep();
- };
- function d3_timer_mark() {
- var now = Date.now();
- d3_timer_active = d3_timer_queueHead;
- while (d3_timer_active) {
- if (now >= d3_timer_active.t) d3_timer_active.f = d3_timer_active.c(now - d3_timer_active.t);
- d3_timer_active = d3_timer_active.n;
- }
- return now;
- }
- function d3_timer_sweep() {
- var t0, t1 = d3_timer_queueHead, time = Infinity;
- while (t1) {
- if (t1.f) {
- t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;
- } else {
- if (t1.t < time) time = t1.t;
- t1 = (t0 = t1).n;
- }
- }
- d3_timer_queueTail = t0;
- return time;
- }
- function d3_format_precision(x, p) {
- return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);
- }
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- function d3_locale_numberFormat(locale) {
- var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {
- var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;
- while (i > 0 && g > 0) {
- if (length + g + 1 > width) g = Math.max(1, width - length);
- t.push(value.substring(i -= g, i + g));
- if ((length += g + 1) > width) break;
- g = locale_grouping[j = (j + 1) % locale_grouping.length];
- }
- return t.reverse().join(locale_thousands);
- } : d3_identity;
- return function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "-", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = "", suffix = "", integer = false, exponent = true;
- if (precision) precision = +precision.substring(1);
- if (zfill || fill === "0" && align === "=") {
- zfill = fill = "0";
- align = "=";
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
-
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
-
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
-
- case "b":
- case "o":
- case "x":
- case "X":
- if (symbol === "#") prefix = "0" + type.toLowerCase();
-
- case "c":
- exponent = false;
-
- case "d":
- integer = true;
- precision = 0;
- break;
-
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (symbol === "$") prefix = locale_currency[0], suffix = locale_currency[1];
- if (type == "r" && !precision) type = "g";
- if (precision != null) {
- if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision));
- }
- type = d3_format_types.get(type) || d3_format_typeDefault;
- var zcomma = zfill && comma;
- return function(value) {
- var fullSuffix = suffix;
- if (integer && value % 1) return "";
- var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign === "-" ? "" : sign;
- if (scale < 0) {
- var unit = d3.formatPrefix(value, precision);
- value = unit.scale(value);
- fullSuffix = unit.symbol + suffix;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- var i = value.lastIndexOf("."), before, after;
- if (i < 0) {
- var j = exponent ? value.lastIndexOf("e") : -1;
- if (j < 0) before = value, after = ""; else before = value.substring(0, j), after = value.substring(j);
- } else {
- before = value.substring(0, i);
- after = locale_decimal + value.substring(i + 1);
- }
- if (!zfill && comma) before = formatGroup(before, Infinity);
- var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : "";
- if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);
- negative += prefix;
- value = before + after;
- return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;
- };
- };
- }
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;
- var d3_format_types = d3.map({
- b: function(x) {
- return x.toString(2);
- },
- c: function(x) {
- return String.fromCharCode(x);
- },
- o: function(x) {
- return x.toString(8);
- },
- x: function(x) {
- return x.toString(16);
- },
- X: function(x) {
- return x.toString(16).toUpperCase();
- },
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));
- }
- });
- function d3_format_typeDefault(x) {
- return x + "";
- }
- var d3_time = d3.time = {}, d3_date = Date;
- function d3_date_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- d3_date_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_date(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_date(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_date = d3_date_utc;
- var utc = new d3_date_utc();
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_date = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_date = d3_date_utc;
- var utc = new d3_date_utc();
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_date = Date;
- }
- };
- }
- d3_time.year = d3_time_interval(function(date) {
- date = d3_time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3_time.years = d3_time.year.range;
- d3_time.years.utc = d3_time.year.utc.range;
- d3_time.day = d3_time_interval(function(date) {
- var day = new d3_date(2e3, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3_time.days = d3_time.day.range;
- d3_time.days.utc = d3_time.day.utc.range;
- d3_time.dayOfYear = function(date) {
- var year = d3_time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ].forEach(function(day, i) {
- i = 7 - i;
- var interval = d3_time[day] = d3_time_interval(function(date) {
- (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3_time.year(date).getDay();
- return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3_time[day + "s"] = interval.range;
- d3_time[day + "s"].utc = interval.utc.range;
- d3_time[day + "OfYear"] = function(date) {
- var day = d3_time.year(date).getDay();
- return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3_time.week = d3_time.sunday;
- d3_time.weeks = d3_time.sunday.range;
- d3_time.weeks.utc = d3_time.sunday.utc.range;
- d3_time.weekOfYear = d3_time.sundayOfYear;
- function d3_locale_timeFormat(locale) {
- var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
- function d3_time_format(template) {
- var n = template.length;
- function format(date) {
- var string = [], i = -1, j = 0, c, p, f;
- while (++i < n) {
- if (template.charCodeAt(i) === 37) {
- string.push(template.slice(j, i));
- if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
- if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
- string.push(c);
- j = i + 1;
- }
- }
- string.push(template.slice(j, i));
- return string.join("");
- }
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0,
- Z: null
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();
- if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("w" in d && ("W" in d || "U" in d)) {
- date.setFullYear(d.y, 0, 1);
- date.setFullYea
<TRUNCATED>
[06/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/jquery-2.1.3.min.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/jquery-2.1.3.min.js b/htrace-htraced/src/web/lib/js/jquery-2.1.3.min.js
new file mode 100644
index 0000000..25714ed
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/jquery-2.1.3.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(
this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:functi
on(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a
){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){va
r b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+
L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.child
Nodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b
,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;
while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parent
Node?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q
.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains
(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.
test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c
+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "]
;return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[
0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),c
ontains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)r
eturn!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=n
ew qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)
if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||
((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f)
{b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.fir
stChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);
b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jqu
ery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;r
eturn this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextS
ibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0
],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"re
solved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(
),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n
.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d
];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;retu
rn c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
+},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(
a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g
--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l
,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)i
f(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.names
pace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j
=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return
h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.
keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventL
istener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.
event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f
.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}functi
on ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]
||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeTyp
e||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{}
,c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=
c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,
b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);f
unction g(){f.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",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(non
e|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.b
oxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},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(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks
[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRi
ght,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.en
d=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.
elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=thi
s,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a)
.show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Twe
en(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?
d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1)
);(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.
push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&
&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
+},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHo
oks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},rem
oveClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(
var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;
h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).
mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c
))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.resp
onseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,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":n.parseJSON,"text xml":n.parseXM
L},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.succ
ess=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentT
ype)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.d
ata,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElemen
tChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction
(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",fu
nction(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, appl
ication/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCal
lback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseH
TML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.off
set.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(
b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(
b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});
[08/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/js/backgrid-paginator-0.3.5.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/js/backgrid-paginator-0.3.5.js b/htrace-htraced/src/web/lib/js/backgrid-paginator-0.3.5.js
new file mode 100644
index 0000000..64dd434
--- /dev/null
+++ b/htrace-htraced/src/web/lib/js/backgrid-paginator-0.3.5.js
@@ -0,0 +1,433 @@
+/*
+ backgrid-paginator
+ http://github.com/wyuenho/backgrid
+
+ Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
+ Licensed under the MIT @license.
+*/
+(function (root, factory) {
+
+ // CommonJS
+ if (typeof exports == "object") {
+ module.exports = factory(require("underscore"),
+ require("backbone"),
+ require("backgrid"),
+ require("backbone.paginator"));
+ }
+ // AMD. Register as an anonymous module.
+ else if (typeof define === 'function' && define.amd) {
+ define(['underscore', 'backbone', 'backgrid', 'backbone.paginator'], factory);
+ }
+ // Browser
+ else {
+ factory(root._, root.Backbone, root.Backgrid);
+ }
+
+}(this, function (_, Backbone, Backgrid) {
+
+ "use strict";
+
+ /**
+ PageHandle is a class that renders the actual page handles and reacts to
+ click events for pagination.
+
+ This class acts in two modes - control or discrete page handle modes. If
+ one of the `is*` flags is `true`, an instance of this class is under
+ control page handle mode. Setting a `pageIndex` to an instance of this
+ class under control mode has no effect and the correct page index will
+ always be inferred from the `is*` flag. Only one of the `is*` flags should
+ be set to `true` at a time. For example, an instance of this class cannot
+ simultaneously be a rewind control and a fast forward control. A `label`
+ and a `title` function or a string are required to be passed to the
+ constuctor under this mode. If a `title` function is provided, it __MUST__
+ accept a hash parameter `data`, which contains a key `label`. Its result
+ will be used to render the generated anchor's title attribute.
+
+ If all of the `is*` flags is set to `false`, which is the default, an
+ instance of this class will be in discrete page handle mode. An instance
+ under this mode requires the `pageIndex` to be passed from the constructor
+ as an option and it __MUST__ be a 0-based index of the list of page numbers
+ to render. The constuctor will normalize the base to the same base the
+ underlying PageableCollection collection instance uses. A `label` is not
+ required under this mode, which will default to the equivalent 1-based page
+ index calculated from `pageIndex` and the underlying PageableCollection
+ instance. A provided `label` will still be honored however. The `title`
+ parameter is also not required under this mode, in which case the default
+ `title` function will be used. You are encouraged to provide your own
+ `title` function however if you wish to localize the title strings.
+
+ If this page handle represents the current page, an `active` class will be
+ placed on the root list element.
+
+ If this page handle is at the border of the list of pages, a `disabled`
+ class will be placed on the root list element.
+
+ Only page handles that are neither `active` nor `disabled` will respond to
+ click events and triggers pagination.
+
+ @class Backgrid.Extension.PageHandle
+ */
+ var PageHandle = Backgrid.Extension.PageHandle = Backbone.View.extend({
+
+ /** @property */
+ tagName: "li",
+
+ /** @property */
+ events: {
+ "click a": "changePage"
+ },
+
+ /**
+ @property {string|function(Object.<string, string>): string} title
+ The title to use for the `title` attribute of the generated page handle
+ anchor elements. It can be a string or a function that takes a `data`
+ parameter, which contains a mandatory `label` key which provides the
+ label value to be displayed.
+ */
+ title: function (data) {
+ return 'Page ' + data.label;
+ },
+
+ /**
+ @property {boolean} isRewind Whether this handle represents a rewind
+ control
+ */
+ isRewind: false,
+
+ /**
+ @property {boolean} isBack Whether this handle represents a back
+ control
+ */
+ isBack: false,
+
+ /**
+ @property {boolean} isForward Whether this handle represents a forward
+ control
+ */
+ isForward: false,
+
+ /**
+ @property {boolean} isFastForward Whether this handle represents a fast
+ forward control
+ */
+ isFastForward: false,
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Collection} options.collection
+ @param {number} pageIndex 0-based index of the page number this handle
+ handles. This parameter will be normalized to the base the underlying
+ PageableCollection uses.
+ @param {string} [options.label] If provided it is used to render the
+ anchor text, otherwise the normalized pageIndex will be used
+ instead. Required if any of the `is*` flags is set to `true`.
+ @param {string} [options.title]
+ @param {boolean} [options.isRewind=false]
+ @param {boolean} [options.isBack=false]
+ @param {boolean} [options.isForward=false]
+ @param {boolean} [options.isFastForward=false]
+ */
+ initialize: function (options) {
+ var collection = this.collection;
+ var state = collection.state;
+ var currentPage = state.currentPage;
+ var firstPage = state.firstPage;
+ var lastPage = state.lastPage;
+
+ _.extend(this, _.pick(options,
+ ["isRewind", "isBack", "isForward", "isFastForward"]));
+
+ var pageIndex;
+ if (this.isRewind) pageIndex = firstPage;
+ else if (this.isBack) pageIndex = Math.max(firstPage, currentPage - 1);
+ else if (this.isForward) pageIndex = Math.min(lastPage, currentPage + 1);
+ else if (this.isFastForward) pageIndex = lastPage;
+ else {
+ pageIndex = +options.pageIndex;
+ pageIndex = (firstPage ? pageIndex + 1 : pageIndex);
+ }
+ this.pageIndex = pageIndex;
+
+ this.label = (options.label || (firstPage ? pageIndex : pageIndex + 1)) + '';
+ var title = options.title || this.title;
+ this.title = _.isFunction(title) ? title({label: this.label}) : title;
+ },
+
+ /**
+ Renders a clickable anchor element under a list item.
+ */
+ render: function () {
+ this.$el.empty();
+ var anchor = document.createElement("a");
+ anchor.href = '#';
+ if (this.title) anchor.title = this.title;
+ anchor.innerHTML = this.label;
+ this.el.appendChild(anchor);
+
+ var collection = this.collection;
+ var state = collection.state;
+ var currentPage = state.currentPage;
+ var pageIndex = this.pageIndex;
+
+ if (this.isRewind && currentPage == state.firstPage ||
+ this.isBack && !collection.hasPreviousPage() ||
+ this.isForward && !collection.hasNextPage() ||
+ this.isFastForward && (currentPage == state.lastPage || state.totalPages < 1)) {
+ this.$el.addClass("disabled");
+ }
+ else if (!(this.isRewind ||
+ this.isBack ||
+ this.isForward ||
+ this.isFastForward) &&
+ state.currentPage == pageIndex) {
+ this.$el.addClass("active");
+ }
+
+ this.delegateEvents();
+ return this;
+ },
+
+ /**
+ jQuery click event handler. Goes to the page this PageHandle instance
+ represents. No-op if this page handle is currently active or disabled.
+ */
+ changePage: function (e) {
+ e.preventDefault();
+ var $el = this.$el, col = this.collection;
+ if (!$el.hasClass("active") && !$el.hasClass("disabled")) {
+ if (this.isRewind) col.getFirstPage();
+ else if (this.isBack) col.getPreviousPage();
+ else if (this.isForward) col.getNextPage();
+ else if (this.isFastForward) col.getLastPage();
+ else col.getPage(this.pageIndex, {reset: true});
+ }
+ return this;
+ }
+
+ });
+
+ /**
+ Paginator is a Backgrid extension that renders a series of configurable
+ pagination handles. This extension is best used for splitting a large data
+ set across multiple pages. If the number of pages is larger then a
+ threshold, which is set to 10 by default, the page handles are rendered
+ within a sliding window, plus the rewind, back, forward and fast forward
+ control handles. The individual control handles can be turned off.
+
+ @class Backgrid.Extension.Paginator
+ */
+ var Paginator = Backgrid.Extension.Paginator = Backbone.View.extend({
+
+ /** @property */
+ className: "backgrid-paginator",
+
+ /** @property */
+ windowSize: 10,
+
+ /**
+ @property {number} slideScale the number used by #slideHowMuch to scale
+ `windowSize` to yield the number of pages to slide. For example, the
+ default windowSize(10) * slideScale(0.5) yields 5, which means the window
+ will slide forward 5 pages as soon as you've reached page 6. The smaller
+ the scale factor the less pages to slide, and vice versa.
+
+ Also See:
+
+ - #slideMaybe
+ - #slideHowMuch
+ */
+ slideScale: 0.5,
+
+ /**
+ @property {Object.<string, Object.<string, string>>} controls You can
+ disable specific control handles by setting the keys in question to
+ null. The defaults will be merged with your controls object, with your
+ changes taking precedent.
+ */
+ controls: {
+ rewind: {
+ label: "《",
+ title: "First"
+ },
+ back: {
+ label: "〈",
+ title: "Previous"
+ },
+ forward: {
+ label: "〉",
+ title: "Next"
+ },
+ fastForward: {
+ label: "》",
+ title: "Last"
+ }
+ },
+
+ /** @property */
+ renderIndexedPageHandles: true,
+
+ /**
+ @property {Backgrid.Extension.PageHandle} pageHandle. The PageHandle
+ class to use for rendering individual handles
+ */
+ pageHandle: PageHandle,
+
+ /** @property */
+ goBackFirstOnSort: true,
+
+ /**
+ Initializer.
+
+ @param {Object} options
+ @param {Backbone.Collection} options.collection
+ @param {boolean} [options.controls]
+ @param {boolean} [options.pageHandle=Backgrid.Extension.PageHandle]
+ @param {boolean} [options.goBackFirstOnSort=true]
+ */
+ initialize: function (options) {
+ var self = this;
+ self.controls = _.defaults(options.controls || {}, self.controls,
+ Paginator.prototype.controls);
+
+ _.extend(self, _.pick(options || {}, "windowSize", "pageHandle",
+ "slideScale", "goBackFirstOnSort",
+ "renderIndexedPageHandles"));
+
+ var col = self.collection;
+ self.listenTo(col, "add", self.render);
+ self.listenTo(col, "remove", self.render);
+ self.listenTo(col, "reset", self.render);
+ self.listenTo(col, "backgrid:sorted", function () {
+ if (self.goBackFirstOnSort) col.getFirstPage({reset: true});
+ });
+ },
+
+ /**
+ Decides whether the window should slide. This method should return 1 if
+ sliding should occur and 0 otherwise. The default is sliding should occur
+ if half of the pages in a window has been reached.
+
+ __Note__: All the parameters have been normalized to be 0-based.
+
+ @param {number} firstPage
+ @param {number} lastPage
+ @param {number} currentPage
+ @param {number} windowSize
+ @param {number} slideScale
+
+ @return {0|1}
+ */
+ slideMaybe: function (firstPage, lastPage, currentPage, windowSize, slideScale) {
+ return Math.round(currentPage % windowSize / windowSize);
+ },
+
+ /**
+ Decides how many pages to slide when sliding should occur. The default
+ simply scales the `windowSize` to arrive at a fraction of the `windowSize`
+ to increment.
+
+ __Note__: All the parameters have been normalized to be 0-based.
+
+ @param {number} firstPage
+ @param {number} lastPage
+ @param {number} currentPage
+ @param {number} windowSize
+ @param {number} slideScale
+
+ @return {number}
+ */
+ slideThisMuch: function (firstPage, lastPage, currentPage, windowSize, slideScale) {
+ return ~~(windowSize * slideScale);
+ },
+
+ _calculateWindow: function () {
+ var collection = this.collection;
+ var state = collection.state;
+
+ // convert all indices to 0-based here
+ var firstPage = state.firstPage;
+ var lastPage = +state.lastPage;
+ lastPage = Math.max(0, firstPage ? lastPage - 1 : lastPage);
+ var currentPage = Math.max(state.currentPage, state.firstPage);
+ currentPage = firstPage ? currentPage - 1 : currentPage;
+ var windowSize = this.windowSize;
+ var slideScale = this.slideScale;
+ var windowStart = Math.floor(currentPage / windowSize) * windowSize;
+ if (currentPage <= lastPage - this.slideThisMuch()) {
+ windowStart += (this.slideMaybe(firstPage, lastPage, currentPage, windowSize, slideScale) *
+ this.slideThisMuch(firstPage, lastPage, currentPage, windowSize, slideScale));
+ }
+ var windowEnd = Math.min(lastPage + 1, windowStart + windowSize);
+ return [windowStart, windowEnd];
+ },
+
+ /**
+ Creates a list of page handle objects for rendering.
+
+ @return {Array.<Object>} an array of page handle objects hashes
+ */
+ makeHandles: function () {
+
+ var handles = [];
+ var collection = this.collection;
+
+ var window = this._calculateWindow();
+ var winStart = window[0], winEnd = window[1];
+
+ if (this.renderIndexedPageHandles) {
+ for (var i = winStart; i < winEnd; i++) {
+ handles.push(new this.pageHandle({
+ collection: collection,
+ pageIndex: i
+ }));
+ }
+ }
+
+ var controls = this.controls;
+ _.each(["back", "rewind", "forward", "fastForward"], function (key) {
+ var value = controls[key];
+ if (value) {
+ var handleCtorOpts = {
+ collection: collection,
+ title: value.title,
+ label: value.label
+ };
+ handleCtorOpts["is" + key.slice(0, 1).toUpperCase() + key.slice(1)] = true;
+ var handle = new this.pageHandle(handleCtorOpts);
+ if (key == "rewind" || key == "back") handles.unshift(handle);
+ else handles.push(handle);
+ }
+ }, this);
+
+ return handles;
+ },
+
+ /**
+ Render the paginator handles inside an unordered list.
+ */
+ render: function () {
+ this.$el.empty();
+
+ if (this.handles) {
+ for (var i = 0, l = this.handles.length; i < l; i++) {
+ this.handles[i].remove();
+ }
+ }
+
+ var handles = this.handles = this.makeHandles();
+
+ var ul = document.createElement("ul");
+ for (var i = 0; i < handles.length; i++) {
+ ul.appendChild(handles[i].render().el);
+ }
+
+ this.el.appendChild(ul);
+
+ return this;
+ }
+
+ });
+
+}));
\ No newline at end of file
[30/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/backbone.paginator-2.0.2.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/backbone.paginator-2.0.2.js b/htrace-core/src/web/lib/js/backbone.paginator-2.0.2.js
deleted file mode 100644
index d8ccc65..0000000
--- a/htrace-core/src/web/lib/js/backbone.paginator-2.0.2.js
+++ /dev/null
@@ -1,1325 +0,0 @@
-/*
- backbone.paginator 2.0.0
- http://github.com/backbone-paginator/backbone.paginator
-
- Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
- Licensed under the MIT @license.
-*/
-
-(function (factory) {
-
- // CommonJS
- if (typeof exports == "object") {
- module.exports = factory(require("underscore"), require("backbone"));
- }
- // AMD
- else if (typeof define == "function" && define.amd) {
- define(["underscore", "backbone"], factory);
- }
- // Browser
- else if (typeof _ !== "undefined" && typeof Backbone !== "undefined") {
- var oldPageableCollection = Backbone.PageableCollection;
- var PageableCollection = factory(_, Backbone);
-
- /**
- __BROWSER ONLY__
-
- If you already have an object named `PageableCollection` attached to the
- `Backbone` module, you can use this to return a local reference to this
- Backbone.PageableCollection class and reset the name
- Backbone.PageableCollection to its previous definition.
-
- // The left hand side gives you a reference to this
- // Backbone.PageableCollection implementation, the right hand side
- // resets Backbone.PageableCollection to your other
- // Backbone.PageableCollection.
- var PageableCollection = Backbone.PageableCollection.noConflict();
-
- @static
- @member Backbone.PageableCollection
- @return {Backbone.PageableCollection}
- */
- Backbone.PageableCollection.noConflict = function () {
- Backbone.PageableCollection = oldPageableCollection;
- return PageableCollection;
- };
- }
-
-}(function (_, Backbone) {
-
- "use strict";
-
- var _extend = _.extend;
- var _omit = _.omit;
- var _clone = _.clone;
- var _each = _.each;
- var _pick = _.pick;
- var _contains = _.contains;
- var _isEmpty = _.isEmpty;
- var _pairs = _.pairs;
- var _invert = _.invert;
- var _isArray = _.isArray;
- var _isFunction = _.isFunction;
- var _isObject = _.isObject;
- var _keys = _.keys;
- var _isUndefined = _.isUndefined;
- var ceil = Math.ceil;
- var floor = Math.floor;
- var max = Math.max;
-
- var BBColProto = Backbone.Collection.prototype;
-
- function finiteInt (val, name) {
- if (!_.isNumber(val) || _.isNaN(val) || !_.isFinite(val) || ~~val !== val) {
- throw new TypeError("`" + name + "` must be a finite integer");
- }
- return val;
- }
-
- function queryStringToParams (qs) {
- var kvp, k, v, ls, params = {}, decode = decodeURIComponent;
- var kvps = qs.split('&');
- for (var i = 0, l = kvps.length; i < l; i++) {
- var param = kvps[i];
- kvp = param.split('='), k = kvp[0], v = kvp[1] || true;
- k = decode(k), v = decode(v), ls = params[k];
- if (_isArray(ls)) ls.push(v);
- else if (ls) params[k] = [ls, v];
- else params[k] = v;
- }
- return params;
- }
-
- // hack to make sure the whatever event handlers for this event is run
- // before func is, and the event handlers that func will trigger.
- function runOnceAtLastHandler (col, event, func) {
- var eventHandlers = col._events[event];
- if (eventHandlers && eventHandlers.length) {
- var lastHandler = eventHandlers[eventHandlers.length - 1];
- var oldCallback = lastHandler.callback;
- lastHandler.callback = function () {
- try {
- oldCallback.apply(this, arguments);
- func();
- }
- catch (e) {
- throw e;
- }
- finally {
- lastHandler.callback = oldCallback;
- }
- };
- }
- else func();
- }
-
- var PARAM_TRIM_RE = /[\s'"]/g;
- var URL_TRIM_RE = /[<>\s'"]/g;
-
- /**
- Drop-in replacement for Backbone.Collection. Supports server-side and
- client-side pagination and sorting. Client-side mode also support fully
- multi-directional synchronization of changes between pages.
-
- @class Backbone.PageableCollection
- @extends Backbone.Collection
- */
- var PageableCollection = Backbone.PageableCollection = Backbone.Collection.extend({
-
- /**
- The container object to store all pagination states.
-
- You can override the default state by extending this class or specifying
- them in an `options` hash to the constructor.
-
- @property {Object} state
-
- @property {0|1} [state.firstPage=1] The first page index. Set to 0 if
- your server API uses 0-based indices. You should only override this value
- during extension, initialization or reset by the server after
- fetching. This value should be read only at other times.
-
- @property {number} [state.lastPage=null] The last page index. This value
- is __read only__ and it's calculated based on whether `firstPage` is 0 or
- 1, during bootstrapping, fetching and resetting. Please don't change this
- value under any circumstances.
-
- @property {number} [state.currentPage=null] The current page index. You
- should only override this value during extension, initialization or reset
- by the server after fetching. This value should be read only at other
- times. Can be a 0-based or 1-based index, depending on whether
- `firstPage` is 0 or 1. If left as default, it will be set to `firstPage`
- on initialization.
-
- @property {number} [state.pageSize=25] How many records to show per
- page. This value is __read only__ after initialization, if you want to
- change the page size after initialization, you must call #setPageSize.
-
- @property {number} [state.totalPages=null] How many pages there are. This
- value is __read only__ and it is calculated from `totalRecords`.
-
- @property {number} [state.totalRecords=null] How many records there
- are. This value is __required__ under server mode. This value is optional
- for client mode as the number will be the same as the number of models
- during bootstrapping and during fetching, either supplied by the server
- in the metadata, or calculated from the size of the response.
-
- @property {string} [state.sortKey=null] The model attribute to use for
- sorting.
-
- @property {-1|0|1} [state.order=-1] The order to use for sorting. Specify
- -1 for ascending order or 1 for descending order. If 0, no client side
- sorting will be done and the order query parameter will not be sent to
- the server during a fetch.
- */
- state: {
- firstPage: 1,
- lastPage: null,
- currentPage: null,
- pageSize: 25,
- totalPages: null,
- totalRecords: null,
- sortKey: null,
- order: -1
- },
-
- /**
- @property {"server"|"client"|"infinite"} [mode="server"] The mode of
- operations for this collection. `"server"` paginates on the server-side,
- `"client"` paginates on the client-side and `"infinite"` paginates on the
- server-side for APIs that do not support `totalRecords`.
- */
- mode: "server",
-
- /**
- A translation map to convert Backbone.PageableCollection state attributes
- to the query parameters accepted by your server API.
-
- You can override the default state by extending this class or specifying
- them in `options.queryParams` object hash to the constructor.
-
- @property {Object} queryParams
- @property {string} [queryParams.currentPage="page"]
- @property {string} [queryParams.pageSize="per_page"]
- @property {string} [queryParams.totalPages="total_pages"]
- @property {string} [queryParams.totalRecords="total_entries"]
- @property {string} [queryParams.sortKey="sort_by"]
- @property {string} [queryParams.order="order"]
- @property {string} [queryParams.directions={"-1": "asc", "1": "desc"}] A
- map for translating a Backbone.PageableCollection#state.order constant to
- the ones your server API accepts.
- */
- queryParams: {
- currentPage: "page",
- pageSize: "per_page",
- totalPages: "total_pages",
- totalRecords: "total_entries",
- sortKey: "sort_by",
- order: "order",
- directions: {
- "-1": "asc",
- "1": "desc"
- }
- },
-
- /**
- __CLIENT MODE ONLY__
-
- This collection is the internal storage for the bootstrapped or fetched
- models. You can use this if you want to operate on all the pages.
-
- @property {Backbone.Collection} fullCollection
- */
-
- /**
- Given a list of models or model attributues, bootstraps the full
- collection in client mode or infinite mode, or just the page you want in
- server mode.
-
- If you want to initialize a collection to a different state than the
- default, you can specify them in `options.state`. Any state parameters
- supplied will be merged with the default. If you want to change the
- default mapping from #state keys to your server API's query parameter
- names, you can specifiy an object hash in `option.queryParams`. Likewise,
- any mapping provided will be merged with the default. Lastly, all
- Backbone.Collection constructor options are also accepted.
-
- See:
-
- - Backbone.PageableCollection#state
- - Backbone.PageableCollection#queryParams
- - [Backbone.Collection#initialize](http://backbonejs.org/#Collection-constructor)
-
- @param {Array.<Object>} [models]
-
- @param {Object} [options]
-
- @param {function(*, *): number} [options.comparator] If specified, this
- comparator is set to the current page under server mode, or the #fullCollection
- otherwise.
-
- @param {boolean} [options.full] If `false` and either a
- `options.comparator` or `sortKey` is defined, the comparator is attached
- to the current page. Default is `true` under client or infinite mode and
- the comparator will be attached to the #fullCollection.
-
- @param {Object} [options.state] The state attributes overriding the defaults.
-
- @param {string} [options.state.sortKey] The model attribute to use for
- sorting. If specified instead of `options.comparator`, a comparator will
- be automatically created using this value, and optionally a sorting order
- specified in `options.state.order`. The comparator is then attached to
- the new collection instance.
-
- @param {-1|1} [options.state.order] The order to use for sorting. Specify
- -1 for ascending order and 1 for descending order.
-
- @param {Object} [options.queryParam]
- */
- constructor: function (models, options) {
-
- BBColProto.constructor.apply(this, arguments);
-
- options = options || {};
-
- var mode = this.mode = options.mode || this.mode || PageableProto.mode;
-
- var queryParams = _extend({}, PageableProto.queryParams, this.queryParams,
- options.queryParams || {});
-
- queryParams.directions = _extend({},
- PageableProto.queryParams.directions,
- this.queryParams.directions,
- queryParams.directions || {});
-
- this.queryParams = queryParams;
-
- var state = this.state = _extend({}, PageableProto.state, this.state,
- options.state || {});
-
- state.currentPage = state.currentPage == null ?
- state.firstPage :
- state.currentPage;
-
- if (!_isArray(models)) models = models ? [models] : [];
- models = models.slice();
-
- if (mode != "server" && state.totalRecords == null && !_isEmpty(models)) {
- state.totalRecords = models.length;
- }
-
- this.switchMode(mode, _extend({fetch: false,
- resetState: false,
- models: models}, options));
-
- var comparator = options.comparator;
-
- if (state.sortKey && !comparator) {
- this.setSorting(state.sortKey, state.order, options);
- }
-
- if (mode != "server") {
- var fullCollection = this.fullCollection;
-
- if (comparator && options.full) {
- this.comparator = null;
- fullCollection.comparator = comparator;
- }
-
- if (options.full) fullCollection.sort();
-
- // make sure the models in the current page and full collection have the
- // same references
- if (models && !_isEmpty(models)) {
- this.reset(models, _extend({silent: true}, options));
- this.getPage(state.currentPage);
- models.splice.apply(models, [0, models.length].concat(this.models));
- }
- }
-
- this._initState = _clone(this.state);
- },
-
- /**
- Makes a Backbone.Collection that contains all the pages.
-
- @private
- @param {Array.<Object|Backbone.Model>} models
- @param {Object} options Options for Backbone.Collection constructor.
- @return {Backbone.Collection}
- */
- _makeFullCollection: function (models, options) {
-
- var properties = ["url", "model", "sync", "comparator"];
- var thisProto = this.constructor.prototype;
- var i, length, prop;
-
- var proto = {};
- for (i = 0, length = properties.length; i < length; i++) {
- prop = properties[i];
- if (!_isUndefined(thisProto[prop])) {
- proto[prop] = thisProto[prop];
- }
- }
-
- var fullCollection = new (Backbone.Collection.extend(proto))(models, options);
-
- for (i = 0, length = properties.length; i < length; i++) {
- prop = properties[i];
- if (this[prop] !== thisProto[prop]) {
- fullCollection[prop] = this[prop];
- }
- }
-
- return fullCollection;
- },
-
- /**
- Factory method that returns a Backbone event handler that responses to
- the `add`, `remove`, `reset`, and the `sort` events. The returned event
- handler will synchronize the current page collection and the full
- collection's models.
-
- @private
-
- @param {Backbone.PageableCollection} pageCol
- @param {Backbone.Collection} fullCol
-
- @return {function(string, Backbone.Model, Backbone.Collection, Object)}
- Collection event handler
- */
- _makeCollectionEventHandler: function (pageCol, fullCol) {
-
- return function collectionEventHandler (event, model, collection, options) {
-
- var handlers = pageCol._handlers;
- _each(_keys(handlers), function (event) {
- var handler = handlers[event];
- pageCol.off(event, handler);
- fullCol.off(event, handler);
- });
-
- var state = _clone(pageCol.state);
- var firstPage = state.firstPage;
- var currentPage = firstPage === 0 ?
- state.currentPage :
- state.currentPage - 1;
- var pageSize = state.pageSize;
- var pageStart = currentPage * pageSize, pageEnd = pageStart + pageSize;
-
- if (event == "add") {
- var pageIndex, fullIndex, addAt, colToAdd, options = options || {};
- if (collection == fullCol) {
- fullIndex = fullCol.indexOf(model);
- if (fullIndex >= pageStart && fullIndex < pageEnd) {
- colToAdd = pageCol;
- pageIndex = addAt = fullIndex - pageStart;
- }
- }
- else {
- pageIndex = pageCol.indexOf(model);
- fullIndex = pageStart + pageIndex;
- colToAdd = fullCol;
- var addAt = !_isUndefined(options.at) ?
- options.at + pageStart :
- fullIndex;
- }
-
- if (!options.onRemove) {
- ++state.totalRecords;
- delete options.onRemove;
- }
-
- pageCol.state = pageCol._checkState(state);
-
- if (colToAdd) {
- colToAdd.add(model, _extend({}, options || {}, {at: addAt}));
- var modelToRemove = pageIndex >= pageSize ?
- model :
- !_isUndefined(options.at) && addAt < pageEnd && pageCol.length > pageSize ?
- pageCol.at(pageSize) :
- null;
- if (modelToRemove) {
- runOnceAtLastHandler(collection, event, function () {
- pageCol.remove(modelToRemove, {onAdd: true});
- });
- }
- }
- }
-
- // remove the model from the other collection as well
- if (event == "remove") {
- if (!options.onAdd) {
- // decrement totalRecords and update totalPages and lastPage
- if (!--state.totalRecords) {
- state.totalRecords = null;
- state.totalPages = null;
- }
- else {
- var totalPages = state.totalPages = ceil(state.totalRecords / pageSize);
- state.lastPage = firstPage === 0 ? totalPages - 1 : totalPages || firstPage;
- if (state.currentPage > totalPages) state.currentPage = state.lastPage;
- }
- pageCol.state = pageCol._checkState(state);
-
- var nextModel, removedIndex = options.index;
- if (collection == pageCol) {
- if (nextModel = fullCol.at(pageEnd)) {
- runOnceAtLastHandler(pageCol, event, function () {
- pageCol.push(nextModel, {onRemove: true});
- });
- }
- else if (!pageCol.length && state.totalRecords) {
- pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),
- _extend({}, options, {parse: false}));
- }
- fullCol.remove(model);
- }
- else if (removedIndex >= pageStart && removedIndex < pageEnd) {
- if (nextModel = fullCol.at(pageEnd - 1)) {
- runOnceAtLastHandler(pageCol, event, function() {
- pageCol.push(nextModel, {onRemove: true});
- });
- }
- pageCol.remove(model);
- if (!pageCol.length && state.totalRecords) {
- pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),
- _extend({}, options, {parse: false}));
- }
- }
- }
- else delete options.onAdd;
- }
-
- if (event == "reset") {
- options = collection;
- collection = model;
-
- // Reset that's not a result of getPage
- if (collection == pageCol && options.from == null &&
- options.to == null) {
- var head = fullCol.models.slice(0, pageStart);
- var tail = fullCol.models.slice(pageStart + pageCol.models.length);
- fullCol.reset(head.concat(pageCol.models).concat(tail), options);
- }
- else if (collection == fullCol) {
- if (!(state.totalRecords = fullCol.models.length)) {
- state.totalRecords = null;
- state.totalPages = null;
- }
- if (pageCol.mode == "client") {
- state.lastPage = state.currentPage = state.firstPage;
- }
- pageCol.state = pageCol._checkState(state);
- pageCol.reset(fullCol.models.slice(pageStart, pageEnd),
- _extend({}, options, {parse: false}));
- }
- }
-
- if (event == "sort") {
- options = collection;
- collection = model;
- if (collection === fullCol) {
- pageCol.reset(fullCol.models.slice(pageStart, pageEnd),
- _extend({}, options, {parse: false}));
- }
- }
-
- _each(_keys(handlers), function (event) {
- var handler = handlers[event];
- _each([pageCol, fullCol], function (col) {
- col.on(event, handler);
- var callbacks = col._events[event] || [];
- callbacks.unshift(callbacks.pop());
- });
- });
- };
- },
-
- /**
- Sanity check this collection's pagination states. Only perform checks
- when all the required pagination state values are defined and not null.
- If `totalPages` is undefined or null, it is set to `totalRecords` /
- `pageSize`. `lastPage` is set according to whether `firstPage` is 0 or 1
- when no error occurs.
-
- @private
-
- @throws {TypeError} If `totalRecords`, `pageSize`, `currentPage` or
- `firstPage` is not a finite integer.
-
- @throws {RangeError} If `pageSize`, `currentPage` or `firstPage` is out
- of bounds.
-
- @return {Object} Returns the `state` object if no error was found.
- */
- _checkState: function (state) {
-
- var mode = this.mode;
- var links = this.links;
- var totalRecords = state.totalRecords;
- var pageSize = state.pageSize;
- var currentPage = state.currentPage;
- var firstPage = state.firstPage;
- var totalPages = state.totalPages;
-
- if (totalRecords != null && pageSize != null && currentPage != null &&
- firstPage != null && (mode == "infinite" ? links : true)) {
-
- totalRecords = finiteInt(totalRecords, "totalRecords");
- pageSize = finiteInt(pageSize, "pageSize");
- currentPage = finiteInt(currentPage, "currentPage");
- firstPage = finiteInt(firstPage, "firstPage");
-
- if (pageSize < 1) {
- throw new RangeError("`pageSize` must be >= 1");
- }
-
- totalPages = state.totalPages = ceil(totalRecords / pageSize);
-
- if (firstPage < 0 || firstPage > 1) {
- throw new RangeError("`firstPage must be 0 or 1`");
- }
-
- state.lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;
-
- if (mode == "infinite") {
- if (!links[currentPage + '']) {
- throw new RangeError("No link found for page " + currentPage);
- }
- }
- else if (currentPage < firstPage ||
- (totalPages > 0 &&
- (firstPage ? currentPage > totalPages : currentPage >= totalPages))) {
- throw new RangeError("`currentPage` must be firstPage <= currentPage " +
- (firstPage ? ">" : ">=") +
- " totalPages if " + firstPage + "-based. Got " +
- currentPage + '.');
- }
- }
-
- return state;
- },
-
- /**
- Change the page size of this collection.
-
- Under most if not all circumstances, you should call this method to
- change the page size of a pageable collection because it will keep the
- pagination state sane. By default, the method will recalculate the
- current page number to one that will retain the current page's models
- when increasing the page size. When decreasing the page size, this method
- will retain the last models to the current page that will fit into the
- smaller page size.
-
- If `options.first` is true, changing the page size will also reset the
- current page back to the first page instead of trying to be smart.
-
- For server mode operations, changing the page size will trigger a #fetch
- and subsequently a `reset` event.
-
- For client mode operations, changing the page size will `reset` the
- current page by recalculating the current page boundary on the client
- side.
-
- If `options.fetch` is true, a fetch can be forced if the collection is in
- client mode.
-
- @param {number} pageSize The new page size to set to #state.
- @param {Object} [options] {@link #fetch} options.
- @param {boolean} [options.first=false] Reset the current page number to
- the first page if `true`.
- @param {boolean} [options.fetch] If `true`, force a fetch in client mode.
-
- @throws {TypeError} If `pageSize` is not a finite integer.
- @throws {RangeError} If `pageSize` is less than 1.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- setPageSize: function (pageSize, options) {
- pageSize = finiteInt(pageSize, "pageSize");
-
- options = options || {first: false};
-
- var state = this.state;
- var totalPages = ceil(state.totalRecords / pageSize);
- var currentPage = totalPages ?
- max(state.firstPage, floor(totalPages * state.currentPage / state.totalPages)) :
- state.firstPage;
-
- state = this.state = this._checkState(_extend({}, state, {
- pageSize: pageSize,
- currentPage: options.first ? state.firstPage : currentPage,
- totalPages: totalPages
- }));
-
- return this.getPage(state.currentPage, _omit(options, ["first"]));
- },
-
- /**
- Switching between client, server and infinite mode.
-
- If switching from client to server mode, the #fullCollection is emptied
- first and then deleted and a fetch is immediately issued for the current
- page from the server. Pass `false` to `options.fetch` to skip fetching.
-
- If switching to infinite mode, and if `options.models` is given for an
- array of models, #links will be populated with a URL per page, using the
- default URL for this collection.
-
- If switching from server to client mode, all of the pages are immediately
- refetched. If you have too many pages, you can pass `false` to
- `options.fetch` to skip fetching.
-
- If switching to any mode from infinite mode, the #links will be deleted.
-
- @param {"server"|"client"|"infinite"} [mode] The mode to switch to.
-
- @param {Object} [options]
-
- @param {boolean} [options.fetch=true] If `false`, no fetching is done.
-
- @param {boolean} [options.resetState=true] If 'false', the state is not
- reset, but checked for sanity instead.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this if `options.fetch` is `false`.
- */
- switchMode: function (mode, options) {
-
- if (!_contains(["server", "client", "infinite"], mode)) {
- throw new TypeError('`mode` must be one of "server", "client" or "infinite"');
- }
-
- options = options || {fetch: true, resetState: true};
-
- var state = this.state = options.resetState ?
- _clone(this._initState) :
- this._checkState(_extend({}, this.state));
-
- this.mode = mode;
-
- var self = this;
- var fullCollection = this.fullCollection;
- var handlers = this._handlers = this._handlers || {}, handler;
- if (mode != "server" && !fullCollection) {
- fullCollection = this._makeFullCollection(options.models || [], options);
- fullCollection.pageableCollection = this;
- this.fullCollection = fullCollection;
- var allHandler = this._makeCollectionEventHandler(this, fullCollection);
- _each(["add", "remove", "reset", "sort"], function (event) {
- handlers[event] = handler = _.bind(allHandler, {}, event);
- self.on(event, handler);
- fullCollection.on(event, handler);
- });
- fullCollection.comparator = this._fullComparator;
- }
- else if (mode == "server" && fullCollection) {
- _each(_keys(handlers), function (event) {
- handler = handlers[event];
- self.off(event, handler);
- fullCollection.off(event, handler);
- });
- delete this._handlers;
- this._fullComparator = fullCollection.comparator;
- delete this.fullCollection;
- }
-
- if (mode == "infinite") {
- var links = this.links = {};
- var firstPage = state.firstPage;
- var totalPages = ceil(state.totalRecords / state.pageSize);
- var lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;
- for (var i = state.firstPage; i <= lastPage; i++) {
- links[i] = this.url;
- }
- }
- else if (this.links) delete this.links;
-
- return options.fetch ?
- this.fetch(_omit(options, "fetch", "resetState")) :
- this;
- },
-
- /**
- @return {boolean} `true` if this collection can page backward, `false`
- otherwise.
- */
- hasPreviousPage: function () {
- var state = this.state;
- var currentPage = state.currentPage;
- if (this.mode != "infinite") return currentPage > state.firstPage;
- return !!this.links[currentPage - 1];
- },
-
- /**
- @return {boolean} `true` if this collection can page forward, `false`
- otherwise.
- */
- hasNextPage: function () {
- var state = this.state;
- var currentPage = this.state.currentPage;
- if (this.mode != "infinite") return currentPage < state.lastPage;
- return !!this.links[currentPage + 1];
- },
-
- /**
- Fetch the first page in server mode, or reset the current page of this
- collection to the first page in client or infinite mode.
-
- @param {Object} options {@link #getPage} options.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getFirstPage: function (options) {
- return this.getPage("first", options);
- },
-
- /**
- Fetch the previous page in server mode, or reset the current page of this
- collection to the previous page in client or infinite mode.
-
- @param {Object} options {@link #getPage} options.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getPreviousPage: function (options) {
- return this.getPage("prev", options);
- },
-
- /**
- Fetch the next page in server mode, or reset the current page of this
- collection to the next page in client mode.
-
- @param {Object} options {@link #getPage} options.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getNextPage: function (options) {
- return this.getPage("next", options);
- },
-
- /**
- Fetch the last page in server mode, or reset the current page of this
- collection to the last page in client mode.
-
- @param {Object} options {@link #getPage} options.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getLastPage: function (options) {
- return this.getPage("last", options);
- },
-
- /**
- Given a page index, set #state.currentPage to that index. If this
- collection is in server mode, fetch the page using the updated state,
- otherwise, reset the current page of this collection to the page
- specified by `index` in client mode. If `options.fetch` is true, a fetch
- can be forced in client mode before resetting the current page. Under
- infinite mode, if the index is less than the current page, a reset is
- done as in client mode. If the index is greater than the current page
- number, a fetch is made with the results **appended** to #fullCollection.
- The current page will then be reset after fetching.
-
- @param {number|string} index The page index to go to, or the page name to
- look up from #links in infinite mode.
- @param {Object} [options] {@link #fetch} options or
- [reset](http://backbonejs.org/#Collection-reset) options for client mode
- when `options.fetch` is `false`.
- @param {boolean} [options.fetch=false] If true, force a {@link #fetch} in
- client mode.
-
- @throws {TypeError} If `index` is not a finite integer under server or
- client mode, or does not yield a URL from #links under infinite mode.
-
- @throws {RangeError} If `index` is out of bounds.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getPage: function (index, options) {
-
- var mode = this.mode, fullCollection = this.fullCollection;
-
- options = options || {fetch: false};
-
- var state = this.state,
- firstPage = state.firstPage,
- currentPage = state.currentPage,
- lastPage = state.lastPage,
- pageSize = state.pageSize;
-
- var pageNum = index;
- switch (index) {
- case "first": pageNum = firstPage; break;
- case "prev": pageNum = currentPage - 1; break;
- case "next": pageNum = currentPage + 1; break;
- case "last": pageNum = lastPage; break;
- default: pageNum = finiteInt(index, "index");
- }
-
- this.state = this._checkState(_extend({}, state, {currentPage: pageNum}));
-
- options.from = currentPage, options.to = pageNum;
-
- var pageStart = (firstPage === 0 ? pageNum : pageNum - 1) * pageSize;
- var pageModels = fullCollection && fullCollection.length ?
- fullCollection.models.slice(pageStart, pageStart + pageSize) :
- [];
- if ((mode == "client" || (mode == "infinite" && !_isEmpty(pageModels))) &&
- !options.fetch) {
- this.reset(pageModels, _omit(options, "fetch"));
- return this;
- }
-
- if (mode == "infinite") options.url = this.links[pageNum];
-
- return this.fetch(_omit(options, "fetch"));
- },
-
- /**
- Fetch the page for the provided item offset in server mode, or reset the current page of this
- collection to the page for the provided item offset in client mode.
-
- @param {Object} options {@link #getPage} options.
-
- @chainable
- @return {XMLHttpRequest|Backbone.PageableCollection} The XMLHttpRequest
- from fetch or this.
- */
- getPageByOffset: function (offset, options) {
- if (offset < 0) {
- throw new RangeError("`offset must be > 0`");
- }
- offset = finiteInt(offset);
-
- var page = floor(offset / this.state.pageSize);
- if (this.state.firstPage !== 0) page++;
- if (page > this.state.lastPage) page = this.state.lastPage;
- return this.getPage(page, options);
- },
-
- /**
- Overidden to make `getPage` compatible with Zepto.
-
- @param {string} method
- @param {Backbone.Model|Backbone.Collection} model
- @param {Object} [options]
-
- @return {XMLHttpRequest}
- */
- sync: function (method, model, options) {
- var self = this;
- if (self.mode == "infinite") {
- var success = options.success;
- var currentPage = self.state.currentPage;
- options.success = function (resp, status, xhr) {
- var links = self.links;
- var newLinks = self.parseLinks(resp, _extend({xhr: xhr}, options));
- if (newLinks.first) links[self.state.firstPage] = newLinks.first;
- if (newLinks.prev) links[currentPage - 1] = newLinks.prev;
- if (newLinks.next) links[currentPage + 1] = newLinks.next;
- if (success) success(resp, status, xhr);
- };
- }
-
- return (BBColProto.sync || Backbone.sync).call(self, method, model, options);
- },
-
- /**
- Parse pagination links from the server response. Only valid under
- infinite mode.
-
- Given a response body and a XMLHttpRequest object, extract pagination
- links from them for infinite paging.
-
- This default implementation parses the RFC 5988 `Link` header and extract
- 3 links from it - `first`, `prev`, `next`. Any subclasses overriding this
- method __must__ return an object hash having only the keys
- above. However, simply returning a `next` link or an empty hash if there
- are no more links should be enough for most implementations.
-
- @param {*} resp The deserialized response body.
- @param {Object} [options]
- @param {XMLHttpRequest} [options.xhr] The XMLHttpRequest object for this
- response.
- @return {Object}
- */
- parseLinks: function (resp, options) {
- var links = {};
- var linkHeader = options.xhr.getResponseHeader("Link");
- if (linkHeader) {
- var relations = ["first", "prev", "next"];
- _each(linkHeader.split(","), function (linkValue) {
- var linkParts = linkValue.split(";");
- var url = linkParts[0].replace(URL_TRIM_RE, '');
- var params = linkParts.slice(1);
- _each(params, function (param) {
- var paramParts = param.split("=");
- var key = paramParts[0].replace(PARAM_TRIM_RE, '');
- var value = paramParts[1].replace(PARAM_TRIM_RE, '');
- if (key == "rel" && _contains(relations, value)) links[value] = url;
- });
- });
- }
-
- return links;
- },
-
- /**
- Parse server response data.
-
- This default implementation assumes the response data is in one of two
- structures:
-
- [
- {}, // Your new pagination state
- [{}, ...] // An array of JSON objects
- ]
-
- Or,
-
- [{}] // An array of JSON objects
-
- The first structure is the preferred form because the pagination states
- may have been updated on the server side, sending them down again allows
- this collection to update its states. If the response has a pagination
- state object, it is checked for errors.
-
- The second structure is the
- [Backbone.Collection#parse](http://backbonejs.org/#Collection-parse)
- default.
-
- **Note:** this method has been further simplified since 1.1.7. While
- existing #parse implementations will continue to work, new code is
- encouraged to override #parseState and #parseRecords instead.
-
- @param {Object} resp The deserialized response data from the server.
- @param {Object} the options for the ajax request
-
- @return {Array.<Object>} An array of model objects
- */
- parse: function (resp, options) {
- var newState = this.parseState(resp, _clone(this.queryParams), _clone(this.state), options);
- if (newState) this.state = this._checkState(_extend({}, this.state, newState));
- return this.parseRecords(resp, options);
- },
-
- /**
- Parse server response for server pagination state updates. Not applicable
- under infinite mode.
-
- This default implementation first checks whether the response has any
- state object as documented in #parse. If it exists, a state object is
- returned by mapping the server state keys to this pageable collection
- instance's query parameter keys using `queryParams`.
-
- It is __NOT__ neccessary to return a full state object complete with all
- the mappings defined in #queryParams. Any state object resulted is merged
- with a copy of the current pageable collection state and checked for
- sanity before actually updating. Most of the time, simply providing a new
- `totalRecords` value is enough to trigger a full pagination state
- recalculation.
-
- parseState: function (resp, queryParams, state, options) {
- return {totalRecords: resp.total_entries};
- }
-
- If you want to use header fields use:
-
- parseState: function (resp, queryParams, state, options) {
- return {totalRecords: options.xhr.getResponseHeader("X-total")};
- }
-
- This method __MUST__ return a new state object instead of directly
- modifying the #state object. The behavior of directly modifying #state is
- undefined.
-
- @param {Object} resp The deserialized response data from the server.
- @param {Object} queryParams A copy of #queryParams.
- @param {Object} state A copy of #state.
- @param {Object} [options] The options passed through from
- `parse`. (backbone >= 0.9.10 only)
-
- @return {Object} A new (partial) state object.
- */
- parseState: function (resp, queryParams, state, options) {
- if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {
-
- var newState = _clone(state);
- var serverState = resp[0];
-
- _each(_pairs(_omit(queryParams, "directions")), function (kvp) {
- var k = kvp[0], v = kvp[1];
- var serverVal = serverState[v];
- if (!_isUndefined(serverVal) && !_.isNull(serverVal)) newState[k] = serverState[v];
- });
-
- if (serverState.order) {
- newState.order = _invert(queryParams.directions)[serverState.order] * 1;
- }
-
- return newState;
- }
- },
-
- /**
- Parse server response for an array of model objects.
-
- This default implementation first checks whether the response has any
- state object as documented in #parse. If it exists, the array of model
- objects is assumed to be the second element, otherwise the entire
- response is returned directly.
-
- @param {Object} resp The deserialized response data from the server.
- @param {Object} [options] The options passed through from the
- `parse`. (backbone >= 0.9.10 only)
-
- @return {Array.<Object>} An array of model objects
- */
- parseRecords: function (resp, options) {
- if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {
- return resp[1];
- }
-
- return resp;
- },
-
- /**
- Fetch a page from the server in server mode, or all the pages in client
- mode. Under infinite mode, the current page is refetched by default and
- then reset.
-
- The query string is constructed by translating the current pagination
- state to your server API query parameter using #queryParams. The current
- page will reset after fetch.
-
- @param {Object} [options] Accepts all
- [Backbone.Collection#fetch](http://backbonejs.org/#Collection-fetch)
- options.
-
- @return {XMLHttpRequest}
- */
- fetch: function (options) {
-
- options = options || {};
-
- var state = this._checkState(this.state);
-
- var mode = this.mode;
-
- if (mode == "infinite" && !options.url) {
- options.url = this.links[state.currentPage];
- }
-
- var data = options.data || {};
-
- // dedup query params
- var url = options.url || this.url || "";
- if (_isFunction(url)) url = url.call(this);
- var qsi = url.indexOf('?');
- if (qsi != -1) {
- _extend(data, queryStringToParams(url.slice(qsi + 1)));
- url = url.slice(0, qsi);
- }
-
- options.url = url;
- options.data = data;
-
- // map params except directions
- var queryParams = this.mode == "client" ?
- _pick(this.queryParams, "sortKey", "order") :
- _omit(_pick(this.queryParams, _keys(PageableProto.queryParams)),
- "directions");
-
- var i, kvp, k, v, kvps = _pairs(queryParams), thisCopy = _clone(this);
- for (i = 0; i < kvps.length; i++) {
- kvp = kvps[i], k = kvp[0], v = kvp[1];
- v = _isFunction(v) ? v.call(thisCopy) : v;
- if (state[k] != null && v != null) {
- data[v] = state[k];
- }
- }
-
- // fix up sorting parameters
- if (state.sortKey && state.order) {
- var o = _isFunction(queryParams.order) ?
- queryParams.order.call(thisCopy) :
- queryParams.order;
- data[o] = this.queryParams.directions[state.order + ""];
- }
- else if (!state.sortKey) delete data[queryParams.order];
-
- // map extra query parameters
- var extraKvps = _pairs(_omit(this.queryParams,
- _keys(PageableProto.queryParams)));
- for (i = 0; i < extraKvps.length; i++) {
- kvp = extraKvps[i];
- v = kvp[1];
- v = _isFunction(v) ? v.call(thisCopy) : v;
- if (v != null) data[kvp[0]] = v;
- }
-
- if (mode != "server") {
- var self = this, fullCol = this.fullCollection;
- var success = options.success;
- options.success = function (col, resp, opts) {
-
- // make sure the caller's intent is obeyed
- opts = opts || {};
- if (_isUndefined(options.silent)) delete opts.silent;
- else opts.silent = options.silent;
-
- var models = col.models;
- if (mode == "client") fullCol.reset(models, opts);
- else {
- fullCol.add(models, _extend({at: fullCol.length},
- _extend(opts, {parse: false})));
- self.trigger("reset", self, opts);
- }
-
- if (success) success(col, resp, opts);
- };
-
- // silent the first reset from backbone
- return BBColProto.fetch.call(this, _extend({}, options, {silent: true}));
- }
-
- return BBColProto.fetch.call(this, options);
- },
-
- /**
- Convenient method for making a `comparator` sorted by a model attribute
- identified by `sortKey` and ordered by `order`.
-
- Like a Backbone.Collection, a Backbone.PageableCollection will maintain
- the __current page__ in sorted order on the client side if a `comparator`
- is attached to it. If the collection is in client mode, you can attach a
- comparator to #fullCollection to have all the pages reflect the global
- sorting order by specifying an option `full` to `true`. You __must__ call
- `sort` manually or #fullCollection.sort after calling this method to
- force a resort.
-
- While you can use this method to sort the current page in server mode,
- the sorting order may not reflect the global sorting order due to the
- additions or removals of the records on the server since the last
- fetch. If you want the most updated page in a global sorting order, it is
- recommended that you set #state.sortKey and optionally #state.order, and
- then call #fetch.
-
- @protected
-
- @param {string} [sortKey=this.state.sortKey] See `state.sortKey`.
- @param {number} [order=this.state.order] See `state.order`.
- @param {(function(Backbone.Model, string): Object) | string} [sortValue] See #setSorting.
-
- See [Backbone.Collection.comparator](http://backbonejs.org/#Collection-comparator).
- */
- _makeComparator: function (sortKey, order, sortValue) {
- var state = this.state;
-
- sortKey = sortKey || state.sortKey;
- order = order || state.order;
-
- if (!sortKey || !order) return;
-
- if (!sortValue) sortValue = function (model, attr) {
- return model.get(attr);
- };
-
- return function (left, right) {
- var l = sortValue(left, sortKey), r = sortValue(right, sortKey), t;
- if (order === 1) t = l, l = r, r = t;
- if (l === r) return 0;
- else if (l < r) return -1;
- return 1;
- };
- },
-
- /**
- Adjusts the sorting for this pageable collection.
-
- Given a `sortKey` and an `order`, sets `state.sortKey` and
- `state.order`. A comparator can be applied on the client side to sort in
- the order defined if `options.side` is `"client"`. By default the
- comparator is applied to the #fullCollection. Set `options.full` to
- `false` to apply a comparator to the current page under any mode. Setting
- `sortKey` to `null` removes the comparator from both the current page and
- the full collection.
-
- If a `sortValue` function is given, it will be passed the `(model,
- sortKey)` arguments and is used to extract a value from the model during
- comparison sorts. If `sortValue` is not given, `model.get(sortKey)` is
- used for sorting.
-
- @chainable
-
- @param {string} sortKey See `state.sortKey`.
- @param {number} [order=this.state.order] See `state.order`.
- @param {Object} [options]
- @param {"server"|"client"} [options.side] By default, `"client"` if
- `mode` is `"client"`, `"server"` otherwise.
- @param {boolean} [options.full=true]
- @param {(function(Backbone.Model, string): Object) | string} [options.sortValue]
- */
- setSorting: function (sortKey, order, options) {
-
- var state = this.state;
-
- state.sortKey = sortKey;
- state.order = order = order || state.order;
-
- var fullCollection = this.fullCollection;
-
- var delComp = false, delFullComp = false;
-
- if (!sortKey) delComp = delFullComp = true;
-
- var mode = this.mode;
- options = _extend({side: mode == "client" ? mode : "server", full: true},
- options);
-
- var comparator = this._makeComparator(sortKey, order, options.sortValue);
-
- var full = options.full, side = options.side;
-
- if (side == "client") {
- if (full) {
- if (fullCollection) fullCollection.comparator = comparator;
- delComp = true;
- }
- else {
- this.comparator = comparator;
- delFullComp = true;
- }
- }
- else if (side == "server" && !full) {
- this.comparator = comparator;
- }
-
- if (delComp) this.comparator = null;
- if (delFullComp && fullCollection) fullCollection.comparator = null;
-
- return this;
- }
-
- });
-
- var PageableProto = PageableCollection.prototype;
-
- return PageableCollection;
-
-}));
[23/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.min.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.min.css b/htrace-core/src/web/lib/rome-2.1.0/rome.min.css
deleted file mode 100644
index 7967e65..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.min.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome */
-.rd-container{display:inline-block;border:1px solid #333;background-color:#fff;padding:10px;text-align:center}.rd-container-attachment{position:absolute}.rd-month{display:inline-block;margin-right:25px}.rd-month:last-child{margin-right:0}.rd-back,.rd-next{cursor:pointer;border:none;outline:0;background:0 0;padding:0;margin:0}.rd-back[disabled],.rd-next[disabled]{cursor:default}.rd-back{float:left}.rd-next{float:right}.rd-back:before{display:block;content:'\2190'}.rd-next:before{display:block;content:'\2192'}.rd-day-body{cursor:pointer;text-align:center}.rd-day-selected,.rd-time-option:hover,.rd-time-selected{cursor:pointer;background-color:#333;color:#fff}.rd-day-next-month,.rd-day-prev-month{color:#999}.rd-day-disabled{cursor:default;color:#fcc}.rd-time{position:relative;display:inline-block;margin-top:5px;min-width:80px}.rd-time-list{display:none;position:absolute;overflow-y:scroll;max-height:160px;left:0;right:0;background-color:#fff;color:#333}.rd-time-option,.rd-time-selected{p
adding:5px}.rd-day-concealed{visibility:hidden}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.min.js b/htrace-core/src/web/lib/rome-2.1.0/rome.min.js
deleted file mode 100644
index 8514e04..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.min.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// rome@v2.1.0, MIT licensed. https://github.com/bevacqua/rome
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.rome=t()}}(function(){var t;return function e(t,n,r){function a(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return a(n?n:e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEven
tListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(t,e){e.exports=t("./src/contra.emitter.js")},{"./src/contra.emitter.js":3}],3:[function(t,e){(function(t){!function(n,r){"use strict";function a(t,e){return Array.prototype.slice.call(t,e)}function i(t,e,n){t&&s(function(){t.apply(n||null,e||[])})}function o(t,e){var n=e||{},o={};return t===r&&(t={}),t.on=function(e,n){return o[e]?o[e].push(n):o[e]=[n],t},t.once=function(e,n){return n._once=!0,t.on(e,n),
t},t.off=function(e,n){var r=arguments.length;if(1===r)delete o[e];else if(0===r)o={};else{var a=o[e];if(!a)return t;a.splice(a.indexOf(n),1)}return t},t.emit=function(){var e=a(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var r=(o[e]||[]).slice(0);return function(){var s=a(arguments),u=this||t;if("error"===e&&n.throws!==!1&&!r.length)throw 1===s.length?s[0]:s;return o[e]=r.filter(function(t){return n.async?i(t,s,u):t.apply(u,s),!t._once}),t}},t}var s,u=""+r,c="function"==typeof setImmediate;s=c?function(t){setImmediate(t)}:typeof t!==u&&t.nextTick?t.nextTick:function(t){setTimeout(t,0)},typeof e!==u&&e.exports?e.exports=o:(n.contra=n.contra||{},n.contra.emitter=o)}(this)}).call(this,t("FWaASH"))},{FWaASH:1}],4:[function(e,n){(function(r){(function(a){function i(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function o(t,e){return Oe.call(t,e)}functi
on s(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function u(t){De.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function c(t,e){var n=!0;return p(function(){return n&&(u(t),n=!1),e.apply(this,arguments)},e)}function l(t,e){bn[t]||(u(e),bn[t]=!0)}function d(t,e){return function(n){return g(t.call(this,n),e)}}function f(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function h(){}function m(t,e){e!==!1&&H(t),_(this,t),this._d=new Date(+t._d)}function y(t){var e=S(t),n=e.year||0,r=e.quarter||0,a=e.month||0,i=e.week||0,o=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+36e5*s,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=De.localeData(),this._bubble()}function p(t,e){for(var n in e)o(e,n)&&(t[n]=e[n]);retur
n o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function _(t,e){var n,r,a;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Le.length>0)for(n in Le)r=Le[n],a=e[r],"undefined"!=typeof a&&(t[r]=a);return t}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function g(t,e,n){for(var r=""+Math.abs(t),a=t>=0;r.length<e;)r="0"+r;return(a?n?"+":"":"-")+r}function w(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.millisecon
ds=+e-+t.clone().add(n.months,"M"),n}function b(t,e){var n;return e=U(e,t),t.isBefore(e)?n=w(t,e):(n=w(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function M(t,e){return function(n,r){var a,i;return null===r||isNaN(+r)||(l(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,a=De.duration(n,r),D(this,a,t),this}}function D(t,e,n,r){var a=e._milliseconds,i=e._days,o=e._months;r=null==r?!0:r,a&&t._d.setTime(+t._d+a*n),i&&_e(t,"Date",pe(t,"Date")+i*n),o&&ye(t,pe(t,"Month")+o*n),r&&De.updateOffset(t,i||o)}function k(t){return"[object Array]"===Object.prototype.toString.call(t)}function Y(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function T(t,e,n){var r,a=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),o=0;for(r=0;a>r;r++)(n&&t[r]!==e[r]||!n&&F(t[r])!==F(e[r]))&&o++;return o+i}function x(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=mn[t]||
yn[e]||e}return t}function S(t){var e,n,r={};for(n in t)o(t,n)&&(e=x(n),e&&(r[e]=t[n]));return r}function O(t){var e,n;if(0===t.indexOf("week"))e=7,n="day";else{if(0!==t.indexOf("month"))return;e=12,n="month"}De[t]=function(r,i){var o,s,u=De._locale[t],c=[];if("number"==typeof r&&(i=r,r=a),s=function(t){var e=De().utc().set(n,t);return u.call(De._locale,e,r||"")},null!=i)return s(i);for(o=0;e>o;o++)c.push(s(o));return c}}function F(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function C(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function I(t,e,n){return de(De([t,11,31+e-n]),e,n).week}function A(t){return E(t)?366:365}function E(t){return t%4===0&&t%100!==0||t%400===0}function H(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Ce]<0||t._a[Ce]>11?Ce:t._a[Ie]<1||t._a[Ie]>C(t._a[Fe],t._a[Ce])?Ie:t._a[Ae]<0||t._a[Ae]>24||24===t._a[Ae]&&(0!==t._a[Ee]||0!==t._a[He]||0!==t._a[Pe])?Ae:t._a[Ee]<0||t._a[Ee]>59?Ee:t._a[He]<0||t._a[He]>59?He:t._a[Pe]<0||t
._a[Pe]>999?Pe:-1,t._pf._overflowDayOfYear&&(Fe>e||e>Ie)&&(e=Ie),t._pf.overflow=e)}function P(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===a)),t._isValid}function W(t){return t?t.toLowerCase().replace("_","-"):t}function L(t){for(var e,n,r,a,i=0;i<t.length;){for(a=W(t[i]).split("-"),e=a.length,n=W(t[i+1]),n=n?n.split("-"):null;e>0;){if(r=G(a.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(a,n,!0)>=e-1)break;e--}i++}return null}function G(t){var n=null;if(!We[t]&&Ge)try{n=De.locale(),e("./locale/"+t),De.locale(n)}catch(r){}return We[t]}function U(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(De.isMoment(t)||Y(t)?+t:+De(t))-+n,n._d.setTime(+n._d+r),De.updateOffset(n,!1),n):De(t).local()}function N(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]
$/g,""):t.replace(/\\/g,"")}function z(t){var e,n,r=t.match(je);for(e=0,n=r.length;n>e;e++)r[e]=wn[r[e]]?wn[r[e]]:N(r[e]);return function(a){var i="";for(e=0;n>e;e++)i+=r[e]instanceof Function?r[e].call(a,t):r[e];return i}}function j(t,e){return t.isValid()?(e=V(e,t.localeData()),pn[e]||(pn[e]=z(e)),pn[e](t)):t.localeData().invalidDate()}function V(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ve.lastIndex=0;r>=0&&Ve.test(t);)t=t.replace(Ve,n),Ve.lastIndex=0,r-=1;return t}function B(t,e){var n,r=e._strict;switch(t){case"Q":return en;case"DDDD":return rn;case"YYYY":case"GGGG":case"gggg":return r?an:qe;case"Y":case"G":case"g":return sn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?on:Re;case"S":if(r)return en;case"SS":if(r)return nn;case"SSS":if(r)return rn;case"DDD":return Ze;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Je;case"a":case"A":return e._locale._meridiemParse;case"x":return Ke;case"X":return tn;case"Z":case"ZZ":return Qe;case"T":retu
rn Xe;case"SSSS":return $e;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?nn:Be;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Be;case"Do":return r?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return n=new RegExp(te(K(t.replace("\\","")),"i"))}}function Z(t){t=t||"";var e=t.match(Qe)||[],n=e[e.length-1]||[],r=(n+"").match(fn)||["-",0,0],a=+(60*r[1])+F(r[2]);return"+"===r[0]?-a:a}function q(t,e,n){var r,a=n._a;switch(t){case"Q":null!=e&&(a[Ce]=3*(F(e)-1));break;case"M":case"MM":null!=e&&(a[Ce]=F(e)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(e,t,n._strict),null!=r?a[Ce]=r:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(a[Ie]=F(e));break;case"Do":null!=e&&(a[Ie]=F(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=F(e));break;case"YY":a[Fe]=De.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":a[F
e]=F(e);break;case"a":case"A":n._isPm=n._locale.isPM(e);break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":a[Ae]=F(e);break;case"m":case"mm":a[Ee]=F(e);break;case"s":case"ss":a[He]=F(e);break;case"S":case"SS":case"SSS":case"SSSS":a[Pe]=F(1e3*("0."+e));break;case"x":n._d=new Date(F(e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=Z(e);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(e),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=F(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=De.parseTwoDigitYear(e)}}function R(t){var e,n,r,a,o,s,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,s=4,n=i(e.GG,t._a[Fe],de(De(),1,4).year),r=i(e.W,1),a=i(e.E,1)):(o=t._locale._week.dow,s=t._locale._week.doy,n=i(e.gg,t._a[Fe],de(De(),o,s).year),r=i(e.w,1),null!=e.d?(a=e.d,o>a&&
++r):a=null!=e.e?e.e+o:o),u=fe(n,r,a,s,o),t._a[Fe]=u.year,t._dayOfYear=u.dayOfYear}function $(t){var e,n,r,a,o=[];if(!t._d){for(r=Q(t),t._w&&null==t._a[Ie]&&null==t._a[Ce]&&R(t),t._dayOfYear&&(a=i(t._a[Fe],r[Fe]),t._dayOfYear>A(a)&&(t._pf._overflowDayOfYear=!0),n=se(a,0,t._dayOfYear),t._a[Ce]=n.getUTCMonth(),t._a[Ie]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ae]&&0===t._a[Ee]&&0===t._a[He]&&0===t._a[Pe]&&(t._nextDay=!0,t._a[Ae]=0),t._d=(t._useUTC?se:oe).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()+t._tzm),t._nextDay&&(t._a[Ae]=24)}}function J(t){var e;t._d||(e=S(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],$(t))}function Q(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function X(t){if(t._f===De.ISO_8601)return ne(t),void 0;t._a=[],t._pf.empty=!0;var e,n,r,i
,o,s=""+t._i,u=s.length,c=0;for(r=V(t._f,t._locale).match(je)||[],e=0;e<r.length;e++)i=r[e],n=(s.match(B(i,t))||[])[0],n&&(o=s.substr(0,s.indexOf(n)),o.length>0&&t._pf.unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),wn[i]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(i),q(i,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-c,s.length>0&&t._pf.unusedInput.push(s),t._pf.bigHour===!0&&t._a[Ae]<=12&&(t._pf.bigHour=a),t._isPm&&t._a[Ae]<12&&(t._a[Ae]+=12),t._isPm===!1&&12===t._a[Ae]&&(t._a[Ae]=0),$(t),H(t)}function K(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,a){return e||n||r||a})}function te(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ee(t){var e,n,r,a,i;if(0===t._f.length)return t._pf.invalidFormat=!0,t._d=new Date(0/0),void 0;for(a=0;a<t._f.length;a++)i=0,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._pf=s(),e._f=t._f[a],X(e),P(e)&&(i+=e._pf.charsLeftOver,i+=10*e._pf.unusedTokens.length,e._pf.scor
e=i,(null==r||r>i)&&(r=i,n=e));p(t,n||e)}function ne(t){var e,n,r=t._i,a=un.exec(r);if(a){for(t._pf.iso=!0,e=0,n=ln.length;n>e;e++)if(ln[e][1].exec(r)){t._f=ln[e][0]+(a[6]||" ");break}for(e=0,n=dn.length;n>e;e++)if(dn[e][1].exec(r)){t._f+=dn[e][0];break}r.match(Qe)&&(t._f+="Z"),X(t)}else t._isValid=!1}function re(t){ne(t),t._isValid===!1&&(delete t._isValid,De.createFromInputFallback(t))}function ae(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function ie(t){var e,n=t._i;n===a?t._d=new Date:Y(n)?t._d=new Date(+n):null!==(e=Ue.exec(n))?t._d=new Date(+e[1]):"string"==typeof n?re(t):k(n)?(t._a=ae(n.slice(0),function(t){return parseInt(t,10)}),$(t)):"object"==typeof n?J(t):"number"==typeof n?t._d=new Date(n):De.createFromInputFallback(t)}function oe(t,e,n,r,a,i,o){var s=new Date(t,e,n,r,a,i,o);return 1970>t&&s.setFullYear(t),s}function se(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ue(t,e){if("string"==typeof t)if(
isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function ce(t,e,n,r,a){return a.relativeTime(e||1,!!n,t,r)}function le(t,e,n){var r=De.duration(t).abs(),a=Se(r.as("s")),i=Se(r.as("m")),o=Se(r.as("h")),s=Se(r.as("d")),u=Se(r.as("M")),c=Se(r.as("y")),l=a<_n.s&&["s",a]||1===i&&["m"]||i<_n.m&&["mm",i]||1===o&&["h"]||o<_n.h&&["hh",o]||1===s&&["d"]||s<_n.d&&["dd",s]||1===u&&["M"]||u<_n.M&&["MM",u]||1===c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,ce.apply({},l)}function de(t,e,n){var r,a=n-e,i=n-t.day();return i>a&&(i-=7),a-7>i&&(i+=7),r=De(t).add(i,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function fe(t,e,n,r,a){var i,o,s=se(t,0,1).getUTCDay();return s=0===s?7:s,n=null!=n?n:a,i=a-s+(s>r?7:0)-(a>s?7:0),o=7*(e-1)+(n-a)+i+1,{year:o>0?t:t-1,dayOfYear:o>0?o:A(t-1)+o}}function he(t){var e,n=t._i,r=t._f;return t._locale=t._locale||De.localeData(t._l),null===n||r===a&&""===n?De.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t.
_locale.preparse(n)),De.isMoment(n)?new m(n,!0):(r?k(r)?ee(t):X(t):ie(t),e=new m(t),e._nextDay&&(e.add(1,"d"),e._nextDay=a),e))}function me(t,e){var n,r;if(1===e.length&&k(e[0])&&(e=e[0]),!e.length)return De();for(n=e[0],r=1;r<e.length;++r)e[r][t](n)&&(n=e[r]);return n}function ye(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),C(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function pe(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function _e(t,e,n){return"Month"===e?ye(t,n):t._d["set"+(t._isUTC?"UTC":"")+e](n)}function ve(t,e){return function(n){return null!=n?(_e(this,t,n),De.updateOffset(this,e),this):pe(this,t)}}function ge(t){return 400*t/146097}function we(t){return 146097*t/400}function be(t){De.duration.fn[t]=function(){return this._data[t]}}function Me(t){"undefined"==typeof ender&&(ke=xe.moment,xe.moment=t?c("Accessing Moment through the global scope is deprecated, and will be removed in an
upcoming release.",De):De)}for(var De,ke,Ye,Te="2.8.4",xe="undefined"!=typeof r?r:this,Se=Math.round,Oe=Object.prototype.hasOwnProperty,Fe=0,Ce=1,Ie=2,Ae=3,Ee=4,He=5,Pe=6,We={},Le=[],Ge="undefined"!=typeof n&&n&&n.exports,Ue=/^\/?Date\((\-?\d+)/i,Ne=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,ze=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,je=/(\[[^\[]*\])|(\\)?(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,Ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Be=/\d\d?/,Ze=/\d{1,3}/,qe=/\d{1,4}/,Re=/[+\-]?\d{1,6}/,$e=/\d+/,Je=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qe=/Z|[\+\-]\d\d:?\d\d/gi,Xe=/T/i,Ke=/[\+\-]?\d+/,tn=/[\+\-]?\d+(\.\d{1,3})?/,en=/\d/,nn=/\d\d/,rn=/\d{3}/,an=/\d{4}/,on=/[+-]?\d{6}/,sn=/[+-]?\d+/,un=/^\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)?)?$/,cn="YYYY-MM-DDTHH:mm:ssZ",ln=[["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}/]],dn=[["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/]],fn=/([\+\-]|\d\d)/gi,hn=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),mn={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"},yn={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},pn={},_n={s:45,m:45,h:22,d:26,M:11},vn="DDD w W M D d".sp
lit(" "),gn="M D H h m s w W".split(" "),wn={M:function(){return this.month()+1},MMM:function(t){return this.localeData().monthsShort(this,t)},MMMM:function(t){return this.localeData().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.localeData().weekdaysMin(this,t)},ddd:function(t){return this.localeData().weekdaysShort(this,t)},dddd:function(t){return this.localeData().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return g(this.year()%100,2)},YYYY:function(){return g(this.year(),4)},YYYYY:function(){return g(this.year(),5)},YYYYYY:function(){var t=this.year(),e=t>=0?"+":"-";return e+g(Math.abs(t),6)},gg:function(){return g(this.weekYear()%100,2)},gggg:function(){return g(this.weekYear(),4)},ggggg:function(){return g(this.weekYear(),5)},GG:function(){return g(this.isoWeekYear()%100,2)},GGGG:function(){return g(this.isoWeekYear(),4
)},GGGGG:function(){return g(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 F(this.milliseconds()/100)},SS:function(){return g(F(this.milliseconds()/10),2)},SSS:function(){return g(this.milliseconds(),3)},SSSS:function(){return g(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+g(F(t/60),2)+":"+g(F(t)%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+g(F(t/60),2)+g(F(t)%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
()}},bn={},Mn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];vn.length;)Ye=vn.pop(),wn[Ye+"o"]=f(wn[Ye],Ye);for(;gn.length;)Ye=gn.pop(),wn[Ye+Ye]=d(wn[Ye],2);wn.DDDD=d(wn.DDD,3),p(h.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;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(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t,e,n){var r,a,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(a=De.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegEx
p("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=De([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i"
)),this._weekdaysParse[e].test(t))return e},_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(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>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(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.apply(e,[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(t,e,n,r){var a=this._relativeTime[n];return"function"==typeof a?a(t,e,n,r):a.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return de(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),De=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=a),i={},i._isAMomentObject=!0,i._i=t,i._f=e,i._l=n,i._strict=r,i._isUTC=!1,i._pf=s(),he(i)},De.suppressDeprecationWarnings=!1,De.createFromInputFallback=c("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(t){t._
d=new Date(t._i+(t._useUTC?" UTC":""))}),De.min=function(){var t=[].slice.call(arguments,0);return me("isBefore",t)},De.max=function(){var t=[].slice.call(arguments,0);return me("isAfter",t)},De.utc=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=a),i={},i._isAMomentObject=!0,i._useUTC=!0,i._isUTC=!0,i._l=n,i._i=t,i._f=e,i._strict=r,i._pf=s(),he(i).utc()},De.unix=function(t){return De(1e3*t)},De.duration=function(t,e){var n,r,a,i,s=t,u=null;return De.isDuration(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(u=Ne.exec(t))?(n="-"===u[1]?-1:1,s={y:0,d:F(u[Ie])*n,h:F(u[Ae])*n,m:F(u[Ee])*n,s:F(u[He])*n,ms:F(u[Pe])*n}):(u=ze.exec(t))?(n="-"===u[1]?-1:1,a=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n},s={y:a(u[2]),M:a(u[3]),d:a(u[4]),h:a(u[5]),m:a(u[6]),s:a(u[7]),w:a(u[8])}):"object"==typeof s&&("from"in s||"to"in s)&&(i=b(De(s.from),De(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new y(s),De.is
Duration(t)&&o(t,"_locale")&&(r._locale=t._locale),r},De.version=Te,De.defaultFormat=cn,De.ISO_8601=function(){},De.momentProperties=Le,De.updateOffset=function(){},De.relativeTimeThreshold=function(t,e){return _n[t]===a?!1:e===a?_n[t]:(_n[t]=e,!0)},De.lang=c("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return De.locale(t,e)}),De.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?De.defineLocale(t,e):De.localeData(t),n&&(De.duration._locale=De._locale=n)),De._locale._abbr},De.defineLocale=function(t,e){return null!==e?(e.abbr=t,We[t]||(We[t]=new h),We[t].set(e),De.locale(t),We[t]):(delete We[t],null)},De.langData=c("moment.langData is deprecated. Use moment.localeData instead.",function(t){return De.localeData(t)}),De.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return De._locale;if(!k(t)){if(e=G(t))return e;t=[t]}return L(t)},De.isMoment=function(t){return t instanceof m||null!=t&&o(t,"_isAMomentObject")},
De.isDuration=function(t){return t instanceof y};for(Ye=Mn.length-1;Ye>=0;--Ye)O(Mn[Ye]);De.normalizeUnits=function(t){return x(t)},De.invalid=function(t){var e=De.utc(0/0);return null!=t?p(e._pf,t):e._pf.userInvalidated=!0,e},De.parseZone=function(){return De.apply(null,arguments).parseZone()},De.parseTwoDigitYear=function(t){return F(t)+(F(t)>68?1900:2e3)},p(De.fn=m.prototype,{clone:function(){return De(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 t=De(this).utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():j(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):j(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.se
conds(),t.milliseconds()]},isValid:function(){return P(this)},isDSTShifted:function(){return this._a?this.isValid()&&T(this._a,(this._isUTC?De.utc(this._a):De(this._a)).toArray())>0:!1},parsingFlags:function(){return p({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.zone(0,t)},local:function(t){return this._isUTC&&(this.zone(0,t),this._isUTC=!1,t&&this.add(this._dateTzOffset(),"m")),this},format:function(t){var e=j(this,t||De.defaultFormat);return this.localeData().postformat(e)},add:M(1,"add"),subtract:M(-1,"subtract"),diff:function(t,e,n){var r,a,i,o=U(t,this),s=6e4*(this.zone()-o.zone());return e=x(e),"year"===e||"month"===e?(r=432e5*(this.daysInMonth()+o.daysInMonth()),a=12*(this.year()-o.year())+(this.month()-o.month()),i=this-De(this).startOf("month")-(o-De(o).startOf("month")),i-=6e4*(this.zone()-De(this).startOf("month").zone()-(o.zone()-De(o).startOf("month").zone())),a+=i/r,"year"===e&&(a/=12)):(r=this-o,a="second"===e?r/1e3:"minute
"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-s)/864e5:"week"===e?(r-s)/6048e5:r),n?a:v(a)},from:function(t,e){return De.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(De(),t)},calendar:function(t){var e=t||De(),n=U(e,this).startOf("day"),r=this.diff(n,"days",!0),a=-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(a,this,De(e)))},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(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ue(t,this.localeData()),this.add(t-e,"d")):e},month:ve("Month",!0),startOf:function(t){switch(t=x(t)){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"s
econd":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=x(t),t===a||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){var n;return e=x("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this>+t):(n=De.isMoment(t)?+t:+De(t),n<+this.clone().startOf(e))},isBefore:function(t,e){var n;return e=x("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+t>+this):(n=De.isMoment(t)?+t:+De(t),+this.clone().endOf(e)<n)},isSame:function(t,e){var n;return e=x(e||"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this===+t):(n=+De(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))},min:c("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),this>t?
this:t}),max:c("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),t>this?this:t}),zone:function(t,e){var n,r=this._offset||0;return null==t?this._isUTC?r:this._dateTzOffset():("string"==typeof t&&(t=Z(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateTzOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.subtract(n,"m"),r!==t&&(!e||this._changeInProgress?D(this,De.duration(r-t,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,De.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(t){return t=t?De(t).zone():0,(this.zone()-t)%60===0},daysInMonth:function(){return C(this.year(),this.month())},dayOfYear:functi
on(t){var e=Se((De(this).startOf("day")-De(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=de(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=de(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=de(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return I(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return I(this.year(),t.dow,t.doy)},get:function(t){return t=x(t),this[t]()},set:function(t,e){ret
urn t=x(t),"function"==typeof this[t]&&this[t](e),this},locale:function(t){var e;return t===a?this._locale._abbr:(e=De.localeData(t),null!=e&&(this._locale=e),this)
-},lang:c("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===a?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),De.fn.millisecond=De.fn.milliseconds=ve("Milliseconds",!1),De.fn.second=De.fn.seconds=ve("Seconds",!1),De.fn.minute=De.fn.minutes=ve("Minutes",!1),De.fn.hour=De.fn.hours=ve("Hours",!0),De.fn.date=ve("Date",!0),De.fn.dates=c("dates accessor is deprecated. Use date instead.",ve("Date",!0)),De.fn.year=ve("FullYear",!0),De.fn.years=c("years accessor is deprecated. Use year instead.",ve("FullYear",!0)),De.fn.days=De.fn.day,De.fn.months=De.fn.month,De.fn.weeks=De.fn.week,De.fn.isoWeeks=De.fn.isoWeek,De.fn.quarters=De.fn.quarter,De.fn.toJSON=De.fn.toISOString,p(De.duration.fn=y.prototype,{_bubble:function(){var t,e,n,r=this._milliseconds,a=this._days,i=this
._months,o=this._data,s=0;o.milliseconds=r%1e3,t=v(r/1e3),o.seconds=t%60,e=v(t/60),o.minutes=e%60,n=v(e/60),o.hours=n%24,a+=v(n/24),s=v(ge(a)),a-=v(we(s)),i+=v(a/30),a%=30,s+=v(i/12),i%=12,o.days=a,o.months=i,o.years=s},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 v(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12)},humanize:function(t){var e=le(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=De.duration(t,e);return
this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=De.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=x(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=x(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*ge(e),"month"===t?n:n/12;switch(e=this._days+Math.round(we(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:De.fn.lang,locale:De.fn.locale,toIsoString:c("toIsoString() is deprecated. Please use toISOString() instead (notice th
e capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),a=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||a||i?"T":"")+(r?r+"H":"")+(a?a+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}}),De.duration.fn.toString=De.duration.fn.toISOString;for(Ye in hn)o(hn,Ye)&&be(Ye.toLowerCase());De.duration.fn.asMilliseconds=function(){return this.as("ms")},De.duration.fn.asSeconds=function(){return this.as("s")},De.duration.fn.asMinutes=function(){return this.as("m")},De.duration.fn.asHours=function(){return this.as("h")},De.duration.fn.asDays=function(){return this.as("d")},De.duration.fn.asWeeks=function(){return this.as("weeks")},De.duration.fn.asMonths=function(){return this.as("M")},De.duration.fn.asYears=function(){return
this.as("y")},De.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ge?n.exports=De:"function"==typeof t&&t.amd?(t("moment",function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(xe.moment=ke),De}),Me(!0)):Me()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e){for(var n=t("performance-now"),r="undefined"==typeof window?{}:window,a=["moz","webkit"],i="AnimationFrame",o=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],u=!0,c=0;c<a.length&&!o;c++)o=r[a[c]+"Request"+i],s=r[a[c]+"Cancel"+i]||r[a[c]+"CancelRequest"+i];if(!o||!s){u=!1;var l=0,d=0,f=[],h=1e3/60;o=function(t){if(0===f.length){var e=n(),r=Math.max(0,h-(e-l));l=r+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(n){setTimeout(function(){throw n},0)}},Math.round(r))}r
eturn f.push({handle:++d,callback:t,cancelled:!1}),d},s=function(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0)}}e.exports=function(t){return u?o.call(r,function(){try{t.apply(this,arguments)}catch(e){setTimeout(function(){throw e},0)}}):o.call(r,t)},e.exports.cancel=function(){s.apply(r,arguments)}},{"performance-now":6}],6:[function(t,e){(function(t){(function(){var n,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var t;return t=r(),1e9*t[0]+t[1]},a=n()):Date.now?(e.exports=function(){return Date.now()-a},a=Date.now()):(e.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)}).call(this,t("FWaASH"))},{FWaASH:1}],7:[function(t,e){"use strict";function n(t,e){var n=u[t.id];return n&&n[e.id]}function r(t,e){var n=u[t.id];n||(n=u[t.id]={});var r=i(e);n[e.id
]=r,t.on("data",r),t.on("destroyed",a.bind(null,t,e))}function a(t,e){var n=u[t.id];if(n){var r=n[e.id];t.off("data",r),delete n[e.id]}}function i(t){return function(){t.refresh()}}function o(t,e){s(e.associated)||n(t,e)||r(t,e)}var s=t("./isInput"),u={};e.exports={add:o,remove:a}},{"./isInput":18}],8:[function(t,e){"use strict";function n(t){function e(){return Te}function n(n){return de=l(n||t,Te),me||(me=o({className:de.styles.container})),ye=de.weekdayFormat,pe=ye.length,ve=r,_e=r,ge=r,we=r,de.appendTo.appendChild(me),R(me),xe=!1,fe=de.initialValue?de.initialValue:d.moment(),he=fe.clone(),Te.container=me,Te.destroyed=!1,Te.destroy=p.bind(Te,!1),Te.emitValues=B,Te.getDate=ue,Te.getDateString=ce,Te.getMoment=le,Te.hide=C,Te.options=v,Te.options.reset=g,Te.refresh=Z,Te.restore=e,Te.setValue=q,Te.show=F,F(),_(),y(),Te}function y(){Te.emit("ready",c(de))}function p(t){me&&me.parentNode.removeChild(me),de&&_(!0);var r=Te.emitterSnapshot("destroyed");return Te.destroyed=!0,Te.destroy=e
,Te.emitValues=e,Te.getDate=m,Te.getDateString=m,Te.getMoment=m,Te.hide=e,Te.options=e,Te.options.reset=e,Te.refresh=e,Te.restore=n,Te.setValue=e,Te.show=e,Te.off(),t!==!0&&r(),Te}function _(t){var e=t?"remove":"add";de.autoHideOnBlur&&h[e](document.documentElement,"focus",E,!0),de.autoHideOnClick&&h[e](document,"click",H)}function v(t){return 0===arguments.length?c(de):(p(),n(t),Te)}function g(){return v({appendTo:de.appendTo})}function w(){xe||(xe=!0,b(),M(),Te.emit("render"))}function b(){function t(t){var e=o({className:de.styles.month,parent:be});0===t&&(Me=o({type:"button",className:de.styles.back,attributes:{type:"button"},parent:e})),t===de.monthsInCalendar-1&&(De=o({type:"button",className:de.styles.next,attributes:{type:"button"},parent:e}));var n,r=o({className:de.styles.monthLabel,parent:e}),a=o({type:"table",className:de.styles.dayTable,parent:e}),i=o({type:"thead",className:de.styles.dayHead,parent:a}),s=o({type:"tr",className:de.styles.dayRow,parent:i}),u=o({type:"tbo
dy",className:de.styles.dayBody,parent:a});for(n=0;pe>n;n++)o({type:"th",className:de.styles.dayHeadElem,parent:s,text:ye[D(n)]});u.setAttribute(Se,t),Oe.push({label:r,body:u})}if(de.date){var e;for(Oe=[],be=o({className:de.styles.date,parent:me}),e=0;e<de.monthsInCalendar;e++)t(e);h.add(Me,"click",P),h.add(De,"click",W),h.add(be,"click",re)}}function M(){if(de.time&&de.timeInterval){var t=o({className:de.styles.time,parent:me});ke=o({className:de.styles.selectedTime,parent:t,text:fe.format(de.timeFormat)}),h.add(ke,"click",Y),Ye=o({className:de.styles.timeList,parent:t}),h.add(Ye,"click",se);for(var e=d.moment("00:00:00","HH:mm:ss"),n=e.clone().add(1,"days");e.isBefore(n);)o({className:de.styles.timeOption,parent:Ye,text:e.format(de.timeFormat)}),e.add(de.timeInterval,"seconds")}}function D(t,e){var n=e?-1:1,r=t+de.weekStart*n;return(r>=pe||0>r)&&(r+=pe*-n),r}function k(){if(de.time&&xe){var t,e,n,r,a=Ye.children,i=a.length;for(r=0;i>r;r++)n=a[r],e=d.moment(s(n),de.timeFormat),t=oe
(fe.clone(),e),n.style.display=Q(t,!1,de.timeValidator)?"block":"none"}}function Y(t){var e="boolean"==typeof t?t:"none"===Ye.style.display;e?T():x()}function T(){Ye&&(Ye.style.display="block")}function x(){Ye&&(Ye.style.display="none")}function S(){me.style.display="inline-block",Te.emit("show")}function O(){me.style.display="none",Te.emit("hide")}function F(){return w(),Z(),Y(!de.date),S(),Te}function C(){return x(),i(O),Te}function I(){x();var t=f.contains(me,de.styles.positioned);return t&&i(O),Te}function A(t){var e=t.target;if(e===Te.associated)return!0;for(;e;){if(e===me)return!0;e=e.parentNode}}function E(t){A(t)||I()}function H(t){A(t)||I()}function P(){L("subtract")}function W(){L("add")}function L(t){var e,n="add"===t?-1:1,r=de.monthsInCalendar+n*ie(we);he[t](r,"months"),e=te(he.clone()),fe=e||fe,e&&(he=e.clone()),G()}function G(t){U(),V(),t!==!0&&B(),k()}function U(){function t(t,e){var n=he.clone().add(e,"months");s(t.label,n.format(de.monthFormat)),R(t.body)}if(de.date
&&xe){var e=he.year(),n=he.month(),r=he.date();if(r!==ge||n!==ve||e!==_e){var a=z();if(ge=he.date(),ve=he.month(),_e=he.year(),a)return N(),void 0;Oe.forEach(t),$()}}}function N(){function t(t){var e,n=[];for(e=0;e<t.length;e++)n.push(t[e]);return n}function e(e){return t(e.children)}function n(t){return!f.contains(t,de.styles.dayPrevMonth)&&!f.contains(t,de.styles.dayNextMonth)}var r=he.date()-1;ae(!1),Oe.forEach(function(a){var i;j(a.date,he)&&(i=t(a.body.children).map(e),i=Array.prototype.concat.apply([],i).filter(n),ae(i[r]))})}function z(){function t(t){return _e?j(t.date,he):!1}return Oe.some(t)}function j(t,e){return t&&e&&t.year()===e.year()&&t.month()===e.month()}function V(){de.time&&xe&&s(ke,fe.format(de.timeFormat))}function B(){return Te.emit("data",ce()),Te.emit("year",fe.year()),Te.emit("month",fe.month()),Te.emit("day",fe.day()),Te.emit("time",fe.format(de.timeFormat)),Te}function Z(){return _e=!1,ve=!1,ge=!1,G(!0),Te}function q(t){var e=u(t,de.inputFormat);if(null!=
=e)return fe=te(e)||fe,he=fe.clone(),G(!0),Te}function R(t,e){for(;t&&t.firstChild;)t.removeChild(t.firstChild);e===!0&&t.parentNode.removeChild(t)}function $(){var t;for(t=0;t<de.monthsInCalendar;t++)J(t)}function J(t){function e(t){var e,r,a;for(e=0;e<t.length;e++)f.children.length===pe&&(f=o({type:"tr",className:de.styles.dayRow,parent:i.body})),r=t.base.clone().add(e,"days"),a=o({type:"td",parent:f,text:r.format(de.dayFormat),className:n(r,t.cell.join(" ").split(" ")).join(" ")}),t.selectable&&r.date()===c&&ae(a)}function n(t,e){return Q(t,!0,de.dateValidator)||e.push(y),e}function r(t,e){return t&&e.push(de.styles.dayConcealed),e}var a,i=Oe[t],s=he.clone().add(t,"months"),u=s.daysInMonth(),c=s.month()!==fe.month()?-1:fe.date(),l=s.clone().date(1),d=D(l.day(),!0),f=o({type:"tr",className:de.styles.dayRow,parent:i.body}),h=r(0!==t,[de.styles.dayBodyElem,de.styles.dayPrevMonth]),m=r(t!==de.monthsInCalendar-1,[de.styles.dayBodyElem,de.styles.dayNextMonth]),y=de.styles.dayDisabled;e
({base:l.clone().subtract(d,"days"),length:d,cell:h}),e({base:l.clone(),length:u,cell:[de.styles.dayBodyElem],selectable:!0}),a=l.clone().add(u,"days"),e({base:a,length:pe-f.children.length,cell:m}),Me.disabled=!X(l,!0),De.disabled=!K(a,!0),i.date=s.clone()}function Q(t,e,n){if(!X(t,e))return!1;if(!K(t,e))return!1;var r=(n||Function.prototype).call(Te,t.toDate());return r!==!1}function X(t,e){var n=de.min?e?de.min.clone().startOf("day"):de.min:!1;return!n||!t.isBefore(n)}function K(t,e){var n=de.max?e?de.max.clone().endOf("day"):de.max:!1;return!n||!t.isAfter(n)}function te(t){if(de.min&&t.isBefore(de.min))return te(de.min.clone());if(de.max&&t.isAfter(de.max))return te(de.max.clone());var e=t.clone().subtract(1,"days");return ne(e,t,"add")?ee(e):(e=t.clone(),ne(e,t,"subtract")?ee(e):void 0)}function ee(t){var e,n=t.clone().subtract(de.timeInterval,"seconds"),r=Math.ceil(Fe/de.timeInterval);for(e=0;r>e;e++)if(n.add(de.timeInterval,"seconds"),n.date()>t.date()&&n.subtract(1,"days"),d
e.timeValidator.call(Te,n.toDate())!==!1)return n}function ne(t,e,n){for(var r=!1;r===!1&&(t[n](1,"days"),t.month()===e.month());)r=de.dateValidator.call(Te,t.toDate());return r!==!1}function re(t){var e=t.target;if(!f.contains(e,de.styles.dayDisabled)&&f.contains(e,de.styles.dayBodyElem)){var n=parseInt(s(e),10),r=f.contains(e,de.styles.dayPrevMonth),a=f.contains(e,de.styles.dayNextMonth),i=ie(e)-ie(we);fe.add(i,"months"),(r||a)&&fe.add(r?-1:1,"months"),ae(e),fe.date(n),oe(fe,te(fe)||fe),he=fe.clone(),de.autoClose===!0&&I(),G()}}function ae(t){we&&f.remove(we,de.styles.selectedDay),t&&f.add(t,de.styles.selectedDay),we=t}function ie(t){for(var e;t&&t.getAttribute;){if(e=t.getAttribute(Se),"string"==typeof e)return parseInt(e,10);t=t.parentNode}return 0}function oe(t,e){return t.hour(e.hour()).minute(e.minute()).second(e.second()),t}function se(t){var e=t.target;if(f.contains(e,de.styles.timeOption)){var n=d.moment(s(e),de.timeFormat);oe(fe,n),he=fe.clone(),B(),V(),!de.date&&de.autoC
lose===!0||"time"===de.autoClose?I():x()}}function ue(){return fe.toDate()}function ce(t){return fe.format(t||de.inputFormat)}function le(){return fe.clone()}var de,fe,he,me,ye,pe,_e,ve,ge,we,be,Me,De,ke,Ye,Te=a({}),xe=!1,Se="data-rome-offset",Oe=[],Fe=86400;return n(),i(y),Te}var r,a=t("contra.emitter"),i=t("raf"),o=t("./dom"),s=t("./text"),u=t("./parse"),c=t("./clone"),l=t("./defaults"),d=t("./momentum"),f=t("./classes"),h=t("./events"),m=t("./noop");e.exports=n},{"./classes":9,"./clone":10,"./defaults":12,"./dom":13,"./events":14,"./momentum":19,"./noop":20,"./parse":21,"./text":33,"contra.emitter":2,raf:5}],9:[function(t,e){"use strict";function n(t){return t.className.replace(s,"").split(u)}function r(t,e){t.className=e.join(" ")}function a(t,e){var n=i(t,e);n.push(e),r(t,n)}function i(t,e){var a=n(t),i=a.indexOf(e);return-1!==i&&(a.splice(i,1),r(t,a)),a}function o(t,e){return-1!==n(t).indexOf(e)}var s=/^\s+|\s+$/g,u=/\s+/;e.exports={add:a,remove:i,contains:o}},{}],10:[function
(t,e){"use strict";function n(t){var e,a={};for(var i in t)e=t[i],a[i]=e?r.isMoment(e)?e.clone():e._isStylesConfiguration?n(e):e:e;return a}var r=t("./momentum");e.exports=n},{"./momentum":19}],11:[function(t,e){"use strict";function n(t,e){var n,s=r.find(t);return s?s:(n=o(t)?a(t,e):i(t,e),n.associated=t,r.assign(t,n),n)}var r=t("./index"),a=t("./input"),i=t("./inline"),o=t("./isInput");e.exports=n},{"./index":15,"./inline":16,"./input":17,"./isInput":18}],12:[function(t,e){"use strict";function n(t,e){var n,o,s=t||{};if(s.autoHideOnClick===o&&(s.autoHideOnClick=!0),s.autoHideOnBlur===o&&(s.autoHideOnBlur=!0),s.autoClose===o&&(s.autoClose=!0),s.appendTo===o&&(s.appendTo=document.body),"parent"===s.appendTo){if(!a(e.associated))throw new Error("Inline calendars must be appended to a parent node explicitly.");s.appendTo=e.associated.parentNode}if(s.invalidate===o&&(s.invalidate=!0),s.required===o&&(s.required=!1),s.date===o&&(s.date=!0),s.time===o&&(s.time=!0),s.date===!1&&s.time===!
1)throw new Error("At least one of `date` or `time` must be `true`.");if(s.inputFormat===o&&(s.inputFormat=s.date&&s.time?"YYYY-MM-DD HH:mm":s.date?"YYYY-MM-DD":"HH:mm"),s.initialValue=s.initialValue===o?null:r(s.initialValue,s.inputFormat),s.min=s.min===o?null:r(s.min,s.inputFormat),s.max=s.max===o?null:r(s.max,s.inputFormat),s.timeInterval===o&&(s.timeInterval=1800),s.min&&s.max)if(s.max.isBefore(s.min)&&(n=s.max,s.max=s.min,s.min=n),s.date===!0){if(s.max.clone().subtract(1,"days").isBefore(s.min))throw new Error("`max` must be at least one day after `min`")}else if(1e3*s.timeInterval-s.min%(1e3*s.timeInterval)>s.max-s.min)throw new Error("`min` to `max` range must allow for at least one time option that matches `timeInterval`");if(s.dateValidator===o&&(s.dateValidator=Function.prototype),s.timeValidator===o&&(s.timeValidator=Function.prototype),s.timeFormat===o&&(s.timeFormat="HH:mm"),s.weekStart===o&&(s.weekStart=i.moment().weekday(0).day()),s.weekdayFormat===o&&(s.weekdayFormat
="min"),"long"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdays();else if("short"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysShort();else if("min"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysMin();else if(!Array.isArray(s.weekdayFormat)||s.weekdayFormat.length<7)throw new Error("`weekdays` must be `min`, `short`, or `long`");s.monthsInCalendar===o&&(s.monthsInCalendar=1),s.monthFormat===o&&(s.monthFormat="MMMM YYYY"),s.dayFormat===o&&(s.dayFormat="DD"),s.styles===o&&(s.styles={}),s.styles._isStylesConfiguration=!0;var u=s.styles;return u.back===o&&(u.back="rd-back"),u.container===o&&(u.container="rd-container"),u.positioned===o&&(u.positioned="rd-container-attachment"),u.date===o&&(u.date="rd-date"),u.dayBody===o&&(u.dayBody="rd-days-body"),u.dayBodyElem===o&&(u.dayBodyElem="rd-day-body"),u.dayPrevMonth===o&&(u.dayPrevMonth="rd-day-prev-month"),u.dayNextMonth===o&&(u.dayNextMonth="rd-day-next-month"),u.dayDisabled===o&&(u.dayDisabled="rd-day-disabled"),u.dayConceal
ed===o&&(u.dayConcealed="rd-day-concealed"),u.dayHead===o&&(u.dayHead="rd-days-head"),u.dayHeadElem===o&&(u.dayHeadElem="rd-day-head"),u.dayRow===o&&(u.dayRow="rd-days-row"),u.dayTable===o&&(u.dayTable="rd-days"),u.month===o&&(u.month="rd-month"),u.monthLabel===o&&(u.monthLabel="rd-month-label"),u.next===o&&(u.next="rd-next"),u.selectedDay===o&&(u.selectedDay="rd-day-selected"),u.selectedTime===o&&(u.selectedTime="rd-time-selected"),u.time===o&&(u.time="rd-time"),u.timeList===o&&(u.timeList="rd-time-list"),u.timeOption===o&&(u.timeOption="rd-time-option"),s}var r=t("./parse"),a=t("./isInput"),i=t("./momentum");e.exports=n},{"./isInput":18,"./momentum":19,"./parse":21}],13:[function(t,e){"use strict";function n(t){var e=t||{};e.type||(e.type="div");var n=document.createElement(e.type);return e.className&&(n.className=e.className),e.text&&(n.innerText=n.textContent=e.text),e.attributes&&Object.keys(e.attributes).forEach(function(t){n.setAttribute(t,e.attributes[t])}),e.parent&&e.paren
t.appendChild(n),n}e.exports=n},{}],14:[function(t,e){"use strict";function n(t,e,n,r){return t.addEventListener(e,n,r)}function r(t,e,n,r){return t.attachEvent("on"+e,function(e){var r=e||window.event;r.target=r.target||r.srcElement,r.preventDefault=r.preventDefault||function(){r.returnValue=!1},r.stopPropagation=r.stopPropagation||function(){r.cancelBubble=!0},n.call(t,r)},r)}function a(t,e,n){return t.removeEventListener(e,n)}function i(t,e,n){return t.detachEvent("on"+e,n)}var o=n,s=a;window.addEventListener||(o=r),window.removeEventListener||(s=i),e.exports={add:o,remove:s}},{}],15:[function(t,e){"use strict";function n(t){if("number"!=typeof t&&t&&t.getAttribute)return n(t.getAttribute(i));var e=o[t];return e!==a?e:null}function r(t,e){t.setAttribute(i,e.id=o.push(e)-1)}var a,i="data-rome-id",o=[];e.exports={find:n,assign:r}},{}],16:[function(t,e){"use strict";function n(t,e){var n=e||{};return n.appendTo=t,r(n)}var r=(t("raf"),t("./calendar"));e.exports=n},{"./calendar":8,raf
:5}],17:[function(t,e){"use strict";function n(t,e){function n(n){b=i(n||e,k),u.add(k.container,b.styles.positioned),c.add(k.container,"mousedown",h),c.add(k.container,"click",f),k.getDate=w(k.getDate),k.getDateString=w(k.getDateString),k.getMoment=w(k.getMoment),b.initialValue&&(t.value=b.initialValue.format(b.inputFormat)),k.on("data",v),k.on("show",T),d(),Y(),k.hide()}function l(){d(!0)}function d(e){var r=e?"remove":"add";c[r](t,"click",y),c[r](t,"touchend",y),c[r](t,"focusin",y),c[r](t,"change",Y),c[r](t,"keypress",Y),c[r](t,"keydown",Y),c[r](t,"input",Y),b.invalidate&&c[r](t,"blur",m),c[r](window,"resize",T),e?(k.once("ready",n),k.off("destroyed",l)):(k.off("ready",n),k.once("destroyed",l))}function f(){D=!0,t.focus(),D=!1}function h(){function t(){M=!1}M=!0,a(t)}function m(){M||g()||k.emitValues()}function y(){D||k.show()}function p(){var e=t.getBoundingClientRect(),n=document.body.scrollTop||document.documentElement.scrollTop;k.container.style.top=e.top+n+t.offsetHeight+"px"
,k.container.style.left=e.left+"px"}function _(){var e=t.value.trim();if(!g()){var n=s.moment(e,b.inputFormat,b.strictParse);k.setValue(n)}}function v(e){t.value=e}function g(){return b.required===!1&&""===t.value.trim()}function w(t){return function(){return g()?null:t.apply(this,arguments)}}var b,M,D,k=o(e),Y=r(_,30),T=r(p,30);return n(e),k}var r=t("./throttle"),a=t("raf"),i=(t("./clone"),t("./defaults")),o=t("./calendar"),s=t("./momentum"),u=t("./classes"),c=t("./events");e.exports=n},{"./calendar":8,"./classes":9,"./clone":10,"./defaults":12,"./events":14,"./momentum":19,"./throttle":34,raf:5}],18:[function(t,e){"use strict";function n(t){return t&&t.nodeName&&"input"===t.nodeName.toLowerCase()}e.exports=n},{}],19:[function(t,e){"use strict";function n(t){return t&&Object.prototype.hasOwnProperty.call(t,"_isAMomentObject")}var r={moment:null,isMoment:n};e.exports=r},{}],20:[function(t,e){"use strict";function n(){}e.exports=n},{}],21:[function(t,e){"use strict";function n(t,e){r
eturn"string"==typeof t?a.moment(t,e):"[object Date]"===Object.prototype.toString.call(t)?a.moment(t):a.isMoment(t)?t.clone():void 0}function r(t,e){var r=n(t,"string"==typeof e?e:null);return r&&r.isValid()?r:null}var a=t("./momentum");e.exports=r},{"./momentum":19}],22:[function(){"use strict";Array.prototype.filter||(Array.prototype.filter=function(t,e){var n=[];return this.forEach(function(r,a,i){t.call(e,r,a,i)&&n.push(r)},e),n})},{}],23:[function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=this,r=n.length,a=0;r>a;a++)a in n&&t.call(e,n[a],a,n)})},{}],24:[function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError;var n=this.length;for(e=+e||0,1/0===Math.abs(e)?e=0:0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1})},{}],25:[function(){"use strict";Array.isArray||(Array.is
Array=function(t){return""+t!==t&&"[object Array]"===Object.prototype.toString.call(t)})},{}],26:[function(){"use strict";Array.prototype.map||(Array.prototype.map=function(t,e){var n,r,a;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),o=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=new Array(o),a=0;o>a;)a in i&&(r[a]=t.call(n,i[a],a,i)),a++;return r})},{}],27:[function(){"use strict";Array.prototype.some||(Array.prototype.some=function(t,e){var n,r;if(null==this)throw new TypeError("this is null or not defined");var a=Object(this),i=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;i>r;){if(r in a){var o=t.call(n,a[r],r,a);if(o)return!0}r++}return!1})},{}],28:[function(){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind -
what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},a=function(){var a=this instanceof r&&t?this:t,i=e.concat(Array.prototype.slice.call(arguments));return n.apply(a,i)};return r.prototype=this.prototype,a.prototype=new r,a})},{}],29:[function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;Object.keys||(Object.keys=function(a){if("object"!=typeof a&&("function"!=typeof a||null===a))throw new TypeError("Object.keys called on non-object");var i,o,s=[];for(i in a)t.call(a,i)&&s.push(i);if(e)for(o=0;r>o;o++)t.call(a,n[o])&&s.push(n[o]);return s})},{}],30:[function(){"use strict";String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},{}],31:[function(t,e){"use strict";t("./polyfills/function.bind"),t("./poly
fills/array.foreach"),t("./polyfills/array.map"),t("./polyfills/array.filter"),t("./polyfills/array.isarray"),t("./polyfills/array.indexof"),t("./polyfills/array.some"),t("./polyfills/string.trim"),t("./polyfills/object.keys");var n=t("./core"),r=t("./index"),a=t("./use");n.use=a.bind(n),n.find=r.find,n.val=t("./validators"),e.exports=n},{"./core":11,"./index":15,"./polyfills/array.filter":22,"./polyfills/array.foreach":23,"./polyfills/array.indexof":24,"./polyfills/array.isarray":25,"./polyfills/array.map":26,"./polyfills/array.some":27,"./polyfills/function.bind":28,"./polyfills/object.keys":29,"./polyfills/string.trim":30,"./use":35,"./validators":36}],32:[function(t,e){"use strict";var n=t("moment"),r=t("./rome");r.use(n),e.exports=r},{"./rome":31,moment:4}],33:[function(t,e){"use strict";function n(t,e){return 2===arguments.length&&(t.innerText=t.textContent=e),t.innerText||t.textContent}e.exports=n},{}],34:[function(t,e){"use strict";e.exports=function(t,e){var n,r=-1/0;return
function(){function a(){clearTimeout(n),n=null;var i=r+e,o=Date.now();o>i?(r=o,t.apply(this,arguments)):n=setTimeout(a,i-o)}n||a()}}},{}],35:[function(t,e){"use strict";function n(t){this.moment=r.moment=t}var r=t("./momentum");e.exports=n},{"./momentum":19}],36:[function(t,e){"use strict";function n(t){return function(e){var n=i(e);return function(r){var s=a.find(e),u=i(r),c=n||s&&s.getMoment();return c?(s&&o.add(this,s),t(u,c)):!0}}}function r(t,e){return function(n,r){function s(t){var e,n,r=a.find(t);return r?e=n=r.getMoment():Array.isArray(t)?(e=t[0],n=t[1]):e=n=t,r&&o.add(r,this),{start:i(e).startOf("day").toDate(),end:i(n).endOf("day").toDate()}}var u,c=arguments.length;return Array.isArray(n)?u=n:1===c?u=[n]:2===c&&(u=[[n,r]]),function(n){return u.map(s.bind(this))[t](e.bind(this,n))}}}var a=t("./index"),i=t("./parse"),o=t("./association"),s=n(function(t,e){return t>=e}),u=n(function(t,e){return t>e}),c=n(function(t,e){return e>=t}),l=n(function(t,e){return e>t}),d=r("every
",function(t,e){return e.start>t||e.end<t}),f=r("some",function(t,e){return e.start<=t&&e.end>=t});e.exports={afterEq:s,after:u,beforeEq:c,before:l,except:d,only:f}},{"./association":7,"./index":15,"./parse":21}]},{},[32])(32)});
\ No newline at end of file
[25/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/moment-2.9.0.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/moment-2.9.0.min.js b/htrace-core/src/web/lib/js/moment-2.9.0.min.js
deleted file mode 100644
index c7f6dcd..0000000
--- a/htrace-core/src/web/lib/js/moment-2.9.0.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-//! moment.js
-//! version : 2.9.0
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
-(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Bb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){vb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sc[a]||(e(b),sc[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k
(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),uc===!1&&(uc=!0,vb.updateOffset(this),uc=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=vb.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tz
m=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Kb.length>0)for(c in Kb)d=Kb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function s(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function t(a,b){var c;return b=M(b,a),a.isBefore(b)?c=s(a,b):(c=s(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function u(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=vb.duration(c,d),v(th
is,e,a),this}}function v(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&pb(a,"Date",ob(a,"Date")+f*c),g&&nb(a,ob(a,"Month")+g*c),d&&vb.updateOffset(a,f||g)}function w(a){return"[object Array]"===Object.prototype.toString.call(a)}function x(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function y(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lc[a]||mc[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}vb[b]=function(e,f){var g,h,i=vb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=vb().utc().set(d,a);return i.call(vb._locale,b,e||"")},null!=f)return h(f);for(g=0
;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return jb(vb([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Db]<0||a._a[Db]>11?Db:a._a[Eb]<1||a._a[Eb]>D(a._a[Cb],a._a[Db])?Eb:a._a[Fb]<0||a._a[Fb]>24||24===a._a[Fb]&&(0!==a._a[Gb]||0!==a._a[Hb]||0!==a._a[Ib])?Fb:a._a[Gb]<0||a._a[Gb]>59?Gb:a._a[Hb]<0||a._a[Hb]>59?Hb:a._a[Ib]<0||a._a[Ib]>999?Ib:-1,a._pf._overflowDayOfYear&&(Cb>b||b>Eb)&&(b=Eb),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isVal
id}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f<a.length;){for(e=J(a[f]).split("-"),b=e.length,c=J(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Jb[a]&&Lb)try{b=vb.locale(),require("./locale/"+a),vb.locale(b)}catch(c){}return Jb[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(vb.isMoment(a)||x(a)?+a:+vb(a))-+c,c._d.setTime(+c._d+d),vb.updateOffset(c,!1),c):vb(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pb);for(b=0,c=d.length;c>b;b++)d[b]=rc[d[b]]?rc[d[b]]:N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nc[b]||(nc[b]=O(b)),nc[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDate
Format(a)||a}var d=5;for(Qb.lastIndex=0;d>=0&&Qb.test(a);)a=a.replace(Qb,c),Qb.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _b;case"DDDD":return bc;case"YYYY":case"GGGG":case"gggg":return d?cc:Tb;case"Y":case"G":case"g":return ec;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?dc:Ub;case"S":if(d)return _b;case"SS":if(d)return ac;case"SSS":if(d)return bc;case"DDD":return Sb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wb;case"a":case"A":return b._locale._meridiemParse;case"x":return Zb;case"X":return $b;case"Z":case"ZZ":return Xb;case"T":return Yb;case"SSSS":return Vb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ac:Rb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Rb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=
a||"";var b=a.match(Xb)||[],c=b[b.length-1]||[],d=(c+"").match(jc)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Db]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Db]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Db]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Eb]=C(b));break;case"Do":null!=b&&(e[Eb]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Cb]=vb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Cb]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fb]=C(b);break;case"m":case"mm":e[Gb]=C(b);break;case"s":case"ss":e[Hb]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ib]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd
":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=vb.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Cb],jb(vb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Cb],jb(vb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=kb(d,e,f,h,g),a._a[Cb]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Eb]&&null==a._a[Db]&&U(a),a._dayOfYear&&(f=b(a._a[Cb],e[Cb]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fb(f,0,a._dayOfYear),a._a[Db]=d.getUTCMonth(),a._a[Eb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]
=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fb]&&0===a._a[Gb]&&0===a._a[Hb]&&0===a._a[Ib]&&(a._nextDay=!0,a._a[Fb]=0),a._d=(a._useUTC?fb:eb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fb]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===vb.ISO_8601)return void ab(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(R(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._
pf.bigHour===!0&&b._a[Fb]<=12&&(b._pf.bigHour=a),b._a[Fb]=k(b._locale,b._a[Fb],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],Y(b),I(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));o(a,c||b)}function ab(a){var b,c,d=a._i,e=fc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hc.length;c>b;b++)if(hc[b][1].exec(d)){a._f=hc[b][0]+(e[6]||" ");break}for(b=0,c=ic.length;c>b;b++)if(ic[b][1].exec(d)){a._f+=ic[b][0];break}d.match(Xb)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function bb(a){ab(a),a._isValid===!1&&(delete a._isValid,vb.createFromInputFallback(a))}function cb(a,b){var c,d=[];for(c=0;c<a.length;++c
)d.push(b(a[c],c));return d}function db(b){var c,d=b._i;d===a?b._d=new Date:x(d)?b._d=new Date(+d):null!==(c=Mb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?bb(b):w(d)?(b._a=cb(d.slice(0),function(a){return parseInt(a,10)}),V(b)):"object"==typeof d?W(b):"number"==typeof d?b._d=new Date(d):vb.createFromInputFallback(b)}function eb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function gb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function hb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ib(a,b,c){var d=vb.duration(a).abs(),e=Ab(d.as("s")),f=Ab(d.as("m")),g=Ab(d.as("h")),h=Ab(d.as("d")),i=Ab(d.as("M")),j=Ab(d.as("y")),k=e<oc.s&&["s",e]||1===f&&["m"]||f<oc.m&&["mm",f]||1===g&&["h"]||g<oc.h&&["hh",g]||1===h&&["d"]||h<oc.d&&["dd",h]||1===i&&["M"]||i<oc.M&&["MM",i
]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,hb.apply({},k)}function jb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=vb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function kb(a,b,c,d,e){var f,g,h=fb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function lb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||vb.localeData(b._l),null===d||e===a&&""===d?vb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),vb.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):db(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function mb(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return vb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function nb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),D(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"
Month"](b,c),a)}function ob(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function pb(a,b,c){return"Month"===b?nb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function qb(a,b){return function(c){return null!=c?(pb(this,a,c),vb.updateOffset(this,b),this):ob(this,a)}}function rb(a){return 400*a/146097}function sb(a){return 146097*a/400}function tb(a){vb.duration.fn[a]=function(){return this._data[a]}}function ub(a){"undefined"==typeof ender&&(wb=zb.moment,zb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",vb):vb)}for(var vb,wb,xb,yb="2.9.0",zb="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,Ab=Math.round,Bb=Object.prototype.hasOwnProperty,Cb=0,Db=1,Eb=2,Fb=3,Gb=4,Hb=5,Ib=6,Jb={},Kb=[],Lb="undefined"!=typeof module&&module&&module.exports,Mb=/^\/?Date\((\-?\d+)/i,Nb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ob=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)
?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Pb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|D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hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),lc={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"},mc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},nc={},oc={s:45,m:45,h:22,d:26,M:11},pc="DDD w W M D d".split(" "),qc="M D H h m s w W".split(" "),rc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)
},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(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:f
unction(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%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()}},sc={},tc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],uc=!1;pc.length;)xb=pc.pop(),rc[xb+"o"]=i(rc[xb],xb);for(;qc.length;)xb=qc.pop(),rc[xb+xb]=h(rc[xb],2);rc.DDDD=h(rc.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalPa
rse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=vb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}
},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=vb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_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(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,fun
ction(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"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(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_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(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,pr
eparse:function(a){return a},postformat:function(a){return a},week:function(a){return jb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),vb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),lb(g)},vb.suppressDeprecationWarnings=!1,vb.createFromInputFallback=f("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(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),vb.min=function(){var a=[].slice.call(arguments,0);return mb("isBefore",a)},vb.max=function(){var a=[].slice.call(arguments,0);return mb("isAfter",a)},vb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=
e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),lb(g).utc()},vb.unix=function(a){return vb(1e3*a)},vb.duration=function(a,b){var d,e,f,g,h=a,i=null;return vb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Nb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Eb])*d,h:C(i[Fb])*d,m:C(i[Gb])*d,s:C(i[Hb])*d,ms:C(i[Ib])*d}):(i=Ob.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(vb(h.from),vb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),vb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},vb.version=yb,vb.defaultFormat=gc,vb.ISO_8601=function(){},vb.momentProperties=Kb,vb.updateOffset=function(){},vb.relativeTimeThreshold=function(b,c){return oc[b]===a?!1:c===a?oc[b]:(oc[
b]=c,!0)},vb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return vb.locale(a,b)}),vb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?vb.defineLocale(a,b):vb.localeData(a),c&&(vb.duration._locale=vb._locale=c)),vb._locale._abbr},vb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Jb[a]||(Jb[a]=new l),Jb[a].set(b),vb.locale(a),Jb[a]):(delete Jb[a],null)},vb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return vb.localeData(a)}),vb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return vb._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},vb.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},vb.isDuration=function(a){return a instanceof n};for(xb=tc.length-1;xb>=0;--xb)B(tc[xb]);vb.normalizeUnits=function(a){return z(a)},vb.invalid=function(a){var b=vb.utc(0/0);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},vb.parseZone=
function(){return vb.apply(null,arguments).parseZone()},vb.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},vb.isDate=x,o(vb.fn=m.prototype,{clone:function(){return vb(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 a=vb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():P(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):P(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return I(this)},isDSTShifted:function(){return this._a?this.isValid()&&y(this._a,(this._isUTC?vb.utc(this._a):vb(this._a)).toArray())>0:!1},parsingFlags:function(){return o({},this._
pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||vb.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return vb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(vb(),a)},calendar:function(a){var b=a||vb(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";re
turn this.format(this.localeData().calendar(e,this,vb(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=gb(a,this.localeData()),this.add(a-b,"d")):b},month:qb("Month",!0),startOf:function(a){switch(a=z(a)){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"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a
:vb(a),+this>+a):(c=vb.isMoment(a)?+a:+vb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+a>+this):(c=vb.isMoment(a)?+a:+vb(a),+this.clone().endOf(b)<c)},isBetween:function(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)},isSame:function(a,b){var c;return b=z(b||"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+this===+a):(c=+vb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("stri
ng"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,vb.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,vb.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?vb(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(
){return D(this.year(),this.month())},dayOfYear:function(a){var b=Ab((vb(this).startOf("day")-vb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=jb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=jb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=jb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:func
tion(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=vb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),vb.fn.millisecond=vb.fn.milliseconds=qb("Milliseconds",!1),vb.fn.second=vb.fn.seconds=qb("Seconds",!1),vb.fn.minute=vb.fn.minutes=qb("Minutes",!1),vb.fn.hour=vb.fn.hours=qb("Hours",!0),vb.fn.date=qb("Date",!0),vb.fn.dates=f("dates accessor is deprecated. Use date instead.",qb("Date",!0)),vb.fn.year=qb("FullYear",!0),vb.fn.years=f("years accessor is deprecated. Use year inste
ad.",qb("FullYear",!0)),vb.fn.days=vb.fn.day,vb.fn.months=vb.fn.month,vb.fn.weeks=vb.fn.week,vb.fn.isoWeeks=vb.fn.isoWeek,vb.fn.quarters=vb.fn.quarter,vb.fn.toJSON=vb.fn.toISOString,vb.fn.isUTC=vb.fn.isUtc,o(vb.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(rb(e)),e-=q(sb(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},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 q(this.days()/7)
},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)
-},humanize:function(a){var b=ib(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=vb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=vb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*rb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*
1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:vb.fn.lang,locale:vb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),vb.duration.fn.toString=vb.duration.fn.toISOString;for(xb in kc)c(kc,xb)&&tb(xb.toLowerCase());vb.duration.fn.asMilliseconds=function(){return this.as("ms")},vb.duration.fn.asSeconds=function(){return this.as("s")},vb.duration.fn.asMinutes=function(){return this.as("m")},vb.duration.fn.asHours=funct
ion(){return this.as("h")},vb.duration.fn.asDays=function(){return this.as("d")},vb.duration.fn.asWeeks=function(){return this.as("weeks")},vb.duration.fn.asMonths=function(){return this.as("M")},vb.duration.fn.asYears=function(){return this.as("y")},vb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Lb?module.exports=vb:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(zb.moment=wb),vb}),ub(!0)):ub()}).call(this);
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/underscore-1.7.0.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/underscore-1.7.0.js b/htrace-core/src/web/lib/js/underscore-1.7.0.js
deleted file mode 100644
index d5b3375..0000000
--- a/htrace-core/src/web/lib/js/underscore-1.7.0.js
+++ /dev/null
@@ -1,1416 +0,0 @@
-// Underscore.js 1.7.0
-// http://underscorejs.org
-// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
-// Underscore may be freely distributed under the MIT license.
-
-(function() {
-
- // Baseline setup
- // --------------
-
- // Establish the root object, `window` in the browser, or `exports` on the server.
- var root = this;
-
- // Save the previous value of the `_` variable.
- var previousUnderscore = root._;
-
- // Save bytes in the minified (but not gzipped) version:
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
-
- // Create quick reference variables for speed access to core prototypes.
- var
- push = ArrayProto.push,
- slice = ArrayProto.slice,
- concat = ArrayProto.concat,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
-
- // All **ECMAScript 5** native function implementations that we hope to use
- // are declared here.
- var
- nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeBind = FuncProto.bind;
-
- // Create a safe reference to the Underscore object for use below.
- var _ = function(obj) {
- if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
- this._wrapped = obj;
- };
-
- // Export the Underscore object for **Node.js**, with
- // backwards-compatibility for the old `require()` API. If we're in
- // the browser, add `_` as a global object.
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root._ = _;
- }
-
- // Current version.
- _.VERSION = '1.7.0';
-
- // Internal function that returns an efficient (for current engines) version
- // of the passed-in callback, to be repeatedly applied in other Underscore
- // functions.
- var createCallback = function(func, context, argCount) {
- if (context === void 0) return func;
- switch (argCount == null ? 3 : argCount) {
- case 1: return function(value) {
- return func.call(context, value);
- };
- case 2: return function(value, other) {
- return func.call(context, value, other);
- };
- case 3: return function(value, index, collection) {
- return func.call(context, value, index, collection);
- };
- case 4: return function(accumulator, value, index, collection) {
- return func.call(context, accumulator, value, index, collection);
- };
- }
- return function() {
- return func.apply(context, arguments);
- };
- };
-
- // A mostly-internal function to generate callbacks that can be applied
- // to each element in a collection, returning the desired result — either
- // identity, an arbitrary callback, a property matcher, or a property accessor.
- _.iteratee = function(value, context, argCount) {
- if (value == null) return _.identity;
- if (_.isFunction(value)) return createCallback(value, context, argCount);
- if (_.isObject(value)) return _.matches(value);
- return _.property(value);
- };
-
- // Collection Functions
- // --------------------
-
- // The cornerstone, an `each` implementation, aka `forEach`.
- // Handles raw objects in addition to array-likes. Treats all
- // sparse array-likes as if they were dense.
- _.each = _.forEach = function(obj, iteratee, context) {
- if (obj == null) return obj;
- iteratee = createCallback(iteratee, context);
- var i, length = obj.length;
- if (length === +length) {
- for (i = 0; i < length; i++) {
- iteratee(obj[i], i, obj);
- }
- } else {
- var keys = _.keys(obj);
- for (i = 0, length = keys.length; i < length; i++) {
- iteratee(obj[keys[i]], keys[i], obj);
- }
- }
- return obj;
- };
-
- // Return the results of applying the iteratee to each element.
- _.map = _.collect = function(obj, iteratee, context) {
- if (obj == null) return [];
- iteratee = _.iteratee(iteratee, context);
- var keys = obj.length !== +obj.length && _.keys(obj),
- length = (keys || obj).length,
- results = Array(length),
- currentKey;
- for (var index = 0; index < length; index++) {
- currentKey = keys ? keys[index] : index;
- results[index] = iteratee(obj[currentKey], currentKey, obj);
- }
- return results;
- };
-
- var reduceError = 'Reduce of empty array with no initial value';
-
- // **Reduce** builds up a single result from a list of values, aka `inject`,
- // or `foldl`.
- _.reduce = _.foldl = _.inject = function(obj, iteratee, memo, context) {
- if (obj == null) obj = [];
- iteratee = createCallback(iteratee, context, 4);
- var keys = obj.length !== +obj.length && _.keys(obj),
- length = (keys || obj).length,
- index = 0, currentKey;
- if (arguments.length < 3) {
- if (!length) throw new TypeError(reduceError);
- memo = obj[keys ? keys[index++] : index++];
- }
- for (; index < length; index++) {
- currentKey = keys ? keys[index] : index;
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
- }
- return memo;
- };
-
- // The right-associative version of reduce, also known as `foldr`.
- _.reduceRight = _.foldr = function(obj, iteratee, memo, context) {
- if (obj == null) obj = [];
- iteratee = createCallback(iteratee, context, 4);
- var keys = obj.length !== + obj.length && _.keys(obj),
- index = (keys || obj).length,
- currentKey;
- if (arguments.length < 3) {
- if (!index) throw new TypeError(reduceError);
- memo = obj[keys ? keys[--index] : --index];
- }
- while (index--) {
- currentKey = keys ? keys[index] : index;
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
- }
- return memo;
- };
-
- // Return the first value which passes a truth test. Aliased as `detect`.
- _.find = _.detect = function(obj, predicate, context) {
- var result;
- predicate = _.iteratee(predicate, context);
- _.some(obj, function(value, index, list) {
- if (predicate(value, index, list)) {
- result = value;
- return true;
- }
- });
- return result;
- };
-
- // Return all the elements that pass a truth test.
- // Aliased as `select`.
- _.filter = _.select = function(obj, predicate, context) {
- var results = [];
- if (obj == null) return results;
- predicate = _.iteratee(predicate, context);
- _.each(obj, function(value, index, list) {
- if (predicate(value, index, list)) results.push(value);
- });
- return results;
- };
-
- // Return all the elements for which a truth test fails.
- _.reject = function(obj, predicate, context) {
- return _.filter(obj, _.negate(_.iteratee(predicate)), context);
- };
-
- // Determine whether all of the elements match a truth test.
- // Aliased as `all`.
- _.every = _.all = function(obj, predicate, context) {
- if (obj == null) return true;
- predicate = _.iteratee(predicate, context);
- var keys = obj.length !== +obj.length && _.keys(obj),
- length = (keys || obj).length,
- index, currentKey;
- for (index = 0; index < length; index++) {
- currentKey = keys ? keys[index] : index;
- if (!predicate(obj[currentKey], currentKey, obj)) return false;
- }
- return true;
- };
-
- // Determine if at least one element in the object matches a truth test.
- // Aliased as `any`.
- _.some = _.any = function(obj, predicate, context) {
- if (obj == null) return false;
- predicate = _.iteratee(predicate, context);
- var keys = obj.length !== +obj.length && _.keys(obj),
- length = (keys || obj).length,
- index, currentKey;
- for (index = 0; index < length; index++) {
- currentKey = keys ? keys[index] : index;
- if (predicate(obj[currentKey], currentKey, obj)) return true;
- }
- return false;
- };
-
- // Determine if the array or object contains a given value (using `===`).
- // Aliased as `include`.
- _.contains = _.include = function(obj, target) {
- if (obj == null) return false;
- if (obj.length !== +obj.length) obj = _.values(obj);
- return _.indexOf(obj, target) >= 0;
- };
-
- // Invoke a method (with arguments) on every item in a collection.
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- var isFunc = _.isFunction(method);
- return _.map(obj, function(value) {
- return (isFunc ? method : value[method]).apply(value, args);
- });
- };
-
- // Convenience version of a common use case of `map`: fetching a property.
- _.pluck = function(obj, key) {
- return _.map(obj, _.property(key));
- };
-
- // Convenience version of a common use case of `filter`: selecting only objects
- // containing specific `key:value` pairs.
- _.where = function(obj, attrs) {
- return _.filter(obj, _.matches(attrs));
- };
-
- // Convenience version of a common use case of `find`: getting the first object
- // containing specific `key:value` pairs.
- _.findWhere = function(obj, attrs) {
- return _.find(obj, _.matches(attrs));
- };
-
- // Return the maximum element (or element-based computation).
- _.max = function(obj, iteratee, context) {
- var result = -Infinity, lastComputed = -Infinity,
- value, computed;
- if (iteratee == null && obj != null) {
- obj = obj.length === +obj.length ? obj : _.values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
- value = obj[i];
- if (value > result) {
- result = value;
- }
- }
- } else {
- iteratee = _.iteratee(iteratee, context);
- _.each(obj, function(value, index, list) {
- computed = iteratee(value, index, list);
- if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
- result = value;
- lastComputed = computed;
- }
- });
- }
- return result;
- };
-
- // Return the minimum element (or element-based computation).
- _.min = function(obj, iteratee, context) {
- var result = Infinity, lastComputed = Infinity,
- value, computed;
- if (iteratee == null && obj != null) {
- obj = obj.length === +obj.length ? obj : _.values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
- value = obj[i];
- if (value < result) {
- result = value;
- }
- }
- } else {
- iteratee = _.iteratee(iteratee, context);
- _.each(obj, function(value, index, list) {
- computed = iteratee(value, index, list);
- if (computed < lastComputed || computed === Infinity && result === Infinity) {
- result = value;
- lastComputed = computed;
- }
- });
- }
- return result;
- };
-
- // Shuffle a collection, using the modern version of the
- // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
- _.shuffle = function(obj) {
- var set = obj && obj.length === +obj.length ? obj : _.values(obj);
- var length = set.length;
- var shuffled = Array(length);
- for (var index = 0, rand; index < length; index++) {
- rand = _.random(0, index);
- if (rand !== index) shuffled[index] = shuffled[rand];
- shuffled[rand] = set[index];
- }
- return shuffled;
- };
-
- // Sample **n** random values from a collection.
- // If **n** is not specified, returns a single random element.
- // The internal `guard` argument allows it to work with `map`.
- _.sample = function(obj, n, guard) {
- if (n == null || guard) {
- if (obj.length !== +obj.length) obj = _.values(obj);
- return obj[_.random(obj.length - 1)];
- }
- return _.shuffle(obj).slice(0, Math.max(0, n));
- };
-
- // Sort the object's values by a criterion produced by an iteratee.
- _.sortBy = function(obj, iteratee, context) {
- iteratee = _.iteratee(iteratee, context);
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value: value,
- index: index,
- criteria: iteratee(value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
- if (a !== b) {
- if (a > b || a === void 0) return 1;
- if (a < b || b === void 0) return -1;
- }
- return left.index - right.index;
- }), 'value');
- };
-
- // An internal function used for aggregate "group by" operations.
- var group = function(behavior) {
- return function(obj, iteratee, context) {
- var result = {};
- iteratee = _.iteratee(iteratee, context);
- _.each(obj, function(value, index) {
- var key = iteratee(value, index, obj);
- behavior(result, value, key);
- });
- return result;
- };
- };
-
- // Groups the object's values by a criterion. Pass either a string attribute
- // to group by, or a function that returns the criterion.
- _.groupBy = group(function(result, value, key) {
- if (_.has(result, key)) result[key].push(value); else result[key] = [value];
- });
-
- // Indexes the object's values by a criterion, similar to `groupBy`, but for
- // when you know that your index values will be unique.
- _.indexBy = group(function(result, value, key) {
- result[key] = value;
- });
-
- // Counts instances of an object that group by a certain criterion. Pass
- // either a string attribute to count by, or a function that returns the
- // criterion.
- _.countBy = group(function(result, value, key) {
- if (_.has(result, key)) result[key]++; else result[key] = 1;
- });
-
- // Use a comparator function to figure out the smallest index at which
- // an object should be inserted so as to maintain order. Uses binary search.
- _.sortedIndex = function(array, obj, iteratee, context) {
- iteratee = _.iteratee(iteratee, context, 1);
- var value = iteratee(obj);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = low + high >>> 1;
- if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
- }
- return low;
- };
-
- // Safely create a real, live array from anything iterable.
- _.toArray = function(obj) {
- if (!obj) return [];
- if (_.isArray(obj)) return slice.call(obj);
- if (obj.length === +obj.length) return _.map(obj, _.identity);
- return _.values(obj);
- };
-
- // Return the number of elements in an object.
- _.size = function(obj) {
- if (obj == null) return 0;
- return obj.length === +obj.length ? obj.length : _.keys(obj).length;
- };
-
- // Split a collection into two arrays: one whose elements all satisfy the given
- // predicate, and one whose elements all do not satisfy the predicate.
- _.partition = function(obj, predicate, context) {
- predicate = _.iteratee(predicate, context);
- var pass = [], fail = [];
- _.each(obj, function(value, key, obj) {
- (predicate(value, key, obj) ? pass : fail).push(value);
- });
- return [pass, fail];
- };
-
- // Array Functions
- // ---------------
-
- // Get the first element of an array. Passing **n** will return the first N
- // values in the array. Aliased as `head` and `take`. The **guard** check
- // allows it to work with `_.map`.
- _.first = _.head = _.take = function(array, n, guard) {
- if (array == null) return void 0;
- if (n == null || guard) return array[0];
- if (n < 0) return [];
- return slice.call(array, 0, n);
- };
-
- // Returns everything but the last entry of the array. Especially useful on
- // the arguments object. Passing **n** will return all the values in
- // the array, excluding the last N. The **guard** check allows it to work with
- // `_.map`.
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
- };
-
- // Get the last element of an array. Passing **n** will return the last N
- // values in the array. The **guard** check allows it to work with `_.map`.
- _.last = function(array, n, guard) {
- if (array == null) return void 0;
- if (n == null || guard) return array[array.length - 1];
- return slice.call(array, Math.max(array.length - n, 0));
- };
-
- // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
- // Especially useful on the arguments object. Passing an **n** will return
- // the rest N values in the array. The **guard**
- // check allows it to work with `_.map`.
- _.rest = _.tail = _.drop = function(array, n, guard) {
- return slice.call(array, n == null || guard ? 1 : n);
- };
-
- // Trim out all falsy values from an array.
- _.compact = function(array) {
- return _.filter(array, _.identity);
- };
-
- // Internal implementation of a recursive `flatten` function.
- var flatten = function(input, shallow, strict, output) {
- if (shallow && _.every(input, _.isArray)) {
- return concat.apply(output, input);
- }
- for (var i = 0, length = input.length; i < length; i++) {
- var value = input[i];
- if (!_.isArray(value) && !_.isArguments(value)) {
- if (!strict) output.push(value);
- } else if (shallow) {
- push.apply(output, value);
- } else {
- flatten(value, shallow, strict, output);
- }
- }
- return output;
- };
-
- // Flatten out an array, either recursively (by default), or just one level.
- _.flatten = function(array, shallow) {
- return flatten(array, shallow, false, []);
- };
-
- // Return a version of the array that does not contain the specified value(s).
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
-
- // Produce a duplicate-free version of the array. If the array has already
- // been sorted, you have the option of using a faster algorithm.
- // Aliased as `unique`.
- _.uniq = _.unique = function(array, isSorted, iteratee, context) {
- if (array == null) return [];
- if (!_.isBoolean(isSorted)) {
- context = iteratee;
- iteratee = isSorted;
- isSorted = false;
- }
- if (iteratee != null) iteratee = _.iteratee(iteratee, context);
- var result = [];
- var seen = [];
- for (var i = 0, length = array.length; i < length; i++) {
- var value = array[i];
- if (isSorted) {
- if (!i || seen !== value) result.push(value);
- seen = value;
- } else if (iteratee) {
- var computed = iteratee(value, i, array);
- if (_.indexOf(seen, computed) < 0) {
- seen.push(computed);
- result.push(value);
- }
- } else if (_.indexOf(result, value) < 0) {
- result.push(value);
- }
- }
- return result;
- };
-
- // Produce an array that contains the union: each distinct element from all of
- // the passed-in arrays.
- _.union = function() {
- return _.uniq(flatten(arguments, true, true, []));
- };
-
- // Produce an array that contains every item shared between all the
- // passed-in arrays.
- _.intersection = function(array) {
- if (array == null) return [];
- var result = [];
- var argsLength = arguments.length;
- for (var i = 0, length = array.length; i < length; i++) {
- var item = array[i];
- if (_.contains(result, item)) continue;
- for (var j = 1; j < argsLength; j++) {
- if (!_.contains(arguments[j], item)) break;
- }
- if (j === argsLength) result.push(item);
- }
- return result;
- };
-
- // Take the difference between one array and a number of other arrays.
- // Only the elements present in just the first array will remain.
- _.difference = function(array) {
- var rest = flatten(slice.call(arguments, 1), true, true, []);
- return _.filter(array, function(value){
- return !_.contains(rest, value);
- });
- };
-
- // Zip together multiple lists into a single array -- elements that share
- // an index go together.
- _.zip = function(array) {
- if (array == null) return [];
- var length = _.max(arguments, 'length').length;
- var results = Array(length);
- for (var i = 0; i < length; i++) {
- results[i] = _.pluck(arguments, i);
- }
- return results;
- };
-
- // Converts lists into objects. Pass either a single array of `[key, value]`
- // pairs, or two parallel arrays of the same length -- one of keys, and one of
- // the corresponding values.
- _.object = function(list, values) {
- if (list == null) return {};
- var result = {};
- for (var i = 0, length = list.length; i < length; i++) {
- if (values) {
- result[list[i]] = values[i];
- } else {
- result[list[i][0]] = list[i][1];
- }
- }
- return result;
- };
-
- // Return the position of the first occurrence of an item in an array,
- // or -1 if the item is not included in the array.
- // If the array is large and already in sort order, pass `true`
- // for **isSorted** to use binary search.
- _.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i = 0, length = array.length;
- if (isSorted) {
- if (typeof isSorted == 'number') {
- i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
- } else {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
- }
- for (; i < length; i++) if (array[i] === item) return i;
- return -1;
- };
-
- _.lastIndexOf = function(array, item, from) {
- if (array == null) return -1;
- var idx = array.length;
- if (typeof from == 'number') {
- idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
- }
- while (--idx >= 0) if (array[idx] === item) return idx;
- return -1;
- };
-
- // Generate an integer Array containing an arithmetic progression. A port of
- // the native Python `range()` function. See
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
- _.range = function(start, stop, step) {
- if (arguments.length <= 1) {
- stop = start || 0;
- start = 0;
- }
- step = step || 1;
-
- var length = Math.max(Math.ceil((stop - start) / step), 0);
- var range = Array(length);
-
- for (var idx = 0; idx < length; idx++, start += step) {
- range[idx] = start;
- }
-
- return range;
- };
-
- // Function (ahem) Functions
- // ------------------
-
- // Reusable constructor function for prototype setting.
- var Ctor = function(){};
-
- // Create a function bound to a given object (assigning `this`, and arguments,
- // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
- // available.
- _.bind = function(func, context) {
- var args, bound;
- if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
- if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
- args = slice.call(arguments, 2);
- bound = function() {
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
- Ctor.prototype = func.prototype;
- var self = new Ctor;
- Ctor.prototype = null;
- var result = func.apply(self, args.concat(slice.call(arguments)));
- if (_.isObject(result)) return result;
- return self;
- };
- return bound;
- };
-
- // Partially apply a function by creating a version that has had some of its
- // arguments pre-filled, without changing its dynamic `this` context. _ acts
- // as a placeholder, allowing any combination of arguments to be pre-filled.
- _.partial = function(func) {
- var boundArgs = slice.call(arguments, 1);
- return function() {
- var position = 0;
- var args = boundArgs.slice();
- for (var i = 0, length = args.length; i < length; i++) {
- if (args[i] === _) args[i] = arguments[position++];
- }
- while (position < arguments.length) args.push(arguments[position++]);
- return func.apply(this, args);
- };
- };
-
- // Bind a number of an object's methods to that object. Remaining arguments
- // are the method names to be bound. Useful for ensuring that all callbacks
- // defined on an object belong to it.
- _.bindAll = function(obj) {
- var i, length = arguments.length, key;
- if (length <= 1) throw new Error('bindAll must be passed function names');
- for (i = 1; i < length; i++) {
- key = arguments[i];
- obj[key] = _.bind(obj[key], obj);
- }
- return obj;
- };
-
- // Memoize an expensive function by storing its results.
- _.memoize = function(func, hasher) {
- var memoize = function(key) {
- var cache = memoize.cache;
- var address = hasher ? hasher.apply(this, arguments) : key;
- if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
- return cache[address];
- };
- memoize.cache = {};
- return memoize;
- };
-
- // Delays a function for the given number of milliseconds, and then calls
- // it with the arguments supplied.
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function(){
- return func.apply(null, args);
- }, wait);
- };
-
- // Defers a function, scheduling it to run after the current call stack has
- // cleared.
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
- };
-
- // Returns a function, that, when invoked, will only be triggered at most once
- // during a given window of time. Normally, the throttled function will run
- // as much as it can, without ever going more than once per `wait` duration;
- // but if you'd like to disable the execution on the leading edge, pass
- // `{leading: false}`. To disable execution on the trailing edge, ditto.
- _.throttle = function(func, wait, options) {
- var context, args, result;
- var timeout = null;
- var previous = 0;
- if (!options) options = {};
- var later = function() {
- previous = options.leading === false ? 0 : _.now();
- timeout = null;
- result = func.apply(context, args);
- if (!timeout) context = args = null;
- };
- return function() {
- var now = _.now();
- if (!previous && options.leading === false) previous = now;
- var remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0 || remaining > wait) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- if (!timeout) context = args = null;
- } else if (!timeout && options.trailing !== false) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- };
-
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds. If `immediate` is passed, trigger the function on the
- // leading edge, instead of the trailing.
- _.debounce = function(func, wait, immediate) {
- var timeout, args, context, timestamp, result;
-
- var later = function() {
- var last = _.now() - timestamp;
-
- if (last < wait && last > 0) {
- timeout = setTimeout(later, wait - last);
- } else {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- if (!timeout) context = args = null;
- }
- }
- };
-
- return function() {
- context = this;
- args = arguments;
- timestamp = _.now();
- var callNow = immediate && !timeout;
- if (!timeout) timeout = setTimeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- context = args = null;
- }
-
- return result;
- };
- };
-
- // Returns the first function passed as an argument to the second,
- // allowing you to adjust arguments, run code before and after, and
- // conditionally execute the original function.
- _.wrap = function(func, wrapper) {
- return _.partial(wrapper, func);
- };
-
- // Returns a negated version of the passed-in predicate.
- _.negate = function(predicate) {
- return function() {
- return !predicate.apply(this, arguments);
- };
- };
-
- // Returns a function that is the composition of a list of functions, each
- // consuming the return value of the function that follows.
- _.compose = function() {
- var args = arguments;
- var start = args.length - 1;
- return function() {
- var i = start;
- var result = args[start].apply(this, arguments);
- while (i--) result = args[i].call(this, result);
- return result;
- };
- };
-
- // Returns a function that will only be executed after being called N times.
- _.after = function(times, func) {
- return function() {
- if (--times < 1) {
- return func.apply(this, arguments);
- }
- };
- };
-
- // Returns a function that will only be executed before being called N times.
- _.before = function(times, func) {
- var memo;
- return function() {
- if (--times > 0) {
- memo = func.apply(this, arguments);
- } else {
- func = null;
- }
- return memo;
- };
- };
-
- // Returns a function that will be executed at most one time, no matter how
- // often you call it. Useful for lazy initialization.
- _.once = _.partial(_.before, 2);
-
- // Object Functions
- // ----------------
-
- // Retrieve the names of an object's properties.
- // Delegates to **ECMAScript 5**'s native `Object.keys`
- _.keys = function(obj) {
- if (!_.isObject(obj)) return [];
- if (nativeKeys) return nativeKeys(obj);
- var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys.push(key);
- return keys;
- };
-
- // Retrieve the values of an object's properties.
- _.values = function(obj) {
- var keys = _.keys(obj);
- var length = keys.length;
- var values = Array(length);
- for (var i = 0; i < length; i++) {
- values[i] = obj[keys[i]];
- }
- return values;
- };
-
- // Convert an object into a list of `[key, value]` pairs.
- _.pairs = function(obj) {
- var keys = _.keys(obj);
- var length = keys.length;
- var pairs = Array(length);
- for (var i = 0; i < length; i++) {
- pairs[i] = [keys[i], obj[keys[i]]];
- }
- return pairs;
- };
-
- // Invert the keys and values of an object. The values must be serializable.
- _.invert = function(obj) {
- var result = {};
- var keys = _.keys(obj);
- for (var i = 0, length = keys.length; i < length; i++) {
- result[obj[keys[i]]] = keys[i];
- }
- return result;
- };
-
- // Return a sorted list of the function names available on the object.
- // Aliased as `methods`
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- };
-
- // Extend a given object with all the properties in passed-in object(s).
- _.extend = function(obj) {
- if (!_.isObject(obj)) return obj;
- var source, prop;
- for (var i = 1, length = arguments.length; i < length; i++) {
- source = arguments[i];
- for (prop in source) {
- if (hasOwnProperty.call(source, prop)) {
- obj[prop] = source[prop];
- }
- }
- }
- return obj;
- };
-
- // Return a copy of the object only containing the whitelisted properties.
- _.pick = function(obj, iteratee, context) {
- var result = {}, key;
- if (obj == null) return result;
- if (_.isFunction(iteratee)) {
- iteratee = createCallback(iteratee, context);
- for (key in obj) {
- var value = obj[key];
- if (iteratee(value, key, obj)) result[key] = value;
- }
- } else {
- var keys = concat.apply([], slice.call(arguments, 1));
- obj = new Object(obj);
- for (var i = 0, length = keys.length; i < length; i++) {
- key = keys[i];
- if (key in obj) result[key] = obj[key];
- }
- }
- return result;
- };
-
- // Return a copy of the object without the blacklisted properties.
- _.omit = function(obj, iteratee, context) {
- if (_.isFunction(iteratee)) {
- iteratee = _.negate(iteratee);
- } else {
- var keys = _.map(concat.apply([], slice.call(arguments, 1)), String);
- iteratee = function(value, key) {
- return !_.contains(keys, key);
- };
- }
- return _.pick(obj, iteratee, context);
- };
-
- // Fill in a given object with default properties.
- _.defaults = function(obj) {
- if (!_.isObject(obj)) return obj;
- for (var i = 1, length = arguments.length; i < length; i++) {
- var source = arguments[i];
- for (var prop in source) {
- if (obj[prop] === void 0) obj[prop] = source[prop];
- }
- }
- return obj;
- };
-
- // Create a (shallow-cloned) duplicate of an object.
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
-
- // Invokes interceptor with the obj, and then returns obj.
- // The primary purpose of this method is to "tap into" a method chain, in
- // order to perform operations on intermediate results within the chain.
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
-
- // Internal recursive comparison function for `isEqual`.
- var eq = function(a, b, aStack, bStack) {
- // Identical objects are equal. `0 === -0`, but they aren't identical.
- // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
- if (a === b) return a !== 0 || 1 / a === 1 / b;
- // A strict comparison is necessary because `null == undefined`.
- if (a == null || b == null) return a === b;
- // Unwrap any wrapped objects.
- if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped;
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className !== toString.call(b)) return false;
- switch (className) {
- // Strings, numbers, regular expressions, dates, and booleans are compared by value.
- case '[object RegExp]':
- // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
- case '[object String]':
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
- // equivalent to `new String("5")`.
- return '' + a === '' + b;
- case '[object Number]':
- // `NaN`s are equivalent, but non-reflexive.
- // Object(NaN) is equivalent to NaN
- if (+a !== +a) return +b !== +b;
- // An `egal` comparison is performed for other numeric values.
- return +a === 0 ? 1 / +a === 1 / b : +a === +b;
- case '[object Date]':
- case '[object Boolean]':
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
- // millisecond representations. Note that invalid dates with millisecond representations
- // of `NaN` are not equivalent.
- return +a === +b;
- }
- if (typeof a != 'object' || typeof b != 'object') return false;
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
- var length = aStack.length;
- while (length--) {
- // Linear search. Performance is inversely proportional to the number of
- // unique nested structures.
- if (aStack[length] === a) return bStack[length] === b;
- }
- // Objects with different constructors are not equivalent, but `Object`s
- // from different frames are.
- var aCtor = a.constructor, bCtor = b.constructor;
- if (
- aCtor !== bCtor &&
- // Handle Object.create(x) cases
- 'constructor' in a && 'constructor' in b &&
- !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
- _.isFunction(bCtor) && bCtor instanceof bCtor)
- ) {
- return false;
- }
- // Add the first object to the stack of traversed objects.
- aStack.push(a);
- bStack.push(b);
- var size, result;
- // Recursively compare objects and arrays.
- if (className === '[object Array]') {
- // Compare array lengths to determine if a deep comparison is necessary.
- size = a.length;
- result = size === b.length;
- if (result) {
- // Deep compare the contents, ignoring non-numeric properties.
- while (size--) {
- if (!(result = eq(a[size], b[size], aStack, bStack))) break;
- }
- }
- } else {
- // Deep compare objects.
- var keys = _.keys(a), key;
- size = keys.length;
- // Ensure that both objects contain the same number of properties before comparing deep equality.
- result = _.keys(b).length === size;
- if (result) {
- while (size--) {
- // Deep compare each member
- key = keys[size];
- if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
- }
- }
- }
- // Remove the first object from the stack of traversed objects.
- aStack.pop();
- bStack.pop();
- return result;
- };
-
- // Perform a deep comparison to check if two objects are equal.
- _.isEqual = function(a, b) {
- return eq(a, b, [], []);
- };
-
- // Is a given array, string, or object empty?
- // An "empty" object has no enumerable own-properties.
- _.isEmpty = function(obj) {
- if (obj == null) return true;
- if (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
- };
-
- // Is a given value a DOM element?
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType === 1);
- };
-
- // Is a given value an array?
- // Delegates to ECMA5's native Array.isArray
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) === '[object Array]';
- };
-
- // Is a given variable an object?
- _.isObject = function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- };
-
- // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
- _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
- _['is' + name] = function(obj) {
- return toString.call(obj) === '[object ' + name + ']';
- };
- });
-
- // Define a fallback version of the method in browsers (ahem, IE), where
- // there isn't any inspectable "Arguments" type.
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return _.has(obj, 'callee');
- };
- }
-
- // Optimize `isFunction` if appropriate. Work around an IE 11 bug.
- if (typeof /./ !== 'function') {
- _.isFunction = function(obj) {
- return typeof obj == 'function' || false;
- };
- }
-
- // Is a given object a finite number?
- _.isFinite = function(obj) {
- return isFinite(obj) && !isNaN(parseFloat(obj));
- };
-
- // Is the given value `NaN`? (NaN is the only number which does not equal itself).
- _.isNaN = function(obj) {
- return _.isNumber(obj) && obj !== +obj;
- };
-
- // Is a given value a boolean?
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
- };
-
- // Is a given value equal to null?
- _.isNull = function(obj) {
- return obj === null;
- };
-
- // Is a given variable undefined?
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
-
- // Shortcut function for checking if an object has a given property directly
- // on itself (in other words, not on a prototype).
- _.has = function(obj, key) {
- return obj != null && hasOwnProperty.call(obj, key);
- };
-
- // Utility Functions
- // -----------------
-
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
- // previous owner. Returns a reference to the Underscore object.
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
-
- // Keep the identity function around for default iteratees.
- _.identity = function(value) {
- return value;
- };
-
- // Predicate-generating functions. Often useful outside of Underscore.
- _.constant = function(value) {
- return function() {
- return value;
- };
- };
-
- _.noop = function(){};
-
- _.property = function(key) {
- return function(obj) {
- return obj[key];
- };
- };
-
- // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
- _.matches = function(attrs) {
- var pairs = _.pairs(attrs), length = pairs.length;
- return function(obj) {
- if (obj == null) return !length;
- obj = new Object(obj);
- for (var i = 0; i < length; i++) {
- var pair = pairs[i], key = pair[0];
- if (pair[1] !== obj[key] || !(key in obj)) return false;
- }
- return true;
- };
- };
-
- // Run a function **n** times.
- _.times = function(n, iteratee, context) {
- var accum = Array(Math.max(0, n));
- iteratee = createCallback(iteratee, context, 1);
- for (var i = 0; i < n; i++) accum[i] = iteratee(i);
- return accum;
- };
-
- // Return a random integer between min and max (inclusive).
- _.random = function(min, max) {
- if (max == null) {
- max = min;
- min = 0;
- }
- return min + Math.floor(Math.random() * (max - min + 1));
- };
-
- // A (possibly faster) way to get the current timestamp as an integer.
- _.now = Date.now || function() {
- return new Date().getTime();
- };
-
- // List of HTML entities for escaping.
- var escapeMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
- };
- var unescapeMap = _.invert(escapeMap);
-
- // Functions for escaping and unescaping strings to/from HTML interpolation.
- var createEscaper = function(map) {
- var escaper = function(match) {
- return map[match];
- };
- // Regexes for identifying a key that needs to be escaped
- var source = '(?:' + _.keys(map).join('|') + ')';
- var testRegexp = RegExp(source);
- var replaceRegexp = RegExp(source, 'g');
- return function(string) {
- string = string == null ? '' : '' + string;
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
- };
- };
- _.escape = createEscaper(escapeMap);
- _.unescape = createEscaper(unescapeMap);
-
- // If the value of the named `property` is a function then invoke it with the
- // `object` as context; otherwise, return it.
- _.result = function(object, property) {
- if (object == null) return void 0;
- var value = object[property];
- return _.isFunction(value) ? object[property]() : value;
- };
-
- // Generate a unique integer id (unique within the entire client session).
- // Useful for temporary DOM ids.
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = ++idCounter + '';
- return prefix ? prefix + id : id;
- };
-
- // By default, Underscore uses ERB-style template delimiters, change the
- // following template settings to use alternative delimiters.
- _.templateSettings = {
- evaluate : /<%([\s\S]+?)%>/g,
- interpolate : /<%=([\s\S]+?)%>/g,
- escape : /<%-([\s\S]+?)%>/g
- };
-
- // When customizing `templateSettings`, if you don't want to define an
- // interpolation, evaluation or escaping regex, we need one that is
- // guaranteed not to match.
- var noMatch = /(.)^/;
-
- // Certain characters need to be escaped so that they can be put into a
- // string literal.
- var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
-
- var escapeChar = function(match) {
- return '\\' + escapes[match];
- };
-
- // JavaScript micro-templating, similar to John Resig's implementation.
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
- // and correctly escapes quotes within interpolated code.
- // NB: `oldSettings` only exists for backwards compatibility.
- _.template = function(text, settings, oldSettings) {
- if (!settings && oldSettings) settings = oldSettings;
- settings = _.defaults({}, settings, _.templateSettings);
-
- // Combine delimiters into one regular expression via alternation.
- var matcher = RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
-
- // Compile the template source, escaping string literals appropriately.
- var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset).replace(escaper, escapeChar);
- index = offset + match.length;
-
- if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- } else if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- } else if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
- }
-
- // Adobe VMs need the match returned to produce the correct offest.
- return match;
- });
- source += "';\n";
-
- // If a variable is not specified, place data values in local scope.
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
-
- source = "var __t,__p='',__j=Array.prototype.join," +
- "print=function(){__p+=__j.call(arguments,'');};\n" +
- source + 'return __p;\n';
-
- try {
- var render = new Function(settings.variable || 'obj', '_', source);
- } catch (e) {
- e.source = source;
- throw e;
- }
-
- var template = function(data) {
- return render.call(this, data, _);
- };
-
- // Provide the compiled source as a convenience for precompilation.
- var argument = settings.variable || 'obj';
- template.source = 'function(' + argument + '){\n' + source + '}';
-
- return template;
- };
-
- // Add a "chain" function. Start chaining a wrapped Underscore object.
- _.chain = function(obj) {
- var instance = _(obj);
- instance._chain = true;
- return instance;
- };
-
- // OOP
- // ---------------
- // If Underscore is called as a function, it returns a wrapped object that
- // can be used OO-style. This wrapper holds altered versions of all the
- // underscore functions. Wrapped objects may be chained.
-
- // Helper function to continue chaining intermediate results.
- var result = function(obj) {
- return this._chain ? _(obj).chain() : obj;
- };
-
- // Add your own custom functions to the Underscore object.
- _.mixin = function(obj) {
- _.each(_.functions(obj), function(name) {
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return result.call(this, func.apply(_, args));
- };
- });
- };
-
- // Add all of the Underscore functions to the wrapper object.
- _.mixin(_);
-
- // Add all mutator Array functions to the wrapper.
- _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- method.apply(obj, arguments);
- if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
- return result.call(this, obj);
- };
- });
-
- // Add all accessor Array functions to the wrapper.
- _.each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- return result.call(this, method.apply(this._wrapped, arguments));
- };
- });
-
- // Extracts the result from a wrapped and chained object.
- _.prototype.value = function() {
- return this._wrapped;
- };
-
- // AMD registration happens at the end for compatibility with AMD loaders
- // that may not enforce next-turn semantics on modules. Even though general
- // practice for AMD registration is to be anonymous, underscore registers
- // as a named module because, like jQuery, it is a base library that is
- // popular enough to be bundled in a third party lib, but not be part of
- // an AMD load request. Those cases could generate an error when an
- // anonymous define() is called outside of a loader request.
- if (typeof define === 'function' && define.amd) {
- define('underscore', [], function() {
- return _;
- });
- }
-}.call(this));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/rome-2.1.0/rome.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/rome-2.1.0/rome.css b/htrace-core/src/web/lib/rome-2.1.0/rome.css
deleted file mode 100644
index 3c4c861..0000000
--- a/htrace-core/src/web/lib/rome-2.1.0/rome.css
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
- * @version v2.1.0
- * @link https://github.com/bevacqua/rome
- * @license MIT
- */
-.rd-container {
- display: inline-block;
- border: 1px solid #333;
- background-color: #fff;
- padding: 10px;
- text-align: center;
-}
-.rd-container-attachment {
- position: absolute;
-}
-.rd-month {
- display: inline-block;
- margin-right: 25px;
-}
-.rd-month:last-child {
- margin-right: 0;
-}
-.rd-back,
-.rd-next {
- cursor: pointer;
- border: none;
- outline: none;
- background: none;
- padding: 0;
- margin: 0;
-}
-.rd-back[disabled],
-.rd-next[disabled] {
- cursor: default;
-}
-.rd-back {
- float: left;
-}
-.rd-next {
- float: right;
-}
-.rd-back:before {
- display: block;
- content: '\2190';
-}
-.rd-next:before {
- display: block;
- content: '\2192';
-}
-.rd-day-body {
- cursor: pointer;
- text-align: center;
-}
-.rd-day-selected,
-.rd-time-selected,
-.rd-time-option:hover {
- cursor: pointer;
- background-color: #333;
- color: #fff;
-}
-.rd-day-prev-month,
-.rd-day-next-month {
- color: #999;
-}
-.rd-day-disabled {
- cursor: default;
- color: #fcc;
-}
-.rd-time {
- position: relative;
- display: inline-block;
- margin-top: 5px;
- min-width: 80px;
-}
-.rd-time-list {
- display: none;
- position: absolute;
- overflow-y: scroll;
- max-height: 160px;
- left: 0;
- right: 0;
- background-color: #fff;
- color: #333;
-}
-.rd-time-selected {
- padding: 5px;
-}
-.rd-time-option {
- padding: 5px;
-}
-.rd-day-concealed {
- visibility: hidden;
-}
[26/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/js/jquery-2.1.3.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/js/jquery-2.1.3.min.js b/htrace-core/src/web/lib/js/jquery-2.1.3.min.js
deleted file mode 100644
index 25714ed..0000000
--- a/htrace-core/src/web/lib/js/jquery-2.1.3.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(
this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:functi
on(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a
){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){va
r b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+
L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.child
Nodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b
,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;
while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parent
Node?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q
.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains
(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.
test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c
+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "]
;return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[
0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),c
ontains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)r
eturn!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=n
ew qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)
if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||
((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f)
{b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.fir
stChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);
b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jqu
ery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;r
eturn this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextS
ibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0
],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"re
solved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(
),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n
.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d
];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;retu
rn c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
-},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(
a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g
--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l
,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)i
f(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.names
pace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j
=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return
h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.
keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventL
istener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.
event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f
.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}functi
on ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]
||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeTyp
e||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{}
,c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=
c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,
b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);f
unction g(){f.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",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(non
e|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.b
oxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},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(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks
[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRi
ght,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.en
d=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.
elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=thi
s,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a)
.show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Twe
en(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?
d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1)
);(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.
push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&
&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
-},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHo
oks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},rem
oveClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(
var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;
h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).
mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c
))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.resp
onseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,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":n.parseJSON,"text xml":n.parseXM
L},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.succ
ess=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentT
ype)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.d
ata,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElemen
tChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction
(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",fu
nction(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, appl
ication/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCal
lback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseH
TML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.off
set.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(
b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(
b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});
[14/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.js b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
new file mode 100644
index 0000000..b6ac8d9
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
@@ -0,0 +1,2320 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+if (typeof jQuery === 'undefined') {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery')
+}
+
++function ($) {
+ var version = $.fn.jquery.split(' ')[0].split('.')
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
+ }
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.3.1
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false
+ var $el = this
+ $(this).one('bsTransitionEnd', function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+
+ if (!$.support.transition) return
+
+ $.event.special.bsTransitionEnd = {
+ bindType: $.support.transition.end,
+ delegateType: $.support.transition.end,
+ handle: function (e) {
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+ }
+ }
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.3.1
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // ALERT CLASS DEFINITION
+ // ======================
+
+ var dismiss = '[data-dismiss="alert"]'
+ var Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.VERSION = '3.3.1'
+
+ Alert.TRANSITION_DURATION = 150
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = $(selector)
+
+ if (e) e.preventDefault()
+
+ if (!$parent.length) {
+ $parent = $this.closest('.alert')
+ }
+
+ $parent.trigger(e = $.Event('close.bs.alert'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ // detach from parent, fire event then clean up data
+ $parent.detach().trigger('closed.bs.alert').remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent
+ .one('bsTransitionEnd', removeElement)
+ .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
+ removeElement()
+ }
+
+
+ // ALERT PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.alert')
+
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.alert
+
+ $.fn.alert = Plugin
+ $.fn.alert.Constructor = Alert
+
+
+ // ALERT NO CONFLICT
+ // =================
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ // ALERT DATA-API
+ // ==============
+
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.3.1
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // BUTTON PUBLIC CLASS DEFINITION
+ // ==============================
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
+ }
+
+ Button.VERSION = '3.3.1'
+
+ Button.DEFAULTS = {
+ loadingText: 'loading...'
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ var $el = this.$element
+ var val = $el.is('input') ? 'val' : 'html'
+ var data = $el.data()
+
+ state = state + 'Text'
+
+ if (data.resetText == null) $el.data('resetText', $el[val]())
+
+ // push to event loop to allow forms to submit
+ setTimeout($.proxy(function () {
+ $el[val](data[state] == null ? this.options[state] : data[state])
+
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+ if ($parent.length) {
+ var $input = this.$element.find('input')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+ else $parent.find('.active').removeClass('active')
+ }
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+ } else {
+ this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
+ }
+
+ if (changed) this.$element.toggleClass('active')
+ }
+
+
+ // BUTTON PLUGIN DEFINITION
+ // ========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.button')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ var old = $.fn.button
+
+ $.fn.button = Plugin
+ $.fn.button.Constructor = Button
+
+
+ // BUTTON NO CONFLICT
+ // ==================
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ // BUTTON DATA-API
+ // ===============
+
+ $(document)
+ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ Plugin.call($btn, 'toggle')
+ e.preventDefault()
+ })
+ .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.3.1
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CAROUSEL CLASS DEFINITION
+ // =========================
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.paused =
+ this.sliding =
+ this.interval =
+ this.$active =
+ this.$items = null
+
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
+
+ this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+ }
+
+ Carousel.VERSION = '3.3.1'
+
+ Carousel.TRANSITION_DURATION = 600
+
+ Carousel.DEFAULTS = {
+ interval: 5000,
+ pause: 'hover',
+ wrap: true,
+ keyboard: true
+ }
+
+ Carousel.prototype.keydown = function (e) {
+ if (/input|textarea/i.test(e.target.tagName)) return
+ switch (e.which) {
+ case 37: this.prev(); break
+ case 39: this.next(); break
+ default: return
+ }
+
+ e.preventDefault()
+ }
+
+ Carousel.prototype.cycle = function (e) {
+ e || (this.paused = false)
+
+ this.interval && clearInterval(this.interval)
+
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+ return this
+ }
+
+ Carousel.prototype.getItemIndex = function (item) {
+ this.$items = item.parent().children('.item')
+ return this.$items.index(item || this.$active)
+ }
+
+ Carousel.prototype.getItemForDirection = function (direction, active) {
+ var delta = direction == 'prev' ? -1 : 1
+ var activeIndex = this.getItemIndex(active)
+ var itemIndex = (activeIndex + delta) % this.$items.length
+ return this.$items.eq(itemIndex)
+ }
+
+ Carousel.prototype.to = function (pos) {
+ var that = this
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+ if (activeIndex == pos) return this.pause().cycle()
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
+ }
+
+ Carousel.prototype.pause = function (e) {
+ e || (this.paused = true)
+
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+
+ this.interval = clearInterval(this.interval)
+
+ return this
+ }
+
+ Carousel.prototype.next = function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ Carousel.prototype.prev = function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ Carousel.prototype.slide = function (type, next) {
+ var $active = this.$element.find('.item.active')
+ var $next = next || this.getItemForDirection(type, $active)
+ var isCycling = this.interval
+ var direction = type == 'next' ? 'left' : 'right'
+ var fallback = type == 'next' ? 'first' : 'last'
+ var that = this
+
+ if (!$next.length) {
+ if (!this.options.wrap) return
+ $next = this.$element.find('.item')[fallback]()
+ }
+
+ if ($next.hasClass('active')) return (this.sliding = false)
+
+ var relatedTarget = $next[0]
+ var slideEvent = $.Event('slide.bs.carousel', {
+ relatedTarget: relatedTarget,
+ direction: direction
+ })
+ this.$element.trigger(slideEvent)
+ if (slideEvent.isDefaultPrevented()) return
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+ $nextIndicator && $nextIndicator.addClass('active')
+ }
+
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ $active
+ .one('bsTransitionEnd', function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () {
+ that.$element.trigger(slidEvent)
+ }, 0)
+ })
+ .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
+ } else {
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger(slidEvent)
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+
+ // CAROUSEL PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.carousel')
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ var action = typeof option == 'string' ? option : options.slide
+
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = Plugin
+ $.fn.carousel.Constructor = Carousel
+
+
+ // CAROUSEL NO CONFLICT
+ // ====================
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+
+ // CAROUSEL DATA-API
+ // =================
+
+ var clickHandler = function (e) {
+ var href
+ var $this = $(this)
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+ if (!$target.hasClass('carousel')) return
+ var options = $.extend({}, $target.data(), $this.data())
+ var slideIndex = $this.attr('data-slide-to')
+ if (slideIndex) options.interval = false
+
+ Plugin.call($target, options)
+
+ if (slideIndex) {
+ $target.data('bs.carousel').to(slideIndex)
+ }
+
+ e.preventDefault()
+ }
+
+ $(document)
+ .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
+ .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
+
+ $(window).on('load', function () {
+ $('[data-ride="carousel"]').each(function () {
+ var $carousel = $(this)
+ Plugin.call($carousel, $carousel.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.3.1
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // COLLAPSE PUBLIC CLASS DEFINITION
+ // ================================
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
+ this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
+ this.transitioning = null
+
+ if (this.options.parent) {
+ this.$parent = this.getParent()
+ } else {
+ this.addAriaAndCollapsedClass(this.$element, this.$trigger)
+ }
+
+ if (this.options.toggle) this.toggle()
+ }
+
+ Collapse.VERSION = '3.3.1'
+
+ Collapse.TRANSITION_DURATION = 350
+
+ Collapse.DEFAULTS = {
+ toggle: true,
+ trigger: '[data-toggle="collapse"]'
+ }
+
+ Collapse.prototype.dimension = function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ Collapse.prototype.show = function () {
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ var activesData
+ var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
+
+ if (actives && actives.length) {
+ activesData = actives.data('bs.collapse')
+ if (activesData && activesData.transitioning) return
+ }
+
+ var startEvent = $.Event('show.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ if (actives && actives.length) {
+ Plugin.call(actives, 'hide')
+ activesData || actives.data('bs.collapse', null)
+ }
+
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ .addClass('collapsing')[dimension](0)
+ .attr('aria-expanded', true)
+
+ this.$trigger
+ .removeClass('collapsed')
+ .attr('aria-expanded', true)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse in')[dimension]('')
+ this.transitioning = 0
+ this.$element
+ .trigger('shown.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+ this.$element
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
+ }
+
+ Collapse.prototype.hide = function () {
+ if (this.transitioning || !this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('hide.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var dimension = this.dimension()
+
+ this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+ this.$element
+ .addClass('collapsing')
+ .removeClass('collapse in')
+ .attr('aria-expanded', false)
+
+ this.$trigger
+ .addClass('collapsed')
+ .attr('aria-expanded', false)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.transitioning = 0
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse')
+ .trigger('hidden.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ this.$element
+ [dimension](0)
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
+ }
+
+ Collapse.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ Collapse.prototype.getParent = function () {
+ return $(this.options.parent)
+ .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
+ .each($.proxy(function (i, element) {
+ var $element = $(element)
+ this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
+ }, this))
+ .end()
+ }
+
+ Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
+ var isOpen = $element.hasClass('in')
+
+ $element.attr('aria-expanded', isOpen)
+ $trigger
+ .toggleClass('collapsed', !isOpen)
+ .attr('aria-expanded', isOpen)
+ }
+
+ function getTargetFromTrigger($trigger) {
+ var href
+ var target = $trigger.attr('data-target')
+ || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+
+ return $(target)
+ }
+
+
+ // COLLAPSE PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.collapse')
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data && options.toggle && option == 'show') options.toggle = false
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = Plugin
+ $.fn.collapse.Constructor = Collapse
+
+
+ // COLLAPSE NO CONFLICT
+ // ====================
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ // COLLAPSE DATA-API
+ // =================
+
+ $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+ var $this = $(this)
+
+ if (!$this.attr('data-target')) e.preventDefault()
+
+ var $target = getTargetFromTrigger($this)
+ var data = $target.data('bs.collapse')
+ var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
+
+ Plugin.call($target, option)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.3.1
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // DROPDOWN CLASS DEFINITION
+ // =========================
+
+ var backdrop = '.dropdown-backdrop'
+ var toggle = '[data-toggle="dropdown"]'
+ var Dropdown = function (element) {
+ $(element).on('click.bs.dropdown', this.toggle)
+ }
+
+ Dropdown.VERSION = '3.3.1'
+
+ Dropdown.prototype.toggle = function (e) {
+ var $this = $(this)
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+ }
+
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this
+ .trigger('focus')
+ .attr('aria-expanded', 'true')
+
+ $parent
+ .toggleClass('open')
+ .trigger('shown.bs.dropdown', relatedTarget)
+ }
+
+ return false
+ }
+
+ Dropdown.prototype.keydown = function (e) {
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
+
+ var $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
+ }
+
+ var desc = ' li:not(.divider):visible a'
+ var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
+
+ if (!$items.length) return
+
+ var index = $items.index(e.target)
+
+ if (e.which == 38 && index > 0) index-- // up
+ if (e.which == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items.eq(index).trigger('focus')
+ }
+
+ function clearMenus(e) {
+ if (e && e.which === 3) return
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $this = $(this)
+ var $parent = getParent($this)
+ var relatedTarget = { relatedTarget: this }
+
+ if (!$parent.hasClass('open')) return
+
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this.attr('aria-expanded', 'false')
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+ })
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+
+ // DROPDOWN PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.dropdown')
+
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = Plugin
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ // DROPDOWN NO CONFLICT
+ // ====================
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
+ // ===================================
+
+ $(document)
+ .on('click.bs.dropdown.data-api', clearMenus)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.3.1
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // MODAL CLASS DEFINITION
+ // ======================
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$body = $(document.body)
+ this.$element = $(element)
+ this.$backdrop =
+ this.isShown = null
+ this.scrollbarWidth = 0
+
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
+ }
+
+ Modal.VERSION = '3.3.1'
+
+ Modal.TRANSITION_DURATION = 300
+ Modal.BACKDROP_TRANSITION_DURATION = 150
+
+ Modal.DEFAULTS = {
+ backdrop: true,
+ keyboard: true,
+ show: true
+ }
+
+ Modal.prototype.toggle = function (_relatedTarget) {
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
+ }
+
+ Modal.prototype.show = function (_relatedTarget) {
+ var that = this
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.checkScrollbar()
+ this.setScrollbar()
+ this.$body.addClass('modal-open')
+
+ this.escape()
+ this.resize()
+
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(that.$body) // don't move modals dom position
+ }
+
+ that.$element
+ .show()
+ .scrollTop(0)
+
+ if (that.options.backdrop) that.adjustBackdrop()
+ that.adjustDialog()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+
+ that.enforceFocus()
+
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+ transition ?
+ that.$element.find('.modal-dialog') // wait for modal to slide in
+ .one('bsTransitionEnd', function () {
+ that.$element.trigger('focus').trigger(e)
+ })
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ that.$element.trigger('focus').trigger(e)
+ })
+ }
+
+ Modal.prototype.hide = function (e) {
+ if (e) e.preventDefault()
+
+ e = $.Event('hide.bs.modal')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+ this.resize()
+
+ $(document).off('focusin.bs.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+ .off('click.dismiss.bs.modal')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ this.hideModal()
+ }
+
+ Modal.prototype.enforceFocus = function () {
+ $(document)
+ .off('focusin.bs.modal') // guard against infinite focus loop
+ .on('focusin.bs.modal', $.proxy(function (e) {
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ this.$element.trigger('focus')
+ }
+ }, this))
+ }
+
+ Modal.prototype.escape = function () {
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
+ e.which == 27 && this.hide()
+ }, this))
+ } else if (!this.isShown) {
+ this.$element.off('keydown.dismiss.bs.modal')
+ }
+ }
+
+ Modal.prototype.resize = function () {
+ if (this.isShown) {
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
+ } else {
+ $(window).off('resize.bs.modal')
+ }
+ }
+
+ Modal.prototype.hideModal = function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.$body.removeClass('modal-open')
+ that.resetAdjustments()
+ that.resetScrollbar()
+ that.$element.trigger('hidden.bs.modal')
+ })
+ }
+
+ Modal.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ Modal.prototype.backdrop = function (callback) {
+ var that = this
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .prependTo(this.$element)
+ .on('click.dismiss.bs.modal', $.proxy(function (e) {
+ if (e.target !== e.currentTarget) return
+ this.options.backdrop == 'static'
+ ? this.$element[0].focus.call(this.$element[0])
+ : this.hide.call(this)
+ }, this))
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop
+ .one('bsTransitionEnd', callback)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ var callbackRemove = function () {
+ that.removeBackdrop()
+ callback && callback()
+ }
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$backdrop
+ .one('bsTransitionEnd', callbackRemove)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callbackRemove()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ // these following methods are used to handle overflowing modals
+
+ Modal.prototype.handleUpdate = function () {
+ if (this.options.backdrop) this.adjustBackdrop()
+ this.adjustDialog()
+ }
+
+ Modal.prototype.adjustBackdrop = function () {
+ this.$backdrop
+ .css('height', 0)
+ .css('height', this.$element[0].scrollHeight)
+ }
+
+ Modal.prototype.adjustDialog = function () {
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
+
+ this.$element.css({
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
+ })
+ }
+
+ Modal.prototype.resetAdjustments = function () {
+ this.$element.css({
+ paddingLeft: '',
+ paddingRight: ''
+ })
+ }
+
+ Modal.prototype.checkScrollbar = function () {
+ this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
+ this.scrollbarWidth = this.measureScrollbar()
+ }
+
+ Modal.prototype.setScrollbar = function () {
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+ }
+
+ Modal.prototype.resetScrollbar = function () {
+ this.$body.css('padding-right', '')
+ }
+
+ Modal.prototype.measureScrollbar = function () { // thx walsh
+ var scrollDiv = document.createElement('div')
+ scrollDiv.className = 'modal-scrollbar-measure'
+ this.$body.append(scrollDiv)
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+ this.$body[0].removeChild(scrollDiv)
+ return scrollbarWidth
+ }
+
+
+ // MODAL PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option, _relatedTarget) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.modal')
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option](_relatedTarget)
+ else if (options.show) data.show(_relatedTarget)
+ })
+ }
+
+ var old = $.fn.modal
+
+ $.fn.modal = Plugin
+ $.fn.modal.Constructor = Modal
+
+
+ // MODAL NO CONFLICT
+ // =================
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ // MODAL DATA-API
+ // ==============
+
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ var href = $this.attr('href')
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+ if ($this.is('a')) e.preventDefault()
+
+ $target.one('show.bs.modal', function (showEvent) {
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+ $target.one('hidden.bs.modal', function () {
+ $this.is(':visible') && $this.trigger('focus')
+ })
+ })
+ Plugin.call($target, option, this)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.3.1
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type =
+ this.options =
+ this.enabled =
+ this.timeout =
+ this.hoverState =
+ this.$element = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.VERSION = '3.3.1'
+
+ Tooltip.TRANSITION_DURATION = 150
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false,
+ viewport: {
+ selector: 'body',
+ padding: 0
+ }
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (self && self.$tip && self.$tip.is(':visible')) {
+ self.hoverState = 'in'
+ return
+ }
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
+
+ var $tip = this.tip()
+
+ var tipId = this.getUID(this.type)
+
+ this.setContent()
+ $tip.attr('id', tipId)
+ this.$element.attr('aria-describedby', tipId)
+
+ if (this.options.animation) $tip.addClass('fade')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+ .data('bs.' + this.type, this)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var orgPlacement = placement
+ var $container = this.options.container ? $(this.options.container) : this.$element.parent()
+ var containerDim = this.getPosition($container)
+
+ placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
+ placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+
+ var complete = function () {
+ var prevHoverState = that.hoverState
+ that.$element.trigger('shown.bs.' + that.type)
+ that.hoverState = null
+
+ if (prevHoverState == 'out') that.leave(that)
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top = offset.top + marginTop
+ offset.left = offset.left + marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var isVertical = /top|bottom/.test(placement)
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+ $tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
+ this.arrow()
+ .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
+ .css(isHorizontal ? 'top' : 'left', '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function (callback) {
+ var that = this
+ var $tip = this.tip()
+ var e = $.Event('hide.bs.' + this.type)
+
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ callback && callback()
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function ($element) {
+ $element = $element || this.$element
+
+ var el = $element[0]
+ var isBody = el.tagName == 'BODY'
+
+ var elRect = el.getBoundingClientRect()
+ if (elRect.width == null) {
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
+ }
+ var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
+
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+ }
+
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+ var delta = { top: 0, left: 0 }
+ if (!this.$viewport) return delta
+
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+ var viewportDimensions = this.getPosition(this.$viewport)
+
+ if (/right|left/.test(placement)) {
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
+ delta.top = viewportDimensions.top - topEdgeOffset
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+ }
+ } else {
+ var leftEdgeOffset = pos.left - viewportPadding
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+ delta.left = viewportDimensions.left - leftEdgeOffset
+ } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+ }
+ }
+
+ return delta
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.getUID = function (prefix) {
+ do prefix += ~~(Math.random() * 1000000)
+ while (document.getElementById(prefix))
+ return prefix
+ }
+
+ Tooltip.prototype.tip = function () {
+ return (this.$tip = this.$tip || $(this.options.template))
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = this
+ if (e) {
+ self = $(e.currentTarget).data('bs.' + this.type)
+ if (!self) {
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+ $(e.currentTarget).data('bs.' + this.type, self)
+ }
+ }
+
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+
+ Tooltip.prototype.destroy = function () {
+ var that = this
+ clearTimeout(this.timeout)
+ this.hide(function () {
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
+ })
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+ var selector = options && options.selector
+
+ if (!data && option == 'destroy') return
+ if (selector) {
+ if (!data) $this.data('bs.tooltip', (data = {}))
+ if (!data[selector]) data[selector] = new Tooltip(this, options)
+ } else {
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ }
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = Plugin
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.3.1
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.VERSION = '3.3.1'
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('fade top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+ }
+
+ Popover.prototype.tip = function () {
+ if (!this.$tip) this.$tip = $(this.options.template)
+ return this.$tip
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+ var selector = options && options.selector
+
+ if (!data && option == 'destroy') return
+ if (selector) {
+ if (!data) $this.data('bs.popover', (data = {}))
+ if (!data[selector]) data[selector] = new Popover(this, options)
+ } else {
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ }
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.popover
+
+ $.fn.popover = Plugin
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.3.1
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // SCROLLSPY CLASS DEFINITION
+ // ==========================
+
+ function ScrollSpy(element, options) {
+ var process = $.proxy(this.process, this)
+
+ this.$body = $('body')
+ this.$scrollElement = $(element).is('body') ? $(window) : $(element)
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
+ this.selector = (this.options.target || '') + ' .nav li > a'
+ this.offsets = []
+ this.targets = []
+ this.activeTarget = null
+ this.scrollHeight = 0
+
+ this.$scrollElement.on('scroll.bs.scrollspy', process)
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.VERSION = '3.3.1'
+
+ ScrollSpy.DEFAULTS = {
+ offset: 10
+ }
+
+ ScrollSpy.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+ }
+
+ ScrollSpy.prototype.refresh = function () {
+ var offsetMethod = 'offset'
+ var offsetBase = 0
+
+ if (!$.isWindow(this.$scrollElement[0])) {
+ offsetMethod = 'position'
+ offsetBase = this.$scrollElement.scrollTop()
+ }
+
+ this.offsets = []
+ this.targets = []
+ this.scrollHeight = this.getScrollHeight()
+
+ var self = this
+
+ this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ var href = $el.data('target') || $el.attr('href')
+ var $href = /^#./.test(href) && $(href)
+
+ return ($href
+ && $href.length
+ && $href.is(':visible')
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ ScrollSpy.prototype.process = function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ var scrollHeight = this.getScrollHeight()
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
+ var offsets = this.offsets
+ var targets = this.targets
+ var activeTarget = this.activeTarget
+ var i
+
+ if (this.scrollHeight != scrollHeight) {
+ this.refresh()
+ }
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+ }
+
+ if (activeTarget && scrollTop < offsets[0]) {
+ this.activeTarget = null
+ return this.clear()
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate(targets[i])
+ }
+ }
+
+ ScrollSpy.prototype.activate = function (target) {
+ this.activeTarget = target
+
+ this.clear()
+
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
+
+ var active = $(selector)
+ .parents('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active
+ .closest('li.dropdown')
+ .addClass('active')
+ }
+
+ active.trigger('activate.bs.scrollspy')
+ }
+
+ ScrollSpy.prototype.clear = function () {
+ $(this.selector)
+ .parentsUntil(this.options.target, '.active')
+ .removeClass('active')
+ }
+
+
+ // SCROLLSPY PLUGIN DEFINITION
+ // ===========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.scrollspy')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = Plugin
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+
+ // SCROLLSPY NO CONFLICT
+ // =====================
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ // SCROLLSPY DATA-API
+ // ==================
+
+ $(window).on('load.bs.scrollspy.data-api', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ Plugin.call($spy, $spy.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.3.1
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TAB CLASS DEFINITION
+ // ====================
+
+ var Tab = function (element) {
+ this.element = $(element)
+ }
+
+ Tab.VERSION = '3.3.1'
+
+ Tab.TRANSITION_DURATION = 150
+
+ Tab.prototype.show = function () {
+ var $this = this.element
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
+ var selector = $this.data('target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ if ($this.parent('li').hasClass('active')) return
+
+ var $previous = $ul.find('.active:last a')
+ var hideEvent = $.Event('hide.bs.tab', {
+ relatedTarget: $this[0]
+ })
+ var showEvent = $.Event('show.bs.tab', {
+ relatedTarget: $previous[0]
+ })
+
+ $previous.trigger(hideEvent)
+ $this.trigger(showEvent)
+
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
+
+ var $target = $(selector)
+
+ this.activate($this.closest('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $previous.trigger({
+ type: 'hidden.bs.tab',
+ relatedTarget: $this[0]
+ })
+ $this.trigger({
+ type: 'shown.bs.tab',
+ relatedTarget: $previous[0]
+ })
+ })
+ }
+
+ Tab.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ var transition = callback
+ && $.support.transition
+ && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', false)
+
+ element
+ .addClass('active')
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if (element.parent('.dropdown-menu')) {
+ element
+ .closest('li.dropdown')
+ .addClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+ }
+
+ callback && callback()
+ }
+
+ $active.length && transition ?
+ $active
+ .one('bsTransitionEnd', next)
+ .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
+ next()
+
+ $active.removeClass('in')
+ }
+
+
+ // TAB PLUGIN DEFINITION
+ // =====================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tab')
+
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tab
+
+ $.fn.tab = Plugin
+ $.fn.tab.Constructor = Tab
+
+
+ // TAB NO CONFLICT
+ // ===============
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ // TAB DATA-API
+ // ============
+
+ var clickHandler = function (e) {
+ e.preventDefault()
+ Plugin.call($(this), 'show')
+ }
+
+ $(document)
+ .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
+ .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.3.1
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // AFFIX CLASS DEFINITION
+ // ======================
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, Affix.DEFAULTS, options)
+
+ this.$target = $(this.options.target)
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
+
+ this.$element = $(element)
+ this.affixed =
+ this.unpin =
+ this.pinnedOffset = null
+
+ this.checkPosition()
+ }
+
+ Affix.VERSION = '3.3.1'
+
+ Affix.RESET = 'affix affix-top affix-bottom'
+
+ Affix.DEFAULTS = {
+ offset: 0,
+ target: window
+ }
+
+ Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ var targetHeight = this.$target.height()
+
+ if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
+
+ if (this.affixed == 'bottom') {
+ if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
+ return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
+ }
+
+ var initializing = this.affixed == null
+ var colliderTop = initializing ? scrollTop : position.top
+ var colliderHeight = initializing ? targetHeight : height
+
+ if (offsetTop != null && colliderTop <= offsetTop) return 'top'
+ if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
+
+ return false
+ }
+
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
+ Affix.prototype.checkPositionWithEventLoop = function () {
+ setTimeout($.proxy(this.checkPosition, this), 1)
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var height = this.$element.height()
+ var offset = this.options.offset
+ var offsetTop = offset.top
+ var offsetBottom = offset.bottom
+ var scrollHeight = $('body').height()
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+ var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
+
+ if (this.affixed != affix) {
+ if (this.unpin != null) this.$element.css('top', '')
+
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
+ }
+
+ if (affix == 'bottom') {
+ this.$element.offset({
+ top: scrollHeight - height - offsetBottom
+ })
+ }
+ }
+
+
+ // AFFIX PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.affix')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.affix
+
+ $.fn.affix = Plugin
+ $.fn.affix.Constructor = Affix
+
+
+ // AFFIX NO CONFLICT
+ // =================
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ // AFFIX DATA-API
+ // ==============
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ var data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop != null) data.offset.top = data.offsetTop
+
+ Plugin.call($spy, data)
+ })
+ })
+
+}(jQuery);
[20/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/conf/config_keys.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/conf/config_keys.go b/htrace-htraced/src/go/src/org/apache/htrace/conf/config_keys.go
new file mode 100644
index 0000000..ccb09e0
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/conf/config_keys.go
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conf
+
+import (
+ "fmt"
+ "os"
+)
+
+//
+// Configuration keys for HTrace.
+//
+
+// The platform-specific path separator. Usually slash.
+var PATH_SEP string = fmt.Sprintf("%c", os.PathSeparator)
+
+// The platform-specific path list separator. Usually colon.
+var PATH_LIST_SEP string = fmt.Sprintf("%c", os.PathListSeparator)
+
+// The name of the XML configuration file to look for.
+const CONFIG_FILE_NAME = "htraced-conf.xml"
+
+// An environment variable containing a list of paths to search for the
+// configuration file in.
+const HTRACED_CONF_DIR = "HTRACED_CONF_DIR"
+
+// The web address to start the REST server on.
+const HTRACE_WEB_ADDRESS = "web.address"
+
+// The default port for the Htrace web address.
+const HTRACE_WEB_ADDRESS_DEFAULT_PORT = 9095
+
+// The web address to start the REST server on.
+const HTRACE_HRPC_ADDRESS = "hrpc.address"
+
+// The default port for the Htrace HRPC address.
+const HTRACE_HRPC_ADDRESS_DEFAULT_PORT = 9075
+
+// The directories to put the data store into. Separated by PATH_LIST_SEP.
+const HTRACE_DATA_STORE_DIRECTORIES = "data.store.directories"
+
+// Boolean key which indicates whether we should clear data on startup.
+const HTRACE_DATA_STORE_CLEAR = "data.store.clear"
+
+// How many writes to buffer before applying backpressure to span senders.
+const HTRACE_DATA_STORE_SPAN_BUFFER_SIZE = "data.store.span.buffer.size"
+
+// Path to put the logs from htrace, or the empty string to use stdout.
+const HTRACE_LOG_PATH = "log.path"
+
+// The log level to use for the logs in htrace.
+const HTRACE_LOG_LEVEL = "log.level"
+
+// A host:port pair to send information to on startup. This is used in unit
+// tests to determine the (random) port of the htraced process that has been
+// started.
+const HTRACE_STARTUP_NOTIFICATION_ADDRESS = "startup.notification.address"
+
+// Default values for HTrace configuration keys.
+var DEFAULTS = map[string]string{
+ HTRACE_WEB_ADDRESS: fmt.Sprintf("0.0.0.0:%d", HTRACE_WEB_ADDRESS_DEFAULT_PORT),
+ HTRACE_HRPC_ADDRESS: fmt.Sprintf("0.0.0.0:%d", HTRACE_HRPC_ADDRESS_DEFAULT_PORT),
+ HTRACE_DATA_STORE_DIRECTORIES: PATH_SEP + "tmp" + PATH_SEP + "htrace1" +
+ PATH_LIST_SEP + PATH_SEP + "tmp" + PATH_SEP + "htrace2",
+ HTRACE_DATA_STORE_CLEAR: "false",
+ HTRACE_DATA_STORE_SPAN_BUFFER_SIZE: "100",
+ HTRACE_LOG_PATH: "",
+ HTRACE_LOG_LEVEL: "INFO",
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/conf/config_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/conf/config_test.go b/htrace-htraced/src/go/src/org/apache/htrace/conf/config_test.go
new file mode 100644
index 0000000..42c1c71
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/conf/config_test.go
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conf
+
+import (
+ "bytes"
+ "os"
+ "strings"
+ "testing"
+)
+
+// Test that parsing command-line arguments of the form -Dfoo=bar works.
+func TestParseArgV(t *testing.T) {
+ t.Parallel()
+ argv := []string{"-Dfoo=bar", "-Dbaz=123", "-DsillyMode"}
+ bld := &Builder{Argv: argv}
+ cnf, err := bld.Build()
+ if err != nil {
+ t.Fatal()
+ }
+ if "bar" != cnf.Get("foo") {
+ t.Fatal()
+ }
+ if 123 != cnf.GetInt("baz") {
+ t.Fatal()
+ }
+ if !cnf.GetBool("sillyMode") {
+ t.Fatal()
+ }
+ if cnf.GetBool("otherSillyMode") {
+ t.Fatal()
+ }
+}
+
+// Test that default values work.
+// Defaults are used only when the configuration option is not present or can't be parsed.
+func TestDefaults(t *testing.T) {
+ t.Parallel()
+ argv := []string{"-Dfoo=bar", "-Dbaz=invalidNumber"}
+ defaults := map[string]string{
+ "foo": "notbar",
+ "baz": "456",
+ "foo2": "4611686018427387904",
+ }
+ bld := &Builder{Argv: argv, Defaults: defaults}
+ cnf, err := bld.Build()
+ if err != nil {
+ t.Fatal()
+ }
+ if "bar" != cnf.Get("foo") {
+ t.Fatal()
+ }
+ if 456 != cnf.GetInt("baz") {
+ t.Fatal()
+ }
+ if 4611686018427387904 != cnf.GetInt64("foo2") {
+ t.Fatal()
+ }
+}
+
+// Test that we can parse our XML configuration file.
+func TestXmlConfigurationFile(t *testing.T) {
+ t.Parallel()
+ xml := `
+<?xml version="1.0"?>
+<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>
+<configuration>
+ <property>
+ <name>foo.bar</name>
+ <value>123</value>
+ </property>
+ <property>
+ <name>foo.baz</name>
+ <value>xmlValue</value>
+ </property>
+ <!--<property>
+ <name>commented.out</name>
+ <value>stuff</value>
+ </property>-->
+</configuration>
+`
+ xmlReader := strings.NewReader(xml)
+ argv := []string{"-Dfoo.bar=456"}
+ defaults := map[string]string{
+ "foo.bar": "789",
+ "cmdline.opt": "4611686018427387904",
+ }
+ bld := &Builder{Argv: argv, Defaults: defaults, Reader: xmlReader}
+ cnf, err := bld.Build()
+ if err != nil {
+ t.Fatal()
+ }
+ // The command-line argument takes precedence over the XML and the defaults.
+ if 456 != cnf.GetInt("foo.bar") {
+ t.Fatal()
+ }
+ if "xmlValue" != cnf.Get("foo.baz") {
+ t.Fatalf("foo.baz = %s", cnf.Get("foo.baz"))
+ }
+ if "" != cnf.Get("commented.out") {
+ t.Fatal()
+ }
+ if 4611686018427387904 != cnf.GetInt64("cmdline.opt") {
+ t.Fatal()
+ }
+}
+
+// Test our handling of the HTRACE_CONF_DIR environment variable.
+func TestGetHTracedConfDirs(t *testing.T) {
+ os.Setenv("HTRACED_CONF_DIR", "")
+ dlog := new(bytes.Buffer)
+ dirs := getHTracedConfDirs(dlog)
+ if len(dirs) != 1 || dirs[0] != "." {
+ t.Fatal()
+ }
+ os.Setenv("HTRACED_CONF_DIR", "/foo/bar:/baz")
+ dirs = getHTracedConfDirs(dlog)
+ if len(dirs) != 2 || dirs[0] != "/foo/bar" || dirs[1] != "/baz" {
+ t.Fatal()
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/conf/xml.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/conf/xml.go b/htrace-htraced/src/go/src/org/apache/htrace/conf/xml.go
new file mode 100644
index 0000000..de14bc5
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/conf/xml.go
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conf
+
+import (
+ "encoding/xml"
+ "io"
+ "log"
+)
+
+type configuration struct {
+ Properties []propertyXml `xml:"property"`
+}
+
+type propertyXml struct {
+ Name string `xml:"name"`
+ Value string `xml:"value"`
+}
+
+// Parse an XML configuration file.
+func parseXml(reader io.Reader, m map[string]string) error {
+ dec := xml.NewDecoder(reader)
+ configurationXml := configuration{}
+ err := dec.Decode(&configurationXml)
+ if err != nil {
+ return err
+ }
+ props := configurationXml.Properties
+ for p := range props {
+ key := props[p].Name
+ value := props[p].Value
+ if key == "" {
+ log.Println("Warning: ignoring element with missing or empty <name>.")
+ continue
+ }
+ if value == "" {
+ log.Println("Warning: ignoring element with key " + key + " with missing or empty <value>.")
+ continue
+ }
+ //log.Printf("setting %s to %s\n", key, value)
+ m[key] = value
+ }
+ return nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/cmd.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/cmd.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/cmd.go
new file mode 100644
index 0000000..38cdb58
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/cmd.go
@@ -0,0 +1,317 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bufio"
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "github.com/alecthomas/kingpin"
+ "io"
+ htrace "org/apache/htrace/client"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "os"
+ "time"
+)
+
+var RELEASE_VERSION string
+var GIT_VERSION string
+
+const EXIT_SUCCESS = 0
+const EXIT_FAILURE = 1
+
+var verbose *bool
+
+const USAGE = `The Apache HTrace command-line tool. This tool retrieves and modifies settings and
+other data on a running htraced daemon.
+
+If we find an ` + conf.CONFIG_FILE_NAME + ` configuration file in the list of directories
+specified in ` + conf.HTRACED_CONF_DIR + `, we will use that configuration; otherwise,
+the defaults will be used.
+`
+
+func main() {
+ // Load htraced configuration
+ cnf := common.LoadApplicationConfig()
+
+ // Parse argv
+ app := kingpin.New(os.Args[0], USAGE)
+ app.Flag("Dmy.key", "Set configuration key 'my.key' to 'my.value'. Replace 'my.key' "+
+ "with any key you want to set.").Default("my.value").String()
+ addr := app.Flag("addr", "Server address.").String()
+ verbose = app.Flag("verbose", "Verbose.").Default("false").Bool()
+ version := app.Command("version", "Print the version of this program.")
+ serverInfo := app.Command("serverInfo", "Print information retrieved from an htraced server.")
+ findSpan := app.Command("findSpan", "Print information about a trace span with a given ID.")
+ findSpanId := findSpan.Arg("id", "Span ID to find. Example: 0x123456789abcdef").Required().Uint64()
+ findChildren := app.Command("findChildren", "Print out the span IDs that are children of a given span ID.")
+ parentSpanId := findChildren.Arg("id", "Span ID to print children for. Example: 0x123456789abcdef").
+ Required().Uint64()
+ childLim := findChildren.Flag("lim", "Maximum number of child IDs to print.").Default("20").Int()
+ loadFile := app.Command("loadFile", "Write whitespace-separated JSON spans from a file to the server.")
+ loadFilePath := loadFile.Arg("path",
+ "A file containing whitespace-separated span JSON.").Required().String()
+ loadJson := app.Command("load", "Write JSON spans from the command-line to the server.")
+ loadJsonArg := loadJson.Arg("json", "A JSON span to write to the server.").Required().String()
+ dumpAll := app.Command("dumpAll", "Dump all spans from the htraced daemon.")
+ dumpAllOutPath := dumpAll.Arg("path", "The path to dump the trace spans to.").Default("-").String()
+ dumpAllLim := dumpAll.Flag("lim", "The number of spans to transfer from the server at once.").
+ Default("100").Int()
+ graph := app.Command("graph", "Visualize span JSON as a graph.")
+ graphJsonFile := graph.Arg("input", "The JSON file to load").Required().String()
+ graphDotFile := graph.Flag("output",
+ "The path to write a GraphViz dotfile to. This file can be used as input to "+
+ "GraphViz, in order to generate a pretty picture. See graphviz.org for more "+
+ "information about generating pictures of graphs.").Default("-").String()
+ query := app.Command("query", "Send a query to htraced.")
+ queryLim := query.Flag("lim", "Maximum number of spans to retrieve.").Default("20").Int()
+ queryArg := query.Arg("query", "The query string to send. Query strings have the format "+
+ "[TYPE] [OPERATOR] [CONST], joined by AND statements.").Required().String()
+ rawQuery := app.Command("rawQuery", "Send a raw JSON query to htraced.")
+ rawQueryArg := query.Arg("json", "The query JSON to send.").Required().String()
+ cmd := kingpin.MustParse(app.Parse(os.Args[1:]))
+
+ // Add the command-line settings into the configuration.
+ if *addr != "" {
+ cnf = cnf.Clone(conf.HTRACE_WEB_ADDRESS, *addr)
+ }
+
+ // Handle commands that don't require an HTrace client.
+ switch cmd {
+ case version.FullCommand():
+ os.Exit(printVersion())
+ case graph.FullCommand():
+ err := jsonSpanFileToDotFile(*graphJsonFile, *graphDotFile)
+ if err != nil {
+ fmt.Printf("graphing error: %s\n", err.Error())
+ os.Exit(EXIT_FAILURE)
+ }
+ os.Exit(EXIT_SUCCESS)
+ }
+
+ // Create HTrace client
+ hcl, err := htrace.NewClient(cnf)
+ if err != nil {
+ fmt.Printf("Failed to create HTrace client: %s\n", err.Error())
+ os.Exit(EXIT_FAILURE)
+ }
+
+ // Handle commands that require an HTrace client.
+ switch cmd {
+ case version.FullCommand():
+ os.Exit(printVersion())
+ case serverInfo.FullCommand():
+ os.Exit(printServerInfo(hcl))
+ case findSpan.FullCommand():
+ os.Exit(doFindSpan(hcl, common.SpanId(*findSpanId)))
+ case findChildren.FullCommand():
+ os.Exit(doFindChildren(hcl, common.SpanId(*parentSpanId), *childLim))
+ case loadJson.FullCommand():
+ os.Exit(doLoadSpanJson(hcl, *loadJsonArg))
+ case loadFile.FullCommand():
+ os.Exit(doLoadSpanJsonFile(hcl, *loadFilePath))
+ case dumpAll.FullCommand():
+ err := doDumpAll(hcl, *dumpAllOutPath, *dumpAllLim)
+ if err != nil {
+ fmt.Printf("dumpAll error: %s\n", err.Error())
+ os.Exit(EXIT_FAILURE)
+ }
+ os.Exit(EXIT_SUCCESS)
+ case query.FullCommand():
+ err := doQueryFromString(hcl, *queryArg, *queryLim)
+ if err != nil {
+ fmt.Printf("query error: %s\n", err.Error())
+ os.Exit(EXIT_FAILURE)
+ }
+ os.Exit(EXIT_SUCCESS)
+ case rawQuery.FullCommand():
+ err := doRawQuery(hcl, *rawQueryArg)
+ if err != nil {
+ fmt.Printf("raw query error: %s\n", err.Error())
+ os.Exit(EXIT_FAILURE)
+ }
+ os.Exit(EXIT_SUCCESS)
+ }
+
+ app.UsageErrorf(os.Stderr, "You must supply a command to run.")
+}
+
+// Print the version of the htrace binary.
+func printVersion() int {
+ fmt.Printf("Running htrace command version %s.\n", RELEASE_VERSION)
+ return EXIT_SUCCESS
+}
+
+// Print information retrieved from an htraced server via /server/info
+func printServerInfo(hcl *htrace.Client) int {
+ info, err := hcl.GetServerInfo()
+ if err != nil {
+ fmt.Println(err.Error())
+ return EXIT_FAILURE
+ }
+ fmt.Printf("HTraced server version %s (%s)\n", info.ReleaseVersion, info.GitVersion)
+ return EXIT_SUCCESS
+}
+
+// Print information about a trace span.
+func doFindSpan(hcl *htrace.Client, sid common.SpanId) int {
+ span, err := hcl.FindSpan(sid)
+ if err != nil {
+ fmt.Println(err.Error())
+ return EXIT_FAILURE
+ }
+ if span == nil {
+ fmt.Printf("Span ID not found.\n")
+ return EXIT_FAILURE
+ }
+ pbuf, err := json.MarshalIndent(span, "", " ")
+ if err != nil {
+ fmt.Printf("Error: error pretty-printing span to JSON: %s\n", err.Error())
+ return EXIT_FAILURE
+ }
+ fmt.Printf("%s\n", string(pbuf))
+ return EXIT_SUCCESS
+}
+
+func doLoadSpanJsonFile(hcl *htrace.Client, spanFile string) int {
+ if spanFile == "" {
+ fmt.Printf("You must specify the json file to load.\n")
+ return EXIT_FAILURE
+ }
+ file, err := OpenInputFile(spanFile)
+ if err != nil {
+ fmt.Printf("Failed to open %s: %s\n", spanFile, err.Error())
+ return EXIT_FAILURE
+ }
+ defer file.Close()
+ return doLoadSpans(hcl, bufio.NewReader(file))
+}
+
+func doLoadSpanJson(hcl *htrace.Client, spanJson string) int {
+ return doLoadSpans(hcl, bytes.NewBufferString(spanJson))
+}
+
+func doLoadSpans(hcl *htrace.Client, reader io.Reader) int {
+ dec := json.NewDecoder(reader)
+ spans := make([]*common.Span, 0, 32)
+ var err error
+ for {
+ var span common.Span
+ if err = dec.Decode(&span); err != nil {
+ if err == io.EOF {
+ break
+ }
+ fmt.Printf("Failed to decode JSON: %s\n", err.Error())
+ return EXIT_FAILURE
+ }
+ spans = append(spans, &span)
+ }
+ if *verbose {
+ fmt.Printf("Writing ")
+ prefix := ""
+ for i := range spans {
+ fmt.Printf("%s%s", prefix, spans[i].ToJson())
+ prefix = ", "
+ }
+ fmt.Printf("\n")
+ }
+ err = hcl.WriteSpans(&common.WriteSpansReq{
+ Spans: spans,
+ })
+ if err != nil {
+ fmt.Println(err.Error())
+ return EXIT_FAILURE
+ }
+ return EXIT_SUCCESS
+}
+
+// Find information about the children of a span.
+func doFindChildren(hcl *htrace.Client, sid common.SpanId, lim int) int {
+ spanIds, err := hcl.FindChildren(sid, lim)
+ if err != nil {
+ fmt.Printf("%s\n", err.Error())
+ return EXIT_FAILURE
+ }
+ pbuf, err := json.MarshalIndent(spanIds, "", " ")
+ if err != nil {
+ fmt.Println("Error: error pretty-printing span IDs to JSON: %s", err.Error())
+ return 1
+ }
+ fmt.Printf("%s\n", string(pbuf))
+ return 0
+}
+
+// Dump all spans from the htraced daemon.
+func doDumpAll(hcl *htrace.Client, outPath string, lim int) error {
+ file, err := CreateOutputFile(outPath)
+ if err != nil {
+ return err
+ }
+ w := bufio.NewWriter(file)
+ defer func() {
+ if file != nil {
+ w.Flush()
+ file.Close()
+ }
+ }()
+ out := make(chan *common.Span, 50)
+ var dumpErr error
+ go func() {
+ dumpErr = hcl.DumpAll(lim, out)
+ }()
+ var numSpans int64
+ nextLogTime := time.Now().Add(time.Second * 5)
+ for {
+ span, channelOpen := <-out
+ if !channelOpen {
+ break
+ }
+ if err == nil {
+ _, err = fmt.Fprintf(w, "%s\n", span.ToJson())
+ }
+ if *verbose {
+ numSpans++
+ now := time.Now()
+ if !now.Before(nextLogTime) {
+ nextLogTime = now.Add(time.Second * 5)
+ fmt.Printf("received %d span(s)...\n", numSpans)
+ }
+ }
+ }
+ if err != nil {
+ return errors.New(fmt.Sprintf("Write error %s", err.Error()))
+ }
+ if dumpErr != nil {
+ return errors.New(fmt.Sprintf("Dump error %s", dumpErr.Error()))
+ }
+ err = w.Flush()
+ if err != nil {
+ return err
+ }
+ err = file.Close()
+ file = nil
+ if err != nil {
+ return err
+ }
+ return nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/file.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/file.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/file.go
new file mode 100644
index 0000000..ea214be
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/file.go
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bufio"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "org/apache/htrace/common"
+ "os"
+)
+
+// A file used for input.
+// Transparently supports using stdin for input.
+type InputFile struct {
+ *os.File
+ path string
+}
+
+// Open an input file. Stdin will be used when path is -
+func OpenInputFile(path string) (*InputFile, error) {
+ if path == "-" {
+ return &InputFile{File: os.Stdin, path: path}, nil
+ }
+ file, err := os.Open(path)
+ if err != nil {
+ return nil, err
+ }
+ return &InputFile{File: file, path: path}, nil
+}
+
+func (file *InputFile) Close() {
+ if file.path != "-" {
+ file.File.Close()
+ }
+}
+
+// A file used for output.
+// Transparently supports using stdout for output.
+type OutputFile struct {
+ *os.File
+ path string
+}
+
+// Create an output file. Stdout will be used when path is -
+func CreateOutputFile(path string) (*OutputFile, error) {
+ if path == "-" {
+ return &OutputFile{File: os.Stdout, path: path}, nil
+ }
+ file, err := os.Create(path)
+ if err != nil {
+ return nil, err
+ }
+ return &OutputFile{File: file, path: path}, nil
+}
+
+func (file *OutputFile) Close() error {
+ if file.path != "-" {
+ return file.File.Close()
+ }
+ return nil
+}
+
+// FailureDeferringWriter is a writer which allows us to call Printf multiple
+// times and then check if all the printfs succeeded at the very end, rather
+// than checking after each call. We will not attempt to write more data
+// after the first write failure.
+type FailureDeferringWriter struct {
+ io.Writer
+ err error
+}
+
+func NewFailureDeferringWriter(writer io.Writer) *FailureDeferringWriter {
+ return &FailureDeferringWriter{writer, nil}
+}
+
+func (w *FailureDeferringWriter) Printf(format string, v ...interface{}) {
+ if w.err != nil {
+ return
+ }
+ str := fmt.Sprintf(format, v...)
+ _, err := w.Writer.Write([]byte(str))
+ if err != nil {
+ w.err = err
+ }
+}
+
+func (w *FailureDeferringWriter) Error() error {
+ return w.err
+}
+
+// Read a file full of whitespace-separated span JSON into a slice of spans.
+func readSpansFile(path string) (common.SpanSlice, error) {
+ file, err := OpenInputFile(path)
+ if err != nil {
+ return nil, err
+ }
+ defer file.Close()
+ return readSpans(bufio.NewReader(file))
+}
+
+// Read whitespace-separated span JSON into a slice of spans.
+func readSpans(reader io.Reader) (common.SpanSlice, error) {
+ spans := make(common.SpanSlice, 0)
+ dec := json.NewDecoder(reader)
+ for {
+ var span common.Span
+ err := dec.Decode(&span)
+ if err != nil {
+ if err != io.EOF {
+ return nil, errors.New(fmt.Sprintf("Decode error after decoding %d "+
+ "span(s): %s", len(spans), err.Error()))
+ }
+ break
+ }
+ spans = append(spans, &span)
+ }
+ return spans, nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/file_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/file_test.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/file_test.go
new file mode 100644
index 0000000..b6f9cac
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/file_test.go
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "errors"
+ "io"
+ "io/ioutil"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "org/apache/htrace/test"
+ "os"
+ "strings"
+ "testing"
+)
+
+func TestInputFileAndOutputFile(t *testing.T) {
+ tdir, err := ioutil.TempDir(os.TempDir(), "TestInputFileAndOutputFile")
+ if err != nil {
+ t.Fatalf("failed to create TempDir: %s\n", err.Error())
+ }
+ defer os.RemoveAll(tdir)
+ tpath := tdir + conf.PATH_SEP + "test"
+ var ofile *OutputFile
+ ofile, err = CreateOutputFile(tpath)
+ if err != nil {
+ t.Fatalf("failed to create OutputFile at %s: %s\n", tpath, err.Error())
+ }
+ defer func() {
+ if ofile != nil {
+ ofile.Close()
+ }
+ }()
+ w := NewFailureDeferringWriter(ofile)
+ w.Printf("Hello, world!\n")
+ w.Printf("2 + 2 = %d\n", 4)
+ if w.Error() != nil {
+ t.Fatalf("got unexpected error writing to %s: %s\n", tpath, w.Error().Error())
+ }
+ err = ofile.Close()
+ ofile = nil
+ if err != nil {
+ t.Fatalf("error on closing OutputFile for %s: %s\n", tpath, err.Error())
+ }
+ var ifile *InputFile
+ ifile, err = OpenInputFile(tpath)
+ defer ifile.Close()
+ expected := "Hello, world!\n2 + 2 = 4\n"
+ buf := make([]byte, len(expected))
+ _, err = io.ReadAtLeast(ifile, buf, len(buf))
+ if err != nil {
+ t.Fatalf("unexpected error on reading %s: %s\n", tpath, err.Error())
+ }
+ str := string(buf)
+ if str != expected {
+ t.Fatalf("Could not read back what we wrote to %s.\n"+
+ "Got:\n%s\nExpected:\n%s\n", tpath, str, expected)
+ }
+}
+
+type LimitedBufferWriter struct {
+ buf []byte
+ off int
+}
+
+const LIMITED_BUFFER_MESSAGE = "There isn't enough buffer to go around!"
+
+func (w *LimitedBufferWriter) Write(p []byte) (int, error) {
+ var nwritten int
+ for i := range p {
+ if w.off >= len(w.buf) {
+ return nwritten, errors.New(LIMITED_BUFFER_MESSAGE)
+ }
+ w.buf[w.off] = p[i]
+ w.off = w.off + 1
+ nwritten++
+ }
+ return nwritten, nil
+}
+
+func TestFailureDeferringWriter(t *testing.T) {
+ lw := LimitedBufferWriter{buf: make([]byte, 20), off: 0}
+ w := NewFailureDeferringWriter(&lw)
+ w.Printf("Zippity do dah #%d\n", 1)
+ w.Printf("Zippity do dah #%d\n", 2)
+ if w.Error() == nil {
+ t.Fatalf("expected FailureDeferringWriter to experience a failure due to " +
+ "limited buffer size, but it did not.")
+ }
+ if w.Error().Error() != LIMITED_BUFFER_MESSAGE {
+ t.Fatalf("expected FailureDeferringWriter to have the error message %s, but "+
+ "the message was %s\n", LIMITED_BUFFER_MESSAGE, w.Error().Error())
+ }
+ expected := "Zippity do dah #1\nZi"
+ if string(lw.buf) != expected {
+ t.Fatalf("expected LimitedBufferWriter to contain %s, but it contained %s "+
+ "instead.\n", expected, string(lw.buf))
+ }
+}
+
+func TestReadSpans(t *testing.T) {
+ SPAN_TEST_STR := `{"i":"bdd6d4ee48de59bf","s":"c0681027d3ea4928",` +
+ `"b":1424736225037,"e":1424736225901,"d":"ClientNamenodeProtocol#getFileInfo",` +
+ `"r":"FsShell","p":["60538dfb4df91418"]}
+{"i":"bdd6d4ee48de59bf","s":"60538dfb4df91418","b":1424736224969,` +
+ `"e":1424736225960,"d":"getFileInfo","r":"FsShell","p":[],"n":{"path":"/"}}
+`
+ r := strings.NewReader(SPAN_TEST_STR)
+ spans, err := readSpans(r)
+ if err != nil {
+ t.Fatalf("Failed to read spans from string via readSpans: %s\n", err.Error())
+ }
+ SPAN_TEST_EXPECTED := common.SpanSlice{
+ &common.Span{
+ Id: test.SpanId("c0681027d3ea4928"),
+ SpanData: common.SpanData{
+ TraceId: test.SpanId("bdd6d4ee48de59bf"),
+ Begin: 1424736225037,
+ End: 1424736225901,
+ Description: "ClientNamenodeProtocol#getFileInfo",
+ ProcessId: "FsShell",
+ Parents: []common.SpanId{test.SpanId("60538dfb4df91418")},
+ },
+ },
+ &common.Span{
+ Id: test.SpanId("60538dfb4df91418"),
+ SpanData: common.SpanData{
+ TraceId: test.SpanId("bdd6d4ee48de59bf"),
+ Begin: 1424736224969,
+ End: 1424736225960,
+ Description: "getFileInfo",
+ ProcessId: "FsShell",
+ Parents: []common.SpanId{},
+ Info: common.TraceInfoMap{
+ "path": "/",
+ },
+ },
+ },
+ }
+ if len(spans) != len(SPAN_TEST_EXPECTED) {
+ t.Fatalf("Expected %d spans, but got %d\n",
+ len(SPAN_TEST_EXPECTED), len(spans))
+ }
+ for i := range SPAN_TEST_EXPECTED {
+ common.ExpectSpansEqual(t, spans[i], SPAN_TEST_EXPECTED[i])
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph.go
new file mode 100644
index 0000000..dabf2df
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph.go
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bufio"
+ "errors"
+ "fmt"
+ "io"
+ "org/apache/htrace/common"
+ "os"
+ "sort"
+)
+
+// Create a dotfile from a json file.
+func jsonSpanFileToDotFile(jsonFile string, dotFile string) error {
+ spans, err := readSpansFile(jsonFile)
+ if err != nil {
+ return errors.New(fmt.Sprintf("error reading %s: %s",
+ jsonFile, err.Error()))
+ }
+ var file *OutputFile
+ file, err = CreateOutputFile(dotFile)
+ if err != nil {
+ return errors.New(fmt.Sprintf("error opening %s for write: %s",
+ dotFile, err.Error()))
+ }
+ defer func() {
+ if file != nil {
+ file.Close()
+ }
+ }()
+ writer := bufio.NewWriter(file)
+ err = spansToDot(spans, writer)
+ if err != nil {
+ return err
+ }
+ err = writer.Flush()
+ if err != nil {
+ return err
+ }
+ err = file.Close()
+ file = nil
+ return err
+}
+
+// Create output in dotfile format from a set of spans.
+func spansToDot(spans common.SpanSlice, writer io.Writer) error {
+ sort.Sort(spans)
+ idMap := make(map[common.SpanId]*common.Span)
+ for i := range spans {
+ span := spans[i]
+ if idMap[span.Id] != nil {
+ fmt.Fprintf(os.Stderr, "There were multiple spans listed which "+
+ "had ID %s.\nFirst:%s\nOther:%s\n", span.Id.String(),
+ idMap[span.Id].ToJson(), span.ToJson())
+ } else {
+ idMap[span.Id] = span
+ }
+ }
+ childMap := make(map[common.SpanId]common.SpanSlice)
+ for i := range spans {
+ child := spans[i]
+ for j := range child.Parents {
+ parent := idMap[child.Parents[j]]
+ if parent == nil {
+ fmt.Fprintf(os.Stderr, "Can't find parent id %s for %s\n",
+ child.Parents[j].String(), child.ToJson())
+ } else {
+ children := childMap[parent.Id]
+ if children == nil {
+ children = make(common.SpanSlice, 0)
+ }
+ children = append(children, child)
+ childMap[parent.Id] = children
+ }
+ }
+ }
+ w := NewFailureDeferringWriter(writer)
+ w.Printf("digraph spans {\n")
+ // Write out the nodes with their descriptions.
+ for i := range spans {
+ w.Printf(fmt.Sprintf(` "%s" [label="%s"];`+"\n",
+ spans[i].Id.String(), spans[i].Description))
+ }
+ // Write out the edges between nodes... the parent/children relationships
+ for i := range spans {
+ children := childMap[spans[i].Id]
+ sort.Sort(children)
+ if children != nil {
+ for c := range children {
+ w.Printf(fmt.Sprintf(` "%s" -> "%s";`+"\n",
+ spans[i].Id.String(), children[c].Id))
+ }
+ }
+ }
+ w.Printf("}\n")
+ return w.Error()
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph_test.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph_test.go
new file mode 100644
index 0000000..8698a98
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/graph_test.go
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bytes"
+ "org/apache/htrace/common"
+ "org/apache/htrace/test"
+ "testing"
+)
+
+func TestSpansToDot(t *testing.T) {
+ TEST_SPANS := common.SpanSlice{
+ &common.Span{
+ Id: test.SpanId("6af3cc058e5d829d"),
+ SpanData: common.SpanData{
+ TraceId: test.SpanId("0e4716fe911244de"),
+ Begin: 1424813349020,
+ End: 1424813349134,
+ Description: "newDFSInputStream",
+ ProcessId: "FsShell",
+ Parents: []common.SpanId{},
+ Info: common.TraceInfoMap{
+ "path": "/",
+ },
+ },
+ },
+ &common.Span{
+ Id: test.SpanId("75d16cc5b2c07d8a"),
+ SpanData: common.SpanData{
+ TraceId: test.SpanId("0e4716fe911244de"),
+ Begin: 1424813349025,
+ End: 1424813349133,
+ Description: "getBlockLocations",
+ ProcessId: "FsShell",
+ Parents: []common.SpanId{test.SpanId("6af3cc058e5d829d")},
+ },
+ },
+ &common.Span{
+ Id: test.SpanId("e2c7273efb280a8c"),
+ SpanData: common.SpanData{
+ TraceId: test.SpanId("0e4716fe911244de"),
+ Begin: 1424813349027,
+ End: 1424813349073,
+ Description: "ClientNamenodeProtocol#getBlockLocations",
+ ProcessId: "FsShell",
+ Parents: []common.SpanId{test.SpanId("75d16cc5b2c07d8a")},
+ },
+ },
+ }
+ w := bytes.NewBuffer(make([]byte, 0, 2048))
+ err := spansToDot(TEST_SPANS, w)
+ if err != nil {
+ t.Fatalf("spansToDot failed: error %s\n", err.Error())
+ }
+ EXPECTED_STR := `digraph spans {
+ "6af3cc058e5d829d" [label="newDFSInputStream"];
+ "75d16cc5b2c07d8a" [label="getBlockLocations"];
+ "e2c7273efb280a8c" [label="ClientNamenodeProtocol#getBlockLocations"];
+ "6af3cc058e5d829d" -> "75d16cc5b2c07d8a";
+ "75d16cc5b2c07d8a" -> "e2c7273efb280a8c";
+}
+`
+ if w.String() != EXPECTED_STR {
+ t.Fatalf("Expected to get:\n%s\nGot:\n%s\n", EXPECTED_STR, w.String())
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htrace/queries.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htrace/queries.go b/htrace-htraced/src/go/src/org/apache/htrace/htrace/queries.go
new file mode 100644
index 0000000..4ff246c
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htrace/queries.go
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ htrace "org/apache/htrace/client"
+ "org/apache/htrace/common"
+ "strings"
+ "unicode"
+)
+
+// Convert a string into a whitespace-separated sequence of strings.
+func tokenize(str string) []string {
+ prevQuote := rune(0)
+ f := func(c rune) bool {
+ switch {
+ case c == prevQuote:
+ prevQuote = rune(0)
+ return false
+ case prevQuote != rune(0):
+ return false
+ case unicode.In(c, unicode.Quotation_Mark):
+ prevQuote = c
+ return false
+ default:
+ return unicode.IsSpace(c)
+ }
+ }
+ return strings.FieldsFunc(str, f)
+}
+
+// Parses a query string in the format of a series of
+// [TYPE] [OPERATOR] [CONST] tuples, joined by AND statements.
+type predicateParser struct {
+ tokens []string
+ curToken int
+}
+
+func (ps *predicateParser) Parse() (*common.Predicate, error) {
+ if ps.curToken > len(ps.tokens) {
+ return nil, nil
+ }
+ if ps.curToken > 0 {
+ if strings.ToLower(ps.tokens[ps.curToken]) != "and" {
+ return nil, errors.New(fmt.Sprintf("Error parsing on token %d: "+
+ "expected predicates to be joined by 'and', but found '%s'",
+ ps.curToken, ps.tokens[ps.curToken]))
+ }
+ ps.curToken++
+ if ps.curToken > len(ps.tokens) {
+ return nil, errors.New(fmt.Sprintf("Nothing found after 'and' at "+
+ "token %d", ps.curToken))
+ }
+ }
+ field := common.Field(ps.tokens[ps.curToken])
+ if !field.IsValid() {
+ return nil, errors.New(fmt.Sprintf("Invalid field specifier at token %d. "+
+ "Can't understand %s. Valid field specifiers are %v", ps.curToken,
+ ps.tokens[ps.curToken], common.ValidFields()))
+ }
+ ps.curToken++
+ if ps.curToken > len(ps.tokens) {
+ return nil, errors.New(fmt.Sprintf("Nothing found after field specifier "+
+ "at token %d", ps.curToken))
+ }
+ op := common.Op(ps.tokens[ps.curToken])
+ if !op.IsValid() {
+ return nil, errors.New(fmt.Sprintf("Invalid operation specifier at token %d. "+
+ "Can't understand %s. Valid operation specifiers are %v", ps.curToken,
+ ps.tokens[ps.curToken], common.ValidOps()))
+ }
+ ps.curToken++
+ if ps.curToken > len(ps.tokens) {
+ return nil, errors.New(fmt.Sprintf("Nothing found after field specifier "+
+ "at token %d", ps.curToken))
+ }
+ val := ps.tokens[ps.curToken]
+ return &common.Predicate{Op: op, Field: field, Val: val}, nil
+}
+
+func parseQueryString(str string) ([]common.Predicate, error) {
+ ps := predicateParser{tokens: tokenize(str)}
+ preds := make([]common.Predicate, 0)
+ for {
+ pred, err := ps.Parse()
+ if pred == nil {
+ break
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ if len(preds) == 0 {
+ return nil, errors.New("Empty query string")
+ }
+ return preds, nil
+}
+
+// Send a query from a query string.
+func doQueryFromString(hcl *htrace.Client, str string, lim int) error {
+ query := &common.Query{Lim: lim}
+ var err error
+ query.Predicates, err = parseQueryString(str)
+ if err != nil {
+ return err
+ }
+ return doQuery(hcl, query)
+}
+
+// Send a query from a raw JSON string.
+func doRawQuery(hcl *htrace.Client, str string) error {
+ jsonBytes := []byte(str)
+ var query common.Query
+ err := json.Unmarshal(jsonBytes, &query)
+ if err != nil {
+ return errors.New(fmt.Sprintf("Error parsing provided JSON: %s\n", err.Error()))
+ }
+ return doQuery(hcl, &query)
+}
+
+// Send a query.
+func doQuery(hcl *htrace.Client, query *common.Query) error {
+ if *verbose {
+ qbytes, err := json.Marshal(*query)
+ if err != nil {
+ qbytes = []byte("marshaling error: " + err.Error())
+ }
+ fmt.Printf("Sending query: %s\n", string(qbytes))
+ }
+ spans, err := hcl.Query(query)
+ if err != nil {
+ return err
+ }
+ if *verbose {
+ fmt.Printf("%d results...\n", len(spans))
+ }
+ for i := range spans {
+ fmt.Printf("%s\n", spans[i].ToJson())
+ }
+ return nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/client_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/client_test.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/client_test.go
new file mode 100644
index 0000000..218c1c8
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/client_test.go
@@ -0,0 +1,206 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "fmt"
+ "math/rand"
+ htrace "org/apache/htrace/client"
+ "org/apache/htrace/common"
+ "org/apache/htrace/test"
+ "sort"
+ "testing"
+ "time"
+)
+
+func TestClientGetServerInfo(t *testing.T) {
+ htraceBld := &MiniHTracedBuilder{Name: "TestClientGetServerInfo",
+ DataDirs: make([]string, 2)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to create datastore: %s", err.Error())
+ }
+ defer ht.Close()
+ var hcl *htrace.Client
+ hcl, err = htrace.NewClient(ht.ClientConf())
+ if err != nil {
+ t.Fatalf("failed to create client: %s", err.Error())
+ }
+ _, err = hcl.GetServerInfo()
+ if err != nil {
+ t.Fatalf("failed to call GetServerInfo: %s", err.Error())
+ }
+}
+
+func createRandomTestSpans(amount int) common.SpanSlice {
+ rnd := rand.New(rand.NewSource(2))
+ allSpans := make(common.SpanSlice, amount)
+ allSpans[0] = test.NewRandomSpan(rnd, allSpans[0:0])
+ for i := 1; i < amount; i++ {
+ allSpans[i] = test.NewRandomSpan(rnd, allSpans[1:i])
+ }
+ allSpans[1].SpanData.Parents = []common.SpanId{common.SpanId(allSpans[0].Id)}
+ return allSpans
+}
+
+func TestClientOperations(t *testing.T) {
+ htraceBld := &MiniHTracedBuilder{Name: "TestClientOperations",
+ DataDirs: make([]string, 2)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to create datastore: %s", err.Error())
+ }
+ defer ht.Close()
+ var hcl *htrace.Client
+ hcl, err = htrace.NewClient(ht.ClientConf())
+ if err != nil {
+ t.Fatalf("failed to create client: %s", err.Error())
+ }
+
+ // Create some random trace spans.
+ NUM_TEST_SPANS := 30
+ allSpans := createRandomTestSpans(NUM_TEST_SPANS)
+
+ // Write half of the spans to htraced via the client.
+ err = hcl.WriteSpans(&common.WriteSpansReq{
+ Spans: allSpans[0 : NUM_TEST_SPANS/2],
+ })
+ if err != nil {
+ t.Fatalf("WriteSpans(0:%d) failed: %s\n", NUM_TEST_SPANS/2,
+ err.Error())
+ }
+
+ // Look up the first half of the spans. They should be found.
+ var span *common.Span
+ for i := 0; i < NUM_TEST_SPANS/2; i++ {
+ span, err = hcl.FindSpan(allSpans[i].Id)
+ if err != nil {
+ t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
+ }
+ common.ExpectSpansEqual(t, allSpans[i], span)
+ }
+
+ // Look up the second half of the spans. They should not be found.
+ for i := NUM_TEST_SPANS / 2; i < NUM_TEST_SPANS; i++ {
+ span, err = hcl.FindSpan(allSpans[i].Id)
+ if err != nil {
+ t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
+ }
+ if span != nil {
+ t.Fatalf("Unexpectedly found a span we never write to "+
+ "the server: FindSpan(%d) succeeded\n", i)
+ }
+ }
+
+ // Test FindChildren
+ childSpan := allSpans[1]
+ parentId := childSpan.Parents[0]
+ var children []common.SpanId
+ children, err = hcl.FindChildren(parentId, 1)
+ if err != nil {
+ t.Fatalf("FindChildren(%s) failed: %s\n", parentId, err.Error())
+ }
+ if len(children) != 1 {
+ t.Fatalf("FindChildren(%s) returned an invalid number of "+
+ "children: expected %d, got %d\n", parentId, 1, len(children))
+ }
+ if children[0] != childSpan.Id {
+ t.Fatalf("FindChildren(%s) returned an invalid child id: expected %s, "+
+ " got %s\n", parentId, childSpan.Id, children[0])
+ }
+
+ // Test FindChildren on a span that has no children
+ childlessSpan := allSpans[NUM_TEST_SPANS/2]
+ children, err = hcl.FindChildren(childlessSpan.Id, 10)
+ if err != nil {
+ t.Fatalf("FindChildren(%d) failed: %s\n", childlessSpan.Id, err.Error())
+ }
+ if len(children) != 0 {
+ t.Fatalf("FindChildren(%d) returned an invalid number of "+
+ "children: expected %d, got %d\n", childlessSpan.Id, 0, len(children))
+ }
+
+ // Test Query
+ var query common.Query
+ query = common.Query{Lim: 10}
+ spans, err := hcl.Query(&query)
+ if err != nil {
+ t.Fatalf("Query({lim: %d}) failed: %s\n", 10, err.Error())
+ }
+ if len(spans) != 10 {
+ t.Fatalf("Query({lim: %d}) returned an invalid number of "+
+ "children: expected %d, got %d\n", 10, 10, len(spans))
+ }
+}
+
+func TestDumpAll(t *testing.T) {
+ htraceBld := &MiniHTracedBuilder{Name: "TestDumpAll",
+ DataDirs: make([]string, 2)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to create datastore: %s", err.Error())
+ }
+ defer ht.Close()
+ var hcl *htrace.Client
+ hcl, err = htrace.NewClient(ht.ClientConf())
+ if err != nil {
+ t.Fatalf("failed to create client: %s", err.Error())
+ }
+
+ NUM_TEST_SPANS := 100
+ allSpans := createRandomTestSpans(NUM_TEST_SPANS)
+ sort.Sort(allSpans)
+ err = hcl.WriteSpans(&common.WriteSpansReq{
+ Spans: allSpans,
+ })
+ if err != nil {
+ t.Fatalf("WriteSpans failed: %s\n", err.Error())
+ }
+ out := make(chan *common.Span, 50)
+ var dumpErr error
+ go func() {
+ dumpErr = hcl.DumpAll(3, out)
+ }()
+ var numSpans int
+ nextLogTime := time.Now().Add(time.Millisecond * 5)
+ for {
+ span, channelOpen := <-out
+ if !channelOpen {
+ break
+ }
+ common.ExpectSpansEqual(t, allSpans[numSpans], span)
+ numSpans++
+ if testing.Verbose() {
+ now := time.Now()
+ if !now.Before(nextLogTime) {
+ nextLogTime = now
+ nextLogTime = nextLogTime.Add(time.Millisecond * 5)
+ fmt.Printf("read back %d span(s)...\n", numSpans)
+ }
+ }
+ }
+ if numSpans != len(allSpans) {
+ t.Fatalf("expected to read %d spans... but only read %d\n",
+ len(allSpans), numSpans)
+ }
+ if dumpErr != nil {
+ t.Fatalf("got dump error %s\n", dumpErr.Error())
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
new file mode 100644
index 0000000..faf23cd
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
@@ -0,0 +1,929 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bytes"
+ "encoding/gob"
+ "errors"
+ "fmt"
+ "github.com/jmhodges/levigo"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "os"
+ "strconv"
+ "strings"
+ "sync/atomic"
+)
+
+//
+// The data store code for HTraced.
+//
+// This code stores the trace spans. We use levelDB here so that we don't have to store everything
+// in memory at all times. The data is sharded across multiple levelDB databases in multiple
+// directories. Normally, these multiple directories will be on multiple disk drives.
+//
+// The main emphasis in the HTraceD data store is on quickly and efficiently storing trace span data
+// coming from many daemons. Durability is not as big a concern as in some data stores, since
+// losing a little bit of trace data if htraced goes down is not critical. We use the "gob" package
+// for serialization. We assume that there will be many more writes than reads.
+//
+// Schema
+// m -> dataStoreVersion
+// s[8-byte-big-endian-sid] -> SpanData
+// b[8-byte-big-endian-begin-time][8-byte-big-endian-child-sid] -> {}
+// e[8-byte-big-endian-end-time][8-byte-big-endian-child-sid] -> {}
+// d[8-byte-big-endian-duration][8-byte-big-endian-child-sid] -> {}
+// p[8-byte-big-endian-parent-sid][8-byte-big-endian-child-sid] -> {}
+//
+// Note that span IDs are unsigned 64-bit numbers.
+// Begin times, end times, and durations are signed 64-bit numbers.
+// In order to get LevelDB to properly compare the signed 64-bit quantities,
+// we flip the highest bit. This way, we can get leveldb to view negative
+// quantities as less than non-negative ones. This also means that we can do
+// all queries using unsigned 64-bit math, rather than having to special-case
+// the signed fields.
+//
+
+const UNKNOWN_LAYOUT_VERSION = 0
+const CURRENT_LAYOUT_VERSION = 2
+
+var EMPTY_BYTE_BUF []byte = []byte{}
+
+const VERSION_KEY = 'v'
+const SPAN_ID_INDEX_PREFIX = 's'
+const BEGIN_TIME_INDEX_PREFIX = 'b'
+const END_TIME_INDEX_PREFIX = 'e'
+const DURATION_INDEX_PREFIX = 'd'
+const PARENT_ID_INDEX_PREFIX = 'p'
+const INVALID_INDEX_PREFIX = 0
+
+type Statistics struct {
+ NumSpansWritten uint64
+}
+
+func (stats *Statistics) IncrementWrittenSpans() {
+ atomic.AddUint64(&stats.NumSpansWritten, 1)
+}
+
+// Make a copy of the statistics structure, using atomic operations.
+func (stats *Statistics) Copy() *Statistics {
+ return &Statistics{
+ NumSpansWritten: atomic.LoadUint64(&stats.NumSpansWritten),
+ }
+}
+
+// Translate a span id into a leveldb key.
+func makeKey(tag byte, sid uint64) []byte {
+ id := uint64(sid)
+ return []byte{
+ tag,
+ byte(0xff & (id >> 56)),
+ byte(0xff & (id >> 48)),
+ byte(0xff & (id >> 40)),
+ byte(0xff & (id >> 32)),
+ byte(0xff & (id >> 24)),
+ byte(0xff & (id >> 16)),
+ byte(0xff & (id >> 8)),
+ byte(0xff & (id >> 0)),
+ }
+}
+
+func keyToInt(key []byte) uint64 {
+ var id uint64
+ id = (uint64(key[0]) << 56) |
+ (uint64(key[1]) << 48) |
+ (uint64(key[2]) << 40) |
+ (uint64(key[3]) << 32) |
+ (uint64(key[4]) << 24) |
+ (uint64(key[5]) << 16) |
+ (uint64(key[6]) << 8) |
+ (uint64(key[7]) << 0)
+ return id
+}
+
+func makeSecondaryKey(tag byte, fir uint64, sec uint64) []byte {
+ return []byte{
+ tag,
+ byte(0xff & (fir >> 56)),
+ byte(0xff & (fir >> 48)),
+ byte(0xff & (fir >> 40)),
+ byte(0xff & (fir >> 32)),
+ byte(0xff & (fir >> 24)),
+ byte(0xff & (fir >> 16)),
+ byte(0xff & (fir >> 8)),
+ byte(0xff & (fir >> 0)),
+ byte(0xff & (sec >> 56)),
+ byte(0xff & (sec >> 48)),
+ byte(0xff & (sec >> 40)),
+ byte(0xff & (sec >> 32)),
+ byte(0xff & (sec >> 24)),
+ byte(0xff & (sec >> 16)),
+ byte(0xff & (sec >> 8)),
+ byte(0xff & (sec >> 0)),
+ }
+}
+
+// A single directory containing a levelDB instance.
+type shard struct {
+ // The data store that this shard is part of
+ store *dataStore
+
+ // The LevelDB instance.
+ ldb *levigo.DB
+
+ // The path to the leveldb directory this shard is managing.
+ path string
+
+ // Incoming requests to write Spans.
+ incoming chan *common.Span
+
+ // The channel we will send a bool to when we exit.
+ exited chan bool
+}
+
+// Process incoming spans for a shard.
+func (shd *shard) processIncoming() {
+ lg := shd.store.lg
+ for {
+ span := <-shd.incoming
+ if span == nil {
+ lg.Infof("Shard processor for %s exiting.\n", shd.path)
+ shd.exited <- true
+ return
+ }
+ err := shd.writeSpan(span)
+ if err != nil {
+ lg.Errorf("Shard processor for %s got fatal error %s.\n", shd.path, err.Error())
+ } else {
+ lg.Tracef("Shard processor for %s wrote span %s.\n", shd.path, span.ToJson())
+ }
+ }
+}
+
+// Convert a signed 64-bit number into an unsigned 64-bit number. We flip the
+// highest bit, so that negative input values map to unsigned numbers which are
+// less than non-negative input values.
+func s2u64(val int64) uint64 {
+ ret := uint64(val)
+ ret ^= 0x8000000000000000
+ return ret
+}
+
+func (shd *shard) writeSpan(span *common.Span) error {
+ batch := levigo.NewWriteBatch()
+ defer batch.Close()
+
+ // Add SpanData to batch.
+ spanDataBuf := new(bytes.Buffer)
+ spanDataEnc := gob.NewEncoder(spanDataBuf)
+ err := spanDataEnc.Encode(span.SpanData)
+ if err != nil {
+ return err
+ }
+ batch.Put(makeKey(SPAN_ID_INDEX_PREFIX, span.Id.Val()), spanDataBuf.Bytes())
+
+ // Add this to the parent index.
+ for parentIdx := range span.Parents {
+ batch.Put(makeSecondaryKey(PARENT_ID_INDEX_PREFIX,
+ span.Parents[parentIdx].Val(), span.Id.Val()), EMPTY_BYTE_BUF)
+ }
+
+ // Add to the other secondary indices.
+ batch.Put(makeSecondaryKey(BEGIN_TIME_INDEX_PREFIX, s2u64(span.Begin),
+ span.Id.Val()), EMPTY_BYTE_BUF)
+ batch.Put(makeSecondaryKey(END_TIME_INDEX_PREFIX, s2u64(span.End),
+ span.Id.Val()), EMPTY_BYTE_BUF)
+ batch.Put(makeSecondaryKey(DURATION_INDEX_PREFIX, s2u64(span.Duration()),
+ span.Id.Val()), EMPTY_BYTE_BUF)
+
+ err = shd.ldb.Write(shd.store.writeOpts, batch)
+ if err != nil {
+ return err
+ }
+ shd.store.stats.IncrementWrittenSpans()
+ if shd.store.WrittenSpans != nil {
+ shd.store.WrittenSpans <- span
+ }
+ return nil
+}
+
+func (shd *shard) FindChildren(sid common.SpanId, childIds []common.SpanId,
+ lim int32) ([]common.SpanId, int32, error) {
+ searchKey := makeKey('p', sid.Val())
+ iter := shd.ldb.NewIterator(shd.store.readOpts)
+ defer iter.Close()
+ iter.Seek(searchKey)
+ for {
+ if !iter.Valid() {
+ break
+ }
+ if lim == 0 {
+ break
+ }
+ key := iter.Key()
+ if !bytes.HasPrefix(key, searchKey) {
+ break
+ }
+ id := common.SpanId(keyToInt(key[9:]))
+ childIds = append(childIds, id)
+ lim--
+ iter.Next()
+ }
+ return childIds, lim, nil
+}
+
+// Close a shard.
+func (shd *shard) Close() {
+ lg := shd.store.lg
+ shd.incoming <- nil
+ lg.Infof("Waiting for %s to exit...\n", shd.path)
+ if shd.exited != nil {
+ <-shd.exited
+ }
+ shd.ldb.Close()
+ lg.Infof("Closed %s...\n", shd.path)
+}
+
+// The Data Store.
+type dataStore struct {
+ lg *common.Logger
+
+ // The shards which manage our LevelDB instances.
+ shards []*shard
+
+ // I/O statistics for all shards.
+ stats Statistics
+
+ // The read options to use for LevelDB.
+ readOpts *levigo.ReadOptions
+
+ // The write options to use for LevelDB.
+ writeOpts *levigo.WriteOptions
+
+ // If non-null, a channel we will send spans to once we finish writing them. This is only used
+ // for testing.
+ WrittenSpans chan *common.Span
+}
+
+func CreateDataStore(cnf *conf.Config, writtenSpans chan *common.Span) (*dataStore, error) {
+ // Get the configuration.
+ clearStored := cnf.GetBool(conf.HTRACE_DATA_STORE_CLEAR)
+ dirsStr := cnf.Get(conf.HTRACE_DATA_STORE_DIRECTORIES)
+ dirs := strings.Split(dirsStr, conf.PATH_LIST_SEP)
+
+ var err error
+ lg := common.NewLogger("datastore", cnf)
+ store := &dataStore{lg: lg, shards: []*shard{}, WrittenSpans: writtenSpans}
+
+ // If we return an error, close the store.
+ defer func() {
+ if err != nil {
+ store.Close()
+ store = nil
+ }
+ }()
+
+ store.readOpts = levigo.NewReadOptions()
+ store.readOpts.SetFillCache(true)
+ store.writeOpts = levigo.NewWriteOptions()
+ store.writeOpts.SetSync(false)
+
+ // Open all shards
+ for idx := range dirs {
+ path := dirs[idx] + conf.PATH_SEP + "db"
+ var shd *shard
+ shd, err = CreateShard(store, cnf, path, clearStored)
+ if err != nil {
+ lg.Errorf("Error creating shard %s: %s\n", path, err.Error())
+ return nil, err
+ }
+ store.shards = append(store.shards, shd)
+ }
+ for idx := range store.shards {
+ shd := store.shards[idx]
+ shd.exited = make(chan bool, 1)
+ go shd.processIncoming()
+ }
+ return store, nil
+}
+
+func CreateShard(store *dataStore, cnf *conf.Config, path string,
+ clearStored bool) (*shard, error) {
+ lg := store.lg
+ if clearStored {
+ fi, err := os.Stat(path)
+ if err != nil && !os.IsNotExist(err) {
+ lg.Errorf("Failed to stat %s: %s\n", path, err.Error())
+ return nil, err
+ }
+ if fi != nil {
+ err = os.RemoveAll(path)
+ if err != nil {
+ lg.Errorf("Failed to clear existing datastore directory %s: %s\n",
+ path, err.Error())
+ return nil, err
+ }
+ lg.Infof("Cleared existing datastore directory %s\n", path)
+ }
+ }
+ err := os.MkdirAll(path, 0777)
+ if err != nil {
+ lg.Errorf("Failed to MkdirAll(%s): %s\n", path, err.Error())
+ return nil, err
+ }
+ var shd *shard
+ openOpts := levigo.NewOptions()
+ defer openOpts.Close()
+ newlyCreated := false
+ ldb, err := levigo.Open(path, openOpts)
+ if err == nil {
+ store.lg.Infof("LevelDB opened %s\n", path)
+ } else {
+ store.lg.Debugf("LevelDB failed to open %s: %s\n", path, err.Error())
+ openOpts.SetCreateIfMissing(true)
+ ldb, err = levigo.Open(path, openOpts)
+ if err != nil {
+ store.lg.Errorf("LevelDB failed to create %s: %s\n", path, err.Error())
+ return nil, err
+ }
+ store.lg.Infof("Created new LevelDB instance in %s\n", path)
+ newlyCreated = true
+ }
+ defer func() {
+ if shd == nil {
+ ldb.Close()
+ }
+ }()
+ lv, err := readLayoutVersion(store, ldb)
+ if err != nil {
+ store.lg.Errorf("Got error while reading datastore version for %s: %s\n",
+ path, err.Error())
+ return nil, err
+ }
+ if newlyCreated && (lv == UNKNOWN_LAYOUT_VERSION) {
+ err = writeDataStoreVersion(store, ldb, CURRENT_LAYOUT_VERSION)
+ if err != nil {
+ store.lg.Errorf("Got error while writing datastore version for %s: %s\n",
+ path, err.Error())
+ return nil, err
+ }
+ store.lg.Tracef("Wrote layout version %d to shard at %s.\n",
+ CURRENT_LAYOUT_VERSION, path)
+ } else if lv != CURRENT_LAYOUT_VERSION {
+ versionName := "unknown"
+ if lv != UNKNOWN_LAYOUT_VERSION {
+ versionName = fmt.Sprintf("%d", lv)
+ }
+ store.lg.Errorf("Can't read old datastore. Its layout version is %s, but this "+
+ "software is at layout version %d. Please set %s to clear the datastore "+
+ "on startup, or clear it manually.\n", versionName,
+ CURRENT_LAYOUT_VERSION, conf.HTRACE_DATA_STORE_CLEAR)
+ return nil, errors.New(fmt.Sprintf("Invalid layout version: got %s, expected %d.",
+ versionName, CURRENT_LAYOUT_VERSION))
+ } else {
+ store.lg.Tracef("Found layout version %d in %s.\n", lv, path)
+ }
+ spanBufferSize := cnf.GetInt(conf.HTRACE_DATA_STORE_SPAN_BUFFER_SIZE)
+ shd = &shard{store: store, ldb: ldb, path: path,
+ incoming: make(chan *common.Span, spanBufferSize)}
+ return shd, nil
+}
+
+// Read the datastore version of a leveldb instance.
+func readLayoutVersion(store *dataStore, ldb *levigo.DB) (uint32, error) {
+ buf, err := ldb.Get(store.readOpts, []byte{VERSION_KEY})
+ if err != nil {
+ return 0, err
+ }
+ if len(buf) == 0 {
+ return 0, nil
+ }
+ r := bytes.NewBuffer(buf)
+ decoder := gob.NewDecoder(r)
+ var v uint32
+ err = decoder.Decode(&v)
+ if err != nil {
+ return 0, err
+ }
+ return v, nil
+}
+
+// Write the datastore version to a shard.
+func writeDataStoreVersion(store *dataStore, ldb *levigo.DB, v uint32) error {
+ w := new(bytes.Buffer)
+ encoder := gob.NewEncoder(w)
+ err := encoder.Encode(&v)
+ if err != nil {
+ return err
+ }
+ return ldb.Put(store.writeOpts, []byte{VERSION_KEY}, w.Bytes())
+}
+
+func (store *dataStore) GetStatistics() *Statistics {
+ return store.stats.Copy()
+}
+
+// Close the DataStore.
+func (store *dataStore) Close() {
+ for idx := range store.shards {
+ store.shards[idx].Close()
+ store.shards[idx] = nil
+ }
+ if store.readOpts != nil {
+ store.readOpts.Close()
+ store.readOpts = nil
+ }
+ if store.writeOpts != nil {
+ store.writeOpts.Close()
+ store.writeOpts = nil
+ }
+ if store.lg != nil {
+ store.lg.Close()
+ store.lg = nil
+ }
+}
+
+// Get the index of the shard which stores the given spanId.
+func (store *dataStore) getShardIndex(sid common.SpanId) int {
+ return int(sid.Val() % uint64(len(store.shards)))
+}
+
+func (store *dataStore) WriteSpan(span *common.Span) {
+ store.shards[store.getShardIndex(span.Id)].incoming <- span
+}
+
+func (store *dataStore) FindSpan(sid common.SpanId) *common.Span {
+ return store.shards[store.getShardIndex(sid)].FindSpan(sid)
+}
+
+func (shd *shard) FindSpan(sid common.SpanId) *common.Span {
+ lg := shd.store.lg
+ buf, err := shd.ldb.Get(shd.store.readOpts, makeKey('s', sid.Val()))
+ if err != nil {
+ if strings.Index(err.Error(), "NotFound:") != -1 {
+ return nil
+ }
+ lg.Warnf("Shard(%s): FindSpan(%016x) error: %s\n",
+ shd.path, sid, err.Error())
+ return nil
+ }
+ var span *common.Span
+ span, err = shd.decodeSpan(sid, buf)
+ if err != nil {
+ lg.Errorf("Shard(%s): FindSpan(%016x) decode error: %s\n",
+ shd.path, sid, err.Error())
+ return nil
+ }
+ return span
+}
+
+func (shd *shard) decodeSpan(sid common.SpanId, buf []byte) (*common.Span, error) {
+ r := bytes.NewBuffer(buf)
+ decoder := gob.NewDecoder(r)
+ data := common.SpanData{}
+ err := decoder.Decode(&data)
+ if err != nil {
+ return nil, err
+ }
+ // Gob encoding translates empty slices to nil. Reverse this so that we're always dealing with
+ // non-nil slices.
+ if data.Parents == nil {
+ data.Parents = []common.SpanId{}
+ }
+ return &common.Span{Id: common.SpanId(sid), SpanData: data}, nil
+}
+
+// Find the children of a given span id.
+func (store *dataStore) FindChildren(sid common.SpanId, lim int32) []common.SpanId {
+ childIds := make([]common.SpanId, 0)
+ var err error
+
+ startIdx := store.getShardIndex(sid)
+ idx := startIdx
+ numShards := len(store.shards)
+ for {
+ if lim == 0 {
+ break
+ }
+ shd := store.shards[idx]
+ childIds, lim, err = shd.FindChildren(sid, childIds, lim)
+ if err != nil {
+ store.lg.Errorf("Shard(%s): FindChildren(%016x) error: %s\n",
+ shd.path, sid, err.Error())
+ }
+ idx++
+ if idx >= numShards {
+ idx = 0
+ }
+ if idx == startIdx {
+ break
+ }
+ }
+ return childIds
+}
+
+type predicateData struct {
+ *common.Predicate
+ uintKey uint64
+ strKey string
+}
+
+func loadPredicateData(pred *common.Predicate) (*predicateData, error) {
+ p := predicateData{Predicate: pred}
+
+ // Parse the input value given to make sure it matches up with the field
+ // type.
+ switch pred.Field {
+ case common.SPAN_ID:
+ // Span IDs are sent as hex strings.
+ var id common.SpanId
+ if err := id.FromString(pred.Val); err != nil {
+ return nil, errors.New(fmt.Sprintf("Unable to parse span id '%s': %s",
+ pred.Val, err.Error()))
+ }
+ p.uintKey = id.Val()
+ break
+ case common.DESCRIPTION:
+ // Any string is valid for a description.
+ p.strKey = pred.Val
+ break
+ case common.BEGIN_TIME, common.END_TIME, common.DURATION:
+ // Parse a base-10 signed numeric field.
+ v, err := strconv.ParseInt(pred.Val, 10, 64)
+ if err != nil {
+ return nil, errors.New(fmt.Sprintf("Unable to parse %s '%s': %s",
+ pred.Field, pred.Val, err.Error()))
+ }
+ p.uintKey = s2u64(v)
+ break
+ default:
+ return nil, errors.New(fmt.Sprintf("Unknown field %s", pred.Field))
+ }
+
+ // Validate the predicate operation.
+ switch pred.Op {
+ case common.EQUALS, common.LESS_THAN_OR_EQUALS,
+ common.GREATER_THAN_OR_EQUALS, common.GREATER_THAN:
+ break
+ case common.CONTAINS:
+ if p.fieldIsNumeric() {
+ return nil, errors.New(fmt.Sprintf("Can't use CONTAINS on a "+
+ "numeric field like '%s'", pred.Field))
+ }
+ default:
+ return nil, errors.New(fmt.Sprintf("Unknown predicate operation '%s'",
+ pred.Op))
+ }
+
+ return &p, nil
+}
+
+// Get the index prefix for this predicate, or 0 if it is not indexed.
+func (pred *predicateData) getIndexPrefix() byte {
+ switch pred.Field {
+ case common.SPAN_ID:
+ return SPAN_ID_INDEX_PREFIX
+ case common.BEGIN_TIME:
+ return BEGIN_TIME_INDEX_PREFIX
+ case common.END_TIME:
+ return END_TIME_INDEX_PREFIX
+ case common.DURATION:
+ return DURATION_INDEX_PREFIX
+ default:
+ return INVALID_INDEX_PREFIX
+ }
+}
+
+// Returns true if the predicate type is numeric.
+func (pred *predicateData) fieldIsNumeric() bool {
+ switch pred.Field {
+ case common.SPAN_ID, common.BEGIN_TIME, common.END_TIME, common.DURATION:
+ return true
+ default:
+ return false
+ }
+}
+
+// Get the values that this predicate cares about for a given span.
+func (pred *predicateData) extractRelevantSpanData(span *common.Span) (uint64, string) {
+ switch pred.Field {
+ case common.SPAN_ID:
+ return span.Id.Val(), ""
+ case common.DESCRIPTION:
+ return 0, span.Description
+ case common.BEGIN_TIME:
+ return s2u64(span.Begin), ""
+ case common.END_TIME:
+ return s2u64(span.End), ""
+ case common.DURATION:
+ return s2u64(span.Duration()), ""
+ default:
+ panic(fmt.Sprintf("Field type %s isn't a 64-bit integer.", pred.Field))
+ }
+}
+
+func (pred *predicateData) spanPtrIsBefore(a *common.Span, b *common.Span) bool {
+ // nil is after everything.
+ if a == nil {
+ if b == nil {
+ return false
+ }
+ return false
+ } else if b == nil {
+ return true
+ }
+ // Compare the spans according to this predicate.
+ aInt, aStr := pred.extractRelevantSpanData(a)
+ bInt, bStr := pred.extractRelevantSpanData(b)
+ if pred.fieldIsNumeric() {
+ if pred.Op.IsDescending() {
+ return aInt > bInt
+ } else {
+ return aInt < bInt
+ }
+ } else {
+ if pred.Op.IsDescending() {
+ return aStr > bStr
+ } else {
+ return aStr < bStr
+ }
+ }
+}
+
+// Returns true if the predicate is satisfied by the given span.
+func (pred *predicateData) satisfiedBy(span *common.Span) bool {
+ intVal, strVal := pred.extractRelevantSpanData(span)
+ if pred.fieldIsNumeric() {
+ switch pred.Op {
+ case common.EQUALS:
+ return intVal == pred.uintKey
+ case common.LESS_THAN_OR_EQUALS:
+ return intVal <= pred.uintKey
+ case common.GREATER_THAN_OR_EQUALS:
+ return intVal >= pred.uintKey
+ case common.GREATER_THAN:
+ return intVal > pred.uintKey
+ default:
+ panic(fmt.Sprintf("unknown Op type %s should have been caught "+
+ "during normalization", pred.Op))
+ }
+ } else {
+ switch pred.Op {
+ case common.CONTAINS:
+ return strings.Contains(strVal, pred.strKey)
+ case common.EQUALS:
+ return strVal == pred.strKey
+ case common.LESS_THAN_OR_EQUALS:
+ return strVal <= pred.strKey
+ case common.GREATER_THAN_OR_EQUALS:
+ return strVal >= pred.strKey
+ case common.GREATER_THAN:
+ return strVal > pred.strKey
+ default:
+ panic(fmt.Sprintf("unknown Op type %s should have been caught "+
+ "during normalization", pred.Op))
+ }
+ }
+}
+
+func (pred *predicateData) createSource(store *dataStore) (*source, error) {
+ var ret *source
+ src := source{store: store,
+ pred: pred,
+ iters: make([]*levigo.Iterator, 0, len(store.shards)),
+ nexts: make([]*common.Span, len(store.shards)),
+ numRead: make([]int, len(store.shards)),
+ keyPrefix: pred.getIndexPrefix(),
+ }
+ if src.keyPrefix == INVALID_INDEX_PREFIX {
+ return nil, errors.New(fmt.Sprintf("Can't create source from unindexed "+
+ "predicate on field %s", pred.Field))
+ }
+ defer func() {
+ if ret == nil {
+ src.Close()
+ }
+ }()
+ for shardIdx := range store.shards {
+ shd := store.shards[shardIdx]
+ src.iters = append(src.iters, shd.ldb.NewIterator(store.readOpts))
+ }
+ searchKey := makeKey(src.keyPrefix, pred.uintKey)
+ for i := range src.iters {
+ src.iters[i].Seek(searchKey)
+ }
+ ret = &src
+ return ret, nil
+}
+
+// A source of spans.
+type source struct {
+ store *dataStore
+ pred *predicateData
+ iters []*levigo.Iterator
+ nexts []*common.Span
+ numRead []int
+ keyPrefix byte
+}
+
+// Return true if this operation may require skipping the first result we get back from leveldb.
+func mayRequireOneSkip(op common.Op) bool {
+ switch op {
+ // When dealing with descending predicates, the first span we read might not satisfy
+ // the predicate, even though subsequent ones will. This is because the iter.Seek()
+ // function "moves the iterator the position of the key given or, if the key doesn't
+ // exist, the next key that does exist in the database." So if we're on that "next
+ // key" it will not satisfy the predicate, but the keys previous to it might.
+ case common.LESS_THAN_OR_EQUALS:
+ return true
+ // iter.Seek basically takes us to the key which is "greater than or equal to" some
+ // value. Since we want greater than (not greater than or equal to) we may have to
+ // skip the first key.
+ case common.GREATER_THAN:
+ return true
+ }
+ return false
+}
+
+// Fill in the entry in the 'next' array for a specific shard.
+func (src *source) populateNextFromShard(shardIdx int) {
+ lg := src.store.lg
+ var err error
+ iter := src.iters[shardIdx]
+ if iter == nil {
+ lg.Debugf("Can't populate: No more entries in shard %d\n", shardIdx)
+ return // There are no more entries in this shard.
+ }
+ if src.nexts[shardIdx] != nil {
+ lg.Debugf("No need to populate shard %d\n", shardIdx)
+ return // We already have a valid entry for this shard.
+ }
+ for {
+ if !iter.Valid() {
+ lg.Debugf("Can't populate: Iterator for shard %d is no longer valid.\n", shardIdx)
+ break // Can't read past end of DB
+ }
+ src.numRead[shardIdx]++
+ key := iter.Key()
+ if !bytes.HasPrefix(key, []byte{src.keyPrefix}) {
+ lg.Debugf("Can't populate: Iterator for shard %d does not have prefix %s\n",
+ shardIdx, string(src.keyPrefix))
+ break // Can't read past end of indexed section
+ }
+ var span *common.Span
+ var sid common.SpanId
+ if src.keyPrefix == SPAN_ID_INDEX_PREFIX {
+ // The span id maps to the span itself.
+ sid = common.SpanId(keyToInt(key[1:]))
+ span, err = src.store.shards[shardIdx].decodeSpan(sid, iter.Value())
+ if err != nil {
+ lg.Debugf("Internal error decoding span %s in shard %d: %s\n",
+ sid.String(), shardIdx, err.Error())
+ break
+ }
+ } else {
+ // With a secondary index, we have to look up the span by id.
+ sid = common.SpanId(keyToInt(key[9:]))
+ span = src.store.shards[shardIdx].FindSpan(sid)
+ if span == nil {
+ lg.Debugf("Internal error rehydrating span %s in shard %d\n",
+ sid.String(), shardIdx)
+ break
+ }
+ }
+ if src.pred.Op.IsDescending() {
+ iter.Prev()
+ } else {
+ iter.Next()
+ }
+ if src.pred.satisfiedBy(span) {
+ lg.Debugf("Populated valid span %016x from shard %d.\n", sid, shardIdx)
+ src.nexts[shardIdx] = span // Found valid entry
+ return
+ } else {
+ lg.Debugf("Span %016x from shard %d does not satisfy the predicate.\n",
+ sid, shardIdx)
+ if src.numRead[shardIdx] <= 1 && mayRequireOneSkip(src.pred.Op) {
+ continue
+ }
+ // This and subsequent entries don't satisfy predicate
+ break
+ }
+ }
+ lg.Debugf("Closing iterator for shard %d.\n", shardIdx)
+ iter.Close()
+ src.iters[shardIdx] = nil
+}
+
+func (src *source) next() *common.Span {
+ for shardIdx := range src.iters {
+ src.populateNextFromShard(shardIdx)
+ }
+ var best *common.Span
+ bestIdx := -1
+ for shardIdx := range src.iters {
+ span := src.nexts[shardIdx]
+ if src.pred.spanPtrIsBefore(span, best) {
+ best = span
+ bestIdx = shardIdx
+ }
+ }
+ if bestIdx >= 0 {
+ src.nexts[bestIdx] = nil
+ }
+ return best
+}
+
+func (src *source) Close() {
+ for i := range src.iters {
+ if src.iters[i] != nil {
+ src.iters[i].Close()
+ }
+ }
+ src.iters = nil
+}
+
+func (store *dataStore) obtainSource(preds *[]*predicateData) (*source, error) {
+ // Read spans from the first predicate that is indexed.
+ p := *preds
+ for i := range p {
+ pred := p[i]
+ if pred.getIndexPrefix() != INVALID_INDEX_PREFIX {
+ *preds = append(p[0:i], p[i+1:]...)
+ return pred.createSource(store)
+ }
+ }
+ // If there are no predicates that are indexed, read rows in order of span id.
+ spanIdPred := common.Predicate{Op: common.GREATER_THAN_OR_EQUALS,
+ Field: common.SPAN_ID,
+ Val: "0000000000000000",
+ }
+ spanIdPredData, err := loadPredicateData(&spanIdPred)
+ if err != nil {
+ return nil, err
+ }
+ return spanIdPredData.createSource(store)
+}
+
+func (store *dataStore) HandleQuery(query *common.Query) ([]*common.Span, error) {
+ lg := store.lg
+ // Parse predicate data.
+ var err error
+ preds := make([]*predicateData, len(query.Predicates))
+ for i := range query.Predicates {
+ preds[i], err = loadPredicateData(&query.Predicates[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ // Get a source of rows.
+ var src *source
+ src, err = store.obtainSource(&preds)
+ if err != nil {
+ return nil, err
+ }
+ defer src.Close()
+ lg.Debugf("HandleQuery %s: preds = %s, src = %v\n", query, preds, src)
+
+ // Filter the spans through the remaining predicates.
+ ret := make([]*common.Span, 0, 32)
+ for {
+ if len(ret) >= query.Lim {
+ break // we hit the result size limit
+ }
+ span := src.next()
+ if span == nil {
+ break // the source has no more spans to give
+ }
+ lg.Debugf("src.next returned span %s\n", span.ToJson())
+ satisfied := true
+ for predIdx := range preds {
+ if !preds[predIdx].satisfiedBy(span) {
+ satisfied = false
+ break
+ }
+ }
+ if satisfied {
+ ret = append(ret, span)
+ }
+ }
+ return ret, nil
+}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
new file mode 100644
index 0000000..79a7c4f
--- /dev/null
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
@@ -0,0 +1,445 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import (
+ "bytes"
+ "encoding/json"
+ "math/rand"
+ htrace "org/apache/htrace/client"
+ "org/apache/htrace/common"
+ "org/apache/htrace/conf"
+ "org/apache/htrace/test"
+ "os"
+ "sort"
+ "strings"
+ "testing"
+)
+
+// Test creating and tearing down a datastore.
+func TestCreateDatastore(t *testing.T) {
+ htraceBld := &MiniHTracedBuilder{Name: "TestCreateDatastore",
+ DataDirs: make([]string, 3)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to create datastore: %s", err.Error())
+ }
+ defer ht.Close()
+}
+
+var SIMPLE_TEST_SPANS []common.Span = []common.Span{
+ common.Span{Id: 1,
+ SpanData: common.SpanData{
+ Begin: 123,
+ End: 456,
+ Description: "getFileDescriptors",
+ TraceId: 999,
+ Parents: []common.SpanId{},
+ ProcessId: "firstd",
+ }},
+ common.Span{Id: 2,
+ SpanData: common.SpanData{
+ Begin: 125,
+ End: 200,
+ Description: "openFd",
+ TraceId: 999,
+ Parents: []common.SpanId{1},
+ ProcessId: "secondd",
+ }},
+ common.Span{Id: 3,
+ SpanData: common.SpanData{
+ Begin: 200,
+ End: 456,
+ Description: "passFd",
+ TraceId: 999,
+ Parents: []common.SpanId{1},
+ ProcessId: "thirdd",
+ }},
+}
+
+func createSpans(spans []common.Span, store *dataStore) {
+ for idx := range spans {
+ store.WriteSpan(&spans[idx])
+ }
+ // Wait the spans to be created
+ for i := 0; i < 3; i++ {
+ <-store.WrittenSpans
+ }
+}
+
+// Test creating a datastore and adding some spans.
+func TestDatastoreWriteAndRead(t *testing.T) {
+ t.Parallel()
+ htraceBld := &MiniHTracedBuilder{Name: "TestDatastoreWriteAndRead",
+ WrittenSpans: make(chan *common.Span, 100)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ createSpans(SIMPLE_TEST_SPANS, ht.Store)
+ if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
+ t.Fatal()
+ }
+ span := ht.Store.FindSpan(1)
+ if span == nil {
+ t.Fatal()
+ }
+ if span.Id != 1 {
+ t.Fatal()
+ }
+ common.ExpectSpansEqual(t, &SIMPLE_TEST_SPANS[0], span)
+ children := ht.Store.FindChildren(1, 1)
+ if len(children) != 1 {
+ t.Fatalf("expected 1 child, but got %d\n", len(children))
+ }
+ children = ht.Store.FindChildren(1, 2)
+ if len(children) != 2 {
+ t.Fatalf("expected 2 children, but got %d\n", len(children))
+ }
+ sort.Sort(common.SpanIdSlice(children))
+ if children[0] != 2 {
+ t.Fatal()
+ }
+ if children[1] != 3 {
+ t.Fatal()
+ }
+}
+
+func testQuery(t *testing.T, ht *MiniHTraced, query *common.Query,
+ expectedSpans []common.Span) {
+ spans, err := ht.Store.HandleQuery(query)
+ if err != nil {
+ t.Fatalf("First query failed: %s\n", err.Error())
+ }
+ expectedBuf := new(bytes.Buffer)
+ dec := json.NewEncoder(expectedBuf)
+ err = dec.Encode(expectedSpans)
+ if err != nil {
+ t.Fatalf("Failed to encode expectedSpans to JSON: %s\n", err.Error())
+ }
+ spansBuf := new(bytes.Buffer)
+ dec = json.NewEncoder(spansBuf)
+ err = dec.Encode(spans)
+ if err != nil {
+ t.Fatalf("Failed to encode result spans to JSON: %s\n", err.Error())
+ }
+ t.Logf("len(spans) = %d, len(expectedSpans) = %d\n", len(spans),
+ len(expectedSpans))
+ common.ExpectStrEqual(t, string(expectedBuf.Bytes()), string(spansBuf.Bytes()))
+}
+
+// Test queries on the datastore.
+func TestSimpleQuery(t *testing.T) {
+ t.Parallel()
+ htraceBld := &MiniHTracedBuilder{Name: "TestSimpleQuery",
+ WrittenSpans: make(chan *common.Span, 100)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ createSpans(SIMPLE_TEST_SPANS, ht.Store)
+ if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
+ t.Fatal()
+ }
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.GREATER_THAN_OR_EQUALS,
+ Field: common.BEGIN_TIME,
+ Val: "125",
+ },
+ },
+ Lim: 5,
+ }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
+}
+
+func TestQueries2(t *testing.T) {
+ t.Parallel()
+ htraceBld := &MiniHTracedBuilder{Name: "TestQueries2",
+ WrittenSpans: make(chan *common.Span, 100)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ createSpans(SIMPLE_TEST_SPANS, ht.Store)
+ if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
+ t.Fatal()
+ }
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.LESS_THAN_OR_EQUALS,
+ Field: common.BEGIN_TIME,
+ Val: "125",
+ },
+ },
+ Lim: 5,
+ }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[0]})
+
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.LESS_THAN_OR_EQUALS,
+ Field: common.BEGIN_TIME,
+ Val: "125",
+ },
+ common.Predicate{
+ Op: common.EQUALS,
+ Field: common.DESCRIPTION,
+ Val: "getFileDescriptors",
+ },
+ },
+ Lim: 2,
+ }, []common.Span{SIMPLE_TEST_SPANS[0]})
+
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.EQUALS,
+ Field: common.DESCRIPTION,
+ Val: "getFileDescriptors",
+ },
+ },
+ Lim: 2,
+ }, []common.Span{SIMPLE_TEST_SPANS[0]})
+}
+
+func TestQueries3(t *testing.T) {
+ t.Parallel()
+ htraceBld := &MiniHTracedBuilder{Name: "TestQueries3",
+ WrittenSpans: make(chan *common.Span, 100)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ createSpans(SIMPLE_TEST_SPANS, ht.Store)
+ if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
+ t.Fatal()
+ }
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.CONTAINS,
+ Field: common.DESCRIPTION,
+ Val: "Fd",
+ },
+ common.Predicate{
+ Op: common.GREATER_THAN_OR_EQUALS,
+ Field: common.BEGIN_TIME,
+ Val: "100",
+ },
+ },
+ Lim: 5,
+ }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
+
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.LESS_THAN_OR_EQUALS,
+ Field: common.SPAN_ID,
+ Val: "0",
+ },
+ },
+ Lim: 200,
+ }, []common.Span{})
+
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.LESS_THAN_OR_EQUALS,
+ Field: common.SPAN_ID,
+ Val: "2",
+ },
+ },
+ Lim: 200,
+ }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[0]})
+}
+
+func TestQueries4(t *testing.T) {
+ t.Parallel()
+ htraceBld := &MiniHTracedBuilder{Name: "TestQueries4",
+ WrittenSpans: make(chan *common.Span, 100)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ createSpans(SIMPLE_TEST_SPANS, ht.Store)
+ if ht.Store.GetStatistics().NumSpansWritten < uint64(len(SIMPLE_TEST_SPANS)) {
+ t.Fatal()
+ }
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.GREATER_THAN,
+ Field: common.BEGIN_TIME,
+ Val: "125",
+ },
+ },
+ Lim: 5,
+ }, []common.Span{SIMPLE_TEST_SPANS[2]})
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.GREATER_THAN_OR_EQUALS,
+ Field: common.DESCRIPTION,
+ Val: "openFd",
+ },
+ },
+ Lim: 2,
+ }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
+ testQuery(t, ht, &common.Query{
+ Predicates: []common.Predicate{
+ common.Predicate{
+ Op: common.GREATER_THAN,
+ Field: common.DESCRIPTION,
+ Val: "openFd",
+ },
+ },
+ Lim: 2,
+ }, []common.Span{SIMPLE_TEST_SPANS[2]})
+}
+
+func BenchmarkDatastoreWrites(b *testing.B) {
+ htraceBld := &MiniHTracedBuilder{Name: "BenchmarkDatastoreWrites",
+ WrittenSpans: make(chan *common.Span, b.N)}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ panic(err)
+ }
+ defer ht.Close()
+ rnd := rand.New(rand.NewSource(1))
+ allSpans := make([]*common.Span, b.N)
+ // Write many random spans.
+ for n := 0; n < b.N; n++ {
+ span := test.NewRandomSpan(rnd, allSpans[0:n])
+ ht.Store.WriteSpan(span)
+ allSpans[n] = span
+ }
+ // Wait for all the spans to be written.
+ for n := 0; n < b.N; n++ {
+ <-ht.Store.WrittenSpans
+ }
+ spansWritten := ht.Store.GetStatistics().NumSpansWritten
+ if spansWritten < uint64(b.N) {
+ b.Fatal("incorrect statistics: expected %d spans to be written, but only got %d",
+ b.N, spansWritten)
+ }
+}
+
+func TestReloadDataStore(t *testing.T) {
+ htraceBld := &MiniHTracedBuilder{Name: "TestReloadDataStore",
+ DataDirs: make([]string, 2), KeepDataDirsOnClose: true}
+ ht, err := htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to create datastore: %s", err.Error())
+ }
+ dataDirs := make([]string, len(ht.DataDirs))
+ copy(dataDirs, ht.DataDirs)
+ defer func() {
+ if ht != nil {
+ ht.Close()
+ }
+ for i := range dataDirs {
+ os.RemoveAll(dataDirs[i])
+ }
+ }()
+ var hcl *htrace.Client
+ hcl, err = htrace.NewClient(ht.ClientConf())
+ if err != nil {
+ t.Fatalf("failed to create client: %s", err.Error())
+ }
+
+ // Create some random trace spans.
+ NUM_TEST_SPANS := 5
+ allSpans := createRandomTestSpans(NUM_TEST_SPANS)
+ err = hcl.WriteSpans(&common.WriteSpansReq{
+ Spans: allSpans,
+ })
+ if err != nil {
+ t.Fatalf("WriteSpans failed: %s\n", err.Error())
+ }
+
+ // Look up the spans we wrote.
+ var span *common.Span
+ for i := 0; i < NUM_TEST_SPANS; i++ {
+ span, err = hcl.FindSpan(allSpans[i].Id)
+ if err != nil {
+ t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
+ }
+ common.ExpectSpansEqual(t, allSpans[i], span)
+ }
+
+ ht.Close()
+ ht = nil
+
+ htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore2",
+ DataDirs: dataDirs, KeepDataDirsOnClose: true}
+ ht, err = htraceBld.Build()
+ if err != nil {
+ t.Fatalf("failed to re-create datastore: %s", err.Error())
+ }
+ hcl, err = htrace.NewClient(ht.ClientConf())
+ if err != nil {
+ t.Fatalf("failed to re-create client: %s", err.Error())
+ }
+
+ // Look up the spans we wrote earlier.
+ for i := 0; i < NUM_TEST_SPANS; i++ {
+ span, err = hcl.FindSpan(allSpans[i].Id)
+ if err != nil {
+ t.Fatalf("FindSpan(%d) failed: %s\n", i, err.Error())
+ }
+ common.ExpectSpansEqual(t, allSpans[i], span)
+ }
+
+ // Set an old datastore version number.
+ for i := range ht.Store.shards {
+ shard := ht.Store.shards[i]
+ writeDataStoreVersion(ht.Store, shard.ldb, CURRENT_LAYOUT_VERSION-1)
+ }
+ ht.Close()
+ ht = nil
+
+ htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore3",
+ DataDirs: dataDirs, KeepDataDirsOnClose: true}
+ ht, err = htraceBld.Build()
+ if err == nil {
+ t.Fatalf("expected the datastore to fail to load after setting an " +
+ "incorrect version.\n")
+ }
+ if !strings.Contains(err.Error(), "Invalid layout version") {
+ t.Fatal(`expected the loading error to contain "invalid layout version"` + "\n")
+ }
+
+ // It should work with data.store.clear set.
+ htraceBld = &MiniHTracedBuilder{Name: "TestReloadDataStore4",
+ DataDirs: dataDirs, KeepDataDirsOnClose: true,
+ Cnf: map[string]string{conf.HTRACE_DATA_STORE_CLEAR: "true"}}
+ ht, err = htraceBld.Build()
+ if err != nil {
+ t.Fatalf("expected the datastore loading to succeed after setting an "+
+ "incorrect version. But it failed with error %s\n", err.Error())
+ }
+}
[15/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
new file mode 100644
index 0000000..b6fe4e0
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}butt
on,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{fo
nt-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-
bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001
"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before
{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:
before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before
{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{
content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bel
l:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{conten
t:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphic
on-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}
.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-col
or;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 smal
l,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-r
ight{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{pad
ding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:
80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;back
ground-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-
xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col
-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.
col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pul
l-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.3333333
3%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.333
33333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{
width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{l
eft:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bo
ttom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{posit
ion:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.s
uccess>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot
>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{widt
h:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bord
ered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:
focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;o
pacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline in
put[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.in
put-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:46px;line-height:46px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-con
trol-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio
-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,
0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{wi
dth:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-g
roup-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cu
rsor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.ac
tive{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-
primary.active{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,field
set[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border
-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-colo
r:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f
;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type
=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.d
ropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.dis
abled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-
group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle
:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5
px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-
bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-a
ddon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-s
m>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,
.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus
,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px
4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.activ
e>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-
justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important;visibility:visible!important}.navbar-collapse.in{overf
low-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-ra
dius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-m
enu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-f
orm .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;paddi
ng-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color
:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@
media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:ho
ver,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{backgroun
d-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open
.dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{positi
on:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;c
ursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-c
olor:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info
[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1
{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link
{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripe
s{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%
,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background
-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,25
5,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.1
5) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:
#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-it
em.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:f
ocus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item
-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border
-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:firs
t-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbo
<TRUNCATED>
[39/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/mini_htraced.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/mini_htraced.go b/htrace-core/src/go/src/org/apache/htrace/htraced/mini_htraced.go
deleted file mode 100644
index a54f2cb..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/mini_htraced.go
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "fmt"
- "io/ioutil"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "os"
- "strings"
-)
-
-//
-// MiniHTraceD is used in unit tests to set up a daemon with certain settings.
-// It takes care of things like creating and cleaning up temporary directories.
-//
-
-// The default number of managed data directories to use.
-const DEFAULT_NUM_DATA_DIRS = 2
-
-// Builds a MiniHTraced object.
-type MiniHTracedBuilder struct {
- // The name of the MiniHTraced to build. This shows up in the test directory name and some
- // other places.
- Name string
-
- // The configuration values to use for the MiniHTraced.
- // If ths is nil, we use the default configuration for everything.
- Cnf map[string]string
-
- // The DataDirs to use. Empty entries will turn into random names.
- DataDirs []string
-
- // If true, we will keep the data dirs around after MiniHTraced#Close
- KeepDataDirsOnClose bool
-
- // If non-null, the WrittenSpans channel to use when creating the DataStore.
- WrittenSpans chan *common.Span
-}
-
-type MiniHTraced struct {
- Name string
- Cnf *conf.Config
- DataDirs []string
- Store *dataStore
- Rsv *RestServer
- Hsv *HrpcServer
- Lg *common.Logger
- KeepDataDirsOnClose bool
-}
-
-func (bld *MiniHTracedBuilder) Build() (*MiniHTraced, error) {
- var err error
- var store *dataStore
- var rsv *RestServer
- var hsv *HrpcServer
- if bld.Name == "" {
- bld.Name = "HTraceTest"
- }
- if bld.Cnf == nil {
- bld.Cnf = make(map[string]string)
- }
- if bld.DataDirs == nil {
- bld.DataDirs = make([]string, 2)
- }
- for idx := range bld.DataDirs {
- if bld.DataDirs[idx] == "" {
- bld.DataDirs[idx], err = ioutil.TempDir(os.TempDir(),
- fmt.Sprintf("%s%d", bld.Name, idx+1))
- if err != nil {
- return nil, err
- }
- }
- }
- bld.Cnf[conf.HTRACE_DATA_STORE_DIRECTORIES] =
- strings.Join(bld.DataDirs, conf.PATH_LIST_SEP)
- bld.Cnf[conf.HTRACE_WEB_ADDRESS] = ":0" // use a random port for the REST server
- bld.Cnf[conf.HTRACE_HRPC_ADDRESS] = ":0" // use a random port for the HRPC server
- bld.Cnf[conf.HTRACE_LOG_LEVEL] = "TRACE"
- cnfBld := conf.Builder{Values: bld.Cnf, Defaults: conf.DEFAULTS}
- cnf, err := cnfBld.Build()
- if err != nil {
- return nil, err
- }
- lg := common.NewLogger("mini.htraced", cnf)
- defer func() {
- if err != nil {
- if store != nil {
- store.Close()
- }
- for idx := range bld.DataDirs {
- if bld.DataDirs[idx] != "" {
- os.RemoveAll(bld.DataDirs[idx])
- }
- }
- if rsv != nil {
- rsv.Close()
- }
- lg.Infof("Failed to create MiniHTraced %s: %s\n", bld.Name, err.Error())
- lg.Close()
- }
- }()
- store, err = CreateDataStore(cnf, bld.WrittenSpans)
- if err != nil {
- return nil, err
- }
- rsv, err = CreateRestServer(cnf, store)
- if err != nil {
- return nil, err
- }
- hsv, err = CreateHrpcServer(cnf, store)
- if err != nil {
- return nil, err
- }
-
- lg.Infof("Created MiniHTraced %s\n", bld.Name)
- return &MiniHTraced{
- Name: bld.Name,
- Cnf: cnf,
- DataDirs: bld.DataDirs,
- Store: store,
- Rsv: rsv,
- Hsv: hsv,
- Lg: lg,
- KeepDataDirsOnClose: bld.KeepDataDirsOnClose,
- }, nil
-}
-
-// Return a Config object that clients can use to connect to this MiniHTraceD.
-func (ht *MiniHTraced) ClientConf() *conf.Config {
- return ht.Cnf.Clone(conf.HTRACE_WEB_ADDRESS, ht.Rsv.Addr().String(),
- conf.HTRACE_HRPC_ADDRESS, ht.Hsv.Addr().String())
-}
-
-func (ht *MiniHTraced) Close() {
- ht.Lg.Infof("Closing MiniHTraced %s\n", ht.Name)
- ht.Rsv.Close()
- ht.Store.Close()
- if !ht.KeepDataDirsOnClose {
- for idx := range ht.DataDirs {
- ht.Lg.Infof("Removing %s...\n", ht.DataDirs[idx])
- os.RemoveAll(ht.DataDirs[idx])
- }
- }
- ht.Lg.Infof("Finished closing MiniHTraced %s\n", ht.Name)
- ht.Lg.Close()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go b/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
deleted file mode 100644
index 1449802..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "github.com/gorilla/mux"
- "io"
- "net"
- "net/http"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "os"
- "path/filepath"
- "strconv"
- "strings"
-)
-
-// Set the response headers.
-func setResponseHeaders(hdr http.Header) {
- hdr.Set("Content-Type", "application/json")
-}
-
-// Write a JSON error response.
-func writeError(lg *common.Logger, w http.ResponseWriter, errCode int,
- errStr string) {
- str := strings.Replace(errStr, `"`, `'`, -1)
- lg.Info(str + "\n")
- w.WriteHeader(errCode)
- w.Write([]byte(`{ "error" : "` + str + `"}`))
-}
-
-type serverInfoHandler struct {
- lg *common.Logger
-}
-
-func (hand *serverInfoHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- setResponseHeaders(w.Header())
- version := common.ServerInfo{ReleaseVersion: RELEASE_VERSION,
- GitVersion: GIT_VERSION}
- buf, err := json.Marshal(&version)
- if err != nil {
- writeError(hand.lg, w, http.StatusInternalServerError,
- fmt.Sprintf("error marshalling ServerInfo: %s\n", err.Error()))
- return
- }
- hand.lg.Debugf("Returned serverInfo %s\n", string(buf))
- w.Write(buf)
-}
-
-type dataStoreHandler struct {
- lg *common.Logger
- store *dataStore
-}
-
-func (hand *dataStoreHandler) parseSid(w http.ResponseWriter,
- str string) (common.SpanId, bool) {
- val, err := strconv.ParseUint(str, 16, 64)
- if err != nil {
- writeError(hand.lg, w, http.StatusBadRequest,
- fmt.Sprintf("Failed to parse span ID %s: %s", str, err.Error()))
- w.Write([]byte("Error parsing : " + err.Error()))
- return 0, false
- }
- return common.SpanId(val), true
-}
-
-func (hand *dataStoreHandler) getReqField32(fieldName string, w http.ResponseWriter,
- req *http.Request) (int32, bool) {
- str := req.FormValue(fieldName)
- if str == "" {
- writeError(hand.lg, w, http.StatusBadRequest, fmt.Sprintf("No %s specified.", fieldName))
- return -1, false
- }
- val, err := strconv.ParseUint(str, 16, 32)
- if err != nil {
- writeError(hand.lg, w, http.StatusBadRequest,
- fmt.Sprintf("Error parsing %s: %s.", fieldName, err.Error()))
- return -1, false
- }
- return int32(val), true
-}
-
-type findSidHandler struct {
- dataStoreHandler
-}
-
-func (hand *findSidHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- setResponseHeaders(w.Header())
- req.ParseForm()
- vars := mux.Vars(req)
- stringSid := vars["id"]
- sid, ok := hand.parseSid(w, stringSid)
- if !ok {
- return
- }
- hand.lg.Debugf("findSidHandler(sid=%s)\n", sid.String())
- span := hand.store.FindSpan(sid)
- if span == nil {
- writeError(hand.lg, w, http.StatusNoContent,
- fmt.Sprintf("No such span as %s\n", sid.String()))
- return
- }
- w.Write(span.ToJson())
-}
-
-type findChildrenHandler struct {
- dataStoreHandler
-}
-
-func (hand *findChildrenHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- setResponseHeaders(w.Header())
- req.ParseForm()
- vars := mux.Vars(req)
- stringSid := vars["id"]
- sid, ok := hand.parseSid(w, stringSid)
- if !ok {
- return
- }
- var lim int32
- lim, ok = hand.getReqField32("lim", w, req)
- if !ok {
- return
- }
- hand.lg.Debugf("findChildrenHandler(sid=%s, lim=%d)\n", sid.String(), lim)
- children := hand.store.FindChildren(sid, lim)
- jbytes, err := json.Marshal(children)
- if err != nil {
- writeError(hand.lg, w, http.StatusInternalServerError,
- fmt.Sprintf("Error marshalling children: %s", err.Error()))
- return
- }
- w.Write(jbytes)
-}
-
-type writeSpansHandler struct {
- dataStoreHandler
-}
-
-func (hand *writeSpansHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- setResponseHeaders(w.Header())
- dec := json.NewDecoder(req.Body)
- spans := make([]*common.Span, 0, 32)
- defaultPid := req.Header.Get("htrace-pid")
- for {
- var span common.Span
- err := dec.Decode(&span)
- if err != nil {
- if err != io.EOF {
- writeError(hand.lg, w, http.StatusBadRequest,
- fmt.Sprintf("Error parsing spans: %s", err.Error()))
- return
- }
- break
- }
- if span.ProcessId == "" {
- span.ProcessId = defaultPid
- }
- spans = append(spans, &span)
- }
- hand.lg.Debugf("writeSpansHandler: received %d span(s). defaultPid = %s\n",
- len(spans), defaultPid)
- for spanIdx := range spans {
- hand.lg.Debugf("writing span %s\n", spans[spanIdx].ToJson())
- hand.store.WriteSpan(spans[spanIdx])
- }
-}
-
-type queryHandler struct {
- lg *common.Logger
- dataStoreHandler
-}
-
-func (hand *queryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- setResponseHeaders(w.Header())
- queryString := req.FormValue("query")
- if queryString == "" {
- writeError(hand.lg, w, http.StatusBadRequest, "No query provided.\n")
- return
- }
- var query common.Query
- reader := bytes.NewBufferString(queryString)
- dec := json.NewDecoder(reader)
- err := dec.Decode(&query)
- if err != nil {
- writeError(hand.lg, w, http.StatusBadRequest,
- fmt.Sprintf("Error parsing query: %s", err.Error()))
- return
- }
- var results []*common.Span
- results, err = hand.store.HandleQuery(&query)
- if err != nil {
- writeError(hand.lg, w, http.StatusInternalServerError,
- fmt.Sprintf("Internal error processing query %s: %s",
- query.String(), err.Error()))
- return
- }
- var jbytes []byte
- jbytes, err = json.Marshal(results)
- if err != nil {
- writeError(hand.lg, w, http.StatusInternalServerError,
- fmt.Sprintf("Error marshalling results: %s", err.Error()))
- return
- }
- w.Write(jbytes)
-}
-
-type logErrorHandler struct {
- lg *common.Logger
-}
-
-func (hand *logErrorHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
- hand.lg.Errorf("Got unknown request %s\n", req.RequestURI)
- writeError(hand.lg, w, http.StatusBadRequest, "Unknown request.")
-}
-
-type RestServer struct {
- listener net.Listener
- lg *common.Logger
-}
-
-func CreateRestServer(cnf *conf.Config, store *dataStore) (*RestServer, error) {
- var err error
- rsv := &RestServer{}
- rsv.listener, err = net.Listen("tcp", cnf.Get(conf.HTRACE_WEB_ADDRESS))
- if err != nil {
- return nil, err
- }
- var success bool
- defer func() {
- if !success {
- rsv.Close()
- }
- }()
- rsv.lg = common.NewLogger("rest", cnf)
-
- r := mux.NewRouter().StrictSlash(false)
-
- r.Handle("/server/info", &serverInfoHandler{lg: rsv.lg}).Methods("GET")
-
- writeSpansH := &writeSpansHandler{dataStoreHandler: dataStoreHandler{
- store: store, lg: rsv.lg}}
- r.Handle("/writeSpans", writeSpansH).Methods("POST")
-
- queryH := &queryHandler{lg: rsv.lg, dataStoreHandler: dataStoreHandler{store: store}}
- r.Handle("/query", queryH).Methods("GET")
-
- span := r.PathPrefix("/span").Subrouter()
- findSidH := &findSidHandler{dataStoreHandler: dataStoreHandler{store: store, lg: rsv.lg}}
- span.Handle("/{id}", findSidH).Methods("GET")
-
- findChildrenH := &findChildrenHandler{dataStoreHandler: dataStoreHandler{store: store,
- lg: rsv.lg}}
- span.Handle("/{id}/children", findChildrenH).Methods("GET")
-
- // Default Handler. This will serve requests for static requests.
- webdir := os.Getenv("HTRACED_WEB_DIR")
- if webdir == "" {
- webdir, err = filepath.Abs(filepath.Join(filepath.Dir(os.Args[0]), "..", "..", "web"))
-
- if err != nil {
- return nil, err
- }
- }
-
- rsv.lg.Infof("Serving static files from %s\n.", webdir)
- r.PathPrefix("/").Handler(http.FileServer(http.Dir(webdir))).Methods("GET")
-
- // Log an error message for unknown non-GET requests.
- r.PathPrefix("/").Handler(&logErrorHandler{lg: rsv.lg})
-
- go http.Serve(rsv.listener, r)
-
- rsv.lg.Infof("Started REST server on %s...\n", rsv.listener.Addr().String())
- success = true
- return rsv, nil
-}
-
-func (rsv *RestServer) Addr() net.Addr {
- return rsv.listener.Addr()
-}
-
-func (rsv *RestServer) Close() {
- rsv.listener.Close()
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/test/random.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/test/random.go b/htrace-core/src/go/src/org/apache/htrace/test/random.go
deleted file mode 100644
index d10e2f9..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/test/random.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package test
-
-import (
- "fmt"
- "math/rand"
- "org/apache/htrace/common"
-)
-
-func NonZeroRand64(rnd *rand.Rand) int64 {
- for {
- r := rnd.Int63()
- if r == 0 {
- continue
- }
- if rnd.Intn(1) != 0 {
- return -r
- }
- return r
- }
-}
-
-func NonZeroRand32(rnd *rand.Rand) int32 {
- for {
- r := rnd.Int31()
- if r == 0 {
- continue
- }
- if rnd.Intn(1) != 0 {
- return -r
- }
- return r
- }
-}
-
-// Create a random span.
-func NewRandomSpan(rnd *rand.Rand, potentialParents []*common.Span) *common.Span {
- parents := []common.SpanId{}
- if potentialParents != nil {
- parentIdx := rnd.Intn(len(potentialParents) + 1)
- if parentIdx < len(potentialParents) {
- parents = []common.SpanId{potentialParents[parentIdx].Id}
- }
- }
- return &common.Span{Id: common.SpanId(NonZeroRand64(rnd)),
- SpanData: common.SpanData{
- Begin: NonZeroRand64(rnd),
- End: NonZeroRand64(rnd),
- Description: "getFileDescriptors",
- TraceId: common.SpanId(NonZeroRand64(rnd)),
- Parents: parents,
- ProcessId: fmt.Sprintf("process%d", NonZeroRand32(rnd)),
- }}
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/go/src/org/apache/htrace/test/util.go
----------------------------------------------------------------------
diff --git a/htrace-core/src/go/src/org/apache/htrace/test/util.go b/htrace-core/src/go/src/org/apache/htrace/test/util.go
deleted file mode 100644
index cc058e0..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/test/util.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package test
-
-import (
- "org/apache/htrace/common"
-)
-
-func SpanId(str string) common.SpanId {
- var spanId common.SpanId
- err := spanId.FromString(str)
- if err != nil {
- panic(err.Error())
- }
- return spanId
-}
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/app.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/app.js b/htrace-core/src/web/app/app.js
deleted file mode 100644
index 0bc7100..0000000
--- a/htrace-core/src/web/app/app.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-window.app = new Marionette.Application();
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/models/span.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/models/span.js b/htrace-core/src/web/app/models/span.js
deleted file mode 100644
index b8dc114..0000000
--- a/htrace-core/src/web/app/models/span.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// Span model
-app.Span = Backbone.Model.extend({
- "defaults": {
- "spanId": null,
- "traceId": null,
- "processId": null,
- "parents": null,
- "description": null,
- "beginTime": 0,
- "stopTime": 0
- },
-
- shorthand: {
- "s": "spanId",
- "b": "beginTime",
- "e": "stopTime",
- "d": "description",
- "r": "processId",
- "p": "parents",
- "i": "traceId"
- },
-
- parse: function(response, options) {
- var attrs = {};
- var $this = this;
- $.each(response, function(key, value) {
- attrs[(key in $this.shorthand) ? $this.shorthand[key] : key] = value;
- });
- return attrs;
- },
-
- duration: function() {
- return this.get('stopTime') - this.get('beginTime');
- }
-});
-
-app.Spans = Backbone.PageableCollection.extend({
- model: app.Span,
- mode: "infinite",
- url: "/query",
- state: {
- pageSize: 10,
- lastSpanId: null,
- finished: false,
- predicates: []
- },
- queryParams: {
- totalPages: null,
- totalRecords: null,
- firstPage: null,
- lastPage: null,
- currentPage: null,
- pageSize: null,
- sortKey: null,
- order: null,
- directions: null,
-
- /**
- * Query parameter for htraced.
- */
- query: function() {
- var predicates = this.state.predicates.slice(0);
- var lastSpanId = this.state.lastSpanId;
-
- /**
- * Use last pulled span ID to paginate.
- * The htraced API works such that order is defined by the first predicate.
- * Adding a predicate to the end of the predicates list won't change the order.
- * Providing the predicate on spanid will filter all previous spanids.
- */
- if (lastSpanId) {
- predicates.push({
- "op": "gt",
- "field": "spanid",
- "val": lastSpanId
- });
- }
-
- return JSON.stringify({
- lim: this.state.pageSize + 1,
- pred: predicates
- });
- }
- },
-
- initialize: function() {
- this.on("reset", function(collection, response, options) {
- if (response.length == 0) {
- delete this.links[this.state.currentPage];
- this.getPreviousPage();
- }
- }, this);
- },
-
- parseLinks: function(resp, xhr) {
- this.state.finished = resp.length <= this.state.pageSize;
-
- if (this.state.finished) {
- this.state.lastSpanId = null;
- } else {
- this.state.lastSpanId = resp[this.state.pageSize - 1].s;
- }
-
- if (this.state.finished) {
- return {};
- }
-
- return {
- "next": "/query?query=" + this.queryParams.query.call(this)
- };
- },
-
- parseRecords: function(resp) {
- return resp.slice(0, 10);
- },
-
- setPredicates: function(predicates) {
- if (!$.isArray(predicates)) {
- console.error("predicates should be an array");
- return;
- }
-
- this.state.predicates = predicates;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/setup.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/setup.js b/htrace-core/src/web/app/setup.js
deleted file mode 100644
index beb06db..0000000
--- a/htrace-core/src/web/app/setup.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-var BaseView = Backbone.Marionette.LayoutView.extend({
- "el": "body",
- "regions": {
- "header": "#header",
- "app": "#app"
- }
-});
-
-var Router = Backbone.Marionette.AppRouter.extend({
- "routes": {
- "": "init",
- "!/search(?:query)": "search",
- "!/spans/:id": "span",
- "!/swimlane/:id": "swimlane",
- "!/swimlane/:id:?:lim": "swimlane"
- },
-
- "initialize": function() {
- // Collection
- this.spansCollection = new app.Spans();
- },
-
- "init": function() {
- Backbone.history.navigate("!/search", {"trigger": true});
- },
-
- "search": function(query) {
- app.root.app.show(new app.SearchView());
-
- var predicates;
-
- this.spansCollection.switchMode("infinite", {
- fetch: false,
- resetState: true
- });
-
- if (query) {
- predicates = _(query.split(";"))
- .map(function(predicate) {
- return _(predicate.split('&'))
- .reduce(function(mem, op) {
- var op = op.split('=');
- mem[op[0]] = op[1];
- return mem;
- }, {});
- });
- this.spansCollection.fullCollection.reset();
- this.spansCollection.setPredicates(predicates);
- }
- else {
- this.spansCollection.fullCollection.reset();
- this.spansCollection.setPredicates([{"op":"cn","field":"description","val":""}]);
- }
- this.spansCollection.fetch();
-
- app.root.app.currentView.controls.show(
- new app.SearchControlsView({
- "collection": this.spansCollection,
- "predicates": predicates
- }));
- app.root.app.currentView.main.show(
- new Backgrid.Grid({
- "collection": this.spansCollection,
- "columns": [{
- "label": "Begin",
- "cell": Backgrid.Cell.extend({
- className: "begin-cell",
- formatter: {
- fromRaw: function(rawData, model) {
- var beginMs = model.get("beginTime")
- return moment(beginMs).format('YYYY/MM/DD HH:mm:ss,SSS');
- },
- toRaw: function(formattedData, model) {
- return formattedData // data entry not supported for this cell
- }
- }
- }),
- "editable": false,
- "sortable": false
- }, {
- "name": "spanId",
- "label": "ID",
- "cell": "string",
- "editable": false,
- "sortable": false
- }, {
- "name": "processId",
- "label": "processId",
- "cell": "string",
- "editable": false,
- "sortable": false
- }, {
- "label": "Duration",
- "cell": Backgrid.Cell.extend({
- className: "duration-cell",
- formatter: {
- fromRaw: function(rawData, model) {
- return model.duration() + " ms"
- },
- toRaw: function(formattedData, model) {
- return formattedData // data entry not supported for this cell
- }
- }
- }),
- "editable": false,
- "sortable": false
- }, {
- "name": "description",
- "label": "Description",
- "cell": "string",
- "editable": false,
- "sortable": false
- }],
- "row": Backgrid.Row.extend({
- "events": {
- "click": "details"
- },
- "details": function() {
- Backbone.history.navigate("!/spans/" + this.model.get("spanId"), {"trigger": true});
- }
- })
- }));
- app.root.app.currentView.pagination.show(
- new Backgrid.Extension.Paginator({
- collection: this.spansCollection,
- }));
- },
-
- "span": function(id) {
- var span = this.spansCollection.findWhere({
- "spanId": id
- });
-
- if (!span) {
- Backbone.history.navigate("!/search", {"trigger": true});
- return;
- }
-
- var graphView = new app.GraphView({
- "collection": this.spansCollection,
- "id": "span-graph"
- });
-
- graphView.on("update:span", function(d) {
- app.root.app.currentView.span.show(
- new app.SpanDetailsView({
- "model": d.span
- }));
- });
-
- app.root.app.show(new app.DetailsView());
- app.root.app.currentView.content.show(graphView);
- app.root.app.currentView.content.currentView.setSpanId(id);
- },
-
- "swimlane": function(id, lim) {
- var top = new app.SwimlaneView();
- app.root.app.show(top);
- top.swimlane.show(new app.SwimlaneGraphView({
- "spanId": id,
- "lim": lim
- }));
- }
-});
-
-app.on("start", function(options) {
- app.root = new BaseView();
- app.routes = new Router();
-
- Backbone.history.start();
-});
-
-app.start();
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/views/details/details.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/details/details.js b/htrace-core/src/web/app/views/details/details.js
deleted file mode 100644
index 2f79e1b..0000000
--- a/htrace-core/src/web/app/views/details/details.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-app.DetailsView = Backbone.Marionette.LayoutView.extend({
- "template": "#details-layout-template",
- "regions": {
- "span": "div[role='complementary']",
- "content": "div[role='main']"
- }
-});
-
-app.SpanDetailsView = Backbone.Marionette.ItemView.extend({
- "className": "span",
- "template": "#span-details-template",
-
- "serializeData": function() {
- var context = {
- "span": this.model.toJSON()
- };
- context["span"]["duration"] = this.model.duration();
- return context;
- },
-
- "events": {
- "click": "swimlane"
- },
- "swimlane": function() {
- Backbone.history.navigate("!/swimlane/" + this.model.get("spanId"),
- {"trigger": true});
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/views/graph/graph.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/graph/graph.js b/htrace-core/src/web/app/views/graph/graph.js
deleted file mode 100644
index 7b4f89e..0000000
--- a/htrace-core/src/web/app/views/graph/graph.js
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-app.GraphView = Backbone.View.extend({
- initialize: function(options) {
- options = options || {};
-
- if (!options.id) {
- console.error("GraphView requires argument 'id' to uniquely identify this graph.");
- return;
- }
-
- _.bindAll(this, "render");
- this.collection.bind('change', this.render);
-
- var links = this.links = [];
- var linkTable = this.linkTable = {};
- var nodes = this.nodes = [];
- var nodeTable = this.nodeTable = {};
- var force = this.force
- = d3.layout.force().size([$(window).width(), $(window).height() * 3/4])
- .linkDistance($(window).height() / 5)
- .charge(-120)
- .gravity(0)
- ;
- force.nodes(nodes)
- .links(links);
-
- force.on("tick", function(e) {
- var root = d3.select("#" + options.id);
-
- if (!root.node()) {
- return;
- }
-
- var selectedDatum = root.select(".selected").datum();
-
- // center selected node
- root.select("svg").attr("width", $(root.node()).width());
- selectedDatum.x = root.select("svg").attr("width") / 2;
- selectedDatum.y = root.select("svg").attr("height") / 2;
-
- // Push sources up and targets down to form a weak tree.
- var k = 10 * e.alpha;
- force.links().forEach(function(d, i) {
- d.source.y -= k;
- d.target.y += k;
- });
-
- var nodes = root.selectAll(".node").data(force.nodes());
- nodes.select("circle")
- .attr("cx", function(d) { return d.x; })
- .attr("cy", function(d) { return d.y; });
- nodes.select("text")
- .attr("x", function(d) { return d.x - this.getComputedTextLength() / 2; })
- .attr("y", function(d) { return d.y; });
- root.selectAll(".link").data(force.links())
- .attr("d", function(d) {
- var start = {},
- end = {},
- angle = Math.atan2((d.target.x - d.source.x), (d.target.y - d.source.y));
- start.x = d.source.x + d.source.r * Math.sin(angle);
- end.x = d.target.x - d.source.r * Math.sin(angle);
- start.y = d.source.y + d.source.r * Math.cos(angle);
- end.y = d.target.y - d.source.r * Math.cos(angle);
- return "M" + start.x + " " + start.y
- + " L" + end.x + " " + end.y;
- });
- });
- },
-
- updateLinksAndNodes: function() {
- if (!this.spanId) {
- return;
- }
-
- var $this = this, collection = this.collection;
-
- var selectedSpan = this.collection.findWhere({
- "spanId": this.spanId
- });
-
- var findChildren = function(span) {
- var spanId = span.get("spanId");
- var spans = collection.filter(function(model) {
- return _(model.get("parents")).contains(spanId);
- });
- return _(spans).reject(function(span) {
- return span == null;
- });
- };
- var findParents = function(span) {
- var spans = _(span.get("parents")).map(function(parentSpanId) {
- return collection.findWhere({
- "spanId": parentSpanId
- });
- });
- return _(spans).reject(function(span) {
- return span == null;
- });
- };
- var spanToNode = function(span, level) {
- var table = $this.nodeTable;
- if (!(span.get("spanId") in table)) {
- table[span.get("spanId")] = {
- "name": span.get("spanId"),
- "span": span,
- "level": level,
- "group": 0,
- "x": parseInt($this.svg.attr('width')) / 2,
- "y": 250 + level * 50
- };
- $this.nodes.push(table[span.get("spanId")]);
- }
-
- return table[span.get("spanId")];
- };
- var createLink = function(source, target) {
- var table = $this.linkTable;
- var name = source.span.get("spanId") + "-" + target.span.get("spanId");
- if (!(name in table)) {
- table[name] = {
- "source": source,
- "target": target
- };
- $this.links.push(table[name]);
- }
-
- return table[name];
- };
-
- var parents = [], children = [];
- var selectedSpanNode = spanToNode(selectedSpan, 1);
-
- Array.prototype.push.apply(parents, findParents(selectedSpan));
- _(parents).each(function(span) {
- Array.prototype.push.apply(parents, findParents(span));
- createLink(spanToNode(span, 0), selectedSpanNode)
- });
-
- Array.prototype.push.apply(children, findChildren(selectedSpan));
- _(children).each(function(span) {
- Array.prototype.push.apply(children, findChildren(span));
- createLink(selectedSpanNode, spanToNode(span, 2))
- });
- },
-
- renderLinks: function(selection) {
- var path = selection.enter().append("path")
- .classed("link", true)
- .style("marker-end", "url(#suit)");
- selection.exit().remove();
- return selection;
- },
-
- renderNodes: function(selection) {
- var $this = this;
- var g = selection.enter().append("g").attr("class", "node");
- var circle = g.append("circle")
- .attr("r", function(d) {
- if (!d.radius) {
- d.r = Math.log(d.span.duration());
-
- if (d.r > app.GraphView.MAX_NODE_SIZE) {
- d.r = app.GraphView.MAX_NODE_SIZE;
- }
-
- if (d.r < app.GraphView.MIN_NODE_SIZE) {
- d.r = app.GraphView.MIN_NODE_SIZE;
- }
- }
-
- return d.r;
- });
- var text = g.append("text").text(function(d) {
- return d.span.get("description");
- });
-
- selection.exit().remove();
-
- circle.on("click", function(d) {
- $this.setSpanId(d.name);
- });
-
- selection.classed("selected", null);
- selection.filter(function(d) {
- return d.span.get("spanId") == $this.spanId;
- }).classed("selected", true);
-
- return selection;
- },
-
- setSpanId: function(spanId) {
- var $this = this;
- this.spanId = spanId;
-
- this.updateLinksAndNodes();
-
- this.renderNodes(
- this.svg.selectAll(".node")
- .data(this.force.nodes(), function(d) {
- return d.name;
- }));
-
- this.renderLinks(
- this.svg.selectAll(".link")
- .data(this.force.links(), function(d) {
- return d.source.name + "-" + d.target.name;
- }));
-
- this.force.start();
-
- Backbone.history.navigate("!/spans/" + spanId);
- this.trigger("update:span", {"span": this.collection.findWhere({
- "spanId": spanId
- })});
- },
-
- render: function() {
- this.svg = d3.select(this.$el[0]).append("svg");
- this.svg.attr("height", 500)
- .attr("width", $(window).width())
- .attr("id", this.id);
-
- // Arrows
- this.svg.append("defs").selectAll("marker")
- .data(["suit", "licensing", "resolved"])
- .enter().append("marker")
- .attr("id", function(d) { return d; })
- .attr("viewBox", "0 -5 10 10")
- .attr("refX", 25)
- .attr("refY", 0)
- .attr("markerWidth", 6)
- .attr("markerHeight", 6)
- .attr("orient", "auto")
- .append("path")
- .attr("d", "M0,-5L10,0L0,5 L10,0 L0, -5")
- .style("stroke", "#4679BD")
- .style("opacity", "0.6");
-
- return this;
- }
-});
-
-app.GraphView.MAX_NODE_SIZE = 150;
-app.GraphView.MIN_NODE_SIZE = 50;
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/views/search/field.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/search/field.js b/htrace-core/src/web/app/views/search/field.js
deleted file mode 100644
index c9f048a..0000000
--- a/htrace-core/src/web/app/views/search/field.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-app.SearchFieldView = Backbone.View.extend({
- 'className': 'search-field',
-
- 'template': _.template($("#search-field-template").html()),
-
- 'events': {
- 'change .field': 'showSearchField',
- 'click .remove-field': 'destroyField'
- },
-
- 'initialize': function(options) {
- this.options = options;
- this.field = options.field;
- },
-
- 'render': function() {
- this.$el.html(this.template({ field: this.field }));
- this.showSearchField();
- if (this.options.value) this.setValue();
- return this;
- },
-
- 'showSearchField': function() {
- // this.$el.find('.value').hide();
- // this.$el.find('.op').hide();
- // this.$el.find('label').hide();
- this.$el.find('.search-field').hide();
- switch (this.field) {
- case 'begin':
- case 'end':
- this.$el.find('.op').show();
- this.$el.find('.start-end-date-time').show();
- this.$el.find('label.start-end-date-time').text(this.field === 'begin' ? 'Begin' : 'End');
- rome(this.$el.find('#start-end-date-time')[0]);
- break;
- case 'duration':
- this.op = 'ge'
- this.$el.find('.duration').show();
- break;
- case 'description':
- this.op = 'cn'
- this.$el.find('.description').show();
- break;
- default:
- break;
- }
- },
-
- 'destroyField': function(e) {
- this.undelegateEvents();
-
- $(this.el).removeData().unbind();
-
- this.remove();
- Backbone.View.prototype.remove.call(this);
- this.options.manager.trigger('removeSearchField', [this.cid]);
- },
-
- 'addPredicate': function() {
- this.options.predicates.push(
- {
- 'op': this.op ? this.op : this.$('.op:visible').val(),
- 'field': this.field,
- 'val': this.getValue()
- }
- );
- },
-
- 'getPredicate': function() {
- return {
- 'op': this.op ? this.op : this.$('.op:visible').val(),
- 'field': this.field,
- 'val': this.getValue()
- };
- },
-
- 'getValue': function() {
- switch (this.field) {
- case 'begin':
- case 'end':
- var now = new moment();
- var datetime = new moment(this.$('input.start-end-date-time:visible').val()).unix();
- return datetime.toString();
- case 'duration':
- return this.$("input.duration:visible").val().toString();
- case 'description':
- return this.$('input.description').val();
- default:
- return '';
- }
- },
-
- 'setValue': function() {
- switch (this.field) {
- case 'begin':
- case 'end':
- this.$('select.op').val(this.options.op);
- this.$('input.start-end-date-time').val(moment.unix(this.options.value).format('YYYY-MM-DD HH:mm'));
- case 'duration':
- this.$("input.duration").val(this.options.value);
- case 'description':
- this.$('input.description').val(this.options.value);
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/views/search/search.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/search/search.js b/htrace-core/src/web/app/views/search/search.js
deleted file mode 100644
index b9acee5..0000000
--- a/htrace-core/src/web/app/views/search/search.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-app.SearchView = Backbone.Marionette.LayoutView.extend({
- "template": "#search-layout-template",
- "regions": {
- "controls": "div[role='form']",
- "main": "div[role='main']",
- "pagination": "div[role='complementary']"
- }
-});
-
-app.SearchControlsView = Backbone.Marionette.View.extend({
- "template": _.template($("#search-controls-template").html()),
- "events": {
- "click a.add-field": "addSearchField",
- "click button.search": "search",
- },
-
- "initialize": function(options) {
- this.options = options;
- this.predicates = [];
- this.searchFields = [];
- this.searchFields.push(new app.SearchFieldView({
- predicates: this.predicates,
- manager: this,
- field: 'description'
- }));
- this.on('removeSearchField', this.removeSearchField, this);
- },
-
- "render": function() {
- this.$el.html(this.template());
- this.$el.find('.search-fields').append(this.searchFields[0].render().$el);
-
- _(this.options.predicates).each(function(pred) {
- if (pred.field === 'description') {
- this.$el.find('input.description').val(pred.val);
- } else {
- this.addSearchField(pred);
- }
- }.bind(this));
-
- return this;
- },
-
- "addSearchField": function(e) {
- var target = e.target ? $(e.target) : e;
- if (e.target) $('button.field').text(target.text());
- var searchOptions = {
- predicates: this.predicates,
- manager: this,
- field: target.data ? target.data('field') : target.field,
- };
- if (!e.target) _.extend(searchOptions, { value: target.val, op: target.op})
-
- var newSearchField = new app.SearchFieldView(searchOptions);
- this.$el.find('.search-fields').append(newSearchField.render().$el);
- this.searchFields.push(newSearchField);
- },
-
- "removeSearchField": function(cid) {
- var removedFieldIndex = _(this.searchFields).indexOf(_(this.searchFields).findWhere({cid: cid}));
- this.searchFields.splice(removedFieldIndex, 1);
- },
-
- "search": function(e) {
- this.predicates = _(this.searchFields).map(function(field) {
- return field.getPredicate();
- }).filter(function(predicate) {
- return predicate.val;
- });
-
- this.searchParams = _(this.predicates).map(function(predicate) {
- return $.param(predicate);
- }).join(';');
- Backbone.history.navigate('!/search?' + this.searchParams, { trigger: false });
-
- this.collection.switchMode("infinite", {
- fetch: false,
- resetState: true
- });
-
- this.collection.fullCollection.reset();
- this.collection.setPredicates(this.predicates);
- this.collection.fetch();
- return false;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/app/views/swimlane/swimlane.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/swimlane/swimlane.js b/htrace-core/src/web/app/views/swimlane/swimlane.js
deleted file mode 100644
index 99f0b88..0000000
--- a/htrace-core/src/web/app/views/swimlane/swimlane.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-app.SwimlaneView = Backbone.Marionette.LayoutView.extend({
- "template": "#swimlane-layout-template",
- "regions": {
- "swimlane": "div[role='main']",
- }
-});
-
-app.SwimlaneGraphView = Backbone.Marionette.View.extend({
- className: "swimlane",
-
- initialize: function() {
- this.spans = this.getSpans(0, [],
- this.getJsonSync("/span/" + this.options.spanId),
- this.options.lim || "lim=100",
- this.getJsonSync);
- },
-
- onShow: function() {
- this.appendSVG(this.spans);
- },
-
- getSpans: function getSpans(depth, spans, span, lim, getJSON) {
- span.depth = depth;
- spans.push(span);
- var children = [];
- getJSON("/span/" + span.s + "/children?" + lim).forEach(function(childId) {
- children.push(getJSON("/span/" + childId));
- });
- children.sort(function(x, y) {
- return x.b < y.b ? -1 : x.b > y.b ? 1 : 0;
- });
- children.forEach(function(child) {
- spans = getSpans(depth + 1, spans, child, lim, getJSON);
- });
- return spans;
- },
-
- getJsonSync: function getJsonSync(url) {
- return $.ajax({
- type: "GET",
- url: url,
- async: false,
- dataType: "json"
- }).responseJSON;
- },
-
- appendSVG: function appendSVG(spans) {
- const height_span = 20;
- const width_span = 700;
- const size_tl = 6;
- const margin = {top: 50, bottom: 50, left: 20, right: 1000, process: 300};
-
- var height_screen = spans.length * height_span;
- var dmax = d3.max(spans, function(s) { return s.depth; });
- var tmin = d3.min(spans, function(s) { return s.b; });
- var tmax = d3.max(spans, function(s) { return s.e; });
- var xscale = d3.time.scale()
- .domain([new Date(tmin), new Date(tmax)]).range([0, width_span]);
-
- var svg = d3.select("div[role='main']").append("svg")
- .attr("id", "svg-swimlane")
- .attr("width", width_span + margin.process + margin.left + margin.right)
- .attr("height", height_screen + margin.top + margin.bottom)
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
- var bars = svg.append("g")
- .attr("id", "bars")
- .attr("width", width_span)
- .attr("height", height_screen)
- .attr("transform", "translate(" + (10 * dmax + margin.process) + ", 0)");
-
- var axis = d3.svg.axis()
- .scale(xscale)
- .orient("top")
- .tickValues(xscale.domain())
- .tickFormat(d3.time.format("%x %X.%L"))
- .tickSize(6, 3);
-
- bars.append("g").attr("class", "axis").call(axis);
-
- var span_g = bars.selectAll("g.span")
- .data(spans)
- .enter()
- .append("g")
- .attr("transform", function(s, i) {
- return "translate(0, " + (i * height_span + 5) + ")";
- })
- .classed("timeline", function(d) { return d.t; });
-
- span_g.append("text")
- .text(function(s) { return s.r; })
- .style("alignment-baseline", "hanging")
- .style("font-size", "14px")
- .attr("transform", function(s) {
- return "translate(" + (s.depth * 10 - margin.process - 10 * dmax) + ", 0)";
- });
-
- var rect_g = span_g.append("g")
- .attr("transform", function(s) {
- return "translate(" + xscale(new Date(s.b)) + ", 0)";
- });
-
- rect_g.append("rect")
- .attr("height", height_span - 1)
- .attr("width", function (s) {
- return (width_span * (s.e - s.b)) / (tmax - tmin) + 1;
- })
- .style("fill", "lightblue")
- .attr("class", "span")
-
- rect_g.append("text")
- .text(function(s){ return s.d; })
- .style("alignment-baseline", "hanging")
- .style("font-size", "14px");
-
- rect_g.append("text")
- .text(function(s){ return s.e - s.b; })
- .style("alignment-baseline", "baseline")
- .style("text-anchor", "end")
- .style("font-size", "10px")
- .attr("transform", function(s, i) { return "translate(0, 10)"; });
-
- bars.selectAll("g.timeline").selectAll("rect.timeline")
- .data(function(s) { return s.t; })
- .enter()
- .append("rect")
- .style("fill", "red")
- .attr("class", "timeline")
- .attr("height", size_tl)
- .attr("width", size_tl)
- .attr("transform", function(t) {
- return "translate(" + xscale(t.t) + "," + (height_span - 1 - size_tl) + ")";
- });
-
- var popup = d3.select("div[role='main']").append("div")
- .attr("class", "popup")
- .style("opacity", 0);
-
- bars.selectAll("g.timeline")
- .on("mouseover", function(d) {
- popup.transition().duration(300).style("opacity", .95);
- var text = "<table>";
- d.t.forEach(function (t) {
- text += "<tr><td>" + (t.t - tmin) + "</td>";
- text += "<td> : " + t.m + "</td></tr>";
- });
- text += "</table>"
- popup.html(text)
- .style("left", (document.body.scrollLeft + 50) + "px")
- .style("top", (document.body.scrollTop + 70) + "px")
- .style("width", "700px")
- .style("background", "orange")
- .style("position", "absolute");
- })
- .on("mouseout", function(d) {
- popup.transition().duration(300).style("opacity", 0);
- });
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/index.html
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/index.html b/htrace-core/src/web/index.html
deleted file mode 100644
index d403860..0000000
--- a/htrace-core/src/web/index.html
+++ /dev/null
@@ -1,196 +0,0 @@
-<!doctype html>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html lang="en-US">
- <head>
- <meta charset="utf-8">
- <title>HTrace</title>
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <!-- TODO: Add Favicon -->
- <link rel="icon" href="//favicon.ico" type="image/x-icon" sizes="16x16">
- <link href="lib/bootstrap-3.3.1/css/bootstrap.css" rel="stylesheet">
- <link href="lib/css/backgrid-0.3.5.min.css" rel="stylesheet">
- <link href="lib/css/backgrid-paginator-0.3.5.min.css" rel="stylesheet">
- <link href="lib/rome-2.1.0/rome.min.css" rel="stylesheet">
- <link href="lib/css/main.css" rel="stylesheet">
-
- <!-- TODO: Remove shiv -->
- <!--[if lt IE 9]>
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
- <![endif]-->
- </head>
- <body>
- <header id="header" role="banner">
- <nav class="navbar navbar-default navbar-static-top" role="navigation">
- <div class="container-fluid">
- <a class="navbar-brand" href="#">HTrace</a>
- </div>
- </nav>
- </header>
-
- <div id="app" class="container-fluid" role="application"></div>
-
- <footer></footer>
-
- <script id="search-layout-template" type="text/html">
- <div class="container-fluid" id="list" role="application">
- <div class="row">
- <div class="col-md-4" role="form"></div>
- <div class="col-md-8">
- <div class="row">
- <div class="col-md-12" role="main"></div>
- </div>
- <div class="row">
- <div class="col-md-12" role="complementary"></div>
- </div>
- </div>
- </div>
- </div>
- </script>
-
- <script id="search-controls-template" type="text/html">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Controls</h3>
- </div>
- <div class="panel-body">
- <form class="form-horizontal">
- <div class="search-fields"></div>
- <div class="form-group">
- <div class="col-sm-12">
- <div class="btn-group">
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
- Add Field <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li><a href="javascript:void(0)" class="add-field" data-field="begin">Start Date/Time</a></li>
- <li><a href="javascript:void(0)" class="add-field" data-field="end">End Date/Time</a></li>
- <li><a href="javascript:void(0)" class="add-field" data-field="duration">Duration</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-12">
- <button type="button" class="search btn btn-default">Search</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </script>
-
- <script id='search-field-template' type='text/html'>
- <div class='form-group search-field start-end-date-time'>
- <label for="start-end-date-time" class="start-end-date-time control-label col-sm-3">Date</label>
- <div class="col-sm-3">
- <select class='op form-control'>
- <option selected value='ge'>After</option>
- <option value='le'>Before</option>
- </select>
- </div>
- <div class='col-sm-5'>
- <input placeholder="Date/Time" id="start-end-date-time" class="start-end-date-time date form-control value" />
- </div>
- <button class="btn btn-link remove-field" type="button">x</button>
- </div>
- <div class='form-group search-field duration'>
- <label for="duration" class="duration control-label col-sm-3">Duration</label>
- <div class='col-sm-8'>
- <input type="text" class="duration form-control value" placeholder="Duration" />
- </div>
- <button class="btn btn-link remove-field" type="button">x</button>
- </div>
- <div class='form-group search-field description'>
- <label for="description" class="description control-label col-sm-3">Description</label>
- <div class='col-sm-8'>
- <input type="search" id="description" class="description value form-control" placeholder="Search description" />
- </div>
- </div>
- </script>
-
- <script id="details-layout-template" type="text/html">
- <div class="container-fluid" id="list" role="application">
- <div class="row">
- <div class="col-md-12" role="main"></div>
- </div>
-
- <hr>
-
- <div class="row">
- <div class="col-md-12" role="complementary"></div>
- </div>
- </div>
- </script>
-
- <script id="span-details-template" type="text/html">
- <table class="table table-condensed">
- <thead>
- <tr>
- <th>Description</th>
- <th>Span ID</th>
- <th>Process ID</th>
- <th>Start time</th>
- <th>End time</th>
- <th>Duration</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><%- span.description %></td>
- <td><%- span.spanId %></td>
- <td><%- span.processId %></td>
- <td><%- span.beginTime %></td>
- <td><%- span.stopTime %></td>
- <td><%- span.duration %></td>
- </tr>
- </tbody>
- </table>
- </script>
-
- <script id="swimlane-layout-template" type="text/html">
- <div class="container-fluid" id="list" role="application">
- <div class="row">
- <div class="col-md-12" role="main"></div>
- </div>
- </div>
- </script>
-
- <script src="lib/js/jquery-2.1.3.min.js" type="text/javascript"></script>
- <script src="lib/js/d3-3.5.5.js" type="text/javascript"></script>
- <script src="lib/bootstrap-3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
- <script src="lib/js/underscore-1.7.0.js" type="text/javascript"></script>
- <script src="lib/js/backbone-1.1.2.js" type="text/javascript"></script>
- <script src="lib/js/backbone.marionette-2.4.1.min.js" type="text/javascript"></script>
- <script src="lib/js/backbone.paginator-2.0.2.js" type="text/javascript"></script>
- <script src="lib/js/backgrid-0.3.5.js" type="text/javascript"></script>
- <script src="lib/js/backgrid-paginator-0.3.5.js" type="text/javascript"></script>
- <script src="lib/js/moment-2.9.0.min.js" type="text/javascript"></script>
- <script src="lib/rome-2.1.0/rome.standalone.min.js" type="text/javascript"></script>
-
- <script src="app/app.js" type="text/javascript"></script>
- <script src="app/models/span.js" type="text/javascript"></script>
- <script src="app/views/graph/graph.js" type="text/javascript"></script>
- <script src="app/views/search/field.js" type="text/javascript"></script>
- <script src="app/views/search/search.js" type="text/javascript"></script>
- <script src="app/views/details/details.js" type="text/javascript"></script>
- <script src="app/views/swimlane/swimlane.js" type="text/javascript"></script>
- <script src="app/setup.js" type="text/javascript"></script>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css b/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
deleted file mode 100644
index c4cadf1..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/css/bootstrap-theme.css
+++ /dev/null
@@ -1,470 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-.btn-default,
-.btn-primary,
-.btn-success,
-.btn-info,
-.btn-warning,
-.btn-danger {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
-}
-.btn-default:active,
-.btn-primary:active,
-.btn-success:active,
-.btn-info:active,
-.btn-warning:active,
-.btn-danger:active,
-.btn-default.active,
-.btn-primary.active,
-.btn-success.active,
-.btn-info.active,
-.btn-warning.active,
-.btn-danger.active {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn-default .badge,
-.btn-primary .badge,
-.btn-success .badge,
-.btn-info .badge,
-.btn-warning .badge,
-.btn-danger .badge {
- text-shadow: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
-}
-.btn-default {
- text-shadow: 0 1px 0 #fff;
- background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
- background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #dbdbdb;
- border-color: #ccc;
-}
-.btn-default:hover,
-.btn-default:focus {
- background-color: #e0e0e0;
- background-position: 0 -15px;
-}
-.btn-default:active,
-.btn-default.active {
- background-color: #e0e0e0;
- border-color: #dbdbdb;
-}
-.btn-default:disabled,
-.btn-default[disabled] {
- background-color: #e0e0e0;
- background-image: none;
-}
-.btn-primary {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
- background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #245580;
-}
-.btn-primary:hover,
-.btn-primary:focus {
- background-color: #265a88;
- background-position: 0 -15px;
-}
-.btn-primary:active,
-.btn-primary.active {
- background-color: #265a88;
- border-color: #245580;
-}
-.btn-primary:disabled,
-.btn-primary[disabled] {
- background-color: #265a88;
- background-image: none;
-}
-.btn-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #3e8f3e;
-}
-.btn-success:hover,
-.btn-success:focus {
- background-color: #419641;
- background-position: 0 -15px;
-}
-.btn-success:active,
-.btn-success.active {
- background-color: #419641;
- border-color: #3e8f3e;
-}
-.btn-success:disabled,
-.btn-success[disabled] {
- background-color: #419641;
- background-image: none;
-}
-.btn-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #28a4c9;
-}
-.btn-info:hover,
-.btn-info:focus {
- background-color: #2aabd2;
- background-position: 0 -15px;
-}
-.btn-info:active,
-.btn-info.active {
- background-color: #2aabd2;
- border-color: #28a4c9;
-}
-.btn-info:disabled,
-.btn-info[disabled] {
- background-color: #2aabd2;
- background-image: none;
-}
-.btn-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #e38d13;
-}
-.btn-warning:hover,
-.btn-warning:focus {
- background-color: #eb9316;
- background-position: 0 -15px;
-}
-.btn-warning:active,
-.btn-warning.active {
- background-color: #eb9316;
- border-color: #e38d13;
-}
-.btn-warning:disabled,
-.btn-warning[disabled] {
- background-color: #eb9316;
- background-image: none;
-}
-.btn-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #b92c28;
-}
-.btn-danger:hover,
-.btn-danger:focus {
- background-color: #c12e2a;
- background-position: 0 -15px;
-}
-.btn-danger:active,
-.btn-danger.active {
- background-color: #c12e2a;
- border-color: #b92c28;
-}
-.btn-danger:disabled,
-.btn-danger[disabled] {
- background-color: #c12e2a;
- background-image: none;
-}
-.thumbnail,
-.img-thumbnail {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- background-color: #e8e8e8;
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- background-color: #2e6da4;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.navbar-default {
- background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
- background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
- background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
-}
-.navbar-brand,
-.navbar-nav > li > a {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
-}
-.navbar-inverse {
- background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
- background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
-}
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
- background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
-}
-.navbar-inverse .navbar-brand,
-.navbar-inverse .navbar-nav > li > a {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
-}
-.navbar-static-top,
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- border-radius: 0;
-}
-@media (max-width: 767px) {
- .navbar .navbar-nav .open .dropdown-menu > .active > a,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #fff;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
- }
-}
-.alert {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
-}
-.alert-success {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
- background-repeat: repeat-x;
- border-color: #b2dba1;
-}
-.alert-info {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #9acfea;
-}
-.alert-warning {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #f5e79e;
-}
-.alert-danger {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
- background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dca7a7;
-}
-.progress {
- background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
- background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-striped {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.list-group {
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
- text-shadow: 0 -1px 0 #286090;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
- background-repeat: repeat-x;
- border-color: #2b669a;
-}
-.list-group-item.active .badge,
-.list-group-item.active:hover .badge,
-.list-group-item.active:focus .badge {
- text-shadow: none;
-}
-.panel {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
-}
-.panel-default > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-primary > .panel-heading {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-success > .panel-heading {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-info > .panel-heading {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-warning > .panel-heading {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-danger > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
- background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
- background-repeat: repeat-x;
-}
-.well {
- background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dcdcdc;
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
-}
-/*# sourceMappingURL=bootstrap-theme.css.map */
[02/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.js
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.js b/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.js
new file mode 100644
index 0000000..a27667f
--- /dev/null
+++ b/htrace-htraced/src/web/lib/rome-2.1.0/rome.standalone.js
@@ -0,0 +1,1860 @@
+/**
+ * rome - Customizable date (and time) picker. Opt-in UI, no jQuery!
+ * @version v2.1.0
+ * @link https://github.com/bevacqua/rome
+ * @license MIT
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.rome=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+ var canSetImmediate = typeof window !== 'undefined'
+ && window.setImmediate;
+ var canPost = typeof window !== 'undefined'
+ && window.postMessage && window.addEventListener
+ ;
+
+ if (canSetImmediate) {
+ return function (f) { return window.setImmediate(f) };
+ }
+
+ if (canPost) {
+ var queue = [];
+ window.addEventListener('message', function (ev) {
+ var source = ev.source;
+ if ((source === window || source === null) && ev.data === 'process-tick') {
+ ev.stopPropagation();
+ if (queue.length > 0) {
+ var fn = queue.shift();
+ fn();
+ }
+ }
+ }, true);
+
+ return function nextTick(fn) {
+ queue.push(fn);
+ window.postMessage('process-tick', '*');
+ };
+ }
+
+ return function nextTick(fn) {
+ setTimeout(fn, 0);
+ };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+}
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+
+},{}],2:[function(_dereq_,module,exports){
+module.exports = _dereq_('./src/contra.emitter.js');
+
+},{"./src/contra.emitter.js":3}],3:[function(_dereq_,module,exports){
+(function (process){
+(function (root, undefined) {
+ 'use strict';
+
+ var undef = '' + undefined;
+ function atoa (a, n) { return Array.prototype.slice.call(a, n); }
+ function debounce (fn, args, ctx) { if (!fn) { return; } tick(function run () { fn.apply(ctx || null, args || []); }); }
+
+ // cross-platform ticker
+ var si = typeof setImmediate === 'function', tick;
+ if (si) {
+ tick = function (fn) { setImmediate(fn); };
+ } else if (typeof process !== undef && process.nextTick) {
+ tick = process.nextTick;
+ } else {
+ tick = function (fn) { setTimeout(fn, 0); };
+ }
+
+ function _emitter (thing, options) {
+ var opts = options || {};
+ var evt = {};
+ if (thing === undefined) { thing = {}; }
+ thing.on = function (type, fn) {
+ if (!evt[type]) {
+ evt[type] = [fn];
+ } else {
+ evt[type].push(fn);
+ }
+ return thing;
+ };
+ thing.once = function (type, fn) {
+ fn._once = true; // thing.off(fn) still works!
+ thing.on(type, fn);
+ return thing;
+ };
+ thing.off = function (type, fn) {
+ var c = arguments.length;
+ if (c === 1) {
+ delete evt[type];
+ } else if (c === 0) {
+ evt = {};
+ } else {
+ var et = evt[type];
+ if (!et) { return thing; }
+ et.splice(et.indexOf(fn), 1);
+ }
+ return thing;
+ };
+ thing.emit = function () {
+ var args = atoa(arguments);
+ return thing.emitterSnapshot(args.shift()).apply(this, args);
+ };
+ thing.emitterSnapshot = function (type) {
+ var et = (evt[type] || []).slice(0);
+ return function () {
+ var args = atoa(arguments);
+ var ctx = this || thing;
+ if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
+ evt[type] = et.filter(function emitter (listen) {
+ if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
+ return !listen._once;
+ });
+ return thing;
+ };
+ }
+ return thing;
+ }
+
+ // cross-platform export
+ if (typeof module !== undef && module.exports) {
+ module.exports = _emitter;
+ } else {
+ root.contra = root.contra || {};
+ root.contra.emitter = _emitter;
+ }
+})(this);
+
+}).call(this,_dereq_("FWaASH"))
+},{"FWaASH":1}],4:[function(_dereq_,module,exports){
+var now = _dereq_('performance-now')
+ , global = typeof window === 'undefined' ? {} : window
+ , vendors = ['moz', 'webkit']
+ , suffix = 'AnimationFrame'
+ , raf = global['request' + suffix]
+ , caf = global['cancel' + suffix] || global['cancelRequest' + suffix]
+ , isNative = true
+
+for(var i = 0; i < vendors.length && !raf; i++) {
+ raf = global[vendors[i] + 'Request' + suffix]
+ caf = global[vendors[i] + 'Cancel' + suffix]
+ || global[vendors[i] + 'CancelRequest' + suffix]
+}
+
+// Some versions of FF have rAF but not cAF
+if(!raf || !caf) {
+ isNative = false
+
+ var last = 0
+ , id = 0
+ , queue = []
+ , frameDuration = 1000 / 60
+
+ raf = function(callback) {
+ if(queue.length === 0) {
+ var _now = now()
+ , next = Math.max(0, frameDuration - (_now - last))
+ last = next + _now
+ setTimeout(function() {
+ var cp = queue.slice(0)
+ // Clear queue here to prevent
+ // callbacks from appending listeners
+ // to the current frame's queue
+ queue.length = 0
+ for(var i = 0; i < cp.length; i++) {
+ if(!cp[i].cancelled) {
+ try{
+ cp[i].callback(last)
+ } catch(e) {
+ setTimeout(function() { throw e }, 0)
+ }
+ }
+ }
+ }, Math.round(next))
+ }
+ queue.push({
+ handle: ++id,
+ callback: callback,
+ cancelled: false
+ })
+ return id
+ }
+
+ caf = function(handle) {
+ for(var i = 0; i < queue.length; i++) {
+ if(queue[i].handle === handle) {
+ queue[i].cancelled = true
+ }
+ }
+ }
+}
+
+module.exports = function(fn) {
+ // Wrap in a new function to prevent
+ // `cancel` potentially being assigned
+ // to the native rAF function
+ if(!isNative) {
+ return raf.call(global, fn)
+ }
+ return raf.call(global, function() {
+ try{
+ fn.apply(this, arguments)
+ } catch(e) {
+ setTimeout(function() { throw e }, 0)
+ }
+ })
+}
+module.exports.cancel = function() {
+ caf.apply(global, arguments)
+}
+
+},{"performance-now":5}],5:[function(_dereq_,module,exports){
+(function (process){
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var getNanoSeconds, hrtime, loadTime;
+
+ if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
+ module.exports = function() {
+ return performance.now();
+ };
+ } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
+ module.exports = function() {
+ return (getNanoSeconds() - loadTime) / 1e6;
+ };
+ hrtime = process.hrtime;
+ getNanoSeconds = function() {
+ var hr;
+ hr = hrtime();
+ return hr[0] * 1e9 + hr[1];
+ };
+ loadTime = getNanoSeconds();
+ } else if (Date.now) {
+ module.exports = function() {
+ return Date.now() - loadTime;
+ };
+ loadTime = Date.now();
+ } else {
+ module.exports = function() {
+ return new Date().getTime() - loadTime;
+ };
+ loadTime = new Date().getTime();
+ }
+
+}).call(this);
+
+/*
+//@ sourceMappingURL=performance-now.map
+*/
+
+}).call(this,_dereq_("FWaASH"))
+},{"FWaASH":1}],6:[function(_dereq_,module,exports){
+'use strict';
+
+var isInput = _dereq_('./isInput');
+var bindings = {};
+
+function has (source, target) {
+ var binding = bindings[source.id];
+ return binding && binding[target.id];
+}
+
+function insert (source, target) {
+ var binding = bindings[source.id];
+ if (!binding) {
+ binding = bindings[source.id] = {};
+ }
+ var invalidate = invalidator(target);
+ binding[target.id] = invalidate;
+ source.on('data', invalidate);
+ source.on('destroyed', remove.bind(null, source, target));
+}
+
+function remove (source, target) {
+ var binding = bindings[source.id];
+ if (!binding) {
+ return;
+ }
+ var invalidate = binding[target.id];
+ source.off('data', invalidate);
+ delete binding[target.id];
+}
+
+function invalidator (target) {
+ return function invalidate () {
+ target.refresh();
+ };
+}
+
+function add (source, target) {
+ if (isInput(target.associated) || has(source, target)) {
+ return;
+ }
+ insert(source, target);
+}
+
+module.exports = {
+ add: add,
+ remove: remove
+};
+
+},{"./isInput":17}],7:[function(_dereq_,module,exports){
+'use strict';
+
+var emitter = _dereq_('contra.emitter');
+var raf = _dereq_('raf');
+var dom = _dereq_('./dom');
+var text = _dereq_('./text');
+var parse = _dereq_('./parse');
+var clone = _dereq_('./clone');
+var defaults = _dereq_('./defaults');
+var momentum = _dereq_('./momentum');
+var classes = _dereq_('./classes');
+var events = _dereq_('./events');
+var noop = _dereq_('./noop');
+var no;
+
+function calendar (calendarOptions) {
+ var o;
+ var api = emitter({});
+ var ref;
+ var refCal;
+ var container;
+ var rendered = false;
+
+ // date variables
+ var monthOffsetAttribute = 'data-rome-offset';
+ var weekdays;
+ var weekdayCount;
+ var calendarMonths = [];
+ var lastYear;
+ var lastMonth;
+ var lastDay;
+ var lastDayElement;
+ var datewrapper;
+ var back;
+ var next;
+
+ // time variables
+ var secondsInDay = 60 * 60 * 24;
+ var time;
+ var timelist;
+
+ init();
+ raf(ready);
+
+ return api;
+
+ function napi () { return api; }
+
+ function init (initOptions) {
+ o = defaults(initOptions || calendarOptions, api);
+ if (!container) { container = dom({ className: o.styles.container }); }
+ weekdays = o.weekdayFormat;
+ weekdayCount = weekdays.length;
+ lastMonth = no;
+ lastYear = no;
+ lastDay = no;
+ lastDayElement = no;
+ o.appendTo.appendChild(container);
+
+ removeChildren(container);
+ rendered = false;
+ ref = o.initialValue ? o.initialValue : momentum.moment();
+ refCal = ref.clone();
+
+ api.container = container;
+ api.destroyed = false;
+ api.destroy = destroy.bind(api, false);
+ api.emitValues = emitValues;
+ api.getDate = getDate;
+ api.getDateString = getDateString;
+ api.getMoment = getMoment;
+ api.hide = hide;
+ api.options = changeOptions;
+ api.options.reset = resetOptions;
+ api.refresh = refresh;
+ api.restore = napi;
+ api.setValue = setValue;
+ api.show = show;
+
+ show();
+ eventListening();
+ ready();
+
+ return api;
+ }
+
+ function ready () {
+ api.emit('ready', clone(o));
+ }
+
+ function destroy (silent) {
+ if (container) {
+ container.parentNode.removeChild(container);
+ }
+
+ if (o) {
+ eventListening(true);
+ }
+
+ var destroyed = api.emitterSnapshot('destroyed');
+ api.destroyed = true;
+ api.destroy = napi;
+ api.emitValues = napi;
+ api.getDate = noop;
+ api.getDateString = noop;
+ api.getMoment = noop;
+ api.hide = napi;
+ api.options = napi;
+ api.options.reset = napi;
+ api.refresh = napi;
+ api.restore = init;
+ api.setValue = napi;
+ api.show = napi;
+ api.off();
+
+ if (silent !== true) {
+ destroyed();
+ }
+
+ return api;
+ }
+
+ function eventListening (remove) {
+ var op = remove ? 'remove' : 'add';
+ if (o.autoHideOnBlur) { events[op](document.documentElement, 'focus', hideOnBlur, true); }
+ if (o.autoHideOnClick) { events[op](document, 'click', hideOnClick); }
+ }
+
+ function changeOptions (options) {
+ if (arguments.length === 0) {
+ return clone(o);
+ }
+ destroy();
+ init(options);
+ return api;
+ }
+
+ function resetOptions () {
+ return changeOptions({ appendTo: o.appendTo });
+ }
+
+ function render () {
+ if (rendered) {
+ return;
+ }
+ rendered = true;
+ renderDates();
+ renderTime();
+ api.emit('render');
+ }
+
+ function renderDates () {
+ if (!o.date) {
+ return;
+ }
+ var i;
+ calendarMonths = [];
+
+ datewrapper = dom({ className: o.styles.date, parent: container });
+
+ for (i = 0; i < o.monthsInCalendar; i++) {
+ renderMonth(i);
+ }
+
+ events.add(back, 'click', subtractMonth);
+ events.add(next, 'click', addMonth);
+ events.add(datewrapper, 'click', pickDay);
+
+ function renderMonth (i) {
+ var month = dom({ className: o.styles.month, parent: datewrapper });
+ if (i === 0) {
+ back = dom({ type: 'button', className: o.styles.back, attributes: { type: 'button' }, parent: month });
+ }
+ if (i === o.monthsInCalendar -1) {
+ next = dom({ type: 'button', className: o.styles.next, attributes: { type: 'button' }, parent: month });
+ }
+ var label = dom({ className: o.styles.monthLabel, parent: month });
+ var date = dom({ type: 'table', className: o.styles.dayTable, parent: month });
+ var datehead = dom({ type: 'thead', className: o.styles.dayHead, parent: date });
+ var dateheadrow = dom({ type: 'tr', className: o.styles.dayRow, parent: datehead });
+ var datebody = dom({ type: 'tbody', className: o.styles.dayBody, parent: date });
+ var j;
+
+ for (j = 0; j < weekdayCount; j++) {
+ dom({ type: 'th', className: o.styles.dayHeadElem, parent: dateheadrow, text: weekdays[weekday(j)] });
+ }
+
+ datebody.setAttribute(monthOffsetAttribute, i);
+ calendarMonths.push({
+ label: label,
+ body: datebody
+ });
+ }
+ }
+
+ function renderTime () {
+ if (!o.time || !o.timeInterval) {
+ return;
+ }
+ var timewrapper = dom({ className: o.styles.time, parent: container });
+ time = dom({ className: o.styles.selectedTime, parent: timewrapper, text: ref.format(o.timeFormat) });
+ events.add(time, 'click', toggleTimeList);
+ timelist = dom({ className: o.styles.timeList, parent: timewrapper });
+ events.add(timelist, 'click', pickTime);
+ var next = momentum.moment('00:00:00', 'HH:mm:ss');
+ var latest = next.clone().add(1, 'days');
+ while (next.isBefore(latest)) {
+ dom({ className: o.styles.timeOption, parent: timelist, text: next.format(o.timeFormat) });
+ next.add(o.timeInterval, 'seconds');
+ }
+ }
+
+ function weekday (index, backwards) {
+ var factor = backwards ? -1 : 1;
+ var offset = index + o.weekStart * factor;
+ if (offset >= weekdayCount || offset < 0) {
+ offset += weekdayCount * -factor;
+ }
+ return offset;
+ }
+
+ function displayValidTimesOnly () {
+ if (!o.time || !rendered) {
+ return;
+ }
+ var times = timelist.children;
+ var length = times.length;
+ var date;
+ var time;
+ var item;
+ var i;
+ for (i = 0; i < length; i++) {
+ item = times[i];
+ time = momentum.moment(text(item), o.timeFormat);
+ date = setTime(ref.clone(), time);
+ item.style.display = isInRange(date, false, o.timeValidator) ? 'block' : 'none';
+ }
+ }
+
+ function toggleTimeList (show) {
+ var display = typeof show === 'boolean' ? show : timelist.style.display === 'none';
+ if (display) {
+ showTimeList();
+ } else {
+ hideTimeList();
+ }
+ }
+
+ function showTimeList () { if (timelist) { timelist.style.display = 'block'; } }
+ function hideTimeList () { if (timelist) { timelist.style.display = 'none'; } }
+ function showCalendar () { container.style.display = 'inline-block'; api.emit('show'); }
+ function hideCalendar () { container.style.display = 'none'; api.emit('hide'); }
+
+ function show () {
+ render();
+ refresh();
+ toggleTimeList(!o.date);
+ showCalendar();
+ return api;
+ }
+
+ function hide () {
+ hideTimeList();
+ raf(hideCalendar);
+ return api;
+ }
+
+ function hideConditionally () {
+ hideTimeList();
+
+ var pos = classes.contains(container, o.styles.positioned);
+ if (pos) {
+ raf(hideCalendar);
+ }
+ return api;
+ }
+
+ function calendarEventTarget (e) {
+ var target = e.target;
+ if (target === api.associated) {
+ return true;
+ }
+ while (target) {
+ if (target === container) {
+ return true;
+ }
+ target = target.parentNode;
+ }
+ }
+
+ function hideOnBlur (e) {
+ if (calendarEventTarget(e)) {
+ return;
+ }
+ hideConditionally();
+ }
+
+ function hideOnClick (e) {
+ if (calendarEventTarget(e)) {
+ return;
+ }
+ hideConditionally();
+ }
+
+ function subtractMonth () { changeMonth('subtract'); }
+ function addMonth () { changeMonth('add'); }
+ function changeMonth (op) {
+ var bound;
+ var direction = op === 'add' ? -1 : 1;
+ var offset = o.monthsInCalendar + direction * getMonthOffset(lastDayElement);
+ refCal[op](offset, 'months');
+ bound = inRange(refCal.clone());
+ ref = bound || ref;
+ if (bound) { refCal = bound.clone(); }
+ update();
+ }
+
+ function update (silent) {
+ updateCalendar();
+ updateTime();
+ if (silent !== true) { emitValues(); }
+ displayValidTimesOnly();
+ }
+
+ function updateCalendar () {
+ if (!o.date || !rendered) {
+ return;
+ }
+ var y = refCal.year();
+ var m = refCal.month();
+ var d = refCal.date();
+ if (d === lastDay && m === lastMonth && y === lastYear) {
+ return;
+ }
+ var canStay = isDisplayed();
+ lastDay = refCal.date();
+ lastMonth = refCal.month();
+ lastYear = refCal.year();
+ if (canStay) { updateCalendarSelection(); return; }
+ calendarMonths.forEach(updateMonth);
+ renderAllDays();
+
+ function updateMonth (month, i) {
+ var offsetCal = refCal.clone().add(i, 'months');
+ text(month.label, offsetCal.format(o.monthFormat));
+ removeChildren(month.body);
+ }
+ }
+
+ function updateCalendarSelection () {
+ var day = refCal.date() - 1;
+ selectDayElement(false);
+ calendarMonths.forEach(function (cal) {
+ var days;
+ if (sameCalendarMonth(cal.date, refCal)) {
+ days = cast(cal.body.children).map(aggregate);
+ days = Array.prototype.concat.apply([], days).filter(inside);
+ selectDayElement(days[day]);
+ }
+ });
+
+ function cast (like) {
+ var dest = [];
+ var i;
+ for (i = 0; i < like.length; i++) {
+ dest.push(like[i]);
+ }
+ return dest;
+ }
+
+ function aggregate (child) {
+ return cast(child.children);
+ }
+
+ function inside (child) {
+ return !classes.contains(child, o.styles.dayPrevMonth) &&
+ !classes.contains(child, o.styles.dayNextMonth);
+ }
+ }
+
+ function isDisplayed () {
+ return calendarMonths.some(matches);
+
+ function matches (cal) {
+ if (!lastYear) { return false; }
+ return sameCalendarMonth(cal.date, refCal);
+ }
+ }
+
+ function sameCalendarMonth (left, right) {
+ return left && right && left.year() === right.year() && left.month() === right.month();
+ }
+
+ function updateTime () {
+ if (!o.time || !rendered) {
+ return;
+ }
+ text(time, ref.format(o.timeFormat));
+ }
+
+ function emitValues () {
+ api.emit('data', getDateString());
+ api.emit('year', ref.year());
+ api.emit('month', ref.month());
+ api.emit('day', ref.day());
+ api.emit('time', ref.format(o.timeFormat));
+ return api;
+ }
+
+ function refresh () {
+ lastYear = false;
+ lastMonth = false;
+ lastDay = false;
+ update(true);
+ return api;
+ }
+
+ function setValue (value) {
+ var date = parse(value, o.inputFormat);
+ if (date === null) {
+ return;
+ }
+ ref = inRange(date) || ref;
+ refCal = ref.clone();
+ update(true);
+
+ return api;
+ }
+
+ function removeChildren (elem, self) {
+ while (elem && elem.firstChild) {
+ elem.removeChild(elem.firstChild);
+ }
+ if (self === true) {
+ elem.parentNode.removeChild(elem);
+ }
+ }
+
+ function renderAllDays () {
+ var i;
+ for (i = 0; i < o.monthsInCalendar; i++) {
+ renderDays(i);
+ }
+ }
+
+ function renderDays (offset) {
+ var month = calendarMonths[offset];
+ var offsetCal = refCal.clone().add(offset, 'months');
+ var total = offsetCal.daysInMonth();
+ var current = offsetCal.month() !== ref.month() ? -1 : ref.date(); // -1 : 1..31
+ var first = offsetCal.clone().date(1);
+ var firstDay = weekday(first.day(), true); // 0..6
+ var tr = dom({ type: 'tr', className: o.styles.dayRow, parent: month.body });
+ var prevMonth = hiddenWhen(offset !== 0, [o.styles.dayBodyElem, o.styles.dayPrevMonth]);
+ var nextMonth = hiddenWhen(offset !== o.monthsInCalendar - 1, [o.styles.dayBodyElem, o.styles.dayNextMonth]);
+ var disabled = o.styles.dayDisabled;
+ var lastDay;
+
+ part({
+ base: first.clone().subtract(firstDay, 'days'),
+ length: firstDay,
+ cell: prevMonth
+ });
+
+ part({
+ base: first.clone(),
+ length: total,
+ cell: [o.styles.dayBodyElem],
+ selectable: true
+ });
+
+ lastDay = first.clone().add(total, 'days');
+
+ part({
+ base: lastDay,
+ length: weekdayCount - tr.children.length,
+ cell: nextMonth
+ });
+
+ back.disabled = !isInRangeLeft(first, true);
+ next.disabled = !isInRangeRight(lastDay, true);
+ month.date = offsetCal.clone();
+
+ function part (data) {
+ var i, day, node;
+ for (i = 0; i < data.length; i++) {
+ if (tr.children.length === weekdayCount) {
+ tr = dom({ type: 'tr', className: o.styles.dayRow, parent: month.body });
+ }
+ day = data.base.clone().add(i, 'days');
+ node = dom({
+ type: 'td',
+ parent: tr,
+ text: day.format(o.dayFormat),
+ className: validationTest(day, data.cell.join(' ').split(' ')).join(' ')
+ });
+ if (data.selectable && day.date() === current) {
+ selectDayElement(node);
+ }
+ }
+ }
+
+ function validationTest (day, cell) {
+ if (!isInRange(day, true, o.dateValidator)) { cell.push(disabled); }
+ return cell;
+ }
+
+ function hiddenWhen (value, cell) {
+ if (value) { cell.push(o.styles.dayConcealed); }
+ return cell;
+ }
+ }
+
+ function isInRange (date, allday, validator) {
+ if (!isInRangeLeft(date, allday)) {
+ return false;
+ }
+ if (!isInRangeRight(date, allday)) {
+ return false;
+ }
+ var valid = (validator || Function.prototype).call(api, date.toDate());
+ return valid !== false;
+ }
+
+ function isInRangeLeft (date, allday) {
+ var min = !o.min ? false : (allday ? o.min.clone().startOf('day') : o.min);
+ return !min || !date.isBefore(min);
+ }
+
+ function isInRangeRight (date, allday) {
+ var max = !o.max ? false : (allday ? o.max.clone().endOf('day') : o.max);
+ return !max || !date.isAfter(max);
+ }
+
+ function inRange (date) {
+ if (o.min && date.isBefore(o.min)) {
+ return inRange(o.min.clone());
+ } else if (o.max && date.isAfter(o.max)) {
+ return inRange(o.max.clone());
+ }
+ var value = date.clone().subtract(1, 'days');
+ if (validateTowards(value, date, 'add')) {
+ return inTimeRange(value);
+ }
+ value = date.clone();
+ if (validateTowards(value, date, 'subtract')) {
+ return inTimeRange(value);
+ }
+ }
+
+ function inTimeRange (value) {
+ var copy = value.clone().subtract(o.timeInterval, 'seconds');
+ var times = Math.ceil(secondsInDay / o.timeInterval);
+ var i;
+ for (i = 0; i < times; i++) {
+ copy.add(o.timeInterval, 'seconds');
+ if (copy.date() > value.date()) {
+ copy.subtract(1, 'days');
+ }
+ if (o.timeValidator.call(api, copy.toDate()) !== false) {
+ return copy;
+ }
+ }
+ }
+
+ function validateTowards (value, date, op) {
+ var valid = false;
+ while (valid === false) {
+ value[op](1, 'days');
+ if (value.month() !== date.month()) {
+ break;
+ }
+ valid = o.dateValidator.call(api, value.toDate());
+ }
+ return valid !== false;
+ }
+
+ function pickDay (e) {
+ var target = e.target;
+ if (classes.contains(target, o.styles.dayDisabled) || !classes.contains(target, o.styles.dayBodyElem)) {
+ return;
+ }
+ var day = parseInt(text(target), 10);
+ var prev = classes.contains(target, o.styles.dayPrevMonth);
+ var next = classes.contains(target, o.styles.dayNextMonth);
+ var offset = getMonthOffset(target) - getMonthOffset(lastDayElement);
+ ref.add(offset, 'months');
+ if (prev || next) {
+ ref.add(prev ? -1 : 1, 'months');
+ }
+ selectDayElement(target);
+ ref.date(day); // must run after setting the month
+ setTime(ref, inRange(ref) || ref);
+ refCal = ref.clone();
+ if (o.autoClose === true) { hideConditionally(); }
+ update();
+ }
+
+ function selectDayElement (node) {
+ if (lastDayElement) {
+ classes.remove(lastDayElement, o.styles.selectedDay);
+ }
+ if (node) {
+ classes.add(node, o.styles.selectedDay);
+ }
+ lastDayElement = node;
+ }
+
+ function getMonthOffset (elem) {
+ var offset;
+ while (elem && elem.getAttribute) {
+ offset = elem.getAttribute(monthOffsetAttribute);
+ if (typeof offset === 'string') {
+ return parseInt(offset, 10);
+ }
+ elem = elem.parentNode;
+ }
+ return 0;
+ }
+
+ function setTime (to, from) {
+ to.hour(from.hour()).minute(from.minute()).second(from.second());
+ return to;
+ }
+
+ function pickTime (e) {
+ var target = e.target;
+ if (!classes.contains(target, o.styles.timeOption)) {
+ return;
+ }
+ var value = momentum.moment(text(target), o.timeFormat);
+ setTime(ref, value);
+ refCal = ref.clone();
+ emitValues();
+ updateTime();
+ if ((!o.date && o.autoClose === true) || o.autoClose === 'time') {
+ hideConditionally();
+ } else {
+ hideTimeList();
+ }
+ }
+
+ function getDate () {
+ return ref.toDate();
+ }
+
+ function getDateString (format) {
+ return ref.format(format || o.inputFormat);
+ }
+
+ function getMoment () {
+ return ref.clone();
+ }
+}
+
+module.exports = calendar;
+
+},{"./classes":8,"./clone":9,"./defaults":11,"./dom":12,"./events":13,"./momentum":18,"./noop":19,"./parse":20,"./text":32,"contra.emitter":2,"raf":4}],8:[function(_dereq_,module,exports){
+'use strict';
+
+var trim = /^\s+|\s+$/g;
+var whitespace = /\s+/;
+
+function classes (node) {
+ return node.className.replace(trim, '').split(whitespace);
+}
+
+function set (node, value) {
+ node.className = value.join(' ');
+}
+
+function add (node, value) {
+ var values = remove(node, value);
+ values.push(value);
+ set(node, values);
+}
+
+function remove (node, value) {
+ var values = classes(node);
+ var i = values.indexOf(value);
+ if (i !== -1) {
+ values.splice(i, 1);
+ set(node, values);
+ }
+ return values;
+}
+
+function contains (node, value) {
+ return classes(node).indexOf(value) !== -1;
+}
+
+module.exports = {
+ add: add,
+ remove: remove,
+ contains: contains
+};
+
+},{}],9:[function(_dereq_,module,exports){
+'use strict';
+
+var momentum = _dereq_('./momentum');
+
+// naïve implementation, specifically meant to clone `options` objects
+function clone (thing) {
+ var copy = {};
+ var value;
+
+ for (var key in thing) {
+ value = thing[key];
+
+ if (!value) {
+ copy[key] = value;
+ } else if (momentum.isMoment(value)) {
+ copy[key] = value.clone();
+ } else if (value._isStylesConfiguration) {
+ copy[key] = clone(value);
+ } else {
+ copy[key] = value;
+ }
+ }
+
+ return copy;
+}
+
+module.exports = clone;
+
+},{"./momentum":18}],10:[function(_dereq_,module,exports){
+'use strict';
+
+var index = _dereq_('./index');
+var input = _dereq_('./input');
+var inline = _dereq_('./inline');
+var isInput = _dereq_('./isInput');
+
+function core (elem, options) {
+ var cal;
+ var existing = index.find(elem);
+ if (existing) {
+ return existing;
+ }
+
+ if (isInput(elem)) {
+ cal = input(elem, options);
+ } else {
+ cal = inline(elem, options);
+ }
+ cal.associated = elem;
+ index.assign(elem, cal);
+
+ return cal;
+}
+
+module.exports = core;
+
+},{"./index":14,"./inline":15,"./input":16,"./isInput":17}],11:[function(_dereq_,module,exports){
+'use strict';
+
+var parse = _dereq_('./parse');
+var isInput = _dereq_('./isInput');
+var momentum = _dereq_('./momentum');
+
+function defaults (options, cal) {
+ var temp;
+ var no;
+ var o = options || {};
+ if (o.autoHideOnClick === no) { o.autoHideOnClick = true; }
+ if (o.autoHideOnBlur === no) { o.autoHideOnBlur = true; }
+ if (o.autoClose === no) { o.autoClose = true; }
+ if (o.appendTo === no) { o.appendTo = document.body; }
+ if (o.appendTo === 'parent') {
+ if (isInput(cal.associated)) {
+ o.appendTo = cal.associated.parentNode;
+ } else {
+ throw new Error('Inline calendars must be appended to a parent node explicitly.');
+ }
+ }
+ if (o.invalidate === no) { o.invalidate = true; }
+ if (o.required === no) { o.required = false; }
+ if (o.date === no) { o.date = true; }
+ if (o.time === no) { o.time = true; }
+ if (o.date === false && o.time === false) { throw new Error('At least one of `date` or `time` must be `true`.'); }
+ if (o.inputFormat === no) {
+ if (o.date && o.time) {
+ o.inputFormat = 'YYYY-MM-DD HH:mm';
+ } else if (o.date) {
+ o.inputFormat = 'YYYY-MM-DD';
+ } else {
+ o.inputFormat = 'HH:mm';
+ }
+ }
+ if (o.initialValue === no) {
+ o.initialValue = null;
+ } else {
+ o.initialValue = parse(o.initialValue, o.inputFormat);
+ }
+ if (o.min === no) { o.min = null; } else { o.min = parse(o.min, o.inputFormat); }
+ if (o.max === no) { o.max = null; } else { o.max = parse(o.max, o.inputFormat); }
+ if (o.timeInterval === no) { o.timeInterval = 60 * 30; } // 30 minutes by default
+ if (o.min && o.max) {
+ if (o.max.isBefore(o.min)) {
+ temp = o.max;
+ o.max = o.min;
+ o.min = temp;
+ }
+ if (o.date === true) {
+ if (o.max.clone().subtract(1, 'days').isBefore(o.min)) {
+ throw new Error('`max` must be at least one day after `min`');
+ }
+ } else if (o.timeInterval * 1000 - o.min % (o.timeInterval * 1000) > o.max - o.min) {
+ throw new Error('`min` to `max` range must allow for at least one time option that matches `timeInterval`');
+ }
+ }
+ if (o.dateValidator === no) { o.dateValidator = Function.prototype; }
+ if (o.timeValidator === no) { o.timeValidator = Function.prototype; }
+ if (o.timeFormat === no) { o.timeFormat = 'HH:mm'; }
+ if (o.weekStart === no) { o.weekStart = momentum.moment().weekday(0).day(); }
+ if (o.weekdayFormat === no) { o.weekdayFormat = 'min'; }
+ if (o.weekdayFormat === 'long') {
+ o.weekdayFormat = momentum.moment.weekdays();
+ } else if (o.weekdayFormat === 'short') {
+ o.weekdayFormat = momentum.moment.weekdaysShort();
+ } else if (o.weekdayFormat === 'min') {
+ o.weekdayFormat = momentum.moment.weekdaysMin();
+ } else if (!Array.isArray(o.weekdayFormat) || o.weekdayFormat.length < 7) {
+ throw new Error('`weekdays` must be `min`, `short`, or `long`');
+ }
+ if (o.monthsInCalendar === no) { o.monthsInCalendar = 1; }
+ if (o.monthFormat === no) { o.monthFormat = 'MMMM YYYY'; }
+ if (o.dayFormat === no) { o.dayFormat = 'DD'; }
+ if (o.styles === no) { o.styles = {}; }
+
+ o.styles._isStylesConfiguration = true;
+
+ var styl = o.styles;
+ if (styl.back === no) { styl.back = 'rd-back'; }
+ if (styl.container === no) { styl.container = 'rd-container'; }
+ if (styl.positioned === no) { styl.positioned = 'rd-container-attachment'; }
+ if (styl.date === no) { styl.date = 'rd-date'; }
+ if (styl.dayBody === no) { styl.dayBody = 'rd-days-body'; }
+ if (styl.dayBodyElem === no) { styl.dayBodyElem = 'rd-day-body'; }
+ if (styl.dayPrevMonth === no) { styl.dayPrevMonth = 'rd-day-prev-month'; }
+ if (styl.dayNextMonth === no) { styl.dayNextMonth = 'rd-day-next-month'; }
+ if (styl.dayDisabled === no) { styl.dayDisabled = 'rd-day-disabled'; }
+ if (styl.dayConcealed === no) { styl.dayConcealed = 'rd-day-concealed'; }
+ if (styl.dayHead === no) { styl.dayHead = 'rd-days-head'; }
+ if (styl.dayHeadElem === no) { styl.dayHeadElem = 'rd-day-head'; }
+ if (styl.dayRow === no) { styl.dayRow = 'rd-days-row'; }
+ if (styl.dayTable === no) { styl.dayTable = 'rd-days'; }
+ if (styl.month === no) { styl.month = 'rd-month'; }
+ if (styl.monthLabel === no) { styl.monthLabel = 'rd-month-label'; }
+ if (styl.next === no) { styl.next = 'rd-next'; }
+ if (styl.selectedDay === no) { styl.selectedDay = 'rd-day-selected'; }
+ if (styl.selectedTime === no) { styl.selectedTime = 'rd-time-selected'; }
+ if (styl.time === no) { styl.time = 'rd-time'; }
+ if (styl.timeList === no) { styl.timeList = 'rd-time-list'; }
+ if (styl.timeOption === no) { styl.timeOption = 'rd-time-option'; }
+
+ return o;
+}
+
+module.exports = defaults;
+
+},{"./isInput":17,"./momentum":18,"./parse":20}],12:[function(_dereq_,module,exports){
+'use strict';
+
+function dom (options) {
+ var o = options || {};
+ if (!o.type) { o.type = 'div'; }
+ var elem = document.createElement(o.type);
+ if (o.className) { elem.className = o.className; }
+ if (o.text) { elem.innerText = elem.textContent = o.text; }
+ if (o.attributes) {
+ Object.keys(o.attributes).forEach(function(key) {
+ elem.setAttribute(key, o.attributes[key]);
+ });
+ }
+ if (o.parent) { o.parent.appendChild(elem); }
+ return elem;
+}
+
+module.exports = dom;
+
+},{}],13:[function(_dereq_,module,exports){
+'use strict';
+
+var addEvent = addEventEasy;
+var removeEvent = removeEventEasy;
+
+if (!window.addEventListener) {
+ addEvent = addEventHard;
+}
+
+if (!window.removeEventListener) {
+ removeEvent = removeEventHard;
+}
+
+function addEventEasy (element, evt, fn, capture) {
+ return element.addEventListener(evt, fn, capture);
+}
+
+function addEventHard (element, evt, fn, capture) {
+ return element.attachEvent('on' + evt, function (ae) {
+ var e = ae || window.event;
+ e.target = e.target || e.srcElement;
+ e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
+ e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
+ fn.call(element, e);
+ }, capture);
+}
+
+function removeEventEasy (element, evt, fn) {
+ return element.removeEventListener(evt, fn);
+}
+
+function removeEventHard (element, evt, fn) {
+ return element.detachEvent('on' + evt, fn);
+}
+
+module.exports = {
+ add: addEvent,
+ remove: removeEvent
+};
+
+},{}],14:[function(_dereq_,module,exports){
+'use strict';
+var no;
+var ikey = 'data-rome-id';
+var index = [];
+
+function find (thing) { // can be a DOM element or a number
+ if (typeof thing !== 'number' && thing && thing.getAttribute) {
+ return find(thing.getAttribute(ikey));
+ }
+ var existing = index[thing];
+ if (existing !== no) {
+ return existing;
+ }
+ return null;
+}
+
+function assign (elem, instance) {
+ elem.setAttribute(ikey, instance.id = index.push(instance) - 1);
+}
+
+module.exports = {
+ find: find,
+ assign: assign
+};
+
+},{}],15:[function(_dereq_,module,exports){
+'use strict';
+
+var raf = _dereq_('raf');
+var calendar = _dereq_('./calendar');
+
+function inline (elem, calendarOptions) {
+ var o = calendarOptions || {};
+
+ o.appendTo = elem;
+
+ return calendar(o);
+}
+
+module.exports = inline;
+
+},{"./calendar":7,"raf":4}],16:[function(_dereq_,module,exports){
+'use strict';
+
+var throttle = _dereq_('./throttle');
+var raf = _dereq_('raf');
+var clone = _dereq_('./clone');
+var defaults = _dereq_('./defaults');
+var calendar = _dereq_('./calendar');
+var momentum = _dereq_('./momentum');
+var classes = _dereq_('./classes');
+var events = _dereq_('./events');
+
+function inputCalendar (input, calendarOptions) {
+ var o;
+ var api = calendar(calendarOptions);
+ var throttledTakeInput = throttle(takeInput, 30);
+ var throttledPosition = throttle(position, 30);
+ var ignoreInvalidation;
+ var ignoreShow;
+
+ init(calendarOptions);
+
+ return api;
+
+ function init (initOptions) {
+ o = defaults(initOptions || calendarOptions, api);
+
+ classes.add(api.container, o.styles.positioned);
+ events.add(api.container, 'mousedown', containerMouseDown);
+ events.add(api.container, 'click', containerClick);
+
+ api.getDate = unrequire(api.getDate);
+ api.getDateString = unrequire(api.getDateString);
+ api.getMoment = unrequire(api.getMoment);
+
+ if (o.initialValue) {
+ input.value = o.initialValue.format(o.inputFormat);
+ }
+
+ api.on('data', updateInput);
+ api.on('show', throttledPosition);
+
+ eventListening();
+ throttledTakeInput();
+
+ api.hide();
+ }
+
+ function destroy () {
+ eventListening(true);
+ }
+
+ function eventListening (remove) {
+ var op = remove ? 'remove' : 'add';
+ events[op](input, 'click', show);
+ events[op](input, 'touchend', show);
+ events[op](input, 'focusin', show);
+ events[op](input, 'change', throttledTakeInput);
+ events[op](input, 'keypress', throttledTakeInput);
+ events[op](input, 'keydown', throttledTakeInput);
+ events[op](input, 'input', throttledTakeInput);
+ if (o.invalidate) { events[op](input, 'blur', invalidateInput); }
+ events[op](window, 'resize', throttledPosition);
+
+ if (remove) {
+ api.once('ready', init);
+ api.off('destroyed', destroy);
+ } else {
+ api.off('ready', init);
+ api.once('destroyed', destroy);
+ }
+ }
+
+ function containerClick () {
+ ignoreShow = true;
+ input.focus();
+ ignoreShow = false;
+ }
+
+ function containerMouseDown () {
+ ignoreInvalidation = true;
+ raf(unignore);
+
+ function unignore () {
+ ignoreInvalidation = false;
+ }
+ }
+
+ function invalidateInput () {
+ if (!ignoreInvalidation && !isEmpty()) {
+ api.emitValues();
+ }
+ }
+
+ function show () {
+ if (ignoreShow) {
+ return;
+ }
+ api.show();
+ }
+
+ function position () {
+ var bounds = input.getBoundingClientRect();
+ var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
+ api.container.style.top = bounds.top + scrollTop + input.offsetHeight + 'px';
+ api.container.style.left = bounds.left + 'px';
+ }
+
+ function takeInput () {
+ var value = input.value.trim();
+ if (isEmpty()) {
+ return;
+ }
+ var date = momentum.moment(value, o.inputFormat, o.strictParse);
+ api.setValue(date);
+ }
+
+ function updateInput (data) {
+ input.value = data;
+ }
+
+ function isEmpty () {
+ return o.required === false && input.value.trim() === '';
+ }
+
+ function unrequire (fn) {
+ return function maybe () {
+ return isEmpty() ? null : fn.apply(this, arguments);
+ };
+ }
+}
+
+module.exports = inputCalendar;
+
+},{"./calendar":7,"./classes":8,"./clone":9,"./defaults":11,"./events":13,"./momentum":18,"./throttle":33,"raf":4}],17:[function(_dereq_,module,exports){
+'use strict';
+
+function isInput (elem) {
+ return elem && elem.nodeName && elem.nodeName.toLowerCase() === 'input';
+}
+
+module.exports = isInput;
+
+},{}],18:[function(_dereq_,module,exports){
+'use strict';
+
+function isMoment (value) {
+ return value && Object.prototype.hasOwnProperty.call(value, '_isAMomentObject');
+}
+
+var api = {
+ moment: null,
+ isMoment: isMoment
+};
+
+module.exports = api;
+
+},{}],19:[function(_dereq_,module,exports){
+'use strict';
+
+function noop () {}
+
+module.exports = noop;
+
+},{}],20:[function(_dereq_,module,exports){
+'use strict';
+
+var momentum = _dereq_('./momentum');
+
+function raw (date, format) {
+ if (typeof date === 'string') {
+ return momentum.moment(date, format);
+ }
+ if (Object.prototype.toString.call(date) === '[object Date]') {
+ return momentum.moment(date);
+ }
+ if (momentum.isMoment(date)) {
+ return date.clone();
+ }
+}
+
+function parse (date, format) {
+ var m = raw(date, typeof format === 'string' ? format : null);
+ return m && m.isValid() ? m : null;
+}
+
+module.exports = parse;
+
+},{"./momentum":18}],21:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function (fn, ctx) {
+ var f = [];
+ this.forEach(function (v, i, t) {
+ if (fn.call(ctx, v, i, t)) { f.push(v); }
+ }, ctx);
+ return f;
+ };
+}
+
+},{}],22:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function (fn, ctx) {
+ if (this === void 0 || this === null || typeof fn !== 'function') {
+ throw new TypeError();
+ }
+ var t = this;
+ var len = t.length;
+ for (var i = 0; i < len; i++) {
+ if (i in t) { fn.call(ctx, t[i], i, t); }
+ }
+ };
+}
+
+},{}],23:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (what, start) {
+ if (this === undefined || this === null) {
+ throw new TypeError();
+ }
+ var length = this.length;
+ start = +start || 0;
+ if (Math.abs(start) === Infinity) {
+ start = 0;
+ } else if (start < 0) {
+ start += length;
+ if (start < 0) { start = 0; }
+ }
+ for (; start < length; start++) {
+ if (this[start] === what) {
+ return start;
+ }
+ }
+ return -1;
+ };
+}
+
+},{}],24:[function(_dereq_,module,exports){
+'use strict';
+
+Array.isArray || (Array.isArray = function (a) {
+ return '' + a !== a && Object.prototype.toString.call(a) === '[object Array]';
+});
+
+},{}],25:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Array.prototype.map) {
+ Array.prototype.map = function (fn, ctx) {
+ var context, result, i;
+
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ var source = Object(this);
+ var len = source.length >>> 0;
+
+ if (typeof fn !== 'function') {
+ throw new TypeError(fn + ' is not a function');
+ }
+
+ if (arguments.length > 1) {
+ context = ctx;
+ }
+
+ result = new Array(len);
+ i = 0;
+
+ while (i < len) {
+ if (i in source) {
+ result[i] = fn.call(context, source[i], i, source);
+ }
+ i++;
+ }
+ return result;
+ };
+}
+
+},{}],26:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Array.prototype.some) {
+ Array.prototype.some = function (fn, ctx) {
+ var context, i;
+
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ var source = Object(this);
+ var len = source.length >>> 0;
+
+ if (typeof fn !== 'function') {
+ throw new TypeError(fn + ' is not a function');
+ }
+
+ if (arguments.length > 1) {
+ context = ctx;
+ }
+
+ i = 0;
+
+ while (i < len) {
+ if (i in source) {
+ var test = fn.call(context, source[i], i, source);
+ if (test) {
+ return true;
+ }
+ }
+ i++;
+ }
+ return false;
+ };
+}
+
+},{}],27:[function(_dereq_,module,exports){
+'use strict';
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function (context) {
+ if (typeof this !== 'function') {
+ throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
+ }
+ var curried = Array.prototype.slice.call(arguments, 1);
+ var original = this;
+ var NoOp = function () {};
+ var bound = function () {
+ var ctx = this instanceof NoOp && context ? this : context;
+ var args = curried.concat(Array.prototype.slice.call(arguments));
+ return original.apply(ctx, args);
+ };
+ NoOp.prototype = this.prototype;
+ bound.prototype = new NoOp();
+ return bound;
+ };
+}
+
+},{}],28:[function(_dereq_,module,exports){
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
+var dontEnums = [
+ 'toString',
+ 'toLocaleString',
+ 'valueOf',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'constructor'
+];
+var dontEnumsLength = dontEnums.length;
+
+if (!Object.keys) {
+ Object.keys = function(obj) {
+ if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
+ throw new TypeError('Object.keys called on non-object');
+ }
+
+ var result = [], prop, i;
+
+ for (prop in obj) {
+ if (hasOwn.call(obj, prop)) {
+ result.push(prop);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (i = 0; i < dontEnumsLength; i++) {
+ if (hasOwn.call(obj, dontEnums[i])) {
+ result.push(dontEnums[i]);
+ }
+ }
+ }
+ return result;
+ };
+}
+
+},{}],29:[function(_dereq_,module,exports){
+'use strict';
+
+if (!String.prototype.trim) {
+ String.prototype.trim = function () {
+ return this.replace(/^\s+|\s+$/g, '');
+ };
+}
+
+},{}],30:[function(_dereq_,module,exports){
+'use strict';
+
+// these are only required for IE < 9
+// maybe move to IE-specific distro?
+_dereq_('./polyfills/function.bind');
+_dereq_('./polyfills/array.foreach');
+_dereq_('./polyfills/array.map');
+_dereq_('./polyfills/array.filter');
+_dereq_('./polyfills/array.isarray');
+_dereq_('./polyfills/array.indexof');
+_dereq_('./polyfills/array.some');
+_dereq_('./polyfills/string.trim');
+_dereq_('./polyfills/object.keys');
+
+var core = _dereq_('./core');
+var index = _dereq_('./index');
+var use = _dereq_('./use');
+
+core.use = use.bind(core);
+core.find = index.find;
+core.val = _dereq_('./validators');
+
+module.exports = core;
+
+},{"./core":10,"./index":14,"./polyfills/array.filter":21,"./polyfills/array.foreach":22,"./polyfills/array.indexof":23,"./polyfills/array.isarray":24,"./polyfills/array.map":25,"./polyfills/array.some":26,"./polyfills/function.bind":27,"./polyfills/object.keys":28,"./polyfills/string.trim":29,"./use":34,"./validators":35}],31:[function(_dereq_,module,exports){
+(function (global){
+var rome = _dereq_('./rome');
+var momentum = _dereq_('./momentum');
+
+rome.use(global.moment);
+
+if (momentum.moment === void 0) {
+ throw new Error('rome depends on moment.js, you can get it at http://momentjs.com, or you could use the bundled distribution file instead.');
+}
+
+module.exports = rome;
+
+}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./momentum":18,"./rome":30}],32:[function(_dereq_,module,exports){
+'use strict';
+
+function text (elem, value) {
+ if (arguments.length === 2) {
+ elem.innerText = elem.textContent = value;
+ }
+ return elem.innerText || elem.textContent;
+}
+
+module.exports = text;
+
+},{}],33:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = function throttle (fn, boundary) {
+ var last = -Infinity;
+ var timer;
+ return function bounced () {
+ if (timer) {
+ return;
+ }
+ unbound();
+
+ function unbound () {
+ clearTimeout(timer);
+ timer = null;
+ var next = last + boundary;
+ var now = Date.now();
+ if (now > next) {
+ last = now;
+ fn.apply(this, arguments);
+ } else {
+ timer = setTimeout(unbound, next - now);
+ }
+ }
+ };
+};
+
+},{}],34:[function(_dereq_,module,exports){
+'use strict';
+
+var momentum = _dereq_('./momentum');
+
+function use (moment) {
+ this.moment = momentum.moment = moment;
+}
+
+module.exports = use;
+
+},{"./momentum":18}],35:[function(_dereq_,module,exports){
+'use strict';
+
+var index = _dereq_('./index');
+var parse = _dereq_('./parse');
+var association = _dereq_('./association');
+
+function compareBuilder (compare) {
+ return function factory (value) {
+ var fixed = parse(value);
+
+ return function validate (date) {
+ var cal = index.find(value);
+ var left = parse(date);
+ var right = fixed || cal && cal.getMoment();
+ if (!right) {
+ return true;
+ }
+ if (cal) {
+ association.add(this, cal);
+ }
+ return compare(left, right);
+ };
+ };
+}
+
+function rangeBuilder (how, compare) {
+ return function factory (start, end) {
+ var dates;
+ var len = arguments.length;
+
+ if (Array.isArray(start)) {
+ dates = start;
+ } else {
+ if (len === 1) {
+ dates = [start];
+ } else if (len === 2) {
+ dates = [[start, end]];
+ }
+ }
+
+ return function validate (date) {
+ return dates.map(expand.bind(this))[how](compare.bind(this, date));
+ };
+
+ function expand (value) {
+ var start, end;
+ var cal = index.find(value);
+ if (cal) {
+ start = end = cal.getMoment();
+ } else if (Array.isArray(value)) {
+ start = value[0]; end = value[1];
+ } else {
+ start = end = value;
+ }
+ if (cal) {
+ association.add(cal, this);
+ }
+ return {
+ start: parse(start).startOf('day').toDate(),
+ end: parse(end).endOf('day').toDate()
+ };
+ }
+ };
+}
+
+var afterEq = compareBuilder(function (left, right) { return left >= right; });
+var after = compareBuilder(function (left, right) { return left > right; });
+var beforeEq = compareBuilder(function (left, right) { return left <= right; });
+var before = compareBuilder(function (left, right) { return left < right; });
+
+var except = rangeBuilder('every', function (left, right) { return right.start > left || right.end < left; });
+var only = rangeBuilder('some', function (left, right) { return right.start <= left && right.end >= left; });
+
+module.exports = {
+ afterEq: afterEq,
+ after: after,
+ beforeEq: beforeEq,
+ before: before,
+ except: except,
+ only: only
+};
+
+},{"./association":6,"./index":14,"./parse":20}]},{},[31])
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaWNvL2Rldi9yb21lL25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvbmljby9kZXYvcm9tZS9ub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZ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5tb250aCgpO1xuICAgIGxhc3RZZWFyID0gcmVmQ2FsLnllYXIoKTtcbiAgICBpZiAoY2FuU3RheS
<TRUNCATED>
[33/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js b/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
deleted file mode 100644
index d839865..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply
(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.1",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict"
;function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.1",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$ele
ment.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=thi
s.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".it
em"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c="prev"==a?-1:1,d=this.getItemIndex(b),e=(d+c)%this.$items.length;return this.$items.eq(e)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"
==b?"left":"right",i="next"==b?"first":"last",j=this;if(!f.length){if(!this.options.wrap)return;f=this.$element.find(".item")[i]()}if(f.hasClass("active"))return this.sliding=!1;var k=f[0],l=a.Event("slide.bs.carousel",{relatedTarget:k,direction:h});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var m=a(this.$indicators.children()[this.getItemIndex(f)]);m&&m.addClass("active")}var n=a.Event("slid.bs.carousel",{relatedTarget:k,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger(n)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trig
ger(n)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.
data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.1",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.di
mension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transit
ioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=
f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart
"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){
return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.1",c.TRANSITION_DURATI
ON=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.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"]',a.proxy(this.hide,this)),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){d.$element.trigger("focus").trigge
r(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off
("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("
bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.
scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevente
d()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.tooltip",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.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}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport
&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter
=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.
contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this
.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arr
ow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=this.tip(),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d=
"BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.w
idth&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$elemen
t.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.popover",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.1",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.pro
totype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process
,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.1",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")|
|d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selec
tor).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var
h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})
-})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use
strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.1",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=i?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(
){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d
=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/js/npm.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/js/npm.js b/htrace-core/src/web/lib/bootstrap-3.3.1/js/npm.js
deleted file mode 100644
index bf6aa80..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/js/npm.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
-require('../../js/transition.js')
-require('../../js/alert.js')
-require('../../js/button.js')
-require('../../js/carousel.js')
-require('../../js/collapse.js')
-require('../../js/dropdown.js')
-require('../../js/modal.js')
-require('../../js/tooltip.js')
-require('../../js/popover.js')
-require('../../js/scrollspy.js')
-require('../../js/tab.js')
-require('../../js/affix.js')
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/css/backgrid-0.3.5.min.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/css/backgrid-0.3.5.min.css b/htrace-core/src/web/lib/css/backgrid-0.3.5.min.css
deleted file mode 100644
index 764e799..0000000
--- a/htrace-core/src/web/lib/css/backgrid-0.3.5.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.backgrid-container{position:relative;display:block;width:100%;height:465px;padding:0;overflow:auto;border:0}.backgrid{width:100%;max-width:100%;background-color:transparent;border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.backgrid th,.backgrid td{display:none;height:20px;max-width:250px;padding:4px 5px;overflow:hidden;line-height:20px;text-align:left;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;border-bottom:1px solid #DDD}.backgrid th.renderable,.backgrid td.renderable{display:table-cell}.backgrid th{font-weight:bold;text-align:center}.backgrid th.sortable a{text-decoration:none;white-space:nowrap;cursor:pointer}.backgrid thead th{vertical-align:bottom;background-color:#f9f9f9}.backgrid thead th a{display:block}.backgrid.backgrid-striped tbody tr:nth-child(even){background-color:#f9f9f9}.backgrid tbody tr.empty{font-style:italic;color:gray}.backgrid tbody tr.empty td{display:inherit;text-align:center}.backgrid td.edito
r{padding:0}.backgrid td.editor,.backgrid tbody tr:nth-child(odd) td.editor{background-color:rgba(82,168,236,0.1);outline:1px solid rgba(82,168,236,0.8);outline-offset:-1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:200ms;-moz-transition-duration:200ms;-o-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:width,outline,background-color;-moz-transition-property:width,outline,background-color;-o-transition-property:width,outline,background-color;transition-property:width,outline,background-color;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;-o-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.backgrid td.editor input[type=text]{display:block;width:100%;height:100%;padding:0 5px;margin:0;background-color:transparent;border:0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-b
ox;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none}.backgrid td.editor input[type=text]::-ms-clear{display:none}.backgrid td.error,.backgrid tbody tr:nth-child(odd) td.error{background-color:rgba(255,210,77,0.1);outline:1px solid #ffd24d}.backgrid td.editor :focus,.backgrid th.editor:focus{outline:0}.backgrid .sort-caret{display:inline-block;width:0;height:0;margin-left:.3em;border:0;content:""}.backgrid .ascending .sort-caret{vertical-align:baseline;border-top:0;border-right:4px solid transparent;border-bottom:4px solid #000;border-left:4px solid transparent}.backgrid .descending .sort-caret{vertical-align:super;border-top:4px solid #000;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent}.backgrid .string-cell,.backgrid .uri-cell,.backgrid .email-cell,.backgrid .string-cell.editor input[type=text],.backgrid .uri-cell.editor input[type=text],.backgrid .email-cell.editor input[type=text]{text-align:left}.
backgrid .date-cell,.backgrid .time-cell,.backgrid .datetime-cell,.backgrid .number-cell,.backgrid .integer-cell,.backgrid .percent-cell,.backgrid .date-cell.editor input[type=text],.backgrid .time-cell.editor input[type=text],.backgrid .datetime-cell.editor input[type=text],.backgrid .number-cell.editor input[type=text],.backgrid .integer-cell.editor input[type=text],.backgrid .percent-cell.editor input[type=text]{text-align:right}.backgrid .boolean-cell,.backgrid .boolean-cell.editor input[type=checkbox]{text-align:center}.backgrid .select-cell{text-align:center}.backgrid .select-cell.editor{padding:0}.backgrid .select-cell.editor select{display:block;width:100%;height:28px;padding:4px 5px;margin:0;line-height:28px;vertical-align:middle;background-color:white;border:0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.backgrid .select-cell.editor select[multiple]{height:auto}.backgr
id .select-cell.editor :focus{border:0;outline:0}.backgrid .select-cell.editor select::-moz-focus-inner,.backgrid .select-cell.editor optgroup::-moz-focus-inner,.backgrid .select-cell.editor option::-moz-focus-inner,.backgrid .select-cell.editor select::-o-focus-inner,.backgrid .select-cell.editor optgroup::-o-focus-inner,.backgrid .select-cell.editor option::-o-focus-inner{border:0}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/css/backgrid-paginator-0.3.5.min.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/css/backgrid-paginator-0.3.5.min.css b/htrace-core/src/web/lib/css/backgrid-paginator-0.3.5.min.css
deleted file mode 100644
index 285fe81..0000000
--- a/htrace-core/src/web/lib/css/backgrid-paginator-0.3.5.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.backgrid-paginator{text-align:center;border-top:0;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.backgrid-paginator ul{display:inline-block;*display:inline;margin:5px 0;*zoom:1}.backgrid-paginator ul>li{display:inline}.backgrid-paginator ul>li>a,.backgrid-paginator ul>li>span{float:left;width:30px;height:30px;padding:0;line-height:30px;text-decoration:none}.backgrid-paginator ul>li>a:hover,.backgrid-paginator ul>.active>a,.backgrid-paginator ul>.active>span{background-color:#f5f5f5}.backgrid-paginator ul>.active>a,.backgrid-paginator ul>.active>span{color:#999;cursor:default}.backgrid-paginator ul>.disabled>span,.backgrid-paginator ul>.disabled>a,.backgrid-paginator ul>.disabled>a:hover{color:#999;cursor:default}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/css/main.css
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/css/main.css b/htrace-core/src/web/lib/css/main.css
deleted file mode 100644
index 1875b60..0000000
--- a/htrace-core/src/web/lib/css/main.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-ul.spans {
- margin: 0px;
- padding: 0px;
-}
-
-li.span {
- margin: 0px;
- list-style: none;
-}
-
-/* Graph */
-svg .node circle {
- stroke: #000000;
- stroke-width: 3;
- fill: #D8BFD8;
-}
-
-svg .selected circle {
- stroke-width: 3;
- fill: #DA70D6;
-}
-
-svg .link {
- stroke: black;
- stroke-width: 3;
-}
[17/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
new file mode 100644
index 0000000..c6f3d21
--- /dev/null
+++ b/htrace-htraced/src/web/lib/bootstrap-3.3.1/css/bootstrap.css
@@ -0,0 +1,6332 @@
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+html {
+ font-family: sans-serif;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+body {
+ margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+ display: block;
+}
+audio,
+canvas,
+progress,
+video {
+ display: inline-block;
+ vertical-align: baseline;
+}
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+[hidden],
+template {
+ display: none;
+}
+a {
+ background-color: transparent;
+}
+a:active,
+a:hover {
+ outline: 0;
+}
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+b,
+strong {
+ font-weight: bold;
+}
+dfn {
+ font-style: italic;
+}
+h1 {
+ margin: .67em 0;
+ font-size: 2em;
+}
+mark {
+ color: #000;
+ background: #ff0;
+}
+small {
+ font-size: 80%;
+}
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+sup {
+ top: -.5em;
+}
+sub {
+ bottom: -.25em;
+}
+img {
+ border: 0;
+}
+svg:not(:root) {
+ overflow: hidden;
+}
+figure {
+ margin: 1em 40px;
+}
+hr {
+ height: 0;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+pre {
+ overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+ margin: 0;
+ font: inherit;
+ color: inherit;
+}
+button {
+ overflow: visible;
+}
+button,
+select {
+ text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+input {
+ line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+fieldset {
+ padding: .35em .625em .75em;
+ margin: 0 2px;
+ border: 1px solid #c0c0c0;
+}
+legend {
+ padding: 0;
+ border: 0;
+}
+textarea {
+ overflow: auto;
+}
+optgroup {
+ font-weight: bold;
+}
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+td,
+th {
+ padding: 0;
+}
+/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
+@media print {
+ *,
+ *:before,
+ *:after {
+ color: #000 !important;
+ text-shadow: none !important;
+ background: transparent !important;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+ }
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+ a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ a[href^="#"]:after,
+ a[href^="javascript:"]:after {
+ content: "";
+ }
+ pre,
+ blockquote {
+ border: 1px solid #999;
+
+ page-break-inside: avoid;
+ }
+ thead {
+ display: table-header-group;
+ }
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+ img {
+ max-width: 100% !important;
+ }
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+ select {
+ background: #fff !important;
+ }
+ .navbar {
+ display: none;
+ }
+ .btn > .caret,
+ .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .label {
+ border: 1px solid #000;
+ }
+ .table {
+ border-collapse: collapse !important;
+ }
+ .table td,
+ .table th {
+ background-color: #fff !important;
+ }
+ .table-bordered th,
+ .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+@font-face {
+ font-family: 'Glyphicons Halflings';
+
+ src: url('../fonts/glyphicons-halflings-regular.eot');
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+ content: "\2a";
+}
+.glyphicon-plus:before {
+ content: "\2b";
+}
+.glyphicon-euro:before,
+.glyphicon-eur:before {
+ content: "\20ac";
+}
+.glyphicon-minus:before {
+ content: "\2212";
+}
+.glyphicon-cloud:before {
+ content: "\2601";
+}
+.glyphicon-envelope:before {
+ content: "\2709";
+}
+.glyphicon-pencil:before {
+ content: "\270f";
+}
+.glyphicon-glass:before {
+ content: "\e001";
+}
+.glyphicon-music:before {
+ content: "\e002";
+}
+.glyphicon-search:before {
+ content: "\e003";
+}
+.glyphicon-heart:before {
+ content: "\e005";
+}
+.glyphicon-star:before {
+ content: "\e006";
+}
+.glyphicon-star-empty:before {
+ content: "\e007";
+}
+.glyphicon-user:before {
+ content: "\e008";
+}
+.glyphicon-film:before {
+ content: "\e009";
+}
+.glyphicon-th-large:before {
+ content: "\e010";
+}
+.glyphicon-th:before {
+ content: "\e011";
+}
+.glyphicon-th-list:before {
+ content: "\e012";
+}
+.glyphicon-ok:before {
+ content: "\e013";
+}
+.glyphicon-remove:before {
+ content: "\e014";
+}
+.glyphicon-zoom-in:before {
+ content: "\e015";
+}
+.glyphicon-zoom-out:before {
+ content: "\e016";
+}
+.glyphicon-off:before {
+ content: "\e017";
+}
+.glyphicon-signal:before {
+ content: "\e018";
+}
+.glyphicon-cog:before {
+ content: "\e019";
+}
+.glyphicon-trash:before {
+ content: "\e020";
+}
+.glyphicon-home:before {
+ content: "\e021";
+}
+.glyphicon-file:before {
+ content: "\e022";
+}
+.glyphicon-time:before {
+ content: "\e023";
+}
+.glyphicon-road:before {
+ content: "\e024";
+}
+.glyphicon-download-alt:before {
+ content: "\e025";
+}
+.glyphicon-download:before {
+ content: "\e026";
+}
+.glyphicon-upload:before {
+ content: "\e027";
+}
+.glyphicon-inbox:before {
+ content: "\e028";
+}
+.glyphicon-play-circle:before {
+ content: "\e029";
+}
+.glyphicon-repeat:before {
+ content: "\e030";
+}
+.glyphicon-refresh:before {
+ content: "\e031";
+}
+.glyphicon-list-alt:before {
+ content: "\e032";
+}
+.glyphicon-lock:before {
+ content: "\e033";
+}
+.glyphicon-flag:before {
+ content: "\e034";
+}
+.glyphicon-headphones:before {
+ content: "\e035";
+}
+.glyphicon-volume-off:before {
+ content: "\e036";
+}
+.glyphicon-volume-down:before {
+ content: "\e037";
+}
+.glyphicon-volume-up:before {
+ content: "\e038";
+}
+.glyphicon-qrcode:before {
+ content: "\e039";
+}
+.glyphicon-barcode:before {
+ content: "\e040";
+}
+.glyphicon-tag:before {
+ content: "\e041";
+}
+.glyphicon-tags:before {
+ content: "\e042";
+}
+.glyphicon-book:before {
+ content: "\e043";
+}
+.glyphicon-bookmark:before {
+ content: "\e044";
+}
+.glyphicon-print:before {
+ content: "\e045";
+}
+.glyphicon-camera:before {
+ content: "\e046";
+}
+.glyphicon-font:before {
+ content: "\e047";
+}
+.glyphicon-bold:before {
+ content: "\e048";
+}
+.glyphicon-italic:before {
+ content: "\e049";
+}
+.glyphicon-text-height:before {
+ content: "\e050";
+}
+.glyphicon-text-width:before {
+ content: "\e051";
+}
+.glyphicon-align-left:before {
+ content: "\e052";
+}
+.glyphicon-align-center:before {
+ content: "\e053";
+}
+.glyphicon-align-right:before {
+ content: "\e054";
+}
+.glyphicon-align-justify:before {
+ content: "\e055";
+}
+.glyphicon-list:before {
+ content: "\e056";
+}
+.glyphicon-indent-left:before {
+ content: "\e057";
+}
+.glyphicon-indent-right:before {
+ content: "\e058";
+}
+.glyphicon-facetime-video:before {
+ content: "\e059";
+}
+.glyphicon-picture:before {
+ content: "\e060";
+}
+.glyphicon-map-marker:before {
+ content: "\e062";
+}
+.glyphicon-adjust:before {
+ content: "\e063";
+}
+.glyphicon-tint:before {
+ content: "\e064";
+}
+.glyphicon-edit:before {
+ content: "\e065";
+}
+.glyphicon-share:before {
+ content: "\e066";
+}
+.glyphicon-check:before {
+ content: "\e067";
+}
+.glyphicon-move:before {
+ content: "\e068";
+}
+.glyphicon-step-backward:before {
+ content: "\e069";
+}
+.glyphicon-fast-backward:before {
+ content: "\e070";
+}
+.glyphicon-backward:before {
+ content: "\e071";
+}
+.glyphicon-play:before {
+ content: "\e072";
+}
+.glyphicon-pause:before {
+ content: "\e073";
+}
+.glyphicon-stop:before {
+ content: "\e074";
+}
+.glyphicon-forward:before {
+ content: "\e075";
+}
+.glyphicon-fast-forward:before {
+ content: "\e076";
+}
+.glyphicon-step-forward:before {
+ content: "\e077";
+}
+.glyphicon-eject:before {
+ content: "\e078";
+}
+.glyphicon-chevron-left:before {
+ content: "\e079";
+}
+.glyphicon-chevron-right:before {
+ content: "\e080";
+}
+.glyphicon-plus-sign:before {
+ content: "\e081";
+}
+.glyphicon-minus-sign:before {
+ content: "\e082";
+}
+.glyphicon-remove-sign:before {
+ content: "\e083";
+}
+.glyphicon-ok-sign:before {
+ content: "\e084";
+}
+.glyphicon-question-sign:before {
+ content: "\e085";
+}
+.glyphicon-info-sign:before {
+ content: "\e086";
+}
+.glyphicon-screenshot:before {
+ content: "\e087";
+}
+.glyphicon-remove-circle:before {
+ content: "\e088";
+}
+.glyphicon-ok-circle:before {
+ content: "\e089";
+}
+.glyphicon-ban-circle:before {
+ content: "\e090";
+}
+.glyphicon-arrow-left:before {
+ content: "\e091";
+}
+.glyphicon-arrow-right:before {
+ content: "\e092";
+}
+.glyphicon-arrow-up:before {
+ content: "\e093";
+}
+.glyphicon-arrow-down:before {
+ content: "\e094";
+}
+.glyphicon-share-alt:before {
+ content: "\e095";
+}
+.glyphicon-resize-full:before {
+ content: "\e096";
+}
+.glyphicon-resize-small:before {
+ content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+.glyphicon-gift:before {
+ content: "\e102";
+}
+.glyphicon-leaf:before {
+ content: "\e103";
+}
+.glyphicon-fire:before {
+ content: "\e104";
+}
+.glyphicon-eye-open:before {
+ content: "\e105";
+}
+.glyphicon-eye-close:before {
+ content: "\e106";
+}
+.glyphicon-warning-sign:before {
+ content: "\e107";
+}
+.glyphicon-plane:before {
+ content: "\e108";
+}
+.glyphicon-calendar:before {
+ content: "\e109";
+}
+.glyphicon-random:before {
+ content: "\e110";
+}
+.glyphicon-comment:before {
+ content: "\e111";
+}
+.glyphicon-magnet:before {
+ content: "\e112";
+}
+.glyphicon-chevron-up:before {
+ content: "\e113";
+}
+.glyphicon-chevron-down:before {
+ content: "\e114";
+}
+.glyphicon-retweet:before {
+ content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+.glyphicon-folder-close:before {
+ content: "\e117";
+}
+.glyphicon-folder-open:before {
+ content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+.glyphicon-hdd:before {
+ content: "\e121";
+}
+.glyphicon-bullhorn:before {
+ content: "\e122";
+}
+.glyphicon-bell:before {
+ content: "\e123";
+}
+.glyphicon-certificate:before {
+ content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+.glyphicon-hand-right:before {
+ content: "\e127";
+}
+.glyphicon-hand-left:before {
+ content: "\e128";
+}
+.glyphicon-hand-up:before {
+ content: "\e129";
+}
+.glyphicon-hand-down:before {
+ content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+.glyphicon-globe:before {
+ content: "\e135";
+}
+.glyphicon-wrench:before {
+ content: "\e136";
+}
+.glyphicon-tasks:before {
+ content: "\e137";
+}
+.glyphicon-filter:before {
+ content: "\e138";
+}
+.glyphicon-briefcase:before {
+ content: "\e139";
+}
+.glyphicon-fullscreen:before {
+ content: "\e140";
+}
+.glyphicon-dashboard:before {
+ content: "\e141";
+}
+.glyphicon-paperclip:before {
+ content: "\e142";
+}
+.glyphicon-heart-empty:before {
+ content: "\e143";
+}
+.glyphicon-link:before {
+ content: "\e144";
+}
+.glyphicon-phone:before {
+ content: "\e145";
+}
+.glyphicon-pushpin:before {
+ content: "\e146";
+}
+.glyphicon-usd:before {
+ content: "\e148";
+}
+.glyphicon-gbp:before {
+ content: "\e149";
+}
+.glyphicon-sort:before {
+ content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+.glyphicon-unchecked:before {
+ content: "\e157";
+}
+.glyphicon-expand:before {
+ content: "\e158";
+}
+.glyphicon-collapse-down:before {
+ content: "\e159";
+}
+.glyphicon-collapse-up:before {
+ content: "\e160";
+}
+.glyphicon-log-in:before {
+ content: "\e161";
+}
+.glyphicon-flash:before {
+ content: "\e162";
+}
+.glyphicon-log-out:before {
+ content: "\e163";
+}
+.glyphicon-new-window:before {
+ content: "\e164";
+}
+.glyphicon-record:before {
+ content: "\e165";
+}
+.glyphicon-save:before {
+ content: "\e166";
+}
+.glyphicon-open:before {
+ content: "\e167";
+}
+.glyphicon-saved:before {
+ content: "\e168";
+}
+.glyphicon-import:before {
+ content: "\e169";
+}
+.glyphicon-export:before {
+ content: "\e170";
+}
+.glyphicon-send:before {
+ content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+.glyphicon-floppy-save:before {
+ content: "\e175";
+}
+.glyphicon-floppy-open:before {
+ content: "\e176";
+}
+.glyphicon-credit-card:before {
+ content: "\e177";
+}
+.glyphicon-transfer:before {
+ content: "\e178";
+}
+.glyphicon-cutlery:before {
+ content: "\e179";
+}
+.glyphicon-header:before {
+ content: "\e180";
+}
+.glyphicon-compressed:before {
+ content: "\e181";
+}
+.glyphicon-earphone:before {
+ content: "\e182";
+}
+.glyphicon-phone-alt:before {
+ content: "\e183";
+}
+.glyphicon-tower:before {
+ content: "\e184";
+}
+.glyphicon-stats:before {
+ content: "\e185";
+}
+.glyphicon-sd-video:before {
+ content: "\e186";
+}
+.glyphicon-hd-video:before {
+ content: "\e187";
+}
+.glyphicon-subtitles:before {
+ content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+.glyphicon-registration-mark:before {
+ content: "\e195";
+}
+.glyphicon-cloud-download:before {
+ content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+*:before,
+*:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+html {
+ font-size: 10px;
+
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #333;
+ background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+a {
+ color: #337ab7;
+ text-decoration: none;
+}
+a:hover,
+a:focus {
+ color: #23527c;
+ text-decoration: underline;
+}
+a:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+figure {
+ margin: 0;
+}
+img {
+ vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.img-rounded {
+ border-radius: 6px;
+}
+.img-thumbnail {
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+ padding: 4px;
+ line-height: 1.42857143;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ -webkit-transition: all .2s ease-in-out;
+ -o-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.img-circle {
+ border-radius: 50%;
+}
+hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eee;
+}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+ font-family: inherit;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+ font-weight: normal;
+ line-height: 1;
+ color: #777;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+ font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+ font-size: 75%;
+}
+h1,
+.h1 {
+ font-size: 36px;
+}
+h2,
+.h2 {
+ font-size: 30px;
+}
+h3,
+.h3 {
+ font-size: 24px;
+}
+h4,
+.h4 {
+ font-size: 18px;
+}
+h5,
+.h5 {
+ font-size: 14px;
+}
+h6,
+.h6 {
+ font-size: 12px;
+}
+p {
+ margin: 0 0 10px;
+}
+.lead {
+ margin-bottom: 20px;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 1.4;
+}
+@media (min-width: 768px) {
+ .lead {
+ font-size: 21px;
+ }
+}
+small,
+.small {
+ font-size: 85%;
+}
+mark,
+.mark {
+ padding: .2em;
+ background-color: #fcf8e3;
+}
+.text-left {
+ text-align: left;
+}
+.text-right {
+ text-align: right;
+}
+.text-center {
+ text-align: center;
+}
+.text-justify {
+ text-align: justify;
+}
+.text-nowrap {
+ white-space: nowrap;
+}
+.text-lowercase {
+ text-transform: lowercase;
+}
+.text-uppercase {
+ text-transform: uppercase;
+}
+.text-capitalize {
+ text-transform: capitalize;
+}
+.text-muted {
+ color: #777;
+}
+.text-primary {
+ color: #337ab7;
+}
+a.text-primary:hover {
+ color: #286090;
+}
+.text-success {
+ color: #3c763d;
+}
+a.text-success:hover {
+ color: #2b542c;
+}
+.text-info {
+ color: #31708f;
+}
+a.text-info:hover {
+ color: #245269;
+}
+.text-warning {
+ color: #8a6d3b;
+}
+a.text-warning:hover {
+ color: #66512c;
+}
+.text-danger {
+ color: #a94442;
+}
+a.text-danger:hover {
+ color: #843534;
+}
+.bg-primary {
+ color: #fff;
+ background-color: #337ab7;
+}
+a.bg-primary:hover {
+ background-color: #286090;
+}
+.bg-success {
+ background-color: #dff0d8;
+}
+a.bg-success:hover {
+ background-color: #c1e2b3;
+}
+.bg-info {
+ background-color: #d9edf7;
+}
+a.bg-info:hover {
+ background-color: #afd9ee;
+}
+.bg-warning {
+ background-color: #fcf8e3;
+}
+a.bg-warning:hover {
+ background-color: #f7ecb5;
+}
+.bg-danger {
+ background-color: #f2dede;
+}
+a.bg-danger:hover {
+ background-color: #e4b9b9;
+}
+.page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+ margin-bottom: 0;
+}
+.list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+.list-inline {
+ padding-left: 0;
+ margin-left: -5px;
+ list-style: none;
+}
+.list-inline > li {
+ display: inline-block;
+ padding-right: 5px;
+ padding-left: 5px;
+}
+dl {
+ margin-top: 0;
+ margin-bottom: 20px;
+}
+dt,
+dd {
+ line-height: 1.42857143;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ overflow: hidden;
+ clear: left;
+ text-align: right;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .dl-horizontal dd {
+ margin-left: 180px;
+ }
+}
+abbr[title],
+abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #777;
+}
+.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ font-size: 17.5px;
+ border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+ margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+ display: block;
+ font-size: 80%;
+ line-height: 1.42857143;
+ color: #777;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+ content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ text-align: right;
+ border-right: 5px solid #eee;
+ border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+ content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+ content: '\00A0 \2014';
+}
+address {
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ border-radius: 4px;
+}
+kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #fff;
+ background-color: #333;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+kbd kbd {
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.42857143;
+ color: #333;
+ word-break: break-all;
+ word-wrap: break-word;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0;
+}
+.pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+.container {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+@media (min-width: 768px) {
+ .container {
+ width: 750px;
+ }
+}
+@media (min-width: 992px) {
+ .container {
+ width: 970px;
+ }
+}
+@media (min-width: 1200px) {
+ .container {
+ width: 1170px;
+ }
+}
+.container-fluid {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+.row {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+ float: left;
+}
+.col-xs-12 {
+ width: 100%;
+}
+.col-xs-11 {
+ width: 91.66666667%;
+}
+.col-xs-10 {
+ width: 83.33333333%;
+}
+.col-xs-9 {
+ width: 75%;
+}
+.col-xs-8 {
+ width: 66.66666667%;
+}
+.col-xs-7 {
+ width: 58.33333333%;
+}
+.col-xs-6 {
+ width: 50%;
+}
+.col-xs-5 {
+ width: 41.66666667%;
+}
+.col-xs-4 {
+ width: 33.33333333%;
+}
+.col-xs-3 {
+ width: 25%;
+}
+.col-xs-2 {
+ width: 16.66666667%;
+}
+.col-xs-1 {
+ width: 8.33333333%;
+}
+.col-xs-pull-12 {
+ right: 100%;
+}
+.col-xs-pull-11 {
+ right: 91.66666667%;
+}
+.col-xs-pull-10 {
+ right: 83.33333333%;
+}
+.col-xs-pull-9 {
+ right: 75%;
+}
+.col-xs-pull-8 {
+ right: 66.66666667%;
+}
+.col-xs-pull-7 {
+ right: 58.33333333%;
+}
+.col-xs-pull-6 {
+ right: 50%;
+}
+.col-xs-pull-5 {
+ right: 41.66666667%;
+}
+.col-xs-pull-4 {
+ right: 33.33333333%;
+}
+.col-xs-pull-3 {
+ right: 25%;
+}
+.col-xs-pull-2 {
+ right: 16.66666667%;
+}
+.col-xs-pull-1 {
+ right: 8.33333333%;
+}
+.col-xs-pull-0 {
+ right: auto;
+}
+.col-xs-push-12 {
+ left: 100%;
+}
+.col-xs-push-11 {
+ left: 91.66666667%;
+}
+.col-xs-push-10 {
+ left: 83.33333333%;
+}
+.col-xs-push-9 {
+ left: 75%;
+}
+.col-xs-push-8 {
+ left: 66.66666667%;
+}
+.col-xs-push-7 {
+ left: 58.33333333%;
+}
+.col-xs-push-6 {
+ left: 50%;
+}
+.col-xs-push-5 {
+ left: 41.66666667%;
+}
+.col-xs-push-4 {
+ left: 33.33333333%;
+}
+.col-xs-push-3 {
+ left: 25%;
+}
+.col-xs-push-2 {
+ left: 16.66666667%;
+}
+.col-xs-push-1 {
+ left: 8.33333333%;
+}
+.col-xs-push-0 {
+ left: auto;
+}
+.col-xs-offset-12 {
+ margin-left: 100%;
+}
+.col-xs-offset-11 {
+ margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+ margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+ margin-left: 75%;
+}
+.col-xs-offset-8 {
+ margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+ margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+ margin-left: 50%;
+}
+.col-xs-offset-5 {
+ margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+ margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+ margin-left: 25%;
+}
+.col-xs-offset-2 {
+ margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+ margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+ float: left;
+ }
+ .col-sm-12 {
+ width: 100%;
+ }
+ .col-sm-11 {
+ width: 91.66666667%;
+ }
+ .col-sm-10 {
+ width: 83.33333333%;
+ }
+ .col-sm-9 {
+ width: 75%;
+ }
+ .col-sm-8 {
+ width: 66.66666667%;
+ }
+ .col-sm-7 {
+ width: 58.33333333%;
+ }
+ .col-sm-6 {
+ width: 50%;
+ }
+ .col-sm-5 {
+ width: 41.66666667%;
+ }
+ .col-sm-4 {
+ width: 33.33333333%;
+ }
+ .col-sm-3 {
+ width: 25%;
+ }
+ .col-sm-2 {
+ width: 16.66666667%;
+ }
+ .col-sm-1 {
+ width: 8.33333333%;
+ }
+ .col-sm-pull-12 {
+ right: 100%;
+ }
+ .col-sm-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-sm-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-sm-pull-9 {
+ right: 75%;
+ }
+ .col-sm-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-sm-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-sm-pull-6 {
+ right: 50%;
+ }
+ .col-sm-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-sm-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-sm-pull-3 {
+ right: 25%;
+ }
+ .col-sm-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-sm-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-sm-pull-0 {
+ right: auto;
+ }
+ .col-sm-push-12 {
+ left: 100%;
+ }
+ .col-sm-push-11 {
+ left: 91.66666667%;
+ }
+ .col-sm-push-10 {
+ left: 83.33333333%;
+ }
+ .col-sm-push-9 {
+ left: 75%;
+ }
+ .col-sm-push-8 {
+ left: 66.66666667%;
+ }
+ .col-sm-push-7 {
+ left: 58.33333333%;
+ }
+ .col-sm-push-6 {
+ left: 50%;
+ }
+ .col-sm-push-5 {
+ left: 41.66666667%;
+ }
+ .col-sm-push-4 {
+ left: 33.33333333%;
+ }
+ .col-sm-push-3 {
+ left: 25%;
+ }
+ .col-sm-push-2 {
+ left: 16.66666667%;
+ }
+ .col-sm-push-1 {
+ left: 8.33333333%;
+ }
+ .col-sm-push-0 {
+ left: auto;
+ }
+ .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .col-sm-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-sm-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .col-sm-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-sm-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .col-sm-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-sm-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .col-sm-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-sm-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-sm-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 992px) {
+ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+ float: left;
+ }
+ .col-md-12 {
+ width: 100%;
+ }
+ .col-md-11 {
+ width: 91.66666667%;
+ }
+ .col-md-10 {
+ width: 83.33333333%;
+ }
+ .col-md-9 {
+ width: 75%;
+ }
+ .col-md-8 {
+ width: 66.66666667%;
+ }
+ .col-md-7 {
+ width: 58.33333333%;
+ }
+ .col-md-6 {
+ width: 50%;
+ }
+ .col-md-5 {
+ width: 41.66666667%;
+ }
+ .col-md-4 {
+ width: 33.33333333%;
+ }
+ .col-md-3 {
+ width: 25%;
+ }
+ .col-md-2 {
+ width: 16.66666667%;
+ }
+ .col-md-1 {
+ width: 8.33333333%;
+ }
+ .col-md-pull-12 {
+ right: 100%;
+ }
+ .col-md-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-md-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-md-pull-9 {
+ right: 75%;
+ }
+ .col-md-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-md-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-md-pull-6 {
+ right: 50%;
+ }
+ .col-md-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-md-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-md-pull-3 {
+ right: 25%;
+ }
+ .col-md-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-md-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-md-pull-0 {
+ right: auto;
+ }
+ .col-md-push-12 {
+ left: 100%;
+ }
+ .col-md-push-11 {
+ left: 91.66666667%;
+ }
+ .col-md-push-10 {
+ left: 83.33333333%;
+ }
+ .col-md-push-9 {
+ left: 75%;
+ }
+ .col-md-push-8 {
+ left: 66.66666667%;
+ }
+ .col-md-push-7 {
+ left: 58.33333333%;
+ }
+ .col-md-push-6 {
+ left: 50%;
+ }
+ .col-md-push-5 {
+ left: 41.66666667%;
+ }
+ .col-md-push-4 {
+ left: 33.33333333%;
+ }
+ .col-md-push-3 {
+ left: 25%;
+ }
+ .col-md-push-2 {
+ left: 16.66666667%;
+ }
+ .col-md-push-1 {
+ left: 8.33333333%;
+ }
+ .col-md-push-0 {
+ left: auto;
+ }
+ .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .col-md-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-md-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .col-md-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-md-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .col-md-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-md-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .col-md-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-md-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-md-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 1200px) {
+ .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+ float: left;
+ }
+ .col-lg-12 {
+ width: 100%;
+ }
+ .col-lg-11 {
+ width: 91.66666667%;
+ }
+ .col-lg-10 {
+ width: 83.33333333%;
+ }
+ .col-lg-9 {
+ width: 75%;
+ }
+ .col-lg-8 {
+ width: 66.66666667%;
+ }
+ .col-lg-7 {
+ width: 58.33333333%;
+ }
+ .col-lg-6 {
+ width: 50%;
+ }
+ .col-lg-5 {
+ width: 41.66666667%;
+ }
+ .col-lg-4 {
+ width: 33.33333333%;
+ }
+ .col-lg-3 {
+ width: 25%;
+ }
+ .col-lg-2 {
+ width: 16.66666667%;
+ }
+ .col-lg-1 {
+ width: 8.33333333%;
+ }
+ .col-lg-pull-12 {
+ right: 100%;
+ }
+ .col-lg-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-lg-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-lg-pull-9 {
+ right: 75%;
+ }
+ .col-lg-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-lg-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-lg-pull-6 {
+ right: 50%;
+ }
+ .col-lg-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-lg-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-lg-pull-3 {
+ right: 25%;
+ }
+ .col-lg-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-lg-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-lg-pull-0 {
+ right: auto;
+ }
+ .col-lg-push-12 {
+ left: 100%;
+ }
+ .col-lg-push-11 {
+ left: 91.66666667%;
+ }
+ .col-lg-push-10 {
+ left: 83.33333333%;
+ }
+ .col-lg-push-9 {
+ left: 75%;
+ }
+ .col-lg-push-8 {
+ left: 66.66666667%;
+ }
+ .col-lg-push-7 {
+ left: 58.33333333%;
+ }
+ .col-lg-push-6 {
+ left: 50%;
+ }
+ .col-lg-push-5 {
+ left: 41.66666667%;
+ }
+ .col-lg-push-4 {
+ left: 33.33333333%;
+ }
+ .col-lg-push-3 {
+ left: 25%;
+ }
+ .col-lg-push-2 {
+ left: 16.66666667%;
+ }
+ .col-lg-push-1 {
+ left: 8.33333333%;
+ }
+ .col-lg-push-0 {
+ left: auto;
+ }
+ .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .col-lg-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-lg-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .col-lg-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-lg-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .col-lg-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-lg-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .col-lg-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-lg-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-lg-offset-0 {
+ margin-left: 0;
+ }
+}
+table {
+ background-color: transparent;
+}
+caption {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ color: #777;
+ text-align: left;
+}
+th {
+ text-align: left;
+}
+.table {
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.table > tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table .table {
+ background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) {
+ background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover {
+ background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+ position: static;
+ display: table-column;
+ float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+ position: static;
+ display: table-cell;
+ float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+ background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+ background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+ background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+}
+.table-responsive {
+ min-height: .01%;
+ overflow-x: auto;
+}
+@media screen and (max-width: 767px) {
+ .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ border: 1px solid #ddd;
+ }
+ .table-responsive > .table {
+ margin-bottom: 0;
+ }
+ .table-responsive > .table > thead > tr > th,
+ .table-responsive > .table > tbody > tr > th,
+ .table-responsive > .table > tfoot > tr > th,
+ .table-responsive > .table > thead > tr > td,
+ .table-responsive > .table > tbody > tr > td,
+ .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+fieldset {
+ min-width: 0;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+label {
+ display: inline-block;
+ max-width: 100%;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ line-height: normal;
+}
+input[type="file"] {
+ display: block;
+}
+input[type="range"] {
+ display: block;
+ width: 100%;
+}
+select[multiple],
+select[size] {
+ height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+}
+.form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+ -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.form-control::-moz-placeholder {
+ color: #999;
+ opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+ color: #999;
+}
+.form-control::-webkit-input-placeholder {
+ color: #999;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+ background-color: #eee;
+ opacity: 1;
+}
+textarea.form-control {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-appearance: none;
+}
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+ input[type="date"],
+ input[type="time"],
+ input[type="datetime-local"],
+ input[type="month"] {
+ line-height: 34px;
+ }
+ input[type="date"].input-sm,
+ input[type="time"].input-sm,
+ input[type="datetime-local"].input-sm,
+ input[type="month"].input-sm {
+ line-height: 30px;
+ }
+ input[type="date"].input-lg,
+ input[type="time"].input-lg,
+ input[type="datetime-local"].input-lg,
+ input[type="month"].input-lg {
+ line-height: 46px;
+ }
+}
+.form-group {
+ margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+ position: relative;
+ display: block;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+ min-height: 20px;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+ position: absolute;
+ margin-top: 4px \9;
+ margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+ margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ vertical-align: middle;
+ cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"].disabled,
+input[type="checkbox"].disabled,
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"] {
+ cursor: not-allowed;
+}
+.radio-inline.disabled,
+.checkbox-inline.disabled,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox-inline {
+ cursor: not-allowed;
+}
+.radio.disabled label,
+.checkbox.disabled label,
+fieldset[disabled] .radio label,
+fieldset[disabled] .checkbox label {
+ cursor: not-allowed;
+}
+.form-control-static {
+ padding-top: 7px;
+ padding-bottom: 7px;
+ margin-bottom: 0;
+}
+.form-control-static.input-lg,
+.form-control-static.input-sm {
+ padding-right: 0;
+ padding-left: 0;
+}
+.input-sm,
+.form-group-sm .form-control {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-sm,
+select.form-group-sm .form-control {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-sm,
+textarea.form-group-sm .form-control,
+select[multiple].input-sm,
+select[multiple].form-group-sm .form-control {
+ height: auto;
+}
+.input-lg,
+.form-group-lg .form-control {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.input-lg,
+select.form-group-lg .form-control {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-lg,
+textarea.form-group-lg .form-control,
+select[multiple].input-lg,
+select[multiple].form-group-lg .form-control {
+ height: auto;
+}
+.has-feedback {
+ position: relative;
+}
+.has-feedback .form-control {
+ padding-right: 42.5px;
+}
+.form-control-feedback {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 2;
+ display: block;
+ width: 34px;
+ height: 34px;
+ line-height: 34px;
+ text-align: center;
+ pointer-events: none;
+}
+.input-lg + .form-control-feedback {
+ width: 46px;
+ height: 46px;
+ line-height: 46px;
+}
+.input-sm + .form-control-feedback {
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline,
+.has-success.radio label,
+.has-success.checkbox label,
+.has-success.radio-inline label,
+.has-success.checkbox-inline label {
+ color: #3c763d;
+}
+.has-success .form-control {
+ border-color: #3c763d;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .form-control:focus {
+ border-color: #2b542c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #3c763d;
+}
+.has-success .form-control-feedback {
+ color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline,
+.has-warning.radio label,
+.has-warning.checkbox label,
+.has-warning.radio-inline label,
+.has-warning.checkbox-inline label {
+ color: #8a6d3b;
+}
+.has-warning .form-control {
+ border-color: #8a6d3b;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .form-control:focus {
+ border-color: #66512c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #8a6d3b;
+}
+.has-warning .form-control-feedback {
+ color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline,
+.has-error.radio label,
+.has-error.checkbox label,
+.has-error.radio-inline label,
+.has-error.checkbox-inline label {
+ color: #a94442;
+}
+.has-error .form-control {
+ border-color: #a94442;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .form-control:focus {
+ border-color: #843534;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #a94442;
+}
+.has-error .form-control-feedback {
+ color: #a94442;
+}
+.has-feedback label ~ .form-control-feedback {
+ top: 25px;
+}
+.has-feedback label.sr-only ~ .form-control-feedback {
+ top: 0;
+}
+.help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+@media (min-width: 768px) {
+ .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .form-inline .form-control-static {
+ display: inline-block;
+ }
+ .form-inline .input-group {
+ display: inline-table;
+ vertical-align: middle;
+ }
+ .form-inline .input-group .input-group-addon,
+ .form-inline .input-group .input-group-btn,
+ .form-inline .input-group .form-control {
+ width: auto;
+ }
+ .form-inline .input-group > .form-control {
+ width: 100%;
+ }
+ .form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio,
+ .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio label,
+ .form-inline .checkbox label {
+ padding-left: 0;
+ }
+ .form-inline .radio input[type="radio"],
+ .form-inline .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+ }
+ .form-inline .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 7px;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+ min-height: 27px;
+}
+.form-horizontal .form-group {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .form-horizontal .control-label {
+ padding-top: 7px;
+ margin-bottom: 0;
+ text-align: right;
+ }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+ right: 15px;
+}
+@media (min-width: 768px) {
+ .form-horizontal .form-group-lg .control-label {
+ padding-top: 14.3px;
+ }
+}
+@media (min-width: 768px) {
+ .form-horizontal .form-group-sm .control-label {
+ padding-top: 6px;
+ }
+}
+.btn {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus,
+.btn.focus,
+.btn:active.focus,
+.btn.active.focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus,
+.btn.focus {
+ color: #333;
+ text-decoration: none;
+}
+.btn:active,
+.btn.active {
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+ pointer-events: none;
+ cursor: not-allowed;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ opacity: .65;
+}
+.btn-default {
+ color: #333;
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus,
+.btn-default.focus,
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default .badge {
+ color: #fff;
+ background-color: #333;
+}
+.btn-primary {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary.focus,
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary .badge {
+ color: #337ab7;
+ background-color: #fff;
+}
+.btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success.focus,
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff;
+}
+.btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info.focus,
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff;
+}
+.btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning.focus,
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff;
+}
+.btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger.focus,
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff;
+}
+.btn-link {
+ font-weight: normal;
+ color: #337ab7;
+ border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link.active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+ border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+ color: #23527c;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+ color: #777;
+ text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-block {
+ display: block;
+ width: 100%;
+}
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+ width: 100%;
+}
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity .15s linear;
+ -o-transition: opacity .15s linear;
+ transition: opacity .15s linear;
+}
+.fade.in {
+ opacity: 1;
+}
+.collapse {
+ display: none;
+ visibility: hidden;
+}
+.collapse.in {
+ display: block;
+ visibility: visible;
+}
+tr.collapse.in {
+ display: table-row;
+}
+tbody.collapse.in {
+ display: table-row-group;
+}
+.collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition-timing-function: ease;
+ -o-transition-timing-function: ease;
+ transition-timing-function: ease;
+ -webkit-transition-duration: .35s;
+ -o-transition-duration: .35s;
+ transition-duration: .35s;
+ -webkit-transition-property: height, visibility;
+ -o-transition-property: height, visibility;
+ transition-property: height, visibility;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px solid;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+}
+.dropdown {
+ position: relative;
+}
+.dropdown-toggle:focus {
+ outline: 0;
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ font-size: 14px;
+ text-align: left;
+ list-style: none;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.42857143;
+ color: #333;
+ white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #262626;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ color: #fff;
+ text-decoration: none;
+ background-color: #337ab7;
+ outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+ display: block;
+}
+.open > a {
+ outline: 0;
+}
+.dropdown-menu-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu-left {
+ right: auto;
+ left: 0;
+}
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.42857143;
+ color: #777;
+ white-space: nowrap;
+}
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 990;
+}
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ content: "";
+ border-top: 0;
+ border-bottom: 4px solid;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+ .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+ .navbar-right .dropdown-menu-left {
+ right: auto;
+ left: 0;
+ }
+}
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+.btn-toolbar {
+ margin-left: -5px;
+}
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+ float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+ margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+.btn-group > .btn:first-child {
+ margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+ float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child > .btn:first-child {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+ padding-right: 8px;
+ padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+ padding-right: 12px;
+ padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn .caret {
+ margin-left: 0;
+}
+.btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+ display: table-cell;
+ float: none;
+ width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+ width: 100%;
+}
+.btn-group-justified > .btn-group .dropdown-menu {
+ left: auto;
+}
+[data-toggle="buttons"] > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn input[type="checkbox"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none;
+}
+.input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+.input-group[class*="col-"] {
+ float: none;
+ padding-right: 0;
+ padding-left: 0;
+}
+.input-group .form-control {
+ position: relative;
+ z-index: 2;
+ float: left;
+ width: 100%;
+ margin-bottom: 0;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+.input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ color: #555;
+ text-align: center;
+ background-color: #eee;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+.input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+.input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+ border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+ border-left: 0;
+}
+.input-group-btn {
+ position: relative;
+ font-size: 0;
+ white-space: nowrap;
+}
+.input-group-btn > .btn {
+ position: relative;
+}
+.input-group-btn > .btn + .btn {
+ margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+ z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+ margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+ margin-left: -1px;
+}
+.nav {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+.nav > li {
+ position: relative;
+ display: block;
+}
+.nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eee;
+}
+.nav > li.disabled > a {
+ color: #777;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+ color: #777;
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+ background-color: #eee;
+ border-color: #337ab7;
+}
+.nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.nav > li > a > img {
+ max-width: none;
+}
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.42857143;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+ border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+ color: #555;
+ cursor: default;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+ float: none;
+}
+.nav-tabs.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-tabs.nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs.nav-justified > .active > a,
+ .nav-tabs.nav-justified > .active > a:hover,
+ .nav-tabs.nav-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.nav-pills > li {
+ float: left;
+}
+.nav-pills > li > a {
+ border-radius: 4px;
+}
+.nav-pills > li + li {
+ margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+ color: #fff;
+ background-color: #337ab7;
+}
+.nav-stacked > li {
+ float: none;
+}
+.nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+.nav-justified {
+ width: 100%;
+}
+.nav-justified > li {
+ float: none;
+}
+.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs-justified {
+ border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs-justified > .active > a,
+ .nav-tabs-justified > .active > a:hover,
+ .nav-tabs-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.tab-content > .tab-pane {
+ display: none;
+ visibility: hidden;
+}
+.tab-content > .active {
+ display: block;
+ visibility: visible;
+}
+.nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar {
+ position: relative;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+ .navbar {
+ border-radius: 4px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-header {
+ float: left;
+ }
+}
+.navbar-collapse {
+ padding-right: 15px;
+ padding-left: 15px;
+ overflow-x: visible;
+ -webkit-overflow-scrolling: touch;
+ border-top: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+}
+.navbar-collapse.in {
+ overflow-y: auto;
+}
+@media (min-width: 768px) {
+ .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+ .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ visibility: visible !important;
+ }
+ .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .navbar-fixed-top .navbar-collapse,
+ .navbar-static-top .navbar-collapse,
+ .navbar-fixed-bottom .navbar-collapse {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+.navbar-fixed-top .navbar-collapse,
+.navbar-fixed-bottom .navbar-collapse {
+ max-height: 340px;
+}
+@media (max-device-width: 480px) and (orientation: landscape) {
+ .navbar-fixed-top .navbar-collapse,
+ .navbar-fixed-bottom .navbar-collapse {
+ max-height: 200px;
+ }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .container > .navbar-header,
+ .container-fluid > .navbar-header,
+ .container > .navbar-collapse,
+ .container-fluid > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+.navbar-static-top {
+ z-index: 1000;
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .navbar-static-top {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+@media (min-width: 768px) {
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top {
+ top: 0;
+ border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+ border-width: 1px 0 0;
+}
+.navbar-brand {
+ float: left;
+ height: 50px;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+ text-decoration: none;
+}
+.navbar-brand > img {
+ display: block;
+}
+@media (min-width: 768px) {
+ .navbar > .container .navbar-brand,
+ .navbar > .container-fluid .navbar-brand {
+ margin-left: -15px;
+ }
+}
+.navbar-toggle {
+ position: relative;
+ float: right;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-right: 15px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.navbar-toggle:focus {
+ outline: 0;
+}
+.navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+@media (min-width: 768px) {
+ .navbar-toggle {
+ display: none;
+ }
+}
+.navbar-nav {
+ margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+@media (max-width: 767px) {
+ .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+ .navbar-nav .open .dropdown-menu > li > a,
+ .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .navbar-nav > li {
+ float: left;
+ }
+ .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+}
+.navbar-form {
+ padding: 10px 15px;
+ margin-top: 8px;
+ margin-right: -15px;
+ margin-bottom: 8px;
+ margin-left: -15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+}
+@media (min-width: 768px) {
+ .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control-static {
+ display: inline-block;
+ }
+ .navbar-form .input-group {
+ display: inline-table;
+ vertical-align: middle;
+ }
+ .navbar-form .input-group .input-group-addon,
+ .navbar-form .input-group .input-group-btn,
+ .navbar-form .input-group .form-control {
+ width: auto;
+ }
+ .navbar-form .input-group > .form-control {
+ width: 100%;
+ }
+ .navbar-form .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio,
+ .navbar-form .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio label,
+ .navbar-form .checkbox label {
+ padding-left: 0;
+ }
+ .navbar-form .radio input[type="radio"],
+ .navbar-form .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+ }
+ .navbar-form .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+@media (max-width: 767px) {
+ .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+ .navbar-form .form-group:last-child {
+ margin-bottom: 0;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-form {
+ width: auto;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-right: 0;
+ margin-left: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+}
+.navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+.navbar-btn.btn-sm {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.navbar-btn.btn-xs {
+ margin-top: 14px;
+ margin-bottom: 14px;
+}
+.navbar-text {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+ .navbar-text {
+ float: left;
+ margin-right: 15px;
+ margin-left: 15px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-left {
+ float: left !important;
+ }
+ .navbar-right {
+ float: right !important;
+ margin-right: -15px;
+ }
+ .navbar-right ~ .navbar-right {
+ margin-right: 0;
+ }
+}
+.navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+ color: #777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+.navbar-default .navbar-text {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: #333;
+ background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+ color: #ccc;
+ background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+ border-color: #ddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+ background-color: #ddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: #888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333;
+ background-color: transparent;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-me
<TRUNCATED>
[34/41] incubator-htrace git commit: HTRACE-154. Move go and web to
htrace-htraced (abe via cmccabe)
Posted by cm...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/39e89ea0/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.js b/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
deleted file mode 100644
index b6ac8d9..0000000
--- a/htrace-core/src/web/lib/bootstrap-3.3.1/js/bootstrap.js
+++ /dev/null
@@ -1,2320 +0,0 @@
-/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-if (typeof jQuery === 'undefined') {
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
-}
-
-+function ($) {
- var version = $.fn.jquery.split(' ')[0].split('.')
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
- }
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: transition.js v3.3.1
- * http://getbootstrap.com/javascript/#transitions
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
- // ============================================================
-
- function transitionEnd() {
- var el = document.createElement('bootstrap')
-
- var transEndEventNames = {
- WebkitTransition : 'webkitTransitionEnd',
- MozTransition : 'transitionend',
- OTransition : 'oTransitionEnd otransitionend',
- transition : 'transitionend'
- }
-
- for (var name in transEndEventNames) {
- if (el.style[name] !== undefined) {
- return { end: transEndEventNames[name] }
- }
- }
-
- return false // explicit for ie8 ( ._.)
- }
-
- // http://blog.alexmaccaw.com/css-transitions
- $.fn.emulateTransitionEnd = function (duration) {
- var called = false
- var $el = this
- $(this).one('bsTransitionEnd', function () { called = true })
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
- setTimeout(callback, duration)
- return this
- }
-
- $(function () {
- $.support.transition = transitionEnd()
-
- if (!$.support.transition) return
-
- $.event.special.bsTransitionEnd = {
- bindType: $.support.transition.end,
- delegateType: $.support.transition.end,
- handle: function (e) {
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
- }
- }
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: alert.js v3.3.1
- * http://getbootstrap.com/javascript/#alerts
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // ALERT CLASS DEFINITION
- // ======================
-
- var dismiss = '[data-dismiss="alert"]'
- var Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.VERSION = '3.3.1'
-
- Alert.TRANSITION_DURATION = 150
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = $(selector)
-
- if (e) e.preventDefault()
-
- if (!$parent.length) {
- $parent = $this.closest('.alert')
- }
-
- $parent.trigger(e = $.Event('close.bs.alert'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- // detach from parent, fire event then clean up data
- $parent.detach().trigger('closed.bs.alert').remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent
- .one('bsTransitionEnd', removeElement)
- .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
- removeElement()
- }
-
-
- // ALERT PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.alert')
-
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.alert
-
- $.fn.alert = Plugin
- $.fn.alert.Constructor = Alert
-
-
- // ALERT NO CONFLICT
- // =================
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- // ALERT DATA-API
- // ==============
-
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: button.js v3.3.1
- * http://getbootstrap.com/javascript/#buttons
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // BUTTON PUBLIC CLASS DEFINITION
- // ==============================
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Button.DEFAULTS, options)
- this.isLoading = false
- }
-
- Button.VERSION = '3.3.1'
-
- Button.DEFAULTS = {
- loadingText: 'loading...'
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- var $el = this.$element
- var val = $el.is('input') ? 'val' : 'html'
- var data = $el.data()
-
- state = state + 'Text'
-
- if (data.resetText == null) $el.data('resetText', $el[val]())
-
- // push to event loop to allow forms to submit
- setTimeout($.proxy(function () {
- $el[val](data[state] == null ? this.options[state] : data[state])
-
- if (state == 'loadingText') {
- this.isLoading = true
- $el.addClass(d).attr(d, d)
- } else if (this.isLoading) {
- this.isLoading = false
- $el.removeClass(d).removeAttr(d)
- }
- }, this), 0)
- }
-
- Button.prototype.toggle = function () {
- var changed = true
- var $parent = this.$element.closest('[data-toggle="buttons"]')
-
- if ($parent.length) {
- var $input = this.$element.find('input')
- if ($input.prop('type') == 'radio') {
- if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
- else $parent.find('.active').removeClass('active')
- }
- if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
- } else {
- this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
- }
-
- if (changed) this.$element.toggleClass('active')
- }
-
-
- // BUTTON PLUGIN DEFINITION
- // ========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.button')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
-
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- var old = $.fn.button
-
- $.fn.button = Plugin
- $.fn.button.Constructor = Button
-
-
- // BUTTON NO CONFLICT
- // ==================
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- // BUTTON DATA-API
- // ===============
-
- $(document)
- .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- Plugin.call($btn, 'toggle')
- e.preventDefault()
- })
- .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: carousel.js v3.3.1
- * http://getbootstrap.com/javascript/#carousel
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CAROUSEL CLASS DEFINITION
- // =========================
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.paused =
- this.sliding =
- this.interval =
- this.$active =
- this.$items = null
-
- this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
-
- this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
- }
-
- Carousel.VERSION = '3.3.1'
-
- Carousel.TRANSITION_DURATION = 600
-
- Carousel.DEFAULTS = {
- interval: 5000,
- pause: 'hover',
- wrap: true,
- keyboard: true
- }
-
- Carousel.prototype.keydown = function (e) {
- if (/input|textarea/i.test(e.target.tagName)) return
- switch (e.which) {
- case 37: this.prev(); break
- case 39: this.next(); break
- default: return
- }
-
- e.preventDefault()
- }
-
- Carousel.prototype.cycle = function (e) {
- e || (this.paused = false)
-
- this.interval && clearInterval(this.interval)
-
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
-
- return this
- }
-
- Carousel.prototype.getItemIndex = function (item) {
- this.$items = item.parent().children('.item')
- return this.$items.index(item || this.$active)
- }
-
- Carousel.prototype.getItemForDirection = function (direction, active) {
- var delta = direction == 'prev' ? -1 : 1
- var activeIndex = this.getItemIndex(active)
- var itemIndex = (activeIndex + delta) % this.$items.length
- return this.$items.eq(itemIndex)
- }
-
- Carousel.prototype.to = function (pos) {
- var that = this
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
- if (activeIndex == pos) return this.pause().cycle()
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
- }
-
- Carousel.prototype.pause = function (e) {
- e || (this.paused = true)
-
- if (this.$element.find('.next, .prev').length && $.support.transition) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
-
- this.interval = clearInterval(this.interval)
-
- return this
- }
-
- Carousel.prototype.next = function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- Carousel.prototype.prev = function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- Carousel.prototype.slide = function (type, next) {
- var $active = this.$element.find('.item.active')
- var $next = next || this.getItemForDirection(type, $active)
- var isCycling = this.interval
- var direction = type == 'next' ? 'left' : 'right'
- var fallback = type == 'next' ? 'first' : 'last'
- var that = this
-
- if (!$next.length) {
- if (!this.options.wrap) return
- $next = this.$element.find('.item')[fallback]()
- }
-
- if ($next.hasClass('active')) return (this.sliding = false)
-
- var relatedTarget = $next[0]
- var slideEvent = $.Event('slide.bs.carousel', {
- relatedTarget: relatedTarget,
- direction: direction
- })
- this.$element.trigger(slideEvent)
- if (slideEvent.isDefaultPrevented()) return
-
- this.sliding = true
-
- isCycling && this.pause()
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
- $nextIndicator && $nextIndicator.addClass('active')
- }
-
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
- if ($.support.transition && this.$element.hasClass('slide')) {
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- $active
- .one('bsTransitionEnd', function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () {
- that.$element.trigger(slidEvent)
- }, 0)
- })
- .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
- } else {
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger(slidEvent)
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.carousel')
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
- var action = typeof option == 'string' ? option : options.slide
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- var old = $.fn.carousel
-
- $.fn.carousel = Plugin
- $.fn.carousel.Constructor = Carousel
-
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
-
- // CAROUSEL DATA-API
- // =================
-
- var clickHandler = function (e) {
- var href
- var $this = $(this)
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
- if (!$target.hasClass('carousel')) return
- var options = $.extend({}, $target.data(), $this.data())
- var slideIndex = $this.attr('data-slide-to')
- if (slideIndex) options.interval = false
-
- Plugin.call($target, options)
-
- if (slideIndex) {
- $target.data('bs.carousel').to(slideIndex)
- }
-
- e.preventDefault()
- }
-
- $(document)
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
-
- $(window).on('load', function () {
- $('[data-ride="carousel"]').each(function () {
- var $carousel = $(this)
- Plugin.call($carousel, $carousel.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: collapse.js v3.3.1
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Collapse.DEFAULTS, options)
- this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
- this.transitioning = null
-
- if (this.options.parent) {
- this.$parent = this.getParent()
- } else {
- this.addAriaAndCollapsedClass(this.$element, this.$trigger)
- }
-
- if (this.options.toggle) this.toggle()
- }
-
- Collapse.VERSION = '3.3.1'
-
- Collapse.TRANSITION_DURATION = 350
-
- Collapse.DEFAULTS = {
- toggle: true,
- trigger: '[data-toggle="collapse"]'
- }
-
- Collapse.prototype.dimension = function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return
-
- var activesData
- var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
-
- if (actives && actives.length) {
- activesData = actives.data('bs.collapse')
- if (activesData && activesData.transitioning) return
- }
-
- var startEvent = $.Event('show.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- if (actives && actives.length) {
- Plugin.call(actives, 'hide')
- activesData || actives.data('bs.collapse', null)
- }
-
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')[dimension](0)
- .attr('aria-expanded', true)
-
- this.$trigger
- .removeClass('collapsed')
- .attr('aria-expanded', true)
-
- this.transitioning = 1
-
- var complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')[dimension]('')
- this.transitioning = 0
- this.$element
- .trigger('shown.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- var scrollSize = $.camelCase(['scroll', dimension].join('-'))
-
- this.$element
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
- }
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return
-
- var startEvent = $.Event('hide.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var dimension = this.dimension()
-
- this.$element[dimension](this.$element[dimension]())[0].offsetHeight
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse in')
- .attr('aria-expanded', false)
-
- this.$trigger
- .addClass('collapsed')
- .attr('aria-expanded', false)
-
- this.transitioning = 1
-
- var complete = function () {
- this.transitioning = 0
- this.$element
- .removeClass('collapsing')
- .addClass('collapse')
- .trigger('hidden.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- this.$element
- [dimension](0)
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
- }
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- Collapse.prototype.getParent = function () {
- return $(this.options.parent)
- .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
- .each($.proxy(function (i, element) {
- var $element = $(element)
- this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
- }, this))
- .end()
- }
-
- Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
- var isOpen = $element.hasClass('in')
-
- $element.attr('aria-expanded', isOpen)
- $trigger
- .toggleClass('collapsed', !isOpen)
- .attr('aria-expanded', isOpen)
- }
-
- function getTargetFromTrigger($trigger) {
- var href
- var target = $trigger.attr('data-target')
- || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
-
- return $(target)
- }
-
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.collapse')
- var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data && options.toggle && option == 'show') options.toggle = false
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.collapse
-
- $.fn.collapse = Plugin
- $.fn.collapse.Constructor = Collapse
-
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
- var $this = $(this)
-
- if (!$this.attr('data-target')) e.preventDefault()
-
- var $target = getTargetFromTrigger($this)
- var data = $target.data('bs.collapse')
- var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
-
- Plugin.call($target, option)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: dropdown.js v3.3.1
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- var backdrop = '.dropdown-backdrop'
- var toggle = '[data-toggle="dropdown"]'
- var Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle)
- }
-
- Dropdown.VERSION = '3.3.1'
-
- Dropdown.prototype.toggle = function (e) {
- var $this = $(this)
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
- }
-
- var relatedTarget = { relatedTarget: this }
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this
- .trigger('focus')
- .attr('aria-expanded', 'true')
-
- $parent
- .toggleClass('open')
- .trigger('shown.bs.dropdown', relatedTarget)
- }
-
- return false
- }
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
-
- var $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
- if (e.which == 27) $parent.find(toggle).trigger('focus')
- return $this.trigger('click')
- }
-
- var desc = ' li:not(.divider):visible a'
- var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
-
- if (!$items.length) return
-
- var index = $items.index(e.target)
-
- if (e.which == 38 && index > 0) index-- // up
- if (e.which == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items.eq(index).trigger('focus')
- }
-
- function clearMenus(e) {
- if (e && e.which === 3) return
- $(backdrop).remove()
- $(toggle).each(function () {
- var $this = $(this)
- var $parent = getParent($this)
- var relatedTarget = { relatedTarget: this }
-
- if (!$parent.hasClass('open')) return
-
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this.attr('aria-expanded', 'false')
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.dropdown')
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = Plugin
- $.fn.dropdown.Constructor = Dropdown
-
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: modal.js v3.3.1
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // MODAL CLASS DEFINITION
- // ======================
-
- var Modal = function (element, options) {
- this.options = options
- this.$body = $(document.body)
- this.$element = $(element)
- this.$backdrop =
- this.isShown = null
- this.scrollbarWidth = 0
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal')
- }, this))
- }
- }
-
- Modal.VERSION = '3.3.1'
-
- Modal.TRANSITION_DURATION = 300
- Modal.BACKDROP_TRANSITION_DURATION = 150
-
- Modal.DEFAULTS = {
- backdrop: true,
- keyboard: true,
- show: true
- }
-
- Modal.prototype.toggle = function (_relatedTarget) {
- return this.isShown ? this.hide() : this.show(_relatedTarget)
- }
-
- Modal.prototype.show = function (_relatedTarget) {
- var that = this
- var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.checkScrollbar()
- this.setScrollbar()
- this.$body.addClass('modal-open')
-
- this.escape()
- this.resize()
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(that.$body) // don't move modals dom position
- }
-
- that.$element
- .show()
- .scrollTop(0)
-
- if (that.options.backdrop) that.adjustBackdrop()
- that.adjustDialog()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
-
- that.enforceFocus()
-
- var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
- transition ?
- that.$element.find('.modal-dialog') // wait for modal to slide in
- .one('bsTransitionEnd', function () {
- that.$element.trigger('focus').trigger(e)
- })
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- that.$element.trigger('focus').trigger(e)
- })
- }
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault()
-
- e = $.Event('hide.bs.modal')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
- this.resize()
-
- $(document).off('focusin.bs.modal')
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
- .off('click.dismiss.bs.modal')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$element
- .one('bsTransitionEnd', $.proxy(this.hideModal, this))
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- this.hideModal()
- }
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.trigger('focus')
- }
- }, this))
- }
-
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide()
- }, this))
- } else if (!this.isShown) {
- this.$element.off('keydown.dismiss.bs.modal')
- }
- }
-
- Modal.prototype.resize = function () {
- if (this.isShown) {
- $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
- } else {
- $(window).off('resize.bs.modal')
- }
- }
-
- Modal.prototype.hideModal = function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.$body.removeClass('modal-open')
- that.resetAdjustments()
- that.resetScrollbar()
- that.$element.trigger('hidden.bs.modal')
- })
- }
-
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- Modal.prototype.backdrop = function (callback) {
- var that = this
- var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
- .prependTo(this.$element)
- .on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (e.target !== e.currentTarget) return
- this.options.backdrop == 'static'
- ? this.$element[0].focus.call(this.$element[0])
- : this.hide.call(this)
- }, this))
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop
- .one('bsTransitionEnd', callback)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- var callbackRemove = function () {
- that.removeBackdrop()
- callback && callback()
- }
- $.support.transition && this.$element.hasClass('fade') ?
- this.$backdrop
- .one('bsTransitionEnd', callbackRemove)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callbackRemove()
-
- } else if (callback) {
- callback()
- }
- }
-
- // these following methods are used to handle overflowing modals
-
- Modal.prototype.handleUpdate = function () {
- if (this.options.backdrop) this.adjustBackdrop()
- this.adjustDialog()
- }
-
- Modal.prototype.adjustBackdrop = function () {
- this.$backdrop
- .css('height', 0)
- .css('height', this.$element[0].scrollHeight)
- }
-
- Modal.prototype.adjustDialog = function () {
- var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
-
- this.$element.css({
- paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
- paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
- })
- }
-
- Modal.prototype.resetAdjustments = function () {
- this.$element.css({
- paddingLeft: '',
- paddingRight: ''
- })
- }
-
- Modal.prototype.checkScrollbar = function () {
- this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
- this.scrollbarWidth = this.measureScrollbar()
- }
-
- Modal.prototype.setScrollbar = function () {
- var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
- if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
- }
-
- Modal.prototype.resetScrollbar = function () {
- this.$body.css('padding-right', '')
- }
-
- Modal.prototype.measureScrollbar = function () { // thx walsh
- var scrollDiv = document.createElement('div')
- scrollDiv.className = 'modal-scrollbar-measure'
- this.$body.append(scrollDiv)
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
- this.$body[0].removeChild(scrollDiv)
- return scrollbarWidth
- }
-
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- function Plugin(option, _relatedTarget) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.modal')
- var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option](_relatedTarget)
- else if (options.show) data.show(_relatedTarget)
- })
- }
-
- var old = $.fn.modal
-
- $.fn.modal = Plugin
- $.fn.modal.Constructor = Modal
-
-
- // MODAL NO CONFLICT
- // =================
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- var href = $this.attr('href')
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
- var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- if ($this.is('a')) e.preventDefault()
-
- $target.one('show.bs.modal', function (showEvent) {
- if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
- $target.one('hidden.bs.modal', function () {
- $this.is(':visible') && $this.trigger('focus')
- })
- })
- Plugin.call($target, option, this)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tooltip.js v3.3.1
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- var Tooltip = function (element, options) {
- this.type =
- this.options =
- this.enabled =
- this.timeout =
- this.hoverState =
- this.$element = null
-
- this.init('tooltip', element, options)
- }
-
- Tooltip.VERSION = '3.3.1'
-
- Tooltip.TRANSITION_DURATION = 150
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- container: false,
- viewport: {
- selector: 'body',
- padding: 0
- }
- }
-
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
-
- var triggers = this.options.trigger.split(' ')
-
- for (var i = triggers.length; i--;) {
- var trigger = triggers[i]
-
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
-
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS
- }
-
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay
- }
- }
-
- return options
- }
-
- Tooltip.prototype.getDelegateOptions = function () {
- var options = {}
- var defaults = this.getDefaults()
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- })
-
- return options
- }
-
- Tooltip.prototype.enter = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (self && self.$tip && self.$tip.is(':visible')) {
- self.hoverState = 'in'
- return
- }
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'in'
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- Tooltip.prototype.leave = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'out'
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.' + this.type)
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
-
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
- if (e.isDefaultPrevented() || !inDom) return
- var that = this
-
- var $tip = this.tip()
-
- var tipId = this.getUID(this.type)
-
- this.setContent()
- $tip.attr('id', tipId)
- this.$element.attr('aria-describedby', tipId)
-
- if (this.options.animation) $tip.addClass('fade')
-
- var placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- var autoToken = /\s?auto?\s?/i
- var autoPlace = autoToken.test(placement)
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement)
- .data('bs.' + this.type, this)
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
- var pos = this.getPosition()
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (autoPlace) {
- var orgPlacement = placement
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
- var containerDim = this.getPosition($container)
-
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
- placement
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement)
- }
-
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
-
- this.applyPlacement(calculatedOffset, placement)
-
- var complete = function () {
- var prevHoverState = that.hoverState
- that.$element.trigger('shown.bs.' + that.type)
- that.hoverState = null
-
- if (prevHoverState == 'out') that.leave(that)
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
- }
- }
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- var $tip = this.tip()
- var width = $tip[0].offsetWidth
- var height = $tip[0].offsetHeight
-
- // manually read margins because getBoundingClientRect includes difference
- var marginTop = parseInt($tip.css('margin-top'), 10)
- var marginLeft = parseInt($tip.css('margin-left'), 10)
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0
- if (isNaN(marginLeft)) marginLeft = 0
-
- offset.top = offset.top + marginTop
- offset.left = offset.left + marginLeft
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using: function (props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left)
- })
- }
- }, offset), 0)
-
- $tip.addClass('in')
-
- // check to see if placing tip in new offset caused the tip to resize itself
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- }
-
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
-
- if (delta.left) offset.left += delta.left
- else offset.top += delta.top
-
- var isVertical = /top|bottom/.test(placement)
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
-
- $tip.offset(offset)
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
- }
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
- this.arrow()
- .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
- .css(isHorizontal ? 'top' : 'left', '')
- }
-
- Tooltip.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- Tooltip.prototype.hide = function (callback) {
- var that = this
- var $tip = this.tip()
- var e = $.Event('hide.bs.' + this.type)
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach()
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
- callback && callback()
- }
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
-
- this.hoverState = null
-
- return this
- }
-
- Tooltip.prototype.fixTitle = function () {
- var $e = this.$element
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle()
- }
-
- Tooltip.prototype.getPosition = function ($element) {
- $element = $element || this.$element
-
- var el = $element[0]
- var isBody = el.tagName == 'BODY'
-
- var elRect = el.getBoundingClientRect()
- if (elRect.width == null) {
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
- }
- var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
-
- return $.extend({}, elRect, scroll, outerDims, elOffset)
- }
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
-
- }
-
- Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
- var delta = { top: 0, left: 0 }
- if (!this.$viewport) return delta
-
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
- var viewportDimensions = this.getPosition(this.$viewport)
-
- if (/right|left/.test(placement)) {
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
- delta.top = viewportDimensions.top - topEdgeOffset
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
- }
- } else {
- var leftEdgeOffset = pos.left - viewportPadding
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
- delta.left = viewportDimensions.left - leftEdgeOffset
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
- }
- }
-
- return delta
- }
-
- Tooltip.prototype.getTitle = function () {
- var title
- var $e = this.$element
- var o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- Tooltip.prototype.getUID = function (prefix) {
- do prefix += ~~(Math.random() * 1000000)
- while (document.getElementById(prefix))
- return prefix
- }
-
- Tooltip.prototype.tip = function () {
- return (this.$tip = this.$tip || $(this.options.template))
- }
-
- Tooltip.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
- }
-
- Tooltip.prototype.enable = function () {
- this.enabled = true
- }
-
- Tooltip.prototype.disable = function () {
- this.enabled = false
- }
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }
-
- Tooltip.prototype.toggle = function (e) {
- var self = this
- if (e) {
- self = $(e.currentTarget).data('bs.' + this.type)
- if (!self) {
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
- $(e.currentTarget).data('bs.' + this.type, self)
- }
- }
-
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
- }
-
- Tooltip.prototype.destroy = function () {
- var that = this
- clearTimeout(this.timeout)
- this.hide(function () {
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
- })
- }
-
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
- var selector = options && options.selector
-
- if (!data && option == 'destroy') return
- if (selector) {
- if (!data) $this.data('bs.tooltip', (data = {}))
- if (!data[selector]) data[selector] = new Tooltip(this, options)
- } else {
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- }
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = Plugin
- $.fn.tooltip.Constructor = Tooltip
-
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: popover.js v3.3.1
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
-
- Popover.VERSION = '3.3.1'
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- })
-
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
-
- Popover.prototype.constructor = Popover
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS
- }
-
- Popover.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
- var content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
-
- $tip.removeClass('fade top bottom left right in')
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
- }
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent()
- }
-
- Popover.prototype.getContent = function () {
- var $e = this.$element
- var o = this.options
-
- return $e.attr('data-content')
- || (typeof o.content == 'function' ?
- o.content.call($e[0]) :
- o.content)
- }
-
- Popover.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
- }
-
- Popover.prototype.tip = function () {
- if (!this.$tip) this.$tip = $(this.options.template)
- return this.$tip
- }
-
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
- var selector = options && options.selector
-
- if (!data && option == 'destroy') return
- if (selector) {
- if (!data) $this.data('bs.popover', (data = {}))
- if (!data[selector]) data[selector] = new Popover(this, options)
- } else {
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- }
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.popover
-
- $.fn.popover = Plugin
- $.fn.popover.Constructor = Popover
-
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.1
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- var process = $.proxy(this.process, this)
-
- this.$body = $('body')
- this.$scrollElement = $(element).is('body') ? $(window) : $(element)
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
- this.selector = (this.options.target || '') + ' .nav li > a'
- this.offsets = []
- this.targets = []
- this.activeTarget = null
- this.scrollHeight = 0
-
- this.$scrollElement.on('scroll.bs.scrollspy', process)
- this.refresh()
- this.process()
- }
-
- ScrollSpy.VERSION = '3.3.1'
-
- ScrollSpy.DEFAULTS = {
- offset: 10
- }
-
- ScrollSpy.prototype.getScrollHeight = function () {
- return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
- }
-
- ScrollSpy.prototype.refresh = function () {
- var offsetMethod = 'offset'
- var offsetBase = 0
-
- if (!$.isWindow(this.$scrollElement[0])) {
- offsetMethod = 'position'
- offsetBase = this.$scrollElement.scrollTop()
- }
-
- this.offsets = []
- this.targets = []
- this.scrollHeight = this.getScrollHeight()
-
- var self = this
-
- this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- var href = $el.data('target') || $el.attr('href')
- var $href = /^#./.test(href) && $(href)
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[$href[offsetMethod]().top + offsetBase, href]]) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- ScrollSpy.prototype.process = function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.getScrollHeight()
- var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
- var offsets = this.offsets
- var targets = this.targets
- var activeTarget = this.activeTarget
- var i
-
- if (this.scrollHeight != scrollHeight) {
- this.refresh()
- }
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
- }
-
- if (activeTarget && scrollTop < offsets[0]) {
- this.activeTarget = null
- return this.clear()
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate(targets[i])
- }
- }
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target
-
- this.clear()
-
- var selector = this.selector +
- '[data-target="' + target + '"],' +
- this.selector + '[href="' + target + '"]'
-
- var active = $(selector)
- .parents('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active')
- }
-
- active.trigger('activate.bs.scrollspy')
- }
-
- ScrollSpy.prototype.clear = function () {
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active')
- }
-
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.scrollspy')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = Plugin
- $.fn.scrollspy.Constructor = ScrollSpy
-
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load.bs.scrollspy.data-api', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- Plugin.call($spy, $spy.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tab.js v3.3.1
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TAB CLASS DEFINITION
- // ====================
-
- var Tab = function (element) {
- this.element = $(element)
- }
-
- Tab.VERSION = '3.3.1'
-
- Tab.TRANSITION_DURATION = 150
-
- Tab.prototype.show = function () {
- var $this = this.element
- var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.data('target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return
-
- var $previous = $ul.find('.active:last a')
- var hideEvent = $.Event('hide.bs.tab', {
- relatedTarget: $this[0]
- })
- var showEvent = $.Event('show.bs.tab', {
- relatedTarget: $previous[0]
- })
-
- $previous.trigger(hideEvent)
- $this.trigger(showEvent)
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
-
- var $target = $(selector)
-
- this.activate($this.closest('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $previous.trigger({
- type: 'hidden.bs.tab',
- relatedTarget: $this[0]
- })
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: $previous[0]
- })
- })
- }
-
- Tab.prototype.activate = function (element, container, callback) {
- var $active = container.find('> .active')
- var transition = callback
- && $.support.transition
- && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', false)
-
- element
- .addClass('active')
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if (element.parent('.dropdown-menu')) {
- element
- .closest('li.dropdown')
- .addClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
- }
-
- callback && callback()
- }
-
- $active.length && transition ?
- $active
- .one('bsTransitionEnd', next)
- .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
- next()
-
- $active.removeClass('in')
- }
-
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tab')
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tab
-
- $.fn.tab = Plugin
- $.fn.tab.Constructor = Tab
-
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- // TAB DATA-API
- // ============
-
- var clickHandler = function (e) {
- e.preventDefault()
- Plugin.call($(this), 'show')
- }
-
- $(document)
- .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
- .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: affix.js v3.3.1
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options)
-
- this.$target = $(this.options.target)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
-
- this.$element = $(element)
- this.affixed =
- this.unpin =
- this.pinnedOffset = null
-
- this.checkPosition()
- }
-
- Affix.VERSION = '3.3.1'
-
- Affix.RESET = 'affix affix-top affix-bottom'
-
- Affix.DEFAULTS = {
- offset: 0,
- target: window
- }
-
- Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- var targetHeight = this.$target.height()
-
- if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
-
- if (this.affixed == 'bottom') {
- if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
- return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
- }
-
- var initializing = this.affixed == null
- var colliderTop = initializing ? scrollTop : position.top
- var colliderHeight = initializing ? targetHeight : height
-
- if (offsetTop != null && colliderTop <= offsetTop) return 'top'
- if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
-
- return false
- }
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset
- this.$element.removeClass(Affix.RESET).addClass('affix')
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- return (this.pinnedOffset = position.top - scrollTop)
- }
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1)
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var height = this.$element.height()
- var offset = this.options.offset
- var offsetTop = offset.top
- var offsetBottom = offset.bottom
- var scrollHeight = $('body').height()
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
-
- var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
-
- if (this.affixed != affix) {
- if (this.unpin != null) this.$element.css('top', '')
-
- var affixType = 'affix' + (affix ? '-' + affix : '')
- var e = $.Event(affixType + '.bs.affix')
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
- }
-
- if (affix == 'bottom') {
- this.$element.offset({
- top: scrollHeight - height - offsetBottom
- })
- }
- }
-
-
- // AFFIX PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.affix')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.affix
-
- $.fn.affix = Plugin
- $.fn.affix.Constructor = Affix
-
-
- // AFFIX NO CONFLICT
- // =================
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- // AFFIX DATA-API
- // ==============
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- var data = $spy.data()
-
- data.offset = data.offset || {}
-
- if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
- if (data.offsetTop != null) data.offset.top = data.offsetTop
-
- Plugin.call($spy, data)
- })
- })
-
-}(jQuery);