r1992 - in trunk: skins/wikipathways wpi/extensions wpi/extensions/otag wpi/lib/pvjs/release

1 view
Skip to first unread message

martijn....@bigcat.unimaas.nl

unread,
Jan 20, 2017, 4:46:20 PM1/20/17
to wikipathw...@googlegroups.com
Author: AlexanderPico
Date: Sat Jan 21 00:33:46 2017
New Revision: 1992

Log:
updating jnlp work in trunk

Modified:
trunk/skins/wikipathways/jnlp-instructions.png
trunk/wpi/extensions/otag/OntologyFunctions.php
trunk/wpi/extensions/pathwayThumb.php
trunk/wpi/lib/pvjs/release/pvjs.core.min.js

Modified: trunk/skins/wikipathways/jnlp-instructions.png
==============================================================================
Binary files. No diff available.

Modified: trunk/wpi/extensions/otag/OntologyFunctions.php
==============================================================================
--- trunk/wpi/extensions/otag/OntologyFunctions.php (original)
+++ trunk/wpi/extensions/otag/OntologyFunctions.php Sat Jan 21 00:33:46 2017
@@ -93,7 +93,7 @@

$path = "";

- while($row = $dbr->fetchObject($res)) e
+ while($row = $dbr->fetchObject($res)) {
$term['term_id'] = $row->term_id;
$term['term'] = $row->term;
$term['ontology'] = $row->ontology;

Modified: trunk/wpi/extensions/pathwayThumb.php
==============================================================================
--- trunk/wpi/extensions/pathwayThumb.php (original)
+++ trunk/wpi/extensions/pathwayThumb.php Sat Jan 21 00:33:46 2017
@@ -67,32 +67,55 @@
//Create edit button
$pathwayURL = $pathway->getTitleObject()->getPrefixedURL();
//AP20070918
- if (!$wgUser->isLoggedIn()){
- $hrefbtn = SITE_URL . "/index.php?title=Special:Userlogin&returnto=$pathwayURL";
- $label = "Log in to edit pathway";
+ $editButton = '';
+ if ($wgUser->isLoggedIn() && $pathway->getTitleObject()->userCan('edit')) {
+ $identifier = $pathway->getIdentifier();
+ $version = $pathway->getLatestRevision();
+ $editButton = '<div style="float:left;">' .
+ // see http://www.ericmmartin.com/projects/simplemodal/
+ '<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/simplemodal/1.4.4/jquery.simplemodal.min.js"></script>' .
+ // this should just be a button, but the button class only works for "a" elements with text inside.
+ '<a id="download-from-page" href="#" onclick="return false;" class="button"><span>Launch Editor</span></a>' .
+ '<script type="text/javascript">' .
+ " $('#download-from-page').click(function() { " .
+ " $.modal('<div id=\"jnlp-instructions\" style=\"width: 610px; height:616px; cursor:pointer;\" onClick=\"$.modal.close()\"><img id=\"jnlp-instructions-diagram\" src=\"/skins/wikipathways/jnlp-instructions.png\" alt=\"The JNLP will download to your default folder. Right-click the JNLP file and select Open.\"> </div>', {overlayClose:true, overlayCss: {backgroundColor: \"gray\"}, opacity: 50}); " .
+ // We need the kludge below, because the image doesn't display in FF otherwise.
+ " window.setTimeout(function() { " .
+ " $('#jnlp-instructions-diagram').attr('src', '/skins/wikipathways/jnlp-instructions.png'); " .
+ "}, 10);" .
+ // server must set Content-Disposition: attachment
+ // TODO why do the ampersand symbols below get parsed as HTML entities? Disabling this line and using the minimal line below for now, but we shouldn't have to do this..
+ //" window.location = '" . SITE_URL . "/wpi/extensions/PathwayViewer/pathway-jnlp.php?identifier=" . $identifier . "&version=" . $version . "&filename=WikiPathwaysEditor'; " .
+ " window.location = '" . SITE_URL . "/wpi/extensions/PathwayViewer/pathway-jnlp.php?identifier=" . $identifier . "'; " .
+ " }); " .
+ '</script>' .
+ '</div>';
} else {
- if(wfReadOnly()) {
+ if(!$wgUser->isLoggedIn()) {
+ $hrefbtn = SITE_URL . "/index.php?title=Special:Userlogin&returnto=$pathwayURL";
+ $label = "Log in to edit pathway";
+ } else if(wfReadOnly()) {
$hrefbtn = "";
$label = "Database locked";
} else if(!$pathway->getTitleObject()->userCan('edit')) {
$hrefbtn = "";
$label = "Editing is disabled";
- } else {
- $hrefbtn = "javascript:;";
- $label = "Edit pathway";
}
+
+ $editButton = "<a href='$hrefbtn' title='$label' id='edit' " .
+ "class='button'><span>$label</span></a>";
}
+
$helpUrl = Title::newFromText("Help:Known_problems")->getFullUrl();
- $caption = "<a href='$hrefbtn' title='$label' id='edit' ".
- "class='button'><span>$label</span></a>" .
- "<div style='float:left;'><a href='$helpUrl'> not working?</a></div>";
+ $helpLink = "<div style='float:left;'><a href='$helpUrl'> not working?</a></div>";

//Create dropdown action menu
$pwTitle = $pathway->getTitleObject()->getFullText();
//disable dropdown for now
$drop = PathwayPage::editDropDown($pathway);
$drop = '<div style="float:right;">' . $drop . '</div>';
- return $caption . $drop;
+
+ return $editButton . $helpLink . $drop;
}



Modified: trunk/wpi/lib/pvjs/release/pvjs.core.min.js
==============================================================================
--- trunk/wpi/lib/pvjs/release/pvjs.core.min.js (original)
+++ trunk/wpi/lib/pvjs/release/pvjs.core.min.js Sat Jan 21 00:33:46 2017
@@ -36,7 +36,7 @@
if(t=a(t,e),0===t&&e.ended)return 0===e.length&&w(this),null;var r=e.needReadable;A("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&(r=!0,A("length less than watermark",r)),(e.ended||e.reading)&&(r=!1,A("reading or ended",r)),r&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),r&&!e.reading&&(t=a(n,e));var i;return i=t>0?y(t,e):null,j.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),n!==t&&e.ended&&0===e.length&&w(this),j.isNull(i)||this.emit("data",i),i},i.prototype._read=function(){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){function r(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",a),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",u),t.removeListener("unpipe",r),h.removeListener("end",i),h.removeListener("end",o),h.removeList
ener("data",s),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var n=t.write(e);!1===n&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function u(e){A("onerror",e),l(),t.removeListener("error",u),0===C.listenerCount(t,"error")&&t.emit("error",e)}function a(){t.removeListener("finish",c),l()}function c(){A("onfinish"),t.removeListener("close",a),l()}function l(){A("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,A("pipe count=%d opts=%j",f.pipesCount,e);var p=(!e||e.end!==!1)&&t!==n.stdout&&t!==n.stderr,d=p?i:o;f.endEmitted?n.nextTick(d):h.once("end",d),t.on("unpipe",r);var m=v(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?S(t._events.error)?t._events.error.unshift(u):t._events.error=[u,t._events.error]:t.on("error",u),t.once("close",a
),t.once("finish",c),t.emit("pipe",h),f.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=x(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,e){var r=k.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;n.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return r},i.prototype.
addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=r.push(i);o||(n=!0,t.pause())}});for(var i in t)j.isFunction(t[i])&&j.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){A("wrapped _r
ead",e),n&&(n=!1,t.resume())},r},i._fromList=y}).call(this,t("_process"))},{"./_stream_duplex":"/Users/andersriutta/Sites/kaavio-lkg/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_duplex.js",_process:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js",buffer:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js","core-util-is":"/Users/andersriutta/Sites/kaavio-lkg/node_modules/core-util-is/lib/util.js",events:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js",inherits:"/Users/andersriutta/Sites/kaavio-lkg/node_modules/inherits/inherits_browser.js",isarray:"/Users/andersriutta/Sites/kaavio-lkg/node_modules/isarray/index.js",stream:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/stream-browserify/index.js","string_decoder/":"/Users/andersriutta/Sites/kaavio-lkg/node_modules/string_decoder/index.js",util:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/browser-resolve/empty.js"}],"/Users/andersriutta/Sites/kaavio-lkg
/node_modules/string_decoder/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/string_decoder/index.js"][0].apply(n,arguments)},{buffer:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js"}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/isarray/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/isarray/index.js"][0].apply(n,arguments)},{}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/inherits/inherits_browser.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/inherits/inherits_browser.js"][0].apply(n,arguments)},{}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/core-util-is/lib/util.js":[function(t,e,n){(function(t){function e(t){return Array.isArray?Array.isArray(t):"[object Array]"===m(t)}function r(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==type
of t}function u(t){return"string"==typeof t}function a(t){return"symbol"==typeof t}function c(t){return void 0===t}function l(t){return"[object RegExp]"===m(t)}function h(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===m(t)}function p(t){return"[object Error]"===m(t)||t instanceof Error}function d(t){return"function"==typeof t}function v(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function m(t){return Object.prototype.toString.call(t)}n.isArray=e,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=o,n.isNumber=s,n.isString=u,n.isSymbol=a,n.isUndefined=c,n.isRegExp=l,n.isObject=h,n.isDate=f,n.isError=p,n.isFunction=d,n.isPrimitive=v,n.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../../../pvjs-lkg/node_modules/is-buffer/index.js")})},{"../../../../pvjs-lkg/node_modules/is-buffer/index.js":"/Users/andersriutta/Sites/pvjs-lkg/node_modules/is-buffer/index.js"}],"/Users/andersriu
tta/Sites/kaavio-lkg/lib/annotation-panel/formatter.js":[function(t,e){var n=t("lodash"),r=t("highland"),i=function(){"use strict";function t(t){var n=(t.inputStream,t.primaryResource,t.label),r=t.description,i={header:n,description:r};return e(t).errors(function(t){return console.error(t),console.error("in xref._nestAll()"),i.listItems=["Missing identifier and/or db"],i}).map(function(t){return i.listItems=t,i})}function e(t){var e=t.inputStream,i=t.primaryResource;return e.errors(function(t){return console.log(t),console.log("in Formatter._nestAll()"),e}).map(function(t){var e=t.identifier,r={};r.title=t.db,r.text=e,r._isPrimary=t.isDataItemIn._isPrimary;var i=n([t.id]).concat(t["owl:sameAs"]).compact().filter(function(t){return t.indexOf("http")>-1}).last();return i&&(r.uri=i),r}).collect().map(function(t){return t.sort(function(t,e){if(t._isPrimary===e._isPrimary){var n=t.title.toLowerCase(),r=e.title.toLowerCase();return r>n?-1:n>r?1:0}return e._isPrimary-t._isPrimary})
}).sequence().group("title").flatMap(r.pairs).reduce([],function(t,e){return t.push({key:e[0],values:e[1]}),t}).map(function(t){if(t=n.sortBy(t,function(){}),0===t.length){var e="";i.hasOwnProperty("urlPattern")?e=i.urlPattern.replace("$id",i.identifier):i.id&&(e=i.id);var r={_isPrimary:!0,text:i.identifier,title:i.db};e&&(r.uri=e),t=[{key:i.db,values:[r]}]}else{var o=n.remove(t,function(t){return t.key===i.db})[0],s=n.remove(o.values,function(t){return t.text===i.identifier})[0];o.values.unshift(s),t.unshift(o)}return t})}return{formatListForDisplay:t}}();e.exports=i},{highland:"/Users/andersriutta/Sites/kaavio-lkg/node_modules/highland/lib/index.js",lodash:"/Users/andersriutta/Sites/kaavio-lkg/node_modules/lodash/index.js"}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/lodash/index.js":[function(t,e,n){(function(t){(function(){function r(t,e){if(t!==e){var n=null===t,r=t===C,i=t===t,o=null===e,s=e===C,u=e===e;if(t>e&&!o||!i||n&&!s&&u||r&&u)return 1;if(e>t&&!n||!u||o&
&!r&&i||s&&i)return-1}return 0}function i(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function o(t,e,n){if(e!==e)return m(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function s(t){return"function"==typeof t||!1}function u(t){return null==t?"":t+""}function a(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function c(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function l(t,e){return r(t.criteria,e.criteria)||t.index-e.index}function h(t,e,n){for(var i=-1,o=t.criteria,s=e.criteria,u=o.length,a=n.length;++i<u;){var c=r(o[i],s[i]);if(c){if(i>=a)return c;var l=n[i];return c*("asc"===l||l===!0?1:-1)}}return t.index-e.index}function f(t){return Ze[t]}function p(t){return Pe[t]}function d(t,e,n){return e?t=Je[t]:n&&(t=Ye[t]),"\\"+t}function v(t){return"\\"+Ye[t]}function m(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function g(t){r
eturn!!t&&"object"==typeof t}function b(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function y(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;)t[n]===e&&(t[n]=Z,o[++i]=n);return o}function w(t,e){for(var n,r=-1,i=t.length,o=-1,s=[];++r<i;){var u=t[r],a=e?e(u,r,t):u;r&&n===a||(n=a,s[++o]=u)}return s}function _(t){for(var e=-1,n=t.length;++e<n&&b(t.charCodeAt(e)););return e}function x(t){for(var e=t.length;e--&&b(t.charCodeAt(e)););return e}function S(t){return ze[t]}function E(t){function e(t){if(g(t)&&!Aa(t)&&!(t instanceof Q)){if(t instanceof b)return t;if(eu.call(t,"__chain__")&&eu.call(t,"__wrapped__"))return pi(t)}return new b(t)}function n(){}function b(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function Q(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nu,this.__views__=[]}function e
e(){var t=new Q(this.__wrapped__);return t.__actions__=tn(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=tn(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=tn(this.__views__),t}function re(){if(this.__filtered__){var t=new Q(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ze(){var t=this.__wrapped__.value(),e=this.__dir__,n=Aa(t),r=0>e,i=n?t.length:0,o=zr(0,i,this.__views__),s=o.start,u=o.end,a=u-s,c=r?u:s-1,l=this.__iteratees__,h=l.length,f=0,p=Su(a,this.__takeCount__);if(!n||B>i||i==a&&p==a)return rr(r&&n?t.reverse():t,this.__actions__);var d=[];t:for(;a--&&p>f;){c+=e;for(var v=-1,m=t[c];++v<h;){var g=l[v],b=g.iteratee,y=g.type,w=b(m);if(y==V)m=w;else if(!w){if(y==F)continue t;break t}}d[f++]=m}return d}function Pe(){this.__data__={}}function ze(t){return this.has(t)&&delete this.__data__[t]}function Xe(t){return"__proto__"==t?C:this.__data__[t]}function Je(t){return"__pr
oto__"!=t&&eu.call(this.__data__,t)}function Ye(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function He(t){var e=t?t.length:0;for(this.data={hash:gu(null),set:new hu};e--;)this.push(t[e])}function Qe(t,e){var n=t.data,r="string"==typeof e||Io(e)?n.set.has(e):n.hash[e];return r?0:-1}function Ke(t){var e=this.data;"string"==typeof t||Io(t)?e.set.add(t):e.hash[t]=!0}function $e(t,e){for(var n=-1,r=t.length,i=-1,o=e.length,s=Fs(r+o);++n<r;)s[n]=t[n];for(;++i<o;)s[n++]=e[i];return s}function tn(t,e){var n=-1,r=t.length;for(e||(e=Fs(r));++n<r;)e[n]=t[n];return e}function en(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function on(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function sn(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function un(t,e,n,r){for(var i=-1,o=t.length,s=r,u=s;++i<o;){var a=t[i],c=+e(a);n(c,s)&&(s=c,u=a)}return u}function an(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[
++i]=s)}return o}function cn(t,e){for(var n=-1,r=t.length,i=Fs(r);++n<r;)i[n]=e(t[n],n,t);return i}function ln(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function hn(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function fn(t,e,n,r){var i=t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function pn(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function dn(t,e){for(var n=t.length,r=0;n--;)r+=+e(t[n])||0;return r}function vn(t,e){return t===C?e:t}function mn(t,e,n,r){return t!==C&&eu.call(r,n)?t:e}function gn(t,e,n){for(var r=-1,i=Ba(e),o=i.length;++r<o;){var s=i[r],u=t[s],a=n(u,e[s],s,t,e);(a===a?a===u:u!==u)&&(u!==C||s in t)||(t[s]=a)}return t}function bn(t,e){return null==e?t:wn(e,Ba(e),t)}function yn(t,e){for(var n=-1,r=null==t,i=!r&&Qr(t),o=i?t.length:0,s=e.length,u=Fs(s);++n<s;){var a=e[n];u[n]=i?Kr(a,o)?t[a]:C:r?C:t[a]}return u}function wn(t,e,n){n||(n={});for(var r=-1,i=e.len
gth;++r<i;){var o=e[r];n[o]=t[o]}return n}function _n(t,e,n){var r=typeof t;return"function"==r?e===C?t:sr(t,e,n):null==t?Ns:"object"==r?Bn(t):e===C?Us(t):Fn(t,e)}function xn(t,e,n,r,i,o,s){var u;if(n&&(u=i?n(t,r,i):n(t)),u!==C)return u;if(!Io(t))return t;var a=Aa(t);if(a){if(u=Xr(t),!e)return tn(t,u)}else{var c=ru.call(t),l=c==H;if(c!=$&&c!=P&&(!l||i))return Ge[c]?Yr(t,c,e):i?t:{};if(u=Jr(l?{}:t),!e)return bn(u,t)}o||(o=[]),s||(s=[]);for(var h=o.length;h--;)if(o[h]==t)return s[h];return o.push(t),s.push(u),(a?en:Tn)(t,function(r,i){u[i]=xn(r,e,n,i,t,o,s)}),u}function Sn(t,e,n){if("function"!=typeof t)throw new Hs(G);return fu(function(){t.apply(C,n)},e)}function En(t,e){var n=t?t.length:0,r=[];if(!n)return r;var i=-1,s=Gr(),u=s==o,a=u&&e.length>=B?vr(e):null,c=e.length;a&&(s=Qe,u=!1,e=a);t:for(;++i<n;){var l=t[i];if(u&&l===l){for(var h=c;h--;)if(e[h]===l)continue t;r.push(l)}else s(e,l,0)<0&&r.push(l)}return r}function Cn(t,e){var n=!0;return Wu(t,function(t,r,i){return n=!
!e(t,r,i)}),n}function kn(t,e,n,r){var i=r,o=i;return Wu(t,function(t,s,u){var a=+e(t,s,u);(n(a,i)||a===r&&a===o)&&(i=a,o=t)}),o}function jn(t,e,n,r){var i=t.length;for(n=null==n?0:+n||0,0>n&&(n=-n>i?0:i+n),r=r===C||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)t[n++]=e;return t}function Nn(t,e){var n=[];return Wu(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function An(t,e,n,r){var i;return n(t,function(t,n,o){return e(t,n,o)?(i=r?n:t,!1):void 0}),i}function Dn(t,e,n,r){r||(r=[]);for(var i=-1,o=t.length;++i<o;){var s=t[i];g(s)&&Qr(s)&&(n||Aa(s)||ko(s))?e?Dn(s,e,n,r):ln(r,s):n||(r[r.length]=s)}return r}function Rn(t,e){return Mu(t,e,es)}function Tn(t,e){return Mu(t,e,Ba)}function On(t,e){return qu(t,e,Ba)}function Un(t,e){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var s=e[n];Uo(t[s])&&(o[++i]=s)}return o}function In(t,e,n){if(null!=t){n!==C&&n in hi(t)&&(e=[n]);for(var r=0,i=e.length;null!=t&&i>r;)t=t[e[r++]];return r&&r==i?t:C}}function Wn(t,e,n,r,i,o){return t===e?!0:null=
=t||null==e||!Io(t)&&!g(e)?t!==t&&e!==e:Ln(t,e,Wn,n,r,i,o)}function Ln(t,e,n,r,i,o,s){var u=Aa(t),a=Aa(e),c=z,l=z;u||(c=ru.call(t),c==P?c=$:c!=$&&(u=Zo(t))),a||(l=ru.call(e),l==P?l=$:l!=$&&(a=Zo(e)));var h=c==$,f=l==$,p=c==l;if(p&&!u&&!h)return qr(t,e,c);if(!i){var d=h&&eu.call(t,"__wrapped__"),v=f&&eu.call(e,"__wrapped__");if(d||v)return n(d?t.value():t,v?e.value():e,r,i,o,s)}if(!p)return!1;o||(o=[]),s||(s=[]);for(var m=o.length;m--;)if(o[m]==t)return s[m]==e;o.push(t),s.push(e);var g=(u?Mr:Br)(t,e,n,r,i,o,s);return o.pop(),s.pop(),g}function Mn(t,e,n){var r=e.length,i=r,o=!n;if(null==t)return!i;for(t=hi(t);r--;){var s=e[r];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++r<i;){s=e[r];var u=s[0],a=t[u],c=s[1];if(o&&s[2]){if(a===C&&!(u in t))return!1}else{var l=n?n(a,c,u):C;if(!(l===C?Wn(c,a,n,!0):l))return!1}}return!0}function qn(t,e){var n=-1,r=Qr(t)?Fs(t.length):[];return Wu(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function Bn(t){var e=Zr(t);if(1==e.length&&e[0][2]){var
n=e[0][0],r=e[0][1];return function(t){return null==t?!1:t[n]===r&&(r!==C||n in hi(t))}}return function(t){return Mn(t,e)}}function Fn(t,e){var n=Aa(t),r=ti(t)&&ri(e),i=t+"";return t=fi(t),function(o){if(null==o)return!1;var s=i;if(o=hi(o),!(!n&&r||s in o)){if(o=1==t.length?o:In(o,Yn(t,0,-1)),null==o)return!1;s=ki(t),o=hi(o)}return o[s]===e?e!==C||s in o:Wn(e,o[s],C,!0)}}function Vn(t,e,n,r,i){if(!Io(t))return t;var o=Qr(e)&&(Aa(e)||Zo(e)),s=o?C:Ba(e);return en(s||e,function(u,a){if(s&&(a=u,u=e[a]),g(u))r||(r=[]),i||(i=[]),Gn(t,e,a,Vn,n,r,i);else{var c=t[a],l=n?n(c,u,a,t,e):C,h=l===C;h&&(l=u),l===C&&(!o||a in t)||!h&&(l===l?l===c:c!==c)||(t[a]=l)}}),t}function Gn(t,e,n,r,i,o,s){for(var u=o.length,a=e[n];u--;)if(o[u]==a)return void(t[n]=s[u]);var c=t[n],l=i?i(c,a,n,t,e):C,h=l===C;h&&(l=a,Qr(a)&&(Aa(a)||Zo(a))?l=Aa(c)?c:Qr(c)?tn(c):[]:Fo(a)||ko(a)?l=ko(c)?Yo(c):Fo(c)?c:{}:h=!1),o.push(a),s.push(l),h?t[n]=r(l,a,i,o,s):(l===l?l!==c:c===c)&&(t[n]=l)}function Zn(t){return functio
n(e){return null==e?C:e[t]}}function Pn(t){var e=t+"";return t=fi(t),function(n){return In(n,t,e)}}function zn(t,e){for(var n=t?e.length:0;n--;){var r=e[n];if(r!=i&&Kr(r)){var i=r;pu.call(t,r,1)}}return t}function Xn(t,e){return t+bu(ku()*(e-t+1))}function Jn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function Yn(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),n=n===C||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Fs(i);++r<i;)o[r]=t[r+e];return o}function Hn(t,e){var n;return Wu(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function Qn(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Kn(t,e,n){var r=Fr(),i=-1;e=cn(e,function(t){return r(t)});var o=qn(t,function(t){var n=cn(e,function(e){return e(t)});return{criteria:n,index:++i,value:t}});return Qn(o,function(t,e){return h(t,e,n)})}function $n(t,e){var n=0;return Wu(t,function(t,r,i){n+=+e(t,r,i)||0}),n}function tr(t,e){var n=-1,r=Gr(),i=t.length,s=r=
=o,u=s&&i>=B,a=u?vr():null,c=[];a?(r=Qe,s=!1):(u=!1,a=e?[]:c);t:for(;++n<i;){var l=t[n],h=e?e(l,n,t):l;if(s&&l===l){for(var f=a.length;f--;)if(a[f]===h)continue t;e&&a.push(h),c.push(l)}else r(a,h,0)<0&&((e||u)&&a.push(h),c.push(l))}return c}function er(t,e){for(var n=-1,r=e.length,i=Fs(r);++n<r;)i[n]=t[e[n]];return i}function nr(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Yn(t,r?0:o,r?o+1:i):Yn(t,r?o+1:0,r?i:o)}function rr(t,e){var n=t;n instanceof Q&&(n=n.value());for(var r=-1,i=e.length;++r<i;){var o=e[r];n=o.func.apply(o.thisArg,ln([n],o.args))}return n}function ir(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e===e&&Ru>=i){for(;i>r;){var o=r+i>>>1,s=t[o];(n?e>=s:e>s)&&null!==s?r=o+1:i=o}return i}return or(t,e,Ns,n)}function or(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,s=e!==e,u=null===e,a=e===C;o>i;){var c=bu((i+o)/2),l=n(t[c]),h=l!==C,f=l===l;if(s)var p=f||r;else p=u?f&&h&&(r||null!=l):a?f&&(r||h):null==l?!1:r?e>=l:e>l;p?i=c+1:o=c
}return Su(o,Du)}function sr(t,e,n){if("function"!=typeof t)return Ns;if(e===C)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}function ur(t){var e=new su(t.byteLength),n=new du(e);return n.set(new du(t)),e}function ar(t,e,n){for(var r=n.length,i=-1,o=xu(t.length-r,0),s=-1,u=e.length,a=Fs(u+o);++s<u;)a[s]=e[s];for(;++i<r;)a[n[i]]=t[i];for(;o--;)a[s++]=t[i++];return a}function cr(t,e,n){for(var r=-1,i=n.length,o=-1,s=xu(t.length-i,0),u=-1,a=e.length,c=Fs(s+a);++o<s;)c[o]=t[o];for(var l=o;++u<a;)c[l+u]=e[u];for(;++r<i;)c[l+n[r]]=t[o++];return c}function lr(t,e){return function(n,r,i){var o=e?e():{};if(r=Fr(r,i,3),Aa(n))for(var s=-1,u=n.length;++s<u;){var a=n[s];t(o,a,r(a,s,n),n)}else Wu(n,function(e,n,i){t(o,e,r(e,n,i),i)});return o}}function
hr(t){return bo(function(e,n){var r=-1,i=null==e?0:n.length,o=i>2?n[i-2]:C,s=i>2?n[2]:C,u=i>1?n[i-1]:C;for("function"==typeof o?(o=sr(o,u,5),i-=2):(o="function"==typeof u?u:C,i-=o?1:0),s&&$r(n[0],n[1],s)&&(o=3>i?C:o,i=1);++r<i;){var a=n[r];a&&t(e,a,o)}return e})}function fr(t,e){return function(n,r){var i=n?Vu(n):0;if(!ni(i))return t(n,r);for(var o=e?i:-1,s=hi(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}function pr(t){return function(e,n,r){for(var i=hi(e),o=r(e),s=o.length,u=t?s:-1;t?u--:++u<s;){var a=o[u];if(n(i[a],a,i)===!1)break}return e}}function dr(t,e){function n(){var i=this&&this!==nn&&this instanceof n?r:t;return i.apply(e,arguments)}var r=gr(t);return n}function vr(t){return gu&&hu?new He(t):null}function mr(t){return function(e){for(var n=-1,r=Cs(hs(e)),i=r.length,o="";++n<i;)o=t(o,r[n],n);return o}}function gr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(
e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Iu(t.prototype),r=t.apply(n,e);return Io(r)?r:n}}function br(t){function e(n,r,i){i&&$r(n,r,i)&&(r=C);var o=Lr(n,t,C,C,C,C,C,r);return o.placeholder=e.placeholder,o}return e}function yr(t,e){return bo(function(n){var r=n[0];return null==r?r:(n.push(e),t.apply(C,n))})}function wr(t,e){return function(n,r,i){if(i&&$r(n,r,i)&&(r=C),r=Fr(r,i,3),1==r.length){n=Aa(n)?n:li(n);var o=un(n,r,t,e);if(!n.length||o!==e)return o}return kn(n,r,t,e)}}function _r(t,e){return function(n,r,o){if(r=Fr(r,o,3),Aa(n)){var s=i(n,r,e);return s>-1?n[s]:C}return An(n,r,t)}}function xr(t){return function(e,n,r){return e&&e.length?(n=Fr(n,r,3),i(e,n,t)):-1}}function Sr(t){return function(e,n,r){return n=Fr(n,r,3),An(e,n,t,!0)}}function Er(t){return function(){for(var e,n=arguments.length,r=t
?n:-1,i=0,o=Fs(n);t?r--:++r<n;){var s=o[i++]=arguments[r];if("function"!=typeof s)throw new Hs(G);!e&&b.prototype.thru&&"wrapper"==Vr(s)&&(e=new b([],!0))}for(r=e?-1:n;++r<n;){s=o[r];var u=Vr(s),a="wrapper"==u?Fu(s):C;e=a&&ei(a[0])&&a[1]==(U|D|T|I)&&!a[4].length&&1==a[9]?e[Vr(a[0])].apply(e,a[3]):1==s.length&&ei(s)?e[u]():e.thru(s)}return function(){var t=arguments,r=t[0];if(e&&1==t.length&&Aa(r)&&r.length>=B)return e.plant(r).value();for(var i=0,s=n?o[i].apply(this,t):r;++i<n;)s=o[i].call(this,s);return s}}}function Cr(t,e){return function(n,r,i){return"function"==typeof r&&i===C&&Aa(n)?t(n,r):e(n,sr(r,i,3))}}function kr(t){return function(e,n,r){return("function"!=typeof n||r!==C)&&(n=sr(n,r,3)),t(e,n,es)}}function jr(t){return function(e,n,r){return("function"!=typeof n||r!==C)&&(n=sr(n,r,3)),t(e,n)}}function Nr(t){return function(e,n,r){var i={};return n=Fr(n,r,3),Tn(e,function(e,r,o){var s=n(e,r,o);r=t?s:r,e=t?e:s,i[r]=e}),i}}function Ar(t){return function(e,n,r){return
e=u(e),(t?e:"")+Or(e,n,r)+(t?"":e)}}function Dr(t){var e=bo(function(n,r){var i=y(r,e.placeholder);return Lr(n,t,C,r,i)});return e}function Rr(t,e){return function(n,r,i,o){var s=arguments.length<3;return"function"==typeof r&&o===C&&Aa(n)?t(n,r,i,s):Jn(n,Fr(r,o,4),i,s,e)}}function Tr(t,e,n,r,i,o,s,u,a,c){function l(){for(var b=arguments.length,w=b,_=Fs(b);w--;)_[w]=arguments[w];if(r&&(_=ar(_,r,i)),o&&(_=cr(_,o,s)),d||m){var x=l.placeholder,S=y(_,x);if(b-=S.length,c>b){var E=u?tn(u):C,k=xu(c-b,0),A=d?S:C,D=d?C:S,R=d?_:C,U=d?C:_;e|=d?T:O,e&=~(d?O:T),v||(e&=~(j|N));var I=[t,e,n,R,A,U,D,E,a,k],W=Tr.apply(C,I);return ei(t)&&Gu(W,I),W.placeholder=x,W}}var L=f?n:this,M=p?L[t]:t;return u&&(_=ai(_,u)),h&&a<_.length&&(_.length=a),this&&this!==nn&&this instanceof l&&(M=g||gr(t)),M.apply(L,_)}var h=e&U,f=e&j,p=e&N,d=e&D,v=e&A,m=e&R,g=p?C:gr(t);return l}function Or(t,e,n){var r=t.length;if(e=+e,r>=e||!wu(e))return"";var i=e-r;return n=null==n?" ":n+"",gs(n,mu(i/n.length)).slice(0,i)}fun
ction Ur(t,e,n,r){function i(){for(var e=-1,u=arguments.length,a=-1,c=r.length,l=Fs(c+u);++a<c;)l[a]=r[a];for(;u--;)l[a++]=arguments[++e];var h=this&&this!==nn&&this instanceof i?s:t;return h.apply(o?n:this,l)}var o=e&j,s=gr(t);return i}function Ir(t){var e=Ps[t];return function(t,n){return n=n===C?0:+n||0,n?(n=cu(10,n),e(t*n)/n):e(t)}}function Wr(t){return function(e,n,r,i){var o=Fr(r);return null==r&&o===_n?ir(e,n,t):or(e,n,o(r,i,1),t)}}function Lr(t,e,n,r,i,o,s,u){var a=e&N;if(!a&&"function"!=typeof t)throw new Hs(G);var c=r?r.length:0;if(c||(e&=~(T|O),r=i=C),c-=i?i.length:0,e&O){var l=r,h=i;r=i=C}var f=a?C:Fu(t),p=[t,e,n,r,i,l,h,o,s,u];if(f&&(ii(p,f),e=p[1],u=p[9]),p[9]=null==u?a?0:t.length:xu(u-c,0)||0,e==j)var d=dr(p[0],p[2]);else d=e!=T&&e!=(j|T)||p[4].length?Tr.apply(C,p):Ur.apply(C,p);var v=f?Bu:Gu;return v(d,p)}function Mr(t,e,n,r,i,o,s){var u=-1,a=t.length,c=e.length;if(a!=c&&!(i&&c>a))return!1;for(;++u<a;){var l=t[u],h=e[u],f=r?r(i?h:l,i?l:h,u):C;if(f!==C){if(f)c
ontinue;return!1}if(i){if(!pn(e,function(t){return l===t||n(l,t,r,i,o,s)}))return!1}else if(l!==h&&!n(l,h,r,i,o,s))return!1}return!0}function qr(t,e,n){switch(n){case X:case J:return+t==+e;case Y:return t.name==e.name&&t.message==e.message;case K:return t!=+t?e!=+e:t==+e;case te:case ne:return t==e+""}return!1}function Br(t,e,n,r,i,o,s){var u=Ba(t),a=u.length,c=Ba(e),l=c.length;if(a!=l&&!i)return!1;for(var h=a;h--;){var f=u[h];if(!(i?f in e:eu.call(e,f)))return!1}for(var p=i;++h<a;){f=u[h];var d=t[f],v=e[f],m=r?r(i?v:d,i?d:v,f):C;if(!(m===C?n(d,v,r,i,o,s):m))return!1;p||(p="constructor"==f)}if(!p){var g=t.constructor,b=e.constructor;if(g!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b))return!1}return!0}function Fr(t,n,r){var i=e.callback||ks;return i=i===ks?_n:i,r?i(t,n,r):i}function Vr(t){for(var e=t.name,n=Uu[e],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function G
r(t,n,r){var i=e.indexOf||Ei;return i=i===Ei?o:i,t?i(t,n,r):i}function Zr(t){for(var e=ns(t),n=e.length;n--;)e[n][2]=ri(e[n][1]);return e}function Pr(t,e){var n=null==t?C:t[e];return Mo(n)?n:C}function zr(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=Su(e,t+s);break;case"takeRight":t=xu(t,e-s)}}return{start:t,end:e}}function Xr(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&eu.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Jr(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Xs),new e}function Yr(t,e,n){var r=t.constructor;switch(e){case ie:return ur(t);case X:case J:return new r(+t);case oe:case se:case ue:case ae:case ce:case le:case he:case fe:case pe:var i=t.buffer;return new r(n?ur(i):i,t.byteOffset,t.length);case K:case ne:return new r(t);case te:var o=new r(t.source,Te.exec(t));o.lastIndex=t.lastIndex}return o}function
Hr(t,e,n){null==t||ti(e,t)||(e=fi(e),t=1==e.length?t:In(t,Yn(e,0,-1)),e=ki(e));var r=null==t?t:t[e];return null==r?C:r.apply(t,n)}function Qr(t){return null!=t&&ni(Vu(t))}function Kr(t,e){return t="number"==typeof t||Ie.test(t)?+t:-1,e=null==e?Tu:e,t>-1&&t%1==0&&e>t}function $r(t,e,n){if(!Io(n))return!1;var r=typeof e;if("number"==r?Qr(n)&&Kr(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function ti(t,e){var n=typeof t;if("string"==n&&Ce.test(t)||"number"==n)return!0;if(Aa(t))return!1;var r=!Ee.test(t);return r||null!=e&&t in hi(e)}function ei(t){var n=Vr(t);if(!(n in Q.prototype))return!1;var r=e[n];if(t===r)return!0;var i=Fu(r);return!!i&&t===i[0]}function ni(t){return"number"==typeof t&&t>-1&&t%1==0&&Tu>=t}function ri(t){return t===t&&!Io(t)}function ii(t,e){var n=t[1],r=e[1],i=n|r,o=U>i,s=r==U&&n==D||r==U&&n==I&&t[7].length<=e[8]||r==(U|I)&&n==D;if(!o&&!s)return t;r&j&&(t[2]=e[2],i|=n&j?0:A);var u=e[3];if(u){var a=t[3];t[3]=a?ar(a,u,e[4])
:tn(u),t[4]=a?y(t[3],Z):tn(e[4])}return u=e[5],u&&(a=t[5],t[5]=a?cr(a,u,e[6]):tn(u),t[6]=a?y(t[5],Z):tn(e[6])),u=e[7],u&&(t[7]=tn(u)),r&U&&(t[8]=null==t[8]?e[8]:Su(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function oi(t,e){return t===C?e:Da(t,e,oi)}function si(t,e){t=hi(t);for(var n=-1,r=e.length,i={};++n<r;){var o=e[n];o in t&&(i[o]=t[o])}return i}function ui(t,e){var n={};return Rn(t,function(t,r,i){e(t,r,i)&&(n[r]=t)}),n}function ai(t,e){for(var n=t.length,r=Su(e.length,n),i=tn(t);r--;){var o=e[r];t[r]=Kr(o,n)?i[o]:C}return t}function ci(t){for(var e=es(t),n=e.length,r=n&&t.length,i=!!r&&ni(r)&&(Aa(t)||ko(t)),o=-1,s=[];++o<n;){var u=e[o];(i&&Kr(u,r)||eu.call(t,u))&&s.push(u)}return s}function li(t){return null==t?[]:Qr(t)?Io(t)?t:Xs(t):ss(t)}function hi(t){return Io(t)?t:Xs(t)}function fi(t){if(Aa(t))return t;var e=[];return u(t).replace(ke,function(t,n,r,i){e.push(r?i.replace(De,"$1"):n||t)}),e}function pi(t){return t instanceof Q?t.clone():new b(t.__wrapped
__,t.__chain__,tn(t.__actions__))}function di(t,e,n){e=(n?$r(t,e,n):null==e)?1:xu(bu(e)||1,1);for(var r=0,i=t?t.length:0,o=-1,s=Fs(mu(i/e));i>r;)s[++o]=Yn(t,r,r+=e);return s}function vi(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++e<n;){var o=t[e];o&&(i[++r]=o)}return i}function mi(t,e,n){var r=t?t.length:0;return r?((n?$r(t,e,n):null==e)&&(e=1),Yn(t,0>e?0:e)):[]}function gi(t,e,n){var r=t?t.length:0;return r?((n?$r(t,e,n):null==e)&&(e=1),e=r-(+e||0),Yn(t,0,0>e?0:e)):[]}function bi(t,e,n){return t&&t.length?nr(t,Fr(e,n,3),!0,!0):[]}function yi(t,e,n){return t&&t.length?nr(t,Fr(e,n,3),!0):[]}function wi(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&$r(t,e,n)&&(n=0,r=i),jn(t,e,n,r)):[]}function _i(t){return t?t[0]:C}function xi(t,e,n){var r=t?t.length:0;return n&&$r(t,e,n)&&(e=!1),r?Dn(t,e):[]}function Si(t){var e=t?t.length:0;return e?Dn(t,!0):[]}function Ei(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?xu(r+n,0):n;else if(n){var i=ir(t,e);
return r>i&&(e===e?e===t[i]:t[i]!==t[i])?i:-1}return o(t,e,n||0)}function Ci(t){return gi(t,1)}function ki(t){var e=t?t.length:0;return e?t[e-1]:C}function ji(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?xu(r+n,0):Su(n||0,r-1))+1;else if(n){i=ir(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return m(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Ni(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=Gr(),i=t.length;++n<i;)for(var o=0,s=t[n];(o=r(e,s,o))>-1;)pu.call(e,o,1);return e}function Ai(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,o=[],s=t.length;for(e=Fr(e,n,3);++i<s;){var u=t[i];e(u,i,t)&&(r.push(u),o.push(i))}return zn(t,o),r}function Di(t){return mi(t,1)}function Ri(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&$r(t,e,n)&&(e=0,n=r),Yn(t,e,n)):[]}function Ti(t,e,n){var r=t?t.length:0;return r?((n?$r(t,e,n):null==e)&&(e=1),Yn(t,0,0>e?0:e)):[]}function Oi(t,e,n){var r=t?t.length:
0;return r?((n?$r(t,e,n):null==e)&&(e=1),e=r-(+e||0),Yn(t,0>e?0:e)):[]}function Ui(t,e,n){return t&&t.length?nr(t,Fr(e,n,3),!1,!0):[]}function Ii(t,e,n){return t&&t.length?nr(t,Fr(e,n,3)):[]}function Wi(t,e,n,r){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=$r(t,e,r)?C:e,e=!1);var s=Fr();return(null!=n||s!==_n)&&(n=s(n,r,3)),e&&Gr()==o?w(t,n):tr(t,n)
}function Li(t){if(!t||!t.length)return[];var e=-1,n=0;t=an(t,function(t){return Qr(t)?(n=xu(t.length,n),!0):void 0});for(var r=Fs(n);++e<n;)r[e]=cn(t,Zn(e));return r}function Mi(t,e,n){var r=t?t.length:0;if(!r)return[];var i=Li(t);return null==e?i:(e=sr(e,n,4),cn(i,function(t){return hn(t,e,C,!0)}))}function qi(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Qr(n))var r=r?ln(En(r,n),En(n,r)):n}return r?tr(r):[]}function Bi(t,e){var n=-1,r=t?t.length:0,i={};for(!r||e||Aa(t[0])||(e=[]);++n<r;){var o=t[n];e?i[o]=e[n]:o&&(i[o[0]]=o[1])}return i}function Fi(t){var n=e(t);return n.__chain__=!0,n}function Vi(t,e,n){return e.call(n,t),t}function Gi(t,e,n){return e.call(n,t)}function Zi(){return Fi(this)}function Pi(){return new b(this.value(),this.__chain__)}function zi(t){for(var e,r=this;r instanceof n;){var i=pi(r);e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e}function Xi(){var t=this.__wrapped__,e=function(t){return n&&n.__dir__<0?t:t.re
verse()};if(t instanceof Q){var n=t;return this.__actions__.length&&(n=new Q(this)),n=n.reverse(),n.__actions__.push({func:Gi,args:[e],thisArg:C}),new b(n,this.__chain__)}return this.thru(e)}function Ji(){return this.value()+""}function Yi(){return rr(this.__wrapped__,this.__actions__)}function Hi(t,e,n){var r=Aa(t)?sn:Cn;return n&&$r(t,e,n)&&(e=C),("function"!=typeof e||n!==C)&&(e=Fr(e,n,3)),r(t,e)}function Qi(t,e,n){var r=Aa(t)?an:Nn;return e=Fr(e,n,3),r(t,e)}function Ki(t,e){return ia(t,Bn(e))}function $i(t,e,n,r){var i=t?Vu(t):0;return ni(i)||(t=ss(t),i=t.length),n="number"!=typeof n||r&&$r(e,n,r)?0:0>n?xu(i+n,0):n||0,"string"==typeof t||!Aa(t)&&Go(t)?i>=n&&t.indexOf(e,n)>-1:!!i&&Gr(t,e,n)>-1}function to(t,e,n){var r=Aa(t)?cn:qn;return e=Fr(e,n,3),r(t,e)}function eo(t,e){return to(t,Us(e))}function no(t,e,n){var r=Aa(t)?an:Nn;return e=Fr(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function ro(t,e,n){if(n?$r(t,e,n):null==e){t=li(t);var r=t.length;return r>0?t[Xn(0,r-1)]:
C}var i=-1,o=Jo(t),r=o.length,s=r-1;for(e=Su(0>e?0:+e||0,r);++i<e;){var u=Xn(i,s),a=o[u];o[u]=o[i],o[i]=a}return o.length=e,o}function io(t){return ro(t,Nu)}function oo(t){var e=t?Vu(t):0;return ni(e)?e:Ba(t).length}function so(t,e,n){var r=Aa(t)?pn:Hn;return n&&$r(t,e,n)&&(e=C),("function"!=typeof e||n!==C)&&(e=Fr(e,n,3)),r(t,e)}function uo(t,e,n){if(null==t)return[];n&&$r(t,e,n)&&(e=C);var r=-1;e=Fr(e,n,3);var i=qn(t,function(t,n,i){return{criteria:e(t,n,i),index:++r,value:t}});return Qn(i,l)}function ao(t,e,n,r){return null==t?[]:(r&&$r(e,n,r)&&(n=C),Aa(e)||(e=null==e?[]:[e]),Aa(n)||(n=null==n?[]:[n]),Kn(t,e,n))}function co(t,e){return Qi(t,Bn(e))}function lo(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Hs(G);var n=t;t=e,e=n}return t=wu(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function ho(t,e,n){return n&&$r(t,e,n)&&(e=C),e=t&&null==e?t.length:xu(+e||0,0),Lr(t,U,C,C,C,C,e)}function fo(t,e){var n;if("function"!=typeof e){if("funct
ion"!=typeof t)throw new Hs(G);var r=t;t=e,e=r}return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=C),n}}function po(t,e,n){function r(){p&&uu(p),c&&uu(c),v=0,c=p=d=C}function i(e,n){n&&uu(n),c=p=d=C,e&&(v=va(),l=t.apply(f,a),p||c||(a=f=C))}function o(){var t=e-(va()-h);0>=t||t>e?i(d,c):p=fu(o,t)}function s(){i(g,p)}function u(){if(a=arguments,h=va(),f=this,d=g&&(p||!b),m===!1)var n=b&&!p;else{c||b||(v=h);var r=m-(h-v),i=0>=r||r>m;i?(c&&(c=uu(c)),v=h,l=t.apply(f,a)):c||(c=fu(s,r))}return i&&p?p=uu(p):p||e===m||(p=fu(o,e)),n&&(i=!0,l=t.apply(f,a)),!i||p||c||(a=f=C),l}var a,c,l,h,f,p,d,v=0,m=!1,g=!0;if("function"!=typeof t)throw new Hs(G);if(e=0>e?0:+e||0,n===!0){var b=!0;g=!1}else Io(n)&&(b=!!n.leading,m="maxWait"in n&&xu(+n.maxWait||0,e),g="trailing"in n?!!n.trailing:g);return u.cancel=r,u}function vo(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Hs(G);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.g
et(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new vo.Cache,n}function mo(t){if("function"!=typeof t)throw new Hs(G);return function(){return!t.apply(this,arguments)}}function go(t){return fo(2,t)}function bo(t,e){if("function"!=typeof t)throw new Hs(G);return e=xu(e===C?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=xu(n.length-e,0),o=Fs(i);++r<i;)o[r]=n[e+r];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,n[0],o);case 2:return t.call(this,n[0],n[1],o)}var s=Fs(e+1);for(r=-1;++r<e;)s[r]=n[r];return s[e]=o,t.apply(this,s)}}function yo(t){if("function"!=typeof t)throw new Hs(G);return function(e){return t.apply(this,e)}}function wo(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Hs(G);return n===!1?r=!1:Io(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),po(t,e,{leading:r,maxWait:+e,trailing:i})}function _o(t,e){return e=null==e?Ns:e,Lr(e,T,C,[t],[])}function xo(t,e,n,r){return e&&"boolean"!=typeof
e&&$r(t,e,n)?e=!1:"function"==typeof e&&(r=n,n=e,e=!1),"function"==typeof n?xn(t,e,sr(n,r,1)):xn(t,e)}function So(t,e,n){return"function"==typeof e?xn(t,!0,sr(e,n,1)):xn(t,!0)}function Eo(t,e){return t>e}function Co(t,e){return t>=e}function ko(t){return g(t)&&Qr(t)&&eu.call(t,"callee")&&!lu.call(t,"callee")}function jo(t){return t===!0||t===!1||g(t)&&ru.call(t)==X}function No(t){return g(t)&&ru.call(t)==J}function Ao(t){return!!t&&1===t.nodeType&&g(t)&&!Fo(t)}function Do(t){return null==t?!0:Qr(t)&&(Aa(t)||Go(t)||ko(t)||g(t)&&Uo(t.splice))?!t.length:!Ba(t).length}function Ro(t,e,n,r){n="function"==typeof n?sr(n,r,3):C;var i=n?n(t,e):C;return i===C?Wn(t,e,n):!!i}function To(t){return g(t)&&"string"==typeof t.message&&ru.call(t)==Y}function Oo(t){return"number"==typeof t&&wu(t)}function Uo(t){return Io(t)&&ru.call(t)==H}function Io(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wo(t,e,n,r){return n="function"==typeof n?sr(n,r,3):C,Mn(t,Zr(e),n)}function L
o(t){return Bo(t)&&t!=+t}function Mo(t){return null==t?!1:Uo(t)?ou.test(tu.call(t)):g(t)&&Ue.test(t)}function qo(t){return null===t}function Bo(t){return"number"==typeof t||g(t)&&ru.call(t)==K}function Fo(t){var e;if(!g(t)||ru.call(t)!=$||ko(t)||!eu.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return Rn(t,function(t,e){n=e}),n===C||eu.call(t,n)}function Vo(t){return Io(t)&&ru.call(t)==te}function Go(t){return"string"==typeof t||g(t)&&ru.call(t)==ne}function Zo(t){return g(t)&&ni(t.length)&&!!Ve[ru.call(t)]}function Po(t){return t===C}function zo(t,e){return e>t}function Xo(t,e){return e>=t}function Jo(t){var e=t?Vu(t):0;return ni(e)?e?tn(t):[]:ss(t)}function Yo(t){return wn(t,es(t))}function Ho(t,e,n){var r=Iu(t);return n&&$r(t,e,n)&&(e=C),e?bn(r,e):r}function Qo(t){return Un(t,es(t))}function Ko(t,e,n){var r=null==t?C:In(t,fi(e),e+"");return r===C?n:r}function $o(t,e){if(null==t)return!1;var n=eu.call(t,e);if(!n&&!ti(e)){if
(e=fi(e),t=1==e.length?t:In(t,Yn(e,0,-1)),null==t)return!1;e=ki(e),n=eu.call(t,e)}return n||ni(t.length)&&Kr(e,t.length)&&(Aa(t)||ko(t))}function ts(t,e,n){n&&$r(t,e,n)&&(e=C);for(var r=-1,i=Ba(t),o=i.length,s={};++r<o;){var u=i[r],a=t[u];e?eu.call(s,a)?s[a].push(u):s[a]=[u]:s[a]=u}return s}function es(t){if(null==t)return[];Io(t)||(t=Xs(t));var e=t.length;e=e&&ni(e)&&(Aa(t)||ko(t))&&e||0;for(var n=t.constructor,r=-1,i="function"==typeof n&&n.prototype===t,o=Fs(e),s=e>0;++r<e;)o[r]=r+"";for(var u in t)s&&Kr(u,e)||"constructor"==u&&(i||!eu.call(t,u))||o.push(u);return o}function ns(t){t=hi(t);for(var e=-1,n=Ba(t),r=n.length,i=Fs(r);++e<r;){var o=n[e];i[e]=[o,t[o]]}return i}function rs(t,e,n){var r=null==t?C:t[e];return r===C&&(null==t||ti(e,t)||(e=fi(e),t=1==e.length?t:In(t,Yn(e,0,-1)),r=null==t?C:t[ki(e)]),r=r===C?n:r),Uo(r)?r.call(t):r}function is(t,e,n){if(null==t)return t;var r=e+"";e=null!=t[r]||ti(e,t)?[r]:fi(e);for(var i=-1,o=e.length,s=o-1,u=t;null!=u&&++i<o;){var a=e
[i];Io(u)&&(i==s?u[a]=n:null==u[a]&&(u[a]=Kr(e[i+1])?[]:{})),u=u[a]}return t}function os(t,e,n,r){var i=Aa(t)||Zo(t);if(e=Fr(e,r,4),null==n)if(i||Io(t)){var o=t.constructor;n=i?Aa(t)?new o:[]:Iu(Uo(o)?o.prototype:C)}else n={};return(i?en:Tn)(t,function(t,r,i){return e(n,t,r,i)}),n}function ss(t){return er(t,Ba(t))}function us(t){return er(t,es(t))}function as(t,e,n){return e=+e||0,n===C?(n=e,e=0):n=+n||0,t>=Su(e,n)&&t<xu(e,n)}function cs(t,e,n){n&&$r(t,e,n)&&(e=n=C);var r=null==t,i=null==e;if(null==n&&(i&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,i=!0)),r&&i&&(e=1,i=!1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var o=ku();return Su(t+o*(e-t+au("1e-"+((o+"").length-1))),e)}return Xn(t,e)}function ls(t){return t=u(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function hs(t){return t=u(t),t&&t.replace(We,f).replace(Ae,"")}function fs(t,e,n){t=u(t),e+="";var r=t.length;return n=n===C?r:Su(0>n?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function ps(t){return t=u(t),t
&&we.test(t)?t.replace(be,p):t}function ds(t){return t=u(t),t&&Ne.test(t)?t.replace(je,d):t||"(?:)"}function vs(t,e,n){t=u(t),e=+e;var r=t.length;if(r>=e||!wu(e))return t;var i=(e-r)/2,o=bu(i),s=mu(i);return n=Or("",s,n),n.slice(0,o)+t+n}function ms(t,e,n){return(n?$r(t,e,n):null==e)?e=0:e&&(e=+e),t=ws(t),Cu(t,e||(Oe.test(t)?16:10))}function gs(t,e){var n="";if(t=u(t),e=+e,1>e||!t||!wu(e))return n;do e%2&&(n+=t),e=bu(e/2),t+=t;while(e);return n}function bs(t,e,n){return t=u(t),n=null==n?0:Su(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function ys(t,n,r){var i=e.templateSettings;r&&$r(t,n,r)&&(n=r=C),t=u(t),n=gn(bn({},r||n),i,mn);var o,s,a=gn(bn({},n.imports),i.imports,mn),c=Ba(a),l=er(a,c),h=0,f=n.interpolate||Le,p="__p += '",d=Js((n.escape||Le).source+"|"+f.source+"|"+(f===Se?Re:Le).source+"|"+(n.evaluate||Le).source+"|$","g"),m="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Fe+"]")+"\n";t.replace(d,function(e,n,r,i,u,a){return r||(r=i),p+=t.slic
e(h,a).replace(Me,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),u&&(s=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=a+e.length,e}),p+="';\n";var g=n.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(s?p.replace(de,""):p).replace(ve,"$1").replace(me,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var b=Qa(function(){return Zs(c,m+"return "+p).apply(C,l)});if(b.source=p,To(b))throw b;return b}function ws(t,e,n){var r=t;return(t=u(t))?(n?$r(r,e,n):null==e)?t.slice(_(t),x(t)+1):(e+="",t.slice(a(t,e),c(t,e)+1)):t}function _s(t,e,n){var r=t;return t=u(t),t?t.slice((n?$r(r,e,n):null==e)?_(t):a(t,e+"")):t}function xs(t,e,n){var r=t;return t=u(t),t?(n?$r(r,e,n):null==e)?t.slice(0,x(t)+1):t.slice(0,c(t,e+"")+1):t}function Ss(t,e,n){n&&$r(t,e,n)&&(e=C);var r=W,i=L;if(null!=e
)if(Io(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?u(e.omission):i}else r=+e||0;if(t=u(t),r>=t.length)return t;var s=r-i.length;if(1>s)return i;var a=t.slice(0,s);if(null==o)return a+i;if(Vo(o)){if(t.slice(s).search(o)){var c,l,h=t.slice(0,s);for(o.global||(o=Js(o.source,(Te.exec(o)||"")+"g")),o.lastIndex=0;c=o.exec(h);)l=c.index;a=a.slice(0,null==l?s:l)}}else if(t.indexOf(o,s)!=s){var f=a.lastIndexOf(o);f>-1&&(a=a.slice(0,f))}return a+i}function Es(t){return t=u(t),t&&ye.test(t)?t.replace(ge,S):t}function Cs(t,e,n){return n&&$r(t,e,n)&&(e=C),t=u(t),t.match(e||qe)||[]}function ks(t,e,n){return n&&$r(t,e,n)&&(e=C),g(t)?As(t):_n(t,e)}function js(t){return function(){return t}}function Ns(t){return t}function As(t){return Bn(xn(t,!0))}function Ds(t,e){return Fn(t,xn(e,!0))}function Rs(t,e,n){if(null==n){var r=Io(e),i=r?Ba(e):C,o=i&&i.length?Un(e,i):C;(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=Un(e,Ba(e)));var s=!0,u=-1,a=Uo(t),c=o.len
gth;n===!1?s=!1:Io(n)&&"chain"in n&&(s=n.chain);for(;++u<c;){var l=o[u],h=e[l];t[l]=h,a&&(t.prototype[l]=function(e){return function(){var n=this.__chain__;if(s||n){var r=t(this.__wrapped__),i=r.__actions__=tn(this.__actions__);return i.push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,ln([this.value()],arguments))}}(h))}return t}function Ts(){return nn._=iu,this}function Os(){}function Us(t){return ti(t)?Zn(t):Pn(t)}function Is(t){return function(e){return In(t,fi(e),e+"")}}function Ws(t,e,n){n&&$r(t,e,n)&&(e=n=C),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,i=xu(mu((e-t)/(n||1)),0),o=Fs(i);++r<i;)o[r]=t,t+=n;return o}function Ls(t,e,n){if(t=bu(t),1>t||!wu(t))return[];var r=-1,i=Fs(Su(t,Au));for(e=sr(e,n,1);++r<t;)Au>r?i[r]=e(r):e(r);return i}function Ms(t){var e=++nu;return u(t)+e}function qs(t,e){return(+t||0)+(+e||0)}function Bs(t,e,n){return n&&$r(t,e,n)&&(e=C),e=Fr(e,n,3),1==e.length?dn(Aa(t)?t:li(t),e):$n(t,e)}t=t?rn.defaults
(nn.Object(),t,rn.pick(nn,Be)):nn;{var Fs=t.Array,Vs=t.Date,Gs=t.Error,Zs=t.Function,Ps=t.Math,zs=t.Number,Xs=t.Object,Js=t.RegExp,Ys=t.String,Hs=t.TypeError,Qs=Fs.prototype,Ks=Xs.prototype,$s=Ys.prototype,tu=Zs.prototype.toString,eu=Ks.hasOwnProperty,nu=0,ru=Ks.toString,iu=nn._,ou=Js("^"+tu.call(eu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),su=t.ArrayBuffer,uu=t.clearTimeout,au=t.parseFloat,cu=Ps.pow,lu=Ks.propertyIsEnumerable,hu=Pr(t,"Set"),fu=t.setTimeout,pu=Qs.splice,du=t.Uint8Array,vu=Pr(t,"WeakMap"),mu=Ps.ceil,gu=Pr(Xs,"create"),bu=Ps.floor,yu=Pr(Fs,"isArray"),wu=t.isFinite,_u=Pr(Xs,"keys"),xu=Ps.max,Su=Ps.min,Eu=Pr(Vs,"now"),Cu=t.parseInt,ku=Ps.random,ju=zs.NEGATIVE_INFINITY,Nu=zs.POSITIVE_INFINITY,Au=4294967295,Du=Au-1,Ru=Au>>>1,Tu=9007199254740991,Ou=vu&&new vu,Uu={};e.support={}}e.templateSettings={escape:_e,evaluate:xe,interpolate:Se,variable:"",imports:{_:e}};var Iu=function(){function t()
{}return function(e){if(Io(e)){t.prototype=e;var n=new t;t.prototype=C}return n||{}}}(),Wu=fr(Tn),Lu=fr(On,!0),Mu=pr(),qu=pr(!0),Bu=Ou?function(t,e){return Ou.set(t,e),t}:Ns,Fu=Ou?function(t){return Ou.get(t)}:Os,Vu=Zn("length"),Gu=function(){var t=0,e=0;return function(n,r){var i=va(),o=q-(i-e);if(e=i,o>0){if(++t>=M)return n}else t=0;return Bu(n,r)}}(),Zu=bo(function(t,e){return g(t)&&Qr(t)?En(t,Dn(e,!1,!0)):[]}),Pu=xr(),zu=xr(!0),Xu=bo(function(t){for(var e=t.length,n=e,r=Fs(h),i=Gr(),s=i==o,u=[];n--;){var a=t[n]=Qr(a=t[n])?a:[];r[n]=s&&a.length>=120?vr(n&&a):null}var c=t[0],l=-1,h=c?c.length:0,f=r[0];t:for(;++l<h;)if(a=c[l],(f?Qe(f,a):i(u,a,0))<0){for(var n=e;--n;){var p=r[n];if((p?Qe(p,a):i(t[n],a,0))<0)continue t}f&&f.push(a),u.push(a)}return u}),Ju=bo(function(t,e){e=Dn(e);var n=yn(t,e);return zn(t,e.sort(r)),n}),Yu=Wr(),Hu=Wr(!0),Qu=bo(function(t){return tr(Dn(t,!1,!0))}),Ku=bo(function(t,e){return Qr(t)?En(t,e):[]}),$u=bo(Li),ta=bo(function(t){var e=t.length,n=e>2?t[
e-2]:C,r=e>1?t[e-1]:C;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):C,r=C),t.length=e,Mi(t,n,r)}),ea=bo(function(t){return t=Dn(t),this.thru(function(e){return $e(Aa(e)?e:[hi(e)],t)})}),na=bo(function(t,e){return yn(t,Dn(e))}),ra=lr(function(t,e,n){eu.call(t,n)?++t[n]:t[n]=1}),ia=_r(Wu),oa=_r(Lu,!0),sa=Cr(en,Wu),ua=Cr(on,Lu),aa=lr(function(t,e,n){eu.call(t,n)?t[n].push(e):t[n]=[e]}),ca=lr(function(t,e,n){t[n]=e}),la=bo(function(t,e,n){var r=-1,i="function"==typeof e,o=ti(e),s=Qr(t)?Fs(t.length):[];return Wu(t,function(t){var u=i?e:o&&null!=t?t[e]:C;s[++r]=u?u.apply(t,n):Hr(t,e,n)}),s}),ha=lr(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),fa=Rr(hn,Wu),pa=Rr(fn,Lu),da=bo(function(t,e){if(null==t)return[];var n=e[2];return n&&$r(e[0],e[1],n)&&(e.length=1),Kn(t,Dn(e),[])}),va=Eu||function(){return(new Vs).getTime()},ma=bo(function(t,e,n){var r=j;if(n.length){var i=y(n,ma.placeholder);r|=T}return Lr(t,r,e,n,i)}),ga=bo(function(t,e){e=e.l
ength?Dn(e):Qo(t);for(var n=-1,r=e.length;++n<r;){var i=e[n];t[i]=Lr(t[i],j,t)}return t}),ba=bo(function(t,e,n){var r=j|N;if(n.length){var i=y(n,ba.placeholder);r|=T}return Lr(e,r,t,n,i)}),ya=br(D),wa=br(R),_a=bo(function(t,e){return Sn(t,1,e)}),xa=bo(function(t,e,n){return Sn(t,e,n)}),Sa=Er(),Ea=Er(!0),Ca=bo(function(t,e){if(e=Dn(e),"function"!=typeof t||!sn(e,s))throw new Hs(G);var n=e.length;return bo(function(r){for(var i=Su(r.length,n);i--;)r[i]=e[i](r[i]);return t.apply(this,r)})}),ka=Dr(T),ja=Dr(O),Na=bo(function(t,e){return Lr(t,I,C,C,C,Dn(e))}),Aa=yu||function(t){return g(t)&&ni(t.length)&&ru.call(t)==z},Da=hr(Vn),Ra=hr(function(t,e,n){return n?gn(t,e,n):bn(t,e)}),Ta=yr(Ra,vn),Oa=yr(Da,oi),Ua=Sr(Tn),Ia=Sr(On),Wa=kr(Mu),La=kr(qu),Ma=jr(Tn),qa=jr(On),Ba=_u?function(t){var e=null==t?C:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Qr(t)?ci(t):Io(t)?_u(t):[]}:ci,Fa=Nr(!0),Va=Nr(),Ga=bo(function(t,e){if(null==t)return{};if("function"!=ty
peof e[0]){var e=cn(Dn(e),Ys);return si(t,En(es(t),e))}var n=sr(e[0],e[1],3);return ui(t,function(t,e,r){return!n(t,e,r)})}),Za=bo(function(t,e){return null==t?{}:"function"==typeof e[0]?ui(t,sr(e[0],e[1],3)):si(t,Dn(e))}),Pa=mr(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),za=mr(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Xa=Ar(),Ja=Ar(!0),Ya=mr(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Ha=mr(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Qa=bo(function(t,e){try{return t.apply(C,e)}catch(n){return To(n)?n:new Gs(n)}}),Ka=bo(function(t,e){return function(n){return Hr(n,t,e)}}),$a=bo(function(t,e){return function(n){return Hr(t,n,e)}}),tc=Ir("ceil"),ec=Ir("floor"),nc=wr(Eo,ju),rc=wr(zo,Nu),ic=Ir("round");return e.prototype=n.prototype,b.prototype=Iu(n.prototype),b.prototype.constructor=b,Q.prototype=Iu(n.prototype),Q.prototype.constructor=Q,Pe.prototype["delete"]=ze,Pe.prototype.get=
Xe,Pe.prototype.has=Je,Pe.prototype.set=Ye,He.prototype.push=Ke,vo.Cache=Pe,e.after=lo,e.ary=ho,e.assign=Ra,e.at=na,e.before=fo,e.bind=ma,e.bindAll=ga,e.bindKey=ba,e.callback=ks,e.chain=Fi,e.chunk=di,e.compact=vi,e.constant=js,e.countBy=ra,e.create=Ho,e.curry=ya,e.curryRight=wa,e.debounce=po,e.defaults=Ta,e.defaultsDeep=Oa,e.defer=_a,e.delay=xa,e.difference=Zu,e.drop=mi,e.dropRight=gi,e.dropRightWhile=bi,e.dropWhile=yi,e.fill=wi,e.filter=Qi,e.flatten=xi,e.flattenDeep=Si,e.flow=Sa,e.flowRight=Ea,e.forEach=sa,e.forEachRight=ua,e.forIn=Wa,e.forInRight=La,e.forOwn=Ma,e.forOwnRight=qa,e.functions=Qo,e.groupBy=aa,e.indexBy=ca,e.initial=Ci,e.intersection=Xu,e.invert=ts,e.invoke=la,e.keys=Ba,e.keysIn=es,e.map=to,e.mapKeys=Fa,e.mapValues=Va,e.matches=As,e.matchesProperty=Ds,e.memoize=vo,e.merge=Da,e.method=Ka,e.methodOf=$a,e.mixin=Rs,e.modArgs=Ca,e.negate=mo,e.omit=Ga,e.once=go,e.pairs=ns,e.partial=ka,e.partialRight=ja,e.partition=ha,e.pick=Za,e.pluck=eo,e.property=Us,e.propertyOf=Is
,e.pull=Ni,e.pullAt=Ju,e.range=Ws,e.rearg=Na,e.reject=no,e.remove=Ai,e.rest=Di,e.restParam=bo,e.set=is,e.shuffle=io,e.slice=Ri,e.sortBy=uo,e.sortByAll=da,e.sortByOrder=ao,e.spread=yo,e.take=Ti,e.takeRight=Oi,e.takeRightWhile=Ui,e.takeWhile=Ii,e.tap=Vi,e.throttle=wo,e.thru=Gi,e.times=Ls,e.toArray=Jo,e.toPlainObject=Yo,e.transform=os,e.union=Qu,e.uniq=Wi,e.unzip=Li,e.unzipWith=Mi,e.values=ss,e.valuesIn=us,e.where=co,e.without=Ku,e.wrap=_o,e.xor=qi,e.zip=$u,e.zipObject=Bi,e.zipWith=ta,e.backflow=Ea,e.collect=to,e.compose=Ea,e.each=sa,e.eachRight=ua,e.extend=Ra,e.iteratee=ks,e.methods=Qo,e.object=Bi,e.select=Qi,e.tail=Di,e.unique=Wi,Rs(e,e),e.add=qs,e.attempt=Qa,e.camelCase=Pa,e.capitalize=ls,e.ceil=tc,e.clone=xo,e.cloneDeep=So,e.deburr=hs,e.endsWith=fs,e.escape=ps,e.escapeRegExp=ds,e.every=Hi,e.find=ia,e.findIndex=Pu,e.findKey=Ua,e.findLast=oa,e.findLastIndex=zu,e.findLastKey=Ia,e.findWhere=Ki,e.first=_i,e.floor=ec,e.get=Ko,e.gt=Eo,e.gte=Co,e.has=$o,e.identity=Ns,e.includes=$i,
e.indexOf=Ei,e.inRange=as,e.isArguments=ko,e.isArray=Aa,e.isBoolean=jo,e.isDate=No,e.isElement=Ao,e.isEmpty=Do,e.isEqual=Ro,e.isError=To,e.isFinite=Oo,e.isFunction=Uo,e.isMatch=Wo,e.isNaN=Lo,e.isNative=Mo,e.isNull=qo,e.isNumber=Bo,e.isObject=Io,e.isPlainObject=Fo,e.isRegExp=Vo,e.isString=Go,e.isTypedArray=Zo,e.isUndefined=Po,e.kebabCase=za,e.last=ki,e.lastIndexOf=ji,e.lt=zo,e.lte=Xo,e.max=nc,e.min=rc,e.noConflict=Ts,e.noop=Os,e.now=va,e.pad=vs,e.padLeft=Xa,e.padRight=Ja,e.parseInt=ms,e.random=cs,e.reduce=fa,e.reduceRight=pa,e.repeat=gs,e.result=rs,e.round=ic,e.runInContext=E,e.size=oo,e.snakeCase=Ya,e.some=so,e.sortedIndex=Yu,e.sortedLastIndex=Hu,e.startCase=Ha,e.startsWith=bs,e.sum=Bs,e.template=ys,e.trim=ws,e.trimLeft=_s,e.trimRight=xs,e.trunc=Ss,e.unescape=Es,e.uniqueId=Ms,e.words=Cs,e.all=Hi,e.any=so,e.contains=$i,e.eq=Ro,e.detect=ia,e.foldl=fa,e.foldr=pa,e.head=_i,e.include=$i,e.inject=fa,Rs(e,function(){var t={};return Tn(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}()
,!1),e.sample=ro,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ro(e,t)}):ro(this.value())},e.VERSION=k,en(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),en(["drop","take"],function(t,e){Q.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new Q(this);n=null==n?1:xu(bu(n)||0,0);var i=this.clone();return r?i.__takeCount__=Su(i.__takeCount__,n):i.__views__.push({size:n,type:t+(i.__dir__<0?"Right":"")}),i},Q.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),en(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n!=V;Q.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:Fr(t,e,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),en(["first","last"],function(t,e){var n="take"+(e?"Right":"");Q.prototype[t]=function(){return this[n](1).value()[0]}}),en(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");Q.proto
type[t]=function(){return this.__filtered__?new Q(this):this[n](1)}}),en(["pluck","where"],function(t,e){var n=e?"filter":"map",r=e?Bn:Us;Q.prototype[t]=function(t){return this[n](r(t))}}),Q.prototype.compact=function(){return this.filter(Ns)},Q.prototype.reject=function(t,e){return t=Fr(t,e,1),this.filter(function(e){return!t(e)})},Q.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return n.__filtered__&&(t>0||0>e)?new Q(n):(0>t?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==C&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n)},Q.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},Q.prototype.toArray=function(){return this.take(Nu)},Tn(Q.prototype,function(t,n){var r=/^(?:filter|map|reject)|While$/.test(n),i=/^(?:first|last)$/.test(n),o=e[i?"take"+("last"==n?"Right":""):n];o&&(e.prototype[n]=function(){var e=i?[1]:arguments,n=this.__chain__,s=this.__wrapped__,u=!!this.__actions__.length,a=s instanceof Q,c=e[0],l=a||Aa(s);l&&r&&"function"==t
ypeof c&&1!=c.length&&(a=l=!1);var h=function(t){return i&&n?o(t,1)[0]:o.apply(C,ln([t],e))},f={func:Gi,args:[h],thisArg:C},p=a&&!u;if(i&&!n)return p?(s=s.clone(),s.__actions__.push(f),t.call(s)):o.call(C,this.value())[0];if(!i&&l){s=p?s:new Q(this);var d=t.apply(s,e);return d.__actions__.push(f),new b(d,n)}return this.thru(h)})}),en(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?$s:Qs)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),Tn(Q.prototype,function(t,n){var r=e[n];if(r){var i=r.name,o=Uu[i]||(Uu[i]=[]);o.push({name:n,func:r})}}),Uu[Tr(C,N).name]=[{name:"wrapper",func:C}],Q.prototype.clone=ee,Q.prototype.reverse=re,Q.prototype.value=Ze,e.prototype.chain=Zi,e.prototype.commit=Pi,e.prototype.concat=ea,e.prototype.pl
ant=zi,e.prototype.reverse=Xi,e.prototype.toString=Ji,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Yi,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var C,k="3.10.1",j=1,N=2,A=4,D=8,R=16,T=32,O=64,U=128,I=256,W=30,L="...",M=150,q=16,B=200,F=1,V=2,G="Expected a function",Z="__lodash_placeholder__",P="[object Arguments]",z="[object Array]",X="[object Boolean]",J="[object Date]",Y="[object Error]",H="[object Function]",Q="[object Map]",K="[object Number]",$="[object Object]",te="[object RegExp]",ee="[object Set]",ne="[object String]",re="[object WeakMap]",ie="[object ArrayBuffer]",oe="[object Float32Array]",se="[object Float64Array]",ue="[object Int8Array]",ae="[object Int16Array]",ce="[object Int32Array]",le="[object Uint8Array]",he="[object Uint8ClampedArray]",fe="[object Uint16Array]",pe="[object Uint32Array]",de=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+
/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ge=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,ye=RegExp(ge.source),we=RegExp(be.source),_e=/<%-([\s\S]+?)%>/g,xe=/<%([\s\S]+?)%>/g,Se=/<%=([\s\S]+?)%>/g,Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ce=/^\w*$/,ke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,je=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ne=RegExp(je.source),Ae=/[\u0300-\u036f\ufe20-\ufe23]/g,De=/\\(\\)?/g,Re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Te=/\w*$/,Oe=/^0[xX]/,Ue=/^\[object .+?Constructor\]$/,Ie=/^\d+$/,We=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Le=/($^)/,Me=/['\n\r\u2028\u2029\\]/g,qe=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Be=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_"
,"clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Fe=-1,Ve={};Ve[oe]=Ve[se]=Ve[ue]=Ve[ae]=Ve[ce]=Ve[le]=Ve[he]=Ve[fe]=Ve[pe]=!0,Ve[P]=Ve[z]=Ve[ie]=Ve[X]=Ve[J]=Ve[Y]=Ve[H]=Ve[Q]=Ve[K]=Ve[$]=Ve[te]=Ve[ee]=Ve[ne]=Ve[re]=!1;var Ge={};Ge[P]=Ge[z]=Ge[ie]=Ge[X]=Ge[J]=Ge[oe]=Ge[se]=Ge[ue]=Ge[ae]=Ge[ce]=Ge[K]=Ge[$]=Ge[te]=Ge[ne]=Ge[le]=Ge[he]=Ge[fe]=Ge[pe]=!0,Ge[Y]=Ge[H]=Ge[Q]=Ge[ee]=Ge[re]=!1;var Ze={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y",
"ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Pe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},ze={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Xe={"function":!0,object:!0},Je={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=Xe[typeof n]&&n&&!n.nodeType&&n,Qe=Xe[typeof e]&&e&&!e.nodeType&&e,Ke=He&&Qe&&"object"==typeof t&&t&&t.Object&&t,$e=Xe[typeof self]&&self&&self.Object&&self,tn=Xe[typeof window]&&window&&window.Object&&window,en=Qe&&Qe.exports===He&&He,nn=Ke||tn!==(this&&this.window)&&tn||$e||this,rn=E();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nn._=rn,define(function(){return rn})):He&&Qe?en?(Qe.exports=rn)._=rn:He._=
rn:nn._=rn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/highland/lib/index.js":[function(t,e,n){(function(r,i){function o(t,e,n){if(t&&f.isStream(t))return t;l.call(this);var r=this;if(r.__HighlandStream__=!0,r.id=(""+Math.random()).substr(2,6),this.paused=!0,this._incoming=[],this._outgoing=[],this._consumers=[],this._observers=[],this._destructors=[],this._send_events=!1,this._delegate=null,this.source=null,this.writable=!0,r.on("newListener",function(t){"data"===t?(r._send_events=!0,f.setImmediate(r.resume.bind(r))):"end"===t&&(r._send_events=!0)}),r.on("removeListener",function(t){if("end"===t||"data"===t){var e=r.listeners("end").length,n=r.listeners("data").length;e+n===0&&(r._send_events=!1)}}),void 0===t)return this;if(f.isArray(t))r._incoming=t.concat([v]);else if("function"==typeof t)this._generator=t,this._generator_push=functio
n(t,e){r.write(t?new u(t):e)},this._generator_next=function(t){if(t){var e=r.paused;e||r.pause(),r.write(new a(t)),e||r.resume()}else r._generator_running=!1;r.paused||r.resume()};else if(f.isObject(t)){if(f.isFunction(t.then))return f(function(e){t.then(function(t){return e(null,t),e(null,v)},function(t){return e(t),e(null,v)})});t.on("error",function(t){r.write(new u(t))}),t.pipe(r)}else{if("string"!=typeof t)throw new Error("Unexpected argument type to Stream(): "+typeof t);var i,o=typeof n;i="function"===o?n:"number"===o?function(){return p.call(arguments,0,n)}:f.isArray(n)?function(){var t=arguments;return n.reduce(function(e,n,r){return e[n]=t[r],e},{})}:function(t){return t},e.on(t,function(){var t=i.apply(this,arguments);r.write(t)})}}function s(t){var e=o.prototype[t],n=e.length;f[t]=f.ncurry(n+1,function(){var t=p.call(arguments),n=f(t.pop());return e.apply(n,t)})}function u(t){this.__HighlandStreamError__=!0,this.error=t}function a(t){this.__HighlandStreamRedirect
__=!0,this.to=t}var c=t("util").inherits,l=t("events").EventEmitter,h=t("string_decoder").StringDecoder;n=e.exports=function(t,e,n){return new o(t,e,n)};var f=n,p=Array.prototype.slice;f.isFunction=function(t){return"function"==typeof t},f.isObject=function(t){return"object"==typeof t&&null!==t},f.isString=function(t){return"string"==typeof t},f.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},f.setImmediate="undefined"==typeof setImmediate?"undefined"!=typeof r&&r.nextTick?r.nextTick:function(t){setTimeout(t,0)}:"undefined"!=typeof r&&r.stdout?setImmediate:function(t){setImmediate(t)};var d=this;"undefined"!=typeof i?d=i:"undefined"!=typeof window&&(d=window),d.nil||(d.nil={});var v=f.nil=d.nil;f.curry=function(t){var e=p.call(arguments);return f.ncurry.apply(this,[t.length].concat(e))},f.ncurry=function(t,e){var n=p.call(arguments,2);return n.length>=t?e.apply(this,n.slice(0,t)):f.partial.apply(this,[f.ncurry,t,e].concat(n))},f
.partial=function(t){var e=p.call(arguments,1);return function(){return t.apply(this,e.concat(p.call(arguments)))}},f.flip=f.curry(function(t,e,n){return t(n,e)}),f.compose=function(){var t=p.call(arguments).reverse();return f.seq.apply(null,t)},f.seq=function(){var t=p.call(arguments);return function(){if(!t.length)return null;for(var e=t[0].apply(this,arguments),n=1;n<t.length;n++)e=t[n].call(this,e);return e}},c(o,l),f.isStream=function(t){return f.isObject(t)&&t.__HighlandStream__},f._isStreamError=function(t){return f.isObject(t)&&t.__HighlandStreamError__},f._isStreamRedirect=function(t){return f.isObject(t)&&t.__HighlandStreamRedirect__},o.prototype._send=function(t,e){if(e===v&&(this.ended=!0),this._consumers.length)for(var n=0,r=this._consumers.length;r>n;n++){var i=this._consumers[n];i.write(t?new u(t):e)}if(this._observers.length)for(var o=0,s=this._observers.length;s>o;o++)this._observers[o].write(e);this._send_events&&(e===v?this.emit("end"):this.emit("data",e))
},o.prototype.pause=function(){this.paused=!0,this.source&&this.source._checkBackPressure()},o.prototype._checkBackPressure=function(){if(!this._consumers.length)return this.pause();for(var t=0,e=this._consumers.length;e>t;t++)if(this._consumers[t].paused)return this.pause();return this.resume()},o.prototype._readFromBuffer=function(){for(var t=this._incoming.length,e=0;t>e&&!this.paused;){var n=this._incoming[e];
f._isStreamError(n)?this._send(n.error):f._isStreamRedirect(n)?this._redirect(n.to):this._send(null,n),e++}this._incoming.splice(0,e)},o.prototype._sendOutgoing=function(){for(var t=this._outgoing.length,e=0;t>e&&!this.paused;){var n=this._outgoing[e];f._isStreamError(n)?o.prototype._send.call(this,n.error):f._isStreamRedirect(n)?this._redirect(n.to):o.prototype._send.call(this,null,n),e++}this._outgoing.splice(0,e)},o.prototype.resume=function(){if(this._resume_running)return void(this._repeat_resume=!0);this._resume_running=!0;do this._repeat_resume=!1,this.paused=!1,this._sendOutgoing(),this._readFromBuffer(),this.paused||(this.source?this.source._checkBackPressure():this._generator?this._runGenerator():this.emit("drain"));while(this._repeat_resume);this._resume_running=!1},o.prototype.end=function(){this.write(v)},o.prototype.pipe=function(t){function e(){o.resume()}var n=this,i=t!==r.stdout&&t!==r.stderr,o=n.consume(function(e,r,o,s){return e?void n.emit("error",e):void
(r===v?i&&t.end():t.write(r)!==!1&&s())});return t.on("drain",e),this._destructors.push(function(){t.removeListener("drain",e)}),o.resume(),t},o.prototype.destroy=function(){var t=this;this.end(),f(this._consumers).each(function(e){t._removeConsumer(e)}),this.source&&this.source._removeConsumer(this),f(this._destructors).each(function(t){t()})},o.prototype._runGenerator=function(){this._generator_running||(this._generator_running=!0,this._generator(this._generator_push,this._generator_next))},o.prototype._redirect=function(t){for(t=f(t);t._delegate;)t=t._delegate;t._consumers=this._consumers.map(function(e){return e.source=t,e}),this._consumers=[],t._delegate_source=this._delegate_source||this,t._delegate_source._delegate=t,this.paused?t.pause():(this.pause(),t._checkBackPressure())},o.prototype._addConsumer=function(t){if(this._consumers.length)throw new Error("Stream already being consumed, you must either fork() or observe()");t.source=this,this._consumers.push(t),this._c
heckBackPressure()},o.prototype._removeConsumer=function(t){for(var e=this;e._delegate;)e=e._delegate;e._consumers=e._consumers.filter(function(e){return e!==t}),t.source===e&&(t.source=null),e._checkBackPressure()},o.prototype.consume=function(t){for(var e=this;e._delegate;)e=e._delegate;var n,r,i=new o,s=i._send,c=function(t,n){n===v&&e._removeConsumer(i),i.paused?i._outgoing.push(t?new u(t):n):s.call(i,t,n)},l=function(t){if(t){var e=i.paused;e||i.pause(),i.write(new a(t)),e||i.resume()}else n?i.resume():r=!0};return i._send=function(e,o){n=!1,r=!1,t(e,o,c,l),n=!0,r||i.pause()},e._addConsumer(i),i},s("consume"),o.prototype.pull=function(t){var e=this.consume(function(n,r){e.source._removeConsumer(e),t(n,r)});e.id="pull:"+e.id,e.resume()},o.prototype.write=function(t){return this.paused?this._incoming.push(t):f._isStreamError(t)?this._send(t.error):this._send(null,t),!this.paused},o.prototype.fork=function(){var t=new o;return t.id="fork:"+t.id,t.source=this,this._consumer
s.push(t),this._checkBackPressure(),t},o.prototype.observe=function(){var t=new o;return t.id="observe:"+t.id,t.source=this,this._observers.push(t),t},o.prototype.errors=function(t){return this.consume(function(e,n,r,i){e?(t(e,r),i()):n===v?r(null,v):(r(null,n),i())})},s("errors"),o.prototype.stopOnError=function(t){return this.consume(function(e,n,r,i){e?(t(e,r),r(null,v)):n===v?r(null,v):(r(null,n),i())})},s("stopOnError"),o.prototype.each=function(t){var e=this;return this.consume(function(n,r,i,o){n?e.emit("error",n):r!==v&&(t(r),o())}).resume()},s("each"),o.prototype.apply=function(t){return this.toArray(function(e){t.apply(null,e)})},s("apply"),o.prototype.toArray=function(t){var e=this;return this.collect().pull(function(n,r){n?e.emit("error",n):t(r)})},o.prototype.map=function(t){if(!f.isFunction(t)){var e=t;t=function(){return e}}return this.consume(function(e,n,r,i){if(e)r(e),i();else if(n===v)r(e,n);else{var o,s;try{o=t(n)}catch(u){s=u}r(s,o),i()}})},s("map"),o.pr
ototype.doto=function(t){return this.map(function(e){return t(e),e})},s("doto"),o.prototype.ratelimit=function(t,e){if(1>t)throw new Error("Invalid number of operations per ms: "+t);var n=0;return this.consume(function(r,i,o,s){r?(o(r),s()):i===v?o(null,v):t>n?(n++,o(null,i),s()):setTimeout(function(){n=1,o(null,i),s()},e)})},s("ratelimit"),o.prototype.flatMap=function(t){return this.map(t).sequence()},s("flatMap"),o.prototype.pluck=function(t){return this.consume(function(e,n,r,i){e?(r(e),i()):n===v?r(e,n):f.isObject(n)?(r(null,n[t]),i()):(r(new Error("Expected Object, got "+typeof n)),i())})},s("pluck"),o.prototype.pick=function(t){return this.consume(function(e,n,r,i){var o,s={},u=0;if(e)r(e),i();else if(n===v)r(e,n);else if(f.isObject(n)){for(;o=t[u++];)s[o]=n[o];r(null,s),i()}else r(new Error("Expected Object, got "+typeof n)),i()})},s("pick"),o.prototype.filter=function(t){return this.consume(function(e,n,r,i){if(e)r(e),i();else if(n===v)r(e,n);else{var o,s;try{o=t(n)}
catch(u){s=u}s?r(s):o&&r(null,n),i()}})},s("filter"),o.prototype.flatFilter=function(t){function e(){return f(function(t){t(new Error("Stream returned by function was empty.")),t(null,f.nil)})}return this.flatMap(function(n){return t(n).take(1).otherwise(e()).flatMap(function(t){return f(t?[n]:[])})})},s("flatFilter"),o.prototype.reject=function(t){return this.filter(f.compose(f.not,t))},s("reject"),o.prototype.find=function(t){return this.filter(t).take(1)},s("find"),o.prototype.findWhere=function(t){return this.where(t).take(1)},s("findWhere"),o.prototype.group=function(t){var e=f.isString(t)?f.get(t):t;return this.reduce({},function(t,n){var r=e(n);return t.hasOwnProperty(r)||(t[r]=[]),t[r].push(n),t})},s("group"),o.prototype.compact=function(){return this.filter(function(t){return t})},s("compact"),o.prototype.where=function(t){return this.filter(function(e){for(var n in t)if(e[n]!==t[n])return!1;return!0})},s("where"),o.prototype.uniqBy=function(t){var e=[];return this.
consume(function(n,r,i,o){if(n)i(n),o();else if(r===v)i(n,r);else{for(var s,u=!1,a=0,c=e.length;c>a;a++){try{u=t(r,e[a])}catch(l){s=l,u=!0}if(u)break}u||(e.push(r),i(null,r)),s&&i(s),o()}})},s("uniqBy"),o.prototype.uniq=function(){return this.uniqBy(function(t,e){return t===e})},s("uniq"),o.prototype.zipAll=function(t){function e(t,n,o,s,u){o.pull(function(a,c){a?(s(a),e(t,n,o,s,u)):c===f.nil?s(null,v):(r++,i[t]=c,r===n&&(s(null,i),u()))})}var n=this;t=f(t).map(f);var r=0,i=[];return t.collect().flatMap(function(t){return t.unshift(n),f(function(n,o){r=0,i=[];for(var s=0,u=t.length;u>s;s++)e(s,u,t[s],n,o)})})},s("zipAll"),o.prototype.zip=function(t){return this.zipAll([t])},s("zip"),o.prototype.batch=function(t){var e=[];return this.consume(function(n,r,i,o){n?(i(n),o()):r===v?(e.length>0&&i(null,e),i(null,v)):(e.push(r),e.length===t&&(i(null,e),e=[]),o())})},s("batch"),o.prototype.intersperse=function(t){var e=!1;return this.consume(function(n,r,i,o){n?(i(n),o()):r===v?i(nu
ll,v):(e?i(null,t):e=!0,i(null,r),o())})},s("intersperse"),o.prototype.splitBy=function(t){function e(e,i){r=(r||"")+n.write(e);var o=r.split(t);r=o.pop(),o.forEach(function(t){i(null,t)})}var n=new h,r=!1;return this.consume(function(t,i,o,s){t?(o(t),s()):i===v?("string"==typeof r&&(e(n.end(),o),o(null,r)),o(null,v)):(e(i,o),s())})},s("splitBy"),o.prototype.split=function(){return this.splitBy(/\r?\n/)},s("split"),o.prototype.take=function(t){if(0===t)return f([]);var e=this.consume(function(e,n,r,i){e?(r(e),t>0?i():r(null,v)):n===v?r(null,v):(t--,r(null,n),t>0?i():r(null,v))});return e.id="take:"+e.id,e},s("take"),o.prototype.head=function(){return this.take(1)},s("head"),o.prototype.last=function(){var t={},e=t;return this.consume(function(n,r,i,o){n?(i(n),o()):r===v?(e!==t&&i(null,e),i(null,v)):(e=r,o())})},s("last"),o.prototype.through=function(t){if(f.isFunction(t))return t(this);var e=f();return t.pause(),this.pipe(t).pipe(e),e},s("through"),f.pipeline=function(){if(!
arguments.length)return f();var t,e=arguments[0];f.isStream(e)||f.isFunction(e.resume)?(e=f(e),t=p.call(arguments,1)):(e=f(),t=p.call(arguments));var n=t.reduce(function(t,e){return t.through(e)},e),r=f(function(t,e){n.pull(function(t,n){t?(r._send(t),e()):n===v?r._send(null,v):(r._send(null,n),e())})});return r.write=function(t){e.write(t)},r},o.prototype.sequence=function(){function t(){return n===e}var e=this,n=this;return f(function(r,i){n.pull(function(o,s){return o?(r(o),i()):f.isArray(s)?(t()?s.forEach(function(t){r(null,t)}):r(null,s),i()):f.isStream(s)?t()?(n=s,i()):(r(null,s),i()):s!==v?t()?(r(new Error("Expected Stream, got "+typeof s)),i()):(r(null,s),i()):t()?void r(null,v):(n=e,i())})})},s("sequence"),o.prototype.series=o.prototype.sequence,f.series=f.sequence,o.prototype.flatten=function(){var t=this,e=[];return f(function(n,r){t.pull(function(i,o){return i?(n(i),r()):(f.isArray(o)&&(o=f(o)),void(f.isStream(o)?(e.push(t),t=o,r()):o===v?e.length?(t=e.pop(),r())
:n(null,v):(n(null,o),r())))})})},s("flatten"),o.prototype.parallel=function(t){var e=this,n=[],r=!1,i=!1;return f(function(o,s){if(n.length&&n[0].buffer.length)for(var u=n[0].buffer,a=0;a<u.length;a++){if(u[a][1]===v)return n.shift(),s();o.apply(null,u[a])}else n.length<t&&!r&&!i?(i=!0,e.pull(function(t,e){if(i=!1,t)o(t);else if(e===v)r=!0;else{var u={stream:e,buffer:[]};n.push(u),e.consume(function(t,e,r,i){n[0]===u?e===v?(n.shift(),s()):o(t,e):u.buffer.push([t,e]),e!==v&&i()}).resume()}return s()})):!n.length&&r&&o(null,v)})},s("parallel"),o.prototype.otherwise=function(t){var e=this;return e.consume(function(n,r,i,o){n?(i(n),o()):r===v?o(f.isFunction(t)?t():t):(i(null,r),o(e))})},s("otherwise"),o.prototype.append=function(t){return this.consume(function(e,n,r,i){n===v?(r(null,t),r(null,f.nil)):(r(e,n),i())})},s("append"),o.prototype.reduce=function(t,e){return this.consume(function(n,r,i,o){if(r===v)i(null,t),i(null,f.nil);else if(n)i(n),o();else{try{t=e(t,r)}catch(s){re
turn i(s),void i(null,f.nil)}o()}})},s("reduce"),o.prototype.reduce1=function(t){var e=this;return f(function(n,r){e.pull(function(i,o){i?(n(i),r()):o===v?n(null,v):r(e.reduce(o,t))})})},s("reduce1"),o.prototype.collect=function(){var t=[];return this.consume(function(e,n,r,i){e?(r(e),i()):n===v?(r(null,t),r(null,v)):(t.push(n),i())})},s("collect"),o.prototype.scan=function(t,e){var n=this;return f([t]).concat(n.consume(function(n,r,i,o){if(r===v)i(null,f.nil);else if(n)i(n),o();else{try{t=e(t,r)}catch(s){return i(s),void i(null,f.nil)}i(null,t),o()}}))},s("scan"),o.prototype.scan1=function(t){var e=this;return f(function(n,r){e.pull(function(i,o){i?(n(i),r()):o===v?n(null,v):r(e.scan(o,t))})})},s("scan1"),o.prototype.concat=function(t){return t=f(t),this.consume(function(e,n,r,i){n===v?i(t):(r(e,n),i())})},s("concat"),o.prototype.merge=function(){function t(t,e,n){return function(s,a){s?(t(s),o.push(n)):a===v?i=i.filter(function(t){return t!==n}):n===r?(i.push(a),o.push(a),
o.unshift(r)):(t(null,a),o.push(n)),u&&(u=!1,e())}}function e(e,n){var r=o;o=[],r.forEach(function(r){r.pull(t(e,n,r))})}function n(e,n){for(var s,u=!1,a=function(a,c){s=!1,u?t(e,n,r)(a,c):a?e(a):c===v?u=!0:(i.push(c),o.push(c))};!u;)s=!0,r.pull(a),s&&(u=!0,i.unshift(r))}var r=this,i=[],o=[],s=!0,u=!1;return f(function(t,r){s&&(s=!1,n(t,r)),0===i.length?t(null,v):o.length?(e(t,r),r()):u=!0})},s("merge"),o.prototype.invoke=function(t,e){return this.map(function(n){return n[t].apply(n,e)})},s("invoke"),o.prototype.nfcall=function(t){return this.map(function(e){return f.wrapCallback(e).apply(e,t)})},s("nfcall"),o.prototype.throttle=function(t){var e=0-t;return this.consume(function(n,r,i,o){var s=(new Date).getTime();n?(i(n),o()):r===v?i(null,v):s-t>=e?(e=s,i(null,r),o()):o()})},s("throttle"),o.prototype.debounce=function(t){var e=null,n={},r=n;return this.consume(function(i,o,s,u){i?(s(i),u()):o===v?(e&&clearTimeout(e),r!==n&&s(null,r),s(null,v)):(r=o,e&&clearTimeout(e),e=setT
imeout(s.bind(this,null,o),t),u())})},s("debounce"),o.prototype.latest=function(){var t={},e=t,n=[],r=!1,i=null;return this.consume(function(t,o,s,u){if(null!=i){var a=i;i=null,a(t,o)}t?(n.push(t),u()):o===v?r=!0:(e=o,u())}).resume(),f(function(o,s){var u=n;n=[],u.length||e!==t||r?(u.forEach(o),e!==t&&o(null,e),r?o(null,v):s()):i=function(t,e){o(t,e),e!==v&&s()}})},s("latest"),f.values=function(t){return f.keys(t).map(function(e){return t[e]})},f.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return f(e)},f.pairs=function(t){return f.keys(t).map(function(e){return[e,t[e]]})},f.extend=f.curry(function(t,e){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}),f.get=f.curry(function(t,e){return e[t]}),f.set=f.curry(function(t,e,n){return n[t]=e,n}),f.log=function(){console.log.apply(console,arguments)},f.wrapCallback=function(t){return function(){var e=p.call(arguments);return f(function(n){var r=function(t,e){t?n(t):n(null,e),n(null,v)};t.apply(n
ull,e.concat([r]))})}},f.add=f.curry(function(t,e){return t+e}),f.not=function(t){return!t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js",events:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js",string_decoder:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/string_decoder/index.js",util:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/util/util.js"}],"/Users/andersriutta/Sites/kaavio-lkg/lib/annotation-panel/annotation-panel.js":[function(t,e){(function(n){var r=t("insert-css");e.exports=function(){"use strict";function t(t,e){var n=t.$element.select(".annotation").data([e]),r=d3.behavior.drag().on("drag",function(){var t=parseInt(n.style("right"),10),e=parseInt(n.style("top"),10);t-=d3.event.dx,e+=d3.event.dy,n.style("right",t+"px"),n.style("top",e+"px")}),i=n.select(".annotation-header-text").tex
t(function(t){return t.header}),o=i[0][0].getBoundingClientRect().width,s=22;if(o>190)do s-=1,i.style("font-size",s+"px"),o=i[0][0].getBoundingClientRect().width;while(o>190||7>s);var u=(n.select("i.icon-move").on("mousedown",function(){n.call(r)}).on("mouseup",function(){n.on("mousedown.drag",null)}),n.select("i.icon-remove").on("click",function(){n[0][0].style.visibility="hidden"}),n.select(".annotation-description").text(function(t){return t.description}),n.selectAll(".annotation-items-container-list").data(function(t){var e=t.listItems.length;return 2>=e&&0===e&&(t.listItems={key:"clear",values:[{clear:"clear"}]}),[t.listItems]})),a=u.selectAll("li").data(function(t){return t});a.enter().append("li"),a.exit().remove();var c=a.selectAll(".annotation-item-title").data(function(t){return[t.key]}).text(function(t){return t+": "});c.enter().append("span").attr("class","annotation-item-title").text(function(t){return t+": "}),c.exit().remove();var l=a.selectAll("span.annotatio
n-item-text").data(function(t){return t.values.filter(function(t){return t.hasOwnProperty("uri")?void 0:t})}).text(function(t){return" "+t.text});l.enter().append("span").attr("class","annotation-item-text").text(function(t){return" "+t.text}),l.exit().remove();var h=a.selectAll("a.annotation-item-text").data(function(t){return t.values.filter(function(t){return t.hasOwnProperty("uri")?t:void 0})}).attr("class","annotation-item-text").text(function(t){return" "+t.text}).on("click",function(t){window.open(t.uri,"_blank")});h.enter().append("a").attr("class","annotation-item-text").text(function(t){return" "+t.text}).on("click",function(t){window.open(t.uri,"_blank")}),h.exit().remove();var f=n[0][0];f.querySelector(".annotation-items-container-list").classList.remove("ariutta-loading"),f.style.visibility="visible"}var e=[n("LmFubm90YXRpb24gewogIGZvbnQtZmFtaWx5OiAiSGVsdmV0aWNhIE5ldWUiLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7CiAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogIHBvc2l0aW9uOiBhYnNvbHV0ZT
sKICByaWdodDogNzVweDsKICB0b3A6IDEwMHB4OwogIHZlcnRpY2FsLWFsaWduOiB0ZXh0LXRvcDsKICB0ZXh0LWFsaWduOiBjZW50ZXI7CiAgbWFyZ2luOiAwOwogIHpvb206IDE7CiAgLXdlYmtpdC1mb250LXNtb290aGluZzogYW50aWFsaWFzZWQ7CiAgYmFja2dyb3VuZDogI0Y5RjlGOTsKICB3aWR0aDogMjYwcHg7CiAgYm9yZGVyLXJhZGl1czogMTBweDsKICAtd2Via2l0LWJveC1zaGFkb3c6IDAgMXB4IDNweCByZ2JhKDAsIDAsIDAsIDAuMyksaW5zZXQgMCAxcHggMXB4IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC44KTsKICAtbW96LWJveC1zaGFkb3c6IDAgMXB4IDNweCByZ2JhKDAsMCwwLDAuMyksaW5zZXQgMCAxcHggMXB4IHJnYmEoMjU1LDI1NSwyNTUsMC44KTsKICBib3gtc2hhZG93OiAwIDFweCAzcHggcmdiYSgwLCAwLCAwLCAwLjMpLGluc2V0IDAgMXB4IDFweCByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuOCk7CiAgcGFkZGluZzogMTBweCA1cHggMCA1cHg7CiAgdmlzaWJpbGl0eTogaGlkZGVuOwogIHotaW5kZXg6IDk5OTk5OTsKfQoKaGVhZGVyLmFubm90YXRpb24taGVhZGVyIHsKICBmb250LXNpemU6IDIycHg7CiAgZm9udC13ZWlnaHQ6IGJvbGQ7CiAgZm9udC1zdHlsZTogbm9ybWFsOwogIGNvbG9yOiAjMzMzOwogIGxldHRlci1zcGFjaW5nOiAuOHB4OwogIHRleHQtYWxpZ246IGNlbnRlcjsKICBwYWRkaW5nLWJvdHRvbTogMTBweDsKfQoKLmFubm90YXRpb24taGVhZGVyLXNlYXJjaCB
7CiAgdmVydGljYWwtYWxpZ246IDEwJTsKICB0ZXh0LWRlY29yYXRpb246IG5vbmU7IC8qIHR3ZWFrcyBuZWVkZWQgZm9yIHdwICovCiAgLypmb250LXNpemU6IDYwJTsgIHR3ZWFrcyBuZWVkZWQgZm9yIHdwICovCn0KCi5hbm5vdGF0aW9uLWhlYWRlci1zZWFyY2g6aG92ZXIgewogIGN1cnNvcjogcG9pbnRlcjsKfQoKLmFubm90YXRpb24taGVhZGVyLWNsb3NlIHsKICBmbG9hdDogcmlnaHQ7CiAgcGFkZGluZzogMCA1cHggMCAwOwogIGNvbG9yOiNhYWE7Cn0KCi5hbm5vdGF0aW9uLWhlYWRlci1jbG9zZTpob3ZlciB7CiAgY3Vyc29yOiBwb2ludGVyOwp9CgouYW5ub3RhdGlvbi1oZWFkZXItbW92ZSB7CiAgZmxvYXQ6IGxlZnQ7CiAgcGFkZGluZzogMCAwIDAgNXB4OwogIGNvbG9yOiNhYWE7CiAgZm9udC1zaXplOiA4MCU7Cn0KCi5hbm5vdGF0aW9uLWhlYWRlci1tb3ZlOmhvdmVyIHsKICBjdXJzb3I6IG1vdmU7Cn0KCi5hbm5vdGF0aW9uLWRlc2NyaXB0aW9uIHsKICB0ZXh0LWFsaWduOiBjZW50ZXI7CiAgbWFyZ2luOiAwIDAgMCBhdXRvOwogIGZvbnQtc2l6ZTogMTRweDsKICBmb250LXN0eWxlOml0YWxpYzsKfQoKLmFubm90YXRpb24taXRlbXMtY29udGFpbmVyIHsKfQoKLmFubm90YXRpb24taXRlbXMtY29udGFpbmVyIDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogIC13ZWJraXQtYm94LXNoYWRvdzogaW5zZXQgMCAwIDZweCByZ2JhKDAsMCwwLDAuMyk7CiAgYm9yZGVyLXJhZGl1czogMTBw
eDsKfQoKLmFubm90YXRpb24taXRlbXMtY29udGFpbmVyIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogIGJvcmRlci1yYWRpdXM6IDEwcHg7CiAgLXdlYmtpdC1ib3gtc2hhZG93OiBpbnNldCAwIDAgNnB4IHJnYmEoMCwwLDAsMC41KTsKfQoKLmFubm90YXRpb24taXRlbXMtY29udGFpbmVyIDo6LXdlYmtpdC1zY3JvbGxiYXIgewogIHdpZHRoOiAxMnB4Owp9CgouYW5ub3RhdGlvbi1pdGVtcy1jb250YWluZXIgdWwgewogIGxpbmUtaGVpZ2h0OiAxMjAlOwogIGxpc3Qtc3R5bGU6IG5vbmU7CiAgdGV4dC1hbGlnbjogbGVmdDsKICBwYWRkaW5nOiAwIDAgMCAxMHB4OwogIG1hcmdpbjogNXB4IC01cHggMTBweCAtNXB4OwogIG1heC1oZWlnaHQ6IDMwMHB4OwogIG1pbi1oZWlnaHQ6IDMwcHg7CiAgb3ZlcmZsb3cteTogYXV0bzsKICBvdmVyZmxvdy14OiBoaWRkZW47Cn0KCi5hbm5vdGF0aW9uLWl0ZW0gbGkgewogIHBhZGRpbmc6IDBweDsKICBkaXNwbGF5OiBibG9jazsKICBtYXJnaW46IDAgYXV0byAwIGF1dG87Cn0KCi5hbm5vdGF0aW9uLWRlc2NyaXB0aW9uIGgyIHsKICBmb250LXdlaWdodDogbm9ybWFsOwogIGZvbnQtdmFyaWFudDogbm9ybWFsOwogIGZvbnQtc3R5bGU6IGl0YWxpYzsKICBsaW5lLWhlaWdodDogMS41OwogIGZvbnQtc2l6ZTogMTRweDsKICBjb2xvcjogIzY5Njk2OTsKICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgcGFkZGluZy1ib3R0b206IDEwcHg7CiAgbWFyZ2luLXRvc
DogMHB4OwogIG1hcmdpbi1ib3R0b206IDVweDsKICBib3JkZXItYm90dG9tOiAwcHg7CiAgem9vbTogMTsKfQoKLmFubm90YXRpb24taXRlbS10aXRsZSB7CiAgcGFkZGluZzogMHB4OwogIGZvbnQtc2l6ZTogMTBwdDsKICBkaXNwbGF5OiBpbmxpbmU7CiAgbWFyZ2luOiAwIGF1dG8gMCBhdXRvOwogIGNvbG9yOiAjNjk2OTY5OwogIGZvbnQtd2VpZ2h0OiBib2xkOwp9CgouYW5ub3RhdGlvbi1pdGVtLXRleHQgewogIHBhZGRpbmc6IDBweDsKICBkaXNwbGF5OiBpbmxpbmU7CiAgbWFyZ2luOiAwIDVweCAwIGF1dG87CiAgZm9udC1zaXplOiA5cHQ7CiAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwp9CgphLmFubm90YXRpb24taXRlbS10ZXh0IHsKICBjb2xvcjogYmx1ZTsKfQoKLmFubm90YXRpb24taXRlbS10ZXh0OmhvdmVyIHsKICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsKICBjdXJzb3I6IHBvaW50ZXI7Cn0KCi50b29sdGlwIHsKICBmb250LXNpemU6IDhwdDsKfQo=","base64")];return e.map(r),{render:t}}()}).call(this,t("buffer").Buffer)},{buffer:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js","insert-css":"/Users/andersriutta/Sites/kaavio-lkg/node_modules/insert-css/index.js"}],"/Users/andersriutta/Sites/kaavio-lkg/node_modules/insert-css/index.js":[function(t,e,n){
arguments[4]["/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/insert-css/index.js"][0].apply(n,arguments)},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/index.js"][0].apply(n,arguments)},{"./lib/main.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/main.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/main.js":[function(t,e){(function(n){var r=(t("lodash"),t("insert-css")),i=t("./editor-tabs-component/editor-tabs-component.js"),o=(t("./editor-utils.js"),t("jsonld-rx")),s=(t("rx"),t("rx-node"),[n("LyogbG9jYXRlZCBvbiB0b3Agb2YgdGhlIGRpYWdyYW0sIGluIHBsYWNlIG9mIHRoZSBlZGl0b3IgKi8KLmVkaXRvci1vcGVuLWNvbnRyb2wgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICB6LWluZGV4OiAzOyAvKiBwdXQgLmVkaXQtdHJpZ2dlciBhYm92ZSBkaWFncmFtLWNvbnRhaW5lciAqLwogIGJvdHRvbTogMHB4OwogIC8qIGxlZnQ6IDBweDsgVE9ETyBtYXkgbmVlZCB0byByZS1lbmFibGUgdGhpcyBvbmNlIHdlIHVzZSBmbGV4Ym94ICovCiAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogIG1hcmdpbjo
gMCBhdXRvOwogIGN1cnNvcjogcG9pbnRlcjsKICBjb2xvcjogd2hpdGUgIWltcG9ydGFudDsKICBib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMHB4OwogIGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDBweDsKICBib3JkZXItYm90dG9tOiBub25lOwp9CgovKiBoaWRlIGl0IHdoZW4gdGhlIGVkaXRvciBpcyBvcGVuICovCi5lZGl0b3Itb3Blbi1jb250cm9sLmVkaXRvci1vcGVuIHsKICB2aXNpYmlsaXR5OiAnaGlkZGVuJzsKfQoKLmthYXZpby1lZGl0b3IgewogIC8qIGN1cnJlbnRseSBoYW5kbGVkIGJ5IHRoZSBkZWZhdWx0IHN0eWxpbmcgZm9yIHRoZSBrYWF2aW8gZm9vdGVyICovCn0KCi5rYWF2aW8tZWRpdG9yLXRvcC1yb3cgewogIHdpZHRoOiAxMDAlOwogIGhlaWdodDogMzZweDsKICBtYXJnaW46IDBweDsKICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwp9Cgoua2FhdmlvLWVkaXRvci10YWJzIHsKICBtYXgtd2lkdGg6IGNhbGMoMTAwJSAtIDE1MHB4KTsKICBmbG9hdDogbGVmdDsKICBtYXJnaW4tdG9wOiAwcHg7Cn0KCi8qIGxvY2F0ZWQgaW5zaWRlIHRoZSBlZGl0b3IgKi8KLmthYXZpby1lZGl0b3ItY2xvc2UtY29udHJvbCB7CiAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogIG1hcmdpbi10b3A6IDRweDsKICBtYXJnaW4tcmlnaHQ6IDdweDsKICBmbG9hdDogcmlnaHQ7CiAgcGFkZGluZy10b3A6IDlweDsKICBib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMHB4OwogIGJvcmRlci1i
b3R0b20tbGVmdC1yYWRpdXM6IDBweDsKICBib3JkZXItYm90dG9tOiBub25lOwp9Cg==","base64")]);s.map(r);var u={};u.vm=function(){{var t={};new o}return u.save=function(){return t.sourceData.pvjson},t.init=function(e){e.annotationPanel.vm.disabled(!0);var n=e.jsonldRx;u.trigger=e.trigger.bind(e),e.sourceData.pvjsonPreUpdateAsString=JSON.stringify(e.sourceData.pvjson),t.sourceData=e.sourceData,t.state=e.kaavioComponent.vm.state.footer,t.onunload=function(){t.close()},t.open=function(){t.state("open"),e.on("rendered",function(){})},t.close=function(){e.annotationPanel.vm.disabled(!1),i.vm.hasDataChanged()&&u.save(),u.vm.state("closed"),u.panZoom&&e.panZoom.resizeDiagram()},t.disabled=t.closed;var r=e.diagramComponent.vm.selectionHierarchy,o=t.pvjsElementHierarchy=n.hierarchicalPartition(r.mainSource,function(t){return t.id},r.resetSource);t.pvjsElementSource=o.mainSource,t.resetSource=o.resetSource,t.pvjsElementSource.subscribe(function(){}),t.resetSource.subscribe(function(){t.reset()})},t
.reset=function(){i.vm.pvjsElement=null},t}(),u.controller=function(t){u.vm.init(t)},u.view=function(t,e){u.vm;return"open"===u.vm.state()?m("div",{},[m.component(i,e)]):void 0},e.exports=u}).call(this,t("buffer").Buffer)},{"./editor-tabs-component/editor-tabs-component.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/editor-tabs-component.js","./editor-utils.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-utils.js",buffer:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js","insert-css":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/insert-css/index.js","jsonld-rx":"/Users/andersriutta/Sites/jsonld-rx-old/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js","rx-node":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_mod
ules/insert-css/index.js":[function(t,e){var n={};e.exports=function(t,e){if(!n[t]){n[t]=!0;var r=document.createElement("style");r.setAttribute("type","text/css"),"textContent"in r?r.textContent=t:r.styleSheet.cssText=t;var i=document.getElementsByTagName("head")[0];e&&e.prepend?i.insertBefore(r,i.childNodes[0]):i.appendChild(r)}}},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/editor-tabs-component.js":[function(t,e){var n=t("lodash"),r=t("./tabs/annotation-tab/annotation-tab"),i=t("./tabs/properties-tab/properties-tab"),o=window.m,s={};s.vm=function(){var t={};return t.init=function(e){e.jsonldRx;e.editor.editorTabsComponent=s,t.state=e.kaavioComponent.vm.state,t.close=e.editor.vm.close;var n=t.pvjsElementHierarchy=e.editor.vm.pvjsElementHierarchy;t.pvjsElementSource=n.mainSource,t.resetSource=n.resetSource,t.hasDataChanged=function(){if(!e.sourceData||!e.sourceData.pvjsonPreUpdateAsString)return!1;var t=JSON.stringify(e.sourceData.pvjson),n=t!
==e.sourceData.pvjsonPreUpdateAsString;return n},t.pvjsElementSource.subscribe(function(e){t.pvjsElement=e},function(t){console.log(t)},function(){}),t.reset=function(){},t.resetSource.subscribe(function(){t.reset()},function(t){console.log(t)},function(){}),s.Tab=function(t){this.title=o.prop(t.title),this.component=t.component},s.TabList=o.prop([{title:"Annotation",component:r},{title:"Properties",component:i}].map(function(t){return new s.Tab(t)})),t.changeStateToBtnStyle={"true":"btn-success","false":"btn-close"},t.changeStateToGlyphicon={"true":'span.glyphicon.glyphicon-ok[aria-hidden="true"]',"false":'span.glyphicon.glyphicon-chevron-down[aria-hidden="true"]'},t.changeStateToBtnText={"true":" Save & Close","false":" Close"},t.open=function(){},t.tabList=new s.TabList,t.currentTab=o.prop(t.tabList[0])},t.changeTab=function(e){t.currentTab(n.find(t.tabList,function(t){return t.title()===e}))},t}(),s.controller=function(t){s.vm.init(t)},s.view=function(t,e){var n=s.vm,r=n
.hasDataChanged();return o("div",{"class":"kaavio-editor"},[o("div",{"class":"kaavio-editor-top-row"},[o("ul.nav.nav-tabs",{"class":"kaavio-editor-tabs"},[n.tabList.map(function(t){var e=t.title()===n.currentTab().title()?".active":"";return o("li"+e+'[role="presentation"]',{},[o('a[style="cursor: pointer"]',{onchange:o.withAttr("value",t.title),onclick:o.withAttr("value",n.changeTab),value:t.title()},t.title())])})]),o("span",{"class":"kaavio-editor-close-control btn "+n.changeStateToBtnStyle[r],onclick:function(){n.state.footer("closed"),n.close()},title:r?"Save and Close":"Close"},[o(n.changeStateToGlyphicon[r]),n.changeStateToBtnText[r]])]),o.component(n.currentTab().component,e)])},e.exports=s},{"./tabs/annotation-tab/annotation-tab":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/annotation-tab.js","./tabs/properties-tab/properties-tab":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/properties-tab/
properties-tab.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/properties-tab/properties-tab.js":[function(t,e){var n=(window._=t("lodash"),t("../../../sub-components/color-picker-control")),r=(t("highland"),window.m),i=(t("../../../mithril-utils"),t("rx"),{});i.Item=function(t){this.id=r.prop(t.id),this.name=r.prop(t.name)},i.vm=function(){var t={};return t.fontStyleToButtonStyleMappings={italic:"background-color: lightgray; ",normal:""},t.fontWeightToButtonStyleMappings={bold:"background-color: lightgray; ",normal:""},t.init=function(e){var n=e.jsonldRx,i=e.editor.editorTabsComponent;t.containerElement=e.containerElement,t.disabled=r.prop(!0),t.color=r.prop("#000000"),t.fontStyle=r.prop("normal"),t.fontWeight=r.prop("normal"),t.cancel=function(){e.editor.cancel()},t.reset=function(){t.disabled(!0),t.color("#000000"),t.fontStyle("normal"),t.fontWeight("normal"
)};var o=i.vm.pvjsElementHierarchy,s=t.pvjsElementHierarchy=n.hierarchicalPartition(o.mainSource,function(t){return"gpml:DataNode"===t["gpml:element"]},o.resetSource);t.pvjsElementSource=s.mainSource,t.resetSource=s.resetSource,t.pvjsElementSource.subscribe(function(n){var o=i.vm.hasDataChanged();n.color=n.color||"#000000",t.color(n.color),n.fontWeight=n.fontWeight?n.fontWeight:"normal",t.fontWeight(n.fontWeight),n.fontStyle=n.fontStyle?n.fontStyle:"normal",t.fontStyle(n.fontStyle),o||(e.sourceData.pvjsonPreUpdateAsString=JSON.stringify(e.sourceData.pvjson)),t.pvjsElement=n,t.disabled(!1),r.redraw()}),t.resetSource.subscribe(function(){t.reset()}),e.diagramComponent.vm.selectionHierarchy.loopback(),t.onunload=function(){}},t}(),i.controller=function(t){i.vm.init(t)},i.view=function(){var t=i,e=t.vm;if(e){var o=e.pvjsElement||{},s=o.id,u=e.containerElement,a=e.disabled();return r("nav.kaavio-editor-properties.navbar.navbar-default.navbar-form.well.well-sm",[r("div.form-group.
navbar-left",[r("div.input-group.input-group-sm.form-control",{},[r.component(n,{color:e.color,disabled:e.disabled,onchange:function(t){e.color(t),o.color=t,u.querySelector("#"+s).style.stroke=t;var n=u.querySelector("#text-for-"+s);n&&(n.style.fill=t)}})])]),r("div.form-group.navbar-left",[r("button.btn.btn-sm.btn-default",{style:a?"pointer-events: none; ":null,onclick:function(){e.fontWeight("normal"===e.fontWeight()?"bold":"normal");var t=o.fontWeight=e.fontWeight(),n=u.querySelector("#text-for-"+s);n&&(n.style.fontWeight=t)}},[r("span.glyphicon.icon-bold.form-control",{style:a?null:e.fontWeightToButtonStyleMappings[e.pvjsElement.fontWeight]})]),r("button.btn.btn-sm.btn-default",{style:a?"pointer-events: none; ":null,onclick:function(){e.fontStyle("normal"===e.fontStyle()?"italic":"normal");var t=o.fontStyle=e.fontStyle(),n=u.querySelector("#text-for-"+s);n&&(n.style.fontStyle=t)}},[r("span.glyphicon.icon-italic.form-control",{style:a?null:e.fontStyleToButtonStyleMappings
[e.pvjsElement.fontStyle]})])])])}},e.exports=i},{"../../../mithril-utils":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/mithril-utils.js","../../../sub-components/color-picker-control":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/color-picker-control.js",highland:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/highland/lib/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/color-picker-control.js":[function(t,e){var n=t("lodash"),r={};r.config=function(){return function(t,e){var i=$(t);if(!Modernizr.inputtypes.color&&!e){var o=n.chunk(r.vm.defaultColors,3);window.setTimeout(function(){i.spectrum({preferredFormat:"hex",showPalette:!0,palette:o}),window.m.redraw()},250)}}},r.vm=function(){var t={};return t.defaultColors=["#000000","#0000ff","#990099","#14961e"]
,t.init=function(e){t.disabled=e.disabled,t.color=e.color,t.reset=function(){t.color("")}},t}(),r.controller=function(t){r.vm.init(t)},r.view=function(t,e){var n=r.vm;return window.m("div",{},[window.m("datalist",{id:"color-palette"},n.defaultColors.map(function(t){return m("option",{},t)})),window.m("input",{config:r.config(t,e),list:"color-palette",onchange:window.m.withAttr("value",function(t){e.color(t),e.onchange(t)}),style:"width: 50px; height: 18px; margin-top: 7px;",type:"color",value:e.color(),disabled:e.disabled()})])},e.exports=r},{lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/annotation-tab.js":[function(t,e){var n=t("lodash"),r=t("../../../sub-components/bridge-db-id-control/bridge-db-id-control.js"),i=t("../../../sub-components/entity-type-control.js"),o=t("./xref-search"),s=window.m,u=t("rx"),a={};a.vm=function(){var t={};return t.in
it=function(e){var r=e.jsonldRx;t.organism=e.sourceData.pvjson.organism;var i=e.editor.editorTabsComponent,c=t.typeMappingsEntityReferenceToEntity={"biopax:Complex":"biopax:Complex","gpml:GeneProduct":"gpml:GeneProduct","biopax:SmallMoleculeReference":"gpml:Metabolite","biopax:Pathway":"biopax:Pathway","biopax:ProteinReference":"biopax:Protein","biopax:RnaReference":"biopax:Rna","gpml:Unknown":"gpml:Unknown"},l=t.typeMappingsEntityToEntityReference=n.invert(c),h=n.keys(l);
-t.containerElement=e.containerElement,t.disabled=s.prop(!0);a.xrefSearch=new o;t.cancel=function(){t.reset(),e.editor.cancel()},t.pvjsElement={},t.entityReference=s.prop({});var f=i.vm.pvjsElementHierarchy,p=t.pvjsElementHierarchy=r.hierarchicalPartition(f.mainSource,function(t){var e=n.isArray(t.type)?t.type:[t.type],r=!n.isEmpty(n.intersection(e,h));return r},f.resetSource);t.pvjsElementSource=p.mainSource,t.resetSource=p.resetSource;var d=t.bridgeDbIdControlChangeOrInputSource=new u.Subject;d.subscribe(function(e){t.entityReference=e});var v=d.flatMap(function(t){var e=u.Observable.fromEvent(document.body,"click");return u.Observable.merge(u.Observable.return(t),e).first()}).debounce(500);u.Observable.merge(t.pvjsElementSource,t.resetSource,v).subscribe(function(){var e=t.pvjsElement;if(!n.isEmpty(e)){var r=t.entityReference;n.isEmpty(r)||e.getSetEntityReference(r).then(function(e){t.entityReference&&t.entityReference.id===e.id&&(t.entityReference=e),s.redraw()})}}),t.cle
arControls=function(){t.pvjsElement={},t.entityReference={}},t.reset=function(){t.disabled(!0),t.clearControls()},t.pvjsElementSource.flatMap(function(t){var e;return e=t.entityReference?u.Observable.fromPromise(t.getSetEntityReference()):u.Observable.return({isDataItemIn:{}}),u.Observable.zipArray(u.Observable.return(t),e)}).subscribe(function(e){var r=e[0],i=n.clone(e[1]);t.clearControls(),t.disabled(!1),t.entityReference=i;r.entityReference;r.textContent=r.textContent||i.displayName,t.pvjsElement=r,s.redraw()},function(t){throw t}),t.resetSource.subscribe(function(){t.reset(),s.redraw()},function(t){console.error(t)},function(){}),e.diagramComponent.vm.selectionHierarchy.loopback(),t.updateTextContent=function(e,n){e.textContent=n;var r="#text-for-"+e.id,i=t.containerElement.querySelector(r);if(!i){var o=t.containerElement.querySelector(".viewport");i=document.createElementNS("http://www.w3.org/2000/svg","g"),i.setAttribute("id",r);var s=document.createElementNS("http://w
ww.w3.org/2000/svg","text");o.appendChild(i),i.appendChild(s),i.setAttribute("transform","translate("+e.x+" "+(e.y+14)+")")}i.querySelector("text").textContent=n},t.onunload=function(){}},t}(),a.controller=function(t){a.vm.init(t)},a.view=function(t,e){var n=a.vm;return s("nav.kaavio-editor-annotation.navbar.navbar-default.navbar-form.well.well-sm",[s("div.navbar-left",[s.component(a.xrefSearch,{disabled:n.disabled,onchange:function(t){n.entityReference=t;var e=n.pvjsElement;e.textContent=void 0,e.type=void 0,e.getSetEntityReference(t).then(function(t){n.entityReference&&n.entityReference.id===t.id&&(n.entityReference=t),e.textContent&&n.updateTextContent(e,e.textContent),s.redraw()},function(t){throw t})},organism:n.organism,trigger:e.trigger.bind(e)})]),s("div.form-group.navbar-left",[s("div",{"class":"form-control",style:{"min-width":"580px",height:"44px"}},[s.component(i,{disabled:n.disabled,entityTypeId:n.pvjsElement.type||"",onchange:function(t){{var e=n.pvjsElement;e.
type}e.type=t,e["gpml:Type"]&&(e["gpml:Type"]=t.replace("biopax","gpml"));var r=n.entityReference,i=n.typeMappingsEntityToEntityReference[t];r.type=[i],r.isDataItemIn.subject=[i],n.entityReference=r,console.log(n.entityReference)}}),s.component(r,{disabled:n.disabled,entityReference:n.entityReference,oninput:function(t){n.bridgeDbIdControlChangeOrInputSource.onNext(t)},onchange:function(t){n.bridgeDbIdControlChangeOrInputSource.onNext(t)},style:{clear:"both",display:"inline-block"}}),s("input",{"class":"form-control input input-sm",oninput:s.withAttr("value",n.updateTextContent.bind(null,n.pvjsElement)),placeholder:"Display name",value:n.pvjsElement.textContent||"",disabled:n.disabled()})])])])},e.exports=a},{"../../../sub-components/bridge-db-id-control/bridge-db-id-control.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/bridge-db-id-control.js","../../../sub-components/entity-type-control.js":"/Users/andersriutta/Sites/kaavio-editor
-lkg/lib/sub-components/entity-type-control.js","./xref-search":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/xref-search.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/entity-type-control.js":[function(t,e){var n=t("lodash"),r=(t("rx"),{});r.vm=function(){var t={},e=t.entityTypes=[{id:"biopax:Complex",name:"Complex"},{id:"gpml:GeneProduct",name:"Gene Product"},{id:"gpml:Metabolite",name:"Metabolite"},{id:"biopax:Pathway",name:"Pathway"},{id:"biopax:Protein",name:"Protein"},{id:"biopax:Rna",name:"RNA"},{id:"gpml:Unknown",name:"Unknown"}],n={id:"",name:"Select type"};return t.init=function(){t.entityTypeSelectionList=window.m.prop([n].concat(e).map(function(t){return t}))},t}(),r.controller=function(t){r.vm.init(t)},r.view=function(t,e){{var i=r.vm;e
.entityTypeId}return window.m("select.form-control.input.input-sm",{onchange:window.m.withAttr("value",function(t){e.entityTypeId=t,e.onchange&&e.onchange(t)}),value:e.entityTypeId,disabled:e.disabled()},[i.entityTypeSelectionList().map(function(t){return window.m("option",{key:t.id,value:t.id,selected:t.id===e.entityTypeId,disabled:n.isEmpty(t.id)},t.name)})])},e.exports=r},{lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/bridge-db-id-control.js":[function(t,e){var n=(t("lodash"),t("./dataset-control.js")),r=t("jsonld-rx"),i=t("uuid"),o={};o.vm=function(){var t=(new r,{});return t.init=function(){t.onunload=function(){}},t}(),o.controller=function(t){o.vm.init(t)},o.view=function(t,e){o.vm;e.entityReference.isDataItemIn=e.entityReference.isDataItemIn||{id:""};var r=e.entityRef
erence.isDataItemIn,s=r.id,u=e.entityReference.identifier;return window.m("div",{style:e.style},[window.m.component(n,{disabled:e.disabled,dataset:r,entityReferenceType:e.entityReference.type,onchange:function(t){var n=e.entityReference;n.isDataItemIn=t,s=t.id,s&&u?n.id=s+u:(n.id=i.v1(),!t.exampleIdentifier&&u&&(n.isDataItemIn.exampleIdentifier=u)),delete n.db,delete n.bridgeDbDatasourceName,delete n["owl:sameAs"],delete n.xref,e.entityReference=n,e.onchange&&e.onchange(n)}}),window.m("input",{"class":"pvjs-editor-identifier form-control input input-sm",placeholder:"Identifier",oninput:window.m.withAttr("value",function(t){var n=e.entityReference;n.identifier=t,s&&t?n.id=s+t:(n.id=i.v1(),!s&&t&&(n.isDataItemIn.exampleIdentifier=t)),delete n["owl:sameAs"],delete n.xref,e.entityReference=n,e.oninput&&e.oninput(n)}),value:e.entityReference.identifier||"",disabled:e.disabled()})])},e.exports=o},{"./dataset-control.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-componen
ts/bridge-db-id-control/dataset-control.js","jsonld-rx":"/Users/andersriutta/Sites/jsonld-rx-old/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",uuid:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/uuid.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/uuid.js":[function(t,e){function n(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>i&&(e[r+i++]=a[t])});16>i;)e[r+i++]=0;return e}function r(t,e){var n=e||0,r=u;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function i(t,e,n){var i=e&&n||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:f,u=void 0!==t.msecs?t.msecs:(new Date).getTime(),a=void 0!==t.nsecs?t.nsecs:d+1,c=u-p+(a-d)/1e4;if(0>c&&void 0===t.clockseq&&(s=s+1&16383),(0>c||u>p)&&void 0===t.nsecs&&(a=0),a>=1e4)thr
ow new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=a,f=s,u+=122192928e5;var l=(1e4*(268435455&u)+a)%4294967296;o[i++]=l>>>24&255,o[i++]=l>>>16&255,o[i++]=l>>>8&255,o[i++]=255&l;var v=u/4294967296*1e4&268435455;o[i++]=v>>>8&255,o[i++]=255&v,o[i++]=v>>>24&15|16,o[i++]=v>>>16&255,o[i++]=s>>>8|128,o[i++]=255&s;for(var m=t.node||h,g=0;6>g;g++)o[i+g]=m[g];return e?e:r(o)}function o(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var u=0;16>u;u++)e[i+u]=o[u];return e||r(o)}for(var s=t("./rng"),u=[],a={},c=0;256>c;c++)u[c]=(c+256).toString(16).substr(1),a[u[c]]=c;var l=s(),h=[1|l[0],l[1],l[2],l[3],l[4],l[5]],f=16383&(l[6]<<8|l[7]),p=0,d=0,v=o;v.v1=i,v.v4=o,v.parse=n,v.unparse=r,e.exports=v},{"./rng":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/rng-browser.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/rng-browser
.js":[function(t,e){(function(t){var n;if(t.crypto&&crypto.getRandomValues){var r=new Uint8Array(16);n=function(){return crypto.getRandomValues(r),r}}if(!n){var i=new Array(16);n=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/dataset-control.js":[function(t,e){var n=t("lodash"),r=t("bridgedb"),i=(t("../../editor-utils.js"),t("jsonld-rx")),o=(t("rx"),t("rx-node")),s={},u=new i;s.vm=function(){var t={},e=new r({organism:"Homo sapiens"}),i=o.fromReadableStream(e.dataset.query()).map(function(t){return t.subject=u.arrayifyClean(t.subject),t}).filter(function(t){var e=["interaction","ontology","probe","experiment","publication","model","organism"];return t._isPrimary&&!!t.id&&-1===e.indexOf(t._bridgeDbType)}
).toArray().toPromise();return t.init=function(){var e={id:"",name:"Select datasource"};t.dataset=e,t.datasetList=window.m.prop([e]),i.then(function(r){var i=n.find(r,function(t){return t.id===e.id&&t.name===e.name});i||r.unshift(e),t.datasetList(r),window.m.redraw()},function(t){throw t})},t}(),s.controller=function(t){s.vm.init(t)},s.view=function(t,e){{var r=s.vm,i=u.arrayifyClean(e.entityReferenceType),o=e.dataset||{},a=i,c=o.id;o.preferredPrefix}return window.m("select",{"class":"pvjs-editor-dataset form-control input input-sm",onchange:window.m.withAttr("value",function(t){var i=n.find(r.datasetList(),function(e){return e.id===t});e.onchange&&e.onchange(i)}),disabled:e.disabled(),style:"max-width: 135px; ",required:!0},[r.datasetList().filter(function(t){var e=t.subject;return e=u.arrayifyClean(e),n.isEmpty(a)||n.isEmpty(e)||t.id===o.id||a.indexOf("gpml:Unknown")>-1||a.indexOf("biopax:Complex")>-1?!0:a.indexOf("biopax:Pathway")>-1&&e.indexOf("biopax:Pathway")>-1?!0:a.i
ndexOf("biopax:SmallMoleculeReference")>-1&&e.indexOf("biopax:SmallMoleculeReference")>-1?!0:(a.indexOf("biopax:RnaReference")>-1||a.indexOf("gpml:GeneProduct")>-1)&&(e.indexOf("biopax:RnaReference")>-1||e.indexOf("gpml:GeneProduct")>-1)?!0:(a.indexOf("gpml:GeneProduct")>-1||a.indexOf("biopax:ProteinReference")>-1)&&(e.indexOf("biopax:ProteinReference")>-1||e.indexOf("gpml:GeneProduct")>-1)?!0:!1}).map(function(t){return window.m("option",{key:t.id,value:t.id,selected:t.id===c},t.name)})])},e.exports=s},{"../../editor-utils.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-utils.js",bridgedb:"/Users/andersriutta/Sites/bridgedbjs-lkg/index.js","jsonld-rx":"/Users/andersriutta/Sites/jsonld-rx-old/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js","rx-node":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js"}],"/Users/andersr
iutta/Sites/kaavio-editor-lkg/lib/editor-utils.js":[function(t,e){function n(t,e){var n=r.clone(t);n.displayName=e.textContent||n.displayName,n.id=n.id||n["@id"];var i,o=[{"@id":"http://example.org/",name:"Type"},{"@id":"gpml:GeneProduct",name:"Gene Product"},{"@id":"gpml:Metabolite",name:"Metabolite"},{"@id":"biopax:Pathway",name:"Pathway"},{"@id":"biopax:ProteinReference",name:"Protein"},{"@id":"gpml:Unknown",name:"Unknown"}];if(n.type){var s=n.type,u={DnaReference:"gpml:GeneProduct",ProteinReference:"biopax:ProteinReference",SmallMoleculeReference:"gpml:Metabolite",PhysicalEntity:"gpml:Unknown",Pathway:"biopax:Pathway"};i=u[s]}else{var a=o.map(function(t){return t["@id"]});i=r.intersection(a,n["@type"])[0]}n.type=i;var c=n.isDataItemIn;return c.id=c.id||c["@id"],n}var r=t("lodash"),i={biopax:{"@id":"http://www.biopax.org/release/biopax-level3.owl#","@type":"@id"},entityReference:{"@id":"biopax:entityReference","@type":"@id"},bridgedb:{"@id":"http://www.example.org/bridged
b/input-vocab/","@type":"@vocab"},color:"http://www.w3.org/TR/CSS2/colors.html#propdef-color",db:{"@id":"biopax:db","@type":"xsd:string"},dcterms:{"@id":"http://purl.org/dc/terms/","@type":"@id"},displayName:{"@id":"biopax:displayName","@type":"xsd:string"},fontFamily:"http://www.w3.org/TR/CSS2/fonts.html#font-family-prop",fontSize:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size",fontStyle:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-style",fontWeight:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight",gpml:{"@id":"http://vocabularies.wikipathways.org/gpml#","@type":"@id"},id:"@id",identifier:{"@id":"http://rdaregistry.info/Elements/u/P60052","@type":"@id"},idot:{"@id":"http://identifiers.org/idot/","@type":"@vocab"},isDataItemIn:{"@id":"http://semanticscience.org/resource/SIO_001278","@type":"@id"},name:{"@id":"schema:name","@type":"@id"},prefLabel:{"@id":"skos:prefLabel","@type":"@id"},preferredPrefix:{"@id":"idot:preferredPrefix","@type":"xsd:string"}
,schema:{"@id":"http://schema.org/","@type":"@vocab"},skos:{"@id":"http://www.w3.org/2004/02/skos/core#","@type":"@id"},subject:{"@id":"dcterms:subject","@type":"@id"},type:"@type",xref:{"@id":"biopax:xref","@type":"@id"},xsd:{"@id":"http://www.w3.org/2001/XMLSchema#","@type":"@id"}};e.exports={context:i,createAnnotationEntity:n}},{lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/xref-search.js":[function(t,e){var n=t("lodash"),r=t("bridgedb"),i=t("levenshtein"),o=window.m,s=(t("../../../mithril-utils"),t("mithril-simple-modal")),u=(t("rx"),t("rx-node"));e.exports=function(){var t={};return t.vm=function(){var e={};return e.changeStateToGlyphiconMappings={"true":"btn-success","false":"btn-default"},e.init=function(s){t.trigger=s.trigger;var a=new r({baseIri:"http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php/",datasetsMetadataIri:"http://pointer.u
csf.edu/d3/r/data-sources/bridgedb-datasources.php",organism:s.organism});e.showEntityReferences=o.prop(!1),e.query=o.prop(""),e.modalStatus=function(){if(e.showEntityReferences()){var t=e.xrefs;return t&&t.length>0?"open":"loading"}return"closed"},e.saveAndClose=function(t){var r=n.find(e.xrefs,function(e){return e.id===t});s.onchange(r),e.reset(),o.redraw()},e.search=function(n){{var r=n.toLowerCase();n.length,u.fromReadableStream(a.entityReference.freeSearch({attribute:n})).timeout(45e3).filter(function(t){return t.isDataItemIn._isPrimary}).groupBy(function(t){return t.isDataItemIn.preferredPrefix}).flatMap(function(t){return t.toArray().map(function(t){return t.sort(function(t,e){var n=t.displayName,o=n.toLowerCase(),s=e.displayName,u=s.toLowerCase();if(o===r)return-1;if(u===r)return 1;var a=r.replace(/[^a-zA-Z]/g,""),c=a.length;if(c>=2){var l=o.replace(/[^a-zA-Z]/g,""),h=u.replace(/[^a-zA-Z]/g,""),f=l.substr(0,c)===a,p=h.substr(0,c)===a;if(f&&!p)return-1;if(!f&&p)return
1;var d=l[0]===a[0],v=h[0]===a[0];if(d&&!v)return-1;if(!d&&v)return 1;if(d&&v){var m=new i(a,l),g=new i(a,h),b=m.distance,y=g.distance;if(b!==y)return b>y}}return n>s})})}).toArray().map(function(t){return t.sort(function(t,e){var n=t[0].isDataItemIn.preferredPrefix,r=e[0].isDataItemIn.preferredPrefix;return"ensembl"===n?-1:"ensembl"===r?1:"ncbigene"===n?-1:"ncbigene"===r?1:n>r}).reduce(function(t,e){return t.concat(e)},[])}).subscribe(function(t){e.xrefs=t,o.redraw()},function(n){console.error("Error getting xrefs"),console.error(n),e.reset(),o.redraw();var r=n.message?n.message:n.toString();t.trigger("error."+r,{message:r})},function(){})}},e.reset=function(){e.query(""),e.xrefs=null,e.showEntityReferences(!1)}},e}(),t.controller=function(e){t.vm.init(e)},t.view=function(e,r){var i=t.vm;return o("div.form-search.form-group",[o("div.input-group.input-group-sm.form-control",[o("input",{id:"xref-search-input","class":"form-control",placeholder:"Search by name",onchange:o.wit
hAttr("value",i.query),type:"text",value:i.query(),disabled:r.disabled()}),o("span.input-group-btn",{onclick:function(){var t=i.query();n.isEmpty(t)||(i.showEntityReferences(!0),i.search(t))},style:r.disabled()?"pointer-events: none; ":null},o('button[type="submit"]',{"class":"btn "+i.changeStateToGlyphiconMappings[!r.disabled()]},[o('span[aria-hidden="true"].glyphicon.glyphicon-search')])),function(){var t,e=i.xrefs;return e&&i.showEntityReferences()&&(t=e.length>0?o("table.table.table-hover.table-bordered",[o("thead",[o("tr",{},[o("th",{},"Name"),o("th",{},"Datasource"),o("th",{},"Identifier")])]),o("tbody",{},[e.map(function(t){return o('tr[style="cursor: pointer;"]',{id:t.id,onclick:o.withAttr("id",i.saveAndClose)},[o("td",{},t.displayName),o("td",{},t.db),o("td",{},t.identifier)])})])]):o("div",{},"No results found.")),o.component(s,{content:t,buttons:[{text:"Cancel",closeOnClick:!0,callback:function(){i.xrefs=null,i.showEntityReferences(!1),o.redraw()}}],onchange:funct
ion(){},status:i.modalStatus()})}()])])},t}},{"../../../mithril-utils":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/mithril-utils.js",bridgedb:"/Users/andersriutta/Sites/bridgedbjs-lkg/index.js",levenshtein:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/levenshtein/lib/levenshtein.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js","mithril-simple-modal":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js","rx-node":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/jsonld-rx-old/node_modules/rx-node/index.js"][0].apply(n,arguments)},{events:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/n
ode_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/index.js"][0].apply(n,arguments)},{"./lib/main.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/lib/main.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/lib/main.js":[function(t,e){var n=t("mithril"),r=t("../node_modules/simple-modal/simple-modal.compiled.js"),i=t("spin.js");e.exports=function(t){var e="140px",o={lines:13,length:20,width:10,radius:30,corners:1,rotate:0,direction:1,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2e9,top:"50%",left:"50%"},s=new i(o),u={};return u.config=function(t){function e(t,e){t?s.spin(e):s.stop()}return function(i,o){var s=document.querySelector(".simple-modal-holder"),u=t.vm.args,a=(u.content,t.vm.status()),c="loading"===a;if(!o){n.startComputation
();var l=i.parentNode;if(!s){var h={title:u.title,buttons:u.buttons,content:"<span></span>",attachToBody:!1,removeOnClose:!1},f=r(h);s=f.m}u.modalContentContainer||(u.modalContentContainer=s.querySelector(".simple-modal-content")),l.removeChild(i),u.modalContentContainer.appendChild(i),l.appendChild(s);var p=document.querySelector(".simple-modal-overlay");p.style.opacity=.4,p.style.backgroundColor="#fff",e(c,u.modalContentContainer),n.endComputation()}"closed"!==a?(s.style.display="block",e(c,u.modalContentContainer)):s.style.display="none"}},u.vm=function(){var t={};return t.init=function(e){t.args=e,t.status=n.prop("closed")},t}(),u.controller=function(t){this.vm=u.vm,u.vm.init(t)},u.view=function(t,r){var i=r.content,o=r.status;if(t.vm.status(o),"closed"===o)i=n("span");else if("loading"===o)i=n("div",{style:{height:e}});else{if("open"!==o)throw new Error("Unrecognized status.");"string"==typeof i&&(i=n.trust(i))}return n("div",{config:u.config(t)},[i])},"undefined"!=type
of t&&(t.mSimpleModal=u),u}(window)},{"../node_modules/simple-modal/simple-modal.compiled.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/node_modules/simple-modal/simple-modal.compiled.js",mithril:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril/mithril.js","spin.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/spin.js/spin.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/spin.js/spin.js":[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=r():"function"==typeof define&&define.amd?define(r):t.Spinner=r()}(this,function(){"use strict";function t(t,e){var n,r=document.createElement(t||"div");for(n in e)r[n]=e[n];return r}function e(t){for(var e=1,n=arguments.length;n>e;e++)t.appendChild(arguments[e]);return t}function n(t,e,n,r){var i=["opacity",e,~~(100*t),n,r].join("-"),o=.01+n/r*100,s=Math.max(1-(1-t)/e*(100-o),t),u=c.substring(0,c.indexOf("Animation")).toLowerCase(),a=u&&"-"+u+"-"||""
;return h[i]||(f.insertRule("@"+a+"keyframes "+i+"{0%{opacity:"+s+"}"+o+"%{opacity:"+t+"}"+(o+.01)+"%{opacity:1}"+(o+e)%100+"%{opacity:"+t+"}100%{opacity:"+s+"}}",f.cssRules.length),h[i]=1),i}function r(t,e){var n,r,i=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<l.length;r++)if(n=l[r]+e,void 0!==i[n])return n;return void 0!==i[e]?e:void 0}function i(t,e){for(var n in e)t.style[r(t,n)||n]=e[n];return t}function o(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)void 0===t[r]&&(t[r]=n[r])}return t}function s(t,e){return"string"==typeof t?t:t[e%t.length]}function u(t){this.opts=o(t||{},u.defaults,p)}function a(){function n(e,n){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}f.addRule(".spin-vml","behavior:url(#default#VML)"),u.prototype.lines=function(t,r){function o(){return i(n("group",{coordsize:l+" "+l,coordorigin:-c+" "+-c}),{width:l,height:l})}function u(t,u,a){e(f,e(i(o(),{rotation:360/r.lines*t+"deg",left
:~~u}),e(i(n("roundrect",{arcsize:r.corners}),{width:c,height:r.width,left:r.radius,top:-r.width>>1,filter:a}),n("fill",{color:s(r.color,t),opacity:r.opacity}),n("stroke",{opacity:0}))))}var a,c=r.length+r.width,l=2*c,h=2*-(r.width+r.length)+"px",f=i(o(),{position:"absolute",top:h,left:h});if(r.shadow)for(a=1;a<=r.lines;a++)u(a,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(a=1;a<=r.lines;a++)u(a);return e(t,f)},u.prototype.opacity=function(t,e,n,r){var i=t.firstChild;r=r.shadow&&r.lines||0,i&&e+r<i.childNodes.length&&(i=i.childNodes[e+r],i=i&&i.firstChild,i=i&&i.firstChild,i&&(i.opacity=n))}}var c,l=["webkit","Moz","ms","O"],h={},f=function(){var n=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",posit
ion:"absolute"};u.defaults={},o(u.prototype,{spin:function(e){this.stop();var n=this,r=n.opts,o=n.el=i(t(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex});if(i(o,{left:r.left,top:r.top}),e&&e.insertBefore(o,e.firstChild||null),o.setAttribute("role","progressbar"),n.lines(o,n.opts),!c){var s,u=0,a=(r.lines-1)*(1-r.direction)/2,l=r.fps,h=l/r.speed,f=(1-r.opacity)/(h*r.trail/100),p=h/r.lines;!function d(){u++;for(var t=0;t<r.lines;t++)s=Math.max(1-(u+(r.lines-t)*p)%h*f,r.opacity),n.opacity(o,t*r.direction+a,s,r);n.timeout=n.el&&setTimeout(d,~~(1e3/l))}()}return n},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(r,o){function u(e,n){return i(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*l+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.c
orners*o.width>>1)+"px"})}for(var a,l=0,h=(o.lines-1)*(1-o.direction)/2;l<o.lines;l++)a=i(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:c&&n(o.opacity,o.trail,h+l*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&e(a,i(u("#000","0 0 4px #000"),{top:"2px"})),e(r,e(a,u(s(o.color,l),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(t,e,n){e<t.childNodes.length&&(t.childNodes[e].style.opacity=n)}});var d=i(t("group"),{behavior:"url(#default#VML)"});return!r(d,"transform")&&d.adj?a():c=r(d,"animation"),u})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril/mithril.js":[function(t,e){var n=function r(t,e){function n(t){A=t.document,D=t.location,T=t.cancelAnimationFrame||t.clearTimeout,R=t.requestAnimationFrame||t.setTimeout}function i(){var t,e=[].slice.call(arguments),n=!(null==e[1]||L.call(e[1])!==O||"tag"in e[1]||"view"in e[1]||"subtree"in e[1]),r=n?e[1]:{},i="cl
ass"in r?"class":"className",o={tag:"div",attrs:{}},s=[];if(L.call(e[0])!=I)throw new Error("selector in m(selector, attrs, children) should be a string");for(;t=M.exec(e[0]);)if(""===t[1]&&t[2])o.tag=t[2];else if("#"===t[1])o.attrs.id=t[2];else if("."===t[1])s.push(t[2]);else if("["===t[3][0]){var u=q.exec(t[3]);o.attrs[u[1]]=u[3]||(u[2]?"":!0)}var a=e.slice(n?2:1);o.children=1===a.length&&L.call(a[0])===U?a[0]:a;for(var c in r)r.hasOwnProperty(c)&&(c===i&&null!=r[c]&&""!==r[c]?(s.push(r[c]),o.attrs[c]=""):o.attrs[c]=r[c]);return s.length>0&&(o.attrs[i]=s.join(" ")),o}function o(t,n,r,c,h,f,p,d,v,m,g){try{(null==h||null==h.toString())&&(h="")}catch(b){h=""}if("retain"===h.subtree)return f;var y=L.call(f),w=L.call(h);if(null==f||y!==w){if(null!=f)if(r&&r.nodes){var _=d-c,x=_+(w===U?h:f.nodes).length;a(r.nodes.slice(_,x),r.slice(_,x))}else f.nodes&&a(f.nodes,f);f=new h.constructor,f.tag&&(f={}),f.nodes=[]}if(w===U){for(var S=0,E=h.length;E>S;S++)L.call(h[S])===U&&(h=h.concat.
apply([],h),S--,E=h.length);for(var C=[],k=f.length===h.length,j=0,N=1,D=2,R=3,T={},M=!1,S=0;S<f.length;S++)f[S]&&f[S].attrs&&null!=f[S].attrs.key&&(M=!0,T[f[S].attrs.key]={action:N,index:S});for(var q=0,S=0,E=h.length;E>S;S++)if(h[S]&&h[S].attrs&&null!=h[S].attrs.key){for(var V=0,E=h.length;E>V;V++)h[V]&&h[V].attrs&&null==h[V].attrs.key&&(h[V].attrs.key="__mithril__"+q++);break}if(M){var G=!1;if(h.length!=f.length)G=!0;else for(var Z,P,S=0;Z=f[S],P=h[S];S++)if(Z.attrs&&P.attrs&&Z.attrs.key!=P.attrs.key){G=!0;break}if(G){for(var S=0,E=h.length;E>S;S++)if(h[S]&&h[S].attrs&&null!=h[S].attrs.key){var z=h[S].attrs.key;T[z]=T[z]?{action:R,index:S,from:T[z].index,element:f.nodes[T[z].index]||A.createElement("div")}:{action:D,index:S}}var X=[];for(var J in T)X.push(T[J]);var Y=X.sort(s),H=new Array(f.length);H.nodes=f.nodes.slice();for(var Q,S=0;Q=Y[S];S++){if(Q.action===N&&(a(f[Q.index].nodes,f[Q.index]),H.splice(Q.index,1)),Q.action===D){var K=A.createElement("div");K.key=h[Q.ind
ex].attrs.key,t.insertBefore(K,t.childNodes[Q.index]||null),H.splice(Q.index,0,{attrs:{key:h[Q.index].attrs.key},nodes:[K]}),H.nodes[Q.index]=K}Q.action===R&&(t.childNodes[Q.index]!==Q.element&&null!==Q.element&&t.insertBefore(Q.element,t.childNodes[Q.index]||null),H[Q.index]=f[Q.from],H.nodes[Q.index]=Q.element)}f=H}}for(var S=0,$=0,E=h.length;E>S;S++){var ee=o(t,n,f,d,h[S],f[$],p,d+j||j,v,m,g);ee!==e&&(ee.nodes.intact||(k=!1),j+=ee.$trusted?(ee.match(/<[^\/]|\>\s*[^<]/g)||[0]).length:L.call(ee)===U?ee.length:1,f[$++]=ee)}if(!k){for(var S=0,E=h.length;E>S;S++)null!=f[S]&&C.push.apply(C,f[S].nodes);for(var ne,S=0;ne=f.nodes[S];S++)null!=ne.parentNode&&C.indexOf(ne)<0&&a([ne],[f[S]]);h.length<f.length&&(f.length=h.length),f.nodes=C}}else if(null!=h&&w===O){for(var ie=[],oe=[];h.view;){var se=h.view.$original||h.view,ue="diff"==i.redraw.strategy()&&f.views?f.views.indexOf(se):-1,ae=ue>-1?f.controllers[ue]:new(h.controller||F),z=h&&h.attrs&&h.attrs.key;if(h=0==re||f&&f.controll
ers&&f.controllers.indexOf(ae)>-1?h.view(ae):{tag:"placeholder"},"retain"===h.subtree)return f;z&&(h.attrs||(h.attrs={}),h.attrs.key=z),ae.onunload&&te.push({controller:ae,handler:ae.onunload}),ie.push(se),oe.push(ae)}if(!h.tag&&oe.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");h.attrs||(h.attrs={}),f.attrs||(f.attrs={});var ce=Object.keys(h.attrs),le=ce.length>("key"in h.attrs?1:0);if((h.tag!=f.tag||ce.sort().join()!=Object.keys(f.attrs).sort().join()||h.attrs.id!=f.attrs.id||h.attrs.key!=f.attrs.key||"all"==i.redraw.strategy()&&(!f.configContext||f.configContext.retain!==!0)||"diff"==i.redraw.strategy()&&f.configContext&&f.configContext.retain===!1)&&(f.nodes.length&&a(f.nodes),f.configContext&&typeof f.configContext.onunload===W&&f.configContext.onunload(),f.controllers))for(var ae,S=0;ae=f.controllers[S];S++)typeof ae.onunload===W&&ae.onunload({preventDefault:F});if(L.call(h.tag)!=I)return;var ne,he=0===f.nodes.leng
th;if(h.attrs.xmlns?m=h.attrs.xmlns:"svg"===h.tag?m="http://www.w3.org/2000/svg":"math"===h.tag&&(m="http://www.w3.org/1998/Math/MathML"),he){if(ne=h.attrs.is?m===e?A.createElement(h.tag,h.attrs.is):A.createElementNS(m,h.tag,h.attrs.is):m===e?A.createElement(h.tag):A.createElementNS(m,h.tag),f={tag:h.tag,attrs:le?u(ne,h.tag,h.attrs,{},m):h.attrs,children:null!=h.children&&h.children.length>0?o(ne,h.tag,e,e,h.children,f.children,!0,0,h.attrs.contenteditable?ne:v,m,g):h.children,nodes:[ne]},oe.length){f.views=ie,f.controllers=oe;for(var ae,S=0;ae=oe[S];S++)if(ae.onunload&&ae.onunload.$old&&(ae.onunload=ae.onunload.$old),re&&ae.onunload){var fe=ae.onunload;ae.onunload=F,ae.onunload.$old=fe}}f.children&&!f.children.nodes&&(f.children.nodes=[]),"select"===h.tag&&"value"in h.attrs&&u(ne,h.tag,{value:h.attrs.value},{},m),t.insertBefore(ne,t.childNodes[d]||null)}else ne=f.nodes[0],le&&u(ne,h.tag,h.attrs,f.attrs,m),f.children=o(ne,h.tag,e,e,h.children,f.children,!1,0,h.attrs.contente
ditable?ne:v,m,g),f.nodes.intact=!0,oe.length&&(f.views=ie,f.controllers=oe),p===!0&&null!=ne&&t.insertBefore(ne,t.childNodes[d]||null);if(typeof h.attrs.config===W){var pe=f.configContext=f.configContext||{},de=function(t,e){return function(){return t.attrs.config.apply(t,e)}};g.push(de(h,[ne,!he,pe,f]))}}else if(typeof h!=W){var C;0===f.nodes.length?(h.$trusted?C=l(t,d,h):(C=[A.createTextNode(h)],t.nodeName.match(B)||t.insertBefore(C[0],t.childNodes[d]||null)),f="string number boolean".indexOf(typeof h)>-1?new h.constructor(h):h,f.nodes=C):f.valueOf()!==h.valueOf()||p===!0?(C=f.nodes,v&&v===A.activeElement||(h.$trusted?(a(C,f),C=l(t,d,h)):"textarea"===n?t.value=h:v?v.innerHTML=h:((1===C[0].nodeType||C.length>1)&&(a(f.nodes,f),C=[A.createTextNode(h)]),t.insertBefore(C[0],t.childNodes[d]||null),C[0].nodeValue=h)),f=new h.constructor(h),f.nodes=C):f.nodes.intact=!0}return f}function s(t,e){return t.action-e.action||t.index-e.index}function u(t,e,n,r,i){for(var o in n){var s=n
[o],u=r[o];if(o in r&&u===s)"value"===o&&"input"===e&&t.value!=s&&(t.value=s);else{r[o]=s;try{if("config"===o||"key"==o)continue;if(typeof s===W&&0===o.indexOf("on"))t[o]=h(s,t);else if("style"===o&&null!=s&&L.call(s)===O){for(var a in s)(null==u||u[a]!==s[a])&&(t.style[a]=s[a]);for(var a in u)a in s||(t.style[a]="")}else null!=i?"href"===o?t.setAttributeNS("http://www.w3.org/1999/xlink","href",s):"className"===o?t.setAttribute("class",s):t.setAttribute(o,s):o in t&&"list"!==o&&"style"!==o&&"form"!==o&&"type"!==o&&"width"!==o&&"height"!==o?("input"!==e||t[o]!==s)&&(t[o]=s):t.setAttribute(o,s)
+t.containerElement=e.containerElement,t.disabled=s.prop(!0);a.xrefSearch=new o;t.cancel=function(){t.reset(),e.editor.cancel()},t.pvjsElement={},t.entityReference=s.prop({});var f=i.vm.pvjsElementHierarchy,p=t.pvjsElementHierarchy=r.hierarchicalPartition(f.mainSource,function(t){var e=n.isArray(t.type)?t.type:[t.type],r=!n.isEmpty(n.intersection(e,h));return r},f.resetSource);t.pvjsElementSource=p.mainSource,t.resetSource=p.resetSource;var d=t.bridgeDbIdControlChangeOrInputSource=new u.Subject;d.subscribe(function(e){t.entityReference=e});var v=d.flatMap(function(t){var e=u.Observable.fromEvent(document.body,"click");return u.Observable.merge(u.Observable.return(t),e).first()}).debounce(500);u.Observable.merge(t.pvjsElementSource,t.resetSource,v).subscribe(function(){var e=t.pvjsElement;if(!n.isEmpty(e)){var r=t.entityReference;n.isEmpty(r)||e.getSetEntityReference(r).then(function(e){t.entityReference&&t.entityReference.id===e.id&&(t.entityReference=e),s.redraw()})}}),t.cle
arControls=function(){t.pvjsElement={},t.entityReference={}},t.reset=function(){t.disabled(!0),t.clearControls()},t.pvjsElementSource.flatMap(function(t){var e;return e=t.entityReference?u.Observable.fromPromise(t.getSetEntityReference()):u.Observable.return({isDataItemIn:{}}),u.Observable.zipArray(u.Observable.return(t),e)}).subscribe(function(e){var r=e[0],i=n.clone(e[1]);t.clearControls(),t.disabled(!1),t.entityReference=i;r.entityReference;r.textContent=r.textContent||i.displayName,t.pvjsElement=r,s.redraw()},function(t){throw t}),t.resetSource.subscribe(function(){t.reset(),s.redraw()},function(t){console.error(t)},function(){}),e.diagramComponent.vm.selectionHierarchy.loopback(),t.updateTextContent=function(e,n){e.textContent=n;var r="#text-for-"+e.id,i=t.containerElement.querySelector(r);if(!i){var o=t.containerElement.querySelector(".viewport");i=document.createElementNS("http://www.w3.org/2000/svg","g"),i.setAttribute("id",r);var s=document.createElementNS("http://w
ww.w3.org/2000/svg","text");o.appendChild(i),i.appendChild(s),i.setAttribute("transform","translate("+e.x+" "+(e.y+14)+")")}i.querySelector("text").textContent=n},t.onunload=function(){}},t}(),a.controller=function(t){a.vm.init(t)},a.view=function(t,e){var n=a.vm;return s("nav.kaavio-editor-annotation.navbar.navbar-default.navbar-form.well.well-sm",[s("div.navbar-left",[s.component(a.xrefSearch,{disabled:n.disabled,onchange:function(t){n.entityReference=t;var e=n.pvjsElement;e.textContent=void 0,e.type=void 0,e.getSetEntityReference(t).then(function(t){n.entityReference&&n.entityReference.id===t.id&&(n.entityReference=t),e.textContent&&n.updateTextContent(e,e.textContent),s.redraw()},function(t){throw t})},organism:n.organism,trigger:e.trigger.bind(e)})]),s("div.form-group.navbar-left",[s("div",{"class":"form-control",style:{"min-width":"580px",height:"44px"}},[s.component(i,{disabled:n.disabled,entityTypeId:n.pvjsElement.type||"",onchange:function(t){{var e=n.pvjsElement;e.
type}e.type=t,e["gpml:Type"]&&(e["gpml:Type"]=t.replace("biopax","gpml"));var r=n.entityReference,i=n.typeMappingsEntityToEntityReference[t];r.type=[i],r.isDataItemIn.subject=[i],n.entityReference=r,console.log(n.entityReference)}}),s.component(r,{disabled:n.disabled,entityReference:n.entityReference,oninput:function(t){n.bridgeDbIdControlChangeOrInputSource.onNext(t)},onchange:function(t){n.bridgeDbIdControlChangeOrInputSource.onNext(t)},style:{clear:"both",display:"inline-block"}}),s("input",{"class":"form-control input input-sm",oninput:s.withAttr("value",n.updateTextContent.bind(null,n.pvjsElement)),placeholder:"Display name",value:n.pvjsElement.textContent||"",disabled:n.disabled()})])])])},e.exports=a},{"../../../sub-components/bridge-db-id-control/bridge-db-id-control.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/bridge-db-id-control.js","../../../sub-components/entity-type-control.js":"/Users/andersriutta/Sites/kaavio-editor
-lkg/lib/sub-components/entity-type-control.js","./xref-search":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/xref-search.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/entity-type-control.js":[function(t,e){var n=t("lodash"),r=(t("rx"),{});r.vm=function(){var t={},e=t.entityTypes=[{id:"biopax:Complex",name:"Complex"},{id:"gpml:GeneProduct",name:"Gene Product"},{id:"gpml:Metabolite",name:"Metabolite"},{id:"biopax:Pathway",name:"Pathway"},{id:"biopax:Protein",name:"Protein"},{id:"biopax:Rna",name:"RNA"},{id:"gpml:Unknown",name:"Unknown"}],n={id:"",name:"Select type"};return t.init=function(){t.entityTypeSelectionList=window.m.prop([n].concat(e).map(function(t){return t}))},t}(),r.controller=function(t){r.vm.init(t)},r.view=function(t,e){{var i=r.vm;e
.entityTypeId}return window.m("select.form-control.input.input-sm",{onchange:window.m.withAttr("value",function(t){e.entityTypeId=t,e.onchange&&e.onchange(t)}),value:e.entityTypeId,disabled:e.disabled()},[i.entityTypeSelectionList().map(function(t){return window.m("option",{key:t.id,value:t.id,selected:t.id===e.entityTypeId,disabled:n.isEmpty(t.id)},t.name)})])},e.exports=r},{lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/bridge-db-id-control.js":[function(t,e){var n=(t("lodash"),t("./dataset-control.js")),r=t("jsonld-rx"),i=t("uuid"),o={};o.vm=function(){var t=(new r,{});return t.init=function(){t.onunload=function(){}},t}(),o.controller=function(t){o.vm.init(t)},o.view=function(t,e){o.vm;e.entityReference.isDataItemIn=e.entityReference.isDataItemIn||{id:""};var r=e.entityRef
erence.isDataItemIn,s=r.id,u=e.entityReference.identifier;return window.m("div",{style:e.style},[window.m.component(n,{disabled:e.disabled,dataset:r,entityReferenceType:e.entityReference.type,onchange:function(t){var n=e.entityReference;n.isDataItemIn=t,s=t.id,s&&u?n.id=s+u:(n.id=i.v1(),!t.exampleIdentifier&&u&&(n.isDataItemIn.exampleIdentifier=u)),delete n.db,delete n.bridgeDbDatasourceName,delete n["owl:sameAs"],delete n.xref,e.entityReference=n,e.onchange&&e.onchange(n)}}),window.m("input",{"class":"pvjs-editor-identifier form-control input input-sm",placeholder:"Identifier",oninput:window.m.withAttr("value",function(t){var n=e.entityReference;n.identifier=t,s&&t?n.id=s+t:(n.id=i.v1(),!s&&t&&(n.isDataItemIn.exampleIdentifier=t)),delete n["owl:sameAs"],delete n.xref,e.entityReference=n,e.oninput&&e.oninput(n)}),value:e.entityReference.identifier||"",disabled:e.disabled()})])},e.exports=o},{"./dataset-control.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-componen
ts/bridge-db-id-control/dataset-control.js","jsonld-rx":"/Users/andersriutta/Sites/jsonld-rx-old/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",uuid:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/uuid.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/uuid.js":[function(t,e){function n(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>i&&(e[r+i++]=a[t])});16>i;)e[r+i++]=0;return e}function r(t,e){var n=e||0,r=u;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function i(t,e,n){var i=e&&n||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:f,u=void 0!==t.msecs?t.msecs:(new Date).getTime(),a=void 0!==t.nsecs?t.nsecs:d+1,c=u-p+(a-d)/1e4;if(0>c&&void 0===t.clockseq&&(s=s+1&16383),(0>c||u>p)&&void 0===t.nsecs&&(a=0),a>=1e4)thr
ow new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=u,d=a,f=s,u+=122192928e5;var l=(1e4*(268435455&u)+a)%4294967296;o[i++]=l>>>24&255,o[i++]=l>>>16&255,o[i++]=l>>>8&255,o[i++]=255&l;var v=u/4294967296*1e4&268435455;o[i++]=v>>>8&255,o[i++]=255&v,o[i++]=v>>>24&15|16,o[i++]=v>>>16&255,o[i++]=s>>>8|128,o[i++]=255&s;for(var m=t.node||h,g=0;6>g;g++)o[i+g]=m[g];return e?e:r(o)}function o(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var u=0;16>u;u++)e[i+u]=o[u];return e||r(o)}for(var s=t("./rng"),u=[],a={},c=0;256>c;c++)u[c]=(c+256).toString(16).substr(1),a[u[c]]=c;var l=s(),h=[1|l[0],l[1],l[2],l[3],l[4],l[5]],f=16383&(l[6]<<8|l[7]),p=0,d=0,v=o;v.v1=i,v.v4=o,v.parse=n,v.unparse=r,e.exports=v},{"./rng":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/rng-browser.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/uuid/rng-browser
.js":[function(t,e){(function(t){var n;if(t.crypto&&crypto.getRandomValues){var r=new Uint8Array(16);n=function(){return crypto.getRandomValues(r),r}}if(!n){var i=new Array(16);n=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/sub-components/bridge-db-id-control/dataset-control.js":[function(t,e){var n=t("lodash"),r=t("bridgedb"),i=(t("../../editor-utils.js"),t("jsonld-rx")),o=(t("rx"),t("rx-node")),s={},u=new i;s.vm=function(){var t={},e=new r({organism:"Homo sapiens"}),i=o.fromReadableStream(e.dataset.query()).map(function(t){return t.subject=u.arrayifyClean(t.subject),t}).filter(function(t){var e=["interaction","ontology","probe","experiment","publication","model","organism"];return t._isPrimary&&!!t.id&&-1===e.indexOf(t._bridgeDbType)}
).toArray().toPromise();return t.init=function(){var e={id:"",name:"Select datasource"};t.dataset=e,t.datasetList=window.m.prop([e]),i.then(function(r){var i=n.find(r,function(t){return t.id===e.id&&t.name===e.name});i||r.unshift(e),t.datasetList(r),window.m.redraw()},function(t){throw t})},t}(),s.controller=function(t){s.vm.init(t)},s.view=function(t,e){{var r=s.vm,i=u.arrayifyClean(e.entityReferenceType),o=e.dataset||{},a=i,c=o.id;o.preferredPrefix}return window.m("select",{"class":"pvjs-editor-dataset form-control input input-sm",onchange:window.m.withAttr("value",function(t){var i=n.find(r.datasetList(),function(e){return e.id===t});e.onchange&&e.onchange(i)}),disabled:e.disabled(),style:"max-width: 135px; ",required:!0},[r.datasetList().filter(function(t){var e=t.subject;return e=u.arrayifyClean(e),n.isEmpty(a)||n.isEmpty(e)||t.id===o.id||a.indexOf("gpml:Unknown")>-1||a.indexOf("biopax:Complex")>-1?!0:a.indexOf("biopax:Pathway")>-1&&e.indexOf("biopax:Pathway")>-1?!0:a.i
ndexOf("biopax:SmallMoleculeReference")>-1&&e.indexOf("biopax:SmallMoleculeReference")>-1?!0:(a.indexOf("biopax:RnaReference")>-1||a.indexOf("gpml:GeneProduct")>-1)&&(e.indexOf("biopax:RnaReference")>-1||e.indexOf("gpml:GeneProduct")>-1)?!0:(a.indexOf("gpml:GeneProduct")>-1||a.indexOf("biopax:ProteinReference")>-1)&&(e.indexOf("biopax:ProteinReference")>-1||e.indexOf("gpml:GeneProduct")>-1)?!0:!1}).map(function(t){return window.m("option",{key:t.id,value:t.id,selected:t.id===c},t.name)})])},e.exports=s},{"../../editor-utils.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-utils.js",bridgedb:"/Users/andersriutta/Sites/bridgedbjs-lkg/index.js","jsonld-rx":"/Users/andersriutta/Sites/jsonld-rx-old/index.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js","rx-node":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js"}],"/Users/andersr
iutta/Sites/kaavio-editor-lkg/lib/editor-utils.js":[function(t,e){function n(t,e){var n=r.clone(t);n.displayName=e.textContent||n.displayName,n.id=n.id||n["@id"];var i,o=[{"@id":"http://example.org/",name:"Type"},{"@id":"gpml:GeneProduct",name:"Gene Product"},{"@id":"gpml:Metabolite",name:"Metabolite"},{"@id":"biopax:Pathway",name:"Pathway"},{"@id":"biopax:ProteinReference",name:"Protein"},{"@id":"gpml:Unknown",name:"Unknown"}];if(n.type){var s=n.type,u={DnaReference:"gpml:GeneProduct",ProteinReference:"biopax:ProteinReference",SmallMoleculeReference:"gpml:Metabolite",PhysicalEntity:"gpml:Unknown",Pathway:"biopax:Pathway"};i=u[s]}else{var a=o.map(function(t){return t["@id"]});i=r.intersection(a,n["@type"])[0]}n.type=i;var c=n.isDataItemIn;return c.id=c.id||c["@id"],n}var r=t("lodash"),i={biopax:{"@id":"http://www.biopax.org/release/biopax-level3.owl#","@type":"@id"},entityReference:{"@id":"biopax:entityReference","@type":"@id"},bridgedb:{"@id":"http://www.example.org/bridged
b/input-vocab/","@type":"@vocab"},color:"http://www.w3.org/TR/CSS2/colors.html#propdef-color",db:{"@id":"biopax:db","@type":"xsd:string"},dcterms:{"@id":"http://purl.org/dc/terms/","@type":"@id"},displayName:{"@id":"biopax:displayName","@type":"xsd:string"},fontFamily:"http://www.w3.org/TR/CSS2/fonts.html#font-family-prop",fontSize:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size",fontStyle:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-style",fontWeight:"http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight",gpml:{"@id":"http://vocabularies.wikipathways.org/gpml#","@type":"@id"},id:"@id",identifier:{"@id":"http://rdaregistry.info/Elements/u/P60052","@type":"@id"},idot:{"@id":"http://identifiers.org/idot/","@type":"@vocab"},isDataItemIn:{"@id":"http://semanticscience.org/resource/SIO_001278","@type":"@id"},name:{"@id":"schema:name","@type":"@id"},prefLabel:{"@id":"skos:prefLabel","@type":"@id"},preferredPrefix:{"@id":"idot:preferredPrefix","@type":"xsd:string"}
,schema:{"@id":"http://schema.org/","@type":"@vocab"},skos:{"@id":"http://www.w3.org/2004/02/skos/core#","@type":"@id"},subject:{"@id":"dcterms:subject","@type":"@id"},type:"@type",xref:{"@id":"biopax:xref","@type":"@id"},xsd:{"@id":"http://www.w3.org/2001/XMLSchema#","@type":"@id"}};e.exports={context:i,createAnnotationEntity:n}},{lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/editor-tabs-component/tabs/annotation-tab/xref-search.js":[function(t,e){var n=t("lodash"),r=t("bridgedb"),i=t("levenshtein"),o=window.m,s=(t("../../../mithril-utils"),t("mithril-simple-modal")),u=(t("rx"),t("rx-node"));e.exports=function(){var t={};return t.vm=function(){var e={};return e.changeStateToGlyphiconMappings={"true":"btn-success","false":"btn-default"},e.init=function(s){t.trigger=s.trigger;var a=new r({baseIri:"http://webservice.bridgedb.org/",datasetsMetadataIri:"http://pointer.ucsf.edu/d3/r/data-source
s/bridgedb-datasources.php",organism:s.organism});e.showEntityReferences=o.prop(!1),e.query=o.prop(""),e.modalStatus=function(){if(e.showEntityReferences()){var t=e.xrefs;return t&&t.length>0?"open":"loading"}return"closed"},e.saveAndClose=function(t){var r=n.find(e.xrefs,function(e){return e.id===t});s.onchange(r),e.reset(),o.redraw()},e.search=function(n){{var r=n.toLowerCase();n.length,u.fromReadableStream(a.entityReference.freeSearch({attribute:n})).timeout(45e3).filter(function(t){return t.isDataItemIn._isPrimary}).groupBy(function(t){return t.isDataItemIn.preferredPrefix}).flatMap(function(t){return t.toArray().map(function(t){return t.sort(function(t,e){var n=t.displayName,o=n.toLowerCase(),s=e.displayName,u=s.toLowerCase();if(o===r)return-1;if(u===r)return 1;var a=r.replace(/[^a-zA-Z]/g,""),c=a.length;if(c>=2){var l=o.replace(/[^a-zA-Z]/g,""),h=u.replace(/[^a-zA-Z]/g,""),f=l.substr(0,c)===a,p=h.substr(0,c)===a;if(f&&!p)return-1;if(!f&&p)return 1;var d=l[0]===a[0],v=h
[0]===a[0];if(d&&!v)return-1;if(!d&&v)return 1;if(d&&v){var m=new i(a,l),g=new i(a,h),b=m.distance,y=g.distance;if(b!==y)return b>y}}return n>s})})}).toArray().map(function(t){return t.sort(function(t,e){var n=t[0].isDataItemIn.preferredPrefix,r=e[0].isDataItemIn.preferredPrefix;return"ensembl"===n?-1:"ensembl"===r?1:"ncbigene"===n?-1:"ncbigene"===r?1:n>r}).reduce(function(t,e){return t.concat(e)},[])}).subscribe(function(t){e.xrefs=t,o.redraw()},function(n){console.error("Error getting xrefs"),console.error(n),e.reset(),o.redraw();var r=n.message?n.message:n.toString();t.trigger("error."+r,{message:r})},function(){})}},e.reset=function(){e.query(""),e.xrefs=null,e.showEntityReferences(!1)}},e}(),t.controller=function(e){t.vm.init(e)},t.view=function(e,r){var i=t.vm;return o("div.form-search.form-group",[o("div.input-group.input-group-sm.form-control",[o("input",{id:"xref-search-input","class":"form-control",placeholder:"Search by name",onchange:o.withAttr("value",i.query),t
ype:"text",value:i.query(),disabled:r.disabled()}),o("span.input-group-btn",{onclick:function(){var t=i.query();n.isEmpty(t)||(i.showEntityReferences(!0),i.search(t))},style:r.disabled()?"pointer-events: none; ":null},o('button[type="submit"]',{"class":"btn "+i.changeStateToGlyphiconMappings[!r.disabled()]},[o('span[aria-hidden="true"].glyphicon.glyphicon-search')])),function(){var t,e=i.xrefs;return e&&i.showEntityReferences()&&(t=e.length>0?o("table.table.table-hover.table-bordered",[o("thead",[o("tr",{},[o("th",{},"Name"),o("th",{},"Datasource"),o("th",{},"Identifier")])]),o("tbody",{},[e.map(function(t){return o('tr[style="cursor: pointer;"]',{id:t.id,onclick:o.withAttr("id",i.saveAndClose)},[o("td",{},t.displayName),o("td",{},t.db),o("td",{},t.identifier)])})])]):o("div",{},"No results found.")),o.component(s,{content:t,buttons:[{text:"Cancel",closeOnClick:!0,callback:function(){i.xrefs=null,i.showEntityReferences(!1),o.redraw()}}],onchange:function(){},status:i.modalSt
atus()})}()])])},t}},{"../../../mithril-utils":"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/mithril-utils.js",bridgedb:"/Users/andersriutta/Sites/bridgedbjs-lkg/index.js",levenshtein:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/levenshtein/lib/levenshtein.js",lodash:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js","mithril-simple-modal":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js","rx-node":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx-node/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/jsonld-rx-old/node_modules/rx-node/index.js"][0].apply(n,arguments)},{events:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.a
ll.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/index.js"][0].apply(n,arguments)},{"./lib/main.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/lib/main.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/lib/main.js":[function(t,e){var n=t("mithril"),r=t("../node_modules/simple-modal/simple-modal.compiled.js"),i=t("spin.js");e.exports=function(t){var e="140px",o={lines:13,length:20,width:10,radius:30,corners:1,rotate:0,direction:1,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2e9,top:"50%",left:"50%"},s=new i(o),u={};return u.config=function(t){function e(t,e){t?s.spin(e):s.stop()}return function(i,o){var s=document.querySelector(".simple-modal-holder"),u=t.vm.args,a=(u.content,t.vm.status()),c="loading"===a;if(!o){n.startComputation();var l=i.parentNode;if
(!s){var h={title:u.title,buttons:u.buttons,content:"<span></span>",attachToBody:!1,removeOnClose:!1},f=r(h);s=f.m}u.modalContentContainer||(u.modalContentContainer=s.querySelector(".simple-modal-content")),l.removeChild(i),u.modalContentContainer.appendChild(i),l.appendChild(s);var p=document.querySelector(".simple-modal-overlay");p.style.opacity=.4,p.style.backgroundColor="#fff",e(c,u.modalContentContainer),n.endComputation()}"closed"!==a?(s.style.display="block",e(c,u.modalContentContainer)):s.style.display="none"}},u.vm=function(){var t={};return t.init=function(e){t.args=e,t.status=n.prop("closed")},t}(),u.controller=function(t){this.vm=u.vm,u.vm.init(t)},u.view=function(t,r){var i=r.content,o=r.status;if(t.vm.status(o),"closed"===o)i=n("span");else if("loading"===o)i=n("div",{style:{height:e}});else{if("open"!==o)throw new Error("Unrecognized status.");"string"==typeof i&&(i=n.trust(i))}return n("div",{config:u.config(t)},[i])},"undefined"!=typeof t&&(t.mSimpleModal=u)
,u}(window)},{"../node_modules/simple-modal/simple-modal.compiled.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/node_modules/simple-modal/simple-modal.compiled.js",mithril:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril/mithril.js","spin.js":"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/spin.js/spin.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/spin.js/spin.js":[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=r():"function"==typeof define&&define.amd?define(r):t.Spinner=r()}(this,function(){"use strict";function t(t,e){var n,r=document.createElement(t||"div");for(n in e)r[n]=e[n];return r}function e(t){for(var e=1,n=arguments.length;n>e;e++)t.appendChild(arguments[e]);return t}function n(t,e,n,r){var i=["opacity",e,~~(100*t),n,r].join("-"),o=.01+n/r*100,s=Math.max(1-(1-t)/e*(100-o),t),u=c.substring(0,c.indexOf("Animation")).toLowerCase(),a=u&&"-"+u+"-"||"";return h[i]||(f.insertR
ule("@"+a+"keyframes "+i+"{0%{opacity:"+s+"}"+o+"%{opacity:"+t+"}"+(o+.01)+"%{opacity:1}"+(o+e)%100+"%{opacity:"+t+"}100%{opacity:"+s+"}}",f.cssRules.length),h[i]=1),i}function r(t,e){var n,r,i=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<l.length;r++)if(n=l[r]+e,void 0!==i[n])return n;return void 0!==i[e]?e:void 0}function i(t,e){for(var n in e)t.style[r(t,n)||n]=e[n];return t}function o(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)void 0===t[r]&&(t[r]=n[r])}return t}function s(t,e){return"string"==typeof t?t:t[e%t.length]}function u(t){this.opts=o(t||{},u.defaults,p)}function a(){function n(e,n){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}f.addRule(".spin-vml","behavior:url(#default#VML)"),u.prototype.lines=function(t,r){function o(){return i(n("group",{coordsize:l+" "+l,coordorigin:-c+" "+-c}),{width:l,height:l})}function u(t,u,a){e(f,e(i(o(),{rotation:360/r.lines*t+"deg",left:~~u}),e(i(n("roundrect"
,{arcsize:r.corners}),{width:c,height:r.width,left:r.radius,top:-r.width>>1,filter:a}),n("fill",{color:s(r.color,t),opacity:r.opacity}),n("stroke",{opacity:0}))))}var a,c=r.length+r.width,l=2*c,h=2*-(r.width+r.length)+"px",f=i(o(),{position:"absolute",top:h,left:h});if(r.shadow)for(a=1;a<=r.lines;a++)u(a,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(a=1;a<=r.lines;a++)u(a);return e(t,f)},u.prototype.opacity=function(t,e,n,r){var i=t.firstChild;r=r.shadow&&r.lines||0,i&&e+r<i.childNodes.length&&(i=i.childNodes[e+r],i=i&&i.firstChild,i=i&&i.firstChild,i&&(i.opacity=n))}}var c,l=["webkit","Moz","ms","O"],h={},f=function(){var n=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};u.defaul
ts={},o(u.prototype,{spin:function(e){this.stop();var n=this,r=n.opts,o=n.el=i(t(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex});if(i(o,{left:r.left,top:r.top}),e&&e.insertBefore(o,e.firstChild||null),o.setAttribute("role","progressbar"),n.lines(o,n.opts),!c){var s,u=0,a=(r.lines-1)*(1-r.direction)/2,l=r.fps,h=l/r.speed,f=(1-r.opacity)/(h*r.trail/100),p=h/r.lines;!function d(){u++;for(var t=0;t<r.lines;t++)s=Math.max(1-(u+(r.lines-t)*p)%h*f,r.opacity),n.opacity(o,t*r.direction+a,s,r);n.timeout=n.el&&setTimeout(d,~~(1e3/l))}()}return n},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(r,o){function u(e,n){return i(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*l+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.corners*o.width>>1)+"px"}
)}for(var a,l=0,h=(o.lines-1)*(1-o.direction)/2;l<o.lines;l++)a=i(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:c&&n(o.opacity,o.trail,h+l*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&e(a,i(u("#000","0 0 4px #000"),{top:"2px"})),e(r,e(a,u(s(o.color,l),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(t,e,n){e<t.childNodes.length&&(t.childNodes[e].style.opacity=n)}});var d=i(t("group"),{behavior:"url(#default#VML)"});return!r(d,"transform")&&d.adj?a():c=r(d,"animation"),u})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril/mithril.js":[function(t,e){var n=function r(t,e){function n(t){A=t.document,D=t.location,T=t.cancelAnimationFrame||t.clearTimeout,R=t.requestAnimationFrame||t.setTimeout}function i(){var t,e=[].slice.call(arguments),n=!(null==e[1]||L.call(e[1])!==O||"tag"in e[1]||"view"in e[1]||"subtree"in e[1]),r=n?e[1]:{},i="class"in r?"class":"classN
ame",o={tag:"div",attrs:{}},s=[];if(L.call(e[0])!=I)throw new Error("selector in m(selector, attrs, children) should be a string");for(;t=M.exec(e[0]);)if(""===t[1]&&t[2])o.tag=t[2];else if("#"===t[1])o.attrs.id=t[2];else if("."===t[1])s.push(t[2]);else if("["===t[3][0]){var u=q.exec(t[3]);o.attrs[u[1]]=u[3]||(u[2]?"":!0)}var a=e.slice(n?2:1);o.children=1===a.length&&L.call(a[0])===U?a[0]:a;for(var c in r)r.hasOwnProperty(c)&&(c===i&&null!=r[c]&&""!==r[c]?(s.push(r[c]),o.attrs[c]=""):o.attrs[c]=r[c]);return s.length>0&&(o.attrs[i]=s.join(" ")),o}function o(t,n,r,c,h,f,p,d,v,m,g){try{(null==h||null==h.toString())&&(h="")}catch(b){h=""}if("retain"===h.subtree)return f;var y=L.call(f),w=L.call(h);if(null==f||y!==w){if(null!=f)if(r&&r.nodes){var _=d-c,x=_+(w===U?h:f.nodes).length;a(r.nodes.slice(_,x),r.slice(_,x))}else f.nodes&&a(f.nodes,f);f=new h.constructor,f.tag&&(f={}),f.nodes=[]}if(w===U){for(var S=0,E=h.length;E>S;S++)L.call(h[S])===U&&(h=h.concat.apply([],h),S--,E=h.leng
th);for(var C=[],k=f.length===h.length,j=0,N=1,D=2,R=3,T={},M=!1,S=0;S<f.length;S++)f[S]&&f[S].attrs&&null!=f[S].attrs.key&&(M=!0,T[f[S].attrs.key]={action:N,index:S});for(var q=0,S=0,E=h.length;E>S;S++)if(h[S]&&h[S].attrs&&null!=h[S].attrs.key){for(var V=0,E=h.length;E>V;V++)h[V]&&h[V].attrs&&null==h[V].attrs.key&&(h[V].attrs.key="__mithril__"+q++);break}if(M){var G=!1;if(h.length!=f.length)G=!0;else for(var Z,P,S=0;Z=f[S],P=h[S];S++)if(Z.attrs&&P.attrs&&Z.attrs.key!=P.attrs.key){G=!0;break}if(G){for(var S=0,E=h.length;E>S;S++)if(h[S]&&h[S].attrs&&null!=h[S].attrs.key){var z=h[S].attrs.key;T[z]=T[z]?{action:R,index:S,from:T[z].index,element:f.nodes[T[z].index]||A.createElement("div")}:{action:D,index:S}}var X=[];for(var J in T)X.push(T[J]);var Y=X.sort(s),H=new Array(f.length);H.nodes=f.nodes.slice();for(var Q,S=0;Q=Y[S];S++){if(Q.action===N&&(a(f[Q.index].nodes,f[Q.index]),H.splice(Q.index,1)),Q.action===D){var K=A.createElement("div");K.key=h[Q.index].attrs.key,t.insertBe
fore(K,t.childNodes[Q.index]||null),H.splice(Q.index,0,{attrs:{key:h[Q.index].attrs.key},nodes:[K]}),H.nodes[Q.index]=K}Q.action===R&&(t.childNodes[Q.index]!==Q.element&&null!==Q.element&&t.insertBefore(Q.element,t.childNodes[Q.index]||null),H[Q.index]=f[Q.from],H.nodes[Q.index]=Q.element)}f=H}}for(var S=0,$=0,E=h.length;E>S;S++){var ee=o(t,n,f,d,h[S],f[$],p,d+j||j,v,m,g);ee!==e&&(ee.nodes.intact||(k=!1),j+=ee.$trusted?(ee.match(/<[^\/]|\>\s*[^<]/g)||[0]).length:L.call(ee)===U?ee.length:1,f[$++]=ee)}if(!k){for(var S=0,E=h.length;E>S;S++)null!=f[S]&&C.push.apply(C,f[S].nodes);for(var ne,S=0;ne=f.nodes[S];S++)null!=ne.parentNode&&C.indexOf(ne)<0&&a([ne],[f[S]]);h.length<f.length&&(f.length=h.length),f.nodes=C}}else if(null!=h&&w===O){for(var ie=[],oe=[];h.view;){var se=h.view.$original||h.view,ue="diff"==i.redraw.strategy()&&f.views?f.views.indexOf(se):-1,ae=ue>-1?f.controllers[ue]:new(h.controller||F),z=h&&h.attrs&&h.attrs.key;if(h=0==re||f&&f.controllers&&f.controllers.index
Of(ae)>-1?h.view(ae):{tag:"placeholder"},"retain"===h.subtree)return f;z&&(h.attrs||(h.attrs={}),h.attrs.key=z),ae.onunload&&te.push({controller:ae,handler:ae.onunload}),ie.push(se),oe.push(ae)}if(!h.tag&&oe.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");h.attrs||(h.attrs={}),f.attrs||(f.attrs={});var ce=Object.keys(h.attrs),le=ce.length>("key"in h.attrs?1:0);if((h.tag!=f.tag||ce.sort().join()!=Object.keys(f.attrs).sort().join()||h.attrs.id!=f.attrs.id||h.attrs.key!=f.attrs.key||"all"==i.redraw.strategy()&&(!f.configContext||f.configContext.retain!==!0)||"diff"==i.redraw.strategy()&&f.configContext&&f.configContext.retain===!1)&&(f.nodes.length&&a(f.nodes),f.configContext&&typeof f.configContext.onunload===W&&f.configContext.onunload(),f.controllers))for(var ae,S=0;ae=f.controllers[S];S++)typeof ae.onunload===W&&ae.onunload({preventDefault:F});if(L.call(h.tag)!=I)return;var ne,he=0===f.nodes.length;if(h.attrs.xmlns?m=h.
attrs.xmlns:"svg"===h.tag?m="http://www.w3.org/2000/svg":"math"===h.tag&&(m="http://www.w3.org/1998/Math/MathML"),he){if(ne=h.attrs.is?m===e?A.createElement(h.tag,h.attrs.is):A.createElementNS(m,h.tag,h.attrs.is):m===e?A.createElement(h.tag):A.createElementNS(m,h.tag),f={tag:h.tag,attrs:le?u(ne,h.tag,h.attrs,{},m):h.attrs,children:null!=h.children&&h.children.length>0?o(ne,h.tag,e,e,h.children,f.children,!0,0,h.attrs.contenteditable?ne:v,m,g):h.children,nodes:[ne]},oe.length){f.views=ie,f.controllers=oe;for(var ae,S=0;ae=oe[S];S++)if(ae.onunload&&ae.onunload.$old&&(ae.onunload=ae.onunload.$old),re&&ae.onunload){var fe=ae.onunload;ae.onunload=F,ae.onunload.$old=fe}}f.children&&!f.children.nodes&&(f.children.nodes=[]),"select"===h.tag&&"value"in h.attrs&&u(ne,h.tag,{value:h.attrs.value},{},m),t.insertBefore(ne,t.childNodes[d]||null)}else ne=f.nodes[0],le&&u(ne,h.tag,h.attrs,f.attrs,m),f.children=o(ne,h.tag,e,e,h.children,f.children,!1,0,h.attrs.contenteditable?ne:v,m,g),f.node
s.intact=!0,oe.length&&(f.views=ie,f.controllers=oe),p===!0&&null!=ne&&t.insertBefore(ne,t.childNodes[d]||null);if(typeof h.attrs.config===W){var pe=f.configContext=f.configContext||{},de=function(t,e){return function(){return t.attrs.config.apply(t,e)}};g.push(de(h,[ne,!he,pe,f]))}}else if(typeof h!=W){var C;0===f.nodes.length?(h.$trusted?C=l(t,d,h):(C=[A.createTextNode(h)],t.nodeName.match(B)||t.insertBefore(C[0],t.childNodes[d]||null)),f="string number boolean".indexOf(typeof h)>-1?new h.constructor(h):h,f.nodes=C):f.valueOf()!==h.valueOf()||p===!0?(C=f.nodes,v&&v===A.activeElement||(h.$trusted?(a(C,f),C=l(t,d,h)):"textarea"===n?t.value=h:v?v.innerHTML=h:((1===C[0].nodeType||C.length>1)&&(a(f.nodes,f),C=[A.createTextNode(h)]),t.insertBefore(C[0],t.childNodes[d]||null),C[0].nodeValue=h)),f=new h.constructor(h),f.nodes=C):f.nodes.intact=!0}return f}function s(t,e){return t.action-e.action||t.index-e.index}function u(t,e,n,r,i){for(var o in n){var s=n[o],u=r[o];if(o in r&&u=
==s)"value"===o&&"input"===e&&t.value!=s&&(t.value=s);else{r[o]=s;try{if("config"===o||"key"==o)continue;if(typeof s===W&&0===o.indexOf("on"))t[o]=h(s,t);else if("style"===o&&null!=s&&L.call(s)===O){for(var a in s)(null==u||u[a]!==s[a])&&(t.style[a]=s[a]);for(var a in u)a in s||(t.style[a]="")}else null!=i?"href"===o?t.setAttributeNS("http://www.w3.org/1999/xlink","href",s):"className"===o?t.setAttribute("class",s):t.setAttribute(o,s):o in t&&"list"!==o&&"style"!==o&&"form"!==o&&"type"!==o&&"width"!==o&&"height"!==o?("input"!==e||t[o]!==s)&&(t[o]=s):t.setAttribute(o,s)
}catch(c){if(c.message.indexOf("Invalid argument")<0)throw c}}}return r}function a(t,e){for(var n=t.length-1;n>-1;n--)if(t[n]&&t[n].parentNode){try{t[n].parentNode.removeChild(t[n])}catch(r){}e=[].concat(e),e[n]&&c(e[n])}0!=t.length&&(t.length=0)}function c(t){if(t.configContext&&typeof t.configContext.onunload===W&&(t.configContext.onunload(),t.configContext.onunload=null),t.controllers)for(var e,n=0;e=t.controllers[n];n++)typeof e.onunload===W&&e.onunload({preventDefault:F});if(t.children)if(L.call(t.children)===U)for(var r,n=0;r=t.children[n];n++)c(r);else t.children.tag&&c(t.children)}function l(t,e,n){var r=t.childNodes[e];if(r){var i=1!=r.nodeType,o=A.createElement("span");i?(t.insertBefore(o,r||null),o.insertAdjacentHTML("beforebegin",n),t.removeChild(o)):r.insertAdjacentHTML("beforebegin",n)}else t.insertAdjacentHTML("beforeend",n);for(var s=[];t.childNodes[e]!==r;)s.push(t.childNodes[e]),e++;return s}function h(t,e){return function(n){n=n||event,i.redraw.strategy("d
iff"),i.startComputation();try{return t.call(e,n)}finally{ie()}}}function f(t){var e=Z.indexOf(t);return 0>e?Z.push(t)-1:e}function p(t){var e=function(){return arguments.length&&(t=arguments[0]),t};return e.toJSON=function(){return t},e}function d(t,e){var n=function(){return(t.controller||F).apply(this,e)||this},r=function(n){return arguments.length>1&&(e=e.concat([].slice.call(arguments,1))),t.view.apply(t,e?[n].concat(e):[n])};r.$original=t.view;var i={controller:n,view:r};return e[0]&&null!=e[0].key&&(i.attrs={key:e[0].key}),i}function v(){K&&(K(),K=null);for(var t,e=0;t=X[e];e++)if(Y[e]){var n=J[e].controller&&J[e].controller.$$args?[Y[e]].concat(J[e].controller.$$args):[Y[e]];i.render(t,J[e].view?J[e].view(Y[e],n):"")}$&&($(),$=null),H=null,Q=new Date,i.redraw.strategy("diff")}function m(t){return t.slice(ue[i.route.mode].length)}function g(t,e,n){oe={};var r=n.indexOf("?");-1!==r&&(oe=_(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(e),s=o.indexOf(n);if(-
1!==s)return i.mount(t,e[o[s]]),!0;for(var u in e){if(u===n)return i.mount(t,e[u]),!0;var a=new RegExp("^"+u.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(a.test(n))return n.replace(a,function(){for(var n=u.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2),o=0,s=n.length;s>o;o++)oe[n[o].replace(/:|\./g,"")]=decodeURIComponent(r[o]);i.mount(t,e[u])}),!0}}function b(t){if(t=t||event,!t.ctrlKey&&!t.metaKey&&2!==t.which){t.preventDefault?t.preventDefault():t.returnValue=!1;for(var e=t.currentTarget||t.srcElement,n="pathname"===i.route.mode&&e.search?_(e.search.slice(1)):{};e&&"A"!=e.nodeName.toUpperCase();)e=e.parentNode;i.route(e[i.route.mode].slice(ue[i.route.mode].length),n)}}function y(){"hash"!=i.route.mode&&D.hash?D.hash=D.hash:t.scrollTo(0,0)}function w(t,n){var r={},i=[];for(var o in t){var s=n?n+"["+o+"]":o,u=t[o],a=L.call(u),c=null===u?encodeURIComponent(s):a===O?w(u,s):a===U?u.reduce(function(t,e){return r[s]||(r[s]={}),r[s][e]?t:(r[s
][e]=!0,t.concat(encodeURIComponent(s)+"="+encodeURIComponent(e)))},[]).join("&"):encodeURIComponent(s)+"="+encodeURIComponent(u);u!==e&&i.push(c)}return i.join("&")}function _(t){"?"===t.charAt(0)&&(t=t.substring(1));for(var e=t.split("&"),n={},r=0,i=e.length;i>r;r++){var o=e[r].split("="),s=decodeURIComponent(o[0]),u=2==o.length?decodeURIComponent(o[1]):null;null!=n[s]?(L.call(n[s])!==U&&(n[s]=[n[s]]),n[s].push(u)):n[s]=u}return n}function x(t){var n=f(t);a(t.childNodes,P[n]),P[n]=e}function S(t,e){var n=i.prop(e);return t.then(n),n.then=function(n,r){return S(t.then(n,r),e)},n}function E(t,e){function n(t){h=t||c,p.map(function(t){h===a&&t.resolve(f)||t.reject(f)})}function r(t,e,n,r){if((null!=f&&L.call(f)===O||typeof f===W)&&typeof t===W)try{var o=0;t.call(f,function(t){o++||(f=t,e())},function(t){o++||(f=t,n())})}catch(s){i.deferred.onerror(s),f=s,n()}else r()}function o(){var c;try{c=f&&f.then}catch(p){return i.deferred.onerror(p),f=p,h=u,o()}r(c,function(){h=s,o()},f
unction(){h=u,o()},function(){try{h===s&&typeof t===W?f=t(f):h===u&&"function"==typeof e&&(f=e(f),h=s)}catch(o){return i.deferred.onerror(o),f=o,n()}f===l?(f=TypeError(),n()):r(c,function(){n(a)},n,function(){n(h===s&&a)})})}var s=1,u=2,a=3,c=4,l=this,h=0,f=0,p=[];l.promise={},l.resolve=function(t){return h||(f=t,h=s,o()),this},l.reject=function(t){return h||(f=t,h=u,o()),this},l.promise.then=function(t,e){var n=new E(t,e);return h===a?n.resolve(f):h===c?n.reject(f):p.push(n),n.promise}}function C(t){return t}function k(n){if(!n.dataType||"jsonp"!==n.dataType.toLowerCase()){var r=new t.XMLHttpRequest;if(r.open(n.method,n.url,!0,n.user,n.password),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n.onload({type:"load",target:r}):n.onerror({type:"error",target:r}))},n.serialize===JSON.stringify&&n.data&&"GET"!==n.method&&r.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.deserialize===JSON.parse&&r.setRequestHeader("Accept","app
lication/json, text/*"),typeof n.config===W){var i=n.config(r,n);null!=i&&(r=i)}var o="GET"!==n.method&&n.data?n.data:"";if(o&&L.call(o)!=I&&o.constructor!=t.FormData)throw"Request data should be either be a string or FormData. Check the `serialize` option in `m.request`";return r.send(o),r}var s="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),u=A.createElement("script");t[s]=function(r){u.parentNode.removeChild(u),n.onload({type:"load",target:{responseText:r}}),t[s]=e},u.onerror=function(){return u.parentNode.removeChild(u),n.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),t[s]=e,!1},u.onload=function(){return!1},u.src=n.url+(n.url.indexOf("?")>0?"&":"?")+(n.callbackKey?n.callbackKey:"callback")+"="+s+"&"+w(n.data||{}),A.body.appendChild(u)}function j(t,e,n){if("GET"===t.method&&"jsonp"!=t.dataType){var r=t.url.indexOf("?")<0?"?":"&",i=w(e);t.url=t.url+(i?r+i:"")}else t.da
ta=n(e);return t}function N(t,e){var n=t.match(/:[a-z]\w+/gi);if(n&&e)for(var r=0;r<n.length;r++){var i=n[r].slice(1);t=t.replace(n[r],e[i]),delete e[i]}return t}var A,D,R,T,O="[object Object]",U="[object Array]",I="[object String]",W="function",L={}.toString,M=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g,q=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/,B=/^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/,F=function(){};n(t);var V,G={appendChild:function(t){V===e&&(V=A.createElement("html")),A.documentElement&&A.documentElement!==t?A.replaceChild(t,A.documentElement):A.appendChild(t),this.childNodes=A.childNodes},insertBefore:function(t){this.appendChild(t)},childNodes:[]},Z=[],P={};i.render=function(t,n,r){var i=[];if(!t)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var s=f(t),u=t===A,c=u||t===A.documentElement?G:t;u&&"html"!=n.tag&&(n={tag:"html",attrs:{},children:n}),P[s]===e&&a(c.childNodes),r===!0&&
x(t),P[s]=o(c,null,e,e,n,P[s],!1,0,null,e,i);for(var l=0,h=i.length;h>l;l++)i[l]()},i.trust=function(t){return t=new String(t),t.$trusted=!0,t},i.prop=function(t){return(null!=t&&L.call(t)===O||typeof t===W)&&typeof t.then===W?S(t):p(t)};var z,X=[],J=[],Y=[],H=null,Q=0,K=null,$=null,te=[],ee=16;i.component=function(t){return d(t,[].slice.call(arguments,1))},i.mount=i.module=function(t,e){if(!t)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var n=X.indexOf(t);0>n&&(n=X.length);for(var r,o=!1,s={preventDefault:function(){o=!0,K=$=null}},u=0;r=te[u];u++)r.handler.call(r.controller,s),r.controller.onunload=null;if(o)for(var r,u=0;r=te[u];u++)r.controller.onunload=r.handler;else te=[];if(Y[n]&&typeof Y[n].onunload===W&&Y[n].onunload(s),!o){i.redraw.strategy("all"),i.startComputation(),X[n]=t,arguments.length>2&&(e=subcomponent(e,[].slice.call(arguments,2)));var a=z=e=e||{controller:function(){}},c=e.controller||F,l=new c;return a===z&
&(Y[n]=l,J[n]=e),ie(),Y[n]}};var ne=!1;i.redraw=function(e){ne||(ne=!0,H&&e!==!0?(R===t.requestAnimationFrame||new Date-Q>ee)&&(H>0&&T(H),H=R(v,ee)):(v(),H=R(function(){H=null},ee)),ne=!1)},i.redraw.strategy=i.prop();var re=0;i.startComputation=function(){re++},i.endComputation=function(){re=Math.max(re-1,0),0===re&&i.redraw()};var ie=function(){"none"==i.redraw.strategy()?(re--,i.redraw.strategy("diff")):i.endComputation()};i.withAttr=function(t,e){return function(n){n=n||event;var r=n.currentTarget||this;e(t in r?r[t]:r.getAttribute(t))}};var oe,se,ue={pathname:"",hash:"#",search:"?"},ae=F,ce=!1;return i.route=function(){if(0===arguments.length)return se;if(3===arguments.length&&L.call(arguments[1])===I){var e=arguments[0],n=arguments[1],r=arguments[2];ae=function(t){var o=se=m(t);if(!g(e,r,o)){if(ce)throw new Error("Ensure the default route matches one of the routes defined in m.route");ce=!0,i.route(n,!0),ce=!1}};var o="hash"===i.route.mode?"onhashchange":"onpopstate";t[
o]=function(){var t=D[i.route.mode];"pathname"===i.route.mode&&(t+=D.search),se!=m(t)&&ae(t)},K=y,t[o]()}else if(arguments[0].addEventListener||arguments[0].attachEvent){var s=arguments[0],u=(arguments[1],arguments[2],arguments[3]);s.href=("pathname"!==i.route.mode?D.pathname:"")+ue[i.route.mode]+u.attrs.href,s.addEventListener?(s.removeEventListener("click",b),s.addEventListener("click",b)):(s.detachEvent("onclick",b),s.attachEvent("onclick",b))}else if(L.call(arguments[0])===I){var a=se;se=arguments[0];var c=arguments[1]||{},l=se.indexOf("?"),h=l>-1?_(se.slice(l+1)):{};for(var f in c)h[f]=c[f];var p=w(h),d=l>-1?se.slice(0,l):se;p&&(se=d+(-1===d.indexOf("?")?"?":"&")+p);var v=(3===arguments.length?arguments[2]:arguments[1])===!0||a===arguments[0];t.history.pushState?(K=y,$=function(){t.history[v?"replaceState":"pushState"](null,A.title,ue[i.route.mode]+se)},ae(ue[i.route.mode]+se)):(D[i.route.mode]=se,ae(ue[i.route.mode]+se))}},i.route.param=function(t){if(!oe)throw new Err
or("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return oe[t]},i.route.mode="search",i.route.buildQueryString=w,i.route.parseQueryString=_,i.deferred=function(){var t=new E;return t.promise=S(t.promise),t},i.deferred.onerror=function(t){if("[object Error]"===L.call(t)&&!t.constructor.toString().match(/ Error/))throw t},i.sync=function(t){function e(t,e){return function(i){return s[t]=i,e||(n="reject"),0===--o&&(r.promise(s),r[n](s)),i}}var n="resolve",r=i.deferred(),o=t.length,s=new Array(o);if(t.length>0)for(var u=0;u<t.length;u++)t[u].then(e(u,!0),e(u,!1));else r.resolve([]);return r.promise},i.request=function(t){t.background!==!0&&i.startComputation();var e=new E,n=t.dataType&&"jsonp"===t.dataType.toLowerCase(),r=t.serialize=n?C:t.serialize||JSON.stringify,o=t.deserialize=n?C:t.deserialize||JSON.parse,s=n?function(t){return t.responseText}:t.extract||function(t){return 0===t.responseText.length&&o===JSON.parse?null:t.responseText}
;return t.method=(t.method||"GET").toUpperCase(),t.url=N(t.url,t.data),t=j(t,t.data,r),t.onload=t.onerror=function(n){try{n=n||event;var r=("load"===n.type?t.unwrapSuccess:t.unwrapError)||C,u=r(o(s(n.target,t)),n.target);if("load"===n.type)if(L.call(u)===U&&t.type)for(var a=0;a<u.length;a++)u[a]=new t.type(u[a]);else t.type&&(u=new t.type(u));e["load"===n.type?"resolve":"reject"](u)}catch(n){i.deferred.onerror(n),e.reject(n)}t.background!==!0&&i.endComputation()},k(t),e.promise=S(e.promise,t.initialValue),e.promise},i.deps=function(e){return n(t=e||t),t},i.deps.factory=r,i}("undefined"!=typeof window?window:{});"undefined"!=typeof e&&null!==e&&e.exports?e.exports=n:"function"==typeof define&&define.amd&&define(function(){return n})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/node_modules/simple-modal/simple-modal.compiled.js":[function(t,e,n){(function(r){!function(t){if("object"==typeof n&&"undefined"!=typeof e)e.exports=t();else if("
function"==typeof define&&define.amd)define([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof r?r:"undefined"!=typeof self?self:this,i.createSimpleModal=t()}}(function(){var e;return function n(e,r,i){function o(u,a){if(!r[u]){if(!e[u]){var c="function"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};e[u][0].call(h.exports,function(t){var n=e[u][1][t];return o(n?n:t)},h,h.exports,n,e,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(){},{}],2:[function(t,n,i){(function(r){!function(t){if("object"==typeof i&&"undefined"!=typeof n)n.exports=t();else if("function"==typeof e&&e.amd)e([],t);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof r?r:"undefined"!=typeof self?self:this,o.jade=t()}}(function(){return function e(n,r,i){function o(u,a){if(!r[u]){if(!n[u]){var c="fun
ction"==typeof t&&t;if(!a&&c)return c(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[u]={exports:{}};n[u][0].call(h.exports,function(t){var e=n[u][1][t];return o(e?e:t)},h,h.exports,e,n,r,i)}return r[u].exports}for(var s="function"==typeof t&&t,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,e,n){"use strict";function r(t){return null!=t&&""!==t}function i(t){return(Array.isArray(t)?t.map(i):t&&"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}):[t]).filter(r).join(" ")}function o(t){return u[t]||t}function s(t){var e=String(t).replace(a,o);return e===""+t?t:e}n.merge=function c(t,e){if(1===arguments.length){for(var n=t[0],i=1;i<t.length;i++)n=c(n,t[i]);return n}var o=t["class"],s=e["class"];(o||s)&&(o=o||[],s=s||[],Array.isArray(o)||(o=[o]),Array.isArray(s)||(s=[s]),t["class"]=o.concat(s).filter(r));for(var u in e)"class"!=u&&(t[u]=e[u]);return t},n.joinClasses=i,n.cls=function(t,e){for(va
r r=[],o=0;o<t.length;o++)r.push(e&&e[o]?n.escape(i([t[o]])):i(t[o]));var s=i(r);return s.length?' class="'+s+'"':""},n.style=function(t){return t&&"object"==typeof t?Object.keys(t).map(function(e){return e+":"+t[e]}).join(";"):t},n.attr=function(t,e,r,i){return"style"===t&&(e=n.style(e)),"boolean"==typeof e||null==e?e?" "+(i?t:t+'="'+t+'"'):"":0==t.indexOf("data")&&"string"!=typeof e?(-1!==JSON.stringify(e).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),e&&"function"==typeof e.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+t+"='"+JSON.stringify(e).replace(/'/g,"&apos;")+"'"):r?(e&&"function"==typeof e.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+t+'="'+n.escape(e)+'"'):(e&&"function"==typeof e.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+t+'="'+e+'"')},n.attrs=function(t,e){va
r r=[],o=Object.keys(t);if(o.length)for(var s=0;s<o.length;++s){var u=o[s],a=t[u];"class"==u?(a=i(a))&&r.push(" "+u+'="'+a+'"'):r.push(n.attr(u,a,!1,e))}return r.join("")};var u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},a=/[&<>"]/g;n.escape=s,n.rethrow=function l(e,n,r,i){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||i))throw e.message+=" on line "+r,e;try{i=i||t("fs").readFileSync(n,"utf8")}catch(o){l(e,null,r)}var s=3,u=i.split("\n"),a=Math.max(r-s,0),c=Math.min(u.length,r+s),s=u.slice(a,c).map(function(t,e){var n=e+a+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");throw e.path=n,e.message=(n||"Jade")+":"+r+"\n"+s+"\n\n"+e.message,e},n.DebugItem=function(t,e){this.lineno=t,this.filename=e}},{fs:2}],2:[function(){},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{fs:1}],3:[function(t,e){e.exports=t("./lib/index.coffee")},{"./lib/index.coffee":4}],4:[function(t,e){var
n,r;t("./style.css"),e.exports=function(t){var e;return null==t&&(t={}),e=new n(t)},r=t("./modal.jade"),n=function(){function t(t){var e,n,r,i,o,s,u,a;this.m={},this.last=null,this.opts={title:"",content:"What would you like to do?",buttons:[{text:"Cancel",closeOnClick:!0},{text:"Confirm",className:"btn-primary",closeOnClick:!0}],clickOutsideToClose:!0,hideOtherModals:!0,removeOnClose:!0,onClose:function(){},attachToBody:!0,width:"0px",minWidth:"560px",maxHeight:0,minHeight:"0px"},n={closeOnClick:!0};for(r in t)if(s=t[r],this.opts[r]=s,"buttons"===r)for(u=0,a=s.length;a>u;u++){e=s[u];for(i in n)o=n[i],null==e[i]&&(e[i]=o)}this.build()}return t.prototype.build=function(){var t,e,n,i,o,s,u,a,c,l,h;for(c=this,this.m=document.createElement("div"),this.m.className="simple-modal-holder",this.m.innerHTML=r(this.opts),this.updateContent(this.opts.content),n=this.m.querySelector(".simple-modal-body"),i=this.m.querySelector(".simple-modal-content"),this.opts.width&&(n.style.width=this
.opts.width),this.opts.minWidth&&(n.style.minWidth=this.opts.minWidth),this.opts.maxHeight>0?i.style.maxHeight=this.opts.maxHeight+"px":(a=.7*window.innerHeight,i.style.maxHeight=a+"px"),this.opts.minHeight&&(i.style.minHeight=this.opts.minHeight),o=this.m.querySelectorAll(".simple-modal-controls>button"),s=l=0,h=o.length;h>l;s=++l)t=o[s],null!=this.opts.buttons[s]&&(u=this.opts.buttons[s],t.setAttribute("data-index",s),t.onclick=null!=u.callback?function(t){var e,n;return n=t.target.getAttribute("data-index"),e=c.opts.buttons[n],e.callback(t),e.closeOnClick?c.close():void 0}:function(t){var e,n;return n=t.target.getAttribute("data-index"),e=c.opts.buttons[n],e.closeOnClick?c.close():void 0});return this.opts.clickOutsideToClose&&(e=this.m.querySelector(".simple-modal-overlay"),e.onclick=function(){return c.close()}),this.opts.attachToBody&&document.body.appendChild(this.m),this.show()},t.prototype.updateContent=function(t,e){var n;return null==e&&(e=!0),n=this.m.querySelect
or(".simple-modal-content"),e&&(n.innerHTML=""),"string"==typeof t?n.innerHTML=n.innerHTML+t:n.appendChild(t)},t.prototype.updateHeader=function(t,e){var n;return null==e&&(e=!0),n=this.m.querySelector(".simple-modal-title"),e&&(n.innerHTML=""),"string"==typeof t?n.innerHTML=n.innerHTML+t:n.appendChild(t)},t.prototype.deconstruct=function(){return this.m?(this.m.parentNode.removeChild(this.m),this.m=null):void 0},t.prototype.close=function(){return this.opts.hideOtherModals&&this.last&&(this.last.style.display="block"),this.m?(this.opts.onClose(),this.opts.removeOnClose?this.deconstruct():this.m.style.display="none"):void 0},t.prototype.show=function(){var t,e,n,r;if(this.opts.hideOtherModals)for(e=document.body.querySelectorAll(".simple-modal-holder"),n=0,r=e.length;r>n;n++)t=e[n],"block"===t.style.display&&(this.last=t),t.style.display="none";return this.m?this.m.style.display="block":void 0},t.prototype.hide=function(){return this.opts.hideOtherModals&&this.last&&(this.la
st.style.display="block"),this.m?this.m.style.display="none":void 0},t}()},{"./modal.jade":5,"./style.css":6}],5:[function(t,e){var n=t("jade/runtime");e.exports=function(t){var e,r=[],i=t||{};return function(t,i){r.push('<div class="simple-modal-overlay"></div><div class="simple-modal-body">'),i&&r.push('<h1 class="simple-modal-title">'+n.escape(null==(e=i)?"":e)+"</h1>"),r.push('<div class="simple-modal-content"></div>'),t.length&&(r.push('<div class="simple-modal-controls">'),function(){var i=t;if("number"==typeof i.length)for(var o=0,s=i.length;s>o;o++){var u=i[o];r.push("<button"+n.cls(["btn","simple-modal-btn",u.className],[null,null,!0])+">"+n.escape(null==(e=u.text)?"":e)+"</button>")}else{var s=0;for(var o in i){s++;var u=i[o];r.push("<button"+n.cls(["btn","simple-modal-btn",u.className],[null,null,!0])+">"+n.escape(null==(e=u.text)?"":e)+"</button>")}}}.call(this),r.push("</div>")),r.push("</div>")}.call(this,"buttons"in i?i.buttons:"undefined"!=typeof buttons?butt
ons:void 0,"title"in i?i.title:"undefined"!=typeof title?title:void 0,"undefined"in i?i.undefined:void 0),r.join("")}},{"jade/runtime":2}],6:[function(t,e){var n=".simple-modal-body { position: fixed; top: 10%; left: 50%; z-index: 1051; margin-left: -280px; background-color: #ffffff; border: 1px solid rgba(0, 0, 0, 0.3); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; outline: none; -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; padding: 20px;}.simple-modal-title { margin: 0px 0px 0px 0px; padding-bottom: 5px; border-bottom: 1px solid #eee;}.simple-modal-content { margin: 15px 0px 15px 0px; overflow: auto;}.simple-modal-btn { margin: 5px;}.simple-modal-controls { text-align: right;}.simple-modal-overlay { opacity: 0.8; position:
fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; background-color: #000000;}";t("/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/node_modules/simple-modal/node_modules/cssify")(n),e.exports=n},{"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/mithril-simple-modal/node_modules/simple-modal/node_modules/cssify":7}],7:[function(t,e){e.exports=function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),e.appendChild(n)},e.exports.byUrl=function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("link");n.rel="stylesheet",n.href=t,e.appendChild(n)}},{}]},{},[3])(3)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/levenshtein/lib/levenshtein.js":[f
unction(t,e){!function(t,n){"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return n(t)}):"object"==typeof e&&e&&e.exports?e.exports=n(t):t.Levenshtein=n(t)}(this,function(){function t(t,e){var n,r;for(n=-1,r=t.length;++n<r;)e(t[n],n,t)}function e(e,n){var r;return r=Array(e.length),t(e,function(t,e,i){r[e]=n(t,e,i)}),r}function n(e,n,r){return t(e,function(t,e,i){r=n(t,e,i)}),r}function r(e,n){var r,i,o;return o=this._matrix=[],e==n?this.distance=0:""==e?this.distance=n.length:""==n?this.distance=e.length:(r=[0],t(e,function(t,e){e++,r[e]=e}),o[0]=r,t(n,function(s,u){i=[++u],t(e,function(t,o){o++,i[o]=e.charAt(o-1)==n.charAt(u-1)?r[o-1]:Math.min(r[o]+1,i[o-1]+1,r[o-1]+1)}),r=i,o[o.length]=r}),this.distance=i[i.length-1])}return r.prototype.toString=r.prototype.inspect=function(){var t,r,i,o,s;for(t=this.getMatrix(),r=n(t,function(t,e){return Math.max(t,n(e,Math.max,0))},0),i=Array((r+"").length).join(" "),o=[];o.length<(t[0]&&t[0].length
||0);)o[o.length]=Array(i.length+1).join("-");return o=o.join("-+")+"-",s=e(t,function(t){var n;return n=e(t,function(t){return(i+t).slice(-i.length)}),n.join(" |")+" "}),s.join("\n"+o+"\n")},r.prototype.getMatrix=function(){return this._matrix.slice()},r.prototype.valueOf=function(){return this.distance},r})},{}],"/Users/andersriutta/Sites/kaavio-editor-lkg/lib/mithril-utils.js":[function(t,e){function n(t){return s.isArray(t)?t:[t]}function r(t){return t||t===!1||0===t?n(t):[]}function i(t){var e=window.m.deferred();return t.toArray(function(t){e.resolve(t),window.m.redraw()}),e.promise}function o(t){return t.flatMap(function(t){return u.pairs(t).reduce({},function(t,e){var n=e[0],r=e[1];return t[n]=window.m.prop(r),t})})}var s=t("lodash"),u=t("highland"),a=(t("rx"),u.compose(window.m.prop,i));e.exports={arrayify:n,arrayifyClean:r,promisify:i,promisifiedProp:a,propify:o}},{highland:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/highland/lib/index.js",lodash:"/Us
ers/andersriutta/Sites/kaavio-editor-lkg/node_modules/lodash/index.js",rx:"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js"}],"/Users/andersriutta/Sites/kaavio-editor-lkg/node_modules/rx/dist/rx.all.js":[function(t,e,n){(function(t,r){(function(i){function o(t){for(var e=[],n=0,r=t.length;r>n;n++)e.push(t[n]);return e}function u(t,e){if(Ve&&e.stack&&"object"==typeof t&&null!==t&&t.stack&&-1===t.stack.indexOf(ze)){for(var n=[],r=e;r;r=r.source)r.stack&&n.unshift(r.stack);n.unshift(t.stack);var i=n.join("\n"+ze+"\n");t.stack=a(i)}}function a(t){for(var e=t.split("\n"),n=[],r=0,i=e.length;i>r;r++){var o=e[r];c(o)||l(o)||!o||n.push(o)}return n.join("\n")}function c(t){var e=f(t);if(!e)return!1;var n=e[0],r=e[1];return n===Ze&&r>=Pe&&Zi>=r}function l(t){return-1!==t.indexOf("(module.js:")||-1!==t.indexOf("(node.js:")}function h(){if(Ve)try{throw new Error}catch(t){var e=t.stack.split("\n"),n=e[0].indexOf("@")>0?e[1]:e[2],r=f(n);if(!r)return;return Ze=r[
0],r[1]}}function f(t){var e=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);if(e)return[e[1],Number(e[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(t);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(t);return r?[r[1],Number(r[2])]:void 0}function p(t){var e=[];if(!Nn(t))return e;jn.nonEnumArgs&&t.length&&An(t)&&(t=Tn.call(t));var n=jn.enumPrototypes&&"function"==typeof t,r=jn.enumErrorProps&&(t===xn||t instanceof Error);for(var i in t)n&&"prototype"==i||r&&("message"==i||"name"==i)||e.push(i);if(jn.nonEnumShadows&&t!==Sn){var o=t.constructor,s=-1,u=an;if(t===(o&&o.prototype))var a=t===En?bn:t===xn?pn:yn.call(t),c=kn[a];for(;++s<u;)i=un[s],c&&c[i]||!wn.call(t,i)||e.push(i)}return e}function d(t,e,n){for(var r=-1,i=n(t),o=i.length;++r<o;){var s=i[r];if(e(t[s],s,t)===!1)break}return t}function v(t,e){return d(t,e,p)}function m(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function g(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;var i=typeof t,o=typeof e;if(t===t&&
(null==t||null==e||"function"!=i&&"object"!=i&&"function"!=o&&"object"!=o))return!1;var s=yn.call(t),u=yn.call(e);if(s==cn&&(s=mn),u==cn&&(u=mn),s!=u)return!1;switch(s){case hn:case fn:return+t==+e;case vn:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case gn:case bn:return t==String(e)}var a=s==ln;if(!a){if(s!=mn||!jn.nodeClass&&(m(t)||m(e)))return!1;var c=!jn.argsObject&&An(t)?Object:t.constructor,l=!jn.argsObject&&An(e)?Object:e.constructor;if(!(c==l||wn.call(t,"constructor")&&wn.call(e,"constructor")||Fe(c)&&c instanceof c&&Fe(l)&&l instanceof l||!("constructor"in t&&"constructor"in e)))return!1}n||(n=[]),r||(r=[]);for(var h=n.length;h--;)if(n[h]==t)return r[h]==e;var f=0,p=!0;if(n.push(t),r.push(e),a){if(h=t.length,f=e.length,p=f==h)for(;f--;){var d=e[f];if(!(p=g(t[f],d,n,r)))break}}else v(e,function(e,i,o){return wn.call(o,i)?(f++,p=wn.call(t,i)&&g(t[i],e,n,r)):void 0}),p&&v(t,function(t,e,n){return wn.call(n,e)?p=--f>-1:void 0});return n.pop(),r.pop(),p}function b(t,e){for(v
ar n=new Array(t),r=0;t>r;r++)n[r]=e();return n}function y(){try{return Dn.apply(this,arguments)}catch(t){return Wn.e=t,Wn}}function w(t){if(!Fe(t))throw new TypeError("fn must be a function");return Dn=t,y}function _(t){throw t}function x(t,e){this.id=t,this.value=e}function S(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function E(t,e){e.isDisposed||(e.isDisposed=!0,e.disposable.dispose())}function C(){this._s=s}function k(){this._s=s,this._l=s.length,this._i=0}function j(t){this._a=t}function N(t){this._a=t,this._l=T(t),this._i=0}function A(t){return"number"==typeof t&&je.isFinite(t)}function D(t){var e,n=t[tn];if(!n&&"string"==typeof t)return e=new C(t),e[tn]();if(!n&&t.length!==i)return e=new j(t),e[tn]();if(!n)throw new TypeError("Object is not iterable");return t[tn]()}function R(t){var e=+t;return 0===e?e:isNaN(e)?e:0>e?-1:1}function T(t){var e=+t.length;return isNaN(e)?0:0!==e&&A(e)?(e=R(e)*Math.floor(Math.abs(e)),0>=e?0:e>Mr?Mr:e):e}function O(t,e){th
is.observer=t,this.parent=e}function U(t,e){return Kn(t)||(t=rr),new Br(e,t)}function I(t,e){this.observer=t,this.parent=e}function W(t,e){this.observer=t,this.parent=e}function L(t,e){return new Mi(function(n){var r=new zn,i=new Xn;return i.setDisposable(r),r.setDisposable(t.subscribe(function(t){n.onNext(t)},function(t){try{var r=e(t)}catch(o){return n.onError(o)}qe(r)&&(r=Rr(r));var s=new zn;i.setDisposable(s),s.setDisposable(r.subscribe(n))},function(t){n.onCompleted(t)})),i},t)}function M(){return!1}function q(t,e){var n=this;return new Mi(function(r){var i=0,o=t.length;return n.subscribe(function(n){if(o>i){var s=t[i++],u=w(e)(n,s);if(u===Wn)return r.onError(u.e);r.onNext(u)}else r.onCompleted()},function(t){r.onError(t)},function(){r.onCompleted()})},n)}function M(){return!1}function B(){return[]}function M(){return!1}function F(){return[]}function V(t,e){this.observer=t,this.accumulator=e.accumulator,this.hasSeed=e.hasSeed,this.seed=e.seed,this.hasAccumulation=!1,thi
s.accumulation=null,this.hasValue=!1,this.isStopped=!1}function G(t,e,n){var r=sn(e,n,3);return t.map(function(e,n){var i=r(e,n,t);return qe(i)&&(i=Rr(i)),(rn(i)||nn(i))&&(i=qr(i)),i}).concatAll()}function Z(t,e,n){for(var r=0,i=t.length;i>r;r++)if(n(t[r],e))return r;return-1}function P(t){this.comparer=t,this.set=[]}function z(t,e,n){var r=sn(e,n,3);return t.map(function(e,n){var i=r(e,n,t);return qe(i)&&(i=Rr(i)),(rn(i)||nn(i))&&(i=qr(i)),i}).mergeAll()}function X(t,e,n){return new Mi(function(r){var i=!1,o=null,s=[];return t.subscribe(function(t){var u,a;try{a=e(t)}catch(c){return void r.onError(c)}if(u=0,i)try{u=n(a,o)}catch(l){return void r.onError(l)}else i=!0,o=a;u>0&&(o=a,s=[]),u>=0&&s.push(t)},function(t){r.onError(t)},function(){r.onNext(s),r.onCompleted()})},t)}function J(t){if(0===t.length)throw new Xe;return t[0]}function Y(t,e,n,r){if(0>e)throw new Ye;return new Mi(function(i){var o=e;return t.subscribe(function(t){0===o--&&(i.onNext(t),i.onCompleted())},functi
on(t){i.onError(t)},function(){n?(i.onNext(r),i.onCompleted()):i.onError(new Ye)})},t)}function H(t,e,n){return new Mi(function(r){var i=n,o=!1;return t.subscribe(function(t){o?r.onError(new Error("Sequence contains more than one element")):(i=t,o=!0)},function(t){r.onError(t)},function(){o||e?(r.onNext(i),r.onCompleted()):r.onError(new Xe)})},t)}function Q(t,e,n){return new Mi(function(r){return t.subscribe(function(t){r.onNext(t),r.onCompleted()},function(t){r.onError(t)},function(){e?(r.onNext(n),r.onCompleted()):r.onError(new Xe)})},t)}function K(t,e,n){return new Mi(function(r){var i=n,o=!1;return t.subscribe(function(t){i=t,o=!0},function(t){r.onError(t)},function(){o||e?(r.onNext(i),r.onCompleted()):r.onError(new Xe)})},t)}function $(t,e,n,r){var o=sn(e,n,3);return new Mi(function(e){var n=0;return t.subscribe(function(i){var s;try{s=o(i,n,t)}catch(u){return void e.onError(u)}s?(e.onNext(r?n:i),e.onCompleted()):n++},function(t){e.onError(t)},function(){e.onNext(r?-1:i
),e.onCompleted()})},t)}function te(t,e){return Array.isArray(t)?ee.call(e,t):oe(t)?bi(t.call(e)):se(t)?bi(t):ie(t)?ne(t):qe(t)?re(t):typeof t===mi?t:Nn(t)||Array.isArray(t)?ee.call(e,t):t}function ee(t){var e=this;return function(n){function r(t,r){if(!i)try{if(t=te(t,e),typeof t!==mi)return u[r]=t,--s||n(null,u);t.call(e,function(t,e){if(!i){if(t)return i=!0,n(t);u[r]=e,--s||n(null,u)}})}catch(o){i=!0,n(o)}}var i,o=Object.keys(t),s=o.length,u=new t.constructor;if(!s)return void ur.schedule(function(){n(null,u)});for(var a=0,c=o.length;c>a;a++)r(t[o[a]],o[a])}}function ne(t){return function(e){var n,r=!1;t.subscribe(function(t){n=t,r=!0},e,function(){r&&e(null,n)})}}function re(t){return function(e){t.then(function(t){e(null,t)},e)}}function ie(t){return t&&typeof t.subscribe===mi}function oe(t){return t&&t.constructor&&"GeneratorFunction"===t.constructor.name}function se(t){return t&&typeof t.next===mi&&typeof t[gi]===mi}function ue(t){t&&ur.schedule(function(){throw t})}f
unction ae(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1),Vn(function(){t.removeEventListener(e,n,!1)});throw new Error("No listener found")}function ce(t,e,n){var r=new qn,i=Object.prototype.toString;if("[object NodeList]"===i.call(t)||"[object HTMLCollection]"===i.call(t))for(var o=0,s=t.length;s>o;o++)r.add(ce(t.item(o),e,n));else t&&r.add(ae(t,e,n));
return r}function le(t,e,n){return new Mi(function(r){function i(t,e){if(c[e]=t,s[e]=!0,u||(u=s.every(Ue))){if(o)return r.onError(o);var i=w(n).apply(null,c);if(i===Wn)return r.onError(i.e);r.onNext(i)}a&&c[1]&&r.onCompleted()}var o,s=[!1,!1],u=!1,a=!1,c=new Array(2);return new qn(t.subscribe(function(t){i(t,0)},function(t){c[1]?r.onError(t):o=t},function(){a=!0,c[1]&&r.onCompleted()}),e.subscribe(function(t){i(t,1)},function(t){r.onError(t)},function(){a=!0,i(!0,1)}))},t)}function he(t,e){return t.groupJoin(this,e,Ir,function(t,e){return e})}function fe(t){var e=this;return new Mi(function(n){var r=new Fi,i=new qn,o=new Jn(i);return n.onNext(In(r,o)),i.add(e.subscribe(function(t){r.onNext(t)},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),qe(t)&&(t=Rr(t)),i.add(t.subscribe(function(){r.onCompleted(),r=new Fi,n.onNext(In(r,o))},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),o},e)}function pe(t){var e
=this;return new Mi(function(n){function r(){var e;try{e=t()}catch(o){return void n.onError(o)}qe(e)&&(e=Rr(e));var a=new zn;i.setDisposable(a),a.setDisposable(e.take(1).subscribe(Oe,function(t){u.onError(t),n.onError(t)},function(){u.onCompleted(),u=new Fi,n.onNext(In(u,s)),r()}))}var i=new Xn,o=new qn(i),s=new Jn(o),u=new Fi;return n.onNext(In(u,s)),o.add(e.subscribe(function(t){u.onNext(t)},function(t){u.onError(t),n.onError(t)},function(){u.onCompleted(),n.onCompleted()})),r(),s},e)}function de(t,e){return new Ti(t,e)}function ve(t){this.patterns=t}function me(t,e){this.expression=t,this.selector=e}function ge(t,e,n){var r=t.get(e);if(!r){var i=new Wi(e,n);return t.set(e,i),i}return r}function be(t,e,n){this.joinObserverArray=t,this.onNext=e,this.onCompleted=n,this.joinObservers=new Ii;for(var r=0,i=this.joinObserverArray.length;i>r;r++){var o=this.joinObserverArray[r];this.joinObservers.set(o,o)}}function ye(t,e){return new Mi(function(n){return e.scheduleWithAbsolute(t
,function(){n.onNext(0),n.onCompleted()})})}function we(t,e,n){return new Mi(function(r){var i=t,o=Qn(e);return n.scheduleRecursiveWithAbsoluteAndState(0,i,function(t,e){if(o>0){var s=n.now();i+=o,s>=i&&(i=s+o)}r.onNext(t),e(t+1,i)})})}function _e(t,e){return new Mi(function(n){return e.scheduleWithRelative(Qn(t),function(){n.onNext(0),n.onCompleted()})})}function xe(t,e,n){return t===e?new Mi(function(t){return n.schedulePeriodicWithState(0,e,function(e){return t.onNext(e),e+1})}):Or(function(){return we(n.now()+t,e,n)})}function Se(t,e,n){return new Mi(function(r){var i,o=!1,s=new Xn,u=null,a=[],c=!1;return i=t.materialize().timestamp(n).subscribe(function(t){var i,l;"E"===t.value.kind?(a=[],a.push(t),u=t.value.exception,l=!c):(a.push({value:t.value,timestamp:t.timestamp+e}),l=!o,o=!0),l&&(null!==u?r.onError(u):(i=new zn,s.setDisposable(i),i.setDisposable(n.scheduleRecursiveWithRelative(e,function(t){var e,i,s,l;if(null===u){c=!0;do s=null,a.length>0&&a[0].timestamp-n.now(
)<=0&&(s=a.shift().value),null!==s&&s.accept(r);while(null!==s);l=!1,i=0,a.length>0?(l=!0,i=Math.max(0,a[0].timestamp-n.now())):o=!1,e=u,c=!1,null!==e?r.onError(e):l&&t(i)}}))))}),new qn(i,s)},t)}function Ee(t,e,n){return Or(function(){return Se(t,e-n.now(),n)})}function Ce(t,e){return new Mi(function(n){function r(){s&&(s=!1,n.onNext(i)),o&&n.onCompleted()}var i,o=!1,s=!1,u=new zn;return u.setDisposable(t.subscribe(function(t){s=!0,i=t},function(t){n.onError(t)},function(){o=!0,u.dispose()})),new qn(u,e.subscribe(r,function(t){n.onError(t)},r))},t)}var ke={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},je=ke[typeof window]&&window||this,Ne=ke[typeof n]&&n&&!n.nodeType&&n,Ae=ke[typeof e]&&e&&!e.nodeType&&e,De=Ae&&Ae.exports===Ne&&Ne,Re=ke[typeof r]&&r;!Re||Re.global!==Re&&Re.window!==Re||(je=Re);var Te={internals:{},config:{Promise:je.Promise},helpers:{}},Oe=Te.helpers.noop=function(){},Ue=(Te.helpers.notDefined=function(t){return"undefined"==typeof t
},Te.helpers.identity=function(t){return t}),Ie=(Te.helpers.pluck=function(t){return function(e){return e[t]}},Te.helpers.just=function(t){return function(){return t}},Te.helpers.defaultNow=Date.now),We=Te.helpers.defaultComparer=function(t,e){return Rn(t,e)},Le=Te.helpers.defaultSubComparer=function(t,e){return t>e?1:e>t?-1:0},Me=(Te.helpers.defaultKeySerializer=function(t){return t.toString()},Te.helpers.defaultError=function(t){throw t}),qe=Te.helpers.isPromise=function(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then},Be=(Te.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Te.helpers.not=function(t){return!t}),Fe=Te.helpers.isFunction=function(){var t=function(t){return"function"==typeof t||!1};return t(/x/)&&(t=function(t){return"function"==typeof t&&"[object Function]"==yn.call(t)}),t}();Te.config.longStackSupport=!1;var Ve=!1;try{throw new Error}catch(Ge){Ve=!!Ge.stack}var Ze,Pe=h(),ze="From previous event:",Xe=Te.EmptyEr
ror=function(){this.message="Sequence contains no elements.",Error.call(this)};Xe.prototype=Error.prototype;var Je=Te.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Je.prototype=Error.prototype;var Ye=Te.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ye.prototype=Error.prototype;var He=Te.NotSupportedError=function(t){this.message=t||"This operation is not supported",Error.call(this)};He.prototype=Error.prototype;var Qe=Te.NotImplementedError=function(t){this.message=t||"This operation is not implemented",Error.call(this)};Qe.prototype=Error.prototype;var Ke=Te.helpers.notImplemented=function(){throw new Qe},$e=Te.helpers.notSupported=function(){throw new He},tn="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";je.Set&&"function"==typeof(new je.Set)["@@iterator"]&&(tn="@@iterator");var en=Te.doneEnumerator={done:!0,value:i},nn=Te.helpers.isIterable=function(t){return t[tn]!==i
},rn=Te.helpers.isArrayLike=function(t){return t&&t.length!==i};Te.helpers.iterator=tn;var on,sn=Te.internals.bindCallback=function(t,e,n){if("undefined"==typeof e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},un=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],an=un.length,cn="[object Arguments]",ln="[object Array]",hn="[object Boolean]",fn="[object Date]",pn="[object Error]",dn="[object Function]",vn="[object Number]",mn="[object Object]",gn="[object RegExp]",bn="[object String]",yn=Object.prototype.toString,wn=Object.prototype.hasOwnProperty,_n=yn.call(arguments)==cn,xn=Error.prototype,Sn=Object.prototype,En=String.prototype,Cn=Sn.propertyIsEnumerable;try{on=!(yn.call(document)==mn&&!({toString:0}+""))
}catch(Ge){on=!0}var kn={};kn[ln]=kn[fn]=kn[vn]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},kn[hn]=kn[bn]={constructor:!0,toString:!0,valueOf:!0},kn[pn]=kn[dn]=kn[gn]={constructor:!0,toString:!0},kn[mn]={constructor:!0};var jn={};!function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);jn.enumErrorProps=Cn.call(xn,"message")||Cn.call(xn,"name"),jn.enumPrototypes=Cn.call(t,"prototype"),jn.nonEnumArgs=0!=n,jn.nonEnumShadows=!/valueOf/.test(e)}(1);var Nn=Te.internals.isObject=function(t){var e=typeof t;return t&&("function"==e||"object"==e)||!1},An=function(t){return t&&"object"==typeof t?yn.call(t)==cn:!1};_n||(An=function(t){return t&&"object"==typeof t?wn.call(t,"callee"):!1});var Dn,Rn=Te.internals.isEqual=function(t,e){return g(t,e,[],[])},Tn=({}.hasOwnProperty,Array.prototype.slice),On=this.inherits=Te.internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.pro
totype=new n},Un=Te.internals.addProperties=function(t){for(var e=[],n=1,r=arguments.length;r>n;n++)e.push(arguments[n]);for(var i=0,o=e.length;o>i;i++){var s=e[i];for(var u in s)t[u]=s[u]}},In=Te.internals.addRef=function(t,e){return new Mi(function(n){return new qn(e.getDisposable(),t.subscribe(n))})},Wn={e:{}};x.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var Ln=Te.internals.PriorityQueue=function(t){this.items=new Array(t),this.length=0},Mn=Ln.prototype;Mn.isHigherPriority=function(t,e){return this.items[t].compareTo(this.items[e])<0},Mn.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},Mn.heapify=function(t){if(+t||(t=0),!(t>=this.length||0>t)){var e=2*t+1,n=2*t+2,r=t;if(e<this.length&&this.isHigherPriority(e,r)&&(r=e),n<this.length&&this.isHigherPriority(n,r)&&(r=n),r!==t
){var i=this.items[t];this.items[t]=this.items[r],this.items[r]=i,this.heapify(r)}}},Mn.peek=function(){return this.items[0].value},Mn.removeAt=function(t){this.items[t]=this.items[--this.length],this.items[this.length]=i,this.heapify()},Mn.dequeue=function(){var t=this.peek();return this.removeAt(0),t},Mn.enqueue=function(t){var e=this.length++;this.items[e]=new x(Ln.count++,t),this.percolate(e)},Mn.remove=function(t){for(var e=0;e<this.length;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},Ln.count=0;var qn=Te.CompositeDisposable=function(){var t,e,n=[];if(Array.isArray(arguments[0]))n=arguments[0],e=n.length;else for(e=arguments.length,n=new Array(e),t=0;e>t;t++)n[t]=arguments[t];for(t=0;e>t;t++)if(!Zn(n[t]))throw new TypeError("Not a disposable");this.disposables=n,this.isDisposed=!1,this.length=n.length},Bn=qn.prototype;Bn.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},Bn.remove=function(t){var e=!1;if(!this.isD
isposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},Bn.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.disposables.length,e=new Array(t),n=0;t>n;n++)e[n]=this.disposables[n];for(this.disposables=[],this.length=0,n=0;t>n;n++)e[n].dispose()}};var Fn=Te.Disposable=function(t){this.isDisposed=!1,this.action=t||Oe};Fn.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Vn=Fn.create=function(t){return new Fn(t)},Gn=Fn.empty={dispose:Oe},Zn=Fn.isDisposable=function(t){return t&&Fe(t.dispose)},Pn=Fn.checkDisposed=function(t){if(t.isDisposed)throw new Je},zn=Te.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};zn.prototype.getDisposable=function(){return this.current},zn.prototype.setDisposable=function(t){if(this.current)throw new Error("Disposable has already been assigned");var e=this.isDisposed;!e&&(this.current=t),e&&t&&t.di
spose()},zn.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=null}t&&t.dispose()};var Xn=Te.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Xn.prototype.getDisposable=function(){return this.current},Xn.prototype.setDisposable=function(t){var e=this.isDisposed;if(!e){var n=this.current;this.current=t}n&&n.dispose(),e&&t&&t.dispose()},Xn.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=null}t&&t.dispose()};var Jn=Te.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disp
osable.underlyingDisposable.dispose()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?Gn:new t(this)},e}();S.prototype.dispose=function(){this.scheduler.scheduleWithState(this,E)};var Yn=Te.internals.ScheduledItem=function(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||Le,this.disposable=new zn};Yn.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Yn.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},Yn.prototype.isCancelled=function(){return this.disposable.isDisposed},Yn.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Hn=Te.Scheduler=function(){function t(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function e(t,e){ret
urn e(),Gn}t.isScheduler=function(e){return e instanceof t};var n=t.prototype;return n.schedule=function(t){return this._schedule(t,e)},n.scheduleWithState=function(t,e){return this._schedule(t,e)},n.scheduleWithRelative=function(t,n){return this._scheduleRelative(n,t,e)},n.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},n.scheduleWithAbsolute=function(t,n){return this._scheduleAbsolute(n,t,e)},n.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},t.now=Ie,t.normalize=function(t){return 0>t&&(t=0),t},t}(),Qn=Hn.normalize,Kn=Hn.isScheduler;!function(t){function e(t,e){function n(e){i(e,function(e){var r=!1,i=!1,s=t.scheduleWithState(e,function(t,e){return r?o.remove(s):i=!0,n(e),Gn});i||(o.add(s),r=!0)})}var r=e[0],i=e[1],o=new qn;return n(r),o}function n(t,e,n){function r(e){o(e,function(e,i){var o=!1,u=!1,a=t[n](e,i,function(t,e){return o?s.remove(a):u=!0,r(e),Gn});u||(s.add(a),o=!0)})}var i=e[0],o=e[1],s=new
qn;return r(i),s}function r(t,e){t(function(n){e(t,n)})}t.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,r)},t.scheduleRecursiveWithState=function(t,n){return this.scheduleWithState([t,n],e)},t.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,r)},t.scheduleRecursiveWithRelativeAndState=function(t,e,r){return this._scheduleRelative([t,r],e,function(t,e){return n(t,e,"scheduleWithRelativeAndState")})},t.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,r)},t.scheduleRecursiveWithAbsoluteAndState=function(t,e,r){return this._scheduleAbsolute([t,r],e,function(t,e){return n(t,e,"scheduleWithAbsoluteAndState")})}}(Hn.prototype),function(){Hn.prototype.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,e)},Hn.prototype.schedulePeriodicWithState=function(t,e,n){if("undefined"==typeof je.setInterval)throw new He;e=Qn(e);var r=t,i=je.setInt
erval(function(){r=n(r)},e);return Vn(function(){je.clearInterval(i)})}}(Hn.prototype),function(t){t.catchError=t["catch"]=function(t){return new ar(this,t)}}(Hn.prototype);var $n,tr,er=Te.internals.SchedulePeriodicRecursive=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new zn;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}(),nr=Hn.immediate=function(){function t(t,e){return e(this,t)}return new Hn(Ie,t,$e,$e)}(),rr=Hn.currentThread=function(){function t(){for(;n.length>0;){var t=n.dequeue();!t.isCancelled()&&t.invoke()}}function e(e,r){var i=new Yn(this,e,r,this.now());if(n)n.enqueue(i);else{n=new Ln(4),n.enqueue(i);var o=w(t)();if(n=null,o===Wn)return _(o.e)}return i.disposable}var n,r=new Hn
(Ie,e,$e,$e);return r.scheduleRequired=function(){return!n},r}(),ir=function(){var t,e=Oe;if(je.setTimeout)t=je.setTimeout,e=je.clearTimeout;else{if(!je.WScript)throw new He;t=function(t,e){je.WScript.Sleep(e),t()}}return{setTimeout:t,clearTimeout:e}}(),or=ir.setTimeout,sr=ir.clearTimeout;!function(){function e(t){if(s)or(function(){e(t)},0);else{var n=o[t];if(n){s=!0;var r=w(n)();if(tr(t),s=!1,r===Wn)return _(r.e)}}}function n(){if(!je.postMessage||je.importScripts)return!1;var t=!1,e=je.onmessage;return je.onmessage=function(){t=!0},je.postMessage("","*"),je.onmessage=e,t}function r(t){"string"==typeof t.data&&t.data.substring(0,c.length)===c&&e(t.data.substring(c.length))}var i=1,o={},s=!1;tr=function(t){delete o[t]};var u=RegExp("^"+String(yn).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),a="function"==typeof(a=Re&&De&&Re.setImmediate)&&!u.test(a)&&a;if(Fe(a))$n=function(t){var n=i++;return o[n]=t,a(function(){e(n)}),n};else if("undefi
ned"!=typeof t&&"[object process]"==={}.toString.call(t))$n=function(n){var r=i++;return o[r]=n,t.nextTick(function(){e(r)}),r};else if(n()){var c="ms.rx.schedule"+Math.random();je.addEventListener?je.addEventListener("message",r,!1):je.attachEvent?je.attachEvent("onmessage",r):je.onmessage=r,$n=function(t){var e=i++;return o[e]=t,je.postMessage(c+currentId,"*"),e}}else if(je.MessageChannel){var l=new je.MessageChannel;l.port1.onmessage=function(t){e(t.data)},$n=function(t){var e=i++;return o[e]=t,l.port2.postMessage(e),e}}else $n="document"in je&&"onreadystatechange"in je.document.createElement("script")?function(t){var n=je.document.createElement("script"),r=i++;return o[r]=t,n.onreadystatechange=function(){e(r),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},je.document.documentElement.appendChild(n),r}:function(t){var n=i++;return o[n]=t,or(function(){e(n)},0),n}}();var ur=Hn.timeout=Hn["default"]=function(){function t(t,e){var n=this,r=new zn,i=$n(function
(){!r.isDisposed&&r.setDisposable(e(n,t))});return new qn(r,Vn(function(){tr(i)}))}function e(t,e,n){var r=this,i=Hn.normalize(e),o=new zn;if(0===i)return r.scheduleWithState(t,n);var s=or(function(){!o.isDisposed&&o.setDisposable(n(r,t))},i);return new qn(o,Vn(function(){sr(s)}))}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new Hn(Ie,t,e,n)}(),ar=function(t){function e(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function n(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function r(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function i(i,o){this._scheduler=i,this._handler=o,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,this._scheduler.now.bind(this._scheduler),e,n,r)}return On(i,t),i.prototype._clone=function(t){return new i(t,this._handler)},i.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveW
rapper(n),r)}catch(i){if(!e._handler(i))throw i;return Gn}}},i.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},i.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new zn;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},i}(Hn),cr=Te.Notification=function(){function t(t,e,n,r,i,o){this.kind=t,this.value=e,this.exception=n,this._accept=r,this._acceptObservable=i,this.toString=o}return t.prototype.accept=function(t,e,n){return t&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},t.prototype.toObservable=function(t){var e=this;return Kn(t)||(t=nr),new Mi(function(n){return t.scheduleWithState(e,function(t,e){e._acceptObservable(n),"N"===e.
kind&&n.onCompleted()})})},t}(),lr=cr.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){return new cr("N",r,null,t,e,n)}}(),hr=cr.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){return new cr("E",null,r,t,e,n)}}(),fr=cr.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){return new cr("C",null,null,t,e,n)}}(),pr=Te.Observer=function(){};pr.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},pr.prototype.asObserver=function(){return new gr(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},pr.prototype.checked=function(){return new br(this)};var dr=pr.create=function(t,e,n){return t|
|(t=Oe),e||(e=Me),n||(n=Oe),new gr(t,e,n)};pr.fromNotifier=function(t,e){return new gr(function(n){return t.call(e,lr(n))},function(n){return t.call(e,hr(n))},function(){return t.call(e,fr())})},pr.prototype.notifyOn=function(t){return new wr(t,this)},pr.prototype.makeSafe=function(t){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,t)};var vr,mr=Te.internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return On(e,t),e.prototype.next=Ke,e.prototype.error=Ke,e.prototype.completed=Ke,e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.error(t),!0)},e}(pr),gr=Te.AnonymousObserver=function(t){function e(e,n,r){t.call(t
his),this._onNext=e,this._onError=n,this._onCompleted=r}return On(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(mr),br=function(t){function e(e){t.call(this),this._observer=e,this._state=0}On(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();var e=w(this._observer.onNext).call(this._observer,t);this._state=0,e===Wn&&_(e.e)},n.onError=function(t){this.checkAccess();var e=w(this._observer.onError).call(this._observer,t);this._state=2,e===Wn&&_(e.e)},n.onCompleted=function(){this.checkAccess();var t=w(this._observer.onCompleted).call(this._observer);this._state=2,t===Wn&&_(t.e)},n.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},e}(pr),yr=Te.internals.ScheduledObserver=function(t){function e(e,n){t.call(this),this.scheduler=e,th
is.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new Xn}return On(e,t),e.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},e.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},e.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},e.prototype.ensureActive=function(){var t=!1,e=this;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(t){var n;if(!(e.queue.length>0))return void(e.isAcquired=!1);n=e.queue.shift();try{n()}catch(r){throw e.queue=[],e.hasFaulted=!0,r}t()}))},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},e}(mr),wr=function(t){function e(e,n,r){t.call(this,e,n),this._cancel=r}return On(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e
.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},e}(yr),_r=Te.Observable=function(){function t(t){if(Te.config.longStackSupport&&Ve){try{throw new Error}catch(e){this.stack=e.stack.substring(e.stack.indexOf("\n")+1)}var n=this;this._subscribe=function(e){var r=e.onError.bind(e);return e.onError=function(t){u(t,n),r(t)},t.call(n,e)}}else this._subscribe=t}return vr=t.prototype,vr.subscribe=vr.forEach=function(t,e,n){return this._subscribe("object"==typeof t?t:dr(t,e,n))},vr.subscribeOnNext=function(t,e){return this._subscribe(dr("undefined"!=typeof e?function(n){t.call(e,n)}:t))},vr.subscribeOnError=function(t,e){return this._subscribe(dr(null,"undefined"!=typeof e?function(n){t.call(e,n)}:t))},vr.subscribeOnCompleted=function(t,e){return this
._subscribe(dr(null,null,"undefined"!=typeof e?function(){t.call(e)}:t))},t}(),xr=Te.ObservableBase=function(t){function e(t){return t&&Fe(t.dispose)?t:Fe(t)?Vn(t):Gn}function n(t,n){var r=n[0],i=n[1],o=w(i.subscribeCore).call(i,r);return o!==Wn||r.fail(Wn.e)?void r.setDisposable(e(o)):_(Wn.e)}function r(t){var e=new qi(t),r=[e,this];return rr.scheduleRequired()?rr.scheduleWithState(r,n):n(null,r),e}function i(){t.call(this,r)}return On(i,t),i.prototype.subscribeCore=Ke,i}(_r),Sr=Te.internals.Enumerable=function(){},Er=function(t){function e(e){this.sources=e,t.call(this)}function n(t,e,n){this.o=t,this.s=e,this.e=n,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){var e,r=new Xn,i=nr.scheduleRecursiveWithState(this.sources[tn](),function(i,o){if(!e){var s=w(i.next).call(i);if(s===Wn)return t.onError(s.e);if(s.done)return t.onCompleted();var u=s.value;qe(u)&&(u=Rr(u));var a=new zn;r.setDisposable(a),a.setDisposable(u.subscribe(new n(t,o,i)))}});return ne
w qn(r,i,Vn(function(){e=!0}))},n.prototype.onNext=function(t){this.isStopped||this.o.onNext(t)},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.s(this.e))},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);Sr.prototype.concat=function(){return new Er(this)};var Cr=function(t){function e(e){this.sources=e,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e,n=this.sources[tn](),r=new Xn,i=nr.scheduleRecursiveWithState(null,function(i,o){if(!e){var s=w(n.next).call(n);if(s===Wn)return t.onError(s.e);if(s.done)return null!==i?t.onError(i):t.onCompleted();var u=s.value;qe(u)&&(u=Rr(u));var a=new zn;r.setDisposable(a),a.setDisposable(u.subscribe(function(e){t.onNext(e)},o,function(){t.onCompleted()}))}});return new qn(r,i,Vn(function(){e=!0}))},e}
(xr);Sr.prototype.catchError=function(){return new Cr(this)},Sr.prototype.catchErrorWhen=function(t){var e=this;return new Mi(function(n){var r,i,o=new Fi,s=new Fi,u=t(o),a=u.subscribe(s),c=e[tn](),l=new Xn,h=nr.scheduleRecursive(function(t){if(!r){var e=w(c.next).call(c);if(e===Wn)return n.onError(e.e);if(e.done)return void(i?n.onError(i):n.onCompleted());var u=e.value;qe(u)&&(u=Rr(u));var a=new zn,h=new zn;l.setDisposable(new qn(h,a)),a.setDisposable(u.subscribe(function(t){n.onNext(t)},function(e){h.setDisposable(s.subscribe(t,function(t){n.onError(t)},function(){n.onCompleted()})),o.onNext(e)},function(){n.onCompleted()}))}});return new qn(a,l,h,Vn(function(){r=!0}))})};var kr=function(t){function e(t,e){this.v=t,this.c=null==e?-1:e}function n(t){this.v=t.v,this.l=t.c}return On(e,t),e.prototype[tn]=function(){return new n(this)},n.prototype.next=function(){return 0===this.l?en:(this.l>0&&this.l--,{done:!1,value:this.v})},e}(Sr),jr=Sr.repeat=function(t,e){return new kr(t,
e)},Nr=function(t){function e(t,e,n){this.s=t,this.fn=e?sn(e,n,3):null}function n(t){this.i=-1,this.s=t.s,this.l=this.s.length,this.fn=t.fn}return On(e,t),e.prototype[tn]=function(){return new n(this)},n.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:en},e}(Sr),Ar=Sr.of=function(t,e,n){return new Nr(t,e,n)};vr.observeOn=function(t){var e=this;return new Mi(function(n){return e.subscribe(new wr(t,n))},e)},vr.subscribeOn=function(t){var e=this;return new Mi(function(n){var r=new zn,i=new Xn;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new S(t,e.subscribe(n)))})),i},e)};var Dr=function(t){function e(e){this.p=e,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){return this.p.then(function(e){t.onNext(e),t.onCompleted()},function(e){t.onError(e)}),Gn},e}(xr),Rr=_r.fromPromise=function(t){return new Dr(t)};vr.toPromise=function(t){if(t||(t=Te.config.Prom
ise),!t)throw new He("Promise type not provided nor in Rx.config.Promise");var e=this;return new t(function(t,n){var r,i=!1;e.subscribe(function(t){r=t,i=!0},n,function(){i&&t(r)})})};var Tr=function(t){function e(e){this.source=e,t.call(this)}function n(t){this.o=t,this.a=[],this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t))},n.prototype.onNext=function(t){this.isStopped||this.a.push(t)},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onNext(this.a),this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.toArray=function(){return new Tr(this)},_r.create=_r.createWithDisposable=function(t,e){return new Mi(t,e)};var Or=_r.defer=function(t){return new Mi(function(e){var n;try{n=t()}ca
tch(r){return Hr(r).subscribe(e)}return qe(n)&&(n=Rr(n)),n.subscribe(e)})},Ur=function(t){function e(e){this.scheduler=e,t.call(this)}function n(t,e){this.observer=t,this.parent=e}function r(t,e){e.onCompleted()}return On(e,t),e.prototype.subscribeCore=function(t){var e=new n(t,this);return e.run()},n.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,r)},e}(xr),Ir=_r.empty=function(t){return Kn(t)||(t=nr),new Ur(t)},Wr=function(t){function e(e,n,r){this.iterable=e,this.mapper=n,this.scheduler=r,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new Lr(t,this);return e.run()},e}(xr),Lr=function(){function t(t,e){this.observer=t,this.parent=e}return t.prototype.run=function(){function t(t,e){try{var o=n.next()}catch(s){return r.onError(s)}if(o.done)return r.onCompleted();var u=o.value;if(i)try{u=i(u,t)}catch(s){return r.onError(s)}r.onNext(u),e(t+1)}var e=Object(this.parent.iterable),n=D(e),r=this.observer,i=this.parent.
mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,t)},t}(),Mr=Math.pow(2,53)-1;C.prototype[tn]=function(){return new k(this._s)},k.prototype[tn]=function(){return this},k.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:en},j.prototype[tn]=function(){return new N(this._a)},N.prototype[tn]=function(){return this},N.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:en};var qr=_r.from=function(t,e,n,r){if(null==t)throw new Error("iterable cannot be null.");if(e&&!Fe(e))throw new Error("mapFn when provided must be a function");if(e)var i=sn(e,n,2);return Kn(r)||(r=rr),new Wr(t,i,r)},Br=function(t){function e(e,n){this.args=e,this.scheduler=n,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new O(t,this);return e.run()},e}(xr);O.prototype.run=function(){function t(t,i){r>t?(e.onNext(n[t]),i(t+1)):e.onCompleted()}var e=this.observer,n=this.parent.args,r=n.length;return
this.parent.scheduler.scheduleRecursiveWithState(0,t)};var Fr=_r.fromArray=function(t,e){return Kn(e)||(e=rr),new Br(t,e)};_r.generate=function(t,e,n,r,i){return Kn(i)||(i=rr),new Mi(function(o){var s=!0;return i.scheduleRecursiveWithState(t,function(t,i){var u,a;try{s?s=!1:t=n(t),u=e(t),u&&(a=r(t))}catch(c){return o.onError(c)}u?(o.onNext(a),i(t)):o.onCompleted()
})})},_r.of=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return new Br(e,rr)},_r.ofWithScheduler=function(t){for(var e=arguments.length,n=new Array(e-1),r=1;e>r;r++)n[r-1]=arguments[r];return new Br(n,t)},_r.ofArrayChanges=function(t){if(!Array.isArray(t))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Mi(function(e){function n(t){for(var n=0,r=t.length;r>n;n++)e.onNext(t[n])}return Array.observe(t,n),function(){Array.unobserve(t,n)}})},_r.ofObjectChanges=function(t){if(null==t)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Object.observe is not supported on your platform");return new Mi(function(e){function n(t){for(var n=0,r=t.length;r>n;n++)e.onNext(t[n])}return Obje
ct.observe(t,n),function(){Object.unobserve(t,n)}})};var Vr=function(t){function e(){t.call(this)}return On(e,t),e.prototype.subscribeCore=function(){return Gn},e}(xr),Gr=_r.never=function(){return new Vr},Zr=function(t){function e(e,n){this.obj=e,this.keys=Object.keys(e),this.scheduler=n,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new I(t,this);return e.run()},e}(xr);I.prototype.run=function(){function t(t,o){if(i>t){var s=r[t];e.onNext([s,n[s]]),o(t+1)}else e.onCompleted()}var e=this.observer,n=this.parent.obj,r=this.parent.keys,i=r.length;return this.parent.scheduler.scheduleRecursiveWithState(0,t)},_r.pairs=function(t,e){return e||(e=rr),new Zr(t,e)};var Pr=function(t){function e(e,n,r){this.start=e,this.rangeCount=n,this.scheduler=r,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new zr(t,this);return e.run()},e}(xr),zr=function(){function t(t,e){this.observer=t,this.parent=e}return t.prototype.run=function(){function
t(t,i){n>t?(r.onNext(e+t),i(t+1)):r.onCompleted()}var e=this.parent.start,n=this.parent.rangeCount,r=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,t)},t}();_r.range=function(t,e,n){return Kn(n)||(n=rr),new Pr(t,e,n)};var Xr=function(t){function e(e,n,r){this.value=e,this.repeatCount=null==n?-1:n,this.scheduler=r,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new W(t,this);return e.run()},e}(xr);W.prototype.run=function(){function t(t,r){return(-1===t||t>0)&&(e.onNext(n),t>0&&t--),0===t?e.onCompleted():void r(t)}var e=this.observer,n=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,t)},_r.repeat=function(t,e,n){return Kn(n)||(n=rr),new Xr(t,e,n)};var Jr=function(t){function e(e,n){this.value=e,this.scheduler=n,t.call(this)}function n(t,e){this.observer=t,this.parent=e}function r(t,e){var n=e[0],r=e[1];r.onNext(n),r.onCompleted()}return On(e,t),e.prototype.subscribeCore=function
(t){var e=new n(t,this);return e.run()},n.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],r)},e}(xr),Yr=(_r["return"]=_r.just=_r.returnValue=function(t,e){return Kn(e)||(e=nr),new Jr(t,e)},function(t){function e(e,n){this.error=e,this.scheduler=n,t.call(this)}function n(t,e){this.o=t,this.p=e}function r(t,e){var n=e[0],r=e[1];r.onError(n)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new n(t,this);return e.run()},n.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],r)},e}(xr)),Hr=_r["throw"]=_r.throwError=_r.throwException=function(t,e){return Kn(e)||(e=nr),new Yr(t,e)};_r.using=function(t,e){return new Mi(function(n){var r,i,o=Gn;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new qn(Hr(s).subscribe(n),o)}return new qn(i.subscribe(n),o)})},vr.amb=function(t){var e=this;return new Mi(function(n){function r(){o||(o=s,c.dispose())}function i(){o||(o=u,a.dispose())}var o,s="L"
,u="R",a=new zn,c=new zn;return qe(t)&&(t=Rr(t)),a.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),c.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new qn(a,c)})},_r.amb=function(){function t(t,e){return t.amb(e)}var e=Gr(),n=[];if(Array.isArray(arguments[0]))n=arguments[0];else for(var r=0,i=arguments.length;i>r;r++)n.push(arguments[r]);for(var r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},vr["catch"]=vr.catchError=vr.catchException=function(t){return"function"==typeof t?L(this,t):Qr([this,t])};var Qr=_r.catchError=_r["catch"]=_r.catchException=function(){var t=[];if(Array.isArray(arguments[0]))t=arguments[0];else for(var e=0,n=arguments.length;n>e;e++)t.push(arguments[e]);return Ar(t).catchError()};vr.combineLatest=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=argument
s[n];return Array.isArray(e[0])?e[0].unshift(this):e.unshift(this),Kr.apply(this,e)};var Kr=_r.combineLatest=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=e.pop();return Array.isArray(e[0])&&(e=e[0]),new Mi(function(t){function n(e){if(u[e]=!0,a||(a=u.every(Ue))){try{var n=r.apply(null,l)}catch(i){return t.onError(i)}t.onNext(n)}else c.filter(function(t,n){return n!==e}).every(Ue)&&t.onCompleted()}function i(e){c[e]=!0,c.every(Ue)&&t.onCompleted()}for(var o=e.length,s=function(){return!1},u=b(o,s),a=!1,c=b(o,s),l=new Array(o),h=new Array(o),f=0;o>f;f++)!function(r){var o=e[r],s=new zn;qe(o)&&(o=Rr(o)),s.setDisposable(o.subscribe(function(t){l[r]=t,n(r)},function(e){t.onError(e)},function(){i(r)})),h[r]=s}(f);return new qn(h)},this)};vr.concat=function(){for(var t=[],e=0,n=arguments.length;n>e;e++)t.push(arguments[e]);return t.unshift(this),ti.apply(null,t)};var $r=function(t){function e(e){this.sources=e,t.call(this)}function n(t,e)
{this.sources=t,this.o=e}return On(e,t),e.prototype.subscribeCore=function(t){var e=new n(this.sources,t);return e.run()},n.prototype.run=function(){var t,e=new Xn,n=this.sources,r=n.length,i=this.o,o=nr.scheduleRecursiveWithState(0,function(o,s){if(!t){if(o===r)return i.onCompleted();var u=n[o];qe(u)&&(u=Rr(u));var a=new zn;e.setDisposable(a),a.setDisposable(u.subscribe(function(t){i.onNext(t)},function(t){i.onError(t)},function(){s(o+1)}))}});return new qn(e,o,Vn(function(){t=!0}))},e}(xr),ti=_r.concat=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(arguments.length);for(var e=0,n=arguments.length;n>e;e++)t[e]=arguments[e]}return new $r(t)};vr.concatAll=vr.concatObservable=function(){return this.merge(1)};var ei=function(t){function e(e,n){this.source=e,this.maxConcurrent=n,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){var e=new qn;return e.add(this.source.subscribe(new ni(t,this.maxConcurrent,e))),e},e}(xr),ni=function()
{function t(t,e,n){this.o=t,this.max=e,this.g=n,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function e(t,e){this.parent=t,this.sad=e,this.isStopped=!1}return t.prototype.handleSubscribe=function(t){var n=new zn;this.g.add(n),qe(t)&&(t=Rr(t)),n.setDisposable(t.subscribe(new e(this,n)))},t.prototype.onNext=function(t){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(t)):this.q.push(t))},t.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e.prototype.onNext=function(t){this.isStopped||this.parent.o.onNext(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.parent.o.onError(t))},e.prototype.onCompleted
=function(){if(!this.isStopped){this.isStopped=!0;var t=this.parent;t.g.remove(this.sad),t.q.length>0?t.handleSubscribe(t.q.shift()):(t.activeCount--,t.done&&0===t.activeCount&&t.o.onCompleted())}},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(t),!0)},t}();vr.merge=function(t){return"number"!=typeof t?ri(this,t):new ei(this,t)};var ri=_r.merge=function(){var t,e,n=[],r=arguments.length;if(arguments[0])if(Kn(arguments[0]))for(t=arguments[0],e=1;r>e;e++)n.push(arguments[e]);else for(t=nr,e=0;r>e;e++)n.push(arguments[e]);else for(t=nr,e=1;r>e;e++)n.push(arguments[e]);return Array.isArray(n[0])&&(n=n[0]),U(t,n).mergeAll()},ii=function(t){function e(e){this.source=e,t.call(this)}function n(t,e){this.o=t,this.g=e,this.isStopped=!1,this.done=!1}function r(t,e,n){this.parent=t,this.g=e,this.sad=n,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){var e=new qn,r=new
zn;return e.add(r),r.setDisposable(this.source.subscribe(new n(t,e))),e},n.prototype.onNext=function(t){if(!this.isStopped){var e=new zn;this.g.add(e),qe(t)&&(t=Rr(t)),e.setDisposable(t.subscribe(new r(this,this.g,e)))}},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},r.prototype.onNext=function(t){this.isStopped||this.parent.o.onNext(t)},r.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.parent.o.onError(t))},r.prototype.onCompleted=function(){if(!this.isStopped){var t=this.parent;this.isStopped=!0,t.g.remove(this.sad),t.done&&1===t.g.length&&t.o.onCompleted()}},r.prototype.dispose=function(){this.isStopped=!0},r.prototype.fail=function(t){return th
is.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(t),!0)},e}(xr);vr.mergeAll=vr.mergeObservable=function(){return new ii(this)};var oi=Te.CompositeError=function(t){this.name="NotImplementedError",this.innerErrors=t,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};oi.prototype=Error.prototype,_r.mergeDelayError=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{var e=arguments.length;t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}var r=U(null,t);return new Mi(function(t){function e(){0===s.length?t.onCompleted():t.onError(1===s.length?s[0]:new oi(s))}var n=new qn,i=new zn,o=!1,s=[];return n.add(i),i.setDisposable(r.subscribe(function(r){var i=new zn;n.add(i),qe(r)&&(r=Rr(r)),i.setDisposable(r.subscribe(function(e){t.onNext(e)},function(t){s.push(t),n.remove(i),o&&1===n.length&&e()},function(){n.remove(i),o&&1===n.length&&e()}))},function(t){s.push(t),o=!0,1===n.length&&e()},function(){o=!0,1===n.length&&e()})
),n})},vr.onErrorResumeNext=function(t){if(!t)throw new Error("Second observable is required");return si([this,t])};var si=_r.onErrorResumeNext=function(){var t=[];if(Array.isArray(arguments[0]))t=arguments[0];else for(var e=0,n=arguments.length;n>e;e++)t.push(arguments[e]);return new Mi(function(e){var n=0,r=new Xn,i=nr.scheduleRecursive(function(i){var o,s;n<t.length?(o=t[n++],qe(o)&&(o=Rr(o)),s=new zn,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),i,i))):e.onCompleted()});return new qn(r,i)})};vr.skipUntil=function(t){var e=this;return new Mi(function(n){var r=!1,i=new qn(e.subscribe(function(t){r&&n.onNext(t)},function(t){n.onError(t)},function(){r&&n.onCompleted()}));qe(t)&&(t=Rr(t));var o=new zn;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},function(t){n.onError(t)},function(){o.dispose()})),i},e)};var ui=function(t){function e(e){this.source=e,t.call(this)}function n(t,e){this.o=t,this.inner=e,this.stopped=!1,this.latest=0,t
his.hasLatest=!1,this.isStopped=!1}function r(t,e){this.parent=t,this.id=e,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){var e=new Xn,r=this.source.subscribe(new n(t,e));return new qn(r,e)},n.prototype.onNext=function(t){if(!this.isStopped){var e=new zn,n=++this.latest;this.hasLatest=!0,this.inner.setDisposable(e),qe(t)&&(t=Rr(t)),e.setDisposable(t.subscribe(new r(this,n)))}},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.stopped=!0,!this.hasLatest&&this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},r.prototype.onNext=function(t){this.isStopped||this.parent.latest===this.id&&this.parent.o.onNext(t)},r.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&this.parent.o.onError(t))},
r.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.isStopped&&this.parent.o.onCompleted()))},r.prototype.dispose=function(){this.isStopped=!0},r.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(t),!0)},e}(xr);vr["switch"]=vr.switchLatest=function(){return new ui(this)};var ai=function(t){function e(e,n){this.source=e,this.other=qe(n)?Rr(n):n,t.call(this)}function n(t){this.o=t,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return new qn(this.source.subscribe(t),this.other.subscribe(new n(t)))},n.prototype.onNext=function(){this.isStopped||this.o.onCompleted()},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){!this.isStopped&&(this.isStopped=!0)},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(th
is.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.takeUntil=function(t){return new ai(this,t)},vr.withLatestFrom=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=e.pop(),i=this;return Array.isArray(e[0])&&(e=e[0]),new Mi(function(t){for(var n=e.length,o=b(n,M),s=!1,u=new Array(n),a=new Array(n+1),c=0;n>c;c++)!function(n){var r=e[n],i=new zn;qe(r)&&(r=Rr(r)),i.setDisposable(r.subscribe(function(t){u[n]=t,o[n]=!0,s=o.every(Ue)},function(e){t.onError(e)},Oe)),a[n]=i}(c);var l=new zn;return l.setDisposable(i.subscribe(function(e){var n=[e].concat(u);if(s){var i=w(r).apply(null,n);return i===Wn?t.onError(i.e):void t.onNext(i)}},function(e){t.onError(e)},function(){t.onCompleted()})),a[n]=l,new qn(a)},this)},vr.zip=function(){if(Array.isArray(arguments[0]))return q.apply(this,arguments);for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=this,i=e.pop();return e.unshift(r),new Mi(function(t){for(var n=e.length,o=b(n,B
),s=b(n,M),u=new Array(n),a=0;n>a;a++)!function(n){var a=e[n],c=new zn;qe(a)&&(a=Rr(a)),c.setDisposable(a.subscribe(function(e){if(o[n].push(e),o.every(function(t){return t.length>0})){var u=o.map(function(t){return t.shift()}),a=w(i).apply(r,u);if(a===Wn)return t.onError(a.e);t.onNext(a)}else s.filter(function(t,e){return e!==n}).every(Ue)&&t.onCompleted()},function(e){t.onError(e)},function(){s[n]=!0,s.every(Ue)&&t.onCompleted()})),u[n]=c}(a);return new qn(u)},r)},_r.zip=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=e.shift();return r.zip.apply(r,e)},_r.zipArray=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{var e=arguments.length;t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new Mi(function(e){for(var n=t.length,r=b(n,F),i=b(n,M),o=new Array(n),s=0;n>s;s++)!function(n){o[n]=new zn,o[n].setDisposable(t[n].subscribe(function(t){if(r[n].push(t),r.every(function(t){return t.length>0})){var o=r.map(f
unction(t){return t.shift()});e.onNext(o)}else if(i.filter(function(t,e){return e!==n}).every(Ue))return e.onCompleted()},function(t){e.onError(t)},function(){i[n]=!0,i.every(Ue)&&e.onCompleted()}))}(s);return new qn(o)})},vr.asObservable=function(){var t=this;return new Mi(function(e){return t.subscribe(e)},t)},vr.bufferWithCount=function(t,e){return"number"!=typeof e&&(e=t),this.windowWithCount(t,e).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},vr.dematerialize=function(){var t=this;return new Mi(function(e){return t.subscribe(function(t){return t.accept(e)},function(t){e.onError(t)},function(){e.onCompleted()})},this)},vr.distinctUntilChanged=function(t,e){var n=this;return e||(e=We),new Mi(function(r){var i,o=!1;return n.subscribe(function(n){var s=n;if(t&&(s=w(t)(n),s===Wn))return r.onError(s.e);if(o){var u=w(e)(i,s);if(u===Wn)return r.onError(u.e)}o&&u||(o=!0,i=s,r.onNext(n))},function(t){r.onError(t)},function(){r.onCompleted()})},
this)};var ci=function(t){function e(e,n,r,i){this.source=e,this.t=!n||Fe(n)?dr(n||Oe,r||Oe,i||Oe):n,t.call(this)}function n(t,e){this.o=t,this.t=e,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this.t))},n.prototype.onNext=function(t){if(!this.isStopped){var e=w(this.t.onNext).call(this.t,t);e===Wn&&this.o.onError(e.e),this.o.onNext(t)}},n.prototype.onError=function(t){if(!this.isStopped){this.isStopped=!0;var e=w(this.t.onError).call(this.t,t);if(e===Wn)return this.o.onError(e.e);this.o.onError(t)}},n.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var t=w(this.t.onCompleted).call(this.t);if(t===Wn)return this.o.onError(t.e);this.o.onCompleted()}},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr["do"]=vr.tap=vr.doAction=function(t,e,n){return new ci(this,t,e,n)},vr.doOnNext=vr.tapOnNex
t=function(t,e){return this.tap("undefined"!=typeof e?function(n){t.call(e,n)}:t)},vr.doOnError=vr.tapOnError=function(t,e){return this.tap(Oe,"undefined"!=typeof e?function(n){t.call(e,n)}:t)},vr.doOnCompleted=vr.tapOnCompleted=function(t,e){return this.tap(Oe,null,"undefined"!=typeof e?function(){t.call(e)}:t)},vr["finally"]=vr.ensure=function(t){var e=this;return new Mi(function(n){var r;try{r=e.subscribe(n)}catch(i){throw t(),i}return Vn(function(){try{r.dispose()}catch(e){throw e}finally{t()}})},this)},vr.finallyAction=function(t){return this.ensure(t)};var li=function(t){function e(e){this.source=e,t.call(this)}function n(t){this.o=t,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t))},n.prototype.onNext=Oe,n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},n.prototype.dispose=function
(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(t),!0)},e}(xr);vr.ignoreElements=function(){return new li(this)},vr.materialize=function(){var t=this;return new Mi(function(e){return t.subscribe(function(t){e.onNext(lr(t))},function(t){e.onNext(hr(t)),e.onCompleted()},function(){e.onNext(fr()),e.onCompleted()})},t)},vr.repeat=function(t){return jr(this,t).concat()},vr.retry=function(t){return jr(this,t).catchError()},vr.retryWhen=function(t){return jr(this).catchErrorWhen(t)};var hi=function(t){function e(e,n,r,i){this.source=e,this.accumulator=n,this.hasSeed=r,this.seed=i,t.call(this)}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new V(t,this))},e}(xr);V.prototype.onNext=function(t){if(!this.isStopped){!this.hasValue&&(this.hasValue=!0);try{this.hasAccumulation?this.accumulation=this.accumulator(this.accumulation,t):(this.accumulation=this.hasSeed?this.accumulator(this.s
eed,t):t,this.hasAccumulation=!0)}catch(e){return this.observer.onError(e)}this.observer.onNext(this.accumulation)}},V.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.observer.onError(t))},V.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,!this.hasValue&&this.hasSeed&&this.observer.onNext(this.seed),this.observer.onCompleted())},V.prototype.dispose=function(){this.isStopped=!0},V.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(t),!0)},vr.scan=function(){var t,e,n=!1;return 2===arguments.length?(n=!0,t=arguments[0],e=arguments[1]):e=arguments[0],new hi(this,e,n,t)},vr.skipLast=function(t){if(0>t)throw new Ye;var e=this;return new Mi(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&n.onNext(r.shift())},function(t){n.onError(t)},function(){n.onCompleted()})},e)},vr.startWith=function(){var t,e=0;arguments.length&&Kn(arguments[0])?(t=arguments[0],e=1):t=nr;for(var n=[]
,r=e,i=arguments.length;i>r;r++)n.push(arguments[r]);return Ar([Fr(n,t),this]).concat()},vr.takeLast=function(t){if(0>t)throw new Ye;var e=this;return new Mi(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},function(t){n.onError(t)},function(){for(;r.length>0;)n.onNext(r.shift());n.onCompleted()})},e)},vr.takeLastBuffer=function(t){var e=this;return new Mi(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},function(t){n.onError(t)},function(){n.onNext(r),n.onCompleted()})},e)},vr.windowWithCount=function(t,e){var n=this;if(+t||(t=0),1/0===Math.abs(t)&&(t=0),0>=t)throw new Ye;if(null==e&&(e=t),+e||(e=0),1/0===Math.abs(e)&&(e=0),0>=e)throw new Ye;return new Mi(function(r){function i(){var t=new Fi;a.push(t),r.onNext(In(t,s))}var o=new zn,s=new Jn(o),u=0,a=[];return i(),o.setDisposable(n.subscribe(function(n){for(var r=0,o=a.length;o>r;r++)a[r].onNext(n);var s=u-t+1;s>=0&&s%e===0&&a.shift().onCompleted(),++u%
e===0&&i()},function(t){for(;a.length>0;)a.shift().onError(t);r.onError(t)},function(){for(;a.length>0;)a.shift().onCompleted();r.onCompleted()})),s},n)},vr.selectConcat=vr.concatMap=function(t,e,n){return Fe(t)&&Fe(e)?this.concatMap(function(n,r){var i=t(n,r);return qe(i)&&(i=Rr(i)),(rn(i)||nn(i))&&(i=qr(i)),i.map(function(t,i){return e(n,t,r,i)})}):Fe(t)?G(this,t,n):G(this,function(){return t})},vr.concatMapObserver=vr.selectConcatObserver=function(t,e,n,r){var i=this,o=sn(t,r,2),s=sn(e,r,1),u=sn(n,r,0);return new Mi(function(t){var e=0;return i.subscribe(function(n){var r;try{r=o(n,e++)}catch(i){return void t.onError(i)}qe(r)&&(r=Rr(r)),t.onNext(r)},function(e){var n;try{n=s(e)}catch(r){return void t.onError(r)}qe(n)&&(n=Rr(n)),t.onNext(n),t.onCompleted()},function(){var e;try{e=u()}catch(n){return void t.onError(n)}qe(e)&&(e=Rr(e)),t.onNext(e),t.onCompleted()})},this).concatAll()},vr.defaultIfEmpty=function(t){var e=this;return t===i&&(t=null),new Mi(function(n){var r=!1
;return e.subscribe(function(t){r=!0,n.onNext(t)},function(t){n.onError(t)},function(){!r&&n.onNext(t),n.onCompleted()})},e)},P.prototype.push=function(t){var e=-1===Z(this.set,t,this.comparer);return e&&this.set.push(t),e},vr.distinct=function(t,e){var n=this;return e||(e=We),new Mi(function(r){var i=new P(e);return n.subscribe(function(e){var n=e;if(t)try{n=t(e)}catch(o){return void r.onError(o)}i.push(n)&&r.onNext(e)},function(t){r.onError(t)},function(){r.onCompleted()})},this)},vr.groupBy=function(t,e,n){return this.groupByUntil(t,e,Gr,n)},vr.groupByUntil=function(t,e,n,r){var i=this;return e||(e=Ue),r||(r=We),new Mi(function(o){function s(t){return function(e){e.onError(t)}}var u=new Ri(0,r),a=new qn,c=new Jn(a);return a.add(i.subscribe(function(r){var i;try{i=t(r)}catch(l){return u.getValues().forEach(s(l)),void o.onError(l)}var h=!1,f=u.tryGetValue(i);if(f||(f=new Fi,u.set(i,f),h=!0),h){var p=new Bi(i,f,c),d=new Bi(i,f);try{duration=n(d)}catch(l){return u.getValues()
.forEach(s(l)),void o.onError(l)}o.onNext(p);var v=new zn;a.add(v);var m=function(){u.remove(i)&&f.onCompleted(),a.remove(v)};v.setDisposable(duration.take(1).subscribe(Oe,function(t){u.getValues().forEach(s(t)),o.onError(t)},m))}var g;try{g=e(r)}catch(l){return u.getValues().forEach(s(l)),void o.onError(l)}f.onNext(g)},function(t){u.getValues().forEach(s(t)),o.onError(t)},function(){u.getValues().forEach(function(t){t.onCompleted()}),o.onCompleted()})),c},i)};var fi=function(t){function e(e,n,r){this.source=e,this.selector=sn(n,r,3),t.call(this)}function n(t,e){return function(n,r,i){return t.call(this,e.selector(n,r,i),r,i)}}function r(t,e,n){this.o=t,this.selector=e,this.source=n,this.i=0,this.isStopped=!1}return On(e,t),e.prototype.internalMap=function(t,r){return new e(this.source,n(t,this),r)},e.prototype.subscribeCore=function(t){return this.source.subscribe(new r(t,this.selector,this))},r.prototype.onNext=function(t){if(!this.isStopped){var e=w(this.selector)(t,this.
i++,this.source);return e===Wn?this.o.onError(e.e):void this.o.onNext(e)}},r.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},r.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},r.prototype.dispose=function(){this.isStopped=!0},r.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.map=vr.select=function(t,e){var n="function"==typeof t?t:function(){return t};return this instanceof fi?this.internalMap(n,e):new fi(this,n,e)},vr.pluck=function(){var t=arguments,e=arguments.length;if(0===e)throw new Error("List of properties cannot be empty.");return this.map(function(n){for(var r=n,o=0;e>o;o++){var s=r[t[o]];if("undefined"==typeof s)return i;r=s}return r})},vr.selectMany=vr.flatMap=function(t,e,n){return Fe(t)&&Fe(e)?this.flatMap(function(n,r){var i=t(n,r);return qe(i)&&(i=Rr(i)),(rn(i)||nn(i))&&(i=qr(i)),i.map(function(t,i){return e(n,t,r,i)})},n):Fe(
t)?z(this,t,n):z(this,function(){return t})},vr.flatMapObserver=vr.selectManyObserver=function(t,e,n,r){var i=this;return new Mi(function(o){var s=0;return i.subscribe(function(e){var n;try{n=t.call(r,e,s++)}catch(i){return void o.onError(i)}qe(n)&&(n=Rr(n)),o.onNext(n)},function(t){var n;try{n=e.call(r,t)}catch(i){return void o.onError(i)}qe(n)&&(n=Rr(n)),o.onNext(n),o.onCompleted()},function(){var t;try{t=n.call(r)}catch(e){return void o.onError(e)}qe(t)&&(t=Rr(t)),o.onNext(t),o.onCompleted()})},i).mergeAll()},vr.selectSwitch=vr.flatMapLatest=vr.switchMap=function(t,e){return this.select(t,e).switchLatest()};var pi=function(t){function e(e,n){this.source=e,this.skipCount=n,t.call(this)}function n(t,e){this.c=e,this.r=e,this.o=t,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this.skipCount))},n.prototype.onNext=function(t){this.isStopped||(this.r<=0?this.o.onNext(t):this.r--)},n.prototype.onError=function(t){this.
isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.skip=function(t){if(0>t)throw new Ye;return new pi(this,t)},vr.skipWhile=function(t,e){var n=this,r=sn(t,e,3);return new Mi(function(t){var e=0,i=!1;return n.subscribe(function(o){if(!i)try{i=!r(o,e++,n)}catch(s){return void t.onError(s)}i&&t.onNext(o)},function(e){t.onError(e)},function(){t.onCompleted()})},n)},vr.take=function(t,e){if(0>t)throw new Ye;if(0===t)return Ir(e);var n=this;return new Mi(function(e){var r=t;return n.subscribe(function(t){r-->0&&(e.onNext(t),0>=r&&e.onCompleted())},function(t){e.onError(t)},function(){e.onCompleted()})},n)},vr.takeWhile=function(t,e){var n=this,r=sn(t,e,3);return new Mi(function(t){var e=0,i=!0;return n.subscribe(function(o){if(i){try{i=
r(o,e++,n)}catch(s){return void t.onError(s)}i?t.onNext(o):t.onCompleted()}},function(e){t.onError(e)},function(){t.onCompleted()})},n)};var di=function(t){function e(e,n,r){this.source=e,this.predicate=sn(n,r,3),t.call(this)}function n(t,e){return function(n,r,i){return e.predicate(n,r,i)&&t.call(this,n,r,i)}}function r(t,e,n){this.o=t,this.predicate=e,this.source=n,this.i=0,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new r(t,this.predicate,this))},e.prototype.internalFilter=function(t,r){return new e(this.source,n(t,this),r)},r.prototype.onNext=function(t){if(!this.isStopped){var e=w(this.predicate)(t,this.i++,this.source);return e===Wn?this.o.onError(e.e):void(e&&this.o.onNext(t))}},r.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},r.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},r.prototype.dispose=function(){this.isStopped=!0},r.protot
ype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.filter=vr.where=function(t,e){return this instanceof di?this.internalFilter(t,e):new di(this,t,e)},vr.aggregate=function(){var t,e,n=!1,r=this;return 2===arguments.length?(n=!0,e=arguments[0],t=arguments[1]):t=arguments[0],new Mi(function(i){var o,s,u;return r.subscribe(function(r){!u&&(u=!0);try{o?s=t(s,r):(s=n?t(e,r):r,o=!0)}catch(a){return i.onError(a)}},function(t){i.onError(t)},function(){u&&i.onNext(s),!u&&n&&i.onNext(e),!u&&!n&&i.onError(new Xe),i.onCompleted()})},r)};var vi=function(t){function e(e,n,r,i){this.source=e,this.acc=n,this.hasSeed=r,this.seed=i,t.call(this)}function n(t,e){this.o=t,this.acc=e.acc,this.hasSeed=e.hasSeed,this.seed=e.seed,this.hasAccumulation=!1,this.result=null,this.hasValue=!1,this.isStopped=!1}return On(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this))},n.prototype.onNext=function(t){this.isStopped||(!this
.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.result=w(this.acc)(this.result,t):(this.result=this.hasSeed?w(this.acc)(this.seed,t):t,this.hasAccumulation=!0),this.result===Wn&&this.o.onError(this.result.e))},n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.hasValue&&this.o.onNext(this.result),!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),!this.hasValue&&!this.hasSeed&&this.o.onError(new Xe),this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(t),!0)},e}(xr);vr.reduce=function(t){var e=!1;if(2===arguments.length){e=!0;var n=arguments[1]}return new vi(this,t,e,n)},vr.some=function(t,e){var n=this;return t?n.filter(t,e).some():new Mi(function(t){return n.subscribe(function(){t.onNext(!0),t.onCompleted()},function(e){t.onError(e)},function(){t
.onNext(!1),t.onCompleted()})},n)},vr.any=function(){return this.some.apply(this,arguments)},vr.isEmpty=function(){return this.any().map(Be)},vr.every=function(t,e){return this.filter(function(e){return!t(e)},e).some().map(Be)},vr.all=function(){return this.every.apply(this,arguments)},vr.includes=function(t,e){function n(t,e){return 0===t&&0===e||t===e||isNaN(t)&&isNaN(e)}var r=this;return new Mi(function(i){var o=0,s=+e||0;return 1/0===Math.abs(s)&&(s=0),0>s?(i.onNext(!1),i.onCompleted(),Gn):r.subscribe(function(e){o++>=s&&n(e,t)&&(i.onNext(!0),i.onCompleted())},function(t){i.onError(t)},function(){i.onNext(!1),i.onCompleted()})},this)},vr.contains=function(t,e){vr.includes(t,e)},vr.count=function(t,e){return t?this.filter(t,e).count():this.reduce(function(t){return t+1},0)},vr.indexOf=function(t,e){var n=this;return new Mi(function(r){var i=0,o=+e||0;return 1/0===Math.abs(o)&&(o=0),0>o?(r.onNext(-1),r.onCompleted(),Gn):n.subscribe(function(e){i>=o&&e===t&&(r.onNext(i),r.o
nCompleted()),i++},function(t){r.onError(t)},function(){r.onNext(-1),r.onCompleted()})},n)},vr.sum=function(t,e){return t&&Fe(t)?this.map(t,e).sum():this.reduce(function(t,e){return t+e},0)},vr.minBy=function(t,e){return e||(e=Le),X(this,t,function(t,n){return-1*e(t,n)})},vr.min=function(t){return this.minBy(Ue,t).map(function(t){return J(t)})},vr.maxBy=function(t,e){return e||(e=Le),X(this,t,e)
@@ -73,5 +73,5 @@
}var u=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],a="no such key",c="duplicate key",l=function(){var t=0;return function(e){if(null==e)throw new Error(a);if("string"==typeof e)return n(e);if("number"==typeof e)return r(e);if("boolean"==typeof e)return e===!0?1:0;if(e instanceof Date)return r(e.valueOf());if(e instanceof RegExp)return n(e.toString());if("function"==typeof e.valueOf){var i=e.valueOf();if("number"==typeof i)return r(i);if("string"==typeof i)return n(i)}if(e.hashCode)return e.hashCode();var o=17*t++;return e.hashCode=function(){return o},o}}(),h=s.prototype;return h._initialize=function(t){var n,r=e(t);for(this.buckets=new Array(r),this.entries=new Array(r),n=0;r>n;n++)this.buckets[n]=-1,this.entries[n]=o();this.freeList=-1},h.add=function(t,e){this._insert(t,e,!0)},h._insert=function(t,e,n){this.buckets||thi
s._initialize(0);for(var r,i=2147483647&l(t),o=i%this.buckets.length,s=this.buckets[o];s>=0;s=this.entries[s].next)if(this.entries[s].hashCode===i&&this.comparer(this.entries[s].key,t)){if(n)throw new Error(c);return void(this.entries[s].value=e)}this.freeCount>0?(r=this.freeList,this.freeList=this.entries[r].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),o=i%this.buckets.length),r=this.size,++this.size),this.entries[r].hashCode=i,this.entries[r].next=this.buckets[o],this.entries[r].key=t,this.entries[r].value=e,this.buckets[o]=r},h._resize=function(){var t=e(2*this.size),n=new Array(t);for(i=0;i<n.length;++i)n[i]=-1;var r=new Array(t);for(i=0;i<this.size;++i)r[i]=this.entries[i];for(var i=this.size;t>i;++i)r[i]=o();for(var s=0;s<this.size;++s){var u=r[s].hashCode%t;r[s].next=n[u],n[u]=s}this.buckets=n,this.entries=r},h.remove=function(t){if(this.buckets)for(var e=2147483647&l(t),n=e%this.buckets.length,r=-1,i=this.buckets[n];i>=0;i=this.entries[i].
next){if(this.entries[i].hashCode===e&&this.comparer(this.entries[i].key,t))return 0>r?this.buckets[n]=this.entries[i].next:this.entries[r].next=this.entries[i].next,this.entries[i].hashCode=-1,this.entries[i].next=this.freeList,this.entries[i].key=null,this.entries[i].value=null,this.freeList=i,++this.freeCount,!0;r=i}return!1},h.clear=function(){var t,e;if(!(this.size<=0)){for(t=0,e=this.buckets.length;e>t;++t)this.buckets[t]=-1;for(t=0;t<this.size;++t)this.entries[t]=o();this.freeList=-1,this.size=0}},h._findEntry=function(t){if(this.buckets)for(var e=2147483647&l(t),n=this.buckets[e%this.buckets.length];n>=0;n=this.entries[n].next)if(this.entries[n].hashCode===e&&this.comparer(this.entries[n].key,t))return n;return-1},h.count=function(){return this.size-this.freeCount},h.tryGetValue=function(t){var e=this._findEntry(t);return e>=0?this.entries[e].value:i},h.getValues=function(){var t=0,e=[];if(this.entries)for(var n=0;n<this.size;n++)this.entries[n].hashCode>=0&&(e[t++]=
this.entries[n].value);return e},h.get=function(t){var e=this._findEntry(t);if(e>=0)return this.entries[e].value;throw new Error(a)},h.set=function(t,e){this._insert(t,e,!1)},h.containskey=function(t){return this._findEntry(t)>=0},s}();vr.join=function(t,e,n,r){var i=this;return new Mi(function(o){var s=new qn,u=!1,a=!1,c=0,l=0,h=new Ri,f=new Ri;return s.add(i.subscribe(function(t){var n=c++,i=new zn;h.add(n,t),s.add(i);var a,l=function(){h.remove(n)&&0===h.count()&&u&&o.onCompleted(),s.remove(i)};try{a=e(t)}catch(p){return void o.onError(p)}i.setDisposable(a.take(1).subscribe(Oe,o.onError.bind(o),l)),f.getValues().forEach(function(e){var n;try{n=r(t,e)}catch(i){return void o.onError(i)}o.onNext(n)})},o.onError.bind(o),function(){u=!0,(a||0===h.count())&&o.onCompleted()})),s.add(t.subscribe(function(t){var e=l++,i=new zn;f.add(e,t),s.add(i);var u,c=function(){f.remove(e)&&0===f.count()&&a&&o.onCompleted(),s.remove(i)};try{u=n(t)}catch(p){return void o.onError(p)}i.setDisposa
ble(u.take(1).subscribe(Oe,o.onError.bind(o),c)),h.getValues().forEach(function(e){var n;try{n=r(e,t)}catch(i){return void o.onError(i)}o.onNext(n)})},o.onError.bind(o),function(){a=!0,(u||0===f.count())&&o.onCompleted()})),s},i)},vr.groupJoin=function(t,e,n,r){var i=this;return new Mi(function(o){function s(t){return function(e){e.onError(t)}}var u=new qn,a=new Jn(u),c=new Ri,l=new Ri,h=0,f=0;return u.add(i.subscribe(function(t){var n=new Fi,i=h++;c.add(i,n);var f;try{f=r(t,In(n,a))}catch(p){return c.getValues().forEach(s(p)),void o.onError(p)}o.onNext(f),l.getValues().forEach(function(t){n.onNext(t)});var d=new zn;u.add(d);var v,m=function(){c.remove(i)&&n.onCompleted(),u.remove(d)};try{v=e(t)}catch(p){return c.getValues().forEach(s(p)),void o.onError(p)}d.setDisposable(v.take(1).subscribe(Oe,function(t){c.getValues().forEach(s(t)),o.onError(t)},m))},function(t){c.getValues().forEach(s(t)),o.onError(t)},o.onCompleted.bind(o))),u.add(t.subscribe(function(t){var e=f++;l.add(
e,t);var r=new zn;u.add(r);var i,a=function(){l.remove(e),u.remove(r)};try{i=n(t)}catch(h){return c.getValues().forEach(s(h)),void o.onError(h)}r.setDisposable(i.take(1).subscribe(Oe,function(t){c.getValues().forEach(s(t)),o.onError(t)},a)),c.getValues().forEach(function(e){e.onNext(t)})},function(t){c.getValues().forEach(s(t)),o.onError(t)})),a},i)},vr.buffer=function(){return this.window.apply(this,arguments).selectMany(function(t){return t.toArray()})},vr.window=function(t,e){return 1===arguments.length&&"function"!=typeof arguments[0]?fe.call(this,t):"function"==typeof t?pe.call(this,t):he.call(this,t,e)},vr.pairwise=function(){var t=this;return new Mi(function(e){var n,r=!1;return t.subscribe(function(t){r?e.onNext([n,t]):r=!0,n=t},e.onError.bind(e),e.onCompleted.bind(e))},t)},vr.partition=function(t,e){return[this.filter(t,e),this.filter(function(n,r,i){return!t.call(e,n,r,i)})]};var Ti=function(t){function e(t,e){this.c=t,this.s=e}return On(e,t),e.prototype[tn]=functi
on(){var t=this;return{next:function(){return t.c()?{done:!1,value:t.s}:{done:!0,value:void 0}}}},e}(Sr);vr.letBind=vr.let=function(t){return t(this)},_r["if"]=_r.ifThen=function(t,e,n){return Or(function(){return n||(n=Ir()),qe(e)&&(e=Rr(e)),qe(n)&&(n=Rr(n)),"function"==typeof n.now&&(n=Ir(n)),t()?e:n})},_r["for"]=_r.forIn=function(t,e,n){return Ar(t,e,n).concat()};var Oi=_r["while"]=_r.whileDo=function(t,e){return qe(e)&&(e=Rr(e)),de(t,e).concat()};vr.doWhile=function(t){return ti([this,Oi(t,this)])},_r["case"]=_r.switchCase=function(t,e,n){return Or(function(){qe(n)&&(n=Rr(n)),n||(n=Ir()),"function"==typeof n.now&&(n=Ir(n));var r=e[t()];return qe(r)&&(r=Rr(r)),r||n})},vr.expand=function(t,e){Kn(e)||(e=nr);var n=this;return new Mi(function(r){var i=[],o=new Xn,s=new qn(o),u=0,a=!1,c=function(){var n=!1;i.length>0&&(n=!a,a=!0),n&&o.setDisposable(e.scheduleRecursive(function(e){var n;if(!(i.length>0))return void(a=!1);n=i.shift();var o=new zn;s.add(o),o.setDisposable(n.subsc
ribe(function(e){r.onNext(e);var n=null;try{n=t(e)}catch(o){r.onError(o)}i.push(n),u++,c()},r.onError.bind(r),function(){s.remove(o),u--,0===u&&r.onCompleted()})),e()}))};return i.push(n),u++,c(),s},this)},_r.forkJoin=function(){var t=[];if(Array.isArray(arguments[0]))t=arguments[0];else for(var e=0,n=arguments.length;n>e;e++)t.push(arguments[e]);return new Mi(function(e){var n=t.length;if(0===n)return e.onCompleted(),Gn;for(var r=new qn,i=!1,o=new Array(n),s=new Array(n),u=new Array(n),a=0;n>a;a++)!function(a){var c=t[a];qe(c)&&(c=Rr(c)),r.add(c.subscribe(function(t){i||(o[a]=!0,u[a]=t)},function(t){i=!0,e.onError(t),r.dispose()},function(){if(!i){if(!o[a])return void e.onCompleted();s[a]=!0;for(var t=0;n>t;t++)if(!s[t])return;i=!0,e.onNext(u),e.onCompleted()}}))}(a);return r})},vr.forkJoin=function(t,e){var n=this;return new Mi(function(r){var i,o,s=!1,u=!1,a=!1,c=!1,l=new zn,h=new zn;return qe(t)&&(t=Rr(t)),l.setDisposable(n.subscribe(function(t){a=!0,i=t},function(t){h.d
ispose(),r.onError(t)},function(){if(s=!0,u)if(a)if(c){var t;try{t=e(i,o)}catch(n){return void r.onError(n)}r.onNext(t),r.onCompleted()}else r.onCompleted();else r.onCompleted()})),h.setDisposable(t.subscribe(function(t){c=!0,o=t},function(t){l.dispose(),r.onError(t)},function(){if(u=!0,s)if(a)if(c){var t;try{t=e(i,o)}catch(n){return void r.onError(n)}r.onNext(t),r.onCompleted()}else r.onCompleted();else r.onCompleted()})),new qn(l,h)},n)},vr.manySelect=vr.extend=function(t,e){Kn(e)||(e=nr);var n=this;return Or(function(){var r;return n.map(function(t){var e=new Ui(t);return r&&r.onNext(t),r=e,e}).tap(Oe,function(t){r&&r.onError(t)},function(){r&&r.onCompleted()}).observeOn(e).map(t)},n)};var Ui=function(t){function e(t){var e=this,n=new qn;return n.add(rr.schedule(function(){t.onNext(e.head),n.add(e.tail.mergeAll().subscribe(t))})),n}function n(n){t.call(this,e),this.head=n,this.tail=new Vi}return On(n,t),Un(n.prototype,pr,{onCompleted:function(){this.onNext(_r.empty())},on
Error:function(t){this.onNext(_r.throwError(t))},onNext:function(t){this.tail.onNext(t),this.tail.onCompleted()}}),n}(_r),Ii=je.Map||function(){function t(){this._keys=[],this._values=[]}return t.prototype.get=function(t){var e=this._keys.indexOf(t);return-1!==e?this._values[e]:i},t.prototype.set=function(t,e){var n=this._keys.indexOf(t);-1!==n&&(this._values[n]=e),this._values[this._keys.push(t)-1]=e},t.prototype.forEach=function(t,e){for(var n=0,r=this._keys.length;r>n;n++)t.call(e,this._values[n],this._keys[n])},t}();ve.prototype.and=function(t){return new ve(this.patterns.concat(t))},ve.prototype.thenDo=function(t){return new me(this,t)},me.prototype.activate=function(t,e,n){for(var r=this,i=[],o=0,s=this.expression.patterns.length;s>o;o++)i.push(ge(t,this.expression.patterns[o],e.onError.bind(e)));var u=new be(i,function(){var t;try{t=r.selector.apply(r,arguments)}catch(n){return void e.onError(n)}e.onNext(t)},function(){for(var t=0,e=i.length;e>t;t++)i[t].removeActiveP
lan(u);n(u)});for(o=0,s=i.length;s>o;o++)i[o].addActivePlan(u);return u},be.prototype.dequeue=function(){this.joinObservers.forEach(function(t){t.queue.shift()})},be.prototype.match=function(){var t,e,n=!0;for(t=0,e=this.joinObserverArray.length;e>t;t++)if(0===this.joinObserverArray[t].queue.length){n=!1;break}if(n){var r=[],i=!1;for(t=0,e=this.joinObserverArray.length;e>t;t++)r.push(this.joinObserverArray[t].queue[0]),"C"===this.joinObserverArray[t].queue[0].kind&&(i=!0);if(i)this.onCompleted();else{this.dequeue();var o=[];for(t=0,e=r.length;t<r.length;t++)o.push(r[t].value);this.onNext.apply(this,o)}}};var Wi=function(t){function e(e,n){t.call(this),this.source=e,this.onError=n,this.queue=[],this.activePlans=[],this.subscription=new zn,this.isDisposed=!1}On(e,t);var n=e.prototype;return n.next=function(t){if(!this.isDisposed){if("E"===t.kind)return this.onError(t.exception);this.queue.push(t);for(var e=this.activePlans.slice(0),n=0,r=e.length;r>n;n++)e[n].match()}},n.error
=Oe,n.completed=Oe,n.addActivePlan=function(t){this.activePlans.push(t)},n.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},n.removeActivePlan=function(t){this.activePlans.splice(this.activePlans.indexOf(t),1),0===this.activePlans.length&&this.dispose()},n.dispose=function(){t.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},e}(mr);vr.and=function(t){return new ve([this,t])},vr.thenDo=function(t){return new ve([this]).thenDo(t)},_r.when=function(){var t,e=arguments.length;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new Mi(function(e){var n=[],r=new Ii,i=dr(function(t){e.onNext(t)},function(t){r.forEach(function(e){e.onError(t)}),e.onError(t)},function(){e.onCompleted()});try{for(var o=0,s=t.length;s>o;o++)n.push(t[o].activate(r,i,function(t){var r=n.indexOf(t);n.splice(r,1),0===n.length&&e.onCompleted()}))}catch(u){
Hr(u).subscribe(e)}var a=new qn;return r.forEach(function(t){t.subscribe(),a.add(t)}),a})};{var Li=_r.interval=function(t,e){return xe(t,t,Kn(e)?e:ur)};_r.timer=function(t,e,n){var r;return Kn(n)||(n=ur),e!==i&&"number"==typeof e?r=e:Kn(e)&&(n=e),t instanceof Date&&r===i?ye(t.getTime(),n):t instanceof Date&&r!==i?(r=e,we(t.getTime(),r,n)):r===i?_e(t,n):xe(t,r,n)}}vr.delay=function(t,e){return Kn(e)||(e=ur),t instanceof Date?Ee(this,t.getTime(),e):Se(this,t,e)},vr.debounce=vr.throttleWithTimeout=function(t,e){Kn(e)||(e=ur);var n=this;return new Mi(function(r){var i,o=new Xn,s=!1,u=0,a=n.subscribe(function(n){s=!0,i=n,u++;var a=u,c=new zn;o.setDisposable(c),c.setDisposable(e.scheduleWithRelative(t,function(){s&&u===a&&r.onNext(i),s=!1}))},function(t){o.dispose(),r.onError(t),s=!1,u++},function(){o.dispose(),s&&r.onNext(i),r.onCompleted(),s=!1,u++});return new qn(a,o)},this)},vr.throttle=function(t,e){return this.debounce(t,e)},vr.windowWithTime=function(t,e,n){var r,i=this;ret
urn null==e&&(r=t),Kn(n)||(n=ur),"number"==typeof e?r=e:Kn(e)&&(r=t,n=e),new Mi(function(e){function o(){var t=new zn,i=!1,s=!1;h.setDisposable(t),c===a?(i=!0,s=!0):a>c?i=!0:s=!0;var p=i?c:a,d=p-f;f=p,i&&(c+=r),s&&(a+=r),t.setDisposable(n.scheduleWithRelative(d,function(){if(s){var t=new Fi;l.push(t),e.onNext(In(t,u))}i&&l.shift().onCompleted(),o()}))}var s,u,a=r,c=t,l=[],h=new Xn,f=0;return s=new qn(h),u=new Jn(s),l.push(new Fi),e.onNext(In(l[0],u)),o(),s.add(i.subscribe(function(t){for(var e=0,n=l.length;n>e;e++)l[e].onNext(t)},function(t){for(var n=0,r=l.length;r>n;n++)l[n].onError(t);e.onError(t)},function(){for(var t=0,n=l.length;n>t;t++)l[t].onCompleted();e.onCompleted()})),u},i)},vr.windowWithTimeOrCount=function(t,e,n){var r=this;return Kn(n)||(n=ur),new Mi(function(i){function o(e){var r=new zn;s.setDisposable(r),r.setDisposable(n.scheduleWithRelative(t,function(){if(e===l){c=0;var t=++l;h.onCompleted(),h=new Fi,i.onNext(In(h,a)),o(t)}}))}var s=new Xn,u=new qn(s),a=
new Jn(u),c=0,l=0,h=new Fi;return i.onNext(In(h,a)),o(0),u.add(r.subscribe(function(t){var n=0,r=!1;h.onNext(t),++c===e&&(r=!0,c=0,n=++l,h.onCompleted(),h=new Fi,i.onNext(In(h,a))),r&&o(n)},function(t){h.onError(t),i.onError(t)},function(){h.onCompleted(),i.onCompleted()})),a},r)},vr.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(t){return t.toArray()})},vr.bufferWithTimeOrCount=function(t,e,n){return this.windowWithTimeOrCount(t,e,n).selectMany(function(t){return t.toArray()})},vr.timeInterval=function(t){var e=this;return Kn(t)||(t=ur),Or(function(){var n=t.now();return e.map(function(e){var r=t.now(),i=r-n;return n=r,{value:e,interval:i}})})},vr.timestamp=function(t){return Kn(t)||(t=ur),this.map(function(e){return{value:e,timestamp:t.now()}})},vr.sample=vr.throttleLatest=function(t,e){return Kn(e)||(e=ur),"number"==typeof t?Ce(this,Li(t,e)):Ce(this,t)},vr.timeout=function(t,e,n){(null==e||"string"==typeof e)&&(e=Hr(new Erro
r(e||"Timeout"))),Kn(n)||(n=ur);var r=this,i=t instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Mi(function(o){function s(){var r=u;h.setDisposable(n[i](t,function(){u===r&&(qe(e)&&(e=Rr(e)),c.setDisposable(e.subscribe(o)))}))}var u=0,a=new zn,c=new Xn,l=!1,h=new Xn;return c.setDisposable(a),s(),a.setDisposable(r.subscribe(function(t){l||(u++,o.onNext(t),s())},function(t){l||(u++,o.onError(t))},function(){l||(u++,o.onCompleted())})),new qn(c,h)},r)},_r.generateWithAbsoluteTime=function(t,e,n,r,i,o){return Kn(o)||(o=ur),new Mi(function(s){var u=!0,a=!1;return o.scheduleRecursiveWithAbsoluteAndState(t,o.now(),function(t,o){a&&s.onNext(t);try{if(u?u=!1:t=n(t),a=e(t))var c=r(t),l=i(t)}catch(h){return void s.onError(h)}a?o(c,l):s.onCompleted()})})},_r.generateWithRelativeTime=function(t,e,n,r,i,o){return Kn(o)||(o=ur),new Mi(function(s){var u=!0,a=!1;return o.scheduleRecursiveWithRelativeAndState(t,0,function(t,o){a&&s.onNext(t);try{if(u?u=!1:t=n(t),a=e(t)
)var c=r(t),l=i(t)}catch(h){return void s.onError(h)}a?o(c,l):s.onCompleted()})})},vr.delaySubscription=function(t,e){var n=t instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",r=this;return Kn(e)||(e=ur),new Mi(function(i){var o=new Xn;return o.setDisposable(e[n](t,function(){o.setDisposable(r.subscribe(i))})),o},this)},vr.delayWithSelector=function(t,e){var n,r,i=this;return Fe(t)?r=t:(n=t,r=e),new Mi(function(t){function e(){a.setDisposable(i.subscribe(function(e){var n=w(r)(e);if(n===Wn)return t.onError(n.e);var i=new zn;s.add(i),i.setDisposable(n.subscribe(function(){t.onNext(e),s.remove(i),o()},function(e){t.onError(e)},function(){t.onNext(e),s.remove(i),o()}))},function(e){t.onError(e)},function(){u=!0,a.dispose(),o()}))}function o(){u&&0===s.length&&t.onCompleted()}var s=new qn,u=!1,a=new Xn;return n?a.setDisposable(n.subscribe(e,function(e){t.onError(e)},e)):e(),new qn(a,s)},this)},vr.timeoutWithSelector=function(t,e,n){1===arguments.length&&(e=t,t=Gr()),
n||(n=Hr(new Error("Timeout")));var r=this;return new Mi(function(i){function o(t){function e(){return l===r}var r=l,o=new zn;a.setDisposable(o),o.setDisposable(t.subscribe(function(){e()&&u.setDisposable(n.subscribe(i)),o.dispose()},function(t){e()&&i.onError(t)},function(){e()&&u.setDisposable(n.subscribe(i))}))}function s(){var t=!h;return t&&l++,t}var u=new Xn,a=new Xn,c=new zn;u.setDisposable(c);var l=0,h=!1;return o(t),c.setDisposable(r.subscribe(function(t){if(s()){i.onNext(t);var n;try{n=e(t)}catch(r){return void i.onError(r)}o(qe(n)?Rr(n):n)}},function(t){s()&&i.onError(t)},function(){s()&&i.onCompleted()})),new qn(u,a)},r)},vr.debounceWithSelector=function(t){var e=this;return new Mi(function(n){var r,i=!1,o=new Xn,s=0,u=e.subscribe(function(e){var u;try{u=t(e)}catch(a){return void n.onError(a)}qe(u)&&(u=Rr(u)),i=!0,r=e,s++;var c=s,l=new zn;o.setDisposable(l),l.setDisposable(u.subscribe(function(){i&&s===c&&n.onNext(r),i=!1,l.dispose()},n.onError.bind(n),function()
{i&&s===c&&n.onNext(r),i=!1,l.dispose()}))},function(t){o.dispose(),n.onError(t),i=!1,s++},function(){o.dispose(),i&&n.onNext(r),n.onCompleted(),i=!1,s++});return new qn(u,o)},e)},vr.throttleWithSelector=function(t){return this.debounceWithSelector(t)},vr.skipLastWithTime=function(t,e){Kn(e)||(e=ur);var n=this;return new Mi(function(r){var i=[];return n.subscribe(function(n){var o=e.now();for(i.push({interval:o,value:n});i.length>0&&o-i[0].interval>=t;)r.onNext(i.shift().value)},function(t){r.onError(t)},function(){for(var n=e.now();i.length>0&&n-i[0].interval>=t;)r.onNext(i.shift().value);r.onCompleted()})},n)},vr.takeLastWithTime=function(t,e){var n=this;return Kn(e)||(e=ur),new Mi(function(r){var i=[];return n.subscribe(function(n){var r=e.now();for(i.push({interval:r,value:n});i.length>0&&r-i[0].interval>=t;)i.shift()},function(t){r.onError(t)},function(){for(var n=e.now();i.length>0;){var o=i.shift();n-o.interval<=t&&r.onNext(o.value)}r.onCompleted()})},n)},vr.takeLastB
ufferWithTime=function(t,e){var n=this;return Kn(e)||(e=ur),new Mi(function(r){var i=[];return n.subscribe(function(n){var r=e.now();for(i.push({interval:r,value:n});i.length>0&&r-i[0].interval>=t;)i.shift()},function(t){r.onError(t)},function(){for(var n=e.now(),o=[];i.length>0;){var s=i.shift();n-s.interval<=t&&o.push(s.value)}r.onNext(o),r.onCompleted()})},n)},vr.takeWithTime=function(t,e){var n=this;return Kn(e)||(e=ur),new Mi(function(r){return new qn(e.scheduleWithRelative(t,function(){r.onCompleted()}),n.subscribe(r))},n)},vr.skipWithTime=function(t,e){var n=this;return Kn(e)||(e=ur),new Mi(function(r){var i=!1;return new qn(e.scheduleWithRelative(t,function(){i=!0}),n.subscribe(function(t){i&&r.onNext(t)},r.onError.bind(r),r.onCompleted.bind(r)))},n)},vr.skipUntilWithTime=function(t,e){Kn(e)||(e=ur);var n=this,r=t instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Mi(function(i){var o=!1;return new qn(e[r](t,function(){o=!0}),n.subscribe(functio
n(t){o&&i.onNext(t)},function(t){i.onError(t)},function(){i.onCompleted()}))},n)},vr.takeUntilWithTime=function(t,e){Kn(e)||(e=ur);var n=this,r=t instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Mi(function(i){return new qn(e[r](t,function(){i.onCompleted()}),n.subscribe(i))},n)},vr.throttleFirst=function(t,e){Kn(e)||(e=ur);var n=+t||0;if(0>=n)throw new RangeError("windowDuration cannot be less or equal zero.");var r=this;return new Mi(function(t){var i=0;return r.subscribe(function(r){var o=e.now();(0===i||o-i>=n)&&(i=o,t.onNext(r))},function(e){t.onError(e)},function(){t.onCompleted()})},r)},vr.transduce=function(t){function e(t){return{"@@transducer/init":function(){return t},"@@transducer/step":function(t,e){return t.onNext(e)},"@@transducer/result":function(t){return t.onCompleted()}}}var n=this;return new Mi(function(r){var i=t(e(r));return n.subscribe(function(t){try{i["@@transducer/step"](r,t)}catch(e){r.onError(e)}},function(t){r.onError(t)},
function(){i["@@transducer/result"](r)})},n)},vr.exclusive=function(){var t=this;return new Mi(function(e){var n=!1,r=!1,i=new zn,o=new qn;return o.add(i),i.setDisposable(t.subscribe(function(t){if(!n){n=!0,qe(t)&&(t=Rr(t));var i=new zn;o.add(i),i.setDisposable(t.subscribe(e.onNext.bind(e),e.onError.bind(e),function(){o.remove(i),n=!1,r&&1===o.length&&e.onCompleted()}))}},e.onError.bind(e),function(){r=!0,n||1!==o.length||e.onCompleted()})),o},this)},vr.exclusiveMap=function(t,e){var n=this,r=sn(t,e,3);return new Mi(function(t){var e=0,i=!1,o=!0,s=new zn,u=new qn;return u.add(s),s.setDisposable(n.subscribe(function(n){i||(i=!0,innerSubscription=new zn,u.add(innerSubscription),qe(n)&&(n=Rr(n)),innerSubscription.setDisposable(n.subscribe(function(i){var o;try{o=r(i,e++,n)}catch(s){return void t.onError(s)}t.onNext(o)},function(e){t.onError(e)},function(){u.remove(innerSubscription),i=!1,o&&1===u.length&&t.onCompleted()})))},function(e){t.onError(e)},function(){o=!0,1!==u.lengt
h||i||t.onCompleted()})),u},this)},Te.VirtualTimeScheduler=function(t){function e(){return this.toDateTimeOffset(this.clock)}function n(t,e){return this.scheduleAbsoluteWithState(t,this.clock,e)}function r(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e),n)}function i(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e-this.now()),n)}function o(t,e){return e(),Gn}function s(o,s){this.clock=o,this.comparer=s,this.isEnabled=!1,this.queue=new Ln(1024),t.call(this,e,n,r,i)}On(s,t);var u=s.prototype;return u.add=Ke,u.toDateTimeOffset=Ke,u.toRelative=Ke,u.schedulePeriodicWithState=function(t,e,n){var r=new er(this,t,e,n);return r.start()},u.scheduleRelativeWithState=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsoluteWithState(t,r,n)},u.scheduleRelative=function(t,e){return this.scheduleRelativeWithState(e,t,o)},u.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var t=this.getNext();null!==t?(this.comparer(t.dueTime,this.
clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1}while(this.isEnabled)}},u.stop=function(){this.isEnabled=!1},u.advanceTo=function(t){var e=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw new Ye;if(0!==e&&!this.isEnabled){this.isEnabled=!0;do{var n=this.getNext();null!==n&&this.comparer(n.dueTime,t)<=0?(this.comparer(n.dueTime,this.clock)>0&&(this.clock=n.dueTime),n.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=t}},u.advanceBy=function(t){var e=this.add(this.clock,t),n=this.comparer(this.clock,e);if(n>0)throw new Ye;0!==n&&this.advanceTo(e)},u.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw new Ye;this.clock=e},u.getNext=function(){for(;this.queue.length>0;){var t=this.queue.peek();if(!t.isCancelled())return t;this.queue.dequeue()}return null},u.scheduleAbsolute=function(t,e){return this.scheduleAbsoluteWithState(e,t,o)},u.scheduleAbsoluteWithState=function(t,e,n){function r(t,e){return i.
queue.remove(o),n(t,e)}var i=this,o=new Yn(this,t,r,e,this.comparer);return this.queue.enqueue(o),o.disposable},s}(Hn),Te.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,i=n||Le;t.call(this,r,i)}On(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toDateTimeOffset=function(t){return new Date(t).getTime()},n.toRelative=function(t){return t},e}(Te.VirtualTimeScheduler);var Mi=Te.AnonymousObservable=function(t){function e(t){return t&&Fe(t.dispose)?t:Fe(t)?Vn(t):Gn}function n(t,n){var r=n[0],i=n[1],o=w(i)(r);return o!==Wn||r.fail(Wn.e)?void r.setDisposable(e(o)):_(Wn.e)}function r(e,r){function i(t){var r=new qi(t),i=[r,e];return rr.scheduleRequired()?rr.scheduleWithState(i,n):n(null,i),r}this.source=r,t.call(this,i)}return On(r,t),r}(_r),qi=function(t){function e(e){t.call(this),this.observer=e,this.m=new zn}On(e,t);var n=e.prototype;return n.next=function(t){var e=w(this.observer.onNext).call(this.observer,t);e===Wn&&(this.dispose(),_(e.e))},n.
error=function(t){var e=w(this.observer.onError).call(this.observer,t);this.dispose(),e===Wn&&_(e.e)},n.completed=function(){var t=w(this.observer.onCompleted).call(this.observer);this.dispose(),t===Wn&&_(t.e)},n.setDisposable=function(t){this.m.setDisposable(t)},n.getDisposable=function(){return this.m.getDisposable()},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(mr),Bi=function(t){function e(t){return this.underlyingObservable.subscribe(t)}function n(n,r,i){t.call(this,e),this.key=n,this.underlyingObservable=i?new Mi(function(t){return new qn(i.getDisposable(),r.subscribe(t))}):r}return On(n,t),n}(_r),Fi=Te.Subject=function(t){function e(t){return Pn(this),this.isStopped?this.hasError?(t.onError(this.error),Gn):(t.onCompleted(),Gn):(this.observers.push(t),new ji(this,t))}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return On(n,t),Un(n.prototype,pr.prototype,{hasObservers:function(){return th
is.observers.length>0},onCompleted:function(){if(Pn(this),!this.isStopped){this.isStopped=!0;for(var t=0,e=o(this.observers),n=e.length;n>t;t++)e[t].onCompleted();this.observers.length=0}},onError:function(t){if(Pn(this),!this.isStopped){this.isStopped=!0,this.error=t,this.hasError=!0;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onError(t);this.observers.length=0}},onNext:function(t){if(Pn(this),!this.isStopped)for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),n.create=function(t,e){return new Gi(t,e)},n}(_r),Vi=Te.AsyncSubject=function(t){function e(t){return Pn(this),this.isStopped?(this.hasError?t.onError(this.error):this.hasValue?(t.onNext(this.value),t.onCompleted()):t.onCompleted(),Gn):(this.observers.push(t),new ji(this,t))}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return On(n,t),Un(n.prototype,pr,{hasObser
vers:function(){return Pn(this),this.observers.length>0},onCompleted:function(){var t,e;if(Pn(this),!this.isStopped){this.isStopped=!0;var n=o(this.observers),e=n.length;if(this.hasValue)for(t=0;e>t;t++){var r=n[t];r.onNext(this.value),r.onCompleted()}else for(t=0;e>t;t++)n[t].onCompleted();this.observers.length=0}},onError:function(t){if(Pn(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=t;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onError(t);this.observers.length=0}},onNext:function(t){Pn(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),n}(_r),Gi=Te.AnonymousSubject=function(t){function e(t){return this.observable.subscribe(t)}function n(n,r){this.observer=n,this.observable=r,t.call(this,e)}return On(n,t),Un(n.prototype,pr.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:f
unction(t){this.observer.onNext(t)}}),n}(_r);Te.Pauser=function(t){function e(){t.call(this)}return On(e,t),e.prototype.pause=function(){this.onNext(!1)},e.prototype.resume=function(){this.onNext(!0)},e}(Fi),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(je.Rx=Te,define(function(){return Te})):Ne&&Ae?De?(Ae.exports=Te).Rx=Te:Ne.Rx=Te:je.Rx=Te;var Zi=h()}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js"}],"/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/lodash/dist/lodash.js":[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r<i;)if(t[r]===e)return r;return-1}function i(t,e){var n=typeof e;if(t=t.cache,"boolean"==n||null==e)return t[e]?0:-1;"number"!=n&&"string"!=n&&(n="object");var i="number"==n?e:w+e;return t=(t=t[n])&&t[i],"object"==
n?t&&r(t,e)>-1?0:-1:t?0:-1}function o(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:w+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function s(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,i=-1,o=n.length;++i<o;){var s=n[i],u=r[i];if(s!==u){if(s>u||"undefined"==typeof s)return 1;if(u>s||"undefined"==typeof u)return-1}}return t.index-e.index}function a(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],s=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&s&&"object"==typeof s)return!1;var u=h();u["false"]=u["null"]=u["true"]=u.undefined=!1;var a=h();for(a.array=t,a.cache=u,a.push=o;++e<n;)a.push(t[e]);return a}function c(t){return"\\"+H[t]}function l(){return g.pop()||[]}function h(){return b.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}functi
on f(t){t.length=0,g.length<x&&g.push(t)}function p(t){var e=t.cache;e&&p(e),t.array=t.cache=t.criteria=t.object=t.number=t.string=t.value=null,b.length<x&&b.push(t)}function d(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,o=Array(0>i?0:i);++r<i;)o[r]=t[e+r];return o}function v(t){function e(t){return t&&"object"==typeof t&&!Kr(t)&&Ur.call(t,"__wrapped__")?t:new n(t)}function n(t,e){this.__chain__=!!e,this.__wrapped__=t}function o(t){function e(){if(r){var t=d(r);Ir.apply(t,arguments)}if(this instanceof e){var o=b(n.prototype),s=n.apply(o,t||arguments);return De(s)?s:o}return n.apply(i,t||arguments)}var n=t[0],r=t[2],i=t[4];return Qr(e,t),e}function g(t,e,n,r,i){if(n){var o=n(t);if("undefined"!=typeof o)return o}var s=De(t);if(!s)return t;var u=jr.call(t);if(!z[u])return t;var a=Yr[u];switch(u){case q:case B:return new a(+t);case V:case P:return new a(t);case Z:return o=a(t.source,N.exec(t)),o.lastIndex=t.lastIndex,o}var c=Kr(t);if(e){var h=!r
;r||(r=l()),i||(i=l());for(var p=r.length;p--;)if(r[p]==t)return i[p];o=c?a(t.length):{}}else o=c?d(t):oi({},t);return c&&(Ur.call(t,"index")&&(o.index=t.index),Ur.call(t,"input")&&(o.input=t.input)),e?(r.push(t),i.push(o),(c?He:ai)(t,function(t,s){o[s]=g(t,e,n,r,i)}),h&&(f(r),f(i)),o):o}function b(t){return De(t)?Br(t):{}}function x(t,e,n){if("function"!=typeof t)return Kn;if("undefined"==typeof e||!("prototype"in t))return t;var r=t.__bindData__;if("undefined"==typeof r&&(Hr.funcNames&&(r=!t.name),r=r||!Hr.funcDecomp,!r)){var i=Tr.call(t);Hr.funcNames||(r=!A.test(i)),r||(r=O.test(i),Qr(t,r))}if(r===!1||r!==!0&&1&r[1])return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return In(t,e)}function H(t){function e(){var t=a?s:this;if(i){var p=d(i);Ir.apply(p,arguments)}if((o||l)&&(p||(p=d(arguments)),o&&Ir.a
pply(p,o),l&&p.length<u))return r|=16,H([n,h?r:-4&r,p,null,s,u]);if(p||(p=arguments),c&&(n=t[f]),this instanceof e){t=b(n.prototype);var v=n.apply(t,p);return De(v)?v:t}return n.apply(t,p)}var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=t[5],a=1&r,c=2&r,l=4&r,h=8&r,f=n;return Qr(e,t),e}function K(t,e){var n=-1,o=ae(),s=t?t.length:0,u=s>=_&&o===r,c=[];if(u){var l=a(e);
l?(o=i,e=l):u=!1}for(;++n<s;){var h=t[n];o(e,h)<0&&c.push(h)}return u&&p(e),c}function $(t,e,n,r){for(var i=(r||0)-1,o=t?t.length:0,s=[];++i<o;){var u=t[i];if(u&&"object"==typeof u&&"number"==typeof u.length&&(Kr(u)||fe(u))){e||(u=$(u,e,n));var a=-1,c=u.length,l=s.length;for(s.length+=c;++a<c;)s[l++]=u[a]}else n||s.push(u)}return s}function te(t,e,n,r,i,o){if(n){var s=n(t,e);if("undefined"!=typeof s)return!!s}if(t===e)return 0!==t||1/t==1/e;var u=typeof t,a=typeof e;if(!(t!==t||t&&Y[u]||e&&Y[a]))return!1;if(null==t||null==e)return t===e;var c=jr.call(t),h=jr.call(e);if(c==L&&(c=G),h==L&&(h=G),c!=h)return!1;switch(c){case q:case B:return+t==+e;case V:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case Z:case P:return t==xr(e)}var p=c==M;if(!p){var d=Ur.call(t,"__wrapped__"),v=Ur.call(e,"__wrapped__");if(d||v)return te(d?t.__wrapped__:t,v?e.__wrapped__:e,n,r,i,o);if(c!=G)return!1;var m=t.constructor,g=e.constructor;if(m!=g&&!(Ae(m)&&m instanceof m&&Ae(g)&&g instanceof g)&&"constructor
"in t&&"constructor"in e)return!1}var b=!i;i||(i=l()),o||(o=l());for(var y=i.length;y--;)if(i[y]==t)return o[y]==e;var w=0;if(s=!0,i.push(t),o.push(e),p){if(y=t.length,w=e.length,s=w==y,s||r)for(;w--;){var _=y,x=e[w];if(r)for(;_--&&!(s=te(t[_],x,n,r,i,o)););else if(!(s=te(t[w],x,n,r,i,o)))break}}else ui(e,function(e,u,a){return Ur.call(a,u)?(w++,s=Ur.call(t,u)&&te(t[u],e,n,r,i,o)):void 0}),s&&!r&&ui(t,function(t,e,n){return Ur.call(n,e)?s=--w>-1:void 0});return i.pop(),o.pop(),b&&(f(i),f(o)),s}function ee(t,e,n,r,i){(Kr(e)?He:ai)(e,function(e,o){var s,u,a=e,c=t[o];if(e&&((u=Kr(e))||ci(e))){for(var l=r.length;l--;)if(s=r[l]==e){c=i[l];break}if(!s){var h;n&&(a=n(c,e),(h="undefined"!=typeof a)&&(c=a)),h||(c=u?Kr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(a=n(c,e),"undefined"==typeof a&&(a=e)),"undefined"!=typeof a&&(c=a);t[o]=c})}function re(t,e){return t+Rr(Jr()*(e-t+1))}function ie(t,e,n){var o=-1,s=ae(),u=t?t.length:0,c=[],h=!e&&u>=_&&s===r,d=n||h?l()
:c;if(h){var v=a(d);s=i,d=v}for(;++o<u;){var m=t[o],g=n?n(m,o,t):m;(e?!o||d[d.length-1]!==g:s(d,g)<0)&&((n||h)&&d.push(g),c.push(m))}return h?(f(d.array),p(d)):n&&f(d),c}function oe(t){return function(n,r,i){var o={};r=e.createCallback(r,i,3);var s=-1,u=n?n.length:0;if("number"==typeof u)for(;++s<u;){var a=n[s];t(o,a,r(a,s,n),n)}else ai(n,function(e,n,i){t(o,e,r(e,n,i),i)});return o}}function se(t,e,n,r,i,s){var u=1&e,a=2&e,c=4&e,l=16&e,h=32&e;if(!a&&!Ae(t))throw new Sr;l&&!n.length&&(e&=-17,l=n=!1),h&&!r.length&&(e&=-33,h=r=!1);var f=t&&t.__bindData__;if(f&&f!==!0)return f=d(f),f[2]&&(f[2]=d(f[2])),f[3]&&(f[3]=d(f[3])),!u||1&f[1]||(f[4]=i),!u&&1&f[1]&&(e|=8),!c||4&f[1]||(f[5]=s),l&&Ir.apply(f[2]||(f[2]=[]),n),h&&Mr.apply(f[3]||(f[3]=[]),r),f[1]|=e,se.apply(null,f);var p=1==e||17===e?o:H;return p([t,e,n,r,i,s])}function ue(t){return ei[t]}function ae(){var t=(t=e.indexOf)===bn?r:t;return t}function ce(t){return"function"==typeof t&&Nr.test(t)}function le(t){var e,n;return t&
&jr.call(t)==G&&(e=t.constructor,!Ae(e)||e instanceof e)?(ui(t,function(t,e){n=e}),"undefined"==typeof n||Ur.call(t,n)):!1}function he(t){return ni[t]}function fe(t){return t&&"object"==typeof t&&"number"==typeof t.length&&jr.call(t)==L||!1}function pe(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n=e,e=!1),g(t,e,"function"==typeof n&&x(n,r,1))}function de(t,e,n){return g(t,!0,"function"==typeof e&&x(e,n,1))}function ve(t,e){var n=b(t);return e?oi(n,e):n}function me(t,n,r){var i;return n=e.createCallback(n,r,3),ai(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function ge(t,n,r){var i;return n=e.createCallback(n,r,3),ye(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function be(t,e,n){var r=[];ui(t,function(t,e){r.push(e,t)});var i=r.length;for(e=x(e,n,3);i--&&e(r[i--],r[i],t)!==!1;);return t}function ye(t,e,n){var r=ti(t),i=r.length;for(e=x(e,n,3);i--;){var o=r[i];if(e(t[o],o,t)===!1)break}return t}function we(t){var e=[];return ui(t,function(t,n){Ae(t)&&e
.push(n)}),e.sort()}function _e(t,e){return t?Ur.call(t,e):!1}function xe(t){for(var e=-1,n=ti(t),r=n.length,i={};++e<r;){var o=n[e];i[t[o]]=o}return i}function Se(t){return t===!0||t===!1||t&&"object"==typeof t&&jr.call(t)==q||!1}function Ee(t){return t&&"object"==typeof t&&jr.call(t)==B||!1}function Ce(t){return t&&1===t.nodeType||!1}function ke(t){var e=!0;if(!t)return e;var n=jr.call(t),r=t.length;return n==M||n==P||n==L||n==G&&"number"==typeof r&&Ae(t.splice)?!r:(ai(t,function(){return e=!1}),e)}function je(t,e,n,r){return te(t,e,"function"==typeof n&&x(n,r,2))}function Ne(t){return Vr(t)&&!Gr(parseFloat(t))}function Ae(t){return"function"==typeof t}function De(t){return!(!t||!Y[typeof t])}function Re(t){return Oe(t)&&t!=+t}function Te(t){return null===t}function Oe(t){return"number"==typeof t||t&&"object"==typeof t&&jr.call(t)==V||!1}function Ue(t){return t&&"object"==typeof t&&jr.call(t)==Z||!1}function Ie(t){return"string"==typeof t||t&&"object"==typeof t&&jr.call(t)
==P||!1}function We(t){return"undefined"==typeof t}function Le(t,n,r){var i={};return n=e.createCallback(n,r,3),ai(t,function(t,e,r){i[e]=n(t,e,r)}),i}function Me(t){var e=arguments,n=2;if(!De(t))return t;if("number"!=typeof e[2]&&(n=e.length),n>3&&"function"==typeof e[n-2])var r=x(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=d(arguments,1,n),o=-1,s=l(),u=l();++o<n;)ee(t,i[o],r,s,u);return f(s),f(u),t}function qe(t,n,r){var i={};if("function"!=typeof n){var o=[];ui(t,function(t,e){o.push(e)}),o=K(o,$(arguments,!0,!1,1));for(var s=-1,u=o.length;++s<u;){var a=o[s];i[a]=t[a]}}else n=e.createCallback(n,r,3),ui(t,function(t,e,r){n(t,e,r)||(i[e]=t)});return i}function Be(t){for(var e=-1,n=ti(t),r=n.length,i=dr(r);++e<r;){var o=n[e];i[e]=[o,t[o]]}return i}function Fe(t,n,r){var i={};if("function"!=typeof n)for(var o=-1,s=$(arguments,!0,!1,1),u=De(t)?s.length:0;++o<u;){var a=s[o];a in t&&(i[a]=t[a])}else n=e.createCallback(n,r,3),ui(t,function(t,e,r){
n(t,e,r)&&(i[e]=t)});return i}function Ve(t,n,r,i){var o=Kr(t);if(null==r)if(o)r=[];else{var s=t&&t.constructor,u=s&&s.prototype;r=b(u)}return n&&(n=e.createCallback(n,i,4),(o?He:ai)(t,function(t,e,i){return n(r,t,e,i)})),r}function Ge(t){for(var e=-1,n=ti(t),r=n.length,i=dr(r);++e<r;)i[e]=t[n[e]];return i}function Ze(t){for(var e=arguments,n=-1,r=$(e,!0,!1,1),i=e[2]&&e[2][e[1]]===t?1:r.length,o=dr(i);++n<i;)o[n]=t[r[n]];return o}function Pe(t,e,n){var r=-1,i=ae(),o=t?t.length:0,s=!1;return n=(0>n?Pr(0,o+n):n)||0,Kr(t)?s=i(t,e,n)>-1:"number"==typeof o?s=(Ie(t)?t.indexOf(e,n):i(t,e,n))>-1:ai(t,function(t){return++r>=n?!(s=t===e):void 0}),s}function ze(t,n,r){var i=!0;n=e.createCallback(n,r,3);var o=-1,s=t?t.length:0;if("number"==typeof s)for(;++o<s&&(i=!!n(t[o],o,t)););else ai(t,function(t,e,r){return i=!!n(t,e,r)});return i}function Xe(t,n,r){var i=[];n=e.createCallback(n,r,3);var o=-1,s=t?t.length:0;if("number"==typeof s)for(;++o<s;){var u=t[o];n(u,o,t)&&i.push(u)}else ai(t
,function(t,e,r){n(t,e,r)&&i.push(t)});return i}function Je(t,n,r){n=e.createCallback(n,r,3);var i=-1,o=t?t.length:0;if("number"!=typeof o){var s;return ai(t,function(t,e,r){return n(t,e,r)?(s=t,!1):void 0}),s}for(;++i<o;){var u=t[i];if(n(u,i,t))return u}}function Ye(t,n,r){var i;return n=e.createCallback(n,r,3),Qe(t,function(t,e,r){return n(t,e,r)?(i=t,!1):void 0}),i}function He(t,e,n){var r=-1,i=t?t.length:0;if(e=e&&"undefined"==typeof n?e:x(e,n,3),"number"==typeof i)for(;++r<i&&e(t[r],r,t)!==!1;);else ai(t,e);return t}function Qe(t,e,n){var r=t?t.length:0;if(e=e&&"undefined"==typeof n?e:x(e,n,3),"number"==typeof r)for(;r--&&e(t[r],r,t)!==!1;);else{var i=ti(t);r=i.length,ai(t,function(t,n,o){return n=i?i[--r]:--r,e(o[n],n,o)})}return t}function Ke(t,e){var n=d(arguments,2),r=-1,i="function"==typeof e,o=t?t.length:0,s=dr("number"==typeof o?o:0);return He(t,function(t){s[++r]=(i?e:t[e]).apply(t,n)}),s}function $e(t,n,r){var i=-1,o=t?t.length:0;if(n=e.createCallback(n,r,3),"n
umber"==typeof o)for(var s=dr(o);++i<o;)s[i]=n(t[i],i,t);else s=[],ai(t,function(t,e,r){s[++i]=n(t,e,r)});return s}function tn(t,n,r){var i=-1/0,o=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Kr(t))for(var u=-1,a=t.length;++u<a;){var c=t[u];c>o&&(o=c)}else n=null==n&&Ie(t)?s:e.createCallback(n,r,3),He(t,function(t,e,r){var s=n(t,e,r);s>i&&(i=s,o=t)});return o}function en(t,n,r){var i=1/0,o=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Kr(t))for(var u=-1,a=t.length;++u<a;){var c=t[u];o>c&&(o=c)}else n=null==n&&Ie(t)?s:e.createCallback(n,r,3),He(t,function(t,e,r){var s=n(t,e,r);i>s&&(i=s,o=t)});return o}function nn(t,n,r,i){if(!t)return r;var o=arguments.length<3;n=e.createCallback(n,i,4);var s=-1,u=t.length;if("number"==typeof u)for(o&&(r=t[++s]);++s<u;)r=n(r,t[s],s,t);else ai(t,function(t,e,i){r=o?(o=!1,t):n(r,t,e,i)});return r}function rn(t,n,r,i){var o=arguments.length<3;return n=e.createCallback(n,i,4),Qe(t,function(t,e,i){r=o?(o=!1,t):n(r,t,e,i)}
),r}function on(t,n,r){return n=e.createCallback(n,r,3),Xe(t,function(t,e,r){return!n(t,e,r)})}function sn(t,e,n){if(t&&"number"!=typeof t.length&&(t=Ge(t)),null==e||n)return t?t[re(0,t.length-1)]:m;var r=un(t);return r.length=zr(Pr(0,e),r.length),r}function un(t){var e=-1,n=t?t.length:0,r=dr("number"==typeof n?n:0);return He(t,function(t){var n=re(0,++e);r[e]=r[n],r[n]=t}),r}function an(t){var e=t?t.length:0;return"number"==typeof e?e:ti(t).length}function cn(t,n,r){var i;n=e.createCallback(n,r,3);var o=-1,s=t?t.length:0;if("number"==typeof s)for(;++o<s&&!(i=n(t[o],o,t)););else ai(t,function(t,e,r){return!(i=n(t,e,r))});return!!i}function ln(t,n,r){var i=-1,o=Kr(n),s=t?t.length:0,a=dr("number"==typeof s?s:0);for(o||(n=e.createCallback(n,r,3)),He(t,function(t,e,r){var s=a[++i]=h();o?s.criteria=$e(n,function(e){return t[e]}):(s.criteria=l())[0]=n(t,e,r),s.index=i,s.value=t}),s=a.length,a.sort(u);s--;){var c=a[s];a[s]=c.value,o||f(c.criteria),p(c)}return a}function hn(t){retur
n t&&"number"==typeof t.length?d(t):Ge(t)}function fn(t){for(var e=-1,n=t?t.length:0,r=[];++e<n;){var i=t[e];i&&r.push(i)}return r}function pn(t){return K(t,$(arguments,!0,!0,1))}function dn(t,n,r){var i=-1,o=t?t.length:0;for(n=e.createCallback(n,r,3);++i<o;)if(n(t[i],i,t))return i;return-1}function vn(t,n,r){var i=t?t.length:0;for(n=e.createCallback(n,r,3);i--;)if(n(t[i],i,t))return i;return-1}function mn(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=-1;for(n=e.createCallback(n,r,3);++s<o&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[0]:m;return d(t,0,zr(Pr(0,i),o))}function gn(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n="function"!=typeof e&&r&&r[e]===t?null:e,e=!1),null!=n&&(t=$e(t,n,r)),$(t,e)}function bn(t,e,n){if("number"==typeof n){var i=t?t.length:0;n=0>n?Pr(0,i+n):n||0}else if(n){var o=jn(t,e);return t[o]===e?o:-1}return r(t,e,n)}function yn(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=o;for(n=e.createCallba
ck(n,r,3);s--&&n(t[s],s,t);)i++}else i=null==n||r?1:n||i;return d(t,0,zr(Pr(0,o-i),o))}function wn(){for(var t=[],e=-1,n=arguments.length,o=l(),s=ae(),u=s===r,c=l();++e<n;){var h=arguments[e];(Kr(h)||fe(h))&&(t.push(h),o.push(u&&h.length>=_&&a(e?t[e]:c)))}var d=t[0],v=-1,m=d?d.length:0,g=[];t:for(;++v<m;){var b=o[0];if(h=d[v],(b?i(b,h):s(c,h))<0){for(e=n,(b||c).push(h);--e;)if(b=o[e],(b?i(b,h):s(t[e],h))<0)continue t;g.push(h)}}for(;n--;)b=o[n],b&&p(b);return f(o),f(c),g}function _n(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=o;for(n=e.createCallback(n,r,3);s--&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[o-1]:m;return d(t,Pr(0,o-i))}function xn(t,e,n){var r=t?t.length:0;for("number"==typeof n&&(r=(0>n?Pr(0,r+n):zr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function Sn(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++n<r;)for(var o=-1,s=e[n];++o<i;)t[o]===s&&(Lr.call(t,o--,1),i--);return t}function En(t,e,n){t=+t||0,n="number"==typeof
n?n:+n||1,null==e&&(e=t,t=0);for(var r=-1,i=Pr(0,Ar((e-t)/(n||1))),o=dr(i);++r<i;)o[r]=t,t+=n;return o}function Cn(t,n,r){var i=-1,o=t?t.length:0,s=[];for(n=e.createCallback(n,r,3);++i<o;){var u=t[i];n(u,i,t)&&(s.push(u),Lr.call(t,i--,1),o--)}return s}function kn(t,n,r){if("number"!=typeof n&&null!=n){var i=0,o=-1,s=t?t.length:0;for(n=e.createCallback(n,r,3);++o<s&&n(t[o],o,t);)i++}else i=null==n||r?1:Pr(0,n);return d(t,i)}function jn(t,n,r,i){var o=0,s=t?t.length:o;for(r=r?e.createCallback(r,i,1):Kn,n=r(n);s>o;){var u=o+s>>>1;r(t[u])<n?o=u+1:s=u}return o}function Nn(){return ie($(arguments,!0,!0))}function An(t,n,r,i){return"boolean"!=typeof n&&null!=n&&(i=r,r="function"!=typeof n&&i&&i[n]===t?null:n,n=!1),null!=r&&(r=e.createCallback(r,i,3)),ie(t,n,r)}function Dn(t){return K(t,d(arguments,1))}function Rn(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Kr(n)||fe(n))var r=r?ie(K(r,n).concat(K(n,r))):n}return r||[]}function Tn(){for(var t=arguments.length>1?ar
guments:arguments[0],e=-1,n=t?tn(pi(t,"length")):0,r=dr(0>n?0:n);++e<n;)r[e]=pi(t,e);return r}function On(t,e){var n=-1,r=t?t.length:0,i={};for(e||!r||Kr(t[0])||(e=[]);++n<r;){var o=t[n];e?i[o]=e[n]:o&&(i[o[0]]=o[1])}return i}function Un(t,e){if(!Ae(e))throw new Sr;return function(){return--t<1?e.apply(this,arguments):void 0}}function In(t,e){return arguments.length>2?se(t,17,d(arguments,2),null,e):se(t,1,null,null,e)}function Wn(t){for(var e=arguments.length>1?$(arguments,!0,!1,1):we(t),n=-1,r=e.length;++n<r;){var i=e[n];t[i]=se(t[i],1,null,null,t)}return t}function Ln(t,e){return arguments.length>2?se(e,19,d(arguments,2),null,t):se(e,3,null,null,t)}function Mn(){for(var t=arguments,e=t.length;e--;)if(!Ae(t[e]))throw new Sr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function qn(t,e){return e="number"==typeof e?e:+e||t.length,se(t,4,null,null,null,e)}function Bn(t,e,n){var r,i,o,s,u,a,c,l=0,h=!1,f=!0;if(!Ae(t))throw new Sr;if(e=
Pr(0,e)||0,n===!0){var p=!0;f=!1}else De(n)&&(p=n.leading,h="maxWait"in n&&(Pr(e,n.maxWait)||0),f="trailing"in n?n.trailing:f);var d=function(){var n=e-(vi()-s);if(0>=n){i&&Dr(i);var h=c;i=a=c=m,h&&(l=vi(),o=t.apply(u,r),a||i||(r=u=null))}else a=Wr(d,n)},v=function(){a&&Dr(a),i=a=c=m,(f||h!==e)&&(l=vi(),o=t.apply(u,r),a||i||(r=u=null))};return function(){if(r=arguments,s=vi(),u=this,c=f&&(a||!p),h===!1)var n=p&&!a;else{i||p||(l=s);var m=h-(s-l),g=0>=m;g?(i&&(i=Dr(i)),l=s,o=t.apply(u,r)):i||(i=Wr(v,m))}return g&&a?a=Dr(a):a||e===h||(a=Wr(d,e)),n&&(g=!0,o=t.apply(u,r)),!g||a||i||(r=u=null),o}}function Fn(t){if(!Ae(t))throw new Sr;var e=d(arguments,1);return Wr(function(){t.apply(m,e)},1)}function Vn(t,e){if(!Ae(t))throw new Sr;var n=d(arguments,2);return Wr(function(){t.apply(m,n)},e)}function Gn(t,e){if(!Ae(t))throw new Sr;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):w+arguments[0];return Ur.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}functi
on Zn(t){var e,n;if(!Ae(t))throw new Sr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Pn(t){return se(t,16,d(arguments,1))}function zn(t){return se(t,32,null,d(arguments,1))}function Xn(t,e,n){var r=!0,i=!0;if(!Ae(t))throw new Sr;return n===!1?r=!1:De(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),X.leading=r,X.maxWait=e,X.trailing=i,Bn(t,e,X)}function Jn(t,e){return se(e,16,[t])}function Yn(t){return function(){return t}}function Hn(t,e,n){var r=typeof t;if(null==t||"function"==r)return x(t,e,n);if("object"!=r)return nr(t);var i=ti(t),o=i[0],s=t[o];return 1!=i.length||s!==s||De(s)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[o];return s===e&&(0!==s||1/s==1/e)}}function Qn(t){return null==t?"":xr(t).replace(ii,ue)}function Kn(t){return t}function $n(t,r,i){var o=!0,s=r&&we(r);r&&(i||s.length)||(null==i&&(i=r),u=n,r=t,t=e,s=we(r)),i===!1?o=!1:De(i)&&"chain"in i&&(o=
i.chain);var u=t,a=Ae(u);He(s,function(e){var n=t[e]=r[e];a&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Ir.apply(i,arguments);var s=n.apply(t,i);if(o||e){if(r===s&&De(s))return this;s=new u(s),s.__chain__=e}return s})})}function tr(){return t._=kr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var o=Jr();return zr(t+o*(e-t+parseFloat("1e-"+((o+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Ae(n)?t[e]():n}}function or(t,n,r){var i=e.templateSettings;t=xr(t||""),r=si({},r,i);var o,s=si({},r.imports,i.imports),u=ti(s),a=Ge(s),l=0,h=r.interpolate||T,f="__p += '",p=_r((r.escape||T).source+"|"+h.source+"|"+(h===D?j:T).source+"|"+(r.evaluate||T).source+"|$","g");t.replace(p,function(e,n,r,i,s,u){return r||(r=i),f+=t.slice(l,u).rep
lace(U,c),n&&(f+="' +\n__e("+n+") +\n'"),s&&(o=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var d=r.variable,v=d;v||(d="obj",f="with ("+d+") {\n"+f+"\n}\n"),f=(o?f.replace(E,""):f).replace(C,"$1").replace(k,"$1;"),f="function("+d+") {\n"+(v?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+W++ +"]")+"\n*/";try{var b=gr(u,"return "+f+g).apply(m,a)}catch(y){throw y.source=f,y}return n?b(n):(b.source=f,b)}function sr(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=dr(t);for(e=x(e,n,1);++r<t;)i[r]=e(r);return i}function ur(t){return null==t?"":xr(t).replace(ri,he)}function ar(t){var e=++y;return xr(null==t?"":t)+e}function cr(t){return t=new n(t),t.__chain__=!0,t}function lr(t,e){return e(t),t}function hr(){return this.__chain__=
!0,this}function fr(){return xr(this.__wrapped__)}function pr(){return this.__wrapped__}t=t?ne.defaults(Q.Object(),t,ne.pick(Q,I)):Q;var dr=t.Array,vr=t.Boolean,mr=t.Date,gr=t.Function,br=t.Math,yr=t.Number,wr=t.Object,_r=t.RegExp,xr=t.String,Sr=t.TypeError,Er=[],Cr=wr.prototype,kr=t._,jr=Cr.toString,Nr=_r("^"+xr(jr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Ar=br.ceil,Dr=t.clearTimeout,Rr=br.floor,Tr=gr.prototype.toString,Or=ce(Or=wr.getPrototypeOf)&&Or,Ur=Cr.hasOwnProperty,Ir=Er.push,Wr=t.setTimeout,Lr=Er.splice,Mr=Er.unshift,qr=function(){try{var t={},e=ce(e=wr.defineProperty)&&e,n=e(t,t,t)&&e}catch(r){}return n}(),Br=ce(Br=wr.create)&&Br,Fr=ce(Fr=dr.isArray)&&Fr,Vr=t.isFinite,Gr=t.isNaN,Zr=ce(Zr=wr.keys)&&Zr,Pr=br.max,zr=br.min,Xr=t.parseInt,Jr=br.random,Yr={};Yr[M]=dr,Yr[q]=vr,Yr[B]=mr,Yr[F]=gr,Yr[G]=wr,Yr[V]=yr,Yr[Z]=_r,Yr[P]=xr,n.prototype=e.prototype;var Hr=e.support={};Hr.funcDecomp=!ce(t.WinRTError)&&O.test(v),Hr.funcNames="s
tring"==typeof gr.name,e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:D,variable:"",imports:{_:e}},Br||(b=function(){function e(){}return function(n){if(De(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Qr=qr?function(t,e){J.value=e,qr(t,"__bindData__",J),J.value=null}:er,Kr=Fr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&jr.call(t)==M||!1},$r=function(t){var e,n=t,r=[];if(!n)return r;if(!Y[typeof t])return r;for(e in n)Ur.call(n,e)&&r.push(e);return r},ti=Zr?function(t){return De(t)?Zr(t):[]}:$r,ei={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ni=xe(ei),ri=_r("("+ti(ni).join("|")+")","g"),ii=_r("["+ti(ei).join("")+"]","g"),oi=function(t,e,n){var r,i=t,o=i;if(!i)return o;var s=arguments,u=0,a="number"==typeof n?2:s.length;if(a>3&&"function"==typeof s[a-2])var c=x(s[--a-1],s[a--],2);else a>2&&"function"==typeof s[a-1]&&(c=s[--a]);for(;++u<a;)if(i=s[u],i&&Y[typeof i])for
(var l=-1,h=Y[typeof i]&&ti(i),f=h?h.length:0;++l<f;)r=h[l],o[r]=c?c(o[r],i[r]):i[r];return o},si=function(t,e,n){var r,i=t,o=i;if(!i)return o;for(var s=arguments,u=0,a="number"==typeof n?2:s.length;++u<a;)if(i=s[u],i&&Y[typeof i])for(var c=-1,l=Y[typeof i]&&ti(i),h=l?l.length:0;++c<h;)r=l[c],"undefined"==typeof o[r]&&(o[r]=i[r]);return o},ui=function(t,e,n){var r,i=t,o=i;if(!i)return o;if(!Y[typeof i])return o;e=e&&"undefined"==typeof n?e:x(e,n,3);for(r in i)if(e(i[r],r,t)===!1)return o;return o},ai=function(t,e,n){var r,i=t,o=i;if(!i)return o;if(!Y[typeof i])return o;e=e&&"undefined"==typeof n?e:x(e,n,3);for(var s=-1,u=Y[typeof i]&&ti(i),a=u?u.length:0;++s<a;)if(r=u[s],e(i[r],r,t)===!1)return o;return o},ci=Or?function(t){if(!t||jr.call(t)!=G)return!1;var e=t.valueOf,n=ce(e)&&(n=Or(e))&&Or(n);return n?t==n||Or(t)==n:le(t)}:le,li=oe(function(t,e,n){Ur.call(t,n)?t[n]++:t[n]=1}),hi=oe(function(t,e,n){(Ur.call(t,n)?t[n]:t[n]=[]).push(e)}),fi=oe(function(t,e,n){t[n]=e}),pi=$e,d
i=Xe,vi=ce(vi=mr.now)&&vi||function(){return(new mr).getTime()},mi=8==Xr(S+"08")?Xr:function(t,e){return Xr(Ie(t)?t.replace(R,""):t,e||0)};return e.after=Un,e.assign=oi,e.at=Ze,e.bind=In,e.bindAll=Wn,e.bindKey=Ln,e.chain=cr,e.compact=fn,e.compose=Mn,e.constant=Yn,e.countBy=li,e.create=ve,e.createCallback=Hn,e.curry=qn,e.debounce=Bn,e.defaults=si,e.defer=Fn,e.delay=Vn,e.difference=pn,e.filter=Xe,e.flatten=gn,e.forEach=He,e.forEachRight=Qe,e.forIn=ui,e.forInRight=be,e.forOwn=ai,e.forOwnRight=ye,e.functions=we,e.groupBy=hi,e.indexBy=fi,e.initial=yn,e.intersection=wn,e.invert=xe,e.invoke=Ke,e.keys=ti,e.map=$e,e.mapValues=Le,e.max=tn,e.memoize=Gn,e.merge=Me,e.min=en,e.omit=qe,e.once=Zn,e.pairs=Be,e.partial=Pn,e.partialRight=zn,e.pick=Fe,e.pluck=pi,e.property=nr,e.pull=Sn,e.range=En,e.reject=on,e.remove=Cn,e.rest=kn,e.shuffle=un,e.sortBy=ln,e.tap=lr,e.throttle=Xn,e.times=sr,e.toArray=hn,e.transform=Ve,e.union=Nn,e.uniq=An,e.values=Ge,e.where=di,e.without=Dn,e.wrap=Jn,e.xor=Rn,e.zi
p=Tn,e.zipObject=On,e.collect=$e,e.drop=kn,e.each=He,e.eachRight=Qe,e.extend=oi,e.methods=we,e.object=On,e.select=Xe,e.tail=kn,e.unique=An,e.unzip=Tn,$n(e),e.clone=pe,e.cloneDeep=de,e.contains=Pe,e.escape=Qn,e.every=ze,e.find=Je,e.findIndex=dn,e.findKey=me,e.findLast=Ye,e.findLastIndex=vn,e.findLastKey=ge,e.has=_e,e.identity=Kn,e.indexOf=bn,e.isArguments=fe,e.isArray=Kr,e.isBoolean=Se,e.isDate=Ee,e.isElement=Ce,e.isEmpty=ke,e.isEqual=je,e.isFinite=Ne,e.isFunction=Ae,e.isNaN=Re,e.isNull=Te,e.isNumber=Oe,e.isObject=De,e.isPlainObject=ci,e.isRegExp=Ue,e.isString=Ie,e.isUndefined=We,e.lastIndexOf=xn,e.mixin=$n,e.noConflict=tr,e.noop=er,e.now=vi,e.parseInt=mi,e.random=rr,e.reduce=nn,e.reduceRight=rn,e.result=ir,e.runInContext=v,e.size=an,e.some=cn,e.sortedIndex=jn,e.template=or,e.unescape=ur,e.uniqueId=ar,e.all=ze,e.any=cn,e.detect=Je,e.findWhere=Je,e.foldl=nn,e.foldr=rn,e.include=Pe,e.inject=nn,$n(function(){var t={};return ai(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),
e.first=mn,e.last=_n,e.sample=sn,e.take=mn,e.head=mn,ai(e,function(t,r){var i="sample"!==r;e.prototype[r]||(e.prototype[r]=function(e,r){var o=this.__chain__,s=t(this.__wrapped__,e,r);return o||null!=e&&(!r||i&&"function"==typeof e)?new n(s,o):s})}),e.VERSION="2.4.2",e.prototype.chain=hr,e.prototype.toString=fr,e.prototype.value=pr,e.prototype.valueOf=pr,He(["join","pop","shift"],function(t){var r=Er[t];e.prototype[t]=function(){var t=this.__chain__,e=r.apply(this.__wrapped__,arguments);return t?new n(e,t):e}}),He(["push","reverse","sort","unshift"],function(t){var n=Er[t];e.prototype[t]=function(){return n.apply(this.__wrapped__,arguments),this}}),He(["concat","slice","splice"],function(t){var r=Er[t];e.prototype[t]=function(){return new n(r.apply(this.__wrapped__,arguments),this.__chain__)}}),e}var m,g=[],b=[],y=0,w=+new Date+"",_=75,x=40,S=" \f \n\r\u2028\u2029 ᠎              ",E=/\b__p \+= '';/g,C=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|
\b__t\)) \+\n'';/g,j=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,N=/\w*$/,A=/^\s*function[ \n\r\t]+\w/,D=/<%=([\s\S]+?)%>/g,R=RegExp("^["+S+"]*0+(?=.$)"),T=/($^)/,O=/\bthis\b/,U=/['\n\r\t\u2028\u2029\\]/g,I=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],W=0,L="[object Arguments]",M="[object Array]",q="[object Boolean]",B="[object Date]",F="[object Function]",V="[object Number]",G="[object Object]",Z="[object RegExp]",P="[object String]",z={};z[F]=!1,z[L]=z[M]=z[q]=z[B]=z[V]=z[G]=z[Z]=z[P]=!0;var X={leading:!1,maxWait:0,trailing:!1},J={configurable:!1,enumerable:!1,value:null,writable:!1},Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},H={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},Q=Y[typeof window]&&window||this,K=Y[typeof n]&&n&&!n.nodeType&&n,$=Y[typeof e]&&e&&!e.nodeType&&e,te=$&&$.exports===K&&K,ee=Y[typeof t]&&
t;!ee||ee.global!==ee&&ee.window!==ee||(Q=ee);var ne=v();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Q._=ne,define(function(){return ne})):K&&$?te?($.exports=ne)._=ne:K._=ne:Q._=ne}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/highland/lib/index.js":[function(t,e,n){(function(r,i){function o(t){return y(function(e){t.then(function(t){return e(null,t),e(null,S)},function(t){return e(t),e(null,S)})})}function s(t){return y(function(e,n){var r,i;try{r=t.next()}catch(o){i=o}i?(e(i),e(null,y.nil)):r.done?(y.isUndefined(r.value)||e(null,r.value),e(null,y.nil)):(e(null,r.value),n())})}function u(t,e,n){if(t&&y.isStream(t))return t;g.call(this);var r=this;if(r.__HighlandStream__=!0,r.id=(""+Math.random()).substr(2,6),this.paused=!0,this._incoming=[],this._outgoing=[],this._consumers=[],this._observers=[],this._destructor
s=[],this._send_events=!1,this._nil_seen=!1,this._delegate=null,this._is_observer=!1,this.source=null,this.writable=!0,r.on("newListener",function(t){"data"===t?(r._send_events=!0,y.setImmediate(r.resume.bind(r))):"end"===t&&(r._send_events=!0)}),r.on("removeListener",function(t){if("end"===t||"data"===t){var e=r.listeners("end").length,n=r.listeners("data").length;e+n===0&&(r._send_events=!1)}}),y.isUndefined(t))return this;if(y.isArray(t))r._incoming=t.concat([S]);else if(y.isFunction(t))this._generator=t,this._generator_push=function(t,e){if(r._nil_seen)throw new Error("Can not write to stream after nil");e===S&&(r._nil_seen=!0),r.write(t?new c(t):e)},this._generator_next=function(t){if(r._nil_seen)throw new Error("Can not call next after nil");if(t){var e=r.paused;e||r.pause(),r.write(new l(t)),e||r.resume()}else r._generator_running=!1;r.paused||r.resume()};else if(y.isObject(t)){if(!y.isFunction(t.on)||!y.isFunction(t.pipe)){if(y.isFunction(t.then))return o(t);if(y.isF
unction(t.next))return s(t);if(!y.isUndefined(x.Symbol)&&t[x.Symbol.iterator])return s(t[x.Symbol.iterator]());throw new Error("Object was not a stream, promise, iterator or iterable: "+typeof t)}t.on("error",function(t){r.write(new c(t))}),t.pipe(r)}else{if(!y.isString(t))throw new Error("Unexpected argument type to Stream(): "+typeof t);var i,u=typeof n;i="function"===u?n:"number"===u?function(){return w.call(arguments,0,n)}:y.isArray(n)?function(){var t=arguments;return n.reduce(function(e,n,r){return e[n]=t[r],e},{})}:function(t){return t},e.on(t,function(){var t=i.apply(this,arguments);r.write(t)})}}function a(t){var e=u.prototype[t],n=e.length;y[t]=y.ncurry(n+1,function(){var t=w.call(arguments),n=y(t.pop());return e.apply(n,t)})}function c(t){this.__HighlandStreamError__=!0,this.error=t}function l(t){this.__HighlandStreamRedirect__=!0,this.to=t}function h(t){this.push=t}function f(t){var e=[];for(var n in t)_.call(t,n)&&e.push(n);return e}function p(t){if("function"!=
typeof t||!t.prototype)return!1;var e=E?Object.getOwnPropertyNames:f,n=e(t.prototype);return n.length>0&&!(1===n.length&&"constructor"===n[0])}function d(t){for(var e={},n=t,r=function(t){e[t]=!0};Object.getPrototypeOf(n);){var i=Object.getOwnPropertyNames(n);i.forEach(r),n=Object.getPrototypeOf(n)}return f(e)}function v(t,e){for(var n=E?d:f,r=n(t),i=0,o=r.length;o>i;i++){var s,u=r[i];try{s=t[u]}catch(a){}if(s&&"function"==typeof s&&!p(s)&&!s.__HighlandStreamifiedFunction__){var c=y.wrapCallback(s);c.__HighlandStreamifiedFunction__=!0,t[u+e]=c}}return t}var m=t("util").inherits,g=t("events").EventEmitter,b=t("string_decoder").StringDecoder;n=e.exports=function(t,e,n){return new u(t,e,n)};var y=n,w=Array.prototype.slice,_=Object.prototype.hasOwnProperty;y.isUndefined=function(t){return"undefined"==typeof t},y.isFunction=function(t){return"function"==typeof t},y.isObject=function(t){return"object"==typeof t&&null!==t},y.isString=function(t){return"string"==typeof t},y.isArray=
Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},y.setImmediate="undefined"==typeof setImmediate?"undefined"!=typeof r&&r.nextTick?r.nextTick:function(t){setTimeout(t,0)}:"undefined"!=typeof r&&r.stdout?setImmediate:function(t){setImmediate(t)};var x=this;"undefined"!=typeof i?x=i:"undefined"!=typeof window&&(x=window),x.nil||(x.nil={});var S=y.nil=x.nil;y.curry=function(t){var e=w.call(arguments);return y.ncurry.apply(this,[t.length].concat(e))},y.ncurry=function(t,e){var n=w.call(arguments,2);return n.length>=t?e.apply(this,n.slice(0,t)):y.partial.apply(this,[y.ncurry,t,e].concat(n))},y.partial=function(t){var e=w.call(arguments,1);return function(){return t.apply(this,e.concat(w.call(arguments)))}},y.flip=y.curry(function(t,e,n){return t(n,e)}),y.compose=function(){var t=w.call(arguments).reverse();return y.seq.apply(null,t)},y.seq=function(){var t=w.call(arguments);return function(){if(!t.length)return null;for(var e=t[0].apply(this,
arguments),n=1;n<t.length;n++)e=t[n].call(this,e);return e}},m(u,g),y.isStream=function(t){return y.isObject(t)&&t.__HighlandStream__},y._isStreamError=function(t){return y.isObject(t)&&t.__HighlandStreamError__},y._isStreamRedirect=function(t){return y.isObject(t)&&t.__HighlandStreamRedirect__},u.prototype._send=function(t,e){var n;if(e===S&&(this.ended=!0),this._consumers.length){n=t?new c(t):e;for(var r=0,i=this._consumers.length;i>r;r++)this._consumers[r].write(n)}if(this._observers.length){n=t?new c(t):e;for(var o=0,s=this._observers.length;s>o;o++)this._observers[o].write(n)}this._send_events&&(t?this.emit("error",t):e===S?this.emit("end"):this.emit("data",e))},u.prototype.pause=function(){this.paused=!0,!this._is_observer&&this.source&&this.source._checkBackPressure()},u.prototype._checkBackPressure=function(){if(!this._consumers.length)return this.pause();for(var t=0,e=this._consumers.length;e>t;t++)if(this._consumers[t].paused)return this.pause();return this.resume(
)},u.prototype._readFromBuffer=function(){for(var t=this._incoming.length,e=0;t>e&&!this.paused;){var n=this._incoming[e];y._isStreamError(n)?this._send(n.error):y._isStreamRedirect(n)?this._redirect(n.to):this._send(null,n),e++}this._incoming.splice(0,e)},u.prototype._sendOutgoing=function(){for(var t=this._outgoing.length,e=0;t>e&&!this.paused;){var n=this._outgoing[e];y._isStreamError(n)?u.prototype._send.call(this,n.error):y._isStreamRedirect(n)?this._redirect(n.to):u.prototype._send.call(this,null,n),e++}this._outgoing.splice(0,e)},u.prototype.resume=function(){if(this._resume_running)return void(this._repeat_resume=!0);this._resume_running=!0;do this._repeat_resume=!1,this.paused=!1,this._sendOutgoing(),this._readFromBuffer(),this.paused||this._is_observer||(this.source?this.source._checkBackPressure():this._generator?this._runGenerator():this.emit("drain"));while(this._repeat_resume);this._resume_running=!1},u.prototype.end=function(){this.write(S)},u.prototype.pipe=f
unction(t){function e(){o.resume()}var n=this,i=t!==r.stdout&&t!==r.stderr,o=n.consume(function(e,r,o,s){return e?void n.emit("error",e):void(r===S?i&&t.end():t.write(r)!==!1&&s())});return t.on("drain",e),this._destructors.push(function(){t.removeListener("drain",e)}),o.resume(),t},u.prototype.destroy=function(){var t=this;if(this.end(),y(this._consumers).each(function(e){t._removeConsumer(e)
}),y(this._observers).each(function(e){t._removeObserver(e)}),this.source){var e=this.source;e._removeConsumer(this),e._removeObserver(this)}y(this._destructors).each(function(t){t()})},u.prototype._runGenerator=function(){this._generator_running||(this._generator_running=!0,this._generator(this._generator_push,this._generator_next))},u.prototype._redirect=function(t){for(t=y(t);t._delegate;)t=t._delegate;t._consumers=this._consumers.map(function(e){return e.source=t,e}),this._consumers=[],t._delegate_source=this._delegate_source||this,t._delegate_source._delegate=t,this.paused?t.pause():(this.pause(),t._checkBackPressure())},u.prototype._addConsumer=function(t){if(this._consumers.length)throw new Error("Stream already being consumed, you must either fork() or observe()");t.source=this,this._consumers.push(t),this._checkBackPressure()},u.prototype._removeConsumer=function(t){for(var e=this;e._delegate;)e=e._delegate;e._consumers=e._consumers.filter(function(e){return e!==t})
,t.source===e&&(t.source=null),e._checkBackPressure()},u.prototype._removeObserver=function(t){this._observers=this._observers.filter(function(e){return e!==t}),t.source===this&&(t.source=null)},u.prototype.consume=function(t){for(var e=this;e._delegate;)e=e._delegate;var n,r,i=new u,o=i._send,s=function(t,n){if(i._nil_seen)throw new Error("Can not write to stream after nil");n===S&&(i._nil_seen=!0,e._removeConsumer(i)),i.paused?i._outgoing.push(t?new c(t):n):o.call(i,t,n)},a=function(t){if(i._nil_seen)throw new Error("Can not call next after nil");if(t){var e=i.paused;e||i.pause(),i.write(new l(t)),e||i.resume()}else n?i.resume():r=!0};return i._send=function(e,o){n=!1,r=!1,t(e,o,s,a),n=!0,r||o===S||i.pause()},e._addConsumer(i),i},a("consume"),u.prototype.pull=function(t){var e=this.consume(function(n,r){e.source._removeConsumer(e),t(n,r)});e.id="pull:"+e.id,e.resume()},u.prototype.write=function(t){return this.paused?this._incoming.push(t):y._isStreamError(t)?this._send(t.
error):this._send(null,t),!this.paused},u.prototype.fork=function(){var t=new u;return t.id="fork:"+t.id,t.source=this,this._consumers.push(t),this._checkBackPressure(),t},u.prototype.observe=function(){var t=new u;return t.id="observe:"+t.id,t.source=this,t._is_observer=!0,this._observers.push(t),t},u.prototype.errors=function(t){return this.consume(function(e,n,r,i){e?(t(e,r),i()):n===S?r(null,S):(r(null,n),i())})},a("errors"),u.prototype.stopOnError=function(t){return this.consume(function(e,n,r,i){e?(t(e,r),r(null,S)):n===S?r(null,S):(r(null,n),i())})},a("stopOnError"),u.prototype.each=function(t){var e=this,n=this.consume(function(n,r,i,o){n?e.emit("error",n):r===S?i(null,S):(t(r),o())});return n.resume(),n},a("each"),u.prototype.apply=function(t){return this.toArray(function(e){t.apply(null,e)})},a("apply"),u.prototype.toArray=function(t){var e=this;return this.collect().pull(function(n,r){n?e.emit("error",n):t(r)})},u.prototype.done=function(t){if(this.ended)return t(
),null;var e=this;return this.consume(function(n,r,i,o){n?e.emit("error",n):r===S?t():o()}).resume()},u.prototype.map=function(t){if(!y.isFunction(t)){var e=t;t=function(){return e}}return this.consume(function(e,n,r,i){if(e)r(e),i();else if(n===S)r(e,n);else{var o,s;try{o=t(n)}catch(u){s=u}r(s,o),i()}})},a("map"),u.prototype.doto=function(t){return this.map(function(e){return t(e),e})},a("doto"),u.prototype.tap=u.prototype.doto,y.tap=y.doto,u.prototype.ratelimit=function(t,e){if(1>t)throw new Error("Invalid number of operations per ms: "+t);var n=0;return this.consume(function(r,i,o,s){r?(o(r),s()):i===S?o(null,S):t>n?(n++,o(null,i),s()):setTimeout(function(){n=1,o(null,i),s()},e)})},a("ratelimit"),u.prototype.flatMap=function(t){return this.map(t).sequence()},a("flatMap"),u.prototype.pluck=function(t){return this.consume(function(e,n,r,i){e?(r(e),i()):n===S?r(e,n):y.isObject(n)?(r(null,n[t]),i()):(r(new Error("Expected Object, got "+typeof n)),i())})},a("pluck"),u.prototyp
e.pickBy=function(t){return this.consume(function(e,n,r,i){var o={};if(e)r(e),i();else if(n===S)r(e,n);else if(y.isObject(n)){for(var s in n)t(s,n[s])&&(o[s]=n[s]);r(null,o),i()}else r(new Error("Expected Object, got "+typeof n)),i()})},a("pickBy"),u.prototype.pick=function(t){return this.pickBy(function(e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return!0;return!1})},a("pick"),u.prototype.filter=function(t){return this.consume(function(e,n,r,i){if(e)r(e),i();else if(n===S)r(e,n);else{var o,s;try{o=t(n)}catch(u){s=u}s?r(s):o&&r(null,n),i()}})},a("filter"),u.prototype.flatFilter=function(t){function e(){return y(function(t){t(new Error("Stream returned by function was empty.")),t(null,y.nil)})}return this.flatMap(function(n){return t(n).take(1).otherwise(e()).flatMap(function(t){return y(t?[n]:[])})})},a("flatFilter"),u.prototype.reject=function(t){return this.filter(y.compose(y.not,t))},a("reject"),u.prototype.find=function(t){return this.filter(t).take(1)},a("find"),u.pro
totype.findWhere=function(t){return this.where(t).take(1)},a("findWhere"),u.prototype.group=function(t){var e=y.isString(t)?y.get(t):t;return this.reduce({},function(t,n){var r=e(n);return _.call(t,r)||(t[r]=[]),t[r].push(n),t})},a("group"),u.prototype.compact=function(){return this.filter(function(t){return t})},a("compact"),u.prototype.where=function(t){return this.filter(function(e){for(var n in t)if(e[n]!==t[n])return!1;return!0})},a("where"),u.prototype.uniqBy=function(t){var e=[];return this.consume(function(n,r,i,o){if(n)i(n),o();else if(r===S)i(n,r);else{for(var s,u=!1,a=0,c=e.length;c>a;a++){try{u=t(r,e[a])}catch(l){s=l,u=!0}if(u)break}u||(e.push(r),i(null,r)),s&&i(s),o()}})},a("uniqBy"),u.prototype.uniq=function(){return this.uniqBy(function(t,e){return t===e})},a("uniq"),u.prototype.zipAll0=function(){function t(i,o,s,u,a){s.pull(function(c,l){c?(u(c),t(i,o,s,u,a)):l===y.nil?r||(r=!0,u(null,S)):(e++,n[i]=l,e===o&&(u(null,n),a()))})}var e=0,n=[],r=!1;return this.co
llect().flatMap(function(r){return y(r.length?function(i,o){e=0,n=[];for(var s=0,u=r.length;u>s;s++)t(s,u,r[s],i,o)}:[])})},a("zipAll0"),u.prototype.zipAll=function(t){return y([this]).concat(y(t).map(y)).zipAll0()},a("zipAll"),u.prototype.zip=function(t){return y([this,y(t)]).zipAll0()},a("zip"),u.prototype.batch=function(t){return this.batchWithTimeOrCount(-1,t)},a("batch"),u.prototype.batchWithTimeOrCount=function(t,e){var n,r=[];return this.consume(function(i,o,s,u){i?(s(i),u()):o===S?(r.length>0&&(s(null,r),clearTimeout(n)),s(null,S)):(r.push(o),r.length===e?(s(null,r),r=[],clearTimeout(n)):1===r.length&&t>=0&&(n=setTimeout(function(){s(null,r),r=[]},t)),u())})},a("batchWithTimeOrCount"),u.prototype.intersperse=function(t){var e=!1;return this.consume(function(n,r,i,o){n?(i(n),o()):r===S?i(null,S):(e?i(null,t):e=!0,i(null,r),o())})},a("intersperse"),u.prototype.splitBy=function(t){function e(e,i){r=(r||"")+n.write(e);var o=r.split(t);r=o.pop(),o.forEach(function(t){i(nu
ll,t)})}var n=new b,r=!1;return this.consume(function(t,i,o,s){t?(o(t),s()):i===S?(y.isString(r)&&(e(n.end(),o),o(null,r)),o(null,S)):(e(i,o),s())})},a("splitBy"),u.prototype.split=function(){return this.splitBy(/\r?\n/)},a("split"),u.prototype.slice=function(t,e){var n=0;if(t="number"!=typeof t||0>t?0:t,e="number"!=typeof e?1/0:e,0===t&&1/0===e)return this;if(t>=e)return y([]);var r=this.consume(function(r,i,o,s){var u=i===S;r?o(r):!u&&n++>=t&&o(null,i),!u&&e>n?s():o(null,S)});return r.id="slice:"+r.id,r},a("slice"),u.prototype.take=function(t){var e=this.slice(0,t);return e.id="take:"+e.id,e},a("take"),u.prototype.drop=function(t){return this.slice(t,1/0)},a("drop"),u.prototype.head=function(){return this.take(1)},a("head"),u.prototype.last=function(){var t={},e=t;return this.consume(function(n,r,i,o){n?(i(n),o()):r===S?(e!==t&&i(null,e),i(null,S)):(e=r,o())})},a("last"),u.prototype.sortBy=function(t){return this.collect().invoke("sort",[t]).sequence()},a("sortBy"),u.proto
type.sort=function(){return this.sortBy()},a("sort"),u.prototype.through=function(t){function e(t){n.write(new c(t))}var n;return y.isFunction(t)?t(this):(t.pause(),n=y(),this.on("error",e),t.on("error",e),this.pipe(t).pipe(n))},a("through"),y.pipeline=function(){if(!arguments.length)return y();var t,e=arguments[0];y.isStream(e)||y.isFunction(e.resume)?(e=y(e),t=w.call(arguments,1)):(e=y(),t=w.call(arguments));var n=t.reduce(function(t,e){return t.through(e)},e),r=y(function(t,e){n.pull(function(t,n){t?(r._send(t),e()):n===S?r._send(null,S):(r._send(null,n),e())})});return r.write=function(t){e.write(t)},r},u.prototype.sequence=function(){function t(){return n===e}var e=this,n=this;return y(function(r,i){n.pull(function(o,s){return o?(r(o),i()):y.isArray(s)?(t()?s.forEach(function(t){r(null,t)}):r(null,s),i()):y.isStream(s)?t()?(n=s,i()):(r(null,s),i()):s!==S?t()?(r(new Error("Expected Stream, got "+typeof s)),i()):(r(null,s),i()):t()?void r(null,S):(n=e,i())})})},a("sequenc
e"),u.prototype.series=u.prototype.sequence,y.series=y.sequence,u.prototype.flatten=function(){var t=this,e=[];return y(function(n,r){t.pull(function(i,o){return i?(n(i),r()):(y.isArray(o)&&(o=y(o)),void(y.isStream(o)?(e.push(t),t=o,r()):o===S?e.length?(t=e.pop(),r()):n(null,S):(n(null,o),r())))})})},a("flatten"),u.prototype.parallel=function(t){var e=this,n=[],r=!1,i=!1;return y(function(o,s){if(n.length&&n[0].buffer.length)for(var u=n[0].buffer,a=0;a<u.length;a++){if(u[a][1]===S)return n.shift(),s();o.apply(null,u[a])}else n.length<t&&!r&&!i?(i=!0,e.pull(function(t,e){if(i=!1,t)o(t);else if(e===S)r=!0;else{var u={stream:e,buffer:[]};n.push(u),e.consume(function(t,e,r,i){n[0]===u?e===S?(n.shift(),s()):o(t,e):u.buffer.push([t,e]),e!==S&&i()}).resume()}return s()})):!n.length&&r&&o(null,S)})},a("parallel"),u.prototype.otherwise=function(t){var e=this;return e.consume(function(n,r,i,o){n?(i(n),o()):r===S?o(y.isFunction(t)?t():t):(i(null,r),o(e))})},a("otherwise"),u.prototype.a
ppend=function(t){return this.consume(function(e,n,r,i){n===S?(r(null,t),r(null,y.nil)):(r(e,n),i())})},a("append"),u.prototype.reduce=function(t,e){return this.consume(function(n,r,i,o){if(r===S)i(null,t),i(null,y.nil);else if(n)i(n),o();else{try{t=e(t,r)}catch(s){return i(s),void i(null,y.nil)}o()}})},a("reduce"),u.prototype.reduce1=function(t){var e=this;return y(function(n,r){e.pull(function(i,o){i?(n(i),r()):o===S?n(null,S):r(e.reduce(o,t))})})},a("reduce1"),u.prototype.collect=function(){var t=[];return this.consume(function(e,n,r,i){e?(r(e),i()):n===S?(r(null,t),r(null,S)):(t.push(n),i())})},a("collect"),u.prototype.scan=function(t,e){var n=this;return y([t]).concat(n.consume(function(n,r,i,o){if(r===S)i(null,y.nil);else if(n)i(n),o();else{try{t=e(t,r)}catch(s){return i(s),void i(null,y.nil)}i(null,t),o()}}))},a("scan"),u.prototype.scan1=function(t){var e=this;return y(function(n,r){e.pull(function(i,o){i?(n(i),r()):o===S?n(null,S):r(e.scan(o,t))})})},a("scan1"),h.pro
totype["@@transducer/init"]=function(){return this.push},h.prototype["@@transducer/result"]=function(t){return t},h.prototype["@@transducer/step"]=function(t,e){return t(null,e),t},u.prototype.transduce=function(t){function e(t,e){try{r["@@transducer/result"](e)}catch(n){t(n)}t(null,y.nil)}function n(t,e,n){try{return r["@@transducer/step"](e,n)}catch(i){return t(i),t(null,y.nil),null}}var r=null,i=null;return this.consume(function(o,s,u,a){if(null==r&&(r=t(new h(u)),i=r["@@transducer/init"]()),o)u(o),a();else if(s===y.nil)e(u,i);else{var c=n(u,i,s);if(!c)return;i=c,i["@@transducer/reduced"]?e(i["@@transducer/value"]):a()}})},a("transduce"),u.prototype.concat=function(t){return t=y(t),this.consume(function(e,n,r,i){n===S?i(t):(r(e,n),i())})},a("concat"),u.prototype.merge=function(){function t(t,e,n){return function(s,a){s?(t(s),o.push(n)):a===S?i=i.filter(function(t){return t!==n}):n===r?(i.push(a),o.push(a),o.unshift(r)):(t(null,a),o.push(n)),u&&(u=!1,e())}}function e(e,n){
var r=o;o=[],r.forEach(function(r){r.pull(t(e,n,r))})}function n(e,n){for(var s,u=!1,a=function(a,c){s=!1,u?t(e,n,r)(a,c):a?e(a):c===S?u=!0:(i.push(c),o.push(c))};!u;)s=!0,r.pull(a),s&&(u=!0,i.unshift(r))}var r=this,i=[],o=[],s=!0,u=!1;return y(function(t,r){s&&(s=!1,n(t,r)),0===i.length?t(null,S):o.length?(e(t,r),r()):u=!0})},a("merge"),u.prototype.invoke=function(t,e){return this.map(function(n){return n[t].apply(n,e)})},a("invoke"),u.prototype.nfcall=function(t){return this.map(function(e){return y.wrapCallback(e).apply(e,t)})},a("nfcall"),u.prototype.throttle=function(t){var e=0-t;return this.consume(function(n,r,i,o){var s=(new Date).getTime();n?(i(n),o()):r===S?i(null,S):s-t>=e?(e=s,i(null,r),o()):o()})},a("throttle"),u.prototype.debounce=function(t){var e=null,n={},r=n;return this.consume(function(i,o,s,u){i?(s(i),u()):o===S?(e&&clearTimeout(e),r!==n&&s(null,r),s(null,S)):(r=o,e&&clearTimeout(e),e=setTimeout(s.bind(this,null,o),t),u())})},a("debounce"),u.prototype.lat
est=function(){var t={},e=t,n=[],r=!1,i=null;return this.consume(function(t,o,s,u){if(null!=i){var a=i;i=null,a(t,o)}t?(n.push(t),u()):o===S?r=!0:(e=o,u())}).resume(),y(function(o,s){var u=n;n=[],u.length||e!==t||r?(u.forEach(o),e!==t&&o(null,e),r?o(null,S):s()):i=function(t,e){o(t,e),e!==S&&s()}})},a("latest"),y.values=function(t){return y.keys(t).map(function(e){return t[e]})},y.keys=function(t){return y(f(t))},y.pairs=function(t){return y.keys(t).map(function(e){return[e,t[e]]})},y.extend=y.curry(function(t,e){for(var n in t)_.call(t,n)&&(e[n]=t[n]);return e}),y.get=y.curry(function(t,e){return e[t]}),y.set=y.curry(function(t,e,n){return n[t]=e,n}),y.log=function(){console.log.apply(console,arguments)},y.wrapCallback=function(t){return function(){var e=this,n=w.call(arguments);return y(function(r){var i=function(t,e){t?r(t):r(null,e),r(null,S)};t.apply(e,n.concat([i]))})}};var E=function(){"use strict";return Function.prototype.bind&&!this}();y.streamifyAll=function(t){if
("function"!=typeof t&&"object"!=typeof t)throw new TypeError("takes an object or a constructor function");var e="Stream",n=v(t,e);return p(t)&&(n.prototype=v(t.prototype,e)),n},y.add=y.curry(function(t,e){return t+e}),y.not=function(t){return!t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js",events:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js",string_decoder:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/string_decoder/index.js",util:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/util/util.js"}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/util/util.js":[function(t,e,n){(function(e,r){function i(t,e){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(e)?r.showHidden=e:e&&n._extend(r,e),_(r.showHidden)&&(r.showHidden
=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),a(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?" ["+i.colors[n][0]+"m"+t+" ["+i.colors[n][1]+"m":t}function s(t){return t}function u(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,r){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return y(i)||(i=a(t,i,r)),i}var o=c(t,e);if(o)return o;var s=Object.keys(e),v=u(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),C(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(e);if(0===s.length){if(k(e)){var m=e.name?": "+e.name:"";return t.stylize("[Function"+m+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(E(e))return t.stylize(Date.prototype.toString.call(e),"date");if(C(e))return l(e)}var g="",b=!1,w=["{","}"];if(d(e)&&(b=!0,w=["[","]"]),k(e)){var
_=e.name?": "+e.name:"";g=" [Function"+_+"]"}if(x(e)&&(g=" "+RegExp.prototype.toString.call(e)),E(e)&&(g=" "+Date.prototype.toUTCString.call(e)),C(e)&&(g=" "+l(e)),0===s.length&&(!b||0==e.length))return w[0]+g+w[1];if(0>r)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var S;return S=b?h(t,e,r,v,s):s.map(function(n){return f(t,e,r,v,n,b)}),t.seen.pop(),p(S,g,w)}function c(t,e){if(_(e))return t.stylize("undefined","undefined");if(y(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return b(e)?t.stylize(""+e,"number"):v(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i){for(var o=[],s=0,u=e.length;u>s;++s)o.push(R(e,String(s))?f(t,e,n,r,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,n,r,i,!0))}),o}function f(t,e
,n,r,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),R(r,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=m(n)?a(t,c.value,null):a(t,c.value,n-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function p(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}functi
on d(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return null==t}function b(t){return"number"==typeof t}function y(t){return"string"==typeof t}function w(t){return"symbol"==typeof t}function _(t){return void 0===t}function x(t){return S(t)&&"[object RegExp]"===N(t)}function S(t){return"object"==typeof t&&null!==t}function E(t){return S(t)&&"[object Date]"===N(t)}function C(t){return S(t)&&("[object Error]"===N(t)||t instanceof Error)}function k(t){return"function"==typeof t}function j(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function N(t){return Object.prototype.toString.call(t)}function A(t){return 10>t?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnPropert
y.call(t,e)}var T=/%[sdj%]/g;n.format=function(t){if(!y(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(t).replace(T,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),u=r[n];o>n;u=r[++n])s+=m(u)||!S(u)?" "+u:" "+i(u);return s},n.deprecate=function(t,i){function o(){if(!s){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),s=!0}return t.apply(this,arguments)}if(_(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(e.noDeprecation===!0)return t;var s=!1;return o};var O,U={};n.debuglog=function(t){if(_(O)&&(O=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!U[t])if(new RegExp("\\b"+t+"\\b","i").test(O)){var r=e.pid;U[t]=function(){var e=n.format.apply(n,arguments);console.er
ror("%s %d: %s",t,r,e)}}else U[t]=function(){};return U[t]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=v,n.isNull=m,n.isNullOrUndefined=g,n.isNumber=b,n.isString=y,n.isSymbol=w,n.isUndefined=_,n.isRegExp=x,n.isObject=S,n.isDate=E,n.isError=C,n.isFunction=k,n.isPrimitive=j,n.isBuffer=t("./support/isBuffer");var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",D(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!S(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefine
d"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":"/Users/andersriutta/Sites/pvjs-lkg/node_modules/util/support/isBufferBrowser.js",_process:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js",inherits:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/inherits/inherits_browser.js"}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/util/support/isBufferBrowser.js":[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/inherits/inherits_browser.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/inherits/inherits_browser.js"][0].apply(n,arguments)},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/string_decoder/index.js":[function(t,e,n){arguments[4]["/Users/andersriutta/Sites/bridgedbjs-lkg/node_modules/string_decoder/index.js"][0].apply(n
,arguments)},{buffer:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js"}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/index.js":[function(t,e,n){(function(e){"use strict";function r(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?s(this,t):"string"==typeof t?u(this,t,arguments.length>1?arguments[1]:"utf8"):a(this,t)):arguments.length>1?new o(t,arguments[1]):new o(t)}function s(t,e){if(t=v(t,0>e?0:0|m(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function u(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|b(e,n);return t=v(t,r),t.write(e,n),t}function a(t,e){if(o.isBuffer(e))return c(t,e);i
f(H(e))return l(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return h(t,e);if(e instanceof ArrayBuffer)return f(t,e)}return e.length?p(t,e):d(t,e)}function c(t,e){var n=0|m(e.length);return t=v(t,n),e.copy(t,0,0,n),t}function l(t,e){var n=0|m(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n=0|m(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function f(t,e){return o.TYPED_ARRAY_SUPPORT?(e.byteLength,t=o._augment(new Uint8Array(e))):t=h(t,new Uint8Array(e)),t}function p(t,e){var n=0|m(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e){var n,r=0;"Buffer"===e.type&&H(e.data)&&(n=e.data,r=0|m(n.length)),t=v(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function v(t,e){o.TYPED_ARRAY_SUPPORT?(t=o._augment(new Uint8Array(e)),t.__proto__=o.prototype):(t.length=e,t._isBuffer=!0);var n=0!==e&&
e<=o.poolSize>>>1;return n&&(t.parent=Q),t}function m(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function g(t,e){if(!(this instanceof g))return new g(t,e);var n=new o(t,e);return delete n.parent,n}function b(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return G(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if(e=0|e,n=void 0===n||1/0===n?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return A(this,e,n);case"binary":return D(this,e,n);case"base64":return k(this,e,n)
;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;r>s;s++){var u=parseInt(e.substr(2*s,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[n+s]=u}return s}function _(t,e,n,r){return X(G(e,t.length-n),t,n,r)}function x(t,e,n,r){return X(Z(e),t,n,r)}function S(t,e,n,r){return x(t,e,n,r)}function E(t,e,n,r){return X(z(e),t,n,r)}function C(t,e,n,r){return X(P(e,t.length-n),t,n,r)}function k(t,e,n){return J.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(n>=i+u){var a,c,l,h;switch(u){case 1:128>o&&(s=o);break;case 2:a=t[i+1],128===(192&a)&&(h=(31&o)<<6|63&a,h>127&&(s=h));break;case 3
:a=t[i+1],c=t[i+2],128===(192&a)&&128===(192&c)&&(h=(15&o)<<12|(63&a)<<6|63&c,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:a=t[i+1],c=t[i+2],l=t[i+3],128===(192&a)&&128===(192&c)&&128===(192&l)&&(h=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&l,h>65535&&1114112>h&&(s=h))}}null===s?(s=65533,u=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=u}return N(r)}function N(t){var e=t.length;if(K>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=K));return n}function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function D(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function R(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=e;n>o;o++)i+=V(t[o]);return i}function T(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);retur
n i}function O(t,e,n){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,n,r,i,s){if(!o.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||s>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range")}function I(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);o>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function W(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);o>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function L(t,e,n,r,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function M(t,e,n,r,i){return i||L(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,i){return i||L(t,e,n,8,1.7976931348623157e308,-1.79769
31348623157e308),Y.write(t,e,n,r,52,8),n+8}function B(t){if(t=F(t).replace(te,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return 16>t?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;r>s;s++){if(n=t.charCodeAt(s),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Z(t){for(var e=[],n=0;n<t.length;n++)e.p
ush(255&t.charCodeAt(n));return e}function P(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function z(t){return J.toByteArray(B(t))}function X(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var J=t("base64-js"),Y=t("ieee754"),H=t("isarray");n.Buffer=o,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var Q={};o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,s=Math.min(n,r);s>i&&t[i]===e[i];)++i;return i!==s&&(n=t[i],r=e[i]),r>n?-1:n>r?1:0},o.isEncoding=function(t){switch(String(t).toLow
erCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!H(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new o(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var r=new o(e),i=0;for(n=0;n<t.length;n++){var s=t[n];s.copy(r,i),i+=s.length}return r},o.byteLength=b,o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?j(this,0,t):y.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t){if(!o.isBuffer(t))throw new TypeError("Ar
gument must be a Buffer");return this===t?0:o.compare(this,t)},o.prototype.indexOf=function(t,e){function n(t,e,n){for(var r=-1,i=0;n+i<t.length;i++)if(t[n+i]===e[-1===r?0:i-r]){if(-1===r&&(r=i),i-r+1===e.length)return n+r}else r=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(o.isBuffer(t))return n(this,t,e);if("number"==typeof t)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o
.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");
-r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return x(this,t,e,n);case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(t,e));else{var i=e-t;r=new o(i,void 0);for(var s=0;i>s;s++)r[s]=this[s+t]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=fu
nction(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readI
nt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),Y.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),Y.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),Y.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),Y.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||U(th
is,t,e,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||U(this,t,e,n,Math.pow(2,8*n),0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):W(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+
t,e=0|e,n||U(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);U(this,t,e,n,i-1,-i)}var o=0,s=1,u=0>t?1:0;for(this[e]=255&t;++o<n&&(s*=256);)this[e+o]=(t/s>>0)-u&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);U(this,t,e,n,i-1,-i)}var o=n-1,s=1,u=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=(t/s>>0)-u&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=
t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):W(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0
>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,s=r-n;if(this===t&&e>n&&r>e)for(i=s-1;i>=0;i--)t[i+e]=this[i+n];else if(1e3>s||!o.TYPED_ARRAY_SUPPORT)for(i=0;s>i;i++)t[i+e]=this[i+n];else t._set(this.subarray(n,n+s),e);return s},o.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=G(t.toString()),o=i.length;for(r=e;n>r;r++)this[r]=i[r%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t
.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=o.prototype;o._augment=function(t){return t.constructor=o,t._isBuffer=!0,t._set=t.set,t.get=$.get,t.set=$.set,t.write=$.write,t.toString=$.toString,t.toLocaleString=$.toString,t.toJSON=$.toJSON,t.equals=$.equals,t.compare=$.compare,t.indexOf=$.indexOf,t.copy=$.copy,t.slice=$.slice,t.readUIntLE=$.readUIntLE,t.readUIntBE=$.readUIntBE,t.readUInt8=$.readUInt8,t.readUInt16LE=$.readUInt16LE,t.readUInt16BE=$.readUInt16BE,t.readUInt32LE=$.readUInt32LE,t.readUInt32BE=$.readUInt32BE,t.readIntLE=$.readIntLE,t.readIntBE=$.readIntBE,t.readInt8=$.readInt8,t.readInt16LE=$.readInt16LE,t.readInt16BE=$.readInt16BE,t.readInt32LE=$.readInt32LE,t.readInt32BE=$.readInt32BE,t.readFloatLE=$.readFloatLE,t.readFloatBE=$.readFloatBE,t.readDoubleLE=$.readDoubleLE,t.readDoubleBE=$.readDoubleBE,t.writeUInt8=$.writeUInt8,t.writeUIntLE=$.writeUIntLE,t.writeUIntBE=$.writeUIntBE,t.writeUInt16LE=$.writeUInt16LE,t.writeUIn
t16BE=$.writeUInt16BE,t.writeUInt32LE=$.writeUInt32LE,t.writeUInt32BE=$.writeUInt32BE,t.writeIntLE=$.writeIntLE,t.writeIntBE=$.writeIntBE,t.writeInt8=$.writeInt8,t.writeInt16LE=$.writeInt16LE,t.writeInt16BE=$.writeInt16BE,t.writeInt32LE=$.writeInt32LE,t.writeInt32BE=$.writeInt32BE,t.writeFloatLE=$.writeFloatLE,t.writeFloatBE=$.writeFloatBE,t.writeDoubleLE=$.writeDoubleLE,t.writeDoubleBE=$.writeDoubleBE,t.fill=$.fill,t.inspect=$.inspect,t.toArrayBuffer=$.toArrayBuffer,t};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":"/Users/andersriutta/Sites/pvjs-lkg/node_modules/base64-js/lib/b64.js",ieee754:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/ieee754/index.js",isarray:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/node_modules/isarray/index.js"}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/ieee754/index.js":[function(t,e,n){n.read=function(t,e,n,r,i){var
o,s,u=8*i-r-1,a=(1<<u)-1,c=a>>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===a)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var s,u,a,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(u=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),e+=s+h>=1?f/a:f*Math.pow(2,1-h),e*a>=2&&(s++,a/=2),s+h>=l?(u=0,s=l):s+h>=1?(u=(e*a-1)*Math.pow(2,i),s+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*v}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/node_modules/isarray/index.js":[function(t,e){var n={}.toString;e.exports=Array.isArray||fun
ction(t){return"[object Array]"==n.call(t)}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/base64-js/lib/b64.js":[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===u||e===f?63:a>e?-1:a+10>e?e-a+26+26:l+26>e?e-l:c+26>e?e-c+26:void 0}function n(t){function n(t){c[h++]=t}var r,i,s,u,a,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;a="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,c=new o(3*t.length/4-a),s=a>0?t.length-4:t.length;var h=0;for(r=0,i=0;s>r;r+=4,i+=3)u=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&u)>>16),n((65280&u)>>8),n(255&u);return 2===a?(u=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&u)):1===a&&(u=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(u>>8&255),n(255&u)),c}function i(t){function e(t){return r.charAt(t)}function n(t
){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,u=t.length%3,a="";for(i=0,s=t.length-u;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],a+=n(o);switch(u){case 1:o=t[t.length-1],a+=e(o>>2),a+=e(o<<4&63),a+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],a+=e(o>>10),a+=e(o>>4&63),a+=e(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),c="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js":[function(t,e){function n(){c=!1,s.length?a=s.concat(a):l=-1,a.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=a.length;e;){for(s=a,a=[];++l<e;)s&&s[l].run();l=-1,e=a.length}s=null,c=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,u=e.exports={},a=[],c=!1,l=-1;u.nextTick=f
unction(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new i(t,e)),1!==a.length||c||setTimeout(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=o,u.addListener=o,u.once=o,u.off=o,u.removeListener=o,u.removeAllListeners=o,u.emit=o,u.binding=function(){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js":[function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._even
ts=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,u,a,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,u=new Array(i-1),a=1;i>a;a++)u[a-1]=arguments[a];n.apply(this,u)}else if(o(n)){for(i=arguments.length,u=new Array(i-1),a=1;i>a;a++)u[a-1]=arguments[a];for(c=n.slice(),i=c.length,a=0;i>a;a++)c[a].apply(this,u)}return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("lis
tener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,s,u;if(!r(e))throw TypeError(
"listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(u=s;u-->0;)if(n[u]===e||n[u].listener&&n[u].listener===e){i=u;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},
n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?r(t._events[e])?1:t._events[e].length:0}},{}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/http-errors.js":[function(t,e){var n=t("./config.js"),r=function(t){var e=t.error,r=t.response,i=(t.body,t.stream,t.source);if(r&&r.statusCode){var o=r.statusCode,s=o.toString()[0];("4"===s||"5"===s)&&(e=e||new Error("HTTP status code "+o))}e&&(console.error("Error getting "+i),console.error(e),setTimeout(function(){},n.http.retryDelay))};e.exports=r},{"./config.js":"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/config.js"}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/context.json":[function(t,e){e.exports=["https://wikipathwayscontexts.firebaseio.com/bridgedb/.json"]},{}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/config.js":[function(t,e){var n={baseIri:"http://pointer.
ucsf.edu/d3/r/data-sources/bridgedb.php/",datasetsMetadataIri:"https://cdn.rawgit.com/bridgedb/BridgeDb/24186142d05b5f811893970b9a5d61a06f241f68/org.bridgedb.bio/resources/org/bridgedb/bio/datasources.txt",http:{retryLimit:2,retryDelay:3e3}};e.exports=n},{}]},{},[])});
-//# sourceMappingURL=pvjs.core.min.js.map
\ No newline at end of file
+r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return x(this,t,e,n);case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(t,e));else{var i=e-t;r=new o(i,void 0);for(var s=0;i>s;s++)r[s]=this[s+t]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=fu
nction(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readI
nt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),Y.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),Y.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),Y.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),Y.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||U(th
is,t,e,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||U(this,t,e,n,Math.pow(2,8*n),0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):W(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+
t,e=0|e,n||U(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);U(this,t,e,n,i-1,-i)}var o=0,s=1,u=0>t?1:0;for(this[e]=255&t;++o<n&&(s*=256);)this[e+o]=(t/s>>0)-u&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);U(this,t,e,n,i-1,-i)}var o=n-1,s=1,u=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=(t/s>>0)-u&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=
t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):W(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||U(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0
>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,s=r-n;if(this===t&&e>n&&r>e)for(i=s-1;i>=0;i--)t[i+e]=this[i+n];else if(1e3>s||!o.TYPED_ARRAY_SUPPORT)for(i=0;s>i;i++)t[i+e]=this[i+n];else t._set(this.subarray(n,n+s),e);return s},o.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=G(t.toString()),o=i.length;for(r=e;n>r;r++)this[r]=i[r%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t
.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=o.prototype;o._augment=function(t){return t.constructor=o,t._isBuffer=!0,t._set=t.set,t.get=$.get,t.set=$.set,t.write=$.write,t.toString=$.toString,t.toLocaleString=$.toString,t.toJSON=$.toJSON,t.equals=$.equals,t.compare=$.compare,t.indexOf=$.indexOf,t.copy=$.copy,t.slice=$.slice,t.readUIntLE=$.readUIntLE,t.readUIntBE=$.readUIntBE,t.readUInt8=$.readUInt8,t.readUInt16LE=$.readUInt16LE,t.readUInt16BE=$.readUInt16BE,t.readUInt32LE=$.readUInt32LE,t.readUInt32BE=$.readUInt32BE,t.readIntLE=$.readIntLE,t.readIntBE=$.readIntBE,t.readInt8=$.readInt8,t.readInt16LE=$.readInt16LE,t.readInt16BE=$.readInt16BE,t.readInt32LE=$.readInt32LE,t.readInt32BE=$.readInt32BE,t.readFloatLE=$.readFloatLE,t.readFloatBE=$.readFloatBE,t.readDoubleLE=$.readDoubleLE,t.readDoubleBE=$.readDoubleBE,t.writeUInt8=$.writeUInt8,t.writeUIntLE=$.writeUIntLE,t.writeUIntBE=$.writeUIntBE,t.writeUInt16LE=$.writeUInt16LE,t.writeUIn
t16BE=$.writeUInt16BE,t.writeUInt32LE=$.writeUInt32LE,t.writeUInt32BE=$.writeUInt32BE,t.writeIntLE=$.writeIntLE,t.writeIntBE=$.writeIntBE,t.writeInt8=$.writeInt8,t.writeInt16LE=$.writeInt16LE,t.writeInt16BE=$.writeInt16BE,t.writeInt32LE=$.writeInt32LE,t.writeInt32BE=$.writeInt32BE,t.writeFloatLE=$.writeFloatLE,t.writeFloatBE=$.writeFloatBE,t.writeDoubleLE=$.writeDoubleLE,t.writeDoubleBE=$.writeDoubleBE,t.fill=$.fill,t.inspect=$.inspect,t.toArrayBuffer=$.toArrayBuffer,t};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":"/Users/andersriutta/Sites/pvjs-lkg/node_modules/base64-js/lib/b64.js",ieee754:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/ieee754/index.js",isarray:"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/node_modules/isarray/index.js"}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/ieee754/index.js":[function(t,e,n){n.read=function(t,e,n,r,i){var
o,s,u=8*i-r-1,a=(1<<u)-1,c=a>>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===a)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var s,u,a,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(u=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),e+=s+h>=1?f/a:f*Math.pow(2,1-h),e*a>=2&&(s++,a/=2),s+h>=l?(u=0,s=l):s+h>=1?(u=(e*a-1)*Math.pow(2,i),s+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*v}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/buffer/node_modules/isarray/index.js":[function(t,e){var n={}.toString;e.exports=Array.isArray||fun
ction(t){return"[object Array]"==n.call(t)}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/base64-js/lib/b64.js":[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===h?62:e===u||e===f?63:a>e?-1:a+10>e?e-a+26+26:l+26>e?e-l:c+26>e?e-c+26:void 0}function n(t){function n(t){c[h++]=t}var r,i,s,u,a,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;a="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,c=new o(3*t.length/4-a),s=a>0?t.length-4:t.length;var h=0;for(r=0,i=0;s>r;r+=4,i+=3)u=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&u)>>16),n((65280&u)>>8),n(255&u);return 2===a?(u=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&u)):1===a&&(u=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(u>>8&255),n(255&u)),c}function i(t){function e(t){return r.charAt(t)}function n(t
){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,u=t.length%3,a="";for(i=0,s=t.length-u;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],a+=n(o);switch(u){case 1:o=t[t.length-1],a+=e(o>>2),a+=e(o<<4&63),a+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],a+=e(o>>10),a+=e(o>>4&63),a+=e(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),u="/".charCodeAt(0),a="0".charCodeAt(0),c="a".charCodeAt(0),l="A".charCodeAt(0),h="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/process/browser.js":[function(t,e){function n(){c=!1,s.length?a=s.concat(a):l=-1,a.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=a.length;e;){for(s=a,a=[];++l<e;)s&&s[l].run();l=-1,e=a.length}s=null,c=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,u=e.exports={},a=[],c=!1,l=-1;u.nextTick=f
unction(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new i(t,e)),1!==a.length||c||setTimeout(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=o,u.addListener=o,u.once=o,u.off=o,u.removeListener=o,u.removeAllListeners=o,u.emit=o,u.binding=function(){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],"/Users/andersriutta/Sites/pvjs-lkg/node_modules/events/events.js":[function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._even
ts=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,u,a,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,u=new Array(i-1),a=1;i>a;a++)u[a-1]=arguments[a];n.apply(this,u)}else if(o(n)){for(i=arguments.length,u=new Array(i-1),a=1;i>a;a++)u[a-1]=arguments[a];for(c=n.slice(),i=c.length,a=0;i>a;a++)c[a].apply(this,u)}return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("lis
tener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,s,u;if(!r(e))throw TypeError(
"listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(u=s;u-->0;)if(n[u]===e||n[u].listener&&n[u].listener===e){i=u;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},
n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?r(t._events[e])?1:t._events[e].length:0}},{}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/http-errors.js":[function(t,e){var n=t("./config.js"),r=function(t){var e=t.error,r=t.response,i=(t.body,t.stream,t.source);if(r&&r.statusCode){var o=r.statusCode,s=o.toString()[0];("4"===s||"5"===s)&&(e=e||new Error("HTTP status code "+o))}e&&(console.error("Error getting "+i),console.error(e),setTimeout(function(){},n.http.retryDelay))};e.exports=r},{"./config.js":"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/config.js"}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/context.json":[function(t,e){e.exports=["https://wikipathwayscontexts.firebaseio.com/bridgedb/.json"]},{}],"/Users/andersriutta/Sites/bridgedbjs-lkg/lib/config.js":[function(t,e){var n={baseIri:"http://webservi
ce.bridgedb.org/",datasetsMetadataIri:"https://cdn.rawgit.com/bridgedb/BridgeDb/24186142d05b5f811893970b9a5d61a06f241f68/org.bridgedb.bio/resources/org/bridgedb/bio/datasources.txt",http:{retryLimit:2,retryDelay:3e3}};e.exports=n},{}]},{},[])});
+//# sourceMappingURL=pvjs.core.min.js.map
Reply all
Reply to author
Forward
0 new messages