function hex_sha1(t){return binb2hex(core_sha1(str2binb(t),t.length*chrsz))}function b64_sha1(t){return binb2b64(core_sha1(str2binb(t),t.length*chrsz))}function str_sha1(t){return binb2str(core_sha1(str2binb(t),t.length*chrsz))}function hex_hmac_sha1(t,e){return binb2hex(core_hmac_sha1(t,e))}function b64_hmac_sha1(t,e){return binb2b64(core_hmac_sha1(t,e))}function str_hmac_sha1(t,e){return binb2str(core_hmac_sha1(t,e))}function sha1_vm_test(){return"a9993e364706816aba3e25717850c26c9cd0d89d"==hex_sha1("abc")}function core_sha1(t,e){t[e>>5]|=128<<24-e%32,t[(e+64>>9<<4)+15]=e;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,u=0;ud;d++){16>d?n[d]=t[u+d]:n[d]=rol(n[d-3]^n[d-8]^n[d-14]^n[d-16],1);var v=safe_add(safe_add(rol(r,5),sha1_ft(d,i,o,a)),safe_add(safe_add(s,n[d]),sha1_kt(d)));s=a,a=o,o=rol(i,30),i=r,r=v}r=safe_add(r,l),i=safe_add(i,c),o=safe_add(o,f),a=safe_add(a,h),s=safe_add(s,p)}return Array(r,i,o,a,s)}function sha1_ft(t,e,n,r){return 20>t?e&n|~e&r:40>t?e^n^r:60>t?e&n|e&r|n&r:e^n^r}function sha1_kt(t){return 20>t?1518500249:40>t?1859775393:60>t?-1894007588:-899497514}function core_hmac_sha1(t,e){var n=str2binb(t);n.length>16&&(n=core_sha1(n,t.length*chrsz));for(var r=Array(16),i=Array(16),o=0;16>o;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var a=core_sha1(r.concat(str2binb(e)),512+e.length*chrsz);return core_sha1(i.concat(a),672)}function safe_add(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n}function rol(t,e){return t<>>32-e}function str2binb(t){for(var e=Array(),n=(1<>5]|=(t.charCodeAt(r/chrsz)&n)<<32-chrsz-r%32;return e}function binb2str(t){for(var e="",n=(1<>5]>>>32-chrsz-r%32&n);return e}function binb2hex(t){for(var e=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r<4*t.length;r++)n+=e.charAt(t[r>>2]>>8*(3-r%4)+4&15)+e.charAt(t[r>>2]>>8*(3-r%4)&15);return n}function binb2b64(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=0;r<4*t.length;r+=3)for(var i=(t[r>>2]>>8*(3-r%4)&255)<<16|(t[r+1>>2]>>8*(3-(r+1)%4)&255)<<8|t[r+2>>2]>>8*(3-(r+2)%4)&255,o=0;4>o;o++)n+=8*r+6*o>32*t.length?b64pad:e.charAt(i>>6*(3-o)&63);return n}function murmurhash3_32_gc(t,e){var n,r,i,o,a,s,u,l;for(n=3&t.length,r=t.length-n,i=e,a=3432918353,s=461845907,l=0;r>l;)u=255&t.charCodeAt(l)|(255&t.charCodeAt(++l))<<8|(255&t.charCodeAt(++l))<<16|(255&t.charCodeAt(++l))<<24,++l,u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(65535&u)*s+(((u>>>16)*s&65535)<<16)&4294967295,i^=u,i=i<<13|i>>>19,o=5*(65535&i)+((5*(i>>>16)&65535)<<16)&4294967295,i=(65535&o)+27492+(((o>>>16)+58964&65535)<<16);switch(u=0,n){case 3:u^=(255&t.charCodeAt(l+2))<<16;case 2:u^=(255&t.charCodeAt(l+1))<<8;case 1:u^=255&t.charCodeAt(l),u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(65535&u)*s+(((u>>>16)*s&65535)<<16)&4294967295,i^=u}return i^=t.length,i^=i>>>16,i=2246822507*(65535&i)+((2246822507*(i>>>16)&65535)<<16)&4294967295,i^=i>>>13,i=3266489909*(65535&i)+((3266489909*(i>>>16)&65535)<<16)&4294967295,i^=i>>>16,i>>>0}!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.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=e[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},f.hasDevTools?(l.isStatic&&(l=function(t){setTimeout(t,0)}),r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype.invokeFirst=function(t,e,n){this._normalQueue.unshift(t,e,n),this._queueTick()},r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=new r,e.exports.firstLineError=s},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n){var r=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(r,r,null,this,t)},o=function(t,e){this._isPending()&&this._resolveCallback(e.target)},a=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(r){var s=n(r),u=new t(e);u._propagateFrom(this,1);var l=this._target();if(u._setBoundTo(s),s instanceof t){var c={promiseRejectionQueued:!1,promise:u,target:l,bindingPromise:s};l._then(e,i,u._progress,u,c),s._then(o,a,u._progress,u,c)}else u._resolveCallback(l);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=131072|this._bitField,this._boundTo=t):this._bitField=-131073&this._bitField},t.prototype._isBound=function(){return 131072===(131072&this._bitField)},t.bind=function(r,i){var o=n(r),a=new t(e);return a._setBoundTo(o),o instanceof t?o._then(function(){a._resolveCallback(i)},a._reject,a._progress,a,null):a._resolveCallback(i),a}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise.js")();o.noConflict=r,e.exports=o},{"./promise.js":23}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+s.classString(t)+" has no method '"+s.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util.js"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){for(var e=arguments.length,n=new Array(e-1),i=1;e>i;++i)n[i-1]=arguments[i];return n.push(t),this._then(r,void 0,void 0,n,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(u){var r=a(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util.js":38}],6:[function(t,e,n){"use strict";e.exports=function(e){var n=t("./errors.js"),r=t("./async.js"),i=n.CancellationError;e.prototype._cancel=function(t){if(!this.isCancellable())return this;for(var e,n=this;void 0!==(e=n._cancellationParent)&&e.isCancellable();)n=e;this._unsetCancellable(),n._target()._rejectCallback(t,!1,!0)},e.prototype.cancel=function(t){return this.isCancellable()?(void 0===t&&(t=new i),r.invokeLater(this._cancel,this,t),this):this},e.prototype.cancellable=function(){return this._cancellable()?this:(r.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},e.prototype.uncancellable=function(){var t=this.then();return t._unsetCancellable(),t},e.prototype.fork=function(t,e,n){var r=this._then(t,e,n,void 0,void 0);return r._setCancellable(),r._cancellationParent=void 0,r}}},{"./async.js":2,"./errors.js":13}],7:[function(t,e,n){"use strict";e.exports=function(){function e(t){this._parent=t;var n=this._length=1+(void 0===t?0:t._length);b(this,e),n>32&&this.uncycle()}function n(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(e[i]!==u)break;e.pop(),i--}e=r}}function o(t){for(var e=[],n=0;n0&&(e=e.slice(n)),e}function s(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t.toString();var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+u(e)+">, no stack trace)"}function u(t){var e=41;return t.lengtht)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var u=r>0?e[r-1]:this;t-1>s?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var l=u._length+1,c=r-2;c>=0;--c)e[c]._length=l,l++;return}}}},e.prototype.parent=function(){return this._parent},e.prototype.hasParent=function(){return void 0!==this._parent},e.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var a=e.parseStackAndMessage(t),s=a.message,u=[a.stack],l=this;void 0!==l;)u.push(o(l.stack.split("\n"))),l=l._parent;i(u),r(u),h.notEnumerableProp(t,"stack",n(s,u)),h.notEnumerableProp(t,"__stackCleaned__",!0)}},e.parseStackAndMessage=function(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?a(t):[" (No stack trace)"],{message:n,stack:o(e)}},e.formatAndLogError=function(t,e){if("undefined"!=typeof console){var n;if("object"==typeof t||"function"==typeof t){var r=t.stack;n=e+v(r,t)}else n=e+String(t);"function"==typeof c?c(n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(n)}},e.unhandledRejection=function(t){e.formatAndLogError(t,"^--- With additional stack trace: ")},e.isSupported=function(){return"function"==typeof b},e.fireRejectionEvent=function(t,n,r,i){var o=!1;try{"function"==typeof n&&(o=!0,"rejectionHandled"===t?n(i):n(r,i))}catch(a){f.throwLater(a)}var s=!1;try{s=w(t,r,i)}catch(a){s=!0,f.throwLater(a)}var u=!1;if(_)try{u=_(t.toLowerCase(),{reason:r,promise:i})}catch(a){u=!0,f.throwLater(a)}s||o||u||"unhandledRejection"!==t||e.formatAndLogError(r,"Unhandled rejection ")};var g=function(){return!1},y=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;e.setBounds=function(t,n){if(e.isSupported()){for(var r,i,o=t.stack.split("\n"),a=n.stack.split("\n"),s=-1,u=-1,c=0;cs||0>u||!r||!i||r!==i||s>=u||(g=function(t){if(p.test(t))return!0;var e=l(t);return e&&e.fileName===r&&s<=e.line&&e.line<=u?!0:!1})}};var _,b=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():s(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,d=t,v=e;var n=Error.captureStackTrace;return g=function(t){return p.test(t)},function(t,e){Error.stackTraceLimit=Error.stackTraceLimit+6,n(t,e),Error.stackTraceLimit=Error.stackTraceLimit-6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return d=/@/,v=e,m=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(v=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?s(e):e.toString()},null):(d=t,v=e,function(t){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),w=function(){if(h.isNode)return function(t,e,n){return"rejectionHandled"===t?process.emit(t,n):process.emit(t,e,n)};var t=!1,e=!0;try{var n=new self.CustomEvent("test");t=n instanceof CustomEvent}catch(r){}if(!t)try{var i=document.createEvent("CustomEvent");i.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(i)}catch(r){e=!1}e&&(_=function(e,n){var r;return t?r=new self.CustomEvent(e,{detail:n,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,!1,!0,n)),r?!self.dispatchEvent(r):!1});var o={};return o.unhandledRejection="onunhandledRejection".toLowerCase(),o.rejectionHandled="onrejectionHandled".toLowerCase(),function(t,e,n){var r=o[t],i=self[r];return i?("rejectionHandled"===t?i.call(self,n):i.call(self,e,n),!0):!1}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(c=function(t){console.warn(t)},h.isNode&&process.stderr.isTTY?c=function(t){process.stderr.write(""+t+"\n")}:h.isNode||"string"!=typeof(new Error).stack||(c=function(t){console.warn("%c"+t,"color: red")})),e}},{"./async.js":2,"./util.js":38}],8:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e,n){this._instances=t,this._callback=e,this._promise=n}function r(t,e){var n={},r=a(t).call(n,e);if(r===s)return r;var i=u(n);return i.length?(s.e=new l("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),s):r}var i=t("./util.js"),o=t("./errors.js"),a=i.tryCatch,s=i.errorObj,u=t("./es5.js").keys,l=o.TypeError;return n.prototype.doFilter=function(t){for(var n=this._callback,i=this._promise,o=i._boundValue(),u=0,l=this._instances.length;l>u;++u){var c=this._instances[u],f=c===Error||null!=c&&c.prototype instanceof Error;if(f&&t instanceof c){var h=a(n).call(o,t);return h===s?(e.e=h.e,e):h}if("function"==typeof c&&!f){var p=r(c,t);if(p===s){t=s.e;break}if(p){var h=a(n).call(o,t);return h===s?(e.e=h.e,e):h}}}return e.e=t,e},n}},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(t,e,n){"use strict";e.exports=function(t,e,n){function r(){this._trace=new e(o())}function i(){return n()?new r:void 0}function o(){var t=a.length-1;return t>=0?a[t]:void 0}var a=[];return r.prototype._pushContext=function(){n()&&void 0!==this._trace&&a.push(this._trace)},r.prototype._popContext=function(){n()&&void 0!==this._trace&&a.pop()},t.prototype._peekContext=o,t.prototype._pushContext=r.prototype._pushContext,t.prototype._popContext=r.prototype._popContext,i}},{}],10:[function(t,e,n){"use strict";e.exports=function(e,n){var r,i,o=e._getDomain,a=t("./async.js"),s=t("./errors.js").Warning,u=t("./util.js"),l=u.canAttachTrace,c=u.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return u.isNode&&0==process.env.BLUEBIRD_DEBUG&&(c=!1),c&&a.disableTrampolineIfNecessary(),e.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},e.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),a.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){n.fireRejectionEvent("rejectionHandled",r,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),n.fireRejectionEvent("unhandledRejection",i,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setCarriedStackTrace=function(t){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=t},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._captureStackTrace=function(){return c&&(this._trace=new n(this._peekContext())),this},e.prototype._attachExtraTrace=function(t,e){if(c&&l(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=n.parseStackAndMessage(t);u.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),u.notEnumerableProp(t,"__stackCleaned__",!0)}}},e.prototype._warn=function(t){var e=new s(t),r=this._peekContext();if(r)r.attachExtraTrace(e);else{var i=n.parseStackAndMessage(e);e.stack=i.message+"\n"+i.stack.join("\n")}n.formatAndLogError(e,"")},e.onPossiblyUnhandledRejection=function(t){var e=o();i="function"==typeof t?null===e?t:e.bind(t):void 0},e.onUnhandledRejectionHandled=function(t){var e=o();r="function"==typeof t?null===e?t:e.bind(t):void 0},e.longStackTraces=function(){if(a.haveItemsQueued()&&c===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");c=n.isSupported(),c&&a.disableTrampolineIfNecessary()},e.hasLongStackTraces=function(){return c&&n.isSupported()},n.isSupported()||(e.longStackTraces=function(){},c=!1),function(){return c}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(t,e,n){"use strict";var r=t("./util.js"),i=r.isPrimitive;e.exports=function(t){var e=function(){return this},n=function(){throw this},r=function(){},o=function(){throw void 0},a=function(t,e){return 1===e?function(){throw t}:2===e?function(){return t}:void 0};t.prototype["return"]=t.prototype.thenReturn=function(n){return void 0===n?this.then(r):i(n)?this._then(a(n,2),void 0,void 0,void 0,void 0):(n instanceof t&&n._ignoreRejections(),this._then(e,void 0,void 0,n,void 0))},t.prototype["throw"]=t.prototype.thenThrow=function(t){return void 0===t?this.then(o):i(t)?this._then(a(t,1),void 0,void 0,void 0,void 0):this._then(n,void 0,void 0,t,void 0)}}},{"./util.js":38}],12:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.reduce;t.prototype.each=function(t){return n(this,t,null,e)},t.each=function(t,r){return n(t,r,null,e)}}},{}],13:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(f(this,"message","string"==typeof r?r:e),f(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return c(n,Error),n}function i(t){return this instanceof i?(f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5.js"),u=s.freeze,l=t("./util.js"),c=l.inherits,f=l.notEnumerableProp,h=r("Warning","warning"),p=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),v=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(m){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y0&&"function"==typeof arguments[e]){t=arguments[e];var r}for(var i=arguments.length,o=new Array(i),a=0;i>a;++a)o[a]=arguments[a];t&&o.pop();var r=new n(o).promise();return void 0!==t?r.spread(t):r}}},{"./util.js":38}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:i.bind(e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=n>=1?[]:v,c.invoke(s,this,void 0)}function s(){this._init$(void 0,-2)}function u(t,e,n,r){var i="object"==typeof n&&null!==n?n.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new a(t,e,i,r)}var l=e._getDomain,c=t("./async.js"),f=t("./util.js"),h=f.tryCatch,p=f.errorObj,d={},v=[];f.inherits(a,n),a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,s=this._limit;if(r[n]===d){if(r[n]=t,s>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(s>=1&&this._inFlight>=s)return r[n]=t,void this._queue.push(n);null!==a&&(a[n]=t);var u=this._callback,l=this._promise._boundValue();this._promise._pushContext();var c=h(u).call(l,t,n,o);if(this._promise._popContext(),c===p)return this._reject(c.e);var f=i(c,this._promise);if(f instanceof e){if(f=f._target(),f._isPending())return s>=1&&this._inFlight++,r[n]=d,f._proxyPromiseArray(this,n);if(!f._isFulfilled())return this._reject(f._reason());c=f._value()}r[n]=c}var v=++this._totalResolved;v>=o&&(null!==a?this._filter(r,a):this._resolve(r))},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return"function"!=typeof t?r("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(this,t,e,null).promise()},e.map=function(t,e,n,i){return"function"!=typeof e?r("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(t,e,n,i).promise()}}},{"./async.js":2,"./util.js":38}],20:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util.js"),a=o.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments);return r._popContext(),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t,r,s){if("function"!=typeof t)return i("fn must be a function\n\n See http://goo.gl/916lJJ\n");var u=new e(n);u._captureStackTrace(),u._pushContext();var l=o.isArray(r)?a(t).apply(s,r):a(t).call(s,r);return u._popContext(),u._resolveFromSyncValue(l),u},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1,!0):this._resolveCallback(t,!0)}}},{"./util.js":38}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=s(e).apply(n._boundValue(),[null].concat(t));i===u&&a.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?s(e).call(r,null):s(e).call(r,null,t);i===u&&a.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=n._target(),i=r._getCarriedStackTrace();i.cause=t,t=i}var o=s(e).call(n._boundValue(),t);o===u&&a.throwLater(o.e)}var o=t("./util.js"),a=t("./async.js"),s=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./async.js":2,"./util.js":38}],22:[function(t,e,n){"use strict";e.exports=function(e,n){var r=t("./util.js"),i=t("./async.js"),o=r.tryCatch,a=r.errorObj;e.prototype.progressed=function(t){return this._then(void 0,void 0,t,void 0,void 0)},e.prototype._progress=function(t){this._isFollowingOrFulfilledOrRejected()||this._target()._progressUnchecked(t)},e.prototype._progressHandlerAt=function(t){return 0===t?this._progressHandler0:this[(t<<2)+t-5+2]},e.prototype._doProgressWith=function(t){ var n=t.value,i=t.handler,s=t.promise,u=t.receiver,l=o(i).call(u,n);if(l===a){if(null!=l.e&&"StopProgressPropagation"!==l.e.name){var c=r.canAttachTrace(l.e)?l.e:new Error(r.toString(l.e));s._attachExtraTrace(c),s._progress(l.e)}}else l instanceof e?l._then(s._progress,null,null,s,void 0):s._progress(l)},e.prototype._progressUnchecked=function(t){for(var r=this._length(),o=this._progress,a=0;r>a;a++){var s=this._progressHandlerAt(a),u=this._promiseAt(a);if(u instanceof e)"function"==typeof s?i.invoke(this._doProgressWith,this,{handler:s,promise:u,receiver:this._receiverAt(a),value:t}):i.invoke(o,u,t);else{var l=this._receiverAt(a);"function"==typeof s?s.call(l,t,u):l instanceof n&&!l._isResolved()&&l._promiseProgressed(t,u)}}}}},{"./async.js":2,"./util.js":38}],23:[function(t,e,n){"use strict";e.exports=function(){function e(t){if("function"!=typeof t)throw new f("the promise constructor requires a resolver function\n\n See http://goo.gl/EC22Yn\n");if(this.constructor!==e)throw new f("the promise constructor cannot be invoked directly\n\n See http://goo.gl/KsIlge\n");this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._progressHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._settledValue=void 0,t!==h&&this._resolveFromResolver(t)}function n(t){var n=new e(h);n._fulfillmentHandler0=t,n._rejectionHandler0=t,n._progressHandler0=t,n._promise0=t,n._receiver0=t,n._settledValue=t}var r,i=function(){return new f("circular promise resolution chain\n\n See http://goo.gl/LhFpo0\n")},o=function(){return new e.PromiseInspection(this._target())},a=function(t){return e.reject(new f(t))},s=t("./util.js");r=s.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},s.notEnumerableProp(e,"_getDomain",r);var u={},l=t("./async.js"),c=t("./errors.js"),f=e.TypeError=c.TypeError;e.RangeError=c.RangeError,e.CancellationError=c.CancellationError,e.TimeoutError=c.TimeoutError,e.OperationalError=c.OperationalError,e.RejectionError=c.OperationalError,e.AggregateError=c.AggregateError;var h=function(){},p={},d={e:null},v=t("./thenables.js")(e,h),m=t("./promise_array.js")(e,h,v,a),g=t("./captured_trace.js")(),y=t("./debuggability.js")(e,g),_=t("./context.js")(e,g,y),b=t("./catch_filter.js")(d),w=t("./promise_resolver.js"),x=w._nodebackForPromise,$=s.errorObj,k=s.tryCatch;return e.prototype.toString=function(){return"[object Promise]"},e.prototype.caught=e.prototype["catch"]=function(t){var n=arguments.length;if(n>1){var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var a=arguments[r];if("function"!=typeof a)return e.reject(new f("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"));i[o++]=a}i.length=o,t=arguments[r];var s=new b(i,t,this);return this._then(void 0,s.doFilter,void 0,s,void 0)}return this._then(void 0,t,void 0,void 0,void 0)},e.prototype.reflect=function(){return this._then(o,o,void 0,this,void 0)},e.prototype.then=function(t,e,n){if(y()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+s.classString(t);arguments.length>1&&(r+=", "+s.classString(e)),this._warn(r)}return this._then(t,e,n,void 0,void 0)},e.prototype.done=function(t,e,n){var r=this._then(t,e,n,void 0,void 0);r._setIsFinal()},e.prototype.spread=function(t,e){return this.all()._then(t,e,void 0,p,void 0)},e.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},e.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},e.prototype.all=function(){return new m(this).promise()},e.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},e.is=function(t){return t instanceof e},e.fromNode=function(t){var n=new e(h),r=k(t)(x(n));return r===$&&n._rejectCallback(r.e,!0,!0),n},e.all=function(t){return new m(t).promise()},e.defer=e.pending=function(){var t=new e(h);return new w(t)},e.cast=function(t){var n=v(t);if(!(n instanceof e)){var r=n;n=new e(h),n._fulfillUnchecked(r)}return n},e.resolve=e.fulfilled=e.cast,e.reject=e.rejected=function(t){var n=new e(h);return n._captureStackTrace(),n._rejectCallback(t,!0),n},e.setScheduler=function(t){if("function"!=typeof t)throw new f("fn must be a function\n\n See http://goo.gl/916lJJ\n");var e=l._schedule;return l._schedule=t,e},e.prototype._then=function(t,n,i,o,a){var s=void 0!==a,u=s?a:new e(h);s||(u._propagateFrom(this,5),u._captureStackTrace());var c=this._target();c!==this&&(void 0===o&&(o=this._boundTo),s||u._setIsMigrated());var f=c._addCallbacks(t,n,i,u,o,r());return c._isResolved()&&!c._isSettlePromisesQueued()&&l.invoke(c._settlePromiseAtPostResolution,c,f),u},e.prototype._settlePromiseAtPostResolution=function(t){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(t)},e.prototype._length=function(){return 131071&this._bitField},e.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},e.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},e.prototype._setLength=function(t){this._bitField=-131072&this._bitField|131071&t},e.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},e.prototype._setRejected=function(){this._bitField=134217728|this._bitField},e.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},e.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},e.prototype._isFinal=function(){return(33554432&this._bitField)>0},e.prototype._cancellable=function(){return(67108864&this._bitField)>0},e.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},e.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},e.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},e.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},e.prototype._isMigrated=function(){return(4194304&this._bitField)>0},e.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[5*t-5+4];return e===u?void 0:void 0===e&&this._isBound()?this._boundValue():e},e.prototype._promiseAt=function(t){return 0===t?this._promise0:this[5*t-5+3]},e.prototype._fulfillmentHandlerAt=function(t){return 0===t?this._fulfillmentHandler0:this[5*t-5+0]},e.prototype._rejectionHandlerAt=function(t){return 0===t?this._rejectionHandler0:this[5*t-5+1]},e.prototype._boundValue=function(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t},e.prototype._migrateCallbacks=function(t,n){var r=t._fulfillmentHandlerAt(n),i=t._rejectionHandlerAt(n),o=t._progressHandlerAt(n),a=t._promiseAt(n),s=t._receiverAt(n);a instanceof e&&a._setIsMigrated(),void 0===s&&(s=u),this._addCallbacks(r,i,o,a,s,null)},e.prototype._addCallbacks=function(t,e,n,r,i,o){var a=this._length();if(a>=131066&&(a=0,this._setLength(0)),0===a)this._promise0=r,void 0!==i&&(this._receiver0=i),"function"!=typeof t||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===o?t:o.bind(t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:o.bind(e)),"function"==typeof n&&(this._progressHandler0=null===o?n:o.bind(n));else{var s=5*a-5;this[s+3]=r,this[s+4]=i,"function"==typeof t&&(this[s+0]=null===o?t:o.bind(t)),"function"==typeof e&&(this[s+1]=null===o?e:o.bind(e)),"function"==typeof n&&(this[s+2]=null===o?n:o.bind(n))}return this._setLength(a+1),a},e.prototype._setProxyHandlers=function(t,e){var n=this._length();if(n>=131066&&(n=0,this._setLength(0)),0===n)this._promise0=e,this._receiver0=t;else{var r=5*n-5;this[r+3]=e,this[r+4]=t}this._setLength(n+1)},e.prototype._proxyPromiseArray=function(t,e){this._setProxyHandlers(t,e)},e.prototype._resolveCallback=function(t,n){if(!this._isFollowingOrFulfilledOrRejected()){if(t===this)return this._rejectCallback(i(),!1,!0);var r=v(t,this);if(!(r instanceof e))return this._fulfill(t);var o=1|(n?4:0);this._propagateFrom(r,o);var a=r._target();if(a._isPending()){for(var s=this._length(),u=0;s>u;++u)a._migrateCallbacks(this,u);this._setFollowing(),this._setLength(0),this._setFollowee(a)}else a._isFulfilled()?this._fulfillUnchecked(a._value()):this._rejectUnchecked(a._reason(),a._getCarriedStackTrace())}},e.prototype._rejectCallback=function(t,e,n){n||s.markAsOriginatingFromRejection(t);var r=s.ensureErrorObject(t),i=r===t;this._attachExtraTrace(r,e?i:!1),this._reject(t,i?void 0:r)},e.prototype._resolveFromResolver=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=k(t)(function(t){null!==e&&(e._resolveCallback(t),e=null)},function(t){null!==e&&(e._rejectCallback(t,n),e=null)});n=!1,this._popContext(),void 0!==r&&r===$&&null!==e&&(e._rejectCallback(r.e,!0,!0),e=null)},e.prototype._settlePromiseFromHandler=function(t,e,n,r){if(!r._isRejected()){r._pushContext();var o;if(o=e!==p||this._isRejected()?k(t).call(e,n):k(t).apply(this._boundValue(),n),r._popContext(),o===$||o===r||o===d){var a=o===r?i():o.e;r._rejectCallback(a,!1,!0)}else r._resolveCallback(o)}},e.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},e.prototype._followee=function(){return this._rejectionHandler0},e.prototype._setFollowee=function(t){this._rejectionHandler0=t},e.prototype._cleanValues=function(){this._cancellable()&&(this._cancellationParent=void 0)},e.prototype._propagateFrom=function(t,e){(1&e)>0&&t._cancellable()&&(this._setCancellable(),this._cancellationParent=t),(4&e)>0&&t._isBound()&&this._setBoundTo(t._boundTo)},e.prototype._fulfill=function(t){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(t)},e.prototype._reject=function(t,e){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(t,e)},e.prototype._settlePromiseAt=function(t){var n=this._promiseAt(t),r=n instanceof e;if(r&&n._isMigrated())return n._unsetIsMigrated(),l.invoke(this._settlePromiseAt,this,t);var i=this._isFulfilled()?this._fulfillmentHandlerAt(t):this._rejectionHandlerAt(t),o=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,a=this._settledValue,s=this._receiverAt(t);this._clearCallbackDataAtIndex(t),"function"==typeof i?r?this._settlePromiseFromHandler(i,s,a,n):i.call(s,a,n):s instanceof m?s._isResolved()||(this._isFulfilled()?s._promiseFulfilled(a,n):s._promiseRejected(a,n)):r&&(this._isFulfilled()?n._fulfill(a):n._reject(a,o)),t>=4&&4===(31&t)&&l.invokeLater(this._setLength,this,0)},e.prototype._clearCallbackDataAtIndex=function(t){if(0===t)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var e=5*t-5;this[e+3]=this[e+4]=this[e+0]=this[e+1]=this[e+2]=void 0}},e.prototype._isSettlePromisesQueued=function(){return-1073741824===(-1073741824&this._bitField)},e.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},e.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},e.prototype._queueSettlePromises=function(){l.settlePromises(this),this._setSettlePromisesQueued()},e.prototype._fulfillUnchecked=function(t){if(t===this){var e=i();return this._attachExtraTrace(e),this._rejectUnchecked(e,void 0)}this._setFulfilled(),this._settledValue=t,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},e.prototype._rejectUncheckedCheckError=function(t){var e=s.ensureErrorObject(t);this._rejectUnchecked(t,e===t?void 0:e)},e.prototype._rejectUnchecked=function(t,e){if(t===this){var n=i();return this._attachExtraTrace(n),this._rejectUnchecked(n)}return this._setRejected(),this._settledValue=t,this._cleanValues(),this._isFinal()?void l.throwLater(function(t){throw"stack"in t&&l.invokeFirst(g.unhandledRejection,void 0,t),t},void 0===e?t:e):(void 0!==e&&e!==t&&this._setCarriedStackTrace(e),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},e.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var t=this._length(),e=0;t>e;e++)this._settlePromiseAt(e)},s.notEnumerableProp(e,"_makeSelfResolutionError",i),t("./progress.js")(e,m),t("./method.js")(e,h,v,a),t("./bind.js")(e,h,v),t("./finally.js")(e,d,v),t("./direct_resolve.js")(e),t("./synchronous_inspection.js")(e),t("./join.js")(e,m,v,h),e.Promise=e,t("./map.js")(e,m,a,v,h),t("./cancel.js")(e),t("./using.js")(e,a,v,_),t("./generators.js")(e,a,h,v),t("./nodeify.js")(e),t("./call_get.js")(e),t("./props.js")(e,m,v,a),t("./race.js")(e,h,v,a),t("./reduce.js")(e,m,a,v,h),t("./settle.js")(e,m),t("./some.js")(e,m,a),t("./promisify.js")(e,h),t("./any.js")(e),t("./each.js")(e,h),t("./timers.js")(e,h),t("./filter.js")(e,h),s.toFastProperties(e),s.toFastProperties(e.prototype),n({a:1}),n({b:2}),n({c:3}),n(1),n(function(){}),n(void 0),n(!1),n(new e(h)),g.setBounds(l.firstLineError,s.lastLineError),e}},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r,i=this._promise=new e(n);t instanceof e&&(r=t,i._propagateFrom(r,5)),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var s=t("./util.js"),u=s.isArray;return a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var a=r(this._values,this._promise);if(a instanceof e){if(a=a._target(),this._values=a,!a._isFulfilled())return a._isPending()?void a._then(l,this._reject,void 0,this,n):void this._reject(a._reason());if(a=a._value(),!u(a)){var s=new e.TypeError("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");return void this.__hardReject__(s)}}else if(!u(a))return void this._promise._reject(i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n")._reason());if(0===a.length)return void(-5===n?this._resolveEmptyArray():this._resolve(o(n)));var c=this.getActualLength(a.length);this._length=c,this._values=this.shouldCopyValues()?new Array(c):this._values;for(var f=this._promise,h=0;c>h;++h){var p=this._isResolved(),d=r(a[h],f);d instanceof e?(d=d._target(),p?d._ignoreRejections():d._isPending()?d._proxyPromiseArray(this,h):d._isFulfilled()?this._promiseFulfilled(d._value(),h):this._promiseRejected(d._reason(),h)):p||this._promiseFulfilled(d,h)}},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype.__hardReject__=a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1,!0)},a.prototype._promiseProgressed=function(t,e){this._promise._progress({index:e,value:t})},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;n>=this._length&&this._resolve(this._values)},a.prototype._promiseRejected=function(t,e){this._totalResolved++,this._reject(t)},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util.js":38}],25:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&p.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new f(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=p.keys(t),i=0;i2){for(var o=arguments.length,a=new Array(o-1),s=1;o>s;++s)a[s-1]=arguments[s];t._fulfill(a)}else t._fulfill(n);t=null}}}var a,s=t("./util.js"),u=s.maybeWrapAsError,l=t("./errors.js"),c=l.TimeoutError,f=l.OperationalError,h=s.haveGetters,p=t("./es5.js"),d=/^(?:name|message|stack|cause)$/;if(a=h?function(t){this.promise=t}:function(t){this.promise=t,this.asCallback=o(t),this.callback=this.asCallback},h){var v={get:function(){return o(this.promise)}};p.defineProperty(a.prototype,"asCallback",v),p.defineProperty(a.prototype,"callback",v)}a._nodebackForPromise=o,a.prototype.toString=function(){return"[object PromiseResolver]"},a.prototype.resolve=a.prototype.fulfill=function(t){if(!(this instanceof a))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(t)},a.prototype.reject=function(t){if(!(this instanceof a))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(t)},a.prototype.progress=function(t){if(!(this instanceof a))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(t)},a.prototype.cancel=function(t){this.promise.cancel(t)},a.prototype.timeout=function(){this.reject(new c("timeout"))},a.prototype.isResolved=function(){return this.promise.isResolved()},a.prototype.toJSON=function(){return this.promise.toJSON()},e.exports=a},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!x.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=p.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function a(t,e,n){for(var r=0;ra;a+=2){var l=o[a],c=o[a+1],f=l+e;if(r===S)t[f]=S(l,h,l,c,e);else{var d=r(c,function(){return S(l,h,l,c,e)});p.notEnumerableProp(d,"__isPromisified__",!0),t[f]=d}}return p.toFastProperties(t),t}function c(t,e){return S(t,e,void 0,t)}var f,h={},p=t("./util.js"),d=t("./promise_resolver.js")._nodebackForPromise,v=p.withAppended,m=p.maybeWrapAsError,g=p.canEvaluate,y=t("./errors").TypeError,_="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],x=new RegExp("^(?:"+w.join("|")+")$"),$=function(t){return p.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},S=g?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new y("fn must be a function\n\n See http://goo.gl/916lJJ\n");if(i(t))return t;var n=c(t,arguments.length<2?h:e);return p.copyDescriptors(t,n,r),n},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new y("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/9ITlV0\n");e=Object(e);var n=e.suffix;"string"!=typeof n&&(n=_);var r=e.filter;"function"!=typeof r&&(r=$);var i=e.promisifier;if("function"!=typeof i&&(i=S),!p.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/8FZo5V\n");for(var o=p.inheritedDataKeys(t),a=0;ai;++i){var o=e[i];r[i]=t[o],r[i+n]=o}this.constructor$(r)}function a(t){var n,a=r(t);return u(a)?(n=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&n._propagateFrom(a,4),n):i("cannot await properties of a non-object\n\n See http://goo.gl/OsFKC8\n")}var s=t("./util.js"),u=s.isObject,l=t("./es5.js");s.inherits(o,n),o.prototype._init=function(){this._init$(void 0,-3)},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){for(var r={},i=this.length(),o=0,a=this.length();a>o;++o)r[this._values[o+i]]=this._values[o];this._resolve(r)}},o.prototype._promiseProgressed=function(t,e){this._promise._progress({key:this._values[e+this.length()],value:t})},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5.js":14,"./util.js":38}],28:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var d=t[h];(void 0!==d||h in t)&&e.cast(d)._then(c,f,void 0,l,null)}return l}var a=t("./util.js").isArray,s=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util.js":38}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t,n,r,a){this.constructor$(t),this._promise._captureStackTrace(),this._preservedValues=a===o?[]:null,this._zerothIsAccum=void 0===r,this._gotAccum=!1,this._reducingIndex=this._zerothIsAccum?1:0,this._valuesPhase=void 0;var u=i(r,this._promise),f=!1,h=u instanceof e;h&&(u=u._target(),u._isPending()?u._proxyPromiseArray(this,-1):u._isFulfilled()?(r=u._value(),this._gotAccum=!0):(this._reject(u._reason()),f=!0)),h||this._zerothIsAccum||(this._gotAccum=!0);var p=l();this._callback=null===p?n:p.bind(n),this._accum=r,f||c.invoke(s,this,void 0)}function s(){this._init$(void 0,-5)}function u(t,e,n,i){if("function"!=typeof e)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");var o=new a(t,e,n,i);return o.promise()}var l=e._getDomain,c=t("./async.js"),f=t("./util.js"),h=f.tryCatch,p=f.errorObj;f.inherits(a,n),a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){(this._gotAccum||this._zerothIsAccum)&&this._resolve(null!==this._preservedValues?[]:this._accum)},a.prototype._promiseFulfilled=function(t,n){var r=this._values;r[n]=t;var o,a=this.length(),s=this._preservedValues,u=null!==s,l=this._gotAccum,c=this._valuesPhase;if(!c)for(c=this._valuesPhase=new Array(a),o=0;a>o;++o)c[o]=0;if(o=c[n],0===n&&this._zerothIsAccum?(this._accum=t,this._gotAccum=l=!0,c[n]=0===o?1:2):-1===n?(this._accum=t,this._gotAccum=l=!0):0===o?c[n]=1:(c[n]=2,this._accum=t),l){for(var f,d=this._callback,v=this._promise._boundValue(),m=this._reducingIndex;a>m;++m)if(o=c[m],2!==o){if(1!==o)return;if(t=r[m],this._promise._pushContext(),u?(s.push(t),f=h(d).call(v,t,m,a)):f=h(d).call(v,this._accum,t,m,a),this._promise._popContext(),f===p)return this._reject(f.e);var g=i(f,this._promise);if(g instanceof e){if(g=g._target(),g._isPending())return c[m]=4,g._proxyPromiseArray(this,m);if(!g._isFulfilled())return this._reject(g._reason());f=g._value()}this._reducingIndex=m+1,this._accum=f}else this._reducingIndex=m+1;this._resolve(u?s:this._accum)}},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,n,r){return u(t,e,n,r)}}},{"./async.js":2,"./util.js":38}],31:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")};if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,s=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){s.call(process,t)}}else"undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&window.navigator.standalone?r="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:(r=function(t){var e=document.createElement("div"),n=new MutationObserver(t);return n.observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}},r.isStatic=!0);e.exports=r},{"./util":38}],32:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){this.constructor$(t)}var i=e.PromiseInspection,o=t("./util.js");o.inherits(r,n),r.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;n>=this._length&&this._resolve(this._values)},r.prototype._promiseFulfilled=function(t,e){var n=new i;n._bitField=268435456,n._settledValue=t,this._promiseResolved(e,n)},r.prototype._promiseRejected=function(t,e){var n=new i;n._bitField=134217728,n._settledValue=t,this._promiseResolved(e,n)},e.settle=function(t){return new r(t).promise()},e.prototype.settle=function(){return new r(this).promise()}}},{"./util.js":38}],33:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var a=t("./util.js"),s=t("./errors.js").RangeError,u=t("./errors.js").AggregateError,l=a.isArray;a.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},i.prototype._promiseRejected=function(t){if(this._addRejected(t),this.howMany()>this._canPossiblyFulfill()){for(var e=new u,n=this.length();n0},e.prototype.isRejected=t.prototype._isRejected=function(){return(134217728&this._bitField)>0},e.prototype.isPending=t.prototype._isPending=function(){return 0===(402653184&this._bitField)},e.prototype.isResolved=t.prototype._isResolved=function(){return(402653184&this._bitField)>0},t.prototype.isPending=function(){return this._target()._isPending()},t.prototype.isRejected=function(){return this._target()._isRejected()},t.prototype.isFulfilled=function(){return this._target()._isFulfilled()},t.prototype.isResolved=function(){return this._target()._isResolved()},t.prototype._value=function(){return this._settledValue},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},t.prototype.value=function(){var t=this._target();if(!t.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return t._settledValue},t.prototype.reason=function(){var t=this._target();if(!t.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return t._unsetRejectionIsUnhandled(),t._settledValue},t.PromiseInspection=e}},{}],35:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;if(o(t)){var c=new e(n);return t._then(c._fulfillUnchecked,c._rejectUncheckedCheckError,c._progressUnchecked,c,null),c}var f=s.tryCatch(i)(t);if(f===u){r&&r._pushContext();var c=e.reject(f.e);return r&&r._popContext(),c}if("function"==typeof f)return a(t,f,r)}return t}function i(t){return t.then}function o(t){return c.call(t,"_promise0")}function a(t,r,i){function o(t){c&&(c._resolveCallback(t),c=null)}function a(t){c&&(c._rejectCallback(t,h,!0),c=null)}function l(t){c&&"function"==typeof c._progress&&c._progress(t)}var c=new e(n),f=c;i&&i._pushContext(), c._captureStackTrace(),i&&i._popContext();var h=!0,p=s.tryCatch(r).call(t,o,a,l);return h=!1,c&&p===u&&(c._rejectCallback(p.e,!0,!0),c=null),f}var s=t("./util.js"),u=s.errorObj,l=s.isObject,c={}.hasOwnProperty;return r}},{"./util.js":38}],36:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){var e=this;return e instanceof Number&&(e=+e),clearTimeout(e),t}function i(t){var e=this;throw e instanceof Number&&(e=+e),clearTimeout(e),t}var o=t("./util.js"),a=e.TimeoutError,s=function(t,e){if(t.isPending()){var n;!o.isPrimitive(e)&&e instanceof Error?n=e:("string"!=typeof e&&(e="operation timed out"),n=new a(e)),o.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._cancel(n)}},u=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,r){if(void 0===r){r=t,t=void 0;var i=new e(n);return setTimeout(function(){i._fulfill()},r),i}return r=+r,e.resolve(t)._then(u,null,null,r,void 0)};e.prototype.delay=function(t){return l(this,t)},e.prototype.timeout=function(t,e){t=+t;var n=this.then().cancellable();n._cancellationParent=this;var o=setTimeout(function(){s(n,e)},t);return n._then(r,i,void 0,o,void 0)}}},{"./util.js":38}],37:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){for(var n=t.length,r=0;n>r;++r){var i=t[r];if(i.isRejected())return e.reject(i.error());t[r]=i._settledValue}return t}function a(t){setTimeout(function(){throw t},0)}function s(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,n){function i(){if(o>=u)return l.resolve();var c=s(t[o++]);if(c instanceof e&&c._isDisposable()){try{c=r(c._getDisposer().tryDispose(n),t.promise)}catch(f){return a(f)}if(c instanceof e)return c._then(i,a,null,null,null)}i()}var o=0,u=t.length,l=e.defer();return i(),l.promise}function l(t){var e=new m;return e._settledValue=t,e._bitField=268435456,u(this,e).thenReturn(t)}function c(t){var e=new m;return e._settledValue=t,e._bitField=134217728,u(this,e).thenThrow(t)}function f(t,e,n){this._data=t,this._promise=e,this._context=n}function h(t,e,n){this.constructor$(t,e,n)}function p(t){return f.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}var d=t("./errors.js").TypeError,v=t("./util.js").inherits,m=e.PromiseInspection;f.prototype.data=function(){return this._data},f.prototype.promise=function(){return this._promise},f.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},f.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=null!==e?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},f.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(h,f),h.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("fn must be a function\n\n See http://goo.gl/916lJJ\n");var a,s=!0;2===t&&Array.isArray(arguments[0])?(a=arguments[0],t=a.length,s=!1):(a=arguments,t--);for(var u=new Array(t),h=0;t>h;++h){var d=a[h];if(f.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(p,null,null,{resources:u,index:h},void 0))}u[h]=d}var g=e.settle(u).then(o).then(function(t){g._pushContext();var e;try{e=s?i.apply(void 0,t):i.call(void 0,t)}finally{g._popContext()}return e})._then(l,c,void 0,u,void 0);return u.promise=g,g},e.prototype._setDisposable=function(t){this._bitField=262144|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(262144&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new h(t,this,i());throw new d}}},{"./errors.js":13,"./util.js":38}],38:[function(t,e,n){"use strict";function r(){try{var t=C;return C=null,t.apply(this,arguments)}catch(e){return S.e=e,S}}function i(t){return C=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return!o(t)}function s(t){return o(t)?new Error(m(t)):t}function u(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function c(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,r),t}function f(t){throw t}function h(t){try{if("function"==typeof t){var e=x.names(t.prototype),n=x.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=F.test(t+"")&&x.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function p(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function d(t){return j.test(t)}function v(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function m(t){try{return t+""}catch(e){return"[no string representation]"}}function g(t){try{c(t,"isOperational",!0)}catch(e){}}function y(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function _(t){return t instanceof Error&&x.propertyIsWritable(t,"stack")}function b(t){return{}.toString.call(t)}function w(t,e,n){for(var r=x.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(M){D.lastLineError=M}e.exports=D},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e="length"in t&&t.length,n=Z.type(t);return"function"===n||Z.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function r(t,e,n){if(Z.isFunction(e))return Z.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return Z.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(st.test(e))return Z.filter(e,t,n);e=Z.filter(e,t)}return Z.grep(t,function(t){return B.call(e,t)>=0!==n})}function i(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e=dt[t]={};return Z.each(t.match(pt)||[],function(t,n){e[n]=!0}),e}function a(){J.removeEventListener("DOMContentLoaded",a,!1),t.removeEventListener("load",a,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+s.uid++}function u(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(bt,"-$1").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_t.test(n)?Z.parseJSON(n):n}catch(i){}yt.set(t,e,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return J.activeElement}catch(t){}}function h(t,e){return Z.nodeName(t,"table")&&Z.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function p(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function d(t){var e=Pt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function v(t,e){for(var n=0,r=t.length;r>n;n++)gt.set(t[n],"globalEval",!e||gt.get(e[n],"globalEval"))}function m(t,e){var n,r,i,o,a,s,u,l;if(1===e.nodeType){if(gt.hasData(t)&&(o=gt.access(t),a=gt.set(e,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)Z.event.add(e,i,l[i][n])}yt.hasData(t)&&(s=yt.access(t),u=Z.extend({},s),yt.set(e,u))}}function g(t,e){var n=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&Z.nodeName(t,e)?Z.merge([t],n):n}function y(t,e){var n=e.nodeName.toLowerCase();"input"===n&&kt.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function _(e,n){var r,i=Z(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(r=t.getDefaultComputedStyle(i[0]))?r.display:Z.css(i[0],"display");return i.detach(),o}function b(t){var e=J,n=zt[t];return n||(n=_(t,e),"none"!==n&&n||(Lt=(Lt||Z("'),"after"==options.previewPosition?iFrame.insertAfter(footer):iFrame.insertBefore(header),previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]):altKey===!0&&(iFrame?iFrame.remove():previewWindow.close(),previewWindow=iFrame=!1),options.previewAutoRefresh||refreshPreview(),options.previewInWindow&&previewWindow.focus()}function refreshPreview(){renderPreview()}function renderPreview(){if(options.previewHandler&&"function"==typeof options.previewHandler)options.previewHandler($$.val());else if(options.previewParser&&"function"==typeof options.previewParser){var t=options.previewParser($$.val());writeInPreview(localize(t,1))}else""!==options.previewParserPath?$.ajax({type:"POST",dataType:"text",global:!1,url:options.previewParserPath,data:options.previewParserVar+"="+encodeURIComponent($$.val()),success:function(t){writeInPreview(localize(t,1))}}):template||$.ajax({url:options.previewTemplatePath,dataType:"text",global:!1,success:function(t){writeInPreview(localize(t,1).replace(//g,$$.val()))}});return!1}function writeInPreview(t){if(options.previewInElement)$(options.previewInElement).html(t);else if(previewWindow&&previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(e){sp=0}previewWindow.document.open(),previewWindow.document.write(t),previewWindow.document.close(),previewWindow.document.documentElement.scrollTop=sp}}function keyPressed(t){if(shiftKey=t.shiftKey,altKey=t.altKey,ctrlKey=t.altKey&&t.ctrlKey?!1:t.ctrlKey||t.metaKey,"keydown"===t.type){if(ctrlKey===!0&&(li=$('a[accesskey="'+(13==t.keyCode?"\\n":String.fromCharCode(t.keyCode))+'"]',header).parent("li"),0!==li.length))return ctrlKey=!1,setTimeout(function(){li.triggerHandler("mouseup")},1),!1;if(13===t.keyCode||10===t.keyCode)return ctrlKey===!0?(ctrlKey=!1,markup(options.onCtrlEnter),options.onCtrlEnter.keepDefault):shiftKey===!0?(shiftKey=!1,markup(options.onShiftEnter),options.onShiftEnter.keepDefault):(markup(options.onEnter),options.onEnter.keepDefault);if(9===t.keyCode)return 1==shiftKey||1==ctrlKey||1==altKey?!1:-1!==caretOffset?(get(),caretOffset=$$.val().length-caretOffset,set(caretOffset,0),caretOffset=-1,!1):(markup(options.onTab),options.onTab.keepDefault)}}function remove(){$$.unbind(".markItUp").removeClass("markItUpEditor"),$$.parent("div").parent("div.markItUp").parent("div").replaceWith($$),$$.data("markItUp",null)}var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;if($$=$(this),textarea=this,levels=[],abort=!1,scrollPosition=caretPosition=0,caretOffset=-1,options.previewParserPath=localize(options.previewParserPath),options.previewTemplatePath=localize(options.previewTemplatePath),method)switch(method){case"remove":remove();break;case"insert":markup(params);break;default:$.error("Method "+method+" does not exist on jQuery.markItUp")}else init()})},$.fn.markItUpRemove=function(){return this.each(function(){$(this).markItUp("remove")})},$.markItUp=function(t){var e={target:!1};return $.extend(e,t),e.target?$(e.target).each(function(){$(this).focus(),$(this).trigger("insertion",[e])}):void $("textarea").trigger("insertion",[e])}}(jQuery),function(t,e){"use strict";function n(t,e){var n,r;e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),document.createEvent?(n=document.createEvent("HTMLEvents"),n.initEvent(t,!0,!0)):(n=document.createEventObject(),n.eventType=t);for(r in e)f(e,r)&&(n[r]=e[r]);if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(i){}}function r(t){this.name="RavenConfigError",this.message=t}function i(t){var e=X.exec(t),n={},i=7;try{for(;i--;)n[G[i]]=e[i]||""}catch(o){throw new r("Invalid DSN: "+t)}if(n.pass)throw new r("Do not specify your private key in the DSN!");return n}function o(t){return void 0===t}function a(t){return"function"==typeof t}function s(t){return"[object String]"===U.toString.call(t)}function u(t){return"object"==typeof t&&null!==t}function l(t){for(var e in t)return!1;return!0}function c(t){return u(t)&&"[object Error]"===U.toString.call(t)||t instanceof Error}function f(t,e){return U.hasOwnProperty.call(t,e)}function h(t,e){var n,r;if(o(t.length))for(n in t)f(t,n)&&e.call(null,n,t[n]);else if(r=t.length)for(n=0;r>n;n++)e.call(null,n,t[n])}function p(t,e){var r=[];t.stack&&t.stack.length&&h(t.stack,function(t,e){var n=d(e);n&&r.push(n)}),n("handle",{stackInfo:t,options:e}),m(t.name,t.message,t.url,t.lineno,r,e)}function d(t){if(t.url){var e,n={filename:t.url,lineno:t.line,colno:t.column,"function":t.func||"?"},r=v(t);if(r){var i=["pre_context","context_line","post_context"];for(e=3;e--;)n[i[e]]=r[e]}return n.in_app=!(q.includePaths.test&&!q.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n["function"])||/raven\.(min\.)?js$/.test(n.filename)),n}}function v(t){if(t.context&&q.fetchContext){for(var e=t.context,n=~~(e.length/2),r=e.length,i=!1;r--;)if(e[r].length>300){i=!0;break}if(i){if(o(t.column))return;return[[],e[n].substr(t.column,50),[]]}return[e.slice(0,n),e[n],e.slice(n+1)]}}function m(t,e,n,r,i,o){var a,s;q.ignoreErrors.test&&q.ignoreErrors.test(e)||(e+="",e=y(e,q.maxMessageLength),s=t+": "+e,s=y(s,q.maxMessageLength),i&&i.length?(n=i[0].filename||n,i.reverse(),a={frames:i}):n&&(a={frames:[{filename:n,lineno:r,in_app:!0}]}),q.ignoreUrls.test&&q.ignoreUrls.test(n)||(!q.whitelistUrls.test||q.whitelistUrls.test(n))&&w(g({exception:{type:t,value:e},stacktrace:a,culprit:n,message:s},o)))}function g(t,e){return e?(h(e,function(e,n){t[e]=n}),t):t}function y(t,e){return t.length<=e?t:t.substr(0,e)+"…"}function _(){return+new Date}function b(){if(document.location&&document.location.href){var t={headers:{"User-Agent":navigator.userAgent}};return t.url=document.location.href,document.referrer&&(t.headers.Referer=document.referrer),t}}function w(t){var e={project:R,logger:q.logger,platform:"javascript"},r=b();r&&(e.request=r),t=g(e,t),t.tags=g(g({},q.tags),t.tags),t.extra=g(g({},q.extra),t.extra),t.extra=g({"session:duration":_()-B},t.extra),l(t.tags)&&delete t.tags,P&&(t.user=P),q.release&&(t.release=q.release),a(q.dataCallback)&&(t=q.dataCallback(t)||t),t&&!l(t)&&(!a(q.shouldSendCallback)||q.shouldSendCallback(t))&&(O=t.event_id||(t.event_id=C()),E("debug","Raven about to send:",t),k()&&(q.transport||x)({url:I,auth:{sentry_version:"4",sentry_client:"raven-js/"+K.VERSION,sentry_key:N},data:t,options:q,onSuccess:function(){n("success",{data:t,src:I})},onError:function(){n("failure",{data:t,src:I})}}))}function x(t){t.auth.sentry_data=JSON.stringify(t.data);var e=$(),n=t.url+"?"+F(t.auth);(t.options.crossOrigin||""===t.options.crossOrigin)&&(e.crossOrigin=t.options.crossOrigin),e.onload=t.onSuccess,e.onerror=e.onabort=t.onError,e.src=n}function $(){return document.createElement("img")}function k(){return z?I?!0:(J||E("error","Error: Raven has not been configured."),J=!0,!1):!1}function S(t){for(var e,n=[],r=0,i=t.length;i>r;r++)e=t[r],s(e)?n.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&n.push(e.source);return new RegExp(n.join("|"),"i")}function C(){var e=t.crypto||t.msCrypto;if(!o(e)&&e.getRandomValues){var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}function E(t){V[t]&&K.debug&&V[t].apply(W,A.call(arguments,1))}function T(){var e=t.RavenConfig;e&&K.config(e.dsn,e.config).install()}function F(t){var e=[];return h(t,function(t,n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.join("&")}var j={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},A=[].slice,D="?";j.wrap=function(t){function e(){try{return t.apply(this,arguments)}catch(e){throw j.report(e),e}}return e},j.report=function(){function n(t){s(),d.push(t)}function r(t){for(var e=d.length-1;e>=0;--e)d[e]===t&&d.splice(e,1)}function i(){u(),d=[]}function o(t,e){var n=null;if(!e||j.collectWindowErrors){for(var r in d)if(f(d,r))try{d[r].apply(null,[t].concat(A.call(arguments,2)))}catch(i){n=i}if(n)throw n}}function a(t,e,n,r,i){var a=null;if(g)j.computeStackTrace.augmentStackTraceWithInitialElement(g,e,n,t),l();else if(i)a=j.computeStackTrace(i),o(a,!0);else{var s={url:e,line:n,column:r};s.func=j.computeStackTrace.guessFunctionName(s.url,s.line),s.context=j.computeStackTrace.gatherContext(s.url,s.line),a={message:t,url:document.location.href,stack:[s]},o(a,!0)}return h?h.apply(this,arguments):!1}function s(){p||(h=t.onerror,t.onerror=a,p=!0)}function u(){p&&(t.onerror=h,p=!1,h=e)}function l(){var t=g,e=v;v=null,g=null,m=null,o.apply(null,[t,!1].concat(e))}function c(e,n){var r=A.call(arguments,1);if(g){if(m===e)return;l()}var i=j.computeStackTrace(e);if(g=i,m=e,v=r,t.setTimeout(function(){m===e&&l()},i.incomplete?2e3:0),n!==!1)throw e}var h,p,d=[],v=null,m=null,g=null;return c.subscribe=n,c.unsubscribe=r,c.uninstall=i,c}(),j.computeStackTrace=function(){function e(e){if(!j.remoteFetching)return"";try{var n=function(){try{return new t.XMLHttpRequest}catch(e){return new t.ActiveXObject("Microsoft.XMLHTTP")}},r=n();return r.open("GET",e,!1),r.send(""),r.responseText}catch(i){return""}}function n(t){if(!s(t))return[];if(!f(_,t)){var n="",r="";try{r=document.domain}catch(i){}-1!==t.indexOf(r)&&(n=e(t)),_[t]=n?n.split("\n"):[]}return _[t]}function r(t,e){var r,i=/function ([^(]*)\(([^)]*)\)/,a=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",u=10,l=n(t);if(!l.length)return D;for(var c=0;u>c;++c)if(s=l[e-c]+s,!o(s)){if(r=a.exec(s))return r[1];if(r=i.exec(s))return r[1]}return D}function i(t,e){var r=n(t);if(!r.length)return null;var i=[],a=Math.floor(j.linesOfContext/2),s=a+j.linesOfContext%2,u=Math.max(0,e-a-1),l=Math.min(r.length,e+s-1);e-=1;for(var c=u;l>c;++c)o(r[c])||i.push(r[c]);return i.length>0?i:null}function a(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function u(t){return a(t).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function l(t,e){for(var r,i,o=0,a=e.length;a>o;++o)if((r=n(e[o])).length&&(r=r.join("\n"),i=t.exec(r)))return{url:e[o],line:r.substring(0,i.index).split("\n").length,column:i.index-r.lastIndexOf("\n",i.index)-1};return null}function c(t,e,r){var i,o=n(e),s=new RegExp("\\b"+a(t)+"\\b");return r-=1,o&&o.length>r&&(i=s.exec(o[r]))?i.index:null}function h(e){for(var n,r,i,o,s=[t.location.href],c=document.getElementsByTagName("script"),f=""+e,h=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,d=0;d):(\d+)(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=t.stack.split("\n"),f=[],h=/^(.*) is undefined$/.exec(t.message),p=0,d=l.length;d>p;++p){if(e=s.exec(l[p]))n={url:e[3],func:e[1]||D,args:e[2]?e[2].split(","):"",line:+e[4],column:e[5]?+e[5]:null};else if(e=a.exec(l[p]))n={url:e[2],func:e[1]||D,line:+e[3],column:e[4]?+e[4]:null};else{if(!(e=u.exec(l[p])))continue;n={url:e[2],func:e[1]||D,line:+e[3],column:e[4]?+e[4]:null}}!n.func&&n.line&&(n.func=r(n.url,n.line)),n.line&&(n.context=i(n.url,n.line)),f.push(n)}return f.length?(f[0].line&&!f[0].column&&h?f[0].column=c(h[1],f[0].url,f[0].line):f[0].column||o(t.columnNumber)||(f[0].column=t.columnNumber+1),{name:t.name,message:t.message,url:document.location.href,stack:f}):null}}function d(t){var e=t.stacktrace;if(!o(t.stacktrace)&&t.stacktrace){for(var n,a=/ line (\d+), column (\d+) in (?:]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,s=e.split("\n"),u=[],l=0,c=s.length;c>l;l+=2)if(n=a.exec(s[l])){var f={line:+n[1],column:+n[2],func:n[3]||n[4],args:n[5]?n[5].split(","):[],url:n[6]};if(!f.func&&f.line&&(f.func=r(f.url,f.line)),f.line)try{f.context=i(f.url,f.line)}catch(h){}f.context||(f.context=[s[l+1]]),u.push(f)}return u.length?{name:t.name,message:t.message,url:document.location.href,stack:u}:null}}function v(e){var o=e.message.split("\n");if(o.length<4)return null;var a,s,c,h,p=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,d=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,v=/^\s*Line (\d+) of function script\s*$/i,m=[],g=document.getElementsByTagName("script"),y=[];for(s in g)f(g,s)&&!g[s].src&&y.push(g[s]);for(s=2,c=o.length;c>s;s+=2){var _=null;if(a=p.exec(o[s]))_={url:a[2],func:a[3],line:+a[1]};else if(a=d.exec(o[s])){_={url:a[3],func:a[4]};var b=+a[1],w=y[a[2]-1];if(w&&(h=n(_.url))){h=h.join("\n");var x=h.indexOf(w.innerText);x>=0&&(_.line=b+h.substring(0,x).split("\n").length)}}else if(a=v.exec(o[s])){var $=t.location.href.replace(/#.*$/,""),k=a[1],S=new RegExp(u(o[s+1]));h=l(S,[$]),_={url:$,line:h?h.line:k,func:""}}if(_){_.func||(_.func=r(_.url,_.line));var C=i(_.url,_.line),E=C?C[Math.floor(C.length/2)]:null;C&&E.replace(/^\s*/,"")===o[s+1].replace(/^\s*/,"")?_.context=C:_.context=[o[s+1]],m.push(_)}}return m.length?{name:e.name,message:o[0],url:document.location.href,stack:m}:null}function m(t,e,n,o){var a={url:e,line:n};if(a.url&&a.line){t.incomplete=!1,a.func||(a.func=r(a.url,a.line)),a.context||(a.context=i(a.url,a.line));var s=/ '([^']+)' /.exec(o);if(s&&(a.column=c(s[1],a.url,a.line)),t.stack.length>0&&t.stack[0].url===a.url){if(t.stack[0].line===a.line)return!1;if(!t.stack[0].line&&t.stack[0].func===a.func)return t.stack[0].line=a.line,t.stack[0].context=a.context,!1}return t.stack.unshift(a),t.partial=!0,!0}return t.incomplete=!0,!1}function g(t,e){for(var n,i,o,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],u={},l=!1,f=g.caller;f&&!l;f=f.caller)if(f!==y&&f!==j.report){if(i={url:null,func:D,line:null,column:null},f.name?i.func=f.name:(n=a.exec(f.toString()))&&(i.func=n[1]),"undefined"==typeof i.func)try{i.func=n.input.substring(0,n.input.indexOf("{"))}catch(p){}if(o=h(f)){i.url=o.url,i.line=o.line,i.func===D&&(i.func=r(i.url,i.line));var d=/ '([^']+)' /.exec(t.message||t.description);d&&(i.column=c(d[1],o.url,o.line))}u[""+f]?l=!0:u[""+f]=!0,s.push(i)}e&&s.splice(0,e);var v={name:t.name,message:t.message,url:document.location.href,stack:s};return m(v,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),v}function y(t,e){var n=null;e=null==e?0:+e;try{if(n=d(t))return n}catch(r){if(j.debug)throw r}try{if(n=p(t))return n}catch(r){if(j.debug)throw r}try{if(n=v(t))return n}catch(r){if(j.debug)throw r}try{if(n=g(t,e+1))return n}catch(r){if(j.debug)throw r}return{name:t.name,message:t.message,url:document.location.href}}var _={};return y.augmentStackTraceWithInitialElement=m,y.computeStackTraceFromStackProp=p,y.guessFunctionName=r,y.gatherContext=i,y}();var M,O,I,P,N,R,L=t.Raven,z=!("object"!=typeof JSON||!JSON.stringify),q={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,tags:{},maxMessageLength:100,extra:{}},H=!1,U=Object.prototype,W=t.console||{},V={},B=_();for(var Y in W)V[Y]=W[Y];var K={VERSION:"1.1.22",debug:!0,noConflict:function(){return t.Raven=L,K},config:function(t,e){if(I)return E("error","Error: Raven has already been configured"),K;if(!t)return K;var n=i(t),r=n.path.lastIndexOf("/"),o=n.path.substr(1,r);return e&&h(e,function(t,e){q[t]=e}),q.ignoreErrors.push(/^Script error\.?$/),q.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),q.ignoreErrors=S(q.ignoreErrors),q.ignoreUrls=q.ignoreUrls.length?S(q.ignoreUrls):!1,q.whitelistUrls=q.whitelistUrls.length?S(q.whitelistUrls):!1,q.includePaths=S(q.includePaths),N=n.user,R=n.path.substr(r+1),I="//"+n.host+(n.port?":"+n.port:"")+"/"+o+"api/"+R+"/store/",n.protocol&&(I=n.protocol+":"+I),q.fetchContext&&(j.remoteFetching=!0),q.linesOfContext&&(j.linesOfContext=q.linesOfContext),j.collectWindowErrors=!!q.collectWindowErrors,K},install:function(){return k()&&!H&&(j.report.subscribe(p),H=!0),K},context:function(t,n,r){return a(t)&&(r=n||[],n=t,t=e),K.wrap(t,n).apply(this,r)},wrap:function(t,n){function r(){for(var e=[],r=arguments.length,i=!t||t&&t.deep!==!1;r--;)e[r]=i?K.wrap(t,arguments[r]):arguments[r];try{return n.apply(this,e)}catch(o){throw K.captureException(o,t),o}}if(o(n)&&!a(t))return t;if(a(t)&&(n=t,t=e),!a(n))return n;if(n.__raven__)return n;for(var i in n)f(n,i)&&(r[i]=n[i]);return r.__raven__=!0,r.__inner__=n,r},uninstall:function(){return j.report.uninstall(),H=!1,K},captureException:function(t,e){if(!c(t))return K.captureMessage(t,e);M=t;try{var n=j.computeStackTrace(t);p(n,e)}catch(r){if(t!==r)throw r}return K},captureMessage:function(t,e){return q.ignoreErrors.test&&q.ignoreErrors.test(t)?void 0:(w(g({message:t+""},e)),K)},setUserContext:function(t){return P=t,K},setExtraContext:function(t){return q.extra=t||{},K},setTagsContext:function(t){return q.tags=t||{},K},setReleaseContext:function(t){return q.release=t,K},setDataCallback:function(t){return q.dataCallback=t,K},setShouldSendCallback:function(t){return q.shouldSendCallback=t,K},lastException:function(){return M},lastEventId:function(){return O},isSetup:function(){return k()}};K.setUser=K.setUserContext;var G="source protocol user pass host port path".split(" "),X=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;r.prototype=new Error,r.prototype.constructor=r;var J;T(),"function"==typeof define&&define.amd?(t.Raven=K,define("raven",[],function(){return K})):"object"==typeof module?module.exports=K:"object"==typeof exports?exports=K:t.Raven=K}("undefined"!=typeof window?window:this),function(t,e){var n=function(e){(t.execScript||function(e){t.eval.call(t,e)})(e)},r=function(t,e){return t instanceof(e||Array)},i=document,o="getElementsByTagName",a="length",s="readyState",u="onreadystatechange",l=i[o]("script"),c=l[l[a]-1],f=c.innerHTML.replace(/^\s+|\s+$/g,"");if(!t.ljs){var h=c.src.match(/checkLoaded/)?1:0,p=i[o]("head")[0]||i.documentElement,d=function(t){var e={};return e.u=t.replace(/#(=)?([^#]*)?/g,function(t,n,r){return e[n?"f":"i"]=r,""}),e},v=function(t,e,n){var r,o=i.createElement(t);n&&(o[s]?o[u]=function(){("loaded"===o[s]||"complete"===o[s])&&(o[u]=null,n())}:o.onload=n);for(r in e)e[r]&&(o[r]=e[r]);p.appendChild(o)},m=function(t,e){if(this.aliases&&this.aliases[t]){var n=this.aliases[t].slice(0);return r(n)||(n=[n]),e&&n.push(e),this.load.apply(this,n)}if(r(t)){for(var i=t[a];i--;)this.load(t[i]);return e&&t.push(e),this.load.apply(this,t)}return t.match(/\.css\b/)?this.loadcss(t,e):this.loadjs(t,e)},g={},y={aliases:{},loadjs:function(t,n){var r=d(t);return t=r.u,g[t]===!0?(n&&n(),this):g[t]!==e?(n&&(g[t]=function(t,e){return function(){t&&t(),e&&e()}}(g[t],n)),this):(g[t]=function(e){return function(){g[t]=!0,e&&e()}}(n),n=function(){g[t]()},v("script",{type:"text/javascript",src:t,id:r.i,onerror:function(t){if(r.f){var e=t.currentTarget;e.parentNode.removeChild(e),v("script",{type:"text/javascript",src:r.f,id:r.i},n)}}},n),this)},loadcss:function(t,e){var n=d(t);return t=n.u,g[t]||v("link",{type:"text/css",rel:"stylesheet",href:t,id:n.i}),g[t]=!0,e&&e(),this},load:function(){var t=arguments,n=t[a];return 1===n&&r(t[0],Function)?(t[0](),this):(m.call(this,t[0],1>=n?e:function(){y.load.apply(y,[].slice.call(t,1))}),this)},addAliases:function(t){for(var e in t)this.aliases[e]=r(t[e])?t[e].slice(0):t[e];return this}};if(h){var _,b,w,x;for(_=0,b=l[a];b>_;_++)(x=l[_].getAttribute("src"))&&(g[x.replace(/#.*$/,"")]=!0);for(w=i[o]("link"),_=0,b=w[a];b>_;_++)("stylesheet"===w[_].rel||"text/css"===w[_].type)&&(g[w[_].getAttribute("href").replace(/#.*$/,"")]=!0)}t.ljs=y}f&&n(f)}(window),MessageFormat.locale.af=function(t){return 1===t?"one":"other"},MessageFormat.locale.am=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.ar=function(t){return 0===t?"zero":1==t?"one":2==t?"two":t%100>=3&&10>=t%100&&t==Math.floor(t)?"few":t%100>=11&&99>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.bg=function(t){return 1===t?"one":"other"},MessageFormat.locale.bn=function(t){return 1===t?"one":"other"},MessageFormat.locale.br=function(t){return 0===t?"zero":1==t?"one":2==t?"two":3==t?"few":6==t?"many":"other"},MessageFormat.locale.ca=function(t){return 1===t?"one":"other"},MessageFormat.locale.cs=function(t){return 1==t?"one":2==t||3==t||4==t?"few":"other"},MessageFormat.locale.cy=function(t){return 0===t?"zero":1==t?"one":2==t?"two":3==t?"few":6==t?"many":"other"},MessageFormat.locale.da=function(t){return 1===t?"one":"other"},MessageFormat.locale.de=function(t){return 1===t?"one":"other"},MessageFormat.locale.el=function(t){return 1===t?"one":"other"},MessageFormat.locale.en=function(t){return 1===t?"one":"other"},MessageFormat.locale.es=function(t){return 1===t?"one":"other"},MessageFormat.locale.et=function(t){return 1===t?"one":"other"},MessageFormat.locale.eu=function(t){return 1===t?"one":"other"},MessageFormat.locale.fa=function(t){return"other"},MessageFormat.locale.fi=function(t){return 1===t?"one":"other"},MessageFormat.locale.fil=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.fr=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.ga=function(t){return 1==t?"one":2==t?"two":"other"},MessageFormat.locale.gl=function(t){return 1===t?"one":"other"},MessageFormat.locale.gsw=function(t){return 1===t?"one":"other"},MessageFormat.locale.gu=function(t){return 1===t?"one":"other"},MessageFormat.locale.he=function(t){return 1===t?"one":"other"},MessageFormat.locale.hi=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.hr=function(t){return t%10==1&&t%100!=11?"one":t%10>=2&&4>=t%10&&(12>t%100||t%100>14)&&t==Math.floor(t)?"few":t%10===0||t%10>=5&&9>=t%10||t%100>=11&&14>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.hu=function(t){return"other"},MessageFormat.locale.id=function(t){return"other"},MessageFormat.locale["in"]=function(t){return"other"},MessageFormat.locale.is=function(t){return 1===t?"one":"other"},MessageFormat.locale.it=function(t){return 1===t?"one":"other"},MessageFormat.locale.iw=function(t){return 1===t?"one":"other"},MessageFormat.locale.ja=function(t){return"other"},MessageFormat.locale.kn=function(t){return"other"},MessageFormat.locale.ko=function(t){return"other"},MessageFormat.locale.lag=function(t){return 0===t?"zero":t>0&&2>t?"one":"other"},MessageFormat.locale.ln=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.lt=function(t){return t%10==1&&(11>t%100||t%100>19)?"one":t%10>=2&&9>=t%10&&(11>t%100||t%100>19)&&t==Math.floor(t)?"few":"other"},MessageFormat.locale.lv=function(t){return 0===t?"zero":t%10==1&&t%100!=11?"one":"other"},MessageFormat.locale.mk=function(t){return t%10==1&&11!=t?"one":"other"},MessageFormat.locale.ml=function(t){return 1===t?"one":"other"},MessageFormat.locale.mo=function(t){return 1==t?"one":0===t||1!=t&&t%100>=1&&19>=t%100&&t==Math.floor(t)?"few":"other"},MessageFormat.locale.mr=function(t){return 1===t?"one":"other"},MessageFormat.locale.ms=function(t){return"other"},MessageFormat.locale.mt=function(t){return 1==t?"one":0===t||t%100>=2&&4>=t%100&&t==Math.floor(t)?"few":t%100>=11&&19>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.nl=function(t){return 1===t?"one":"other"},MessageFormat.locale.no=function(t){return 1===t?"one":"other"},MessageFormat.locale.or=function(t){return 1===t?"one":"other"},MessageFormat.locale.pl=function(t){return 1==t?"one":t%10>=2&&4>=t%10&&(12>t%100||t%100>14)&&t==Math.floor(t)?"few":t%10===0||1!=t&&t%10==1||(t%10>=5&&9>=t%10||t%100>=12&&14>=t%100)&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.pt=function(t){return 1===t?"one":"other"},MessageFormat.locale.ro=function(t){return 1==t?"one":0===t||1!=t&&t%100>=1&&19>=t%100&&t==Math.floor(t)?"few":"other"},MessageFormat.locale.ru=function(t){return t%10==1&&t%100!=11?"one":t%10>=2&&4>=t%10&&(12>t%100||t%100>14)&&t==Math.floor(t)?"few":t%10===0||t%10>=5&&9>=t%10||t%100>=11&&14>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.shi=function(t){return t>=0&&1>=t?"one":t>=2&&10>=t&&t==Math.floor(t)?"few":"other"},MessageFormat.locale.sk=function(t){return 1==t?"one":2==t||3==t||4==t?"few":"other"},MessageFormat.locale.sl=function(t){return t%100==1?"one":t%100==2?"two":t%100==3||t%100==4?"few":"other"},MessageFormat.locale.sq=function(t){return 1===t?"one":"other"},MessageFormat.locale.sr=function(t){return t%10==1&&t%100!=11?"one":t%10>=2&&4>=t%10&&(12>t%100||t%100>14)&&t==Math.floor(t)?"few":t%10===0||t%10>=5&&9>=t%10||t%100>=11&&14>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.sv=function(t){return 1===t?"one":"other"},MessageFormat.locale.sw=function(t){return 1===t?"one":"other"},MessageFormat.locale.ta=function(t){return 1===t?"one":"other"},MessageFormat.locale.te=function(t){return 1===t?"one":"other"},MessageFormat.locale.th=function(t){return"other"},MessageFormat.locale.tl=function(t){return 0===t||1==t?"one":"other"},MessageFormat.locale.tr=function(t){return"other"},MessageFormat.locale.uk=function(t){return t%10==1&&t%100!=11?"one":t%10>=2&&4>=t%10&&(12>t%100||t%100>14)&&t==Math.floor(t)?"few":t%10===0||t%10>=5&&9>=t%10||t%100>=11&&14>=t%100&&t==Math.floor(t)?"many":"other"},MessageFormat.locale.ur=function(t){return 1===t?"one":"other"},MessageFormat.locale.vi=function(t){return"other"},MessageFormat.locale.zh=function(t){return"other"};var mod;mod=angular.module("infinite-scroll",[]),mod.value("THROTTLE_MILLISECONDS",null),mod.directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(t,e,n,r){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"=",infiniteScrollListenForEvent:"@"},link:function(i,o,a){var s,u,l,c,f,h,p,d,v,m,g,y,_,b,w,x,$,k;return k=angular.element(e),_=null,b=null,u=null,l=null,m=!0,$=!1,x=null,v=function(t){return t=t[0]||t,isNaN(t.offsetHeight)?t.document.documentElement.clientHeight:t.offsetHeight},g=function(t){return t[0].getBoundingClientRect&&!t.css("none")?t[0].getBoundingClientRect().top+y(t):void 0},y=function(t){return t=t[0]||t,isNaN(window.pageYOffset)?t.document.documentElement.scrollTop:t.ownerDocument.defaultView.pageYOffset},d=function(){var e,n,r,a,s;return l===k?(e=v(l)+y(l[0].document.documentElement),r=g(o)+v(o)):(e=v(l),n=0,void 0!==g(l)&&(n=g(l)),r=g(o)-n+v(o)),$&&(r=v((o[0].ownerDocument||o[0].document).documentElement)),a=r-e,s=a<=v(l)*_+1,s?(u=!0,b?i.$$phase||t.$$phase?i.infiniteScroll():i.$apply(i.infiniteScroll):void 0):u=!1},w=function(t,e){var r,i,o;return o=null,i=0,r=function(){var e;return i=(new Date).getTime(),n.cancel(o),o=null,t.call(),e=null},function(){var a,s;return a=(new Date).getTime(),s=e-(a-i),0>=s?(clearTimeout(o),n.cancel(o),o=null,i=a,t.call()):o?void 0:o=n(r,s,1)}},null!=r&&(d=w(d,r)),i.$on("$destroy",function(){return l.unbind("scroll",d),null!=x?(x(),x=null):void 0}),h=function(t){return _=parseFloat(t)||0},i.$watch("infiniteScrollDistance",h),h(i.infiniteScrollDistance),f=function(t){return b=!t,b&&u?(u=!1,d()):void 0},i.$watch("infiniteScrollDisabled",f),f(i.infiniteScrollDisabled),p=function(t){return $=t},i.$watch("infiniteScrollUseDocumentBottom",p),p(i.infiniteScrollUseDocumentBottom),s=function(t){return null!=l&&l.unbind("scroll",d),l=t,null!=t?l.bind("scroll",d):void 0},s(k),i.infiniteScrollListenForEvent&&(x=t.$on(i.infiniteScrollListenForEvent,d)),c=function(t){if(null!=t&&0!==t.length){if(t instanceof HTMLElement?t=angular.element(t):"function"==typeof t.append?t=angular.element(t[t.length-1]):"string"==typeof t&&(t=angular.element(document.querySelector(t))),null!=t)return s(t);throw new Exception("invalid infinite-scroll-container attribute.")}},i.$watch("infiniteScrollContainer",c),c(i.infiniteScrollContainer||[]),null!=a.infiniteScrollParent&&s(angular.element(o.parent())),null!=a.infiniteScrollImmediateCheck&&(m=i.$eval(a.infiniteScrollImmediateCheck)),n(function(){return m?d():void 0},0,1)}}}]),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:F(t)}function n(t){return a(t)?t:j(t)}function r(t){return s(t)?t:A(t)}function i(t){return o(t)&&!u(t)?t:D(t)}function o(t){return!(!t||!t[ln])}function a(t){return!(!t||!t[cn])}function s(t){return!(!t||!t[fn])}function u(t){return a(t)||s(t)}function l(t){return!(!t||!t[hn])}function c(t){return t.value=!1,t}function f(t){t&&(t.value=!0)}function h(){}function p(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function d(t){return void 0===t.size&&(t.size=t.__iterate(m)),t.size}function v(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return 0>e?d(t)+e:e}function m(){return!0}function g(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function y(t,e){return b(t,e,0)}function _(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function x(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function $(){return{value:void 0,done:!0}}function k(t){return!!E(t)}function S(t){return t&&"function"==typeof t.next}function C(t){var e=E(t);return e&&e.call(t)}function E(t){var e=t&&($n&&t[$n]||t[kn]);return"function"==typeof e?e:void 0}function T(t){return t&&"number"==typeof t.length}function F(t){return null===t||void 0===t?R():o(t)?t.toSeq():q(t)}function j(t){return null===t||void 0===t?R().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():L(t)}function A(t){return null===t||void 0===t?R():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():z(t)}function D(t){return(null===t||void 0===t?R():o(t)?a(t)?t.entrySeq():t:z(t)).toSetSeq()}function M(t){this._array=t,this.size=t.length}function O(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function I(t){this._iterable=t,this.size=t.length||t.size}function P(t){this._iterator=t,this._iteratorCache=[]}function N(t){return!(!t||!t[Cn])}function R(){return En||(En=new M([]))}function L(t){var e=Array.isArray(t)?new M(t).fromEntrySeq():S(t)?new P(t).fromEntrySeq():k(t)?new I(t).fromEntrySeq():"object"==typeof t?new O(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function z(t){var e=H(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function q(t){var e=H(t)||"object"==typeof t&&new O(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function H(t){return T(t)?new M(t):S(t)?new P(t):k(t)?new I(t):void 0}function U(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var s=i[n?o-a:a];if(e(s[1],r?s[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,n)}function W(t,e,n,r){ var i=t._cache;if(i){var o=i.length-1,a=0;return new w(function(){var t=i[n?o-a:a];return a++>o?$():x(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function V(t,e){return e?B(e,t,"",{"":t}):Y(t)}function B(t,e,n,r){return Array.isArray(e)?t.call(r,n,A(e).map(function(n,r){return B(t,n,r,e)})):K(e)?t.call(r,n,j(e).map(function(n,r){return B(t,n,r,e)})):e}function Y(t){return Array.isArray(t)?A(t).map(Y).toList():K(t)?j(t).map(Y).toMap():t}function K(t){return t&&(t.constructor===Object||void 0===t.constructor)}function G(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function X(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||s(t)!==s(e)||l(t)!==l(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!u(t);if(l(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&G(i[1],t)&&(n||G(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var c=t;t=e,e=c}var f=!0,h=e.__iterate(function(e,r){return(n?t.has(e):i?G(e,t.get(r,gn)):G(t.get(r,gn),e))?void 0:(f=!1,!1)});return f&&t.size===h}function J(t,e){if(!(this instanceof J))return new J(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Tn)return Tn;Tn=this}}function Q(t,e){if(!t)throw new Error(e)}function Z(t,e,n){if(!(this instanceof Z))return new Z(t,e,n);if(Q(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(Fn)return Fn;Fn=this}}function tt(){throw TypeError("Abstract")}function et(){}function nt(){}function rt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>Nn?at(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ut(t);if("function"==typeof t.toString)return st(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=zn[t];return void 0===e&&(e=st(t),Ln===Rn&&(Ln=0,zn={}),Ln++,zn[t]=e),e}function st(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ct(t){Q(t!==1/0,"Cannot perform this action with an infinite size.")}function ft(t){return null===t||void 0===t?xt():ht(t)&&!l(t)?t:xt().withMutations(function(e){var r=n(t);ct(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function ht(t){return!(!t||!t[qn])}function pt(t,e){this.ownerID=t,this.entries=e}function dt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function mt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function yt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function _t(t,e){return x(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,n,r){var i=Object.create(Hn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xt(){return Un||(Un=wt(0))}function $t(t,e,n){var r,i;if(t._root){var o=c(yn),a=c(_n);if(r=kt(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===gn?-1:1:0)}else{if(n===gn)return t;i=1,r=new pt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?wt(i,r):xt()}function kt(t,e,n,r,i,o,a,s){return t?t.update(e,n,r,i,o,a,s):o===gn?t:(f(s),f(a),new gt(e,r,[i,o]))}function St(t){return t.constructor===gt||t.constructor===mt}function Ct(t,e,n,r,i){if(t.keyHash===r)return new mt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&mn,s=(0===n?r:r>>>n)&mn,u=a===s?[Ct(t,e,n+dn,r,i)]:(o=new gt(e,r,i),s>a?[t,o]:[o,t]);return new dt(e,1<s;s++,u<<=1){var c=e[s];void 0!==c&&s!==r&&(i|=u,a[o++]=c)}return new dt(t,i,a)}function Ft(t,e,n,r,i){for(var o=0,a=new Array(vn),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[o++]:void 0;return a[r]=i,new vt(t,o+1,a)}function jt(t,e,r){for(var i=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Pt(t,e,n,r){var i=r?t:p(t);return i[e]=n,i}function Nt(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,s=0;i>s;s++)s===e?(o[s]=n,a=-1):o[s]=t[s+a];return o}function Rt(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;r>a;a++)a===e&&(o=1),i[a]=t[a+o];return i}function Lt(t){var e=Wt();if(null===t||void 0===t)return e;if(zt(t))return t;var n=r(t),i=n.size;return 0===i?e:(ct(i),i>0&&vn>i?Ut(0,i,dn,null,new qt(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(e,n){return t.set(n,e)})}))}function zt(t){return!(!t||!t[Yn])}function qt(t,e){this.array=t,this.ownerID=e}function Ht(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===s?u&&u.array:t&&t.array,i=n>o?0:o-n,l=a-n;return l>vn&&(l=vn),function(){if(i===l)return Xn;var t=e?--l:i++;return r&&r[t]}}function i(t,r,i){var s,u=t&&t.array,l=i>o?0:o-i>>r,c=(a-i>>r)+1;return c>vn&&(c=vn),function(){for(;;){if(s){var t=s();if(t!==Xn)return t;s=null}if(l===c)return Xn;var o=e?--c:l++;s=n(u&&u[o],r-dn,i+(o<=t.size||0>e)return t.withMutations(function(t){0>e?Gt(t,e).set(0,n):Gt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=c(_n);return e>=Jt(t._capacity)?r=Bt(r,t.__ownerID,0,e,n,o):i=Bt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Ut(t._origin,t._capacity,t._level,i,r):t}function Bt(t,e,n,r,i,o){var a=r>>>n&mn,s=t&&a0){var l=t&&t.array[a],c=Bt(l,e,n-dn,r,i,o);return c===l?t:(u=Yt(t,e),u.array[a]=c,u)}return s&&t.array[a]===i?t:(f(o),u=Yt(t,e),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new qt(t?t.array.slice():[],e)}function Kt(t,e){if(e>=Jt(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&mn],r-=dn;return n}}function Gt(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var r=t.__ownerID||new h,i=t._origin,o=t._capacity,a=i+e,s=void 0===n?o:0>n?o+n:i+n;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,l=t._root,c=0;0>a+c;)l=new qt(l&&l.array.length?[void 0,l]:[],r),u+=dn,c+=1<=1<p?Kt(t,s-1):p>f?new qt([],r):d;if(d&&p>f&&o>a&&d.array.length){l=Yt(l,r);for(var m=l,g=u;g>dn;g-=dn){var y=f>>>g&mn;m=m.array[y]=Yt(m.array[y],r)}m.array[f>>>dn&mn]=d}if(o>s&&(v=v&&v.removeAfter(r,0,s)),a>=p)a-=p,s-=p,u=dn,l=null,v=v&&v.removeBefore(r,0,a);else if(a>i||f>p){for(c=0;l;){var _=a>>>u&mn;if(_!==p>>>u&mn)break;_&&(c+=(1<i&&(l=l.removeBefore(r,u,a-c)),l&&f>p&&(l=l.removeAfter(r,u,p-c)),c&&(a-=c,s-=c)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=l,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Ut(a,s,u,l,v)}function Xt(t,e,n){for(var i=[],a=0,s=0;sa&&(a=l.size),o(u)||(l=l.map(function(t){return V(t)})),i.push(l)}return a>t.size&&(t=t.setSize(a)),Mt(t,e,i)}function Jt(t){return vn>t?0:t-1>>>dn<=vn&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&s!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=o,i=a.set(s,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function se(t){var e=Te(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Fe,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===xn){var r=t.__iterator(e,n);return new w(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===wn?bn:wn,n)},e}function ue(t,e,n){var r=Te(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,gn);return o===gn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return r(e.call(n,t,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(xn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return x(r,s,e.call(n,a[1],s,t),i)})},r}function le(t,e){var n=Te(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=se(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Fe,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function ce(t,e,n,r){var i=Te(t);return r&&(i.has=function(r){var i=t.get(r,gn);return i!==gn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,gn);return o!==gn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate(function(t,o,u){return e.call(n,t,o,u)?(s++,i(t,r?o:s-1,a)):void 0},o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(xn,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,l=u[0],c=u[1];if(e.call(n,c,l,t))return x(i,r?l:s++,c,o)}})},i}function fe(t,e,n){var r=ft().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function he(t,e,n){var r=a(t),i=(l(t)?Qt():ft()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Ee(t);return i.map(function(e){return ke(t,o(e))})}function pe(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),g(e,n,i))return t;var o=y(e,i),a=_(n,i);if(o!==o||a!==a)return pe(t.toSeq().cacheResult(),e,n,r);var s,u=a-o;u===u&&(s=0>u?0:u);var l=Te(t);return l.size=0===s?s:t.size&&s||void 0,!r&&N(t)&&s>=0&&(l.get=function(e,n){return e=v(this,e),e>=0&&s>e?t.get(e+o,n):n}),l.__iterateUncached=function(e,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,u=!0,l=0;return t.__iterate(function(t,n){return u&&(u=a++s)return $();var t=i.next();return r||e===wn?t:e===bn?x(e,u-1,void 0,t):x(e,u-1,t.value[1],t)})},l}function de(t,e,n){var r=Te(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,s){return e.call(n,t,i,s)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(xn,i),s=!0;return new w(function(){if(!s)return $();var t=a.next();if(t.done)return t;var i=t.value,u=i[0],l=i[1];return e.call(n,l,u,o)?r===xn?t:x(r,u,l,t):(s=!1,$())})},r}function ve(t,e,n,r){var i=Te(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate(function(t,o,l){return s&&(s=e.call(n,t,o,l))?void 0:(u++,i(t,r?o:u-1,a))}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(xn,o),u=!0,l=0;return new w(function(){var t,o,c;do{if(t=s.next(),t.done)return r||i===wn?t:i===bn?x(i,l++,void 0,t):x(i,l++,t.value[1],t);var f=t.value;o=f[0],c=f[1],u&&(u=e.call(n,c,o,a))}while(u);return i===xn?t:x(i,o,c,t)})},i}function me(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?L(t):z(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var u=i[0];if(u===t||r&&a(u)||s(t)&&s(u))return u}var l=new M(i);return r?l=l.toKeyedSeq():s(t)||(l=l.toSetSeq()),l=l.flatten(!0),l.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),l}function ge(t,e,n){var r=Te(t);return r.__iterateUncached=function(r,i){function a(t,l){var c=this;t.__iterate(function(t,i){return(!e||e>l)&&o(t)?a(t,l+1):r(t,n?i:s++,c)===!1&&(u=!0),!u},i)}var s=0,u=!1;return a(t,0),s},r.__iteratorUncached=function(r,i){var a=t.__iterator(r,i),s=[],u=0;return new w(function(){for(;a;){var t=a.next();if(t.done===!1){var l=t.value;if(r===xn&&(l=l[1]),e&&!(s.length0}function $e(t,n,r){var i=Te(t);return i.size=new M(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(wn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),C(i?t.reverse():t)}),a=0,s=!1;return new w(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?$():x(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function ke(t,e){return N(t)?e:t.constructor(e)}function Se(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ce(t){return ct(t.size),d(t)}function Ee(t){return a(t)?n:s(t)?r:i}function Te(t){return Object.create((a(t)?j:s(t)?A:D).prototype)}function Fe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):F.prototype.cacheResult.call(this)}function je(t,e){return t>e?1:e>t?-1:0}function Ae(t){var n=C(t);if(!n){if(!T(t))throw new TypeError("Expected iterable or array-like: "+t);n=C(e(t))}return n}function De(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(t);Ie(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=ft(o)},i=r.prototype=Object.create(Qn);return i.constructor=r,r}function Me(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Oe(t){return t._name||t.constructor.name||"Record"}function Ie(t,e){try{e.forEach(Pe.bind(void 0,t))}catch(n){}}function Pe(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Q(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ne(t){return null===t||void 0===t?qe():Re(t)&&!l(t)?t:qe().withMutations(function(e){var n=i(t);ct(n.size),n.forEach(function(t){return e.add(t)})})}function Re(t){return!(!t||!t[Zn])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function ze(t,e){var n=Object.create(tr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function qe(){return er||(er=ze(xt()))}function He(t){return null===t||void 0===t?Ve():Ue(t)?t:Ve().withMutations(function(e){var n=i(t);ct(n.size),n.forEach(function(t){return e.add(t)})})}function Ue(t){return Re(t)&&l(t)}function We(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ve(){return rr||(rr=We(ee()))}function Be(t){return null===t||void 0===t?Ge():Ye(t)?t:Ge().unshiftAll(t)}function Ye(t){return!(!t||!t[ir])}function Ke(t,e,n,r){var i=Object.create(or);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ge(){return ar||(ar=Ke(0))}function Xe(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Je(t,e){return e}function Qe(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):t}function nn(){return p(arguments)}function rn(t,e){return e>t?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=l(t),n=a(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+sn(ot(t),ot(e))|0}:function(t,e){r=r+sn(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0});return an(i,r)}function an(t,e){return e=An(e,3432918353),e=An(e<<15|e>>>-15,461845907),e=An(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=An(e^e>>>16,2246822507),e=An(e^e>>>13,3266489909),e=it(e^e>>>16)}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var un=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=s,e.isAssociative=u,e.isOrdered=l,e.Keyed=n,e.Indexed=r,e.Set=i;var ln="@@__IMMUTABLE_ITERABLE__@@",cn="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",hn="@@__IMMUTABLE_ORDERED__@@",pn="delete",dn=5,vn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},M.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new w(function(){return i>r?$():x(t,i,n[e?r-i++:i++])})},t(O,j),O.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},O.prototype.has=function(t){return this._object.hasOwnProperty(t)},O.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[e?i-o:o];if(t(n[a],a,this)===!1)return o+1}return o},O.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[e?i-o:o];return o++>i?$():x(t,a,n[a])})},O.prototype[hn]=!0,t(I,A),I.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=C(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},I.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=C(n);if(!S(r))return new w($);var i=0;return new w(function(){var e=r.next();return e.done?e:x(t,i++,e.value)})},t(P,A),P.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return x(t,i,r[i++])})};var En;t(J,A),J.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},J.prototype.get=function(t,e){return this.has(t)?this._value:e},J.prototype.includes=function(t){return G(this._value,t)},J.prototype.slice=function(t,e){var n=this.size;return g(t,e,n)?this:new J(this._value,_(e,n)-y(t,n))},J.prototype.reverse=function(){return this},J.prototype.indexOf=function(t){return G(this._value,t)?0:-1},J.prototype.lastIndexOf=function(t){return G(this._value,t)?this.size:-1},J.prototype.__iterate=function(t,e){for(var n=0;n1?" by "+this._step:"")+" ]"},Z.prototype.get=function(t,e){return this.has(t)?this._start+v(this,t)*this._step:e},Z.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Z(0,0):new Z(this.get(t,this._end),this.get(e,this._end),this._step))},Z.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Z.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new w(function(){var a=i;return i+=e?-r:r,o>n?$():x(t,o++,a)})},Z.prototype.equals=function(t){return t instanceof Z?this._start===t._start&&this._end===t._end&&this._step===t._step:X(this,t)};var Fn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var jn,An="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Dn=Object.isExtensible,Mn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),On="function"==typeof WeakMap;On&&(jn=new WeakMap);var In=0,Pn="__immutablehash__";"function"==typeof Symbol&&(Pn=Symbol(Pn));var Nn=16,Rn=255,Ln=0,zn={};t(ft,et),ft.prototype.toString=function(){return this.__toString("Map {","}")},ft.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ft.prototype.set=function(t,e){return $t(this,t,e)},ft.prototype.setIn=function(t,e){return this.updateIn(t,gn,function(){return e})},ft.prototype.remove=function(t){return $t(this,t,gn)},ft.prototype.deleteIn=function(t){return this.updateIn(t,function(){return gn})},ft.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},ft.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Ot(this,Ae(t),e,n);return r===gn?void 0:r},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):xt()},ft.prototype.merge=function(){return jt(this,void 0,arguments)},ft.prototype.mergeWith=function(t){var e=un.call(arguments,1);return jt(this,t,e)},ft.prototype.mergeIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,xt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ft.prototype.mergeDeep=function(){return jt(this,At,arguments)},ft.prototype.mergeDeepWith=function(t){var e=un.call(arguments,1);return jt(this,Dt(t),e)},ft.prototype.mergeDeepIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,xt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ft.prototype.sort=function(t){return Qt(be(this,t))},ft.prototype.sortBy=function(t,e){return Qt(be(this,e,t))},ft.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ft.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},ft.prototype.asImmutable=function(){return this.__ensureOwner()},ft.prototype.wasAltered=function(){return this.__altered},ft.prototype.__iterator=function(t,e){return new yt(this,t,e)},ft.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},ft.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ft.isMap=ht;var qn="@@__IMMUTABLE_MAP__@@",Hn=ft.prototype;Hn[qn]=!0,Hn[pn]=Hn.remove,Hn.removeIn=Hn.deleteIn,pt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(G(n,i[o][0]))return i[o][1];return r},pt.prototype.update=function(t,e,n,r,i,o,a){for(var s=i===gn,u=this.entries,l=0,c=u.length;c>l&&!G(r,u[l][0]);l++);var h=c>l;if(h?u[l][1]===i:s)return this;if(f(a),(s||!h)&&f(o),!s||1!==u.length){if(!h&&!s&&u.length>=Wn)return Et(t,u,r,i);var d=t&&t===this.ownerID,v=d?u:p(u);return h?s?l===c-1?v.pop():v[l]=v.pop():v[l]=[r,i]:v.push([r,i]),d?(this.entries=v,this):new pt(t,v)}},dt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&mn),o=this.bitmap;return 0===(o&i)?r:this.nodes[It(o&i-1)].get(t+dn,e,n,r)},dt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=(0===e?n:n>>>e)&mn,u=1<=Vn)return Ft(t,h,l,s,d);if(c&&!d&&2===h.length&&St(h[1^f]))return h[1^f];if(c&&d&&1===h.length&&St(d))return d;var v=t&&t===this.ownerID,m=c?d?l:l^u:l|u,g=c?d?Pt(h,f,d,v):Rt(h,f,v):Nt(h,f,d,v);return v?(this.bitmap=m,this.nodes=g,this):new dt(t,m,g)},vt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&mn,o=this.nodes[i];return o?o.get(t+dn,e,n,r):r},vt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=(0===e?n:n>>>e)&mn,u=i===gn,l=this.nodes,c=l[s];if(u&&!c)return this;var f=kt(c,t,e+dn,n,r,i,o,a);if(f===c)return this;var h=this.count;if(c){if(!f&&(h--,Bn>h))return Tt(t,l,h,s)}else h++;var p=t&&t===this.ownerID,d=Pt(l,s,f,p);return p?(this.count=h,this.nodes=d,this):new vt(t,h,d)},mt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(G(n,i[o][0]))return i[o][1];return r},mt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=i===gn;if(n!==this.keyHash)return s?this:(f(a),f(o),Ct(this,t,e,n,[r,i]));for(var u=this.entries,l=0,c=u.length;c>l&&!G(r,u[l][0]);l++);var h=c>l;if(h?u[l][1]===i:s)return this;if(f(a),(s||!h)&&f(o),s&&2===c)return new gt(t,this.keyHash,u[1^l]);var d=t&&t===this.ownerID,v=d?u:p(u);return h?s?l===c-1?v.pop():v[l]=v.pop():v[l]=[r,i]:v.push([r,i]),d?(this.entries=v,this):new mt(t,this.keyHash,v)},gt.prototype.get=function(t,e,n,r){return G(n,this.entry[0])?this.entry[1]:r},gt.prototype.update=function(t,e,n,r,i,o,a){var s=i===gn,u=G(r,this.entry[0]); return(u?i===this.entry[1]:s)?this:(f(a),s?void f(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new gt(t,this.keyHash,[r,i]):(f(o),Ct(this,t,e,ot(r),[r,i])))},pt.prototype.iterate=mt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},dt.prototype.iterate=vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},gt.prototype.iterate=function(t,e){return t(this.entry)},t(yt,w),yt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return _t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return _t(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return _t(t,o.entry);e=this._stack=bt(o,e)}continue}e=this._stack=this._stack.__prev}return $()};var Un,Wn=vn/4,Vn=vn/2,Bn=vn/4;t(Lt,nt),Lt.of=function(){return this(arguments)},Lt.prototype.toString=function(){return this.__toString("List [","]")},Lt.prototype.get=function(t,e){if(t=v(this,t),t>=0&&t>>e&mn;if(r>=this.array.length)return new qt([],t);var i,o=0===r;if(e>0){var a=this.array[r];if(i=a&&a.removeBefore(t,e-dn,n),i===a&&o)return this}if(o&&!i)return this;var s=Yt(this,t);if(!o)for(var u=0;r>u;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},qt.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&mn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-dn,n),i===o&&r===this.array.length-1)return this}var a=Yt(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Gn,Xn={};t(Qt,ft),Qt.of=function(){return this(arguments)},Qt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Qt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Qt.prototype.set=function(t,e){return ne(this,t,e)},Qt.prototype.remove=function(t){return ne(this,t,gn)},Qt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Qt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Qt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Qt.isOrderedMap=Zt,Qt.prototype[hn]=!0,Qt.prototype[pn]=Qt.prototype.remove;var Jn;t(re,j),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=le(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=ue(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Ce(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(wn,e),r=e?Ce(this):0;return new w(function(){var i=n.next();return i.done?i:x(t,e?--r:r++,i.value,i)})},re.prototype[hn]=!0,t(ie,A),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e),r=0;return new w(function(){var e=n.next();return e.done?e:x(t,r++,e.value,e)})},t(oe,D),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new w(function(){var e=n.next();return e.done?e:x(t,e.value,e.value,e)})},t(ae,j),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Se(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new w(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Se(r);var i=o(r);return x(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=ae.prototype.cacheResult=Fe,t(De,et),De.prototype.toString=function(){return this.__toString(Oe(this)+" {","}")},De.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},De.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},De.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Me(this,xt()))},De.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Oe(this));var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Me(this,n)},De.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Me(this,e)},De.prototype.wasAltered=function(){return this._map.wasAltered()},De.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},De.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},De.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Me(this,e,t):(this.__ownerID=t,this._map=e,this)};var Qn=De.prototype;Qn[pn]=Qn.remove,Qn.deleteIn=Qn.removeIn=Hn.removeIn,Qn.merge=Hn.merge,Qn.mergeWith=Hn.mergeWith,Qn.mergeIn=Hn.mergeIn,Qn.mergeDeep=Hn.mergeDeep,Qn.mergeDeepWith=Hn.mergeDeepWith,Qn.mergeDeepIn=Hn.mergeDeepIn,Qn.setIn=Hn.setIn,Qn.update=Hn.update,Qn.updateIn=Hn.updateIn,Qn.withMutations=Hn.withMutations,Qn.asMutable=Hn.asMutable,Qn.asImmutable=Hn.asImmutable,t(Ne,rt),Ne.of=function(){return this(arguments)},Ne.fromKeys=function(t){return this(n(t).keySeq())},Ne.prototype.toString=function(){return this.__toString("Set {","}")},Ne.prototype.has=function(t){return this._map.has(t)},Ne.prototype.add=function(t){return Le(this,this._map.set(t,!0))},Ne.prototype.remove=function(t){return Le(this,this._map.remove(t))},Ne.prototype.clear=function(){return Le(this,this._map.clear())},Ne.prototype.union=function(){var t=un.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ke(t,e)},Be.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;ct(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ke(e,n)},Be.prototype.pop=function(){return this.slice(1)},Be.prototype.unshift=function(){return this.push.apply(this,arguments)},Be.prototype.unshiftAll=function(t){return this.pushAll(t)},Be.prototype.shift=function(){return this.pop.apply(this,arguments)},Be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ge()},Be.prototype.slice=function(t,e){if(g(t,e,this.size))return this;var n=y(t,this.size),r=_(e,this.size);if(r!==this.size)return nt.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ke(i,o)},Be.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ke(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Be.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Be.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new w(function(){if(r){var e=r.value;return r=r.next,x(t,n++,e)}return $()})},Be.isStack=Ye;var ir="@@__IMMUTABLE_STACK__@@",or=Be.prototype;or[ir]=!0,or.withMutations=Hn.withMutations,or.asMutable=Hn.asMutable,or.asImmutable=Hn.asImmutable,or.wasAltered=Hn.wasAltered;var ar;e.Iterator=w,Xe(e,{toArray:function(){ct(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return ft(this.toKeyedSeq())},toObject:function(){ct(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Qt(this.toKeyedSeq())},toOrderedSet:function(){return He(a(this)?this.valueSeq():this)},toSet:function(){return Ne(a(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Be(a(this)?this.valueSeq():this)},toList:function(){return Lt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=un.call(arguments,0);return ke(this,me(this,t))},includes:function(t){return this.some(function(e){return G(e,t)})},entries:function(){return this.__iterator(xn)},every:function(t,e){ct(this.size);var n=!0;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(t,e){return ke(this,ce(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return ct(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ct(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(bn)},map:function(t,e){return ke(this,ue(this,t,e))},reduce:function(t,e,n){ct(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return ke(this,le(this,!0))},slice:function(t,e){return ke(this,pe(this,t,e,!0))},some:function(t,e){return!this.every(Ze(t),e)},sort:function(t){return ke(this,be(this,t))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return fe(this,t,e)},equals:function(t){return X(this,t)},entrySeq:function(){var t=this;if(t._cache)return new M(t._cache);var e=t.toSeq().map(Qe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(m)},flatMap:function(t,e){return ke(this,ye(this,t,e))},flatten:function(t){return ke(this,ge(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return G(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ae(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,gn):gn,r===gn)return e}return r},groupBy:function(t,e){return he(this,t,e)},has:function(t){return this.get(t,gn)!==gn},hasIn:function(t){return this.getIn(t,gn)!==gn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keySeq:function(){return this.toSeq().map(Je).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tn(t):rn)},minBy:function(t,e){return we(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return ke(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return ke(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return ke(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return ke(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return ke(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=e.prototype;sr[ln]=!0,sr[Sn]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=en,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,function(){try{Object.defineProperty(sr,"length",{get:function(){if(!e.noLengthWarning){var t;try{throw new Error}catch(n){t=n.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Xe(n,{flip:function(){return ke(this,se(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return G(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return G(e,t)})},mapEntries:function(t,e){var n=this,r=0;return ke(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return ke(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ur=n.prototype;ur[cn]=!0,ur[Sn]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Xe(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return ke(this,ce(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return ke(this,le(this,!1))},slice:function(t,e){return ke(this,pe(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=y(t,0>t?this.count():this.size);var r=this.slice(0,t);return ke(this,1===n?r:r.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return ke(this,ge(this,t,!1))},get:function(t,e){return t=v(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=v(this,t),t>=0&&(void 0!==this.size?this.size===1/0||ti;i++){var l=r(this._options.steps[i]);if(l.step=e.length+1,"string"==typeof l.element&&(l.element=document.querySelector(l.element)),"undefined"==typeof l.element||null==l.element){var c=document.querySelector(".introjsFloatingElement");null==c&&(c=document.createElement("div"),c.className="introjsFloatingElement",document.body.appendChild(c)),l.element=c,l.position="floating"}null!=l.element&&e.push(l)}else{var f=t.querySelectorAll("*[data-intro]");if(f.length<1)return!1;for(var i=0,h=f.length;h>i;i++){var d=f[i],v=parseInt(d.getAttribute("data-step"),10);v>0&&(e[v-1]={element:d,intro:d.getAttribute("data-intro"),step:parseInt(d.getAttribute("data-step"),10),tooltipClass:d.getAttribute("data-tooltipClass"),highlightClass:d.getAttribute("data-highlightClass"),position:d.getAttribute("data-position")||this._options.tooltipPosition})}for(var m=0,i=0,h=f.length;h>i;i++){var d=f[i];if(null==d.getAttribute("data-step")){for(;;){if("undefined"==typeof e[m])break;m++}e[m]={element:d,intro:d.getAttribute("data-intro"),step:m+1,tooltipClass:d.getAttribute("data-tooltipClass"),highlightClass:d.getAttribute("data-highlightClass"),position:d.getAttribute("data-position")||this._options.tooltipPosition}}}}for(var g=[],y=0;y0?a.call(n):r&&r.className.indexOf("introjs-skipbutton")>0?(n._introItems.length-1==n._currentStep&&"function"==typeof n._introCompleteCallback&&n._introCompleteCallback.call(n),void 0!=n._introExitCallback&&n._introExitCallback.call(n),s.call(n,t)):o.call(n),e.preventDefault?e.preventDefault():e.returnValue=!1}},n._onResize=function(t){p.call(n,document.querySelector(".introjs-helperLayer")),p.call(n,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",n._onKeyDown,!0),window.addEventListener("resize",n._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",n._onKeyDown),document.attachEvent("onresize",n._onResize))}return!1}function r(t){if(null==t||"object"!=typeof t||"undefined"!=typeof t.nodeType)return t;var e={};for(var n in t)"undefined"!=typeof jQuery&&t[n]instanceof jQuery?e[n]=t[n]:e[n]=r(t[n]);return e}function i(t){this._currentStep=t-2,"undefined"!=typeof this._introItems&&o.call(this)}function o(){if(this._direction="forward","undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)return"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void s.call(this,this._targetElement);var t=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,t.element),v.call(this,t)}function a(){if(this._direction="backward",0===this._currentStep)return!1;var t=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,t.element),v.call(this,t)}function s(t){var e=t.querySelector(".introjs-overlay");if(null!=e){e.style.opacity=0,setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},500);var n=t.querySelector(".introjs-helperLayer");n&&n.parentNode.removeChild(n);var r=t.querySelector(".introjs-tooltipReferenceLayer");r&&r.parentNode.removeChild(r);var i=t.querySelector(".introjs-disableInteraction");i&&i.parentNode.removeChild(i);var o=document.querySelector(".introjsFloatingElement");o&&o.parentNode.removeChild(o);var a=document.querySelector(".introjs-showElement");a&&(a.className=a.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""));var s=document.querySelectorAll(".introjs-fixParent");if(s&&s.length>0)for(var u=s.length-1;u>=0;u--)s[u].className=s[u].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=void 0}}function u(t,e,n,r){var i,o,a,s,u,h="";if(e.style.top=null,e.style.right=null,e.style.bottom=null,e.style.left=null,e.style.marginLeft=null,e.style.marginTop=null,n.style.display="inherit","undefined"!=typeof r&&null!=r&&(r.style.top=null,r.style.left=null),this._introItems[this._currentStep])switch(i=this._introItems[this._currentStep],h="string"==typeof i.tooltipClass?i.tooltipClass:this._options.tooltipClass,e.className=("introjs-tooltip "+h).replace(/^\s+|\s+$/g,""),u=this._introItems[this._currentStep].position,("auto"==u||"auto"==this._options.tooltipPosition)&&"floating"!=u&&(u=f.call(this,t,e,u)),a=b(t),o=b(e),s=g(),u){case"top":n.className="introjs-arrow bottom";var p=15;l(a,p,o,s,e),e.style.bottom=a.height+20+"px";break;case"right":e.style.left=a.width+20+"px",a.top+o.height>s.height?(n.className="introjs-arrow left-bottom",e.style.top="-"+(o.height-a.height-20)+"px"):n.className="introjs-arrow left";break;case"left":1==this._options.showStepNumbers&&(e.style.top="15px"),a.top+o.height>s.height?(e.style.top="-"+(o.height-a.height-20)+"px",n.className="introjs-arrow right-bottom"):n.className="introjs-arrow right",e.style.right=a.width+20+"px";break;case"floating":n.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+o.width/2+"px",e.style.marginTop="-"+o.height/2+"px","undefined"!=typeof r&&null!=r&&(r.style.left="-"+(o.width/2+18)+"px",r.style.top="-"+(o.height/2+18)+"px");break;case"bottom-right-aligned":n.className="introjs-arrow top-right";var d=0;c(a,d,o,e),e.style.top=a.height+20+"px";break;case"bottom-middle-aligned":n.className="introjs-arrow top-middle";var v=a.width/2-o.width/2;c(a,v,o,e)&&(e.style.right=null,l(a,v,o,s,e)),e.style.top=a.height+20+"px";break;case"bottom-left-aligned":case"bottom":default:n.className="introjs-arrow top";var p=0;l(a,p,o,s,e),e.style.top=a.height+20+"px"}}function l(t,e,n,r,i){return t.left+e+n.width>r.width?(i.style.left=r.width-n.width-t.left+"px",!1):(i.style.left=e+"px",!0)}function c(t,e,n,r){return t.left+t.width-e-n.width<0?(r.style.left=-t.left+"px",!1):(r.style.right=e+"px",!0)}function f(t,e,n){var r=this._options.positionPrecedence.slice(),i=g(),o=b(e).height+10,a=b(e).width+20,s=b(t),u="floating";return s.left+a>i.width||s.left+s.width/2-a<0?(h(r,"bottom"),h(r,"top")):(s.height+s.top+o>i.height&&h(r,"bottom"),s.top-o<0&&h(r,"top")),s.width+s.left+a>i.width&&h(r,"right"),s.left-a<0&&h(r,"left"),r.length>0&&(u=r[0]),n&&"auto"!=n&&r.indexOf(n)>-1&&(u=n),u}function h(t,e){t.indexOf(e)>-1&&t.splice(t.indexOf(e),1)}function p(t){if(t){if(!this._introItems[this._currentStep])return;var e=this._introItems[this._currentStep],n=b(e.element),r=10;"floating"==e.position&&(r=0),t.setAttribute("style","width: "+(n.width+r)+"px; height:"+(n.height+r)+"px; top:"+(n.top-5)+"px;left: "+(n.left-5)+"px;")}}function d(){var t=document.querySelector(".introjs-disableInteraction");null===t&&(t=document.createElement("div"),t.className="introjs-disableInteraction",this._targetElement.appendChild(t)),p.call(this,t)}function v(t){"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var e=this,n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),i="introjs-helperLayer";b(t.element);if("string"==typeof t.highlightClass&&(i+=" "+t.highlightClass),"string"==typeof this._options.highlightClass&&(i+=" "+this._options.highlightClass),null!=n){var l=r.querySelector(".introjs-helperNumberLayer"),c=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-arrow"),h=r.querySelector(".introjs-tooltip"),v=r.querySelector(".introjs-skipbutton"),_=r.querySelector(".introjs-prevbutton"),x=r.querySelector(".introjs-nextbutton");if(n.className=i,h.style.opacity=0,h.style.display="none",null!=l){var $=this._introItems[t.step-2>=0?t.step-2:0];(null!=$&&"forward"==this._direction&&"floating"==$.position||"backward"==this._direction&&"floating"==t.position)&&(l.style.opacity=0)}p.call(e,n),p.call(e,r);var k=document.querySelectorAll(".introjs-fixParent");if(k&&k.length>0)for(var S=k.length-1;S>=0;S--)k[S].className=k[S].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");var C=document.querySelector(".introjs-showElement");C.className=C.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),e._lastShowElementTimer&&clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=setTimeout(function(){null!=l&&(l.innerHTML=t.step),c.innerHTML=t.intro,h.style.display="block",u.call(e,t.element,h,f,l),r.querySelector(".introjs-bullets li > a.active").className="",r.querySelector('.introjs-bullets li > a[data-stepnumber="'+t.step+'"]').className="active",r.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+w.call(e)+"%;"),h.style.opacity=1,l&&(l.style.opacity=1),-1===x.tabIndex?v.focus():x.focus()},350)}else{var E=document.createElement("div"),T=document.createElement("div"),F=document.createElement("div"),j=document.createElement("div"),A=document.createElement("div"),D=document.createElement("div"),M=document.createElement("div"),O=document.createElement("div"); E.className=i,T.className="introjs-tooltipReferenceLayer",p.call(e,E),p.call(e,T),this._targetElement.appendChild(E),this._targetElement.appendChild(T),F.className="introjs-arrow",A.className="introjs-tooltiptext",A.innerHTML=t.intro,D.className="introjs-bullets",this._options.showBullets===!1&&(D.style.display="none");for(var I=document.createElement("ul"),S=0,P=this._introItems.length;P>S;S++){var N=document.createElement("li"),R=document.createElement("a");R.onclick=function(){e.goToStep(this.getAttribute("data-stepnumber"))},S===t.step-1&&(R.className="active"),R.href="javascript:void(0);",R.innerHTML=" ",R.setAttribute("data-stepnumber",this._introItems[S].step),N.appendChild(R),I.appendChild(N)}D.appendChild(I),M.className="introjs-progress",this._options.showProgress===!1&&(M.style.display="none");var L=document.createElement("div");if(L.className="introjs-progressbar",L.setAttribute("style","width:"+w.call(this)+"%;"),M.appendChild(L),O.className="introjs-tooltipbuttons",this._options.showButtons===!1&&(O.style.display="none"),j.className="introjs-tooltip",j.appendChild(A),j.appendChild(D),j.appendChild(M),1==this._options.showStepNumbers){var z=document.createElement("span");z.className="introjs-helperNumberLayer",z.innerHTML=t.step,T.appendChild(z)}j.appendChild(F),T.appendChild(j);var x=document.createElement("a");x.onclick=function(){e._introItems.length-1!=e._currentStep&&o.call(e)},x.href="javascript:void(0);",x.innerHTML=this._options.nextLabel;var _=document.createElement("a");_.onclick=function(){0!=e._currentStep&&a.call(e)},_.href="javascript:void(0);",_.innerHTML=this._options.prevLabel;var v=document.createElement("a");v.className="introjs-button introjs-skipbutton",v.href="javascript:void(0);",v.innerHTML=this._options.skipLabel,v.onclick=function(){e._introItems.length-1==e._currentStep&&"function"==typeof e._introCompleteCallback&&e._introCompleteCallback.call(e),e._introItems.length-1!=e._currentStep&&"function"==typeof e._introExitCallback&&e._introExitCallback.call(e),s.call(e,e._targetElement)},O.appendChild(v),this._introItems.length>1&&(O.appendChild(_),O.appendChild(x)),j.appendChild(O),u.call(e,t.element,j,F,z)}this._options.disableInteraction===!0&&d.call(e),_.removeAttribute("tabIndex"),x.removeAttribute("tabIndex"),0==this._currentStep&&this._introItems.length>1?(_.className="introjs-button introjs-prevbutton introjs-disabled",_.tabIndex="-1",x.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep||1==this._introItems.length?(v.innerHTML=this._options.doneLabel,_.className="introjs-button introjs-prevbutton",x.className="introjs-button introjs-nextbutton introjs-disabled",x.tabIndex="-1"):(_.className="introjs-button introjs-prevbutton",x.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel),x.focus(),t.element.className+=" introjs-showElement";var q=m(t.element,"position");"absolute"!==q&&"relative"!==q&&(t.element.className+=" introjs-relativePosition");for(var H=t.element.parentNode;null!=H&&"body"!==H.tagName.toLowerCase();){var U=m(H,"z-index"),W=parseFloat(m(H,"opacity")),V=m(H,"transform")||m(H,"-webkit-transform")||m(H,"-moz-transform")||m(H,"-ms-transform")||m(H,"-o-transform");(/[0-9]+/.test(U)||1>W||"none"!==V&&void 0!==V)&&(H.className+=" introjs-fixParent"),H=H.parentNode}if(!y(t.element)&&this._options.scrollToElement===!0){var B=t.element.getBoundingClientRect(),Y=g().height,K=B.bottom-(B.bottom-B.top),G=B.bottom-Y;0>K||t.element.clientHeight>Y?window.scrollBy(0,K-30):window.scrollBy(0,G+100)}"undefined"!=typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function m(t,e){var n="";return t.currentStyle?n=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),n&&n.toLowerCase?n.toLowerCase():n}function g(){if(void 0!=window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function y(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}function _(t){var e=document.createElement("div"),n="",r=this;if(e.className="introjs-overlay","body"===t.tagName.toLowerCase())n+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",e.setAttribute("style",n);else{var i=b(t);i&&(n+="width: "+i.width+"px; height:"+i.height+"px; top:"+i.top+"px;left: "+i.left+"px;",e.setAttribute("style",n))}return t.appendChild(e),e.onclick=function(){1==r._options.exitOnOverlayClick&&(void 0!=r._introExitCallback&&r._introExitCallback.call(r),s.call(r,t))},setTimeout(function(){n+="opacity: "+r._options.overlayOpacity.toString()+";",e.setAttribute("style",n)},10),!0}function b(t){var e={};e.width=t.offsetWidth,e.height=t.offsetHeight;for(var n=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return e.top=r,e.left=n,e}function w(){var t=parseInt(this._currentStep+1,10);return t/this._introItems.length*100}function x(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n}var $="1.1.1",k=function(t){if("object"==typeof t)return new e(t);if("string"==typeof t){var n=document.querySelector(t);if(n)return new e(n);throw new Error("There is no element with given selector.")}return new e(document.body)};return k.version=$,k.fn=e.prototype={clone:function(){return new e(this)},setOption:function(t,e){return this._options[t]=e,this},setOptions:function(t){return this._options=x(this._options,t),this},start:function(){return n.call(this,this._targetElement),this},goToStep:function(t){return i.call(this,t),this},nextStep:function(){return o.call(this),this},previousStep:function(){return a.call(this),this},exit:function(){return s.call(this,this._targetElement),this},refresh:function(){return p.call(this,document.querySelector(".introjs-helperLayer")),p.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),this},onbeforechange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},onchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},onafterchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},oncomplete:function(t){if("function"!=typeof t)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},onexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this}},t.introJs=k,k}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.dragula=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0?t:ut.revertOnSpill,n=it||J,r=p(n),i=R(r);i===!1&&e&&(it?r.removeChild(it):X.insertBefore(n,nt)),i||e?lt.emit("cancel",n,X,X):lt.emit("drop",n,r,X,rt),N()}}function N(){var t=it||J;D(),W(),t&&w.rm(t,"gu-transit"),ot&&clearTimeout(ot),lt.dragging=!1,st&<.emit("out",t,st,X),lt.emit("dragend",t),X=J=it=nt=rt=ot=st=null}function R(t,e){var n;return n=void 0!==e?e:G?rt:m(it||J),t===X&&n===nt}function L(t,e,r){function i(){var i=n(o);if(i===!1)return!1;var a=V(o,t),s=B(o,a,e,r),u=R(o,s);return u?!0:ut.accepts(J,o,X,s)}for(var o=t;o&&!i();)o=p(o);return o}function z(t){function e(t){lt.emit(t,l,st,X)}function n(){h&&e("over")}function r(){st&&e("out")}if(G){t.preventDefault();var i=y("clientX",t),o=y("clientY",t),a=i-Q,s=o-Z;G.style.left=a+"px",G.style.top=s+"px";var l=it||J,c=u(G,i,o),f=L(c,i,o),h=null!==f&&f!==st;(h||null===f)&&(r(),st=f,n());var d=p(l);if(f===X&&it&&!ut.copySortSource)return void(d&&d.removeChild(l));var v,g=V(f,c);if(null!==g)v=B(f,g,i,o);else{if(ut.revertOnSpill!==!0||it)return void(it&&d&&d.removeChild(l));v=nt,f=X}(null===v&&h||v!==l&&v!==m(l))&&(rt=v,f.insertBefore(l,v),lt.emit("shadow",l,f,X))}}function q(t){w.rm(t,"gu-hide")}function H(t){lt.dragging&&w.add(t,"gu-hide")}function U(){if(!G){var t=J.getBoundingClientRect();G=J.cloneNode(!0),G.style.width=f(t)+"px",G.style.height=h(t)+"px",w.rm(G,"gu-transit"),w.add(G,"gu-mirror"),ut.mirrorContainer.appendChild(G),i($,"add","mousemove",z),w.add(ut.mirrorContainer,"gu-unselectable"),lt.emit("cloned",G,J,"mirror")}}function W(){G&&(w.rm(ut.mirrorContainer,"gu-unselectable"),i($,"remove","mousemove",z),p(G).removeChild(G),G=null)}function V(t,e){for(var n=e;n!==t&&p(n)!==t;)n=p(n);return n===$?null:n}function B(t,e,n,r){function i(){var e,i,o,a=t.children.length;for(e=0;a>e;e++){if(i=t.children[e],o=i.getBoundingClientRect(),s&&o.left+o.width/2>n)return i;if(!s&&o.top+o.height/2>r)return i}return null}function o(){var t=e.getBoundingClientRect();return a(s?n>t.left+f(t)/2:r>t.top+h(t)/2)}function a(t){return t?m(e):e}var s="horizontal"===ut.direction,u=e!==t?o():i();return u}function Y(t,e){return"boolean"==typeof ut.copy?ut.copy:ut.copy(t,e)}var K=arguments.length;1===K&&Array.isArray(t)===!1&&(e=t,t=[]);var G,X,J,Q,Z,tt,et,nt,rt,it,ot,at,st=null,ut=e||{};void 0===ut.moves&&(ut.moves=c),void 0===ut.accepts&&(ut.accepts=c),void 0===ut.invalid&&(ut.invalid=j),void 0===ut.containers&&(ut.containers=t||[]),void 0===ut.isContainer&&(ut.isContainer=l),void 0===ut.copy&&(ut.copy=!1),void 0===ut.copySortSource&&(ut.copySortSource=!1),void 0===ut.revertOnSpill&&(ut.revertOnSpill=!1),void 0===ut.removeOnSpill&&(ut.removeOnSpill=!1),void 0===ut.direction&&(ut.direction="vertical"),void 0===ut.ignoreInputTextSelection&&(ut.ignoreInputTextSelection=!0),void 0===ut.mirrorContainer&&(ut.mirrorContainer=x.body);var lt=_({containers:ut.containers,start:T,end:A,cancel:P,remove:I,destroy:g,dragging:!1});return ut.removeOnSpill===!0&<.on("over",q).on("out",H),r(),lt}function i(t,e,r,i){var o={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},a={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},s={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};n.navigator.pointerEnabled?b[e](t,a[r],i):n.navigator.msPointerEnabled?b[e](t,s[r],i):(b[e](t,o[r],i),b[e](t,r,i))}function o(t){if(void 0!==t.touches)return t.touches.length;if(void 0!==t.which&&0!==t.which)return t.which;if(void 0!==t.buttons)return t.buttons;var e=t.button;return void 0!==e?1&e?1:2&e?3:4&e?2:0:void 0}function a(t){var e=t.getBoundingClientRect();return{left:e.left+s("scrollLeft","pageXOffset"),top:e.top+s("scrollTop","pageYOffset")}}function s(t,e){return"undefined"!=typeof n[e]?n[e]:$.clientHeight?$[t]:x.body[t]}function u(t,e,n){var r,i=t||{},o=i.className;return i.className+=" gu-hide",r=x.elementFromPoint(e,n),i.className=o,r}function l(){return!1}function c(){return!0}function f(t){return t.width||t.right-t.left}function h(t){return t.height||t.bottom-t.top}function p(t){return t.parentNode===x?null:t.parentNode}function d(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||v(t)}function v(t){return t?"false"===t.contentEditable?!1:"true"===t.contentEditable?!0:v(p(t)):!1}function m(t){function e(){var e=t;do e=e.nextSibling;while(e&&1!==e.nodeType);return e}return t.nextElementSibling||e()}function g(t){return t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t}function y(t,e){var n=g(e),r={pageX:"clientX",pageY:"clientY"};return t in r&&!(t in n)&&r[t]in n&&(t=r[t]),n[t]}var _=t("contra/emitter"),b=t("crossvent"),w=t("./classes"),x=document,$=x.documentElement;e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./classes":1,"contra/emitter":4,crossvent:8}],3:[function(t,e,n){"use strict";var r=t("ticky");e.exports=function(t,e,n){t&&r(function(){t.apply(n||null,e||[])})}},{ticky:6}],4:[function(t,e,n){"use strict";var r=t("atoa"),i=t("./debounce");e.exports=function(t,e){var n=e||{},o={};return void 0===t&&(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 i=o[e];if(!i)return t;i.splice(i.indexOf(n),1)}return t},t.emit=function(){var e=r(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var a=(o[e]||[]).slice(0);return function(){var o=r(arguments),s=this||t;if("error"===e&&n["throws"]!==!1&&!a.length)throw 1===o.length?o[0]:o;return a.forEach(function(r){n.async?i(r,o,s):r.apply(s,o),r._once&&t.off(e,r)}),t}},t}},{"./debounce":3,atoa:5}],5:[function(t,e,n){e.exports=function(t,e){return Array.prototype.slice.call(t,e)}},{}],6:[function(t,e,n){var r,i="function"==typeof setImmediate;r=i?function(t){setImmediate(t)}:function(t){setTimeout(t,0)},e.exports=r},{}],7:[function(t,e,n){(function(t){function n(){try{var t=new r("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(e){}return!1}var r=t.CustomEvent;e.exports=n()?r:"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,e,n){(function(n){"use strict";function r(t,e,n,r){return t.addEventListener(e,n,r)}function i(t,e,n){return t.attachEvent("on"+e,l(t,e,n))}function o(t,e,n,r){return t.removeEventListener(e,n,r)}function a(t,e,n){var r=c(t,e,n);return r?t.detachEvent("on"+e,r):void 0}function s(t,e,n){function r(){var t;return d.createEvent?(t=d.createEvent("Event"),t.initEvent(e,!0,!0)):d.createEventObject&&(t=d.createEventObject()),t}function i(){return new h(e,{detail:n})}var o=-1===p.indexOf(e)?i():r();t.dispatchEvent?t.dispatchEvent(o):t.fireEvent("on"+e,o)}function u(t,e,r){return function(e){var i=e||n.event;i.target=i.target||i.srcElement,i.preventDefault=i.preventDefault||function(){i.returnValue=!1},i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0},i.which=i.which||i.keyCode,r.call(t,i)}}function l(t,e,n){var r=c(t,e,n)||u(t,e,n);return g.push({wrapper:r,element:t,type:e,fn:n}),r}function c(t,e,n){var r=f(t,e,n);if(r){var i=g[r].wrapper;return g.splice(r,1),i}}function f(t,e,n){var r,i;for(r=0;rk-C&&f.y$-C&&f.x<$+C||S)?(f.previous=null,f.origin=null,t.preventDefault(),!1):(S=!1,f.previous=null,void(f.origin=null))}function u(t){var e,r,o,a,s=null,u=null;if(t=t||window.event,a=t.target||t.srcElement,t.targetTouches?(t.pageX=t.targetTouches[0].clientX,t.pageY=t.targetTouches[0].clientY,t.clientX=t.targetTouches[0].clientX,t.clientY=t.targetTouches[0].clientY):null===t.pageX&&null!==t.clientX&&(e=t.target&&t.target.ownerDocument||document,r=e.documentElement,o=e.body,t.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),f.x&&f.y&&(t.pageXf.x&&(b.h="right"),t.pageYf.y&&(b.v="down"),w=f.x,x=f.y),_={},_.x=t.clientX,_.y=t.clientY,null===f.current||f.outside(f.current)){for(var l=0;ly+(T.hold[n].data||2e3)&&T.hold[n].callback.call(this,t,e);y=0}),this.on=function(t,e){return T[t]?(c(t,e,arguments[2]),this):(this.emitter.on(t,e),this)},this.off=function(t,e){return T[t]?(l(t,e),this):(this.emitter.off(t,e),this)},this.add=function(t){if("string"==typeof t)try{h.push(document.querySelector(e))}catch(n){throw new Error(e+" is not a valid selector, and can't be used add to pointer.")}else if(!t)throw new Error(e+" can not be added to pointer.");h.push(t)},this.destroy=function(){window.removeEventListener("mousedown",r,!1),window.removeEventListener("mousemove",o,!1),window.removeEventListener("mouseup",a,!1),window.removeEventListener("touchstart",r,!1),window.removeEventListener("touchmove",o,!1),window.removeEventListener("touchend",a,!1),h=null,f=null,_=null,b=null}}function i(t){return t===window?{top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:t.getBoundingClientRect()}function o(t,e){return new a(t,e)}function a(t,e){function n(t,e,r){i.autoScroll()&&(i.scrollWhenOutside||!i.point.outside(t))&&(t===window?window.scrollTo(t.pageXOffset,t.pageYOffset+e):t.scrollTop=t.scrollTop+e,setTimeout(function(){i.point.yr.bottom-i.margin&&n(t,e,r)},i.interval))}function r(t,e,n){i.autoScroll()&&(i.scrollWhenOutside||!i.point.outside(t))&&(t===window?window.scrollTo(t.pageXOffset+e,t.pageYOffset):t.scrollLeft=t.scrollLeft+e,setTimeout(function(){i.point.xn.right-i.margin&&r(t,e,n)},i.interval))}var i=this,o=2;e=e||{},this.margin=e.margin||-1,this.scrolling=!1,this.scrollWhenOutside=e.scrollWhenOutside||!1,this.point=u(t),isNaN(e.pixels)||(o=e.pixels),"boolean"==typeof e.autoScroll?this.autoScroll=e.autoScroll?function(){return!0}:function(){return!1}:"undefined"==typeof e.autoScroll?this.autoScroll=function(){return!1}:"function"==typeof e.autoScroll&&(this.autoScroll=e.autoScroll),this.destroy=function(){this.point.destroy()},Object.defineProperties(this,{down:{get:function(){return i.point.down}},interval:{get:function(){return 1/o*1e3}},pixels:{set:function(t){o=t},get:function(){return o}}}),this.point.on("move",function(t,e){t&&i.autoScroll()&&(i.scrollWhenOutside||!this.outside(t))&&(i.point.ye.bottom-i.margin&&n(t,1,e),i.point.xe.right-i.margin&&r(t,1,e))})}t.prototype={constructor:t,on:function(t,e){return this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e),this},one:function(t,e){function n(){return e.apply(this,arguments),this.off(t,n),this}return this.on(t,n)},emit:function(t){if("undefined"==typeof this.listeners[t]||!this.listeners[t].length)return this;var e=Array.prototype.slice.call(arguments,1),n=this.listeners[t].length;do this.listeners[t][--n].apply(this.__context,e);while(n);return this},off:function(t,e){return void 0!==this.listeners[t]&&this.listeners[t].length?(this.listeners[t]=this.listeners[t].filter(function(t){return t!==e}),this):this},dispose:function(){for(var t in this)this[t]=null}};var s=t;Date.now||(Date.now=function(){return(new Date).getTime()}),r.prototype={constructor:r,inside:function(t){if(!t)throw new TypeError("Cannot be inside "+t);var e=i(t);return this.y>e.top&&this.ye.left&&this.xt?e.push(r):n.push(r)}),e.reverse(),_.forEach(e,function(t){$(t).insertAfter(u.items.elm)}),_.forEach(n,function(t){$(t).insertBefore(u.items.elm)})},a=function(e,n){var r=$(n).find("."+t);return $(e).hasClass(t)&&r.length>1?!0:!1},s=function(t){var e=[],n=[],r=!1;_.forEach(t,function(t,i){return 0===$(t).data("dragMultipleIndex")?void(r=!0):void(r?n.push(t):e.push(t))}),e.reverse(),_.forEach(n,function(t,e){$(t).data("dragMultipleIndex",e+1)}),_.forEach(e,function(t,e){$(t).data("dragMultipleIndex",-e-1)})},u={};u.prepare=function(r,i){n=!0;var o=$(i).find("."+t);$(r).data("dragmultiple:originalPosition",$(r).position()).data("dragMultipleActive",!0),u.items={},u.items.elm=$(r),u.items.container=$(i),u.items.elm.data("dragMultipleIndex",0),s(o),u.items.shadow=$(".gu-mirror"),u.items.elm.addClass(e),o=_.filter(o,function(t){return!$(t).hasClass(e)}),u.items.draggedItemsOriginal=o;var a=_.map(o,function(t){return clone=$(t).clone(!0),clone.addClass("backlog-us-mirror").addClass("tg-backlog-us-mirror").data("dragmultiple:originalPosition",$(t).position()).data("dragMultipleActive",!0).css({zIndex:"9999",opacity:"0.8",position:"fixed",width:u.items.elm.outerWidth(),height:u.items.elm.outerHeight()}),$(t).hide().addClass("tg-backlog-us-dragging"),clone});u.items.draggingItems=a,$(document.body).append(a)},u.start=function(t,e){a(t,e)&&$(window).on("mousemove.dragmultiple",function(){n||u.prepare(t,e),r()})},u.stop=function(){return n?i():[]},window.dragMultiple=u}(),function(){function t(){return++s}function e(e,n){var r=e&&e.$$hashKey;if(r)return"function"==typeof r&&(r=e.$$hashKey()),r;var i=typeof e;return r="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(n||t)():i+":"+e}function n(){return Object.create(null)}function r(t){if(null==t||i(t))return!1;var e=t.length;return t.nodeType===a&&e?!0:angular.isString(t)||angular.isArray(t)||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t){return t&&t.window===t}function o(t){var e=t[0],n=t[t.length-1],r=[e];do{if(e=e.nextSibling,!e)break;r.push(e)}while(e!==n);return u(r)}var a=1,s=0,u=(Array.isArray,$),l=["$parse","$animate",function(t,i){var a="$$NG_REMOVED",s=angular.$$minErr("ngRepeat"),l=function(t,e,n,r,i,o,a){t[n]=r,i&&(t[i]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(h,p){var d=p.tgRepeat,v=document.createComment(" end ngRepeat: "+d+" "),m=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=m[1],y=m[2],_=m[3],b=m[4];if(m=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!m)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var w=m[3]||m[1],x=m[2];if(_&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(_)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(_)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",_);var $,k,S,C,E={$id:e};return b?$=t(b):(S=function(t,n){return e(n)},C=function(t){return t}),function(t,e,h,p,m){$&&(k=function(e,n,r){return x&&(E[x]=e),E[w]=n,E.$index=r,$(t,E)});var g=n();t.$watch(y,function(h){var p=[];h&&h.toJS&&(p=h.toJS());var y,b,$,E,T,F,j,A,D,M,O,I,P=e[0],N=n();if(_&&(t[_]=h),r(p))D=p,A=k||S;else{A=k||C,D=[];for(var R in p)p.hasOwnProperty(R)&&"$"!==R.charAt(0)&&D.push(R)}for(E=D.length,O=new Array(E),y=0;E>y;y++)if(T=p===D?y:D[y],F=p[T],immutable_value=h.get(T),j=A(T,immutable_value,y),g[j])M=g[j],delete g[j],N[j]=M,O[y]=M;else{if(N[j])throw O.forEach(function(t){t&&t.scope&&(g[t.id]=t)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,j,F);O[y]={id:j,scope:void 0,clone:void 0},N[j]=!0}for(var L in g){if(M=g[L],I=o(M.clone),i.leave(I),I[0].parentNode)for(y=0,b=I.length;b>y;y++)I[y][a]=!0;M.scope.$destroy()}for(y=0;E>y;y++)if(T=p===D?y:D[y],F=p[T],immutable_value=h.get(T),M=O[y],M.scope){$=P;do $=$.nextSibling;while($&&$[a]);c(M)!=$&&i.move(o(M.clone),null,u(P)),P=f(M),l(M.scope,y,w,immutable_value,x,T,E)}else m(function(t,e){M.scope=e;var n=v.cloneNode(!1);t[t.length++]=n,i.enter(t,null,u(P)),P=n,M.clone=t,N[M.id]=M,l(M.scope,y,w,immutable_value,x,T,E)});g=N})}}}}];angular.module("tgRepeat",[]).directive("tgRepeat",l)}();var hexcase=0,b64pad="",chrsz=8;!function(){function t(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}function e(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());"number"==typeof i?t[r]=parseInt(o):i===!1?t[r]=null!==o:i instanceof Function?t[r]=null:t[r]=o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}function n(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t,e){return a.call((e||document).querySelectorAll(t))}function i(){r("input.awesomplete").forEach(function(t){new o(t)})}var o=function(t,r){var i=this;this.input=n(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),r=r||{},e(this,{minChars:2,maxItems:10,autoFirst:!1,data:o.DATA,filter:o.FILTER_CONTAINS,sort:o.SORT_BYLENGTH,item:o.ITEM,replace:o.REPLACE},r),this.index=-1,this.container=n.create("div",{className:"awesomplete",around:t}),this.ul=n.create("ul",{hidden:"hidden",inside:this.container}),this.status=n.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container}),n.bind(this.input,{input:this.evaluate.bind(this),blur:this.close.bind(this), keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select()):27===e?i.close():(38===e||40===e)&&(t.preventDefault(),i[38===e?"previous":"next"]()))}}),n.bind(this.input.form,{submit:this.close.bind(this)}),n.bind(this.ul,{mousedown:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target))}}}),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||r.list||[],o.all.push(this)};o.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if(t=n(t),t&&t.children){var e=[];a.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(){this.ul.setAttribute("hidden",""),this.index=-1,n.fire(this.input,"awesomplete-close")},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this["goto"](0),n.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this["goto"](this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,n.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=n.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],i=n.fire(this.input,"awesomplete-select",{text:r,origin:e||t});i&&(this.replace(r),this.close(),n.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var e=this,n=this.input.value;n.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new t(e.data(r,n))}).filter(function(t){return e.filter(t,n)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(t){e.ul.appendChild(e.item(t,n))}),0===this.ul.children.length?this.close():this.open()):this.close()}},o.all=[],o.FILTER_CONTAINS=function(t,e){return RegExp(n.regExpEscape(e.trim()),"i").test(t)},o.FILTER_STARTSWITH=function(t,e){return RegExp("^"+n.regExpEscape(e.trim()),"i").test(t)},o.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:e>t?-1:1},o.ITEM=function(t,e){var r=""===e?t:t.replace(RegExp(n.regExpEscape(e.trim()),"gi"),"$&");return n.create("li",{innerHTML:r,"aria-selected":"false"})},o.REPLACE=function(t){this.input.value=t.value},o.DATA=function(t){return t},Object.defineProperty(t.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),t.prototype.toString=t.prototype.valueOf=function(){return""+this.label};var a=Array.prototype.slice;return n.create=function(t,e){var r=document.createElement(t);for(var i in e){var o=e[i];if("inside"===i)n(o).appendChild(r);else if("around"===i){var a=n(o);a.parentNode.insertBefore(r,a),r.appendChild(a)}else i in r?r[i]=o:r.setAttribute(i,o)}return r},n.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},n.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0);for(var i in n)r[i]=n[i];return t.dispatchEvent(r)},n.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},n.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),o.$=n,o.$$=r,"undefined"!=typeof self&&(self.Awesomplete=o),"object"==typeof module&&module.exports&&(module.exports=o),o}(); //# sourceMappingURL=maps/libs.js.map