Skip to content

Instantly share code, notes, and snippets.

@Fil
Created November 12, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fil/5e5795945916cd87f1abb11bdb6964ab to your computer and use it in GitHub Desktop.
Save Fil/5e5795945916cd87f1abb11bdb6964ab to your computer and use it in GitHub Desktop.
Remapping 15,000 cities with UMAP and t-SNE
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Remapping Cities\n",
"\n",
"This notebook shows how to remap 15,000 cities with UMAP and tSNE."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import math\n",
"import pandas as pd\n",
"\n",
"# pip install sklearn\n",
"from sklearn.manifold import TSNE"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"data = pd.read_csv('cities15000.csv', names=['name', 'country', 'pop', 'lat','lon'], header=0).sort_values(by=['pop'], ascending=[0])\n",
"data['country'] = data['country'].map(str)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# comment out this line for a smaller dataset\n",
"#data = data[0:2000]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"application/javascript": [
"\n",
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" var force = true;\n",
"\n",
" if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" root._bokeh_onload_callbacks = [];\n",
" root._bokeh_is_loading = undefined;\n",
" }\n",
"\n",
" var JS_MIME_TYPE = 'application/javascript';\n",
" var HTML_MIME_TYPE = 'text/html';\n",
" var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
" var CLASS_NAME = 'output_bokeh rendered_html';\n",
"\n",
" /**\n",
" * Render data to the DOM node\n",
" */\n",
" function render(props, node) {\n",
" var script = document.createElement(\"script\");\n",
" node.appendChild(script);\n",
" }\n",
"\n",
" /**\n",
" * Handle when an output is cleared or removed\n",
" */\n",
" function handleClearOutput(event, handle) {\n",
" var cell = handle.cell;\n",
"\n",
" var id = cell.output_area._bokeh_element_id;\n",
" var server_id = cell.output_area._bokeh_server_id;\n",
" // Clean up Bokeh references\n",
" if (id !== undefined) {\n",
" Bokeh.index[id].model.document.clear();\n",
" delete Bokeh.index[id];\n",
" }\n",
"\n",
" if (server_id !== undefined) {\n",
" // Clean up Bokeh references\n",
" var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
" cell.notebook.kernel.execute(cmd, {\n",
" iopub: {\n",
" output: function(msg) {\n",
" var element_id = msg.content.text.trim();\n",
" Bokeh.index[element_id].model.document.clear();\n",
" delete Bokeh.index[element_id];\n",
" }\n",
" }\n",
" });\n",
" // Destroy server and session\n",
" var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
" cell.notebook.kernel.execute(cmd);\n",
" }\n",
" }\n",
"\n",
" /**\n",
" * Handle when a new output is added\n",
" */\n",
" function handleAddOutput(event, handle) {\n",
" var output_area = handle.output_area;\n",
" var output = handle.output;\n",
"\n",
" // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
" if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
" return\n",
" }\n",
"\n",
" var toinsert = output_area.element.find(`.${CLASS_NAME.split(' ')[0]}`);\n",
"\n",
" if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
" toinsert[0].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
" // store reference to embed id on output_area\n",
" output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
" }\n",
" if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
" var bk_div = document.createElement(\"div\");\n",
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var script_attrs = bk_div.children[0].attributes;\n",
" for (var i = 0; i < script_attrs.length; i++) {\n",
" toinsert[0].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
" }\n",
" // store reference to server id on output_area\n",
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
" }\n",
" }\n",
"\n",
" function register_renderer(events, OutputArea) {\n",
"\n",
" function append_mime(data, metadata, element) {\n",
" // create a DOM node to render to\n",
" var toinsert = this.create_output_subarea(\n",
" metadata,\n",
" CLASS_NAME,\n",
" EXEC_MIME_TYPE\n",
" );\n",
" this.keyboard_manager.register_events(toinsert);\n",
" // Render to node\n",
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
" render(props, toinsert[0]);\n",
" element.append(toinsert);\n",
" return toinsert\n",
" }\n",
"\n",
" /* Handle when an output is cleared or removed */\n",
" events.on('clear_output.CodeCell', handleClearOutput);\n",
" events.on('delete.Cell', handleClearOutput);\n",
"\n",
" /* Handle when a new output is added */\n",
" events.on('output_added.OutputArea', handleAddOutput);\n",
"\n",
" /**\n",
" * Register the mime type and append_mime function with output_area\n",
" */\n",
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
" /* Is output safe? */\n",
" safe: true,\n",
" /* Index of renderer in `output_area.display_order` */\n",
" index: 0\n",
" });\n",
" }\n",
"\n",
" // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
" if (root.Jupyter !== undefined) {\n",
" var events = require('base/js/events');\n",
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
"\n",
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
" register_renderer(events, OutputArea);\n",
" }\n",
" }\n",
"\n",
" \n",
" if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_failed_load = false;\n",
" }\n",
"\n",
" var NB_LOAD_WARNING = {'data': {'text/html':\n",
" \"<div style='background-color: #fdd'>\\n\"+\n",
" \"<p>\\n\"+\n",
" \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
" \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
" \"</p>\\n\"+\n",
" \"<ul>\\n\"+\n",
" \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
" \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
" \"</ul>\\n\"+\n",
" \"<code>\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"</code>\\n\"+\n",
" \"</div>\"}};\n",
"\n",
" function display_loaded() {\n",
" var el = document.getElementById(null);\n",
" if (el != null) {\n",
" el.textContent = \"BokehJS is loading...\";\n",
" }\n",
" if (root.Bokeh !== undefined) {\n",
" if (el != null) {\n",
" el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
" }\n",
" } else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(display_loaded, 100)\n",
" }\n",
" }\n",
"\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
" }\n",
" finally {\n",
" delete root._bokeh_onload_callbacks\n",
" }\n",
" console.info(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(js_urls, callback) {\n",
" root._bokeh_onload_callbacks.push(callback);\n",
" if (root._bokeh_is_loading > 0) {\n",
" console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
" return null;\n",
" }\n",
" if (js_urls == null || js_urls.length === 0) {\n",
" run_callbacks();\n",
" return null;\n",
" }\n",
" console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" root._bokeh_is_loading = js_urls.length;\n",
" for (var i = 0; i < js_urls.length; i++) {\n",
" var url = js_urls[i];\n",
" var s = document.createElement('script');\n",
" s.src = url;\n",
" s.async = false;\n",
" s.onreadystatechange = s.onload = function() {\n",
" root._bokeh_is_loading--;\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
" run_callbacks()\n",
" }\n",
" };\n",
" s.onerror = function() {\n",
" console.warn(\"failed to load library \" + url);\n",
" };\n",
" console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" }\n",
" };\n",
"\n",
" var js_urls = [];\n",
"\n",
" var inline_js = [\n",
" function(Bokeh) {\n",
" /* BEGIN bokeh.min.js */\n",
" !function(t,e){t.Bokeh=e()}(this,function(){var t;return function(t,e,r){var n={},i=function(r){var o=null!=e[r]?e[r]:r;if(!n[o]){if(!t[o]){var s=new Error(\"Cannot find module '\"+r+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=n[o]={exports:{}};t[o].call(a.exports,i,a,a.exports)}return n[o].exports},o=i(r);return o.require=i,o.register_plugin=function(r,n,s){for(var a in r)t[a]=r[a];for(var a in n)e[a]=n[a];var l=i(s);for(var a in l)o[a]=l[a];return l},o}([function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(132),i=t(29);r.overrides={};var o=i.clone(n);r.Models=function(t){var e=r.overrides[t]||o[t];if(null==e)throw new Error(\"Model '\"+t+\"' does not exist. This could be due to a widget\\n or a custom model not being registered before first usage.\");return e},r.Models.register=function(t,e){r.overrides[t]=e},r.Models.unregister=function(t){delete r.overrides[t]},r.Models.register_models=function(t,e,r){if(void 0===e&&(e=!1),null!=t)for(var n in t){var i=t[n];e||!o.hasOwnProperty(n)?o[n]=i:null!=r?r(n):console.warn(\"Model '\"+n+\"' was already registered\")}},r.register_models=r.Models.register_models,r.Models.registered_names=function(){return Object.keys(o)},r.index={}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(299),i=t(13),o=t(46),s=t(242),a=t(243),l=t(2);r.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",r.DEFAULT_SESSION_ID=\"default\",r.ClientConnection=function(){function t(e,n,o,s,l){this.url=e,this.id=n,this.args_string=o,this._on_have_session_hook=s,this._on_closed_permanently_hook=l,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=r.DEFAULT_SERVER_WEBSOCKET_URL),null==this.id&&(this.id=r.DEFAULT_SESSION_ID),i.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\"),this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this._receiver=new a.Receiver}return t._connection_count=0,t.prototype.connect=function(){var t,e,r;if(this.closed_permanently)return n.Promise.reject(new Error(\"Cannot connect() a closed ClientConnection\"));if(null!=this.socket)return n.Promise.reject(new Error(\"Already connected\"));this._pending_replies={},this._current_handler=null;try{return r=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id,(null!=(e=this.args_string)?e.length:void 0)>0&&(r+=\"&\"+this.args_string),null!=window.MozWebSocket?this.socket=new MozWebSocket(r):this.socket=new WebSocket(r),new n.Promise(function(t){return function(e,r){return t.socket.binaryType=\"arraybuffer\",t.socket.onopen=function(){return t._on_open(e,r)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(r)}}}(this))}catch(o){return t=o,i.logger.error(\"websocket creation failed to url: \"+this.url),i.logger.error(\" - \"+t),n.Promise.reject(t)}},t.prototype.close=function(){if(!this.closed_permanently&&(i.logger.debug(\"Permanently closing websocket connection \"+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,\"close method called on ClientConnection \"+this._number),this.session._connection_closed(),null!=this._on_closed_permanently_hook))return this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null},t.prototype._schedule_reconnect=function(t){var e;return e=function(t){return function(){t.closed_permanently||i.logger.info(\"Websocket connection \"+t._number+\" disconnected, will not attempt to reconnect\")}}(this),setTimeout(e,t)},t.prototype.send=function(t){if(null===this.socket)throw new Error(\"not connected so cannot send \"+t);return t.send(this.socket)},t.prototype.send_with_reply=function(t){var e;return e=new n.Promise(function(e){return function(r,n){return e._pending_replies[t.msgid()]=[r,n],e.send(t)}}(this)),e.then(function(t){if(\"ERROR\"===t.msgtype())throw new Error(\"Error reply \"+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t,e;return t=s.Message.create(\"PULL-DOC-REQ\",{}),e=this.send_with_reply(t),e.then(function(t){if(!(\"doc\"in t.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){return null===this.session?i.logger.debug(\"Pulling session for first time\"):i.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(t){return function(e){var r,n,a;return null!==t.session?(t.session.document.replace_with_json(e),i.logger.debug(\"Updated existing session with new pulled doc\")):t.closed_permanently?i.logger.debug(\"Got new document after connection was already closed\"):(r=o.Document.from_json(e),n=o.Document._compute_patch_since_json(e,r),n.events.length>0&&(i.logger.debug(\"Sending \"+n.events.length+\" changes from model construction back to server\"),a=s.Message.create(\"PATCH-DOC\",{},n),t.send(a)),t.session=new l.ClientSession(t,r,t.id),i.logger.debug(\"Created a new session from new pulled doc\"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})[\"catch\"](function(t){return null!=console.trace&&console.trace(t),i.logger.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){return i.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){var e,r,n;null==this._current_handler&&i.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(t.data)}catch(o){e=o,this._close_bad_protocol(e.toString())}return null===this._receiver.message?null:(r=this._receiver.message,n=r.problem(),null!==n&&this._close_bad_protocol(n),this._current_handler(r))},t.prototype._on_close=function(t){var e,r;for(i.logger.info(\"Lost websocket \"+this._number+\" connection, \"+t.code+\" (\"+t.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+t.code+\" (\"+t.reason+\")\")),this._pending_ack=null),e=function(t){return function(){var e,r,n;r=t._pending_replies;for(n in r)return e=r[n],delete t._pending_replies[n],e;return null}}(this),r=e();null!==r;)r[1](\"Disconnected\"),r=e();if(!this.closed_permanently)return this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return i.logger.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){if(i.logger.error(\"Closing connection: \"+t),null!=this.socket)return this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){return\"ACK\"!==t.msgtype()?this._close_bad_protocol(\"First message was not an ACK\"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):this.session.handle(t)},t}(),r.pull_session=function(t,e,o){var s,a,l;return l=null,s=null,a=new n.Promise(function(n,a){return s=new r.ClientConnection(t,e,o,function(t){var e;try{return n(t)}catch(r){throw e=r,i.logger.error(\"Promise handler threw an error, closing session \"+error),t.close(),e}},function(){return a(new Error(\"Connection was closed before we successfully pulled a session\"))}),s.connect().then(function(t){},function(t){throw i.logger.error(\"Failed to connect to Bokeh server \"+t),t})}),a.close=function(){return s.close()},a}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(13),i=t(46),o=t(242);r.ClientSession=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return t.prototype.handle=function(t){var e;return e=t.msgtype(),\"PATCH-DOC\"===e?this._handle_patch(t):\"OK\"===e?this._handle_ok(t):\"ERROR\"===e?this._handle_error(t):n.logger.debug(\"Doing nothing with message \"+t.msgtype())},t.prototype.close=function(){return this._connection.close()},t.prototype.send_event=function(t){var e;return e=o.Message.create(\"EVENT\",{},JSON.stringify(t)),this._connection.send(e)},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=o.Message.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._document_changed=function(t){var e;if(t.setter_id!==this.id&&(!(t instanceof i.ModelChangedEvent)||t.attr in t.model.serializable_attributes()))return e=o.Message.create(\"PATCH-DOC\",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){return this.document.apply_json_patch(t.content,t.buffers,this.id)},t.prototype._handle_ok=function(t){return n.logger.trace(\"Unhandled OK reply to \"+t.reqid())},t.prototype._handle_error=function(t){return n.logger.error(\"Unhandled ERROR reply to \"+t.reqid()+\": \"+t.content.text)},t}()},function(t,e,r){\"use strict\";function n(t){return function(e){e.prototype.event_name=t,l[t]=e}}function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.prototype.applicable_models.concat(e);t.prototype.applicable_models=n}Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(361),s=t(13),a=t(29),l={};r.register_event_class=n,r.register_with_event=i;var u=function(){function t(t){void 0===t&&(t={}),this.model_id=null,this._options=t,t.model_id&&(this.model_id=t.model_id)}return t.prototype.set_model_id=function(t){return this._options.model_id=t,this.model_id=t,this},t.prototype.is_applicable_to=function(t){return this.applicable_models.some(function(e){return t instanceof e})},t.event_class=function(t){return t.type?l[t.type]:void s.logger.warn(\"BokehEvent.event_class required events with a string type attribute\")},t.prototype.toJSON=function(){return{event_name:this.event_name,event_values:a.clone(this._options)}},t.prototype._customize_event=function(t){return this},t}();r.BokehEvent=u,u.prototype.applicable_models=[];var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"button_click\")],e)}(u);r.ButtonClick=c;var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e}(u);r.UIEvent=_;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"lodstart\")],e)}(_);r.LODStart=h;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"lodend\")],e)}(_);r.LODEnd=p;var d=function(t){function e(e){var r=t.call(this,e)||this;return r.geometry=e.geometry,r[\"final\"]=e[\"final\"],r}return o.__extends(e,t),e=o.__decorate([n(\"selectiongeometry\")],e)}(_);r.SelectionGeometry=d;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"reset\")],e)}(_);r.Reset=f;var y=function(t){function e(e){var r=t.call(this,e)||this;return r.sx=e.sx,r.sy=e.sy,r.x=null,r.y=null,r}return o.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,model_id:e})},e.prototype._customize_event=function(t){var e=t.plot_canvas.frame.xscales[\"default\"],r=t.plot_canvas.frame.yscales[\"default\"];return this.x=e.invert(t.plot_canvas.canvas.sx_to_vx(this.sx)),this.y=r.invert(t.plot_canvas.canvas.sy_to_vy(this.sy)),this._options.x=this.x,this._options.y=this.y,this},e}(_);r.PointEvent=y;var m=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.delta_x=e.delta_x,r.delta_y=e.delta_y,r}return o.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,delta_x:t.deltaX,delta_y:t.deltaY,direction:t.direction,model_id:e})},e=o.__decorate([n(\"pan\")],e)}(y);r.Pan=m;var v=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.scale=e.scale,r}return o.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,scale:t.scale,model_id:e})},e=o.__decorate([n(\"pinch\")],e)}(y);r.Pinch=v;var g=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.delta=e.delta,r}return o.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,delta:t.bokeh.delta,model_id:e})},e=o.__decorate([n(\"wheel\")],e)}(y);r.MouseWheel=g;var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"mousemove\")],e)}(y);r.MouseMove=b;var w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"mouseenter\")],e)}(y);r.MouseEnter=w;var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"mouseleave\")],e)}(y);r.MouseLeave=x;var k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"tap\")],e)}(y);r.Tap=k;var M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"doubletap\")],e)}(y);r.DoubleTap=M;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"press\")],e)}(y);r.Press=S;var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"panstart\")],e)}(y);r.PanStart=T;var O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"panend\")],e)}(y);r.PanEnd=O;var P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"pinchstart\")],e)}(y);r.PinchStart=P;var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e=o.__decorate([n(\"pinchend\")],e)}(y);r.PinchEnd=A},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(21),i=t(29);r.build_views=function(t,e,r,o){var s,a,l,u,c,_,h,p,d,f,y,m,v,g;for(null==o&&(o=[]),y=n.difference(Object.keys(t),function(){var t,r,n;for(n=[],t=0,r=e.length;t<r;t++)h=e[t],n.push(h.id);return n}()),l=0,c=y.length;l<c;l++)p=y[l],t[p].remove(),delete t[p];for(s=[],d=e.filter(function(e){return null==t[e.id]}),a=u=0,_=d.length;u<_;a=++u)h=d[a],v=null!=(f=o[a])?f:h.default_view,g=i.extend({model:h},r),t[h.id]=m=new v(g),s.push(m);return s},r.remove_views=function(t){var e,r,n,o,s;for(o=i.keys(t),s=[],r=0,n=o.length;r<n;r++)e=o[r],t[e].remove(),s.push(delete t[e]);return s}},function(t,e,r){\"use strict\";function n(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return f(t).apply(void 0,[e].concat(r))}function i(t){var e=t.parentNode;null!=e&&e.removeChild(t)}function o(t,e){var r=t.parentNode;null!=r&&r.replaceChild(e,t)}function s(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=t.firstChild,i=0,o=e;i<o.length;i++){var s=o[i];t.insertBefore(s,n)}}function a(t){for(var e;e=t.firstChild;)t.removeChild(e)}function l(t){t.style.display=\"\"}function u(t){t.style.display=\"none\"}function c(t){return{top:t.offsetTop,left:t.offsetLeft}}function _(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}}function h(t,e){var r=Element.prototype,n=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector;return n.call(t,e)}function p(t,e){for(var r=t;r=r.parentElement;)if(h(r,e))return r;return null}Object.defineProperty(r,\"__esModule\",{value:!0});var d=t(41),f=function(t){return function(e){function r(t){if(t instanceof HTMLElement)o.appendChild(t);else if(d.isString(t))o.appendChild(document.createTextNode(t));else if(null!=t&&t!==!1)throw new Error(\"expected an HTMLElement, string, false or null, got \"+JSON.stringify(t))}void 0===e&&(e={});for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=document.createElement(t);for(var s in e){var a=e[s];if(null!=a&&(!d.isBoolean(a)||a))if(\"class\"===s&&d.isArray(a))for(var l=0,u=a;l<u.length;l++){var c=u[l];null!=c&&o.classList.add(c)}else if(\"style\"===s&&d.isObject(a))for(var _ in a)o.style[_]=a[_];else if(\"data\"===s&&d.isObject(a))for(var h in a)o.dataset[h]=a[h];else o.setAttribute(s,a)}for(var p=0,f=n;p<f.length;p++){var y=f[p];if(d.isArray(y))for(var m=0,v=y;m<v.length;m++){var g=v[m];r(g)}else r(y)}return o}};r.createElement=n,r.div=f(\"div\"),r.span=f(\"span\"),r.link=f(\"link\"),r.style=f(\"style\"),r.a=f(\"a\"),r.p=f(\"p\"),r.pre=f(\"pre\"),r.button=f(\"button\"),r.label=f(\"label\"),r.input=f(\"input\"),r.select=f(\"select\"),r.option=f(\"option\"),r.canvas=f(\"canvas\"),r.ul=f(\"ul\"),r.ol=f(\"ol\"),r.li=f(\"li\"),r.nbsp=document.createTextNode(\" \"),r.removeElement=i,r.replaceWith=o,r.prepend=s,r.empty=a,r.show=l,r.hide=u,r.position=c,r.offset=_,r.matches=h,r.parent=p;var y;!function(t){t[t.Tab=9]=\"Tab\",t[t.Enter=13]=\"Enter\",t[t.Esc=27]=\"Esc\",t[t.PageUp=33]=\"PageUp\",t[t.PageDown=34]=\"PageDown\",t[t.Up=38]=\"Up\",t[t.Down=40]=\"Down\"}(y=r.Keys||(r.Keys={}))},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(44),s=t(5);r.DOMView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.tagName=\"div\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._has_finished=!1,this.el=this._createElement()},e.prototype.remove=function(){return s.removeElement(this.el),e.__super__.remove.call(this)},e.prototype.layout=function(){},e.prototype.render=function(){},e.prototype.renderTo=function(t,e){return null==e&&(e=!1),e?s.replaceWith(t,this.el):t.appendChild(this.el),this.layout()},e.prototype.has_finished=function(){return this._has_finished},e.prototype.notify_finished=function(){return this.root.notify_finished()},e.getters({_root_element:function(){return s.parent(this.el,\".bk-root\")},solver:function(){return this.is_root?this._solver:this.parent.solver},is_idle:function(){return this.has_finished()}}),e.prototype._createElement=function(){return s.createElement(this.tagName,{id:this.id,\"class\":this.className})},e}(o.View)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.AngleUnits=[\"deg\",\"rad\"],r.Dimension=[\"width\",\"height\"],r.Dimensions=[\"width\",\"height\",\"both\"],r.Direction=[\"clock\",\"anticlock\"],r.FontStyle=[\"normal\",\"italic\",\"bold\"],r.LatLon=[\"lat\",\"lon\"],r.LineCap=[\"butt\",\"round\",\"square\"],r.LineJoin=[\"miter\",\"round\",\"bevel\"],r.Location=[\"above\",\"below\",\"left\",\"right\"],r.LegendLocation=[\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"],r.Orientation=[\"vertical\",\"horizontal\"],r.OutputBackend=[\"canvas\",\"svg\",\"webgl\"],r.RenderLevel=[\"image\",\"underlay\",\"glyph\",\"annotation\",\"overlay\"],r.RenderMode=[\"canvas\",\"css\"],r.Side=[\"left\",\"right\"],r.SpatialUnits=[\"screen\",\"data\"],r.StartEnd=[\"start\",\"end\"],r.TextAlign=[\"left\",\"right\",\"center\"],r.TextBaseline=[\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"],r.DistributionTypes=[\"uniform\",\"normal\"],r.TransformStepModes=[\"after\",\"before\",\"center\"],r.SizingMode=[\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"],r.PaddingUnits=[\"percent\",\"absolute\"]},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(13),a=t(19),l=t(15),u=t(32),c=t(14),_=t(36),h=t(21),p=t(29),d=t(41),f=t(27);r.HasProps=function(){function t(t,e){var r,n,i,o,s;null==t&&(t={}),null==e&&(e={}),this.document=null,this.destroyed=new a.Signal(this,\"destroyed\"),this.change=new a.Signal(this,\"change\"),this.transformchange=new a.Signal(this,\"transformchange\"),this.attributes={},this.properties={},i=this.props;for(n in i){if(o=i[n],s=o.type,r=o.default_value,null==s)throw new Error(\"undefined property type for \"+this.type+\".\"+n);this.properties[n]=new s({obj:this,attr:n,default_value:r})}this._set_after_defaults={},null==t.id&&this.setv(\"id\",_.uniqueId(),{silent:!0}),this.setv(t,p.extend({silent:!0},e)),e.defer_initialization||this.finalize(t,e)}return n(t.prototype,a.Signalable),t.getters=function(t){var e,r,n;n=[];for(r in t)e=t[r],n.push(Object.defineProperty(this.prototype,r,{get:e}));return n},t.prototype.props={},t.prototype.mixins=[],t.define=function(t){var e,r,n;n=[];for(e in t)r=t[e],n.push(function(t){return function(e,r){var n,i,o,s,a;if(null!=t.prototype.props[e])throw new Error(\"attempted to redefine property '\"+t.name+\".\"+e+\"'\");if(null!=t.prototype[e])throw new Error(\"attempted to redefine attribute '\"+t.name+\".\"+e+\"'\");return Object.defineProperty(t.prototype,e,{get:function(){var t;return t=this.getv(e)},set:function(t){return this.setv(e,t),this}},{configurable:!1,enumerable:!0}),a=r[0],n=r[1],i=r[2],s={type:a,default_value:n,internal:null!=i&&i},o=p.clone(t.prototype.props),o[e]=s,t.prototype.props=o}}(this)(e,r));return n},t.internal=function(t){var e,r,n,i;e={},r=function(t){return function(t,r){var n,i;return i=r[0],n=r[1],e[t]=[i,n,!0]}}(this);for(n in t)i=t[n],r(n,i);return this.define(e)},t.mixin=function(){var t,e;return e=1<=arguments.length?o.call(arguments,0):[],this.define(l.create(e)),t=this.prototype.mixins.concat(e),this.prototype.mixins=t},t.mixins=function(t){return this.mixin.apply(this,t)},t.override=function(t,e){var r,n,i;d.isString(t)?(n={},n[r]=e):n=t,i=[];for(r in n)e=n[r],i.push(function(t){return function(e,r){var n,i;if(i=t.prototype.props[e],null==i)throw new Error(\"attempted to override nonexistent '\"+t.name+\".\"+e+\"'\");return n=p.clone(t.prototype.props),n[e]=p.extend({},i,{default_value:r}),t.prototype.props=n}}(this)(r,e));return i},t.define({id:[c.Any]}),t.prototype.toString=function(){return this.type+\"(\"+this.id+\")\"},t.prototype.finalize=function(t,e){var r,n,i;i=this.properties;for(r in i)n=i[r],n.update(),n.spec.transform&&this.connect(n.spec.transform.change,function(){return this.transformchange.emit()});return this.initialize(t,e),this.connect_signals()},t.prototype.initialize=function(t,e){},t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return a.Signal.disconnectReceiver(this)},t.prototype.destroy=function(){return this.disconnect_signals(),this.destroyed.emit()},t.prototype.clone=function(){return new this.constructor(this.attributes)},t.prototype._setv=function(t,e){var r,n,i,o,s,a,l,u,c,_;o=e.check_eq,c=e.silent,n=[],i=this._changing,this._changing=!0,s=this.attributes;for(r in t)_=t[r],_=t[r],o!==!1?f.isEqual(s[r],_)||n.push(r):n.push(r),s[r]=_;if(!c)for(n.length&&(this._pending=!0),a=l=0,u=n.length;0<=u?l<u:l>u;a=0<=u?++l:--l)this.properties[n[a]].change.emit(s[n[a]]);if(i)return this;if(!c&&!e.no_change)for(;this._pending;)this._pending=!1,this.change.emit();return this._pending=!1,this._changing=!1,this},t.prototype.setv=function(t,e,r){var n,o,s,a,l;d.isObject(t)||null===t?(n=t,r=e):(n={},n[t]=e),null==r&&(r={});for(t in n)if(i.call(n,t)){if(l=n[t],s=t,null==this.props[s])throw new Error(\"property \"+this.type+\".\"+s+\" wasn't declared\");null!=r&&r.defaults||(this._set_after_defaults[t]=!0)}if(!p.isEmpty(n)){o={};for(t in n)e=n[t],o[t]=this.getv(t);if(this._setv(n,r),null==(null!=r?r.silent:void 0)){a=[];for(t in n)e=n[t],a.push(this._tell_document_about_change(t,o[t],this.getv(t),r));return a}}},t.prototype.set=function(t,e,r){return s.logger.warn(\"HasProps.set('prop_name', value) is deprecated, use HasProps.prop_name = value instead\"),this.setv(t,e,r)},t.prototype.get=function(t){return s.logger.warn(\"HasProps.get('prop_name') is deprecated, use HasProps.prop_name instead\"),this.getv(t)},t.prototype.getv=function(t){if(null==this.props[t])throw new Error(\"property \"+this.type+\".\"+t+\" wasn't declared\");return this.attributes[t]},t.prototype.ref=function(){return u.create_ref(this)},t.prototype.set_subtype=function(t){return this._subtype=t},t.prototype.attribute_is_serializable=function(t){var e;if(e=this.props[t],null==e)throw new Error(this.type+\".attribute_is_serializable('\"+t+\"'): \"+t+\" wasn't declared\");return!e.internal},t.prototype.serializable_attributes=function(){var t,e,r,n;t={},r=this.attributes;for(e in r)n=r[e],this.attribute_is_serializable(e)&&(t[e]=n);return t},t._value_to_json=function(e,r,n){var o,s,a,l,u,c,_;if(r instanceof t)return r.ref();if(d.isArray(r)){for(l=[],o=s=0,a=r.length;s<a;o=++s)_=r[o],l.push(t._value_to_json(o,_,r));return l}if(d.isObject(r)){u={};for(c in r)i.call(r,c)&&(u[c]=t._value_to_json(c,r[c],r));return u}return r},t.prototype.attributes_as_json=function(e,r){var n,o,s,a;null==e&&(e=!0),null==r&&(r=t._value_to_json),n={},s=this.serializable_attributes();for(o in s)i.call(s,o)&&(a=s[o],e?n[o]=a:o in this._set_after_defaults&&(n[o]=a));return r(\"attributes\",n,this)},t._json_record_references=function(e,r,n,o){var s,a,l,c,_,h,p;if(null==r);else if(u.is_ref(r)){if(!(r.id in n))return _=e.get_model_by_id(r.id),t._value_record_references(_,n,o)}else{if(d.isArray(r)){for(h=[],a=0,c=r.length;a<c;a++)s=r[a],h.push(t._json_record_references(e,s,n,o));return h}if(d.isObject(r)){p=[];for(l in r)i.call(r,l)&&(s=r[l],p.push(t._json_record_references(e,s,n,o)));return p}}},t._value_record_references=function(e,r,n){var o,s,a,l,u,c,_,h,p,f,y;if(null==e);else if(e instanceof t){if(!(e.id in r)&&(r[e.id]=e,n)){for(s=e._immediate_references(),p=[],a=0,c=s.length;a<c;a++)h=s[a],p.push(t._value_record_references(h,r,!0));return p}}else if(e.buffer instanceof ArrayBuffer);else{if(d.isArray(e)){for(f=[],u=0,_=e.length;u<_;u++)o=e[u],f.push(t._value_record_references(o,r,n));return f}if(d.isObject(e)){y=[];for(l in e)i.call(e,l)&&(o=e[l],y.push(t._value_record_references(o,r,n)));return y}}},t.prototype._immediate_references=function(){var e,r,n,i;n={},e=this.serializable_attributes();for(r in e)i=e[r],t._value_record_references(i,n,!1);return p.values(n)},t.prototype.references=function(){var e;return e={},t._value_record_references(this,e,!0),p.values(e)},t.prototype.attach_document=function(t){if(null!==this.document&&this.document!==t)throw new Error(\"models must be owned by only a single document\");if(this.document=t,null!=this._doc_attached)return this._doc_attached()},t.prototype.detach_document=function(){return this.document=null},t.prototype._tell_document_about_change=function(e,r,n,i){var o,s,a,l,u,c,_;if(this.attribute_is_serializable(e)&&null!==this.document){l={},t._value_record_references(n,l,!1),_={},t._value_record_references(r,_,!1),o=!1;for(s in l)if(a=l[s],!(s in _)){o=!0;break}if(!o)for(u in _)if(c=_[u],!(u in l)){o=!0;break}return o&&this.document._invalidate_all_models(),this.document._notify_change(this,e,r,n,i)}},t.prototype.materialize_dataspecs=function(t){var e,r,n,i;e={},i=this.properties;for(r in i)n=i[r],n.dataspec&&(!n.optional||null!==n.spec.value||r in this._set_after_defaults)&&(e[\"_\"+r]=n.array(t),null!=n.spec.field&&n.spec.field in t._shapes&&(e[\"_\"+r+\"_shape\"]=t._shapes[n.spec.field]),n instanceof c.Distance&&(e[\"max_\"+r]=h.max(e[\"_\"+r])));return e},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=t(21),s=t(29);r.point_in_poly=function(t,e,r,n){var i,o,s,a,l,u,c,_;for(o=!1,l=r[r.length-1],c=n[n.length-1],i=s=0,a=r.length;0<=a?s<a:s>a;i=0<=a?++s:--s)u=r[i],_=n[i],c<e!=_<e&&l+(e-c)/(_-c)*(u-l)<t&&(o=!o),l=u,c=_;return o},n=function(){return null},r.HitTestResult=function(){function t(){this[\"0d\"]={glyph:null,get_view:n,indices:[]},this[\"1d\"]={indices:[]},this[\"2d\"]={indices:{}}}return Object.defineProperty(t.prototype,\"_0d\",{get:function(){return this[\"0d\"]}}),Object.defineProperty(t.prototype,\"_1d\",{get:function(){return this[\"1d\"]}}),Object.defineProperty(t.prototype,\"_2d\",{get:function(){return this[\"2d\"]}}),t.prototype.is_empty=function(){return 0===this._0d.indices.length&&0===this._1d.indices.length&&0===Object.keys(this._2d.indices).length},t.prototype.update_through_union=function(t){return this[\"0d\"].indices=o.union(t[\"0d\"].indices,this[\"0d\"].indices),this[\"0d\"].glyph=t[\"0d\"].glyph||this[\"0d\"].glyph,this[\"1d\"].indices=o.union(t[\"1d\"].indices,this[\"1d\"].indices),this[\"2d\"].indices=s.merge(t[\"2d\"].indices,this[\"2d\"].indices)},t}(),r.create_hit_test_result=function(){return new r.HitTestResult},r.create_1d_hit_test_result=function(t){var e,n,i;return i=new r.HitTestResult,i[\"1d\"].indices=function(){var r,i,s,a,l;for(s=o.sortBy(t,function(t){var e,r;return e=t[0],r=t[1]}),l=[],r=0,i=s.length;r<i;r++)a=s[r],n=a[0],e=a[1],l.push(n);return l}(),i},r.validate_bbox_coords=function(t,e){var r,n,i,o,s,a;return i=t[0],o=t[1],s=e[0],a=e[1],i>o&&(r=[o,i],i=r[0],o=r[1]),s>a&&(n=[a,s],s=n[0],a=n[1]),{minX:i,minY:s,maxX:o,maxY:a}},i=function(t){return t*t},r.dist_2_pts=function(t,e,r,n){return i(t-r)+i(e-n)},r.dist_to_segment_squared=function(t,e,n){var i,o;return i=r.dist_2_pts(e.x,e.y,n.x,n.y),0===i?r.dist_2_pts(t.x,t.y,e.x,e.y):(o=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/i,o<0?r.dist_2_pts(t.x,t.y,e.x,e.y):o>1?r.dist_2_pts(t.x,t.y,n.x,n.y):r.dist_2_pts(t.x,t.y,e.x+o*(n.x-e.x),e.y+o*(n.y-e.y)))},r.dist_to_segment=function(t,e,n){return Math.sqrt(r.dist_to_segment_squared(t,e,n))},r.check_2_segments_intersect=function(t,e,r,n,i,o,s,a){var l,u,c,_,h,p,d;return c=(a-o)*(r-t)-(s-i)*(n-e),0===c?{hit:!1,x:null,y:null}:(l=e-o,u=t-i,_=(s-i)*l-(a-o)*u,h=(r-t)*l-(n-e)*u,l=_/c,u=h/c,p=t+l*(r-t),d=e+l*(n-e),{hit:l>0&&l<1&&u>0&&u<1,x:p,y:d})}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(12),s=t(49);r.LayoutCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LayoutCanvas\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._top=new o.Variable(this.toString()+\".top\"),this._left=new o.Variable(this.toString()+\".left\"),this._width=new o.Variable(this.toString()+\".width\"),this._height=new o.Variable(this.toString()+\".height\"),this._right=new o.Variable(this.toString()+\".right\"),this._bottom=new o.Variable(this.toString()+\".bottom\"),this._hcenter=new o.Variable(this.toString()+\".hcenter\"),this._vcenter=new o.Variable(this.toString()+\".vcenter\")},e.prototype.get_editables=function(){return[]},e.prototype.get_constraints=function(){return[o.GE(this._top),o.GE(this._bottom),o.GE(this._left),o.GE(this._right),o.GE(this._width),o.GE(this._height),o.EQ(this._left,this._width,[-1,this._right]),o.EQ(this._bottom,this._height,[-1,this._top]),o.EQ([2,this._hcenter],[-1,this._left],[-1,this._right]),o.EQ([2,this._vcenter],[-1,this._bottom],[-1,this._top])]},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,\n",
" bottom:this._bottom.value,hcenter:this._hcenter.value,vcenter:this._vcenter.value}}}),e}(s.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m=function(t,e){function r(){this.constructor=t}for(var n in e)v.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},v={}.hasOwnProperty,g=t(12),b=t(10),w=t(14),x=t(13),k=t(41);y=Math.PI/2,n=\"alphabetic\",c=\"top\",i=\"bottom\",l=\"middle\",s=\"hanging\",a=\"left\",u=\"right\",o=\"center\",d={above:{parallel:0,normal:-y,horizontal:0,vertical:-y},below:{parallel:0,normal:y,horizontal:0,vertical:y},left:{parallel:-y,normal:0,horizontal:0,vertical:-y},right:{parallel:y,normal:0,horizontal:0,vertical:y}},f={above:{justified:c,parallel:n,normal:l,horizontal:n,vertical:l},below:{justified:i,parallel:s,normal:l,horizontal:s,vertical:l},left:{justified:c,parallel:n,normal:l,horizontal:l,vertical:n},right:{justified:c,parallel:n,normal:l,horizontal:l,vertical:n}},_={above:{justified:o,parallel:o,normal:a,horizontal:o,vertical:a},below:{justified:o,parallel:o,normal:a,horizontal:o,vertical:a},left:{justified:o,parallel:o,normal:u,horizontal:u,vertical:o},right:{justified:o,parallel:o,normal:a,horizontal:a,vertical:o}},h={above:u,below:a,left:u,right:a},p={above:a,below:u,left:u,right:a},r.update_panel_constraints=function(t){var e;if(null==t.model.props.visible||t.model.visible)return e=t.solver,null!=t._size_constraint&&e.has_constraint(t._size_constraint)&&e.remove_constraint(t._size_constraint),t._size_constraint=g.EQ(t.model.panel._size,-t._get_size()),e.add_constraint(t._size_constraint)},r.SidePanel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.type=\"SidePanel\",e.internal({side:[w.String],plot:[w.Instance]}),e.prototype.toString=function(){return this.type+\"(\"+this.id+\", \"+this.side+\")\"},e.prototype.initialize=function(t,r){switch(e.__super__.initialize.call(this,t,r),this.side){case\"above\":return this._dim=0,this._normals=[0,-1],this._size=this._height;case\"below\":return this._dim=0,this._normals=[0,1],this._size=this._height;case\"left\":return this._dim=1,this._normals=[-1,0],this._size=this._width;case\"right\":return this._dim=1,this._normals=[1,0],this._size=this._width;default:return x.logger.error(\"unrecognized side: '\"+this.side+\"'\")}},e.getters({is_horizontal:function(){return\"above\"===this.side||\"below\"===this.side},is_vertical:function(){return\"left\"===this.side||\"right\"===this.side}}),e.prototype.apply_label_text_heuristics=function(t,e){var r,n,i;return i=this.side,k.isString(e)?(n=f[i][e],r=_[i][e]):0===e?(n=f[i][e],r=_[i][e]):e<0?(n=\"middle\",r=h[i]):e>0&&(n=\"middle\",r=p[i]),t.textBaseline=n,t.textAlign=r,t},e.prototype.get_label_angle_heuristic=function(t){var e;return e=this.side,d[e][t]},e}(b.LayoutCanvas)},function(t,e,r){\"use strict\";function n(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new o.Constraint(new(o.Expression.bind.apply(o.Expression,[void 0].concat(e))),t)}}function i(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new o.Constraint(new(o.Expression.bind.apply(o.Expression,[void 0].concat(e))),t,o.Strength.weak)}}Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(318);r.Variable=o.Variable,r.Expression=o.Expression,r.Constraint=o.Constraint,r.Operator=o.Operator,r.Strength=o.Strength,r.EQ=n(o.Operator.Eq),r.LE=n(o.Operator.Le),r.GE=n(o.Operator.Ge),r.WEAK_EQ=i(o.Operator.Eq),r.WEAK_LE=i(o.Operator.Le),r.WEAK_GE=i(o.Operator.Ge);var s=function(){function t(){this.solver=new o.Solver}return t.prototype.clear=function(){this.solver=new o.Solver},t.prototype.toString=function(){return\"Solver(num_constraints=\"+this.num_constraints+\", num_editables=\"+this.num_editables+\")\"},Object.defineProperty(t.prototype,\"num_constraints\",{get:function(){return this.solver.numConstraints},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"num_editables\",{get:function(){return this.solver.numEditVariables},enumerable:!0,configurable:!0}),t.prototype.get_constraints=function(){return this.solver.getConstraints()},t.prototype.update_variables=function(){this.solver.updateVariables()},t.prototype.has_constraint=function(t){return this.solver.hasConstraint(t)},t.prototype.add_constraint=function(t){this.solver.addConstraint(t)},t.prototype.remove_constraint=function(t){this.solver.removeConstraint(t)},t.prototype.add_edit_variable=function(t,e){this.solver.addEditVariable(t,e)},t.prototype.remove_edit_variable=function(t){this.solver.removeEditVariable(t)},t.prototype.suggest_value=function(t,e){this.solver.suggestValue(t,e)},t}();r.Solver=s},function(t,e,r){\"use strict\";function n(t,e){return null!=console[t]?console[t].bind(console,e):null!=console.log?console.log.bind(console,e):function(){}}function i(t){null==l.log_levels[t]?(console.log(\"[bokeh] unrecognized logging level '\"+t+\"' passed to Bokeh.set_log_level(), ignoring\"),console.log(\"[bokeh] valid log levels are: \"+l.levels.join(\", \"))):(console.log(\"[bokeh] setting log level to: '\"+t+\"'\"),r.logger.set_level(t))}Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(41),s={},a=function(){function t(t,e){this.name=t,this.level=e}return t}();r.LogLevel=a;var l=function(){function t(e,r){void 0===r&&(r=t.INFO),this._name=e,this.set_level(r)}return Object.defineProperty(t,\"levels\",{get:function(){return Object.keys(t.log_levels)},enumerable:!0,configurable:!0}),t.get=function(e,r){if(void 0===r&&(r=t.INFO),e.length>0){var n=s[e];return null==n&&(s[e]=n=new t(e,r)),n}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")},Object.defineProperty(t.prototype,\"level\",{get:function(){return this.get_level()},enumerable:!0,configurable:!0}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){if(e instanceof a)this._log_level=e;else{if(!o.isString(e)||null==t.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=t.log_levels[e]}var r=\"[\"+this._name+\"]\";for(var i in t.log_levels){var s=t.log_levels[i];s.level<this._log_level.level||this._log_level.level===t.OFF.level?this[i]=function(){}:this[i]=n(i,r)}},t.prototype.trace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.TRACE=new a(\"trace\",0),t.DEBUG=new a(\"debug\",1),t.INFO=new a(\"info\",2),t.WARN=new a(\"warn\",6),t.ERROR=new a(\"error\",7),t.FATAL=new a(\"fatal\",8),t.OFF=new a(\"off\",9),t.log_levels={trace:t.TRACE,debug:t.DEBUG,info:t.INFO,warn:t.WARN,error:t.ERROR,fatal:t.FATAL,off:t.OFF},t}();r.Logger=l,r.logger=l.get(\"bokeh\"),r.set_log_level=i},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(19),l=t(7),u=t(37),c=t(25),_=t(21),h=t(41);n=function(t){try{return JSON.stringify(t)}catch(e){return t.toString()}},r.Property=function(){function t(t){this.obj=t.obj,this.attr=t.attr,this.default_value=t.default_value,this._init(),this.change=new a.Signal(this.obj,\"change\"),this.connect(this.change,function(t){return function(){return t._init()}}(this))}return i(t.prototype,a.Signalable),t.prototype.dataspec=!1,t.prototype.update=function(){return this._init()},t.prototype.init=function(){},t.prototype.transform=function(t){return t},t.prototype.validate=function(t){},t.prototype.value=function(t){var e;if(null==t&&(t=!0),void 0===this.spec.value)throw new Error(\"attempted to retrieve property value for property without value specification\");return e=this.transform([this.spec.value])[0],null!=this.spec.transform&&t&&(e=this.spec.transform.compute(e)),e},t.prototype.array=function(t){var e,r,n,i,o;if(!this.dataspec)throw new Error(\"attempted to retrieve property array for non-dataspec property\");if(e=t.data,null!=this.spec.field){if(!(this.spec.field in e))throw new Error(\"attempted to retrieve property array for nonexistent field '\"+this.spec.field+\"'\");i=this.transform(t.get_column(this.spec.field))}else null!=this.spec.expr?i=this.transform(this.spec.expr._v_compute(t)):(n=t.get_length(),null==n&&(n=1),o=this.value(!1),i=function(){var t,e,i;for(i=[],r=t=0,e=n;0<=e?t<e:t>e;r=0<=e?++t:--t)i.push(o);return i}());return null!=this.spec.transform&&(i=this.spec.transform.v_compute(i)),i},t.prototype._init=function(){var t,e,r,n;if(n=this.obj,null==n)throw new Error(\"missing property object\");if(null==n.properties)throw new Error(\"property object must be a HasProps\");if(t=this.attr,null==t)throw new Error(\"missing property attr\");if(e=n.getv(t),void 0===e&&(r=this.default_value,e=function(){switch(!1){case void 0!==r:return null;case!h.isArray(r):return _.copy(r);case!h.isFunction(r):return r(n);default:return r}}(),n.setv(t,e,{silent:!0,defaults:!0})),h.isArray(e)?this.spec={value:e}:h.isObject(e)&&(void 0===e.value?0:1)+(void 0===e.field?0:1)+(void 0===e.expr?0:1)===1?this.spec=e:this.spec={value:e},null!=this.spec.field&&!h.isString(this.spec.field))throw new Error(\"field value for property '\"+t+\"' is not a string\");return null!=this.spec.value&&this.validate(this.spec.value),this.init()},t.prototype.toString=function(){return this.name+\"(\"+this.obj+\".\"+this.attr+\", spec: \"+n(this.spec)+\")\"},t}(),r.simple_prop=function(t,e){var o;return o=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return i(o,r),o.prototype.name=t,o.prototype.validate=function(r){if(!e(r))throw new Error(t+\" property '\"+this.attr+\"' given invalid value: \"+n(r))},o}(r.Property)},r.Any=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Any\",function(t){return!0})),r.Array=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Array\",function(t){return h.isArray(t)||t instanceof Float64Array})),r.Bool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Bool\",h.isBoolean)),r.Boolean=r.Bool,r.Color=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Color\",function(t){return null!=u[t.toLowerCase()]||\"#\"===t.substring(0,1)||c.valid_rgb(t)})),r.Instance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Instance\",function(t){return null!=t.properties})),r.Number=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return h.isNumber(t)||h.isBoolean(t)})),r.Int=r.Number,r.Percent=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return(h.isNumber(t)||h.isBoolean(t))&&0<=t&&t<=1})),r.String=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"String\",h.isString)),r.Font=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.String),r.enum_prop=function(t,e){var n;return n=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.name=t,r}(r.simple_prop(t,function(t){return s.call(e,t)>=0}))},r.Anchor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Anchor\",l.LegendLocation)),r.AngleUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"AngleUnits\",l.AngleUnits)),r.Direction=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var e,r,n,i;for(i=new Uint8Array(t.length),e=r=0,n=t.length;0<=n?r<n:r>n;e=0<=n?++r:--r)switch(t[e]){case\"clock\":i[e]=!1;break;case\"anticlock\":i[e]=!0}return i},e}(r.enum_prop(\"Direction\",l.Direction)),r.Dimension=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimension\",l.Dimension)),r.Dimensions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimensions\",l.Dimensions)),r.FontStyle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"FontStyle\",l.FontStyle)),r.LatLon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LatLon\",l.LatLon)),r.LineCap=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineCap\",l.LineCap)),r.LineJoin=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineJoin\",l.LineJoin)),r.LegendLocation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LegendLocation\",l.LegendLocation)),r.Location=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Location\",l.Location)),r.OutputBackend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"OutputBackend\",l.OutputBackend)),r.Orientation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Orientation\",l.Orientation)),r.TextAlign=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextAlign\",l.TextAlign)),r.TextBaseline=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextBaseline\",l.TextBaseline)),r.RenderLevel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderLevel\",l.RenderLevel)),r.RenderMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderMode\",l.RenderMode)),r.SizingMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SizingMode\",l.SizingMode)),r.SpatialUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SpatialUnits\",l.SpatialUnits)),r.Distribution=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Distribution\",l.DistributionTypes)),r.TransformStepMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TransformStepMode\",l.TransformStepModes)),r.PaddingUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"PaddingUnits\",l.PaddingUnits)),r.StartEnd=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"StartEnd\",l.StartEnd)),r.units_prop=function(t,e,n){var o;return o=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return i(o,r),o.prototype.name=t,o.prototype.init=function(){var r;if(null==this.spec.units&&(this.spec.units=n),this.units=this.spec.units,r=this.spec.units,s.call(e,r)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+r)},o}(r.Number)},r.Angle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var r;return\"deg\"===this.spec.units&&(t=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(r*Math.PI/180);return i}()),t=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(-r);return i}(),e.__super__.transform.call(this,t)},e}(r.units_prop(\"Angle\",l.AngleUnits,\"rad\")),r.Distance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.units_prop(\"Distance\",l.SpatialUnits,\"data\")),r.AngleSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Angle),r.ColorSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Color),r.DirectionSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Distance),r.DistanceSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Distance),r.FontSizeSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.String),r.NumberSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Number),r.StringSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.String)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a=t(14),l=t(29);i=function(t,e){var r,n,i;n={},null==e&&(e=\"\");for(r in t)i=t[r],n[e+r]=i;return n},o={line_color:[a.ColorSpec,\"black\"],line_width:[a.NumberSpec,1],line_alpha:[a.NumberSpec,1],line_join:[a.LineJoin,\"miter\"],line_cap:[a.LineCap,\"butt\"],line_dash:[a.Array,[]],line_dash_offset:[a.Number,0]},r.line=function(t){return i(o,t)},n={fill_color:[a.ColorSpec,\"gray\"],fill_alpha:[a.NumberSpec,1]},r.fill=function(t){return i(n,t)},s={text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"12pt\"],text_font_style:[a.FontStyle,\"normal\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"],text_line_height:[a.Number,1.2]},r.text=function(t){return i(s,t)},r.create=function(t){var e,r,n,i,o,s,a;for(a={},r=0,i=t.length;r<i;r++){if(e=t[r],s=e.split(\":\"),n=s[0],o=s[1],null==this[n])throw new Error(\"Unknown property mixin kind '\"+n+\"'\");a=l.extend(a,this[n](o))}return a}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(8),s=t(17),a=t(9),l=t(14);r.SelectionManager=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"SelectionManager\",e.internal({source:[l.Any]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.selector=new s.Selector,this.inspectors={}},e.prototype.select=function(t,e,r,n){var i,o,s,a;for(null==n&&(n=!1),i=!1,o=0,s=t.length;o<s;o++)a=t[o],i||(i=a.hit_test(e,r,n));return i},e.prototype.inspect=function(t,e){var r;return r=!1,r||(r=t.hit_test(e,!1,!1,\"inspect\")),r},e.prototype.clear=function(t){return this.selector.clear(),this.source.selected=a.create_hit_test_result()},e.prototype.get_or_create_inspector=function(t){return null==this.inspectors[t.id]&&(this.inspectors[t.id]=new s.Selector),this.inspectors[t.id]},e}(o.HasProps)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(8),s=t(9),a=t(14);r.Selector=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Selector\",e.prototype.update=function(t,e,r,n){return null==n&&(n=!1),this.setv(\"timestamp\",new Date,{silent:n}),this.setv(\"final\",e,{silent:n}),r&&t.update_through_union(this.indices),this.setv(\"indices\",t,{silent:n})},e.prototype.clear=function(){return this.timestamp=new Date,this[\"final\"]=!0,this.indices=s.create_hit_test_result()},e.internal({indices:[a.Any,function(){return s.create_hit_test_result()}],\"final\":[a.Boolean],timestamp:[a.Any]}),e}(o.HasProps)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(){function t(){this._dev=!1}return Object.defineProperty(t.prototype,\"dev\",{get:function(){return this._dev},set:function(t){this._dev=t},enumerable:!0,configurable:!0}),t}();r.Settings=n,r.settings=new n},function(t,e,r){\"use strict\";function n(t,e,r,n){return l.find(t,function(t){return t.signal===e&&t.slot===r&&t.context===n})}function i(t){0===p.size&&a.defer(o),p.add(t)}function o(){p.forEach(function(t){l.removeBy(t,function(t){return null==t.signal})}),p.clear()}Object.defineProperty(r,\"__esModule\",{value:!0});var s=t(13),a=t(23),l=t(21),u=function(){function t(t,e){this.sender=t,this.name=e}return t.prototype.connect=function(t,e){void 0===e&&(e=null),_.has(this.sender)||_.set(this.sender,[]);var r=_.get(this.sender);if(null!=n(r,this,t,e))return!1;var i=e||t;h.has(i)||h.set(i,[]);var o=h.get(i),s={signal:this,slot:t,context:e};return r.push(s),o.push(s),!0},t.prototype.disconnect=function(t,e){void 0===e&&(e=null);var r=_.get(this.sender);if(null==r||0===r.length)return!1;var o=n(r,this,t,e);if(null==o)return!1;var s=e||t,a=h.get(s);return o.signal=null,i(r),i(a),!0},t.prototype.emit=function(t){for(var e=_.get(this.sender)||[],r=0,n=e;r<n.length;r++){var i=n[r],o=i.signal,s=i.slot,a=i.context;o===this&&s.call(a,t,this.sender)}},t}();r.Signal=u,function(t){function e(t,e){var r=_.get(t);if(null!=r&&0!==r.length){var n=h.get(e);if(null!=n&&0!==n.length){for(var o=0,s=n;o<s.length;o++){var a=s[o];if(null==a.signal)return;a.signal.sender===t&&(a.signal=null)}i(r),i(n)}}}function r(t){var e=_.get(t);if(null!=e&&0!==e.length){for(var r=0,n=e;r<n.length;r++){var o=n[r];if(null==o.signal)return;var s=o.context||o.slot;o.signal=null,i(h.get(s))}i(e)}}function n(t){var e=h.get(t);if(null!=e&&0!==e.length){for(var r=0,n=e;r<n.length;r++){var o=n[r];if(null==o.signal)return;var s=o.signal.sender;o.signal=null,i(_.get(s))}i(e)}}function o(t){var e=_.get(t);if(null!=e&&0!==e.length){for(var r=0,n=e;r<n.length;r++){var o=n[r];o.signal=null}i(e)}var s=h.get(t);if(null!=s&&0!==s.length){for(var a=0,l=s;a<l.length;a++){var o=l[a];o.signal=null}i(s)}}t.disconnectBetween=e,t.disconnectSender=r,t.disconnectReceiver=n,t.disconnectAll=o}(u=r.Signal||(r.Signal={})),r.Signal=u;var c;!function(t){function e(t,e){return t.connect(e,this)}function r(t,e){s.logger.warn(\"obj.listenTo('event', handler) is deprecated, use obj.connect(signal, slot)\");var r=t.split(\":\"),n=r[0],i=r[1],o=null==i?this[n]:this.properties[i][n];return o.connect(e,this)}function n(t,e){s.logger.warn(\"obj.trigger('event', args) is deprecated, use signal.emit(args)\");var r=t.split(\":\"),n=r[0],i=r[1],o=null==i?this[n]:this.properties[i][n];return o.emit(e)}t.connect=e,t.listenTo=r,t.trigger=n}(c=r.Signalable||(r.Signalable={}));var _=new WeakMap,h=new WeakMap,p=new Set},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(315),i=t(19),o=t(13),s=t(5),a=t(42),l=t(29),u=t(3);r.UIEvents=function(){function t(t,e,r,n){this.plot_view=t,this.toolbar=e,this.hit_area=r,this.plot=n,this.tap=new i.Signal(this,\"tap\"),this.doubletap=new i.Signal(this,\"doubletap\"),this.press=new i.Signal(this,\"press\"),this.pan_start=new i.Signal(this,\"pan:start\"),this.pan=new i.Signal(this,\"pan\"),this.pan_end=new i.Signal(this,\"pan:end\"),this.pinch_start=new i.Signal(this,\"pinch:start\"),this.pinch=new i.Signal(this,\"pinch\"),this.pinch_end=new i.Signal(this,\"pinch:end\"),this.rotate_start=new i.Signal(this,\"rotate:start\"),this.rotate=new i.Signal(this,\"rotate\"),this.rotate_end=new i.Signal(this,\"rotate:end\"),this.move_enter=new i.Signal(this,\"move:enter\"),this.move=new i.Signal(this,\"move\"),this.move_exit=new i.Signal(this,\"move:exit\"),this.scroll=new i.Signal(this,\"scroll\"),this.keydown=new i.Signal(this,\"keydown\"),this.keyup=new i.Signal(this,\"keyup\"),this._configure_hammerjs()}return t.prototype._configure_hammerjs=function(){return this.hammer=new n(this.hit_area),this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",function(t){return function(e){return t._doubletap(e)}}(this)),this.hammer.on(\"tap\",function(t){return function(e){return t._tap(e)}}(this)),this.hammer.on(\"press\",function(t){return function(e){return t._press(e)}}(this)),this.hammer.get(\"pan\").set({direction:n.DIRECTION_ALL}),this.hammer.on(\"panstart\",function(t){return function(e){return t._pan_start(e)}}(this)),this.hammer.on(\"pan\",function(t){return function(e){return t._pan(e)}}(this)),this.hammer.on(\"panend\",function(t){return function(e){return t._pan_end(e)}}(this)),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",function(t){return function(e){return t._pinch_start(e)}}(this)),this.hammer.on(\"pinch\",function(t){return function(e){return t._pinch(e)}}(this)),this.hammer.on(\"pinchend\",function(t){return function(e){return t._pinch_end(e)}}(this)),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",function(t){return function(e){return t._rotate_start(e)}}(this)),this.hammer.on(\"rotate\",function(t){return function(e){return t._rotate(e)}}(this)),this.hammer.on(\"rotateend\",function(t){return function(e){return t._rotate_end(e)}}(this)),this.hit_area.addEventListener(\"mousemove\",function(t){return function(e){return t._mouse_move(e)}}(this)),this.hit_area.addEventListener(\"mouseenter\",function(t){return function(e){return t._mouse_enter(e)}}(this)),this.hit_area.addEventListener(\"mouseleave\",function(t){return function(e){return t._mouse_exit(e)}}(this)),this.hit_area.addEventListener(\"wheel\",function(t){return function(e){return t._mouse_wheel(e)}}(this)),document.addEventListener(\"keydown\",function(t){return function(e){return t._key_down(e)}}(this)),document.addEventListener(\"keyup\",function(t){return function(e){return t._key_up(e)}}(this))},t.prototype.register_tool=function(t){var e,r,n,i;if(e=t.model.event_type,r=t.model.id,n=t.model.type,null==e)return void o.logger.debug(\"Button tool: \"+n);switch(i=t,e){case\"pan\":null!=i._pan_start&&i.connect(this.pan_start,function(t){if(t.id===r)return i._pan_start(t.e)}),null!=i._pan&&i.connect(this.pan,function(t){if(t.id===r)return i._pan(t.e)}),null!=i._pan_end&&i.connect(this.pan_end,function(t){if(t.id===r)return i._pan_end(t.e)});break;case\"pinch\":null!=i._pinch_start&&i.connect(this.pinch_start,function(t){if(t.id===r)return i._pinch_start(t.e)}),null!=i._pinch&&i.connect(this.pinch,function(t){if(t.id===r)return i._pinch(t.e)}),null!=i._pinch_end&&i.connect(this.pinch_end,function(t){if(t.id===r)return i._pinch_end(t.e)});break;case\"rotate\":null!=i._rotate_start&&i.connect(this.rotate_start,function(t){if(t.id===r)return i._rotate_start(t.e)}),null!=i._rotate&&i.connect(this.rotate,function(t){if(t.id===r)return i._rotate(t.e)}),null!=i._rotate_end&&i.connect(this.rotate_end,function(t){if(t.id===r)return i._rotate_end(t.e)});break;case\"move\":null!=i._move_enter&&i.connect(this.move_enter,function(t){if(t.id===r)return i._move_enter(t.e)}),null!=i._move&&i.connect(this.move,function(t){if(t.id===r)return i._move(t.e)}),null!=i._move_exit&&i.connect(this.move_exit,function(t){if(t.id===r)return i._move_exit(t.e)});break;case\"tap\":null!=i._tap&&i.connect(this.tap,function(t){if(t.id===r)return i._tap(t.e)});break;case\"press\":null!=i._press&&i.connect(this.press,function(t){if(t.id===r)return i._press(t.e)});break;case\"scroll\":null!=i._scroll&&i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)});break;default:throw new Error(\"unsupported event_type: \"+ev)}return null!=i._doubletap&&i.connect(this.doubletap,function(t){return i._doubletap(t.e)}),null!=i._keydown&&i.connect(this.keydown,function(t){return i._keydown(t.e)}),null!=i._keyup&&i.connect(this.keyup,function(t){return i._keyup(t.e)}),(\"ontouchstart\"in window||navigator.maxTouchPoints>0)&&\"pinch\"===e?(o.logger.debug(\"Registering scroll on touch screen\"),i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)})):void 0},t.prototype._hit_test_renderers=function(t,e){var r,n,i,o;for(n=this.plot_view.get_renderer_views(),r=n.length-1;r>=0;r+=-1)if(o=n[r],(\"annotation\"===(i=o.model.level)||\"overlay\"===i)&&null!=o.bbox&&o.bbox().contains(t,e))return o;return null},t.prototype._hit_test_frame=function(t,e){var r,n,i;return r=this.plot_view.canvas,n=r.sx_to_vx(t),i=r.sy_to_vy(e),this.plot_view.frame.contains(n,i)},t.prototype._trigger=function(t,e){var r,n,i,o,s,a,u,c,_,h,p;switch(a=t.name,o=a.split(\":\")[0],p=this._hit_test_renderers(e.bokeh.sx,e.bokeh.sy),o){case\"move\":for(n=this.toolbar.inspectors.filter(function(t){return t.active}),s=\"default\",null!=p?(null!=p.model.cursor&&(s=p.model.cursor()),l.isEmpty(n)||(t=this.move_exit,a=t.name)):this._hit_test_frame(e.bokeh.sx,e.bokeh.sy)&&(l.isEmpty(n)||(s=\"crosshair\")),this.plot_view.set_cursor(s),h=[],u=0,_=n.length;u<_;u++)c=n[u],h.push(this.trigger(t,e,c.id));return h;case\"tap\":if(null!=p&&\"function\"==typeof p.on_hit&&p.on_hit(e.bokeh.sx,e.bokeh.sy),r=this.toolbar.gestures[o].active,null!=r)return this.trigger(t,e,r.id);break;case\"scroll\":if(i=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",r=this.toolbar.gestures[i].active,null!=r)return e.preventDefault(),e.stopPropagation(),this.trigger(t,e,r.id);break;default:if(r=this.toolbar.gestures[o].active,null!=r)return this.trigger(t,e,r.id)}},t.prototype.trigger=function(t,e,r){return null==r&&(r=null),t.emit({id:r,e:e})},t.prototype._bokify_hammer=function(t,e){var r,n,i,a,c,_;return null==e&&(e={}),\"mouse\"===t.pointerType?(c=t.srcEvent.pageX,_=t.srcEvent.pageY):(c=t.pointers[0].pageX,_=t.pointers[0].pageY),i=s.offset(t.target),n=i.left,a=i.top,t.bokeh={sx:c-n,sy:_-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):o.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._bokify_point_event=function(t,e){var r,n,i,a;return null==e&&(e={}),i=s.offset(t.currentTarget),n=i.left,a=i.top,t.bokeh={sx:t.pageX-n,sy:t.pageY-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):o.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(this.tap,t)},t.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(this.doubletap,t)},t.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(this.press,t)},t.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger(this.pan_start,t)},t.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(this.pan,t)},t.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(this.pan_end,t)},t.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_start,t)},t.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(this.pinch,t)},t.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_end,t)},t.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_start,t)},t.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(this.rotate,t)},t.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_end,t)},t.prototype._mouse_enter=function(t){\n",
" return this._bokify_point_event(t),this._trigger(this.move_enter,t)},t.prototype._mouse_move=function(t){return this._bokify_point_event(t),this._trigger(this.move,t)},t.prototype._mouse_exit=function(t){return this._bokify_point_event(t),this._trigger(this.move_exit,t)},t.prototype._mouse_wheel=function(t){return this._bokify_point_event(t,{delta:a.getDeltaY(t)}),this._trigger(this.scroll,t)},t.prototype._key_down=function(t){return this.trigger(this.keydown,t)},t.prototype._key_up=function(t){return this.trigger(this.keyup,t)},t}()},function(t,e,r){\"use strict\";function n(t){return t[t.length-1]}function i(t){return I.call(t)}function o(t){return(e=[]).concat.apply(e,t);var e}function s(t,e){return t.indexOf(e)!==-1}function a(t,e){return t[e>=0?e:t.length+e]}function l(t,e){for(var r=Math.min(t.length,e.length),n=new Array(r),i=0;i<r;i++)n[i]=[t[i],e[i]];return n}function u(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=0;i<e;i++)o=t[i],r[i]=o[0],n[i]=o[1];return[r,n];var o}function c(t,e,r){void 0===r&&(r=1),null==e&&(e=t,t=0);for(var n=Math.max(Math.ceil((e-t)/r),0),i=Array(n),o=0;o<n;o++,t+=r)i[o]=t;return i}function _(t,e,r){void 0===r&&(r=100);for(var n=(e-t)/(r-1),i=new Array(r),o=0;o<r;o++)i[o]=t+n*o;return i}function h(t){for(var e=t.length,r=t[0].length,n=[],i=0;i<r;i++){n[i]=[];for(var o=0;o<e;o++)n[i][o]=t[o][i]}return n}function p(t){return t.reduce(function(t,e){return t+e},0)}function d(t){var e=[];return t.reduce(function(t,r,n){return e[n]=t+r},0),e}function f(t){for(var e,r=1/0,n=0,i=t.length;n<i;n++)e=t[n],e<r&&(r=e);return r}function y(t,e){if(0==t.length)throw new Error(\"minBy() called with an empty array\");for(var r=t[0],n=e(r),i=1,o=t.length;i<o;i++){var s=t[i],a=e(s);a<n&&(r=s,n=a)}return r}function m(t){for(var e,r=-(1/0),n=0,i=t.length;n<i;n++)e=t[n],e>r&&(r=e);return r}function v(t,e){if(0==t.length)throw new Error(\"maxBy() called with an empty array\");for(var r=t[0],n=e(r),i=1,o=t.length;i<o;i++){var s=t[i],a=e(s);a>n&&(r=s,n=a)}return r}function g(t){return y(c(t.length),function(e){return t[e]})}function b(t){return v(c(t.length),function(e){return t[e]})}function w(t,e){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!e(i))return!1}return!0}function x(t,e){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(e(i))return!0}return!1}function k(t){return function(e,r){for(var n=e.length,i=t>0?0:n-1;i>=0&&i<n;i+=t)if(r(e[i]))return i;return-1}}function M(t,e){var n=r.findIndex(t,e);return n==-1?void 0:t[n]}function S(t,e){var n=r.findLastIndex(t,e);return n==-1?void 0:t[n]}function T(t,e){for(var r=0,n=t.length;r<n;){var i=Math.floor((r+n)/2);t[i]<e?r=i+1:n=i}return r}function O(t,e){var r=t.map(function(t,r){return{value:t,index:r,key:e(t)}});return r.sort(function(t,e){var r=t.key,n=e.key;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return t.index-e.index}),r.map(function(t){return t.value})}function P(t){for(var e=[],r=0,n=t;r<n.length;r++){var i=n[r];s(e,i)||e.push(i)}return e}function A(t,e){for(var r=[],n=[],i=0,o=t;i<o.length;i++){var a=o[i],l=e(a);s(n,l)||(n.push(l),r.push(a))}return r}function E(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return P(o(t))}function j(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=[];t:for(var i=0,o=t;i<o.length;i++){var a=o[i];if(!s(n,a)){for(var l=0,u=e;l<u.length;l++){var c=u[l];if(!s(c,a))continue t}n.push(a)}}return n}function z(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=o(e);return t.filter(function(t){return!s(n,t)})}function C(t,e){for(var r=0;r<t.length;)e(t[r])?t.splice(r,1):r++}function N(t){for(var e=t.length,r=new Array(e),n=0;n<e;n++){var i=F.randomIn(0,n);i!==n&&(r[n]=r[i]),r[i]=t[n]}return r}function D(t,e){for(var r=t.length,n=new Array(r-1),i=0;i<r-1;i++)n[i]=e(t[i],t[i+1]);return n}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var F=t(28),I=Array.prototype.slice;r.last=n,r.copy=i,r.concat=o,r.contains=s,r.nth=a,r.zip=l,r.unzip=u,r.range=c,r.linspace=_,r.transpose=h,r.sum=p,r.cumsum=d,r.min=f,r.minBy=y,r.max=m,r.maxBy=v,r.argmin=g,r.argmax=b,r.all=w,r.any=x,r.findIndex=k(1),r.findLastIndex=k(-1),r.find=M,r.findLast=S,r.sortedIndex=T,r.sortBy=O,r.uniq=P,r.uniqBy=A,r.union=E,r.intersection=j,r.difference=z,r.removeBy=C,r.shuffle=N,r.pairwise=D},function(t,e,r){\"use strict\";function n(){return{minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function i(){return{minX:Number.MIN_VALUE,minY:-(1/0),maxX:1/0,maxY:1/0}}function o(){return{minX:-(1/0),minY:Number.MIN_VALUE,maxX:1/0,maxY:1/0}}function s(t,e){return{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}}Object.defineProperty(r,\"__esModule\",{value:!0}),r.empty=n,r.positive_x=i,r.positive_y=o,r.union=s;var a=function(){function t(t){null==t?(this.x0=1/0,this.y0=-(1/0),this.x1=1/0,this.y1=-(1/0)):(this.x0=t.x0,this.y0=t.y0,this.x1=t.x1,this.y1=t.y1)}return Object.defineProperty(t.prototype,\"minX\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"minY\",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"maxX\",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"maxY\",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"pt0\",{get:function(){return[this.x0,this.y0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"pt1\",{get:function(){return[this.x1,this.y1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"x\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"y\",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"width\",{get:function(){return this.x1-this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"height\",{get:function(){return this.y1-this.y0},enumerable:!0,configurable:!0}),t.prototype.contains=function(t,e){return t>=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.union=function(e){return new t({x0:Math.min(this.x0,e.x0),y0:Math.min(this.y0,e.y0),x1:Math.max(this.x1,e.x1),y1:Math.max(this.y1,e.y1)})},t}();r.BBox=a},function(t,e,r){\"use strict\";function n(t,e){return setTimeout(t,e)}function i(t){return a(t)}function o(t,e,r){void 0===r&&(r={});var n,i,o,s=null,a=0,l=function(){a=r.leading===!1?0:Date.now(),s=null,o=t.apply(n,i),s||(n=i=null)};return function(){var u=Date.now();a||r.leading!==!1||(a=u);var c=e-(u-a);return n=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=u,o=t.apply(n,i),s||(n=i=null)):s||r.trailing===!1||(s=setTimeout(l,c)),o}}function s(t){var e,r=!1;return function(){return r||(r=!0,e=t()),e}}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0}),r.delay=n;var a=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;r.defer=i,r.throttle=o,r.once=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a;o=function(t){if(t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),!t.getLineDash)return t.getLineDash=function(){return t.mozDash}},s=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},i=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null==(e=t.imageSmoothingEnabled)||e}},a=function(t){if(t.measureText&&null==t.html5MeasureText)return t.html5MeasureText=t.measureText,t.measureText=function(e){var r;return r=t.html5MeasureText(e),r.ascent=1.6*t.html5MeasureText(\"m\").width,r}},n=function(t){var e;if(e=function(e,r,n,i,o,s,a,l){var u,c,_;null==l&&(l=!1),u=.551784,t.translate(e,r),t.rotate(o),c=n,_=i,l&&(c=-n,_=-i),t.moveTo(-c,0),t.bezierCurveTo(-c,_*u,-c*u,_,0,_),t.bezierCurveTo(c*u,_,c,_*u,c,0),t.bezierCurveTo(c,-_*u,c*u,-_,0,-_),t.bezierCurveTo(-c*u,-_,-c,-_*u,-c,0),t.rotate(-o),t.translate(-e,-r)},!t.ellipse)return t.ellipse=e},r.fixup_ctx=function(t){return o(t),s(t),i(t),a(t),n(t)},r.get_scale_ratio=function(t,e,r){var n,i;return\"svg\"===r?1:e?(i=window.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,i/n):1}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},o=t(37);n=function(t){var e;return e=Number(t).toString(16),e=1===e.length?\"0\"+e:e},r.color2hex=function(t){var e,r,i,s;return t+=\"\",0===t.indexOf(\"#\")?t:null!=o[t]?o[t]:0===t.indexOf(\"rgb\")?(i=t.replace(/^rgba?\\(|\\s+|\\)$/g,\"\").split(\",\"),e=function(){var t,e,r,o;for(r=i.slice(0,3),o=[],t=0,e=r.length;t<e;t++)s=r[t],o.push(n(s));return o}().join(\"\"),4===i.length&&(e+=n(Math.floor(255*parseFloat(i.slice(3))))),r=\"#\"+e.slice(0,8)):t},r.color2rgba=function(t,e){var n,i,o;if(null==e&&(e=1),!t)return[0,0,0,0];for(n=r.color2hex(t),n=n.replace(/ |#/g,\"\"),n.length<=4&&(n=n.replace(/(.)/g,\"$1$1\")),n=n.match(/../g),o=function(){var t,e,r;for(r=[],t=0,e=n.length;t<e;t++)i=n[t],r.push(parseInt(i,16)/255);return r}();o.length<3;)o.push(0);return o.length<4&&o.push(e),o.slice(0,4)},r.valid_rgb=function(t){var e,r,n,o;switch(t.substring(0,4)){case\"rgba\":r={start:\"rgba(\",len:4,alpha:!0};break;case\"rgb(\":r={start:\"rgb(\",len:3,alpha:!1};break;default:return!1}if(new RegExp(\".*?(\\\\.).*(,)\").test(t))throw new Error(\"color expects integers for rgb in rgb/rgba tuple, received \"+t);if(e=t.replace(r.start,\"\").replace(\")\",\"\").split(\",\").map(parseFloat),e.length!==r.len)throw new Error(\"color expects rgba \"+expect_len+\"-tuple, received \"+t);if(r.alpha&&!(0<=(n=e[3])&&n<=1))throw new Error(\"color expects rgba 4-tuple to have alpha value between 0 and 1\");if(i.call(function(){var t,r,n,i;for(n=e.slice(0,3),i=[],t=0,r=n.length;t<r;t++)o=n[t],i.push(0<=o&&o<=255);return i}(),!1)>=0)throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(21),i=t(27),o=t(41),s=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var r=this._existing(t);null==r?this._dict[t]=e:o.isArray(r)?r.push(e):this._dict[t]=[r,e]},t.prototype.remove_value=function(t,e){var r=this._existing(t);if(o.isArray(r)){var s=n.difference(r,[e]);s.length>0?this._dict[t]=s:delete this._dict[t]}else i.isEqual(r,e)&&delete this._dict[t]},t.prototype.get_one=function(t,e){var r=this._existing(t);if(o.isArray(r)){if(1===r.length)return r[0];throw new Error(e)}return r},t}();r.MultiDict=s;var a=function(){function t(e){null==e?this.values=[]:e instanceof t?this.values=n.copy(e.values):this.values=this._compact(e)}return t.prototype._compact=function(t){for(var e=[],r=0,n=t;r<n.length;r++){var i=n[r];e.indexOf(i)===-1&&e.push(i)}return e},t.prototype.push=function(t){this.missing(t)&&this.values.push(t)},t.prototype.remove=function(t){var e=this.values.indexOf(t);this.values=this.values.slice(0,e).concat(this.values.slice(e+1))},t.prototype.length=function(){return this.values.length},t.prototype.includes=function(t){return this.values.indexOf(t)!=-1},t.prototype.missing=function(t){return!this.includes(t)},t.prototype.slice=function(t,e){return this.values.slice(t,e)},t.prototype.join=function(t){return this.values.join(t)},t.prototype.toString=function(){return this.join(\", \")},t.prototype.union=function(e){return e=new t(e),new t(this.values.concat(e.values))},t.prototype.intersect=function(e){e=new t(e);for(var r=new t,n=0,i=e.values;n<i.length;n++){var o=i[n];this.includes(o)&&e.includes(o)&&r.push(o)}return r},t.prototype.diff=function(e){e=new t(e);for(var r=new t,n=0,i=this.values;n<i.length;n++){var o=i[n];e.missing(o)&&r.push(o)}return r},t}();r.Set=a},function(t,e,r){\"use strict\";function n(t,e,r,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;var a=s.call(t);if(a!==s.call(e))return!1;switch(a){case\"[object RegExp]\":case\"[object String]\":return\"\"+t==\"\"+e;case\"[object Number]\":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case\"[object Date]\":case\"[object Boolean]\":return+t===+e}var l=\"[object Array]\"===a;if(!l){if(\"object\"!=typeof t||\"object\"!=typeof e)return!1;var u=t.constructor,c=e.constructor;if(u!==c&&!(o.isFunction(u)&&u instanceof u&&o.isFunction(c)&&c instanceof c)&&\"constructor\"in t&&\"constructor\"in e)return!1}r=r||[],i=i||[];for(var _=r.length;_--;)if(r[_]===t)return i[_]===e;if(r.push(t),i.push(e),l){if(_=t.length,_!==e.length)return!1;for(;_--;)if(!n(t[_],e[_],r,i))return!1}else{var h=Object.keys(t),p=void 0;if(_=h.length,Object.keys(e).length!==_)return!1;for(;_--;)if(p=h[_],!e.hasOwnProperty(p)||!n(t[p],e[p],r,i))return!1}return r.pop(),i.pop(),!0}function i(t,e){return n(t,e)}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(41),s=Object.prototype.toString;r.isEqual=i},function(t,e,r){\"use strict\";function n(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}function i(t,e){return Math.abs(n(t-e))}function o(t,e,r,o){var s=n(t),a=i(e,r),l=i(e,s)<=a&&i(s,r)<=a;return\"anticlock\"==o?l:!l}function s(){return Math.random()}function a(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}function l(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function u(t,e){for(var r,n;;)if(r=s(),n=s(),n=(2*n-1)*Math.sqrt(2*(1/Math.E)),-4*r*r*Math.log(r)>=n*n)break;var i=n/r;return i=t+e*i}function c(t,e,r){return t>r?r:t<e?e:t}Object.defineProperty(r,\"__esModule\",{value:!0}),r.angle_norm=n,r.angle_dist=i,r.angle_between=o,r.random=s,r.randomIn=a,r.atan2=l,r.rnorm=u,r.clamp=c},function(t,e,r){\"use strict\";function n(t){for(var e=Object.keys(t),r=e.length,n=new Array(r),i=0;i<r;i++)n[i]=t[e[i]];return n}function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,i=e;n<i.length;n++){var o=i[n];for(var s in o)o.hasOwnProperty(s)&&(t[s]=o[s])}return t}function o(t){return i({},t)}function s(t,e){for(var r=Object.create(Object.prototype),n=u.concat([Object.keys(t),Object.keys(e)]),i=0,o=n;i<o.length;i++){var s=o[i],a=t.hasOwnProperty(s)?t[s]:[],l=e.hasOwnProperty(s)?e[s]:[];r[s]=u.union(a,l)}return r}function a(t){return Object.keys(t).length}function l(t){return 0===a(t)}Object.defineProperty(r,\"__esModule\",{value:!0});var u=t(21);r.keys=Object.keys,r.values=n,r.extend=i,r.clone=o,r.merge=s,r.size=a,r.isEmpty=l},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=t(342);r.proj4=i;var o=t(330),s=t(336),a=t(346),l=t(355);i.defaultDatum=\"WGS84\",i.WGS84=new o(\"WGS84\"),i.Proj=o,i.toPoint=s,i.defs=a,i.transform=l,r.mercator=a(\"GOOGLE\"),r.wgs84=a(\"WGS84\"),r.mercator_bounds={lon:[-20026376.39,20026376.39],lat:[-20048966.1,20048966.1]},n={lon:[-180,180],lat:[-85.06,85.06]},r.clip_mercator=function(t,e,n){var i,o,s;return s=r.mercator_bounds[n],o=s[0],i=s[1],[Math.max(t,o),Math.min(e,i)]},r.in_bounds=function(t,e){return t>n[e][0]&&t<n[e][1]}},function(t,e,r){\"use strict\";function n(t,e){for(var r=Math.min(t.length,e.length),n=new Array(r),i=new Array(r),s=0;s<r;s++){var a=o.proj4(o.mercator,[t[s],e[s]]),l=a[0],u=a[1];n[s]=l,i[s]=u}return[n,i]}function i(t,e){for(var r=Math.min(t.length,e.length),i=new Array(r),o=new Array(r),s=0;s<r;s++){var a=n(t[s],e[s]),l=a[0],u=a[1];i[s]=l,o[s]=u}return[i,o]}Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(30);r.project_xy=n,r.project_xsys=i},function(t,e,r){\"use strict\";function n(t){if(!(t instanceof o.HasProps))throw new Error(\"can only create refs for HasProps subclasses\");var e={type:t.type,id:t.id};return null!=t._subtype&&(e.subtype=t._subtype),e}function i(t){if(s.isObject(t)){var e=Object.keys(t).sort();if(2==e.length)return\"id\"==e[0]&&\"type\"==e[1];if(3==e.length)return\"id\"==e[0]&&\"subtype\"==e[1]&&\"type\"==e[2]}return!1}Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(8),s=t(41);r.create_ref=n,r.is_ref=i},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.get_indices=function(t){var e;return e=t.selected,e[\"0d\"].glyph?e[\"0d\"].indices:e[\"1d\"].indices.length>0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u=t(41);r.ARRAY_TYPES={float32:Float32Array,float64:Float64Array,uint8:Uint8Array,int8:Int8Array,uint16:Uint16Array,int16:Int16Array,uint32:Uint32Array,int32:Int32Array},r.DTYPES={};for(a in r.ARRAY_TYPES)l=r.ARRAY_TYPES[a],r.DTYPES[l.name]=a;i=new ArrayBuffer(2),s=new Uint8Array(i),o=new Uint16Array(i),s[0]=170,s[1]=187,n=48042===o[0]?\"little\":\"big\",r.BYTE_ORDER=n,r.swap16=function(t){var e,r,n,i,o;for(o=new Uint8Array(t.buffer,t.byteOffset,2*t.length),e=r=0,n=o.length;r<n;e=r+=2)i=o[e],o[e]=o[e+1],o[e+1]=i;return null},r.swap32=function(t){var e,r,n,i,o;for(o=new Uint8Array(t.buffer,t.byteOffset,4*t.length),e=r=0,n=o.length;r<n;e=r+=4)i=o[e],o[e]=o[e+3],o[e+3]=i,i=o[e+1],o[e+1]=o[e+2],o[e+2]=i;return null},r.swap64=function(t){var e,r,n,i,o;for(o=new Uint8Array(t.buffer,t.byteOffset,8*t.length),e=r=0,n=o.length;r<n;e=r+=8)i=o[e],o[e]=o[e+7],o[e+7]=i,i=o[e+1],o[e+1]=o[e+6],o[e+6]=i,i=o[e+2],o[e+2]=o[e+5],o[e+5]=i,i=o[e+3],o[e+3]=o[e+4],o[e+4]=i;return null},r.process_buffer=function(t,e){var n,o,s,a,l,u,c;for(u=t.order!==r.BYTE_ORDER,c=t.shape,o=null,a=0,l=e.length;a<l;a++)if(i=e[a],s=JSON.parse(i[0]),s.id===t.__buffer__){o=i[1];break}return n=new r.ARRAY_TYPES[t.dtype](o),u&&(2===n.BYTES_PER_ELEMENT?r.swap16(n):4===n.BYTES_PER_ELEMENT?r.swap32(n):8===n.BYTES_PER_ELEMENT&&r.swap64(n)),[n,c]},r.process_array=function(t,e){return u.isObject(t)&&\"__ndarray__\"in t?r.decode_base64(t):u.isObject(t)&&\"__buffer__\"in t?r.process_buffer(t,e):u.isArray(t)?[t,[]]:void 0},r.arrayBufferToBase64=function(t){var e,r,n;return n=new Uint8Array(t),r=function(){var t,r,i;for(i=[],t=0,r=n.length;t<r;t++)e=n[t],i.push(String.fromCharCode(e));return i}(),btoa(r.join(\"\"))},r.base64ToArrayBuffer=function(t){var e,r,n,i,o,s;for(e=atob(t),o=e.length,r=new Uint8Array(o),n=i=0,s=o;0<=s?i<s:i>s;n=0<=s?++i:--i)r[n]=e.charCodeAt(n);return r.buffer},r.decode_base64=function(t){var e,n,i,o;return n=r.base64ToArrayBuffer(t.__ndarray__),i=t.dtype,i in r.ARRAY_TYPES&&(e=new r.ARRAY_TYPES[i](n)),o=t.shape,[e,o]},r.encode_base64=function(t,e){var n,i,o;return n=r.arrayBufferToBase64(t.buffer),o=r.DTYPES[t.constructor.name],i={__ndarray__:n,shape:e,dtype:o}},r.decode_column_data=function(t,e){var n,i,o,s,c,_,h,p,d,f,y;c={},_={};for(a in t)if(l=t[a],u.isArray(l)){if(0===l.length||!u.isObject(l[0])&&!u.isArray(l[0])){c[a]=l;continue}for(i=[],y=[],o=0,s=l.length;o<s;o++)h=l[o],p=r.process_array(h,e),n=p[0],f=p[1],i.push(n),y.push(f);c[a]=i,_[a]=y}else d=r.process_array(l,e),n=d[0],f=d[1],c[a]=n,_[a]=f;return[c,_]},r.encode_column_data=function(t,e){var n,i,o,s,c,_,h;s={};for(a in t){if(l=t[a],(null!=l?l.buffer:void 0)instanceof ArrayBuffer)l=r.encode_base64(l,null!=e?e[a]:void 0);else if(u.isArray(l)){for(o=[],n=i=0,c=l.length;0<=c?i<c:i>c;n=0<=c?++i:--i)(null!=(_=l[n])?_.buffer:void 0)instanceof ArrayBuffer?o.push(r.encode_base64(l[n],null!=e&&null!=(h=e[a])?h[n]:void 0)):o.push(l[n]);l=o}s[a]=l}return s}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(361),i=t(358),o=function(){function t(){}return t}();r.SpatialIndex=o;var s=function(t){function e(e){var r=t.call(this)||this;return r.index=i(),r.index.load(e),r}return n.__extends(e,t),Object.defineProperty(e.prototype,\"bbox\",{get:function(){var t=this.index.toJSON(),e=t.minX,r=t.minY,n=t.maxX,i=t.maxY;return{minX:e,minY:r,maxX:n,maxY:i}},enumerable:!0,configurable:!0}),e.prototype.search=function(t){return this.index.search(t)},e.prototype.indices=function(t){for(var e=this.search(t),r=e.length,n=new Array(r),i=0;i<r;i++)n[i]=e[i].i;return n},e}(o);r.RBush=s},function(t,e,r){\"use strict\";function n(t,e,r){return void 0===r&&(r=0),t.substr(r,e.length)==e}function i(){for(var t=new Array(32),e=\"0123456789ABCDEF\",r=0;r<32;r++)t[r]=e.substr(Math.floor(16*Math.random()),1);return t[12]=\"4\",t[16]=e.substr(3&t[16].charCodeAt(0)|8,1),t.join(\"\")}function o(t){var e=a.settings.dev?\"j\"+l++:i();return null!=t?t+\"-\"+e:e}function s(t){return t.replace(/(?:[&<>\"'`])/g,function(t){switch(t){case\"&\":return\"&amp;\";case\"<\":return\"&lt;\";case\">\":return\"&gt;\";case'\"':return\"&quot;\";case\"'\":return\"&#x27;\";case\"`\":return\"&#x60;\";default:return t}})}Object.defineProperty(r,\"__esModule\",{value:!0});var a=t(18);r.startsWith=n,r.uuid4=i;var l=1e3;r.uniqueId=o,r.escape=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.indianred=\"#CD5C5C\",r.lightcoral=\"#F08080\",r.salmon=\"#FA8072\",r.darksalmon=\"#E9967A\",r.lightsalmon=\"#FFA07A\",r.crimson=\"#DC143C\",r.red=\"#FF0000\",r.firebrick=\"#B22222\",r.darkred=\"#8B0000\",r.pink=\"#FFC0CB\",r.lightpink=\"#FFB6C1\",r.hotpink=\"#FF69B4\",r.deeppink=\"#FF1493\",r.mediumvioletred=\"#C71585\",r.palevioletred=\"#DB7093\",r.coral=\"#FF7F50\",r.tomato=\"#FF6347\",r.orangered=\"#FF4500\",r.darkorange=\"#FF8C00\",r.orange=\"#FFA500\",r.gold=\"#FFD700\",r.yellow=\"#FFFF00\",r.lightyellow=\"#FFFFE0\",r.lemonchiffon=\"#FFFACD\",r.lightgoldenrodyellow=\"#FAFAD2\",r.papayawhip=\"#FFEFD5\",r.moccasin=\"#FFE4B5\",r.peachpuff=\"#FFDAB9\",r.palegoldenrod=\"#EEE8AA\",r.khaki=\"#F0E68C\",r.darkkhaki=\"#BDB76B\",r.lavender=\"#E6E6FA\",r.thistle=\"#D8BFD8\",r.plum=\"#DDA0DD\",r.violet=\"#EE82EE\",r.orchid=\"#DA70D6\",r.fuchsia=\"#FF00FF\",r.magenta=\"#FF00FF\",r.mediumorchid=\"#BA55D3\",r.mediumpurple=\"#9370DB\",r.blueviolet=\"#8A2BE2\",r.darkviolet=\"#9400D3\",r.darkorchid=\"#9932CC\",r.darkmagenta=\"#8B008B\",r.purple=\"#800080\",r.indigo=\"#4B0082\",r.slateblue=\"#6A5ACD\",r.darkslateblue=\"#483D8B\",r.mediumslateblue=\"#7B68EE\",r.greenyellow=\"#ADFF2F\",r.chartreuse=\"#7FFF00\",r.lawngreen=\"#7CFC00\",r.lime=\"#00FF00\",r.limegreen=\"#32CD32\",r.palegreen=\"#98FB98\",r.lightgreen=\"#90EE90\",r.mediumspringgreen=\"#00FA9A\",r.springgreen=\"#00FF7F\",r.mediumseagreen=\"#3CB371\",r.seagreen=\"#2E8B57\",r.forestgreen=\"#228B22\",r.green=\"#008000\",r.darkgreen=\"#006400\",r.yellowgreen=\"#9ACD32\",r.olivedrab=\"#6B8E23\",r.olive=\"#808000\",r.darkolivegreen=\"#556B2F\",r.mediumaquamarine=\"#66CDAA\",r.darkseagreen=\"#8FBC8F\",r.lightseagreen=\"#20B2AA\",r.darkcyan=\"#008B8B\",r.teal=\"#008080\",r.aqua=\"#00FFFF\",r.cyan=\"#00FFFF\",r.lightcyan=\"#E0FFFF\",r.paleturquoise=\"#AFEEEE\",r.aquamarine=\"#7FFFD4\",r.turquoise=\"#40E0D0\",r.mediumturquoise=\"#48D1CC\",r.darkturquoise=\"#00CED1\",r.cadetblue=\"#5F9EA0\",r.steelblue=\"#4682B4\",r.lightsteelblue=\"#B0C4DE\",r.powderblue=\"#B0E0E6\",r.lightblue=\"#ADD8E6\",r.skyblue=\"#87CEEB\",r.lightskyblue=\"#87CEFA\",r.deepskyblue=\"#00BFFF\",r.dodgerblue=\"#1E90FF\",r.cornflowerblue=\"#6495ED\",r.royalblue=\"#4169E1\",r.blue=\"#0000FF\",r.mediumblue=\"#0000CD\",r.darkblue=\"#00008B\",r.navy=\"#000080\",r.midnightblue=\"#191970\",r.cornsilk=\"#FFF8DC\",r.blanchedalmond=\"#FFEBCD\",r.bisque=\"#FFE4C4\",r.navajowhite=\"#FFDEAD\",r.wheat=\"#F5DEB3\",r.burlywood=\"#DEB887\",r.tan=\"#D2B48C\",r.rosybrown=\"#BC8F8F\",r.sandybrown=\"#F4A460\",r.goldenrod=\"#DAA520\",r.darkgoldenrod=\"#B8860B\",r.peru=\"#CD853F\",r.chocolate=\"#D2691E\",r.saddlebrown=\"#8B4513\",r.sienna=\"#A0522D\",r.brown=\"#A52A2A\",r.maroon=\"#800000\",r.white=\"#FFFFFF\",r.snow=\"#FFFAFA\",r.honeydew=\"#F0FFF0\",r.mintcream=\"#F5FFFA\",r.azure=\"#F0FFFF\",r.aliceblue=\"#F0F8FF\",r.ghostwhite=\"#F8F8FF\",r.whitesmoke=\"#F5F5F5\",r.seashell=\"#FFF5EE\",r.beige=\"#F5F5DC\",r.oldlace=\"#FDF5E6\",r.floralwhite=\"#FFFAF0\",r.ivory=\"#FFFFF0\",r.antiquewhite=\"#FAEBD7\",r.linen=\"#FAF0E6\",r.lavenderblush=\"#FFF0F5\",r.mistyrose=\"#FFE4E1\",r.gainsboro=\"#DCDCDC\",r.lightgray=\"#D3D3D3\",r.lightgrey=\"#D3D3D3\",r.silver=\"#C0C0C0\",r.darkgray=\"#A9A9A9\",r.darkgrey=\"#A9A9A9\",r.gray=\"#808080\",r.grey=\"#808080\",r.dimgray=\"#696969\",r.dimgrey=\"#696969\",r.lightslategray=\"#778899\",r.lightslategrey=\"#778899\",r.slategray=\"#708090\",r.slategrey=\"#708090\",r.darkslategray=\"#2F4F4F\",r.darkslategrey=\"#2F4F4F\",r.black=\"#000000\"},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=t(359),o=t(329),s=t(360),a=t(36),l=t(41);n=function(t){var e;return l.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return\"%d\";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),i.sprintf(e,t)):\"\"+t},r.replace_placeholders=function(t,e,r,l,u){return null==u&&(u={}),t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t){return function(t,e,r){return e+\"@$\"+r}}(this)),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,c,_,h,p){var d,f,y;if(_=null!=h?h:_,y=\"$\"===_[0]?u[_.substring(1)]:null!=(d=e.get_column(_))?d[r]:void 0,f=null,null==y)f=\"???\";else{if(\"safe\"===p)return\"\"+c+y;if(null!=p)if(null!=l&&_ in l)if(\"numeral\"===l[_])f=o.format(y,p);else if(\"datetime\"===l[_])f=s(y,p);else{if(\"printf\"!==l[_])throw new Error(\"Unknown tooltip field formatter type '\"+l[_]+\"'\");f=i.sprintf(p,y)}else f=o.format(y,p);else f=n(y)}return f=\"\"+c+a.escape(f)}}(this))}},function(t,e,r){\"use strict\";function n(t){if(null!=o[t])return o[t];var e=i.span({style:{font:t}},\"Hg\"),r=i.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),n=i.div({},e,r);document.body.appendChild(n);try{r.style.verticalAlign=\"baseline\";var s=i.offset(r).top-i.offset(e).top;r.style.verticalAlign=\"bottom\";var a=i.offset(r).top-i.offset(e).top,l={height:a,ascent:s,descent:a-s};return o[t]=l,l}finally{document.body.removeChild(n)}}Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(5),o={};r.get_text_height=n},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i;n=function(t){return t()},i=(\"undefined\"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||n,r.throttle=function(t,e){var r,n,o,s,a,l,u,c;return l=[null,null,null,null],n=l[0],r=l[1],c=l[2],u=l[3],a=0,s=!1,o=function(){return a=new Date,c=null,s=!1,u=t.apply(n,r)},function(){var t,l;return t=new Date,l=e-(t-a),n=this,r=arguments,l<=0&&!s?(clearTimeout(c),s=!0,i(o)):c||s||(c=setTimeout(function(){return i(o)},l)),u}}},function(t,e,r){\"use strict\";function n(t){return t===!0||t===!1||\"[object Boolean]\"===_.call(t)}function i(t){return\"[object Number]\"===_.call(t)}function o(t){return i(t)&&isFinite(t)&&Math.floor(t)===t}function s(t){return\"[object String]\"===_.call(t)}function a(t){return i(t)&&t!==+t}function l(t){return\"[object Function]\"===_.call(t)}function u(t){return Array.isArray(t)}function c(t){var e=typeof t;return\"function\"===e||\"object\"===e&&!!t}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var _=Object.prototype.toString;r.isBoolean=n,r.isNumber=i,r.isInteger=o,r.isString=s,r.isStrictNaN=a,r.isFunction=l,r.isArray=u,r.isObject=c},function(t,e,r){\"use strict\";function n(t){var e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}function i(t){var e=t.offsetParent||document.body;return n(e)||n(t)||16}function o(t){return t.clientHeight}function s(t){var e=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:e*=i(t.target);break;case t.DOM_DELTA_PAGE:e*=o(t.target)}return e}/*!\n",
" * jQuery Mousewheel 3.1.13\n",
" *\n",
" * Copyright jQuery Foundation and other contributors\n",
" * Released under the MIT license\n",
" * http://jquery.org/license\n",
" */\n",
" Object.defineProperty(r,\"__esModule\",{value:!0}),r.getDeltaY=s},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(28);r.scale_highlow=function(t,e,r){var n,i,o,s,a,l;return null==r&&(r=null),o=[t.start,t.end],i=o[0],n=o[1],s=null!=r?r:(n+i)/2,a=i-(i-s)*e,l=n-(n-s)*e,[a,l]},r.get_info=function(t,e){var r,n,i,o,s,a,l,u;l=e[0],u=e[1],n={};for(i in t)s=t[i],o=s.v_invert([l,u]),a=o[0],r=o[1],n[i]={start:a,end:r};return n},r.scale_range=function(t,e,i,o,s){var a,l,u,c,_,h,p,d,f,y;return null==i&&(i=!0),null==o&&(o=!0),null==s&&(s=null),e=n.clamp(e,-.9,.9),a=i?e:0,l=r.scale_highlow(t.h_range,a,null!=s?s.x:void 0),_=l[0],h=l[1],f=r.get_info(t.xscales,[_,h]),c=o?e:0,u=r.scale_highlow(t.v_range,c,null!=s?s.y:void 0),p=u[0],d=u[1],y=r.get_info(t.yscales,[p,d]),{xrs:f,yrs:y,factor:e}}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(19),s=t(36);r.View=function(){function t(t){var e;if(null==t&&(t={}),this.removed=new o.Signal(this,\"removed\"),null==t.model)throw new Error(\"model of a view wasn't configured\");this.model=t.model,this._parent=t.parent,this.id=null!=(e=t.id)?e:s.uniqueId(),this.initialize(t)}return n(t.prototype,o.Signalable),t.getters=function(t){var e,r,n;n=[];for(r in t)e=t[r],n.push(Object.defineProperty(this.prototype,r,{get:e}));return n},t.prototype.initialize=function(t){},t.prototype.remove=function(){return this._parent=void 0,this.disconnect_signals(),this.removed.emit()},t.prototype.toString=function(){return this.model.type+\"View(\"+this.id+\")\"},t.getters({parent:function(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")},is_root:function(){return null===this.parent},root:function(){return this.is_root?this:this.parent.root}}),t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return o.Signal.disconnectReceiver(this)},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(15),a=t(25);n=function(){function t(t,e){var r,n,i,o,s;for(null==e&&(e=\"\"),this.obj=t,this.prefix=e,this.cache={},n=t.properties[e+this.do_attr].spec,this.doit=null!==n.value,s=this.attrs,i=0,o=s.length;i<o;i++)r=s[i],this[r]=t.properties[e+r]}return t.prototype.warm_cache=function(t){var e,r,n,i,o,s;for(o=this.attrs,s=[],r=0,n=o.length;r<n;r++)e=o[r],i=this.obj.properties[this.prefix+e],void 0!==i.spec.value?s.push(this.cache[e]=i.spec.value):s.push(this.cache[e+\"_array\"]=i.array(t));return s},t.prototype.cache_select=function(t,e){var r;return r=this.obj.properties[this.prefix+t],void 0!==r.spec.value?this.cache[t]=r.spec.value:this.cache[t]=this.cache[t+\"_array\"][e]},t.prototype.set_vectorize=function(t,e){return null!=this.all_indices?this._set_vectorize(t,this.all_indices[e]):this._set_vectorize(t,e)},t}(),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.line()),e.prototype.do_attr=\"line_color\",e.prototype.set_value=function(t){return t.strokeStyle=this.line_color.value(),t.globalAlpha=this.line_alpha.value(),t.lineWidth=this.line_width.value(),t.lineJoin=this.line_join.value(),t.lineCap=this.line_cap.value(),t.setLineDash(this.line_dash.value()),t.setLineDashOffset(this.line_dash_offset.value())},e.prototype._set_vectorize=function(t,e){if(this.cache_select(\"line_color\",e),t.strokeStyle!==this.cache.line_color&&(t.strokeStyle=this.cache.line_color),this.cache_select(\"line_alpha\",e),t.globalAlpha!==this.cache.line_alpha&&(t.globalAlpha=this.cache.line_alpha),this.cache_select(\"line_width\",e),t.lineWidth!==this.cache.line_width&&(t.lineWidth=this.cache.line_width),this.cache_select(\"line_join\",e),t.lineJoin!==this.cache.line_join&&(t.lineJoin=this.cache.line_join),this.cache_select(\"line_cap\",e),t.lineCap!==this.cache.line_cap&&(t.lineCap=this.cache.line_cap),this.cache_select(\"line_dash\",e),t.getLineDash()!==this.cache.line_dash&&t.setLineDash(this.cache.line_dash),this.cache_select(\"line_dash_offset\",e),t.getLineDashOffset()!==this.cache.line_dash_offset)return t.setLineDashOffset(this.cache.line_dash_offset)},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.line_color.value(),this.line_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e}(n),r.Fill=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.fill()),e.prototype.do_attr=\"fill_color\",e.prototype.set_value=function(t){return t.fillStyle=this.fill_color.value(),t.globalAlpha=this.fill_alpha.value()},e.prototype._set_vectorize=function(t,e){if(this.cache_select(\"fill_color\",e),t.fillStyle!==this.cache.fill_color&&(t.fillStyle=this.cache.fill_color),this.cache_select(\"fill_alpha\",e),t.globalAlpha!==this.cache.fill_alpha)return t.globalAlpha=this.cache.fill_alpha},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.fill_color.value(),this.fill_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e}(n),r.Text=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.text()),e.prototype.do_attr=\"text_color\",e.prototype.cache_select=function(t,r){var n;return\"font\"===t?(n=e.__super__.cache_select.call(this,\"text_font_style\",r)+\" \"+e.__super__.cache_select.call(this,\"text_font_size\",r)+\" \"+e.__super__.cache_select.call(this,\"text_font\",r),this.cache.font=n):e.__super__.cache_select.call(this,t,r)},e.prototype.font_value=function(){var t,e,r;return t=this.text_font.value(),e=this.text_font_size.value(),r=this.text_font_style.value(),r+\" \"+e+\" \"+t},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.text_color.value(),this.text_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e.prototype.set_value=function(t){return t.font=this.font_value(),t.fillStyle=this.text_color.value(),t.globalAlpha=this.text_alpha.value(),t.textAlign=this.text_align.value(),t.textBaseline=this.text_baseline.value()},e.prototype._set_vectorize=function(t,e){if(this.cache_select(\"font\",e),t.font!==this.cache.font&&(t.font=this.cache.font),this.cache_select(\"text_color\",e),t.fillStyle!==this.cache.text_color&&(t.fillStyle=this.cache.text_color),this.cache_select(\"text_alpha\",e),t.globalAlpha!==this.cache.text_alpha&&(t.globalAlpha=this.cache.text_alpha),this.cache_select(\"text_align\",e),t.textAlign!==this.cache.text_align&&(t.textAlign=this.cache.text_align),this.cache_select(\"text_baseline\",e),t.textBaseline!==this.cache.text_baseline)return t.textBaseline=this.cache.text_baseline},e}(n),r.Visuals=function(){function t(t){var e,n,i,o,s,a,l,u,c;for(a=t.mixins,n=0,i=a.length;n<i;n++)c=a[n],l=c.split(\":\"),o=l[0],s=null!=(u=l[1])?u:\"\",e=function(){switch(o){case\"line\":return r.Line;case\"fill\":return r.Fill;case\"text\":return r.Text}}(),this[s+o]=new e(t,s)}return t.prototype.warm_cache=function(t){var e,r,i,s;i=this,s=[];for(e in i)o.call(i,e)&&(r=i[e],r instanceof n?s.push(r.warm_cache(t)):s.push(void 0));return s},t.prototype.set_all_indices=function(t){var e,r,i,s;i=this,s=[];for(e in i)o.call(i,e)&&(r=i[e],r instanceof n?s.push(r.all_indices=t):s.push(void 0));return s},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(0),l=t(245),u=t(13),c=t(8),_=t(19),h=t(32),p=t(34),d=t(26),f=t(21),y=t(29),m=t(27),v=t(41),g=t(136),b=t(170);n=function(){function t(t){this.document=t,this.session=null,this.subscribed_models=new d.Set}return t.prototype.send_event=function(t){var e;return null!=(e=this.session)?e.send_event(t):void 0},t.prototype.trigger=function(t){var e,r,n,i,o,s;for(o=this.subscribed_models.values,s=[],e=0,r=o.length;e<r;e++)i=o[e],null!==t.model_id&&t.model_id!==i||(n=this.document._all_models[i],s.push(null!=n?n._process_event(t):void 0));return s},t}(),r.DocumentChangedEvent=function(){function t(t){this.document=t}return t}(),r.ModelChangedEvent=function(t){function e(t,r,n,i,o,s){this.document=t,this.model=r,this.attr=n,this.old=i,this.new_=o,this.setter_id=s,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){var e,r,n,i;if(\"id\"===this.attr)throw u.logger.warn(\"'id' field is immutable and should never be in a ModelChangedEvent \",this),new Error(\"'id' field should never change, whatever code just set it is wrong\");r=this.new_,n=this.model.constructor._value_to_json(this.attr,r,this.model),i={},c.HasProps._value_record_references(r,i,!0),this.model.id in i&&this.model!==r&&delete i[this.model.id];for(e in i)t[e]=i[e];return{kind:\"ModelChanged\",model:this.model.ref(),attr:this.attr,\"new\":n}},e}(r.DocumentChangedEvent),r.TitleChangedEvent=function(t){function e(t,r,n){this.document=t,this.title=r,this.setter_id=n,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return{kind:\"TitleChanged\",title:this.title}},e}(r.DocumentChangedEvent),r.RootAddedEvent=function(t){function e(t,r,n){this.document=t,this.model=r,this.setter_id=n,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return c.HasProps._value_record_references(this.model,t,!0),{kind:\"RootAdded\",model:this.model.ref()}},e}(r.DocumentChangedEvent),r.RootRemovedEvent=function(t){function e(t,r,n){this.document=t,this.model=r,this.setter_id=n,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return{kind:\"RootRemoved\",model:this.model.ref()}},e}(r.DocumentChangedEvent),r.documents=[],r.DEFAULT_TITLE=\"Bokeh Application\",r.Document=function(){function t(){r.documents.push(this),this._title=r.DEFAULT_TITLE,this._roots=[],this._all_models={},this._all_models_by_name=new d.MultiDict,this._all_models_freeze_count=0,this._callbacks=[],this.event_manager=new n(this),this.idle=new _.Signal(this,\"idle\"),this._idle_roots=new WeakMap}return Object.defineProperty(t.prototype,\"layoutables\",{get:function(){var t,e,r,n,i;for(r=this._roots,n=[],t=0,e=r.length;t<e;t++)i=r[t],i instanceof g.LayoutDOM&&n.push(i);return n}}),Object.defineProperty(t.prototype,\"is_idle\",{get:function(){var t,e,r,n;for(r=this.layoutables,t=0,e=r.length;t<e;t++)if(n=r[t],!this._idle_roots.has(n))return!1;return!0}}),t.prototype.notify_idle=function(t){if(this._idle_roots.set(t,!0),this.is_idle)return this.idle.emit()},t.prototype.clear=function(){var t;this._push_all_models_freeze();try{for(t=[];this._roots.length>0;)t.push(this.remove_root(this._roots[0]));return t}finally{this._pop_all_models_freeze()}},t.prototype.destructively_move=function(t){var e,r,n,i,o,s,a,l,u;if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");for(t.clear(),u=[],l=this._roots,e=0,n=l.length;e<n;e++)a=l[e],u.push(a);for(this.clear(),r=0,i=u.length;r<i;r++)if(a=u[r],null!==a.document)throw new Error(\"Somehow we didn't detach \"+a);if(0!==Object.keys(this._all_models).length)throw new Error(\"@_all_models still had stuff in it: \"+this._all_models);for(s=0,o=u.length;s<o;s++)a=u[s],t.add_root(a);return t.set_title(this._title)},t.prototype._push_all_models_freeze=function(){return this._all_models_freeze_count+=1},t.prototype._pop_all_models_freeze=function(){if(this._all_models_freeze_count-=1,0===this._all_models_freeze_count)return this._recompute_all_models()},t.prototype._invalidate_all_models=function(){if(u.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count)return this._recompute_all_models()},t.prototype._recompute_all_models=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,f,m,v,g,b,w,x,k;for(_=new d.Set,v=this._roots,r=0,i=v.length;r<i;r++)f=v[r],_=_.union(f.references());for(p=new d.Set(y.values(this._all_models)),k=p.diff(_),x=_.diff(p),m={},g=_.values,n=0,o=g.length;n<o;n++)l=g[n],m[l.id]=l;for(b=k.values,u=0,s=b.length;u<s;u++)e=b[u],e.detach_document(),c=e.name,null!==c&&this._all_models_by_name.remove_value(c,e);for(w=x.values,h=0,a=w.length;h<a;h++)t=w[h],t.attach_document(this),c=t.name,null!==c&&this._all_models_by_name.add_value(c,t);return this._all_models=m},t.prototype.roots=function(){return this._roots},t.prototype.add_root=function(t,e){if(u.logger.debug(\"Adding root: \"+t),!(s.call(this._roots,t)>=0)){this._push_all_models_freeze();try{this._roots.push(t)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootAddedEvent(this,t,e))}},t.prototype.remove_root=function(t,e){var n;if(n=this._roots.indexOf(t),!(n<0)){this._push_all_models_freeze();try{this._roots.splice(n,1)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootRemovedEvent(this,t,e))}},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t,e){if(t!==this._title)return this._title=t,this._trigger_on_change(new r.TitleChangedEvent(this,t,e))},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){return this._all_models_by_name.get_one(t,\"Multiple models are named '\"+t+\"'\")},t.prototype.on_change=function(t){if(!(s.call(this._callbacks,t)>=0))return this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;if(e=this._callbacks.indexOf(t),e>=0)return this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){var e,r,n,i,o;for(i=this._callbacks,o=[],r=0,n=i.length;r<n;r++)e=i[r],o.push(e(t));return o},t.prototype._notify_change=function(t,e,n,i,o){return\"name\"===e&&(this._all_models_by_name.remove_value(n,t),null!==i&&this._all_models_by_name.add_value(i,t)),this._trigger_on_change(new r.ModelChangedEvent(this,t,e,n,i,null!=o?o.setter_id:void 0))},t._references_json=function(t,e){var r,n,i,o,s;for(null==e&&(e=!0),s=[],r=0,n=t.length;r<n;r++)i=t[r],o=i.ref(),o.attributes=i.attributes_as_json(e),delete o.attributes.id,s.push(o);return s},t._instantiate_object=function(t,e,r){var n,i;return n=y.extend({},r,{id:t}),new(i=a.Models(e))(n,{silent:!0,defer_initialization:!0})},t._instantiate_references_json=function(e,r){var n,i,o,s,a,l,u,c;for(c={},i=0,o=e.length;i<o;i++)s=e[i],l=s.id,u=s.type,a=s.attributes,l in r?n=r[l]:(n=t._instantiate_object(l,u,a),\"subtype\"in s&&n.set_subtype(s.subtype)),c[n.id]=n;return c},t._resolve_refs=function(t,e,r){var n,i,o;return o=function(t){if(h.is_ref(t)){if(t.id in e)return e[t.id];if(t.id in r)return r[t.id];throw new Error(\"reference \"+JSON.stringify(t)+\" isn't known (not in Document?)\")}return v.isArray(t)?n(t):v.isObject(t)?i(t):t},i=function(t){var e,r,n;r={};for(e in t)n=t[e],r[e]=o(n);return r},n=function(t){var e,r,n,i;for(n=[],e=0,r=t.length;e<r;e++)i=t[e],n.push(o(i));return n},o(t)},t._initialize_references_json=function(e,r,n){var i,o,s,a,l,u,_,h,p;for(h={},s=0,a=e.length;s<a;s++)l=e[s],_=l.id,u=l.attributes,p=!1,o=_ in r?r[_]:(p=!0,n[_]),u=t._resolve_refs(u,r,n),h[o.id]=[o,u,p];return i=function(t,e){var r,n,i,o,s;r={},n=function(e,i){var o,s,a,l,u,_,h,d,f,y;if(e instanceof c.HasProps){if(!(e.id in r)&&e.id in t){r[e.id]=!0,h=t[e.id],y=h[0],s=h[1],p=h[2];for(o in s)a=s[o],n(a,i);return i(e,s,p)}}else{if(v.isArray(e)){for(d=[],u=0,_=e.length;u<_;u++)a=e[u],d.push(n(a,i));return d}if(v.isObject(e)){f=[];for(l in e)a=e[l],f.push(n(a,i));return f}}},o=[];for(i in t)s=t[i],o.push(n(s[0],e));return o},i(h,function(t,e,r){if(r)return t.setv(e,{silent:!0})}),i(h,function(t,e,r){if(r)return t.finalize(e)})},t._event_for_attribute_change=function(t,e,r,n,i){var o,s;return o=n.get_model_by_id(t.id),o.attribute_is_serializable(e)?(s={kind:\"ModelChanged\",model:{id:t.id,type:t.type},attr:e,\"new\":r},c.HasProps._json_record_references(n,r,i,!0),s):null},t._events_to_sync_objects=function(e,r,n,i){var o,s,a,l,c,_,h,p,d,y,v,g,b,w,x;for(a=Object.keys(e.attributes),x=Object.keys(r.attributes),b=f.difference(a,x),o=f.difference(x,a),w=f.intersection(a,x),s=[],l=0,h=b.length;l<h;l++)c=b[l],u.logger.warn(\"Server sent key \"+c+\" but we don't seem to have it in our JSON\");for(_=0,p=o.length;_<p;_++)c=o[_],v=r.attributes[c],s.push(t._event_for_attribute_change(e,c,v,n,i));for(y=0,d=w.length;y<d;y++)c=w[y],g=e.attributes[c],v=r.attributes[c],null===g&&null===v||(null===g||null===v?s.push(t._event_for_attribute_change(e,c,v,n,i)):m.isEqual(g,v)||s.push(t._event_for_attribute_change(e,c,v,n,i)));return s.filter(function(t){return null!==t})},t._compute_patch_since_json=function(e,r){var n,i,o,s,a,l,u,c,_,h,p,d,m,v,g,b,w,x,k,M,S,T;for(w=r.to_json(l=!1),b=function(t){var e,r,n,i,o;for(o={},i=t.roots.references,e=0,r=i.length;e<r;e++)n=i[e],o[n.id]=n;return o},i=b(e),s={},o=[],m=e.roots.root_ids,u=0,_=m.length;u<_;u++)d=m[u],s[d]=i[d],o.push(d);for(x=b(w),M={},k=[],v=w.roots.root_ids,c=0,h=v.length;c<h;c++)d=v[c],M[d]=x[d],k.push(d);if(o.sort(),k.sort(),f.difference(o,k).length>0||f.difference(k,o).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");T={},n=[],g=r._all_models;for(a in g)p=g[a],a in i&&(S=t._events_to_sync_objects(i[a],x[a],r,T),n=n.concat(S));return{events:n,references:t._references_json(y.values(T),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var r,n,i,o,s,a;for(null==e&&(e=!0),s=[],o=this._roots,r=0,n=o.length;r<n;r++)i=o[r],s.push(i.id);return a=y.values(this._all_models),{title:this._title,roots:{root_ids:s,references:t._references_json(a,e)}}},t.from_json_string=function(e){var r;if(null===e||null==e)throw new Error(\"JSON string is \"+typeof e);return r=JSON.parse(e),t.from_json(r)},t.from_json=function(e){var r,n,i,o,s,a,c,_,h,p,d;if(u.logger.debug(\"Creating Document from JSON\"),\"object\"!=typeof e)throw new Error(\"JSON object has wrong type \"+typeof e);for(s=e.version,n=s.indexOf(\"+\")!==-1||s.indexOf(\"-\")!==-1,d=\"Library versions: JS (\"+l.version+\") / Python (\"+s+\")\",n||l.version===s?u.logger.debug(d):(u.logger.warn(\"JS/Python version mismatch\"),u.logger.warn(d)),p=e.roots,h=p.root_ids,_=p.references,c=t._instantiate_references_json(_,{}),t._initialize_references_json(_,{},c),r=new t,i=0,o=h.length;i<o;i++)a=h[i],r.add_root(c[a]);return r.set_title(e.title),r},t.prototype.replace_with_json=function(e){var r;return r=t.from_json(e),r.destructively_move(this)},t.prototype.create_json_patch_string=function(t){return JSON.stringify(this.create_json_patch(t))},t.prototype.create_json_patch=function(e){var r,n,i,o,s,a;for(s={},i=[],n=0,o=e.length;n<o;n++){if(r=e[n],r.document!==this)throw u.logger.warn(\"Cannot create a patch using events from a different document, event had \",r.document,\" we are \",this),new Error(\"Cannot create a patch using events from a different document\");i.push(r.json(s))}return a={events:i,references:t._references_json(y.values(s))}},t.prototype.apply_json_patch=function(e,r,n){var i,o,s,a,l,c,_,h,d,f,y,m,v,g,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F;for(E=e.references,c=e.events,A=t._instantiate_references_json(E,this._all_models),h=0,y=c.length;h<y;h++)if(l=c[h],\"model\"in l)if(v=l.model.id,v in this._all_models)A[v]=this._all_models[v];else if(!(v in A))throw u.logger.warn(\"Got an event for unknown model \",l.model),new Error(\"event model wasn't known\");k={},w={};for(_ in A)F=A[_],_ in this._all_models?k[_]=F:w[_]=F;for(t._initialize_references_json(E,k,w),j=[],f=0,m=c.length;f<m;f++)switch(l=c[f],l.kind){case\"ModelChanged\":if(M=l.model.id,!(M in this._all_models))throw new Error(\"Cannot apply patch to \"+M+\" which is not in the document\");S=this._all_models[M],i=l.attr,g=l.model.type,\"data\"===i&&\"ColumnDataSource\"===g?(O=p.decode_column_data(l[\"new\"],r),a=O[0],D=O[1],j.push(S.setv({_shapes:D,data:a},{setter_id:n}))):(F=t._resolve_refs(l[\"new\"],k,w),j.push(S.setv((x={},x[\"\"+i]=F,x),{setter_id:n})));break;case\"ColumnDataChanged\":if(s=l.column_source.id,!(s in this._all_models))throw new Error(\"Cannot stream to \"+s+\" which is not in the document\");if(o=this._all_models[s],P=p.decode_column_data(l[\"new\"],r),a=P[0],D=P[1],null!=l.cols){for(d in o.data)d in a||(a[d]=o.data[d]);for(d in o._shapes)d in D||(D[d]=o._shapes[d])}j.push(o.setv({_shapes:D,data:a},{setter_id:n,check_eq:!1}));break;case\"ColumnsStreamed\":if(s=l.column_source.id,!(s in this._all_models))throw new Error(\"Cannot stream to \"+s+\" which is not in the document\");if(o=this._all_models[s],!(o instanceof b.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");a=l.data,z=l.rollover,j.push(o.stream(a,z));break;case\"ColumnsPatched\":if(s=l.column_source.id,!(s in this._all_models))throw new Error(\"Cannot patch \"+s+\" which is not in the document\");if(o=this._all_models[s],!(o instanceof b.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");T=l.patches,j.push(o.patch(T));break;case\"RootAdded\":C=l.model.id,N=A[C],j.push(this.add_root(N,n));break;case\"RootRemoved\":C=l.model.id,N=A[C],j.push(this.remove_root(N,n));break;case\"TitleChanged\":j.push(this.set_title(l.title,n));break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(l))}return j},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u,c,_,h,p,d=t(0),f=t(1),y=t(13),m=t(46),v=t(5),g=t(243);r.BOKEH_ROOT=\"bk-root\",o=function(t,e){if(e.buffers.length>0?t.consume(e.buffers[0].buffer):t.consume(e.content.data),e=t.message,null!=e)return this.apply_json_patch(e.content,e.buffers)},u=function(t,e,r){var n;if(t===r.target_name)return n=new g.Receiver,r.on_msg(o.bind(e,n))},s=function(t,e){var r,n,i,s,a,l;if(\"undefined\"==typeof Jupyter||null===Jupyter||null==Jupyter.notebook.kernel)return console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function\");y.logger.info(\"Registering Jupyter comms for target \"+t),r=Jupyter.notebook.kernel.comm_manager,l=function(r){return u(t,e,r)},a=r.comms;for(i in a)s=a[i],s.then(l);try{return r.register_target(t,function(r,n){var i;return y.logger.info(\"Registering Jupyter comms for target \"+t),i=new g.Receiver,r.on_msg(o.bind(e,i))})}catch(c){return n=c,y.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+n+\")\")}},n=function(t){var e;return e=new t.default_view({model:t,parent:null}),d.index[t.id]=e,e},a=function(t,e,r){var i,o,s,a,l,u,c;c={},l=function(e){var r;return r=n(e),r.renderTo(t),c[e.id]=r},u=function(e){var r;if(e.id in c)return r=c[e.id],t.removeChild(r.el),delete c[e.id],delete d.index[e.id]},a=e.roots();for(i=0,o=a.length;i<o;i++)s=a[i],l(s);return r&&(window.document.title=e.title()),e.on_change(function(t){return t instanceof m.RootAddedEvent?l(t.model):t instanceof m.RootRemovedEvent?u(t.model):r&&t instanceof m.TitleChangedEvent?window.document.title=t.title:void 0}),c},h=function(t,e,r){var i,o;if(i=r.get_model_by_id(e),null==i)throw new Error(\"Model \"+e+\" was not in document \"+r);return o=n(i),o.renderTo(t,!0)},r.add_document_static=function(t,e,r){return a(t,e,r)},r.add_document_standalone=function(t,e,r){return null==r&&(r=!1),a(e,t,r)},l={},i=function(t,e,r){var n;if(null==t)throw new Error(\"Missing websocket_url\");return t in l||(l[t]={}),n=l[t],e in n||(n[e]=f.pull_session(t,e,r)),n[e]},c=function(t,e,r,n){var o,s;return o=window.location.search.substr(1),s=i(e,r,o),s.then(function(e){return a(t,e.document,n)},function(t){throw y.logger.error(\"Failed to load Bokeh session \"+r+\": \"+t),t})},_=function(t,e,r,o){var s,a;return s=window.location.search.substr(1),a=i(e,o,s),a.then(function(e){var i,o;if(i=e.document.get_model_by_id(r),null==i)throw new Error(\"Did not find model \"+r+\" in session\");return o=n(i),o.renderTo(t,!0)},function(t){throw y.logger.error(\"Failed to load Bokeh session \"+o+\": \"+t),t})},r.inject_css=function(t){var e;return e=v.link({href:t,rel:\"stylesheet\",type:\"text/css\"}),document.body.appendChild(e)},r.inject_raw_css=function(t){var e;return e=v.style({},t),document.body.appendChild(e)},p=function(t,e){var r;return r=t.dataset,null!=r.bokehLogLevel&&r.bokehLogLevel.length>0&&y.set_log_level(r.bokehLogLevel),null!=r.bokehDocId&&r.bokehDocId.length>0&&(e.docid=r.bokehDocId),null!=r.bokehModelId&&r.bokehModelId.length>0&&(e.modelid=r.bokehModelId),null!=r.bokehSessionId&&r.bokehSessionId.length>0&&(e.sessionid=r.bokehSessionId),y.logger.info(\"Will inject Bokeh script tag with params \"+JSON.stringify(e))},r.embed_items=function(t,e,n,i){var o,a,l,u,d,f,g,b,w,x,k,M,S,T,O;M=\"ws:\",\"https:\"===window.location.protocol&&(M=\"wss:\"),null!=i?(x=document.createElement(\"a\"),x.href=i):x=window.location,null!=n?\"/\"===n&&(n=\"\"):n=x.pathname.replace(/\\/+$/,\"\"),O=M+\"//\"+x.host+n+\"/ws\",y.logger.debug(\"embed: computed ws url: \"+O),u={};for(l in t)u[l]=m.Document.from_json(t[l]);for(S=[],g=0,w=e.length;g<w;g++){if(b=e[g],null!=b.notebook_comms_target&&s(b.notebook_comms_target,u[l]),f=b.elementid,d=document.getElementById(f),null==d)throw new Error(\"Error rendering Bokeh model: could not find tag with id: \"+f);if(!document.body.contains(d))throw new Error(\"Error rendering Bokeh model: element with id '\"+f+\"' must be under <body>\");if(\"SCRIPT\"===d.tagName&&(p(d,b),a=v.div({\"class\":r.BOKEH_ROOT}),v.replaceWith(d,a),o=v.div(),a.appendChild(o),d=o),T=null!=b.use_for_title&&b.use_for_title,k=null,null!=b.modelid)if(null!=b.docid)h(d,b.modelid,u[b.docid]);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh model \"+b.modelid+\" to element \"+f+\": no document ID or session ID specified\");k=_(d,O,b.modelid,b.sessionid)}else if(null!=b.docid)r.add_document_static(d,u[b.docid],T);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh document to element \"+f+\": no document ID or session ID specified\");k=c(d,O,b.sessionid,T)}null!==k?S.push(k.then(function(t){return console.log(\"Bokeh items were rendered successfully\")},function(t){return console.log(\"Error rendering Bokeh items \",t)})):S.push(void 0)}return S}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),t(241);var n=t(245);r.version=n.version;var i=t(47);r.embed=i;var o=t(13);r.logger=o.logger,r.set_log_level=o.set_log_level;var s=t(18);r.settings=s.settings;var a=t(0);r.Models=a.Models,r.index=a.index;var l=t(46);r.documents=l.documents;var u=t(244);r.safely=u.safely},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(8),s=t(14),a=t(41),l=t(29),u=t(13);r.Model=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Model\",e.define({tags:[s.Array,[]],name:[s.String],js_property_callbacks:[s.Any,{}],js_event_callbacks:[s.Any,{}],subscribed_events:[s.Array,[]]}),e.prototype.connect_signals=function(){var t,r,n,i,o,s,a,l,u;e.__super__.connect_signals.call(this),a=this.js_property_callbacks;for(i in a)for(r=a[i],l=i.split(\":\"),i=l[0],t=null!=(u=l[1])?u:null,o=0,s=r.length;o<s;o++)n=r[o],null!==t?this.connect(this.properties[t][i],function(){return n.execute(this)}):this.connect(this[i],function(){return n.execute(this)});return this.connect(this.properties.js_event_callbacks.change,function(){return this._update_event_callbacks}),this.connect(this.properties.subscribed_events.change,function(){return this._update_event_callbacks})},e.prototype._process_event=function(t){var e,r,n,i,o;if(t.is_applicable_to(this)){for(t=t._customize_event(this),o=null!=(i=this.js_event_callbacks[t.event_name])?i:[],r=0,n=o.length;r<n;r++)e=o[r],e.execute(t,{});if(this.subscribed_events.some(function(e){return e===t.event_name}))return this.document.event_manager.send_event(t)}},e.prototype.trigger_event=function(t){var e;return null!=(e=this.document)?e.event_manager.trigger(t.set_model_id(this.id)):void 0},e.prototype._update_event_callbacks=function(){return null==this.document?void u.logger.warn(\"WARNING: Document not defined for updating event callbacks\"):this.document.event_manager.subscribed_models.push(this.id)},e.prototype._doc_attached=function(){if(!l.isEmpty(this.js_event_callbacks)||!l.isEmpty(this.subscribed_events))return this._update_event_callbacks()},e.prototype.select=function(t){if(t.prototype instanceof e)return this.references().filter(function(e){return e instanceof t});if(a.isString(t))return this.references().filter(function(e){return e.name===t});throw new Error(\"invalid selector\")},e.prototype.select_one=function(t){var e;switch(e=this.select(t),e.length){case 0:return null;case 1:return e[0];default:throw new Error(\"found more than one object matching given selector\")}},e}(o.HasProps)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(11),s=t(14),a=t(162);r.AnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._bottom.value,{x:t,y:-e}},e.prototype._get_size=function(){return-1},e}(a.RendererView),r.Annotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Annotation\",e.prototype.default_view=r.AnnotationView,e.define({plot:[s.Instance]}),e.override({level:\"annotation\"}),e.prototype.add_panel=function(t){return this.panel=new o.SidePanel({side:t}),this.panel.attach_document(this.document),this.level=\"overlay\"},e}(a.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(52),a=t(170),l=t(14),u=t(28);r.ArrowView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),null==this.model.source&&(this.model.source=new a.ColumnDataSource),this.canvas=this.plot_model.canvas,this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,n;return e=\"data\"===this.model.start_units?this.plot_view.map_to_screen(this._x_start,this._y_start,r=this.model.x_range_name,n=this.model.y_range_name):[this.canvas.v_vx_to_sx(this._x_start),this.canvas.v_vy_to_sy(this._y_start)],t=\"data\"===this.model.end_units?this.plot_view.map_to_screen(this._x_end,this._y_end,r=this.model.x_range_name,n=this.model.y_range_name):[this.canvas.v_vx_to_sx(this._x_end),this.canvas.v_vy_to_sy(this._y_end)],[e,t]},e.prototype.render=function(){var t,e;if(this.model.visible)return t=this.plot_view.canvas_view.ctx,t.save(),e=this._map_data(),\n",
" this.start=e[0],this.end=e[1],null!=this.model.end&&this._arrow_head(t,\"render\",this.model.end,this.start,this.end),null!=this.model.start&&this._arrow_head(t,\"render\",this.model.start,this.end,this.start),t.beginPath(),t.rect(0,0,this.canvas._width.value,this.canvas._height.value),null!=this.model.end&&this._arrow_head(t,\"clip\",this.model.end,this.start,this.end),null!=this.model.start&&this._arrow_head(t,\"clip\",this.model.start,this.end,this.start),t.closePath(),t.clip(),this._arrow_body(t),t.restore()},e.prototype._arrow_body=function(t){var e,r,n,i;if(this.visuals.line.doit){for(i=[],e=r=0,n=this._x_start.length;0<=n?r<n:r>n;e=0<=n?++r:--r)this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(this.start[0][e],this.start[1][e]),t.lineTo(this.end[0][e],this.end[1][e]),i.push(t.stroke());return i}},e.prototype._arrow_head=function(t,e,r,n,i){var o,s,a,l,c;for(c=[],s=a=0,l=this._x_start.length;0<=l?a<l:a>l;s=0<=l?++a:--a)o=Math.PI/2+u.atan2([n[0][s],n[1][s]],[i[0][s],i[1][s]]),t.save(),t.translate(i[0][s],i[1][s]),t.rotate(o),\"render\"===e?r.render(t):\"clip\"===e&&r.clip(t),c.push(t.restore());return c},e}(o.AnnotationView),r.Arrow=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ArrowView,e.prototype.type=\"Arrow\",e.mixins([\"line\"]),e.define({x_start:[l.NumberSpec],y_start:[l.NumberSpec],start_units:[l.String,\"data\"],start:[l.Instance,null],x_end:[l.NumberSpec],y_end:[l.NumberSpec],end_units:[l.String,\"data\"],end:[l.Instance,new s.OpenHead({})],source:[l.Instance],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(45),a=t(14);r.ArrowHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ArrowHead\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.visuals=new s.Visuals(this)},e.prototype.render=function(t,e){return null},e.prototype.clip=function(t,e){return null},e}(o.Annotation),r.OpenHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"OpenHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,0),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead),r.NormalHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NormalHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._normal(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._normal(t,e),t.stroke()},e.prototype._normal=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.VeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"VeeHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._vee(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._vee(t,e),t.stroke()},e.prototype._vee=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.TeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TeeHead\",e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,0),t.lineTo(-.5*this.size,0),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(170),a=t(14);r.BandView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,o=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?o.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],n=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(n[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(n[a])},e.prototype.render=function(){var t,e,r,n,i,o,s,a,l,u;if(this.model.visible){for(this._map_data(),t=this.plot_view.canvas_view.ctx,t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=r=0,s=this._lower_sx.length;0<=s?r<s:r>s;e=0<=s?++r:--r)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(e=n=a=this._upper_sx.length-1;a<=0?n<=0:n>=0;e=a<=0?++n:--n)t.lineTo(this._upper_sx[e],this._upper_sy[e]);for(t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=i=0,l=this._lower_sx.length;0<=l?i<l:i>l;e=0<=l?++i:--i)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.beginPath(),t.moveTo(this._upper_sx[0],this._upper_sy[0]),e=o=0,u=this._upper_sx.length;0<=u?o<u:o>u;e=0<=u?++o:--o)t.lineTo(this._upper_sx[e],this._upper_sy[e]);return this.visuals.line.doit?(this.visuals.line.set_value(t),t.stroke()):void 0}},e}(o.AnnotationView),r.Band=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.BandView,e.prototype.type=\"Band\",e.mixins([\"line\",\"fill\"]),e.define({lower:[a.DistanceSpec],upper:[a.DistanceSpec],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,function(){return new s.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype._normals=function(){var t,e,r,n;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(n=[0,1],t=n[0],e=n[1]),[t,e]},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(19),a=t(5),l=t(14),u=t(41);r.BoxAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.classList.add(\"bk-shading\"),a.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.data_update,function(){return this.render()})):(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this)))},e.prototype.render=function(){var t,e,r,n,i,o,s,l;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible)return null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom?(a.hide(this.el),null):(e=this.plot_model.frame,t=this.plot_model.canvas,s=this.plot_view.frame.xscales[this.model.x_range_name],l=this.plot_view.frame.yscales[this.model.y_range_name],n=t.vx_to_sx(this._calc_dim(this.model.left,this.model.left_units,s,e.h_range.start)),i=t.vx_to_sx(this._calc_dim(this.model.right,this.model.right_units,s,e.h_range.end)),r=t.vy_to_sy(this._calc_dim(this.model.bottom,this.model.bottom_units,l,e.v_range.start)),o=t.vy_to_sy(this._calc_dim(this.model.top,this.model.top_units,l,e.v_range.end)),\"css\"===this.model.render_mode?this._css_box(n,i,r,o):this._canvas_box(n,i,r,o))},e.prototype._css_box=function(t,e,r,n){var i,o,s;return s=Math.abs(e-t),o=Math.abs(r-n),this.el.style.left=t+\"px\",this.el.style.width=s+\"px\",this.el.style.top=n+\"px\",this.el.style.height=o+\"px\",this.el.style.borderWidth=this.model.line_width.value+\"px\",this.el.style.borderColor=this.model.line_color.value,this.el.style.backgroundColor=this.model.fill_color.value,this.el.style.opacity=this.model.fill_alpha.value,i=this.model.line_dash,u.isArray(i)&&(i=i.length<2?\"solid\":\"dashed\"),u.isString(i)&&(this.el.style.borderStyle=i),a.show(this.el)},e.prototype._canvas_box=function(t,e,r,n){var i;return i=this.plot_view.canvas_view.ctx,i.save(),i.beginPath(),i.rect(t,n,e-t,r-n),this.visuals.fill.set_value(i),i.fill(),this.visuals.line.set_value(i),i.stroke(),i.restore()},e.prototype._calc_dim=function(t,e,r,n){var i;return i=null!=t?\"data\"===e?r.compute(t):t:n},e}(o.AnnotationView),r.BoxAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.BoxAnnotationView,e.prototype.type=\"BoxAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({render_mode:[l.RenderMode,\"canvas\"],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],top:[l.Number,null],top_units:[l.SpatialUnits,\"data\"],bottom:[l.Number,null],bottom_units:[l.SpatialUnits,\"data\"],left:[l.Number,null],left_units:[l.SpatialUnits,\"data\"],right:[l.Number,null],right_units:[l.SpatialUnits,\"data\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r,n,i;return r=t.left,n=t.right,i=t.top,e=t.bottom,this.setv({left:r,right:n,top:i,bottom:e},{silent:!0}),this.data_update.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(50),u=t(177),c=t(89),_=t(143),h=t(165),p=t(166),d=t(157),f=t(14),y=t(39),m=t(21),v=t(29),g=t(41);o=25,i=.3,n=.8,r.ColorBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._set_canvas_image()},e.prototype.connect_signals=function(){if(e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.ticker.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.formatter.change,function(t){return function(){return t.plot_view.request_render()}}(this)),null!=this.model.color_mapper)return this.connect(this.model.color_mapper.change,function(){return this._set_canvas_image(),this.plot_view.request_render()})},e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._top.value,{x:t,y:-e}},e.prototype._get_size=function(){var t,e;if(null!=this.model.color_mapper)return t=this.compute_legend_dimensions(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height:\"left\"===e||\"right\"===e?t.width:void 0},e.prototype._set_canvas_image=function(){var t,e,r,n,i,o,s,a,l,u,c,h,p;if(null!=this.model.color_mapper){switch(a=this.model.color_mapper.palette,\"vertical\"===this.model.orientation&&(a=a.slice(0).reverse()),this.model.orientation){case\"vertical\":l=[1,a.length],p=l[0],i=l[1];break;case\"horizontal\":u=[a.length,1],p=u[0],i=u[1]}return r=document.createElement(\"canvas\"),c=[p,i],r.width=c[0],r.height=c[1],o=r.getContext(\"2d\"),s=o.getImageData(0,0,p,i),n=new _.LinearColorMapper({palette:a}),t=n.v_map_screen(function(){h=[];for(var t=0,e=a.length;0<=e?t<e:t>e;0<=e?t++:t--)h.push(t);return h}.apply(this)),e=new Uint8Array(t),s.data.set(e),o.putImageData(s,0,0),this.image=r}},e.prototype.compute_legend_dimensions=function(){var t,e,r,n,i,o,s,a,l,u;switch(t=this.model._computed_image_dimensions(),a=[t.height,t.width],e=a[0],r=a[1],n=this._get_label_extent(),u=this.model._title_extent(),l=this.model._tick_extent(),s=this.model.padding,this.model.orientation){case\"vertical\":i=e+u+2*s,o=r+l+n+2*s;break;case\"horizontal\":i=e+u+l+n+2*s,o=r+2*s}return{height:i,width:o}},e.prototype.compute_legend_location=function(){var t,e,r,n,i,o,s,a,l,u,c,_;if(e=this.compute_legend_dimensions(),s=[e.height,e.width],r=s[0],i=s[1],n=this.model.margin,o=this.model.location,t=this.plot_view.frame.h_range,u=this.plot_view.frame.v_range,g.isString(o))switch(o){case\"top_left\":c=t.start+n,_=u.end-n;break;case\"top_center\":c=(t.end+t.start)/2-i/2,_=u.end-n;break;case\"top_right\":c=t.end-n-i,_=u.end-n;break;case\"center_right\":c=t.end-n-i,_=(u.end+u.start)/2+r/2;break;case\"bottom_right\":c=t.end-n-i,_=u.start+n+r;break;case\"bottom_center\":c=(t.end+t.start)/2-i/2,_=u.start+n+r;break;case\"bottom_left\":c=t.start+n,_=u.start+n+r;break;case\"center_left\":c=t.start+n,_=(u.end+u.start)/2+r/2;break;case\"center\":c=(t.end+t.start)/2-i/2,_=(u.end+u.start)/2+r/2}else g.isArray(o)&&2===o.length&&(c=o[0],_=o[1]);return a=this.plot_view.canvas.vx_to_sx(c),l=this.plot_view.canvas.vy_to_sy(_),{sx:a,sy:l}},e.prototype.render=function(){var t,e,r,n,i;if(this.model.visible&&null!=this.model.color_mapper)return t=this.plot_view.canvas_view.ctx,t.save(),null!=this.model.panel&&(n=this._get_panel_offset(),t.translate(n.x,n.y)),r=this.compute_legend_location(),t.translate(r.sx,r.sy),this._draw_bbox(t),e=this._get_image_offset(),t.translate(e.x,e.y),this._draw_image(t),null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high&&(i=this.model.tick_info(),this._draw_major_ticks(t,i),this._draw_minor_ticks(t,i),this._draw_major_labels(t,i)),this.model.title&&this._draw_title(t),t.restore()},e.prototype._draw_bbox=function(t){var e;return e=this.compute_legend_dimensions(),t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(0,0,e.width,e.height)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_image=function(t){var e;return e=this.model._computed_image_dimensions(),t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this.image,0,0,e.width,e.height),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_major_ticks=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y;if(this.visuals.major_tick_line.doit){for(a=this.model._normals(),o=a[0],s=a[1],n=this.model._computed_image_dimensions(),l=[n.width*o,n.height*s],f=l[0],y=l[1],u=e.coords.major,_=u[0],h=u[1],p=this.model.major_tick_in,d=this.model.major_tick_out,t.save(),t.translate(f,y),this.visuals.major_tick_line.set_value(t),r=i=0,c=_.length;0<=c?i<c:i>c;r=0<=c?++i:--i)t.beginPath(),t.moveTo(Math.round(_[r]+o*d),Math.round(h[r]+s*d)),t.lineTo(Math.round(_[r]-o*p),Math.round(h[r]-s*p)),t.stroke();return t.restore()}},e.prototype._draw_minor_ticks=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y;if(this.visuals.minor_tick_line.doit){for(a=this.model._normals(),o=a[0],s=a[1],n=this.model._computed_image_dimensions(),l=[n.width*o,n.height*s],f=l[0],y=l[1],u=e.coords.minor,_=u[0],h=u[1],p=this.model.minor_tick_in,d=this.model.minor_tick_out,t.save(),t.translate(f,y),this.visuals.minor_tick_line.set_value(t),r=i=0,c=_.length;0<=c?i<c:i>c;r=0<=c?++i:--i)t.beginPath(),t.moveTo(Math.round(_[r]+o*d),Math.round(h[r]+s*d)),t.lineTo(Math.round(_[r]-o*p),Math.round(h[r]-s*p)),t.stroke();return t.restore()}},e.prototype._draw_major_labels=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g;if(this.visuals.major_label_text.doit){for(l=this.model._normals(),s=l[0],a=l[1],i=this.model._computed_image_dimensions(),u=[i.width*s,i.height*a],y=u[0],v=u[1],p=this.model.label_standoff+this.model._tick_extent(),c=[p*s,p*a],m=c[0],g=c[1],_=e.coords.major,d=_[0],f=_[1],r=e.labels.major,this.visuals.major_label_text.set_value(t),t.save(),t.translate(y+m,v+g),n=o=0,h=d.length;0<=h?o<h:o>h;n=0<=h?++o:--o)t.fillText(r[n],Math.round(d[n]+s*this.model.label_standoff),Math.round(f[n]+a*this.model.label_standoff));return t.restore()}},e.prototype._draw_title=function(t){if(this.visuals.title_text.doit)return t.save(),this.visuals.title_text.set_value(t),t.fillText(this.model.title,0,-this.model.title_standoff),t.restore()},e.prototype._get_label_extent=function(){var t,e,r,n;if(n=this.model.tick_info().labels.major,null==this.model.color_mapper.low||null==this.model.color_mapper.high||v.isEmpty(n))r=0;else{switch(t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.major_label_text.set_value(t),this.model.orientation){case\"vertical\":r=m.max(function(){var r,i,o;for(o=[],r=0,i=n.length;r<i;r++)e=n[r],o.push(t.measureText(e.toString()).width);return o}());break;case\"horizontal\":r=y.get_text_height(this.visuals.major_label_text.font_value()).height}r+=this.model.label_standoff,t.restore()}return r},e.prototype._get_image_offset=function(){var t,e;return t=this.model.padding,e=this.model.padding+this.model._title_extent(),{x:t,y:e}},e}(l.AnnotationView),r.ColorBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.default_view=r.ColorBarView,e.prototype.type=\"ColorBar\",e.mixins([\"text:major_label_\",\"text:title_\",\"line:major_tick_\",\"line:minor_tick_\",\"line:border_\",\"line:bar_\",\"fill:background_\"]),e.define({location:[f.Any,\"top_right\"],orientation:[f.Orientation,\"vertical\"],title:[f.String],title_standoff:[f.Number,2],height:[f.Any,\"auto\"],width:[f.Any,\"auto\"],scale_alpha:[f.Number,1],ticker:[f.Instance,function(){return new u.BasicTicker}],formatter:[f.Instance,function(){return new c.BasicTickFormatter}],major_label_overrides:[f.Any,{}],color_mapper:[f.Instance],label_standoff:[f.Number,5],margin:[f.Number,30],padding:[f.Number,10],major_tick_in:[f.Number,5],major_tick_out:[f.Number,0],minor_tick_in:[f.Number,0],minor_tick_out:[f.Number,0]}),e.override({background_fill_color:\"#ffffff\",background_fill_alpha:.95,bar_line_color:null,border_line_color:null,major_label_text_align:\"center\",major_label_text_baseline:\"middle\",major_label_text_font_size:\"8pt\",major_tick_line_color:\"#ffffff\",minor_tick_line_color:null,title_text_font_size:\"10pt\",title_text_font_style:\"italic\"}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r)},e.prototype._normals=function(){var t,e,r,n;return\"vertical\"===this.orientation?(r=[1,0],t=r[0],e=r[1]):(n=[0,1],t=n[0],e=n[1]),[t,e]},e.prototype._title_extent=function(){var t,e;return t=this.title_text_font+\" \"+this.title_text_font_size+\" \"+this.title_text_font_style,e=this.title?y.get_text_height(t).height+this.title_standoff:0},e.prototype._tick_extent=function(){var t;return t=null!=this.color_mapper.low&&null!=this.color_mapper.high?m.max([this.major_tick_out,this.minor_tick_out]):0},e.prototype._computed_image_dimensions=function(){var t,e,r,s,a;switch(t=this.plot.plot_canvas.frame._height.value,e=this.plot.plot_canvas.frame._width.value,s=this._title_extent(),this.orientation){case\"vertical\":\"auto\"===this.height?null!=this.panel?r=t-2*this.padding-s:(r=m.max([this.color_mapper.palette.length*o,t*i]),r=m.min([r,t*n-2*this.padding-s])):r=this.height,a=\"auto\"===this.width?o:this.width;break;case\"horizontal\":r=\"auto\"===this.height?o:this.height,\"auto\"===this.width?null!=this.panel?a=e-2*this.padding:(a=m.max([this.color_mapper.palette.length*o,e*i]),a=m.min([a,e*n-2*this.padding])):a=this.width}return{height:r,width:a}},e.prototype._tick_coordinate_scale=function(t){var e,r;switch(e={source_range:new d.Range1d({start:this.color_mapper.low,end:this.color_mapper.high}),target_range:new d.Range1d({start:0,end:t})},this.color_mapper.type){case\"LinearColorMapper\":r=new h.LinearScale(e);break;case\"LogColorMapper\":r=new p.LogScale(e)}return r},e.prototype._format_major_labels=function(t,e){var r,n,i,o,s;for(o=t,r=this.formatter.doFormat(o,null),n=i=0,s=e.length;0<=s?i<s:i>s;n=0<=s?++i:--i)e[n]in this.major_label_overrides&&(r[n]=this.major_label_overrides[e[n]]);return r},e.prototype.tick_info=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w;switch(o=this._computed_image_dimensions(),this.orientation){case\"vertical\":g=o.height;break;case\"horizontal\":g=o.width}for(v=this._tick_coordinate_scale(g),d=this._normals(),n=d[0],s=d[1],f=[this.color_mapper.low,this.color_mapper.high],b=f[0],r=f[1],w=this.ticker.get_ticks(b,r,null,null,this.ticker.desired_num_ticks),e={major:[[],[]],minor:[[],[]]},_=w.major,p=w.minor,c=e.major,h=e.minor,i=a=0,y=_.length;0<=y?a<y:a>y;i=0<=y?++a:--a)_[i]<b||_[i]>r||(c[n].push(_[i]),c[s].push(0));for(i=l=0,m=p.length;0<=m?l<m:l>m;i=0<=m?++l:--l)p[i]<b||p[i]>r||(h[n].push(p[i]),h[s].push(0));return u={major:this._format_major_labels(c[n].slice(0),_)},c[n]=v.v_compute(c[n]),h[n]=v.v_compute(h[n]),\"vertical\"===this.orientation&&(c[n]=new Float64Array(function(){var e,r,i,o;for(i=c[n],o=[],r=0,e=i.length;r<e;r++)t=i[r],o.push(g-t);return o}()),h[n]=new Float64Array(function(){var e,r,i,o;for(i=h[n],o=[],r=0,e=i.length;r<e;r++)t=i[r],o.push(g-t);return o}())),{ticks:w,coords:e,labels:u}},e}(l.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(50);r.Annotation=n.Annotation;var i=t(51);r.Arrow=i.Arrow;var o=t(52);r.ArrowHead=o.ArrowHead;var s=t(52);r.OpenHead=s.OpenHead;var a=t(52);r.NormalHead=a.NormalHead;var l=t(52);r.TeeHead=l.TeeHead;var u=t(52);r.VeeHead=u.VeeHead;var c=t(53);r.Band=c.Band;var _=t(54);r.BoxAnnotation=_.BoxAnnotation;var h=t(55);r.ColorBar=h.ColorBar;var p=t(57);r.Label=p.Label;var d=t(58);r.LabelSet=d.LabelSet;var f=t(59);r.Legend=f.Legend;var y=t(60);r.LegendItem=y.LegendItem;var m=t(61);r.PolyAnnotation=m.PolyAnnotation;var v=t(62);r.Span=v.Span;var g=t(63);r.TextAnnotation=g.TextAnnotation;var b=t(64);r.Title=b.Title;var w=t(65);r.Tooltip=w.Tooltip;var x=t(66);r.Whisker=x.Whisker},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(63),s=t(5),a=t(14);r.LabelView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.visuals.warm_cache(null)},e.prototype._get_size=function(){var t,e,r;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),this.model.panel.is_horizontal?e=t.measureText(this.model.text).ascent:r=t.measureText(this.model.text).width},e.prototype.render=function(){var t,e,r,n,i,o,a,l,u,c;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible){switch(u=this.plot_view.frame.xscales[this.model.x_range_name],c=this.plot_view.frame.yscales[this.model.y_range_name],e=this.plot_view.canvas_view.ctx,this.model.angle_units){case\"rad\":t=-1*this.model.angle;break;case\"deg\":t=-1*this.model.angle*Math.PI/180}return r=null!=(n=this.model.panel)?n:this.plot_view.frame,a=\"data\"===this.model.x_units?u.compute(this.model.x):this.model.x+r._left.value,l=\"data\"===this.model.y_units?c.compute(this.model.y):this.model.y+r._bottom.value,i=this.canvas.vx_to_sx(a),o=this.canvas.vy_to_sy(l),\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,i+this.model.x_offset,o-this.model.y_offset,t):this._css_text(e,this.model.text,i+this.model.x_offset,o-this.model.y_offset,t)}},e}(o.TextAnnotationView),r.Label=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LabelView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[a.Number],x_units:[a.SpatialUnits,\"data\"],y:[a.Number],y_units:[a.SpatialUnits,\"data\"],text:[a.String],angle:[a.Angle,0],angle_units:[a.AngleUnits,\"rad\"],x_offset:[a.Number,0],y_offset:[a.Number,0],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(o.TextAnnotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(63),s=t(170),a=t(5),l=t(14),u=t(41);r.LabelSetView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r,n,i,o;if(e.__super__.initialize.call(this,t),this.set_data(this.model.source),\"css\"===this.model.render_mode){for(o=[],r=n=0,i=this._text.length;0<=i?n<i:n>i;r=0<=i?++n:--n)this.title_div=a.div({\"class\":\"bk-annotation-child\",style:{display:\"none\"}}),o.push(this.el.appendChild(this.title_div));return o}},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.render()})):(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}))},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t)},e.prototype._map_data=function(){var t,e,r,n,i,o;return i=this.plot_view.frame.xscales[this.model.x_range_name],o=this.plot_view.frame.yscales[this.model.y_range_name],r=\"data\"===this.model.x_units?i.v_compute(this._x):this._x.slice(0),t=this.canvas.v_vx_to_sx(r),n=\"data\"===this.model.y_units?o.v_compute(this._y):this._y.slice(0),e=this.canvas.v_vy_to_sy(n),[t,e]},e.prototype.render=function(){var t,e,r,n,i,o,s,l,u,c,_;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible){if(t=this.plot_view.canvas_view.ctx,i=this._map_data(),c=i[0],_=i[1],\"canvas\"===this.model.render_mode){for(l=[],e=r=0,o=this._text.length;0<=o?r<o:r>o;e=0<=o?++r:--r)l.push(this._v_canvas_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return l}for(u=[],e=n=0,s=this._text.length;0<=s?n<s:n>s;e=0<=s?++n:--n)u.push(this._v_css_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return u}},e.prototype._get_size=function(){var t,e,r,n;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),r=this.model.panel.side,\"above\"===r||\"below\"===r?e=t.measureText(this._text[0]).ascent:\"left\"===r||\"right\"===r?n=t.measureText(this._text[0]).width:void 0},e.prototype._v_canvas_text=function(t,e,r,n,i,o){var s;return this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),t.save(),t.beginPath(),t.translate(n,i),t.rotate(o),t.rect(s[0],s[1],s[2],s[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_vectorize(t,e),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_vectorize(t,e),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_vectorize(t,e),t.fillText(r,0,0)),t.restore()},e.prototype._v_css_text=function(t,e,r,n,i,o){var s,l,c,_;return l=this.el.childNodes[e],l.textContent=r,this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),c=this.visuals.border_line.line_dash.value(),u.isArray(c)&&(_=c.length<2?\"solid\":\"dashed\"),u.isString(c)&&(_=c),this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),l.style.position=\"absolute\",l.style.left=n+s[0]+\"px\",l.style.top=i+s[1]+\"px\",l.style.color=\"\"+this.visuals.text.text_color.value(),l.style.opacity=\"\"+this.visuals.text.text_alpha.value(),l.style.font=\"\"+this.visuals.text.font_value(),l.style.lineHeight=\"normal\",o&&(l.style.transform=\"rotate(\"+o+\"rad)\"),this.visuals.background_fill.doit&&(l.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(l.style.borderStyle=\"\"+_,l.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",l.style.borderColor=\"\"+this.visuals.border_line.color_value()),a.show(l)},e}(o.TextAnnotationView),r.LabelSet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LabelSetView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[l.NumberSpec],y:[l.NumberSpec],x_units:[l.SpatialUnits,\"data\"],y_units:[l.SpatialUnits,\"data\"],text:[l.StringSpec,{field:\"text\"}],angle:[l.AngleSpec,0],x_offset:[l.NumberSpec,{value:0}],y_offset:[l.NumberSpec,{value:0}],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],\n",
" y_range_name:[l.String,\"default\"],render_mode:[l.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(o.TextAnnotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(14),a=t(39),l=t(22),u=t(21),c=t(29),_=t(41);r.LegendView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.getters({legend_padding:function(){return null!=this.visuals.border_line.line_color.value()?this.model.padding:0}}),e.prototype.compute_legend_bbox=function(){var t,e,r,n,i,o,s,l,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;for(d=this.model.get_legend_names(),e=this.model.glyph_height,r=this.model.glyph_width,o=this.model.label_height,l=this.model.label_width,this.max_label_height=u.max([a.get_text_height(this.visuals.label_text.font_value()).height,o,e]),t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.label_text.set_value(t),this.text_widths={},i=0,v=d.length;i<v;i++)w=d[i],this.text_widths[w]=u.max([t.measureText(w).width,l]);if(t.restore(),b=u.max(c.values(this.text_widths)),p=this.model.margin,f=this.legend_padding,y=this.model.spacing,s=this.model.label_standoff,\"vertical\"===this.model.orientation)h=d.length*this.max_label_height+(d.length-1)*y+2*f,m=b+r+s+2*f;else{m=2*f+(d.length-1)*y,k=this.text_widths;for(w in k)T=k[w],m+=u.max([T,l])+r+s;h=this.max_label_height+2*f}if(x=null!=(M=this.model.panel)?M:this.plot_view.frame,n={start:x._left.value,end:x._right.value},S={start:x._bottom.value,end:x._top.value},g=this.model.location,_.isString(g))switch(g){case\"top_left\":O=n.start+p,P=S.end-p;break;case\"top_center\":O=(n.end+n.start)/2-m/2,P=S.end-p;break;case\"top_right\":O=n.end-p-m,P=S.end-p;break;case\"center_right\":O=n.end-p-m,P=(S.end+S.start)/2+h/2;break;case\"bottom_right\":O=n.end-p-m,P=S.start+p+h;break;case\"bottom_center\":O=(n.end+n.start)/2-m/2,P=S.start+p+h;break;case\"bottom_left\":O=n.start+p,P=S.start+p+h;break;case\"center_left\":O=n.start+p,P=(S.end+S.start)/2+h/2;break;case\"center\":O=(n.end+n.start)/2-m/2,P=(S.end+S.start)/2+h/2}else _.isArray(g)&&2===g.length&&(O=g[0],P=g[1],O+=n.start,P+=S.start+h);return O=this.plot_view.canvas.vx_to_sx(O),P=this.plot_view.canvas.vy_to_sy(P),{x:O,y:P,width:m,height:h}},e.prototype.bbox=function(){var t,e,r,n,i;return e=this.compute_legend_bbox(),n=e.x,i=e.y,r=e.width,t=e.height,new l.BBox({x0:n,y0:i,x1:n+r,y1:i+t})},e.prototype.on_hit=function(t,e){var r,n,i,o,s,a,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F;for(i=this.model.glyph_height,o=this.model.glyph_width,m=this.legend_padding,v=this.model.spacing,d=this.model.label_standoff,C=F=m,y=this.compute_legend_bbox(),A=\"vertical\"===this.model.orientation,M=this.model.items,a=0,g=M.length;a<g;a++)for(u=M[a],f=u.get_labels_list_from_label_prop(),n=u.get_field_from_label_prop(),c=0,b=f.length;c<b;c++){if(p=f[c],j=y.x+C,N=y.y+F,z=j+o,D=N+i,A?(S=[y.width-2*m,this.max_label_height],E=S[0],s=S[1]):(T=[this.text_widths[p]+o+d,this.max_label_height],E=T[0],s=T[1]),r=new l.BBox({x0:j,y0:N,x1:j+E,y1:N+s}),r.contains(t,e)){switch(this.model.click_policy){case\"hide\":for(O=u.renderers,_=0,w=O.length;_<w;_++)k=O[_],k.visible=!k.visible;break;case\"mute\":for(P=u.renderers,h=0,x=P.length;h<x;h++)k=P[h],k.muted=!k.muted}return!0}A?F+=this.max_label_height+v:C+=this.text_widths[p]+o+d+v}return!1},e.prototype.render=function(){var t,e;if(this.model.visible&&0!==this.model.items.length)return e=this.plot_view.canvas_view.ctx,t=this.compute_legend_bbox(),e.save(),this._draw_legend_box(e,t),this._draw_legend_items(e,t),e.restore()},e.prototype._draw_legend_box=function(t,e){if(t.beginPath(),t.rect(e.x,e.y,e.width,e.height),this.visuals.background_fill.set_value(t),t.fill(),this.visuals.border_line.doit)return this.visuals.border_line.set_value(t),t.stroke()},e.prototype._draw_legend_items=function(t,e){var r,n,i,o,s,a,l,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C;for(i=this.model.glyph_height,o=this.model.glyph_width,f=this.legend_padding,y=this.model.spacing,p=this.model.label_standoff,E=C=f,S=\"vertical\"===this.model.orientation,w=this.model.items,a=0,m=w.length;a<m;a++)if(l=w[a],d=l.get_labels_list_from_label_prop(),n=l.get_field_from_label_prop(),0!==d.length)for(r=function(){switch(this.model.click_policy){case\"none\":return!0;case\"hide\":return u.all(l.renderers,function(t){return t.visible});case\"mute\":return u.all(l.renderers,function(t){return!t.muted})}}.call(this),c=0,v=d.length;c<v;c++){for(h=d[c],P=e.x+E,j=e.y+C,A=P+o,z=j+i,S?C+=this.max_label_height+y:E+=this.text_widths[h]+o+p+y,this.visuals.label_text.set_value(t),t.fillText(h,A+p,j+this.max_label_height/2),x=l.renderers,_=0,g=x.length;_<g;_++)b=x[_],T=this.plot_view.renderer_views[b.id],T.draw_legend(t,P,A,j,z,n,h);r||(S?(k=[e.width-2*f,this.max_label_height],O=k[0],s=k[1]):(M=[this.text_widths[h]+o+p,this.max_label_height],O=M[0],s=M[1]),t.beginPath(),t.rect(P,j,O,s),this.visuals.inactive_fill.set_value(t),t.fill())}return null},e.prototype._get_size=function(){var t,e;return t=this.compute_legend_bbox(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height+2*this.model.margin:\"left\"===e||\"right\"===e?t.width+2*this.model.margin:void 0},e}(o.AnnotationView),r.Legend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LegendView,e.prototype.type=\"Legend\",e.prototype.cursor=function(){return\"none\"===this.click_policy?null:\"pointer\"},e.prototype.get_legend_names=function(){var t,e,r,n,i,o;for(n=[],o=this.items,t=0,i=o.length;t<i;t++)e=o[t],r=e.get_labels_list_from_label_prop(),n=n.concat(r);return n},e.mixins([\"text:label_\",\"fill:inactive_\",\"line:border_\",\"fill:background_\"]),e.define({orientation:[s.Orientation,\"vertical\"],location:[s.Any,\"top_right\"],label_standoff:[s.Number,5],glyph_height:[s.Number,20],glyph_width:[s.Number,20],label_height:[s.Number,20],label_width:[s.Number,20],margin:[s.Number,10],padding:[s.Number,10],spacing:[s.Number,3],items:[s.Array,[]],click_policy:[s.Any,\"none\"]}),e.override({border_line_color:\"#e5e5e5\",border_line_alpha:.5,border_line_width:1,background_fill_color:\"#ffffff\",background_fill_alpha:.95,inactive_fill_color:\"white\",inactive_fill_alpha:.9,label_text_font_size:\"10pt\",label_text_baseline:\"middle\"}),e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(49),l=t(14),u=t(13),c=t(21),_=t(170);r.LegendItem=function(t){function e(){return this.get_labels_list_from_label_prop=n(this.get_labels_list_from_label_prop,this),this.get_field_from_label_prop=n(this.get_field_from_label_prop,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"LegendItem\",e.prototype._check_data_sources_on_renderers=function(){var t,e,r,n,i,o;if(t=this.get_field_from_label_prop(),null!=t){if(this.renderers.length<1)return!1;if(o=this.renderers[0].data_source,null!=o)for(i=this.renderers,e=0,r=i.length;e<r;e++)if(n=i[e],n.data_source!==o)return!1}return!0},e.prototype._check_field_label_on_data_source=function(){var t,e;if(t=this.get_field_from_label_prop(),null!=t){if(this.renderers.length<1)return!1;if(e=this.renderers[0].data_source,null!=e&&s.call(e.columns(),t)<0)return!1}return!0},e.prototype.initialize=function(t,r){var n,i;if(e.__super__.initialize.call(this,t,r),n=this._check_data_sources_on_renderers(),n||u.logger.error(\"Non matching data sources on legend item renderers\"),i=this._check_field_label_on_data_source(),!i)return u.logger.error(\"Bad column name on label: \"+this.label)},e.define({label:[l.StringSpec,null],renderers:[l.Array,[]]}),e.prototype.get_field_from_label_prop=function(){if(null!=this.label&&null!=this.label.field)return this.label.field},e.prototype.get_labels_list_from_label_prop=function(){var t,e,r;if(null!=this.label&&null!=this.label.value)return[this.label.value];if(e=this.get_field_from_label_prop(),null!=e){if(!this.renderers[0]||null==this.renderers[0].data_source)return[\"No source found\"];if(r=this.renderers[0].data_source,r instanceof _.ColumnDataSource)return t=r.get_column(e),null!=t?c.uniq(t):[\"Invalid field\"]}return[]},e}(a.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(19),a=t(14);r.PolyAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype.render=function(t){var e,r,n,i,o,s,a,l,u,c;if(this.model.visible){if(u=this.model.xs,c=this.model.ys,u.length!==c.length)return null;if(u.length<3||c.length<3)return null;for(e=this.plot_view.canvas,t=this.plot_view.canvas_view.ctx,r=n=0,i=u.length;0<=i?n<i:n>i;r=0<=i?++n:--n)\"screen\"===this.model.xs_units&&(a=u[r]),\"screen\"===this.model.ys_units&&(l=c[r]),o=e.vx_to_sx(a),s=e.vy_to_sy(l),0===r?(t.beginPath(),t.moveTo(o,s)):t.lineTo(o,s);return t.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),this.visuals.fill.doit?(this.visuals.fill.set_value(t),t.fill()):void 0}},e}(o.AnnotationView),r.PolyAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PolyAnnotationView,e.prototype.type=\"PolyAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({xs:[a.Array,[]],xs_units:[a.SpatialUnits,\"data\"],ys:[a.Array,[]],ys_units:[a.SpatialUnits,\"data\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r;return e=t.xs,r=t.ys,this.setv({xs:e,ys:r},{silent:!0}),this.data_update.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(14);r.SpanView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.position=\"absolute\",s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.model.for_hover?this.connect(this.model.properties.computed_location.change,function(){return this._draw_span()}):\"canvas\"===this.model.render_mode?(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.properties.location.change,function(t){return function(){return t.plot_view.request_render()}}(this))):(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.properties.location.change,function(){return this._draw_span()}))},e.prototype.render=function(){if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible)return this._draw_span()},e.prototype._draw_span=function(){var t,e,r,n,i,o,a,l,u,c;return i=this.model.for_hover?this.model.computed_location:this.model.location,null==i?void s.hide(this.el):(r=this.plot_model.frame,t=this.plot_model.canvas,u=this.plot_view.frame.xscales[this.model.x_range_name],c=this.plot_view.frame.yscales[this.model.y_range_name],\"width\"===this.model.dimension?(a=t.vy_to_sy(this._calc_dim(i,c)),o=t.vx_to_sx(r._left.value),l=r._width.value,n=this.model.properties.line_width.value()):(a=t.vy_to_sy(r._top.value),o=t.vx_to_sx(this._calc_dim(i,u)),l=this.model.properties.line_width.value(),n=r._height.value),\"css\"===this.model.render_mode?(this.el.style.top=a+\"px\",this.el.style.left=o+\"px\",this.el.style.width=l+\"px\",this.el.style.height=n+\"px\",this.el.style.zIndex=1e3,this.el.style.backgroundColor=this.model.properties.line_color.value(),this.el.style.opacity=this.model.properties.line_alpha.value(),s.show(this.el)):\"canvas\"===this.model.render_mode?(e=this.plot_view.canvas_view.ctx,e.save(),e.beginPath(),this.visuals.line.set_value(e),e.moveTo(o,a),\"width\"===this.model.dimension?e.lineTo(o+l,a):e.lineTo(o,a+n),e.stroke(),e.restore()):void 0)},e.prototype._calc_dim=function(t,e){var r;return r=\"data\"===this.model.location_units?e.compute(t):t},e}(o.AnnotationView),r.Span=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.SpanView,e.prototype.type=\"Span\",e.mixins([\"line\"]),e.define({render_mode:[a.RenderMode,\"canvas\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],location:[a.Number,null],location_units:[a.SpatialUnits,\"data\"],dimension:[a.Dimension,\"width\"]}),e.override({line_color:\"black\"}),e.internal({for_hover:[a.Boolean,!1],computed_location:[a.Number,null]}),e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(41),l=t(39);r.TextAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.frame=this.plot_model.frame,\"css\"===this.model.render_mode)return this.el.classList.add(\"bk-annotation\"),this.plot_view.canvas_overlays.appendChild(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?this.connect(this.model.change,function(){return this.render()}):this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._calculate_text_dimensions=function(t,e){var r,n;return n=t.measureText(e).width,r=l.get_text_height(this.visuals.text.font_value()).height,[n,r]},e.prototype._calculate_bounding_box_dimensions=function(t,e){var r,n,i,o,s;switch(n=this._calculate_text_dimensions(t,e),i=n[0],r=n[1],t.textAlign){case\"left\":o=0;break;case\"center\":o=-i/2;break;case\"right\":o=-i}switch(t.textBaseline){case\"top\":s=0;break;case\"middle\":s=-.5*r;break;case\"bottom\":s=-1*r;break;case\"alphabetic\":s=-.8*r;break;case\"hanging\":s=-.17*r;break;case\"ideographic\":s=-.83*r}return[o,s,i,r]},e.prototype._get_size=function(){var t;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(this.model.text).ascent},e.prototype.render=function(){return null},e.prototype._canvas_text=function(t,e,r,n,i){var o;return this.visuals.text.set_value(t),o=this._calculate_bounding_box_dimensions(t,e),t.save(),t.beginPath(),t.translate(r,n),i&&t.rotate(i),t.rect(o[0],o[1],o[2],o[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(t),t.fillText(e,0,0)),t.restore()},e.prototype._css_text=function(t,e,r,n,i){var o,l,u;return s.hide(this.el),this.visuals.text.set_value(t),o=this._calculate_bounding_box_dimensions(t,e),l=this.visuals.border_line.line_dash.value(),a.isArray(l)&&(u=l.length<2?\"solid\":\"dashed\"),a.isString(l)&&(u=l),this.visuals.border_line.set_value(t),this.visuals.background_fill.set_value(t),this.el.style.position=\"absolute\",this.el.style.left=r+o[0]+\"px\",this.el.style.top=n+o[1]+\"px\",this.el.style.color=\"\"+this.visuals.text.text_color.value(),this.el.style.opacity=\"\"+this.visuals.text.text_alpha.value(),this.el.style.font=\"\"+this.visuals.text.font_value(),this.el.style.lineHeight=\"normal\",i&&(this.el.style.transform=\"rotate(\"+i+\"rad)\"),this.visuals.background_fill.doit&&(this.el.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(this.el.style.borderStyle=\"\"+u,this.el.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",this.el.style.borderColor=\"\"+this.visuals.border_line.color_value()),this.el.textContent=e,s.show(this.el)},e}(o.AnnotationView),r.TextAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TextAnnotation\",e.prototype.default_view=r.TextAnnotationView,e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(63),s=t(5),a=t(14),l=t(45);r.TitleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.visuals.text=new l.Text(this.model),r=this.plot_view.canvas_view.ctx,r.save(),this.model.panel.apply_label_text_heuristics(r,\"justified\"),this.model.text_baseline=r.textBaseline,this.model.text_align=this.model.align,r.restore()},e.prototype._get_computed_location=function(){var t,e,r,n,i,o,s;switch(e=this._calculate_text_dimensions(this.plot_view.canvas_view.ctx,this.text),s=e[0],t=e[1],this.model.panel.side){case\"left\":i=this.model.panel._left.value,o=this._get_text_location(this.model.align,this.frame.v_range)+this.model.offset;break;case\"right\":i=this.model.panel._right.value,o=this.canvas._height.value-this._get_text_location(this.model.align,this.frame.v_range)-this.model.offset;break;case\"above\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,o=this.model.panel._top.value-10;break;case\"below\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,o=this.model.panel._bottom.value}return r=this.canvas.vx_to_sx(i),n=this.canvas.vy_to_sy(o),[r,n]},e.prototype._get_text_location=function(t,e){var r;switch(t){case\"left\":r=e.start;break;case\"center\":r=(e.end+e.start)/2;break;case\"right\":r=e.end}return r},e.prototype.render=function(){var t,e,r,n,i;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible&&(t=this.model.panel.get_label_angle_heuristic(\"parallel\"),r=this._get_computed_location(),n=r[0],i=r[1],e=this.plot_view.canvas_view.ctx,\"\"!==this.model.text&&null!==this.model.text))return\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,n,i,t):this._css_text(e,this.model.text,n,i,t)},e.prototype._get_size=function(){var t,e;return e=this.model.text,\"\"===e||null===e?0:(t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(e).ascent+10)},e}(o.TextAnnotationView),r.Title=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TitleView,e.prototype.type=\"Title\",e.mixins([\"line:border_\",\"fill:background_\"]),e.define({text:[a.String],text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"10pt\"],text_font_style:[a.FontStyle,\"bold\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],align:[a.TextAlign,\"left\"],offset:[a.Number,0],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e.internal({text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"]}),e}(o.TextAnnotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(5),a=t(14);r.TooltipView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-tooltip\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.zIndex=1010,s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.data.change,function(){return this._draw_tips()})},e.prototype.render=function(){if(this.model.visible)return this._draw_tips()},e.prototype._draw_tips=function(){var t,e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v;if(i=this.model.data,s.empty(this.el),s.hide(this.el),this.model.custom?this.el.classList.add(\"bk-tooltip-custom\"):this.el.classList.remove(\"bk-tooltip-custom\"),0!==i.length){for(a=0,u=i.length;a<u;a++)f=i[a],y=f[0],m=f[1],n=f[2],this.model.inner_only&&!this.plot_view.frame.contains(y,m)||(p=s.div({},n),this.el.appendChild(p));switch(_=this.plot_view.model.canvas.vx_to_sx(y),h=this.plot_view.model.canvas.vy_to_sy(m),e=this.model.attachment){case\"horizontal\":v=this.plot_view.frame._width.value,l=this.plot_view.frame._left.value,c=y-l<v/2?\"right\":\"left\";break;case\"vertical\":o=this.plot_view.frame._height.value,r=this.plot_view.frame._bottom.value,c=m-r<o/2?\"below\":\"above\";break;default:c=e}switch(this.el.classList.remove(\"bk-right\"),this.el.classList.remove(\"bk-left\"),this.el.classList.remove(\"bk-above\"),this.el.classList.remove(\"bk-below\"),t=10,s.show(this.el),c){case\"right\":this.el.classList.add(\"bk-left\"),l=_+(this.el.offsetWidth-this.el.clientWidth)+t,d=h-this.el.offsetHeight/2;break;case\"left\":this.el.classList.add(\"bk-right\"),l=_-this.el.offsetWidth-t,d=h-this.el.offsetHeight/2;break;case\"above\":this.el.classList.add(\"bk-above\"),d=h+(this.el.offsetHeight-this.el.clientHeight)+t,l=Math.round(_-this.el.offsetWidth/2);break;case\"below\":this.el.classList.add(\"bk-below\"),d=h-this.el.offsetHeight-t,l=Math.round(_-this.el.offsetWidth/2)}return this.model.show_arrow&&this.el.classList.add(\"bk-tooltip-arrow\"),this.el.childNodes.length>0?(this.el.style.top=d+\"px\",this.el.style.left=l+\"px\"):s.hide(this.el)}},e}(o.AnnotationView),r.Tooltip=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TooltipView,e.prototype.type=\"Tooltip\",e.define({attachment:[a.String,\"horizontal\"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),e.override({level:\"overlay\"}),e.internal({data:[a.Any,[]],custom:[a.Any]}),e.prototype.clear=function(){return this.data=[]},e.prototype.add=function(t,e,r){var n;return n=this.data,n.push([t,e,r]),this.data=n,this.properties.data.change.emit()},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(50),s=t(170),a=t(52),l=t(14);r.WhiskerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,o=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?o.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],n=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(n[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(n[a])},e.prototype.render=function(){var t,e,r,n,i,o,s,a,l,u;if(this.model.visible){if(this._map_data(),e=this.plot_view.canvas_view.ctx,this.visuals.line.doit)for(r=n=0,s=this._lower_sx.length;0<=s?n<s:n>s;r=0<=s?++n:--n)this.visuals.line.set_vectorize(e,r),e.beginPath(),e.moveTo(this._lower_sx[r],this._lower_sy[r]),e.lineTo(this._upper_sx[r],this._upper_sy[r]),e.stroke();if(t=\"height\"===this.model.dimension?0:Math.PI/2,null!=this.model.lower_head)for(r=i=0,a=this._lower_sx.length;0<=a?i<a:i>a;r=0<=a?++i:--i)e.save(),e.translate(this._lower_sx[r],this._lower_sy[r]),e.rotate(t+Math.PI),this.model.lower_head.render(e,r),e.restore();if(null!=this.model.upper_head){for(u=[],r=o=0,l=this._upper_sx.length;0<=l?o<l:o>l;r=0<=l?++o:--o)e.save(),e.translate(this._upper_sx[r],this._upper_sy[r]),e.rotate(t),this.model.upper_head.render(e,r),u.push(e.restore());return u}}},e}(o.AnnotationView),r.Whisker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.WhiskerView,e.prototype.type=\"Whisker\",e.mixins([\"line\"]),e.define({lower:[l.DistanceSpec],lower_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],upper:[l.DistanceSpec],upper_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],base:[l.DistanceSpec],dimension:[l.Dimension,\"height\"],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e.override({level:\"underlay\"}),e.prototype._normals=function(){var t,e,r,n;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(n=[0,1],t=n[0],e=n[1]),[t,e]},e}(o.Annotation)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(11),s=t(160),a=t(162),l=t(13),u=t(14),c=t(21),_=t(41);r.AxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.render=function(){var t,e,r;if(this.model.visible!==!1)return e={tick:this._tick_extent(),tick_label:this._tick_label_extents(),axis_label:this._axis_label_extent()},r=this.model.tick_coords,t=this.plot_view.canvas_view.ctx,t.save(),this._draw_rule(t,e),this._draw_major_ticks(t,e,r),this._draw_minor_ticks(t,e,r),this._draw_major_labels(t,e,r),this._draw_axis_label(t,e,r),null!=this._render&&this._render(t,e,r),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._get_size=function(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()},e.prototype._draw_rule=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m;if(this.visuals.axis_line.doit){for(a=this.model.rule_coords,d=a[0],y=a[1],l=this.plot_view.map_to_screen(d,y,this.model.x_range_name,this.model.y_range_name),h=l[0],p=l[1],u=this.model.normals,o=u[0],s=u[1],c=this.model.offsets,f=c[0],m=c[1],this.visuals.axis_line.set_value(t),t.beginPath(),t.moveTo(Math.round(h[0]+o*f),Math.round(p[0]+s*m)),n=i=1,_=h.length;1<=_?i<_:i>_;n=1<=_?++i:--i)h=Math.round(h[n]+o*f),p=Math.round(p[n]+s*m),t.lineTo(h,p);t.stroke()}},e.prototype._draw_major_ticks=function(t,e,r){var n,i,o;n=this.model.major_tick_in,i=this.model.major_tick_out,o=this.visuals.major_tick_line,this._draw_ticks(t,r.major,n,i,o)},e.prototype._draw_minor_ticks=function(t,e,r){var n,i,o;n=this.model.minor_tick_in,i=this.model.minor_tick_out,o=this.visuals.minor_tick_line,this._draw_ticks(t,r.minor,n,i,o)},e.prototype._draw_major_labels=function(t,e,r){var n,i,o,s,a;n=r.major,i=this.model.compute_labels(n[this.model.dimension]),o=this.model.major_label_orientation,s=e.tick+this.model.major_label_standoff,a=this.visuals.major_label_text,this._draw_oriented_labels(t,i,n,o,this.model.panel_side,s,a)},e.prototype._draw_axis_label=function(t,e,r){var n,i,o,s,a;if(null!=this.model.axis_label){switch(this.model.panel.side){case\"above\":s=this.model.panel._hcenter.value,a=this.model.panel._bottom.value;break;case\"below\":s=this.model.panel._hcenter.value,a=this.model.panel._top.value;break;case\"left\":s=this.model.panel._right.value,a=this.model.panel._vcenter._value;break;case\"right\":s=this.model.panel._left.value,a=this.model.panel._vcenter._value}n=[[s],[a]],i=e.tick+c.sum(e.tick_label)+this.model.axis_label_standoff,o=this.visuals.axis_label_text,this._draw_oriented_labels(t,[this.model.axis_label],n,\"parallel\",this.model.panel_side,i,o,\"screen\")}},e.prototype._draw_ticks=function(t,e,r,n,i){var o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;if(i.doit&&0!==e.length)for(S=e[0],O=e[1],p=this.plot_view.map_to_screen(S,O,this.model.x_range_name,this.model.y_range_name),w=p[0],M=p[1],d=this.model.normals,a=d[0],c=d[1],f=this.model.offsets,T=f[0],P=f[1],y=[a*(T-r),c*(P-r)],l=y[0],_=y[1],m=[a*(T+n),c*(P+n)],u=m[0],h=m[1],i.set_value(t),o=s=0,v=w.length;0<=v?s<v:s>v;o=0<=v?++s:--s)g=Math.round(w[o]+u),x=Math.round(M[o]+h),b=Math.round(w[o]+l),k=Math.round(M[o]+_),t.beginPath(),t.moveTo(g,x),t.lineTo(b,k),t.stroke()},e.prototype._draw_oriented_labels=function(t,e,r,n,i,o,s,a){var l,u,c,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E;if(null==a&&(a=\"data\"),s.doit&&0!==e.length)for(\"screen\"===a?(O=r[0],P=r[1],v=[this.plot_view.canvas.v_vx_to_sx(O),this.plot_view.canvas.v_vy_to_sy(P)],M=v[0],T=v[1]):(u=r[0],c=r[1],g=this.plot_view.map_to_screen(u,c,this.model.x_range_name,this.model.y_range_name),M=g[0],T=g[1]),b=this.model.normals,d=b[0],y=b[1],w=this.model.offsets,A=w[0],E=w[1],f=d*(A+o),m=y*(E+o),s.set_value(t),this.model.panel.apply_label_text_heuristics(t,n),l=_.isString(n)?this.model.panel.get_label_angle_heuristic(n):-n,h=p=0,x=M.length;0<=x?p<x:p>x;h=0<=x?++p:--p)k=Math.round(M[h]+f),S=Math.round(T[h]+m),t.translate(k,S),t.rotate(l),t.fillText(e[h],0,0),t.rotate(-l),t.translate(-k,-S)},e.prototype._axis_label_extent=function(){var t,e;return null==this.model.axis_label||\"\"===this.model.axis_label?0:(t=this.model.axis_label_standoff,e=this.visuals.axis_label_text,this._oriented_labels_extent([this.model.axis_label],\"parallel\",this.model.panel_side,t,e))},e.prototype._tick_extent=function(){return this.model.major_tick_out},e.prototype._tick_label_extent=function(){return c.sum(this._tick_label_extents())},e.prototype._tick_label_extents=function(){var t,e,r,n,i;return t=this.model.tick_coords.major,e=this.model.compute_labels(t[this.model.dimension]),\n",
" r=this.model.major_label_orientation,n=this.model.major_label_standoff,i=this.visuals.major_label_text,[this._oriented_labels_extent(e,r,this.model.panel_side,n,i)]},e.prototype._tick_label_extent=function(){return c.sum(this._tick_label_extents())},e.prototype._oriented_labels_extent=function(t,e,r,n,i){var o,s,a,l,u,c,h,p,d,f,y,m;if(0===t.length)return 0;for(a=this.plot_view.canvas_view.ctx,i.set_value(a),_.isString(e)?(c=1,o=this.model.panel.get_label_angle_heuristic(e)):(c=2,o=-e),o=Math.abs(o),s=Math.cos(o),f=Math.sin(o),l=0,h=p=0,d=t.length;0<=d?p<d:p>d;h=0<=d?++p:--p)m=1.1*a.measureText(t[h]).width,u=.9*a.measureText(t[h]).ascent,y=\"above\"===r||\"below\"===r?m*f+u/c*s:m*s+u/c*f,y>l&&(l=y);return l>0&&(l+=n),l},e}(a.RendererView),r.Axis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.AxisView,e.prototype.type=\"Axis\",e.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),e.define({bounds:[u.Any,\"auto\"],ticker:[u.Instance,null],formatter:[u.Instance,null],x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],axis_label:[u.String,\"\"],axis_label_standoff:[u.Int,5],major_label_standoff:[u.Int,5],major_label_orientation:[u.Any,\"horizontal\"],major_label_overrides:[u.Any,{}],major_tick_in:[u.Number,2],major_tick_out:[u.Number,6],minor_tick_in:[u.Number,0],minor_tick_out:[u.Number,4]}),e.override({axis_line_color:\"black\",major_tick_line_color:\"black\",minor_tick_line_color:\"black\",major_label_text_font_size:\"8pt\",major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label_text_font_size:\"10pt\",axis_label_text_font_style:\"italic\"}),e.internal({panel_side:[u.Any]}),e.prototype.compute_labels=function(t){var e,r,n,i;for(n=this.formatter.doFormat(t,this),e=r=0,i=t.length;0<=i?r<i:r>i;e=0<=i?++r:--r)t[e]in this.major_label_overrides&&(n[e]=this.major_label_overrides[t[e]]);return n},e.prototype.label_info=function(t){var e,r;return r=this.major_label_orientation,e={dim:this.dimension,coords:t,side:this.panel_side,orient:r,standoff:this.major_label_standoff}},e.getters({computed_bounds:function(){return this._computed_bounds()},rule_coords:function(){return this._rule_coords()},tick_coords:function(){return this._tick_coords()},ranges:function(){return this._ranges()},normals:function(){return this.panel._normals},dimension:function(){return this.panel._dim},offsets:function(){return this._offsets()},loc:function(){return this._get_loc()}}),e.prototype.add_panel=function(t){return this.panel=new o.SidePanel({side:t}),this.panel.attach_document(this.document),this.panel_side=t},e.prototype._offsets=function(){var t,e,r,n,i;switch(r=this.panel_side,e=[0,0],n=e[0],i=e[1],t=this.plot.plot_canvas.frame,r){case\"below\":i=Math.abs(this.panel._top.value-t._bottom.value);break;case\"above\":i=Math.abs(this.panel._bottom.value-t._top.value);break;case\"right\":n=Math.abs(this.panel._left.value-t._right.value);break;case\"left\":n=Math.abs(this.panel._right.value-t._left.value)}return[n,i]},e.prototype._ranges=function(){var t,e,r,n;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,n=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[n[e],n[r]]},e.prototype._computed_bounds=function(){var t,e,r,n,i,o,s,a;return i=this.ranges,r=i[0],t=i[1],a=null!=(o=this.bounds)?o:\"auto\",n=[r.min,r.max],\"auto\"===a?n:_.isArray(a)?(Math.abs(a[0]-a[1])>Math.abs(n[0]-n[1])?(s=Math.max(Math.min(a[0],a[1]),n[0]),e=Math.min(Math.max(a[0],a[1]),n[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])),[s,e]):(l.logger.error(\"user bounds '\"+a+\"' not understood\"),null)},e.prototype._rule_coords=function(){var t,e,r,n,i,o,s,a,l,u,c;return n=this.dimension,i=(n+1)%2,s=this.ranges,o=s[0],e=s[1],a=this.computed_bounds,l=a[0],r=a[1],u=new Array(2),c=new Array(2),t=[u,c],t[n][0]=Math.max(l,o.min),t[n][1]=Math.min(r,o.max),t[n][0]>t[n][1]&&(t[n][0]=t[n][1]=NaN),t[i][0]=this.loc,t[i][1]=this.loc,t},e.prototype._tick_coords=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M;for(n=this.dimension,o=(n+1)%2,y=this.ranges,p=y[0],e=y[1],m=this.computed_bounds,w=m[0],r=m[1],x=this.ticker.get_ticks(w,r,p,this.loc,{}),l=x.major,h=x.minor,k=[],M=[],t=[k,M],c=[],_=[],u=[c,_],v=[p.min,p.max],f=v[0],d=v[1],i=s=0,g=l.length;0<=g?s<g:s>g;i=0<=g?++s:--s)l[i]<f||l[i]>d||(t[n].push(l[i]),t[o].push(this.loc));for(i=a=0,b=h.length;0<=b?a<b:a>b;i=0<=b?++a:--a)h[i]<f||h[i]>d||(u[n].push(h[i]),u[o].push(this.loc));return{major:t,minor:u}},e.prototype._get_loc=function(){var t,e,r,n,i,o;switch(i=this.ranges,n=i[0],e=i[1],r=e.start,t=e.end,o=this.panel_side){case\"left\":case\"below\":return e.start;case\"right\":case\"above\":return e.end}},e}(s.GuideRenderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(67),s=t(90),a=t(178);r.CategoricalAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){return this._draw_group_separators(t,e,r)},e.prototype._draw_group_separators=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O;if(v=this.model.ranges,m=v[0],o=v[1],g=this.model.computed_bounds,S=g[0],a=g[1],f=this.model.loc,O=this.model.ticker.get_ticks(S,a,m,f,{}),b=this.model.ranges,m=b[0],o=b[1],m.tops&&!(m.tops.length<2)&&this.visuals.separator_line.doit){for(s=this.model.dimension,n=(s+1)%2,i=[[],[]],c=0,u=h=0,w=m.tops.length-1;0<=w?h<w:h>w;u=0<=w?++h:--h){for(_=p=x=c,k=m.factors.length;x<=k?p<k:p>k;_=x<=k?++p:--p)if(m.factors[_][0]===m.tops[u+1]){M=[m.factors[_-1],m.factors[_]],l=M[0],d=M[1],c=_;break}y=(m.synthetic(l)+m.synthetic(d))/2,y>S&&y<a&&(i[s].push(y),i[n].push(this.model.loc))}T=this._tick_label_extent(),this._draw_ticks(t,i,-3,T-6,this.visuals.separator_line)}},e.prototype._draw_major_labels=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f;for(a=this._get_factor_info(),c=this.model.loc,o=this.model.dimension,n=(o+1)%2,d=e.tick+this.model.major_label_standoff,s=l=0,h=a.length;0<=h?l<h:l>h;s=0<=h?++l:--l)p=a[s],u=p[0],i=p[1],_=p[2],f=p[3],this._draw_oriented_labels(t,u,i,_,this.model.panel_side,d,f),d+=e.tick_label[s]},e.prototype._tick_label_extents=function(){var t,e,r,n,i,o,s,a,l,u;for(n=this._get_factor_info(),r=[],i=0,s=n.length;i<s;i++)l=n[i],o=l[0],t=l[1],a=l[2],u=l[3],e=this._oriented_labels_extent(o,a,this.model.panel_side,this.model.major_label_standoff,u),r.push(e);return r},e.prototype._get_factor_info=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h;return l=this.model.ranges,a=l[0],e=l[1],u=this.model.computed_bounds,c=u[0],r=u[1],o=this.model.loc,_=this.model.ticker.get_ticks(c,r,a,o,{}),t=this.model.tick_coords,n=[],1===a.levels?(i=this.model.formatter.doFormat(_.major,this),n.push([i,t.major,this.model.major_label_orientation,this.visuals.major_label_text])):2===a.levels?(i=this.model.formatter.doFormat(function(){var t,e,r,n;for(r=_.major,n=[],t=0,e=r.length;t<e;t++)h=r[t],n.push(h[1]);return n}(),this),n.push([i,t.major,this.model.major_label_orientation,this.visuals.major_label_text]),n.push([_.tops,t.tops,\"parallel\",this.visuals.group_text])):3===a.levels&&(i=this.model.formatter.doFormat(function(){var t,e,r,n;for(r=_.major,n=[],t=0,e=r.length;t<e;t++)h=r[t],n.push(h[2]);return n}(),this),s=function(){var t,e,r,n;for(r=_.mids,n=[],t=0,e=r.length;t<e;t++)h=r[t],n.push(h[1]);return n}(),n.push([i,t.major,this.model.major_label_orientation,this.visuals.major_label_text]),n.push([s,t.mids,\"parallel\",this.visuals.subgroup_text]),n.push([_.tops,t.tops,\"parallel\",this.visuals.group_text])),n},e}(o.AxisView),r.CategoricalAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.CategoricalAxisView,e.prototype.type=\"CategoricalAxis\",e.mixins([\"line:separator_\",\"text:group_\",\"text:subgroup_\"]),e.override({ticker:function(){return new a.CategoricalTicker},formatter:function(){return new s.CategoricalTickFormatter},separator_line_color:\"lightgrey\",separator_line_width:2,group_text_font_style:\"bold\",group_text_font_size:\"8pt\",group_text_color:\"grey\",subgroup_text_font_style:\"bold\",subgroup_text_font_size:\"8pt\"}),e.prototype._tick_coords=function(){var t,e,r,n,i,o,s,a,l,u,c;return n=this.dimension,i=(n+1)%2,s=this.ranges,o=s[0],e=s[1],a=this.computed_bounds,l=a[0],r=a[1],u=this.ticker.get_ticks(l,r,o,this.loc,{}),t={major:[[],[]],mids:[[],[]],tops:[[],[]],minor:[]},t.major[n]=u.major,t.major[i]=function(){var t,e,r,n;for(r=u.major,n=[],t=0,e=r.length;t<e;t++)c=r[t],n.push(this.loc);return n}.call(this),3===o.levels&&(t.mids[n]=u.mids,t.mids[i]=function(){var t,e,r,n;for(r=u.mids,n=[],t=0,e=r.length;t<e;t++)c=r[t],n.push(this.loc);return n}.call(this)),o.levels>1&&(t.tops[n]=u.tops,t.tops[i]=function(){var t,e,r,n;for(r=u.tops,n=[],t=0,e=r.length;t<e;t++)c=r[t],n.push(this.loc);return n}.call(this)),t},e}(o.Axis)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(67);r.ContinuousAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ContinuousAxis\",e}(o.Axis)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(72),s=t(91),a=t(181);r.DatetimeAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(o.LinearAxisView),r.DatetimeAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.DatetimeAxisView,e.prototype.type=\"DatetimeAxis\",e.override({ticker:function(){return new a.DatetimeTicker},formatter:function(){return new s.DatetimeTickFormatter}}),e}(o.LinearAxis)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(67);r.Axis=n.Axis;var i=t(68);r.CategoricalAxis=i.CategoricalAxis;var o=t(69);r.ContinuousAxis=o.ContinuousAxis;var s=t(70);r.DatetimeAxis=s.DatetimeAxis;var a=t(72);r.LinearAxis=a.LinearAxis;var l=t(73);r.LogAxis=l.LogAxis},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(67),s=t(69),a=t(89),l=t(177);r.LinearAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(o.AxisView),r.LinearAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LinearAxisView,e.prototype.type=\"LinearAxis\",e.override({ticker:function(){return new l.BasicTicker},formatter:function(){return new a.BasicTickFormatter}}),e}(s.ContinuousAxis)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(67),s=t(69),a=t(94),l=t(185);r.LogAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(o.AxisView),r.LogAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LogAxisView,e.prototype.type=\"LogAxis\",e.override({ticker:function(){return new l.LogTicker},formatter:function(){return new a.LogTickFormatter}}),e}(s.ContinuousAxis)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(14),a=t(29),l=t(49);r.CustomJS=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.type=\"CustomJS\",r.define({args:[s.Any,{}],code:[s.String,\"\"]}),r.getters({values:function(){return this._make_values()},func:function(){return this._make_func()}}),r.prototype.execute=function(e,r){return this.func.apply(e,this.values.concat(e,r,t,{}))},r.prototype._make_values=function(){return a.values(this.args)},r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,o.call(Object.keys(this.args)).concat([\"cb_obj\"],[\"cb_data\"],[\"require\"],[\"exports\"],[this.code]),function(){})},r}(l.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(74);r.CustomJS=n.CustomJS;var i=t(76);r.OpenURL=i.OpenURL},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(14),a=t(33),l=t(38);r.OpenURL=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"OpenURL\",e.define({url:[s.String,\"http://\"]}),e.prototype.execute=function(t,e){var r,n,i,o,s;for(o=a.get_indices(e.source),n=0,i=o.length;n<i;n++)r=o[n],s=l.replace_placeholders(this.url,e.source,r),window.open(s);return null},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(10),s=t(6),a=t(12),l=t(13),u=t(14),c=t(5),_=t(24),h=t(246);null!=window.CanvasPixelArray&&(CanvasPixelArray.prototype.set=function(t){var e,r,n,i;for(i=[],e=r=0,n=this.length;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push(this[e]=t[e]);return i}),r.CanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-canvas-wrapper\",e.prototype.initialize=function(t){switch(e.__super__.initialize.call(this,t),this.map_el=this.model.map?this.el.appendChild(c.div({\"class\":\"bk-canvas-map\"})):null,this.events_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-events\"})),this.overlays_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-overlays\"})),this.model.output_backend){case\"canvas\":case\"webgl\":this.canvas_el=this.el.appendChild(c.canvas({\"class\":\"bk-canvas\"})),this._ctx=this.canvas_el.getContext(\"2d\");break;case\"svg\":this._ctx=new h,this.canvas_el=this.el.appendChild(this._ctx.getSvg())}return this.ctx=this.get_ctx(),_.fixup_ctx(this.ctx),l.logger.debug(\"CanvasView initialized\")},e.prototype.get_ctx=function(){return this._ctx},e.prototype.get_canvas_element=function(){return this.canvas_el},e.prototype.prepare_canvas=function(){var t,e,r;return r=this.model._width.value,t=this.model._height.value,this.el.style.width=r+\"px\",this.el.style.height=t+\"px\",e=_.get_scale_ratio(this.ctx,this.model.use_hidpi,this.model.output_backend),this.model.pixel_ratio=e,this.canvas_el.style.width=r+\"px\",this.canvas_el.style.height=t+\"px\",this.canvas_el.setAttribute(\"width\",r*e),this.canvas_el.setAttribute(\"height\",t*e),l.logger.debug(\"Rendering CanvasView with width: \"+r+\", height: \"+t+\", pixel ratio: \"+e)},e.prototype.set_dims=function(t){var e,r;if(r=t[0],e=t[1],0!==r&&0!==e)return null!=this._width_constraint&&this.solver.has_constraint(this._width_constraint)&&this.solver.remove_constraint(this._width_constraint),null!=this._height_constraint&&this.solver.has_constraint(this._height_constraint)&&this.solver.remove_constraint(this._height_constraint),this._width_constraint=a.EQ(this.model._width,-r),this.solver.add_constraint(this._width_constraint),this._height_constraint=a.EQ(this.model._height,-e),this.solver.add_constraint(this._height_constraint),this.solver.update_variables()},e}(s.DOMView),r.Canvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Canvas\",e.prototype.default_view=r.CanvasView,e.internal({map:[u.Boolean,!1],initial_width:[u.Number],initial_height:[u.Number],use_hidpi:[u.Boolean,!0],pixel_ratio:[u.Number,1],output_backend:[u.OutputBackend,\"canvas\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this},e.prototype.vx_to_sx=function(t){return t},e.prototype.vy_to_sy=function(t){return this._height.value-t},e.prototype.v_vx_to_sx=function(t){return new Float64Array(t)},e.prototype.v_vy_to_sy=function(t){var e,r,n,i,o,s;for(e=new Float64Array(t.length),r=this._height.value,n=i=0,o=t.length;i<o;n=++i)s=t[n],e[n]=r-s;return e},e.prototype.sx_to_vx=function(t){return t},e.prototype.sy_to_vy=function(t){return this._height.value-t},e.prototype.v_sx_to_vx=function(t){return new Float64Array(t)},e.prototype.v_sy_to_vy=function(t){var e,r,n,i,o,s;for(e=new Float64Array(t.length),r=this._height.value,n=i=0,o=t.length;i<o;n=++i)s=t[n],e[n]=r-s;return e},e}(o.LayoutCanvas)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(163),s=t(165),a=t(166),l=t(157),u=t(153),c=t(154),_=t(10),h=t(13),p=t(14);r.CartesianFrame=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CartesianFrame\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this,this._configure_scales(),this.connect(this.change,function(t){return function(){return t._configure_scales()}}(this)),null},e.prototype.get_editables=function(){return e.__super__.get_editables.call(this).concat([this._width,this._height])},e.prototype.contains=function(t,e){return t>=this._left.value&&t<=this._right.value&&e>=this._bottom.value&&e<=this._top.value},e.prototype.map_to_screen=function(t,e,r,n,i){var o,s,a,l;return null==n&&(n=\"default\"),null==i&&(i=\"default\"),a=this.xscales[n].v_compute(t),o=r.v_vx_to_sx(a),l=this.yscales[i].v_compute(e),s=r.v_vy_to_sy(l),[o,s]},e.prototype._get_ranges=function(t,e){var r,n,i;if(i={},i[\"default\"]=t,null!=e)for(n in e)r=e[n],i[n]=r;return i},e.prototype._get_scales=function(t,e,r){var n,i,_,h;h={};for(n in e){if(i=e[n],i instanceof u.DataRange1d||i instanceof l.Range1d){if(!(t instanceof a.LogScale||t instanceof s.LinearScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);if(t instanceof o.CategoricalScale)throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type)}if(i instanceof c.FactorRange&&!(t instanceof o.CategoricalScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);t instanceof a.LogScale&&i instanceof u.DataRange1d&&(i.scale_hint=\"log\"),_=t.clone(),_.setv({source_range:i,target_range:r}),h[n]=_}return h},e.prototype._configure_frame_ranges=function(){return this._h_range=new l.Range1d({start:this._left.value,end:this._left.value+this._width.value}),this._v_range=new l.Range1d({start:this._bottom.value,end:this._bottom.value+this._height.value})},e.prototype._configure_scales=function(){return this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._xscales=this._get_scales(this.x_scale,this._x_ranges,this._h_range),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_range)},e.prototype._update_scales=function(){var t,e,r,n;this._configure_frame_ranges(),e=this._xscales;for(t in e)n=e[t],n.target_range=this._h_range;r=this._yscales;for(t in r)n=r[t],n.target_range=this._v_range;return null},e.getters({h_range:function(){return this._h_range},v_range:function(){return this._v_range},x_ranges:function(){return this._x_ranges},y_ranges:function(){return this._y_ranges},xscales:function(){return this._xscales},yscales:function(){return this._yscales},x_mappers:function(){return h.logger.warn(\"x_mappers attr is deprecated, use xscales\"),this._xscales},y_mappers:function(){return h.logger.warn(\"y_mappers attr is deprecated, use yscales\"),this._yscales}}),e.internal({extra_x_ranges:[p.Any,{}],extra_y_ranges:[p.Any,{}],x_range:[p.Instance],y_range:[p.Instance],x_scale:[p.Instance],y_scale:[p.Instance]}),e}(_.LayoutCanvas)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(77);r.Canvas=n.Canvas;var i=t(78);r.CartesianFrame=i.CartesianFrame},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49);r.Expression=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._connected={},this._result={}},e.prototype._v_compute=function(t){return null==this._connected[t.id]&&(this.connect(t.change,function(){return this._result[t.id]=null}),this._connected[t.id]=!0),null!=this._result[t.id]?this._result[t.id]:(this._result[t.id]=this.v_compute(t),this._result[t.id])},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(80);r.Expression=n.Expression;var i=t(82);r.Stack=i.Stack},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(80),s=t(14);r.Stack=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({fields:[s.Array,[]]}),e.prototype.v_compute=function(t){var e,r,n,i,o,s,a,l,u,c;for(u=new Float64Array(t.get_length()),a=this.fields,n=0,o=a.length;n<o;n++)for(e=a[n],l=t.data[e],r=i=0,s=l.length;i<s;r=++i)c=l[r],u[r]+=c;return u},e}(o.Expression)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(85),s=t(14),a=t(13),l=t(21),u=t(41);r.BooleanFilter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"BooleanFilter\",e.define({booleans:[s.Array,null]}),e.prototype.compute_indices=function(t){var e,r,n;return(null!=(r=this.booleans)?r.length:void 0)>0?l.all(this.booleans,u.isBoolean)?(this.booleans.length!==t.get_length()&&a.logger.warn(\"BooleanFilter \"+this.id+\": length of booleans doesn't match data source\"),function(){var t,r,n,i;for(n=l.range(0,this.booleans.length),i=[],t=0,r=n.length;t<r;t++)e=n[t],this.booleans[e]===!0&&i.push(e);return i}.call(this)):(a.logger.warn(\"BooleanFilter \"+this.id+\": booleans should be array of booleans, defaulting to no filtering\"),null):(0===(null!=(n=this.booleans)?n.length:void 0)?a.logger.warn(\"BooleanFilter \"+this.id+\": booleans is empty, defaulting to no filtering\"):a.logger.warn(\"BooleanFilter \"+this.id+\": booleans was not set, defaulting to no filtering\"),null)},e}(o.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(85),a=t(14),l=t(29);r.CustomJSFilter=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.type=\"CustomJSFilter\",r.define({args:[a.Any,{}],code:[a.String,\"\"]}),r.getters({values:function(){return this._make_values()},func:function(){return this._make_func()}}),r.prototype.compute_indices=function(e){return this.filter=this.func.apply(this,o.call(this.values).concat([e],[t],[{}])),r.__super__.compute_indices.call(this)},r.prototype._make_values=function(){return l.values(this.args)},r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,o.call(Object.keys(this.args)).concat([\"source\"],[\"require\"],[\"exports\"],[this.code]),function(){})},r}(s.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(14),a=t(41),l=t(21),u=t(13);r.Filter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Filter\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.define({filter:[s.Array,null]}),e.prototype.compute_indices=function(){var t,e;return(null!=(e=this.filter)?e.length:void 0)>=0?l.all(this.filter,a.isBoolean)?function(){var e,r,n,i;for(n=l.range(0,this.filter.length),i=[],e=0,r=n.length;e<r;e++)t=n[e],this.filter[t]===!0&&i.push(t);return i}.call(this):l.all(this.filter,a.isInteger)?this.filter:(u.logger.warn(\"Filter \"+this.id+\": filter should either be array of only booleans or only integers, defaulting to no filtering\"),null):(u.logger.warn(\"Filter \"+this.id+\": filter was not set to be an array, defaulting to no filtering\"),null)},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(85),s=t(14),a=t(13);r.GroupFilter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GroupFilter\",e.define({column_name:[s.String],group:[s.String]}),e.prototype.compute_indices=function(t){var e,r;return e=t.get_column(this.column_name),null==e?(a.logger.warn(\"group filter: groupby column not found in data source\"),null):(this.indices=function(){var n,i,o;for(o=[],r=n=0,i=t.get_length();0<=i?n<i:n>i;r=0<=i?++n:--n)e[r]===this.group&&o.push(r);return o}.call(this),0===this.indices.length&&a.logger.warn(\"group filter: group '\"+this.group+\"' did not match any values in column '\"+this.column_name+\"'\"),this.indices)},e}(o.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(83);r.BooleanFilter=n.BooleanFilter;var i=t(84);r.CustomJSFilter=i.CustomJSFilter;var o=t(85);r.Filter=o.Filter;var s=t(86);r.GroupFilter=s.GroupFilter;var a=t(88);r.IndexFilter=a.IndexFilter},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(85),s=t(14),a=t(13),l=t(41),u=t(21);r.IndexFilter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"IndexFilter\",e.define({indices:[s.Array,null]}),e.prototype.compute_indices=function(t){var e;return(null!=(e=this.indices)?e.length:void 0)>=0?u.all(this.indices,l.isInteger)?this.indices:(a.logger.warn(\"IndexFilter \"+this.id+\": indices should be array of integers, defaulting to no filtering\"),null):(a.logger.warn(\"IndexFilter \"+this.id+\": indices was not set, defaulting to no filtering\"),null)},e}(o.Filter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(98),s=t(14),a=t(41);r.BasicTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"BasicTickFormatter\",e.define({precision:[s.Any,\"auto\"],use_scientific:[s.Bool,!0],power_limit_high:[s.Number,5],power_limit_low:[s.Number,-3]}),e.getters({scientific_limit_low:function(){return Math.pow(10,this.power_limit_low)},scientific_limit_high:function(){return Math.pow(10,this.power_limit_high)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.last_precision=3},e.prototype.doFormat=function(t,e){var r,n,i,o,s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k;if(0===t.length)return[];if(k=0,t.length>=2&&(k=Math.abs(t[1]-t[0])/1e4),h=!1,this.use_scientific)for(i=0,u=t.length;i<u;i++)if(b=t[i],w=Math.abs(b),w>k&&(w>=this.scientific_limit_high||w<=this.scientific_limit_low)){h=!0;break}if(d=this.precision,null==d||a.isNumber(d)){if(l=new Array(t.length),h)for(r=o=0,f=t.length;0<=f?o<f:o>f;r=0<=f?++o:--o)l[r]=t[r].toExponential(d||void 0);else for(r=s=0,y=t.length;0<=y?s<y:s>y;r=0<=y?++s:--s)l[r]=t[r].toFixed(d||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return l}if(\"auto\"===d)for(l=new Array(t.length),x=c=m=this.last_precision;m<=15?c<=15:c>=15;x=m<=15?++c:--c){if(n=!0,h){for(r=_=0,v=t.length;0<=v?_<v:_>v;r=0<=v?++_:--_)if(l[r]=t[r].toExponential(x),r>0&&l[r]===l[r-1]){n=!1;break}if(n)break}else{for(r=p=0,g=t.length;0<=g?p<g:p>g;r=0<=g?++p:--p)if(l[r]=t[r].toFixed(x).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),r>0&&l[r]===l[r-1]){n=!1;break}if(n)break}if(n)return this.last_precision=x,l}return l},e}(o.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(98);r.CategoricalTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CategoricalTickFormatter\",e.prototype.doFormat=function(t,e){return t},e}(o.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(359),u=t(360),c=t(98),_=t(13),h=t(14),p=t(21),d=t(41);o=function(t){return Math.round(t/1e3%1*1e6)},n=function(t){return u(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})},i=function(t,e){var r;return d.isFunction(e)?e(t):(r=l.sprintf(\"$1%06d\",o(t)),e=e.replace(/((^|[^%])(%%)*)%f/,r),e.indexOf(\"%\")===-1?e:u(t,e))},r.DatetimeTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"DatetimeTickFormatter\",e.define({microseconds:[h.Array,[\"%fus\"]],milliseconds:[h.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[h.Array,[\"%Ss\"]],minsec:[h.Array,[\":%M:%S\"]],minutes:[h.Array,[\":%M\",\"%Mm\"]],hourmin:[h.Array,[\"%H:%M\"]],hours:[h.Array,[\"%Hh\",\"%H:%M\"]],days:[h.Array,[\"%m/%d\",\"%a%d\"]],months:[h.Array,[\"%m/%Y\",\"%b%y\"]],years:[h.Array,[\"%Y\"]]}),e.prototype.format_order=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],e.prototype.strip_leading_zeros=!0,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._update_width_formats()},e.prototype._update_width_formats=function(){var t,e;return e=u(new Date),t=function(t){var r,n,o;return n=function(){var n,o,s;\n",
" for(s=[],n=0,o=t.length;n<o;n++)r=t[n],s.push(i(e,r).length);return s}(),o=p.sortBy(p.zip(n,t),function(t){var e,r;return r=t[0],e=t[1],r}),p.unzip(o)},this._width_formats={microseconds:t(this.microseconds),milliseconds:t(this.milliseconds),seconds:t(this.seconds),minsec:t(this.minsec),minutes:t(this.minutes),hourmin:t(this.hourmin),hours:t(this.hours),days:t(this.days),months:t(this.months),years:t(this.years)}},e.prototype._get_resolution_str=function(t,e){var r;switch(r=1.1*t,!1){case!(r<.001):return\"microseconds\";case!(r<1):return\"milliseconds\";case!(r<60):return e>=60?\"minsec\":\"seconds\";case!(r<3600):return e>=3600?\"hourmin\":\"minutes\";case!(r<86400):return\"hours\";case!(r<2678400):return\"days\";case!(r<31536e3):return\"months\";default:return\"years\"}},e.prototype.doFormat=function(t,e,r,o,s,a){var l,u,c,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F;if(null==r&&(r=null),null==o&&(o=null),null==s&&(s=.3),null==a&&(a=null),0===t.length)return[];if(j=Math.abs(t[t.length-1]-t[0])/1e3,M=a?a.resolution:j/(t.length-1),P=this._get_resolution_str(M,j),S=this._width_formats[P],F=S[0],h=S[1],c=h[0],o){for(p=[],f=y=0,T=F.length;0<=T?y<T:y>T;f=0<=T?++y:--y)F[f]*t.length<s*o&&p.push(this._width_formats[f]);p.length>0&&(c=p[p.length-1])}for(g=[],A=this.format_order.indexOf(P),N={},O=this.format_order,m=0,b=O.length;m<b;m++)u=O[m],N[u]=0;for(N.seconds=5,N.minsec=4,N.minutes=4,N.hourmin=3,N.hours=3,v=0,w=t.length;v<w;v++){C=t[v];try{D=n(C),E=i(C,c)}catch(I){l=I,_.logger.warn(\"unable to format tick for timestamp value \"+C),_.logger.warn(\" - \"+l),g.push(\"ERR\");continue}for(d=!1,k=A;0===D[N[this.format_order[k]]]&&(k+=1,k!==this.format_order.length);){if((\"minsec\"===P||\"hourmin\"===P)&&!d){if(\"minsec\"===P&&0===D[4]&&0!==D[5]||\"hourmin\"===P&&0===D[3]&&0!==D[4]){x=this._width_formats[this.format_order[A-1]][1][0],E=i(C,x);break}d=!0}x=this._width_formats[this.format_order[k]][1][0],E=i(C,x)}this.strip_leading_zeros?(z=E.replace(/^0+/g,\"\"),z!==E&&isNaN(parseInt(z))&&(z=\"0\"+z),g.push(z)):g.push(E)}return g},e}(c.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(98),a=t(14),l=t(29);r.FuncTickFormatter=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.type=\"FuncTickFormatter\",r.define({args:[a.Any,{}],code:[a.String,\"\"]}),r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,[\"tick\"].concat(o.call(Object.keys(this.args)),[\"require\"],[this.code]),function(){})},r.prototype.doFormat=function(e,r){var n,i;return n=this._make_func(),function(){var r,s,a;for(a=[],r=0,s=e.length;r<s;r++)i=e[r],a.push(n.apply(null,[i].concat(o.call(l.values(this.args)),[t])));return a}.call(this)},r}(s.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(89);r.BasicTickFormatter=n.BasicTickFormatter;var i=t(90);r.CategoricalTickFormatter=i.CategoricalTickFormatter;var o=t(91);r.DatetimeTickFormatter=o.DatetimeTickFormatter;var s=t(92);r.FuncTickFormatter=s.FuncTickFormatter;var a=t(94);r.LogTickFormatter=a.LogTickFormatter;var l=t(95);r.MercatorTickFormatter=l.MercatorTickFormatter;var u=t(96);r.NumeralTickFormatter=u.NumeralTickFormatter;var c=t(97);r.PrintfTickFormatter=c.PrintfTickFormatter;var _=t(98);r.TickFormatter=_.TickFormatter},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(89),s=t(98),a=t(13),l=t(14);r.LogTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LogTickFormatter\",e.define({ticker:[l.Instance,null]}),e.prototype.initialize=function(t,r){if(e.__super__.initialize.call(this,t,r),this.basic_formatter=new o.BasicTickFormatter,null==this.ticker)return a.logger.warn(\"LogTickFormatter not configured with a ticker, using default base of 10 (labels will be incorrect if ticker base is not 10)\")},e.prototype.doFormat=function(t,e){var r,n,i,o,s,a;if(0===t.length)return[];for(r=null!=this.ticker?this.ticker.base:10,a=!1,o=new Array(t.length),n=i=0,s=t.length;0<=s?i<s:i>s;n=0<=s?++i:--i)if(o[n]=r+\"^\"+Math.round(Math.log(t[n])/Math.log(r)),n>0&&o[n]===o[n-1]){a=!0;break}return a&&(o=this.basic_formatter.doFormat(t)),o},e}(s.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(89),s=t(14),a=t(30);r.MercatorTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MercatorTickFormatter\",e.define({dimension:[s.LatLon]}),e.prototype.doFormat=function(t,r){var n,i,o,s,l,u,c,_,h,p;if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0===t.length)return[];if(u=new Array(t.length),\"lon\"===this.dimension)for(n=i=0,c=t.length;0<=c?i<c:i>c;n=0<=c?++i:--i)_=a.proj4(a.mercator).inverse([t[n],r.loc]),l=_[0],s=_[1],u[n]=l;else for(n=o=0,h=t.length;0<=h?o<h:o>h;n=0<=h?++o:--o)p=a.proj4(a.mercator).inverse([r.loc,t[n]]),l=p[0],s=p[1],u[n]=s;return e.__super__.doFormat.call(this,u,r)},e}(o.BasicTickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(329),s=t(98),a=t(14);r.NumeralTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NumeralTickFormatter\",e.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),e.prototype.doFormat=function(t,e){var r,n,i,s,a;return r=this.format,i=this.language,s=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),n=function(){var e,n,l;for(l=[],e=0,n=t.length;e<n;e++)a=t[e],l.push(o.format(a,r,i,s));return l}()},e}(s.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(359),s=t(98),a=t(14);r.PrintfTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"PrintfTickFormatter\",e.define({format:[a.String,\"%s\"]}),e.prototype.doFormat=function(t,e){var r,n,i;return r=this.format,n=function(){var e,n,s;for(s=[],e=0,n=t.length;e<n;e++)i=t[e],s.push(o.sprintf(r,i));return s}()},e}(s.TickFormatter)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49);r.TickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TickFormatter\",e.prototype.doFormat=function(t,e){},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14),l=t(28);r.AnnularWedgeView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){var t,e,r,n;for(\"data\"===this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"===this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius,this._angle=new Float32Array(this._start_angle.length),n=[],t=e=0,r=this._start_angle.length;0<=r?e<r:e>r;t=0<=r?++e:--e)n.push(this._angle[t]=this._end_angle[t]-this._start_angle[t]);return n},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p;for(h=r.sx,p=r.sy,i=r._start_angle,n=r._angle,c=r.sinner_radius,_=r.souter_radius,o=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(h[s]+p[s]+c[s]+_[s]+i[s]+n[s])||(t.translate(h[s],p[s]),t.rotate(i[s]),t.moveTo(_[s],0),t.beginPath(),t.arc(0,0,_[s],0,n[s],o),t.rotate(n[s]),t.lineTo(c[s],0),t.arc(0,0,c[s],0,-n[s],!o),t.closePath(),t.rotate(-n[s]-i[s]),t.translate(-h[s],-p[s]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,s),u.push(t.stroke())):u.push(void 0));return u},e.prototype._hit_point=function(t){var e,r,n,i,o,a,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F,I,B;for(y=[t.vx,t.vy],O=y[0],E=y[1],C=this.renderer.xscale.invert(O),F=this.renderer.yscale.invert(E),\"data\"===this.model.properties.outer_radius.units?(N=C-this.max_outer_radius,D=C+this.max_outer_radius,I=F-this.max_outer_radius,B=F+this.max_outer_radius):(P=O-this.max_outer_radius,A=O+this.max_outer_radius,m=this.renderer.xscale.v_invert([P,A]),N=m[0],D=m[1],j=E-this.max_outer_radius,z=E+this.max_outer_radius,v=this.renderer.yscale.v_invert([j,z]),I=v[0],B=v[1]),n=[],r=s.validate_bbox_coords([N,D],[I,B]),g=this.index.indices(r),_=0,p=g.length;_<p;_++)u=g[_],f=Math.pow(this.souter_radius[u],2),c=Math.pow(this.sinner_radius[u],2),x=this.renderer.xscale.compute(C),k=this.renderer.xscale.compute(this._x[u]),S=this.renderer.yscale.compute(F),T=this.renderer.yscale.compute(this._y[u]),o=Math.pow(x-k,2)+Math.pow(S-T,2),o<=f&&o>=c&&n.push([u,o]);for(i=this.model.properties.direction.value(),a=[],h=0,d=n.length;h<d;h++)b=n[h],u=b[0],o=b[1],w=this.renderer.plot_view.canvas.vx_to_sx(O),M=this.renderer.plot_view.canvas.vy_to_sy(E),e=Math.atan2(M-this.sy[u],w-this.sx[u]),l.angle_between(-e,-this._start_angle[u],-this._end_angle[u],i)&&a.push([u,o]);return s.create_1d_hit_test_result(a)},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e.prototype._scxy=function(t){var e,r;return r=(this.sinner_radius[t]+this.souter_radius[t])/2,e=(this._start_angle[t]+this._end_angle[t])/2,{x:this.sx[t]+r*Math.cos(e),y:this.sy[t]+r*Math.sin(e)}},e.prototype.scx=function(t){return this._scxy(t).x},e.prototype.scy=function(t){return this._scxy(t).y},e}(o.XYGlyphView),r.AnnularWedge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.AnnularWedgeView,e.prototype.type=\"AnnularWedge\",e.mixins([\"line\",\"fill\"]),e.define({direction:[a.Direction,\"anticlock\"],inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec],start_angle:[a.AngleSpec],end_angle:[a.AngleSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14);r.AnnulusView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"===this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f;for(d=r.sx,f=r.sy,h=r.sinner_radius,p=r.souter_radius,_=[],s=0,l=e.length;s<l;s++)if(i=e[s],!isNaN(d[i]+f[i]+h[i]+p[i])){if(o=navigator.userAgent.indexOf(\"MSIE\")>=0||navigator.userAgent.indexOf(\"Trident\")>0||navigator.userAgent.indexOf(\"Edge\")>0,this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(t,i),t.beginPath(),o)for(c=[!1,!0],a=0,u=c.length;a<u;a++)n=c[a],t.arc(d[i],f[i],h[i],0,Math.PI,n),t.arc(d[i],f[i],p[i],Math.PI,0,!n);else t.arc(d[i],f[i],h[i],0,2*Math.PI,!0),t.arc(d[i],f[i],p[i],2*Math.PI,0,!1);t.fill()}this.visuals.line.doit?(this.visuals.line.set_vectorize(t,i),t.beginPath(),t.arc(d[i],f[i],h[i],0,2*Math.PI),t.moveTo(d[i]+p[i],f[i]),t.arc(d[i],f[i],p[i],0,2*Math.PI),_.push(t.stroke())):_.push(void 0)}return _},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k;for(c=[t.vx,t.vy],y=c[0],m=c[1],v=this.renderer.xscale.invert(y),g=v-this.max_radius,b=v+this.max_radius,w=this.renderer.yscale.invert(m),x=w-this.max_radius,k=w+this.max_radius,n=[],e=s.validate_bbox_coords([g,b],[x,k]),_=this.index.indices(e),a=0,l=_.length;a<l;a++)i=_[a],u=Math.pow(this.souter_radius[i],2),o=Math.pow(this.sinner_radius[i],2),h=this.renderer.xscale.compute(v),p=this.renderer.xscale.compute(this._x[i]),d=this.renderer.yscale.compute(w),f=this.renderer.yscale.compute(this._y[i]),r=Math.pow(h-p,2)+Math.pow(d-f,2),r<=u&&r>=o&&n.push([i,r]);return s.create_1d_hit_test_result(n)},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_,h;return a=[o],_={},_[o]=(e+r)/2,h={},h[o]=(n+i)/2,l=.5*Math.min(Math.abs(r-e),Math.abs(i-n)),u={},u[o]=.4*l,c={},c[o]=.8*l,s={sx:_,sy:h,sinner_radius:u,souter_radius:c},this._render(t,a,s)},e}(o.XYGlyphView),r.Annulus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.AnnulusView,e.prototype.type=\"Annulus\",e.mixins([\"line\",\"fill\"]),e.define({inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.ArcView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;if(_=r.sx,h=r.sy,c=r.sradius,i=r._start_angle,n=r._end_angle,this.visuals.line.doit){for(o=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(_[s]+h[s]+c[s]+i[s]+n[s])||(t.beginPath(),t.arc(_[s],h[s],c[s],i[s],n[s],o),this.visuals.line.set_vectorize(t,s),u.push(t.stroke()));return u}},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Arc=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ArcView,e.prototype.type=\"Arc\",e.mixins([\"line\"]),e.define({direction:[s.Direction,\"anticlock\"],radius:[s.DistanceSpec],start_angle:[s.AngleSpec],end_angle:[s.AngleSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(35),a=t(106);n=function(t,e,r,n,i,o,s,a){var l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M;for(x=[],_=[[],[]],p=y=0;y<=2;p=++y)if(0===p?(u=6*t-12*r+6*i,l=-3*t+9*r-9*i+3*s,h=3*r-3*t):(u=6*e-12*n+6*o,l=-3*e+9*n-9*o+3*a,h=3*n-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;g=-h/u,0<g&&g<1&&x.push(g)}else c=u*u-4*h*l,v=Math.sqrt(c),c<0||(b=(-u+v)/(2*l),0<b&&b<1&&x.push(b),w=(-u-v)/(2*l),0<w&&w<1&&x.push(w));for(d=x.length,f=d;d--;)g=x[d],m=1-g,k=m*m*m*t+3*m*m*g*r+3*m*g*g*i+g*g*g*s,_[0][d]=k,M=m*m*m*e+3*m*m*g*n+3*m*g*g*o+g*g*g*a,_[1][d]=M;return _[0][f]=t,_[1][f]=e,_[0][f+1]=s,_[1][f+1]=a,[Math.min.apply(null,_[0]),Math.max.apply(null,_[1]),Math.max.apply(null,_[0]),Math.min.apply(null,_[1])]},r.BezierView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._index_data=function(){var t,e,r,i,o,a,l,u,c;for(r=[],t=e=0,i=this._x0.length;0<=i?e<i:e>i;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx0[t]+this._cy0[t]+this._cx1[t]+this._cy1[t])||(o=n(this._x0[t],this._y0[t],this._x1[t],this._y1[t],this._cx0[t],this._cy0[t],this._cx1[t],this._cy1[t]),a=o[0],u=o[1],l=o[2],c=o[3],r.push({minX:a,minY:u,maxX:l,maxY:c,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f;if(h=r.sx0,d=r.sy0,p=r.sx1,f=r.sy1,a=r.scx,l=r.scx0,c=r.scy0,u=r.scx1,_=r.scy1,this.visuals.line.doit){for(s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(h[n]+d[n]+p[n]+f[n]+l[n]+c[n]+u[n]+_[n])||(t.beginPath(),t.moveTo(h[n],d[n]),t.bezierCurveTo(l[n],c[n],u[n],_[n],p[n],f[n]),this.visuals.line.set_vectorize(t,n),s.push(t.stroke()));return s}},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(a.GlyphView),r.Bezier=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BezierView,e.prototype.type=\"Bezier\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx0\",\"cy0\"],[\"cx1\",\"cy1\"]]),e.mixins([\"line\"]),e}(a.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(35),s=t(106),a=t(9);r.BoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_box=function(t){var e,r,n,i,s,a,l,u,c;for(s=[],r=n=0,l=t;0<=l?n<l:n>l;r=0<=l?++n:--n)u=this._lrtb(r),i=u[0],a=u[1],c=u[2],e=u[3],!isNaN(i+a+c+e)&&isFinite(i+a+c+e)&&s.push({minX:i,minY:e,maxX:a,maxY:c,i:r});return new o.RBush(s)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(l[n]+c[n]+u[n]+a[n])||(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fillRect(l[n],c[n],u[n]-l[n],a[n]-c[n])),this.visuals.line.doit?(t.beginPath(),t.rect(l[n],c[n],u[n]-l[n],a[n]-c[n]),this.visuals.line.set_vectorize(t,n),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,n,i,o,s,l;return r=[t.vx,t.vy],i=r[0],o=r[1],s=this.renderer.xscale.invert(i),l=this.renderer.yscale.invert(o),e=this.index.indices({minX:s,minY:l,maxX:s,maxY:l}),n=a.create_hit_test_result(),n[\"1d\"].indices=e,n},e.prototype._hit_span=function(t){var e,r,n,i,o,s,l,u,c,_,h,p,d;return l=[t.vx,t.vy],_=l[0],h=l[1],\"v\"===t.direction?(d=this.renderer.yscale.invert(h),r=this.renderer.plot_view.frame.h_range,o=this.renderer.xscale.invert(r.min),n=this.renderer.xscale.invert(r.max),e=this.index.indices({minX:o,minY:d,maxX:n,maxY:d})):(p=this.renderer.xscale.invert(_),c=this.renderer.plot_view.frame.v_range,s=this.renderer.yscale.invert(c.min),i=this.renderer.yscale.invert(c.max),e=this.index.indices({minX:p,minY:s,maxX:p,maxY:i})),u=a.create_hit_test_result(),u[\"1d\"].indices=e,u},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e}(s.GlyphView),r.Box=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14);r.CircleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){var t,e;return null!=this._radius?\"data\"===this.model.properties.radius.spec.units?(t=this.model.properties.radius_dimension.spec.value,this.sradius=this.sdist(this.renderer[t+\"scale\"],this[\"_\"+t],this._radius)):(this.sradius=this._radius,this.max_size=2*this.max_radius):this.sradius=function(){var t,r,n,i;for(n=this._size,i=[],t=0,r=n.length;t<r;t++)e=n[t],i.push(e/2);return i}.call(this)},e.prototype._mask_data=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y;return r=this.renderer.plot_view.frame.h_range,h=this.renderer.plot_view.frame.v_range,null!=this._radius&&\"data\"===this.model.properties.radius.units?(l=r.start,u=r.end,n=this.renderer.xscale.v_invert([l,u]),p=n[0],d=n[1],p-=this.max_radius,d+=this.max_radius,c=h.start,_=h.end,i=this.renderer.yscale.v_invert([c,_]),f=i[0],y=i[1],f-=this.max_radius,y+=this.max_radius):(l=r.start-this.max_size,u=r.end+this.max_size,o=this.renderer.xscale.v_invert([l,u]),p=o[0],d=o[1],c=h.start-this.max_size,_=h.end+this.max_size,a=this.renderer.yscale.v_invert([c,_]),f=a[0],y=a[1]),e=s.validate_bbox_coords([p,d],[f,y]),this.index.indices(e)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u;for(l=r.sx,u=r.sy,a=r.sradius,s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(l[n]+u[n]+a[n])||(t.beginPath(),t.arc(l[n],u[n],a[n],0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,n),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N;if(h=[t.vx,t.vy],k=h[0],T=h[1],A=this.renderer.xscale.invert(k),z=this.renderer.yscale.invert(T),null!=this._radius&&\"data\"===this.model.properties.radius.units?(E=A-this.max_radius,j=A+this.max_radius,C=z-this.max_radius,N=z+this.max_radius):(M=k-this.max_size,S=k+this.max_size,p=this.renderer.xscale.v_invert([M,S]),E=p[0],j=p[1],d=[Math.min(E,j),Math.max(E,j)],E=d[0],j=d[1],O=T-this.max_size,P=T+this.max_size,f=this.renderer.yscale.v_invert([O,P]),C=f[0],N=f[1],y=[Math.min(C,N),Math.max(C,N)],C=y[0],N=y[1]),e=s.validate_bbox_coords([E,j],[C,N]),r=this.index.indices(e),i=[],null!=this._radius&&\"data\"===this.model.properties.radius.units)for(a=0,u=r.length;a<u;a++)o=r[a],_=Math.pow(this.sradius[o],2),v=this.renderer.xscale.compute(A),g=this.renderer.xscale.compute(this._x[o]),w=this.renderer.yscale.compute(z),x=this.renderer.yscale.compute(this._y[o]),n=Math.pow(v-g,2)+Math.pow(w-x,2),n<=_&&i.push([o,n]);else for(m=this.renderer.plot_view.canvas.vx_to_sx(k),b=this.renderer.plot_view.canvas.vy_to_sy(T),l=0,c=r.length;l<c;l++)o=r[l],_=Math.pow(this.sradius[o],2),n=Math.pow(this.sx[o]-m,2)+Math.pow(this.sy[o]-b,2),n<=_&&i.push([o,n]);return s.create_1d_hit_test_result(i)},e.prototype._hit_span=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S;return u=[t.vx,t.vy],y=u[0],g=u[1],c=this.bounds(),o=c.minX,a=c.minY,n=c.maxX,i=c.maxY,f=s.create_hit_test_result(),\"h\"===t.direction?(M=a,S=i,null!=this._radius&&\"data\"===this.model.properties.radius.units?(m=y-this.max_radius,v=y+this.max_radius,_=this.renderer.xscale.v_invert([m,v]),x=_[0],k=_[1]):(l=this.max_size/2,m=y-l,v=y+l,h=this.renderer.xscale.v_invert([m,v]),x=h[0],k=h[1])):(x=o,k=n,null!=this._radius&&\"data\"===this.model.properties.radius.units?(b=g-this.max_radius,w=g+this.max_radius,p=this.renderer.yscale.v_invert([b,w]),M=p[0],S=p[1]):(l=this.max_size/2,b=g-l,w=g+l,d=this.renderer.yscale.v_invert([b,w]),M=d[0],S=d[1])),e=s.validate_bbox_coords([x,k],[M,S]),r=this.index.indices(e),f[\"1d\"].indices=r,f},e.prototype._hit_rect=function(t){var e,r,n,i,o,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1]),o=r[0],a=r[1],n=this.renderer.yscale.v_invert([t.vy0,t.vy1]),l=n[0],u=n[1],e=s.validate_bbox_coords([o,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_poly=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d;for(a=[t.vx,t.vy],p=a[0],d=a[1],_=this.renderer.plot_view.canvas.v_vx_to_sx(p),h=this.renderer.plot_view.canvas.v_vy_to_sy(d),e=function(){c=[];for(var t=0,e=this.sx.length;0<=e?t<e:t>e;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],n=o=0,l=e.length;0<=l?o<l:o>l;n=0<=l?++o:--o)i=e[n],s.point_in_poly(this.sx[n],this.sy[n],_,h)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c;return a=[o],u={},u[o]=(e+r)/2,c={},c[o]=(n+i)/2,l={},l[o]=.2*Math.min(Math.abs(r-e),Math.abs(i-n)),s={sx:u,sy:c,sradius:l},this._render(t,a,s)},e}(o.XYGlyphView),r.Circle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.CircleView,e.prototype.type=\"Circle\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],size:[a.DistanceSpec,{units:\"screen\",value:4}],radius:[a.DistanceSpec,null],radius_dimension:[a.String,\"x\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.properties.radius.optional=!0},e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.EllipseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"data\"===this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"===this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(u[n]+c[n]+l[n]+a[n]+this._angle[n])||(t.beginPath(),t.ellipse(u[n],c[n],l[n]/2,a[n]/2,this._angle[n],0,2*Math.PI),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,n),s.push(t.stroke())):s.push(void 0));return s},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_,h,p;return l=[o],h={},h[o]=(e+r)/2,p={},p[o]=(n+i)/2,u=this.sw[o]/this.sh[o],s=.8*Math.min(Math.abs(r-e),Math.abs(i-n)),_={},c={},u>1?(_[o]=s,c[o]=s/u):(_[o]=s*u,c[o]=s),a={sx:h,sy:p,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Ellipse=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.EllipseView,e.prototype.type=\"Ellipse\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(22),a=t(31),l=t(44),u=t(49),c=t(45),_=t(13),h=t(29),p=t(41),d=t(112);r.GlyphView=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.initialize=function(e){var n,i,o,s;if(r.__super__.initialize.call(this,e),this._nohit_warned={},this.renderer=e.renderer,this.visuals=new c.Visuals(this.model),i=this.renderer.plot_view.canvas_view.ctx,null!=i.glcanvas){try{s=t(422)}catch(a){if(o=a,\"MODULE_NOT_FOUND\"!==o.code)throw o;_.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\"),s=null}if(null!=s&&(n=s[this.model.type+\"GLGlyph\"],null!=n))return this.glglyph=new n(i.glcanvas.gl,this)}},r.prototype.set_visuals=function(t){if(this.visuals.warm_cache(t),null!=this.glglyph)return this.glglyph.set_visuals_changed()},r.prototype.render=function(t,e,r){if(t.beginPath(),null==this.glglyph||!this.glglyph.render(t,e,r))return this._render(t,e,r)},r.prototype.has_finished=function(){return!0},r.prototype.notify_finished=function(){return this.renderer.notify_finished()},r.prototype.bounds=function(){return null==this.index?s.empty():this._bounds(this.index.bbox)},r.prototype.log_bounds=function(){var t,e,r,n,i,o,a,l,u;if(null==this.index)return s.empty();for(t=s.empty(),o=this.index.search(s.positive_x()),a=this.index.search(s.positive_y()),e=0,n=o.length;e<n;e++)l=o[e],l.minX<t.minX&&(t.minX=l.minX),l.maxX>t.maxX&&(t.maxX=l.maxX);for(r=0,i=a.length;r<i;r++)u=a[r],u.minY<t.minY&&(t.minY=u.minY),u.maxY>t.maxY&&(t.maxY=u.maxY);return this._bounds(t)},r.prototype.max_wh2_bounds=function(t){return{minX:t.minX-this.max_w2,maxX:t.maxX+this.max_w2,minY:t.minY-this.max_h2,maxY:t.maxY+this.max_h2}},r.prototype.get_anchor_point=function(t,e,r){var n,i;switch(n=r[0],i=r[1],t){case\"center\":return{x:this.scx(e,n,i),y:this.scy(e,n,i)};default:return null}},r.prototype.scx=function(t){return this.sx[t]},r.prototype.scy=function(t){return this.sy[t]},r.prototype.sdist=function(t,e,r,n,i){var o,s,a,l,u,c,_;return null==n&&(n=\"edge\"),null==i&&(i=!1),null!=t.source_range.v_synthetic&&(e=t.source_range.v_synthetic(e)),\"center\"===n?(s=function(){var t,e,n;for(n=[],t=0,e=r.length;t<e;t++)o=r[t],n.push(o/2);return n}(),l=function(){var t,r,n;for(n=[],a=t=0,r=e.length;0<=r?t<r:t>r;a=0<=r?++t:--t)n.push(e[a]-s[a]);return n}(),u=function(){var t,r,n;for(n=[],a=t=0,r=e.length;0<=r?t<r:t>r;a=0<=r?++t:--t)n.push(e[a]+s[a]);return n}()):(l=e,u=function(){var t,e,n;for(n=[],a=t=0,e=l.length;0<=e?t<e:t>e;a=0<=e?++t:--t)n.push(l[a]+r[a]);return n}()),c=t.v_compute(l),_=t.v_compute(u),i?function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(Math.ceil(Math.abs(_[a]-c[a])));return r}():function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(Math.abs(_[a]-c[a]));return r}()},r.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return null},r.prototype._generic_line_legend=function(t,e,r,n,i,o){return t.save(),t.beginPath(),t.moveTo(e,(n+i)/2),t.lineTo(r,(n+i)/2),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,o),t.stroke()),t.restore()},r.prototype._generic_area_legend=function(t,e,r,n,i,o){var s,a,l,u,c,_,h,p,d;if(u=[o],d=Math.abs(r-e),a=.1*d,l=Math.abs(i-n),s=.1*l,c=e+a,_=r-a,h=n+s,p=i-s,this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fillRect(c,h,_-c,p-h)),this.visuals.line.doit)return t.beginPath(),t.rect(c,h,_-c,p-h),this.visuals.line.set_vectorize(t,o),t.stroke()},r.prototype.hit_test=function(t){var e,r;return r=null,e=\"_hit_\"+t.type,null!=this[e]?r=this[e](t):null==this._nohit_warned[t.type]&&(_.logger.debug(\"'\"+t.type+\"' selection not available for \"+this.model.type),this._nohit_warned[t.type]=!0),r},r.prototype.set_data=function(t,e,r){var n,i,o,s,l,u,c,_,p,f,y,m,v,g,b;if(n=this.model.materialize_dataspecs(t),this.visuals.set_all_indices(e),e&&!(this instanceof d.LineView)){i={};for(l in n)y=n[l],\"_\"===l.charAt(0)?i[l]=function(){var t,r,n;for(n=[],t=0,r=e.length;t<r;t++)o=e[t],n.push(y[o]);return n}():i[l]=y;n=i}if(h.extend(this,n),this.renderer.plot_view.model.use_map&&(null!=this._x&&(c=a.project_xy(this._x,this._y),\n",
" this._x=c[0],this._y=c[1]),null!=this._xs&&(_=a.project_xsys(this._xs,this._ys),this._xs=_[0],this._ys=_[1])),null!=this.renderer.plot_view.frame.x_ranges)for(v=this.renderer.plot_view.frame.x_ranges[this.model.x_range_name],b=this.renderer.plot_view.frame.y_ranges[this.model.y_range_name],p=this.model._coords,s=0,u=p.length;s<u;s++)f=p[s],m=f[0],g=f[1],m=\"_\"+m,g=\"_\"+g,null!=v.v_synthetic&&(this[m]=v.v_synthetic(this[m])),null!=b.v_synthetic&&(this[g]=b.v_synthetic(this[g]));return null!=this.glglyph&&this.glglyph.set_data_changed(this._x.length),this._set_data(t,r),this.index=this._index_data()},r.prototype._set_data=function(){},r.prototype._index_data=function(){},r.prototype.mask_data=function(t){return null!=this.glglyph?t:this._mask_data(t)},r.prototype._mask_data=function(t){return t},r.prototype._bounds=function(t){return t},r.prototype.map_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,d,f,y,m,v,g;for(i=this.model._coords,e=0,n=i.length;e<n;e++)if(o=i[e],v=o[0],g=o[1],f=\"s\"+v,m=\"s\"+g,v=\"_\"+v,g=\"_\"+g,p.isArray(null!=(s=this[v])?s[0]:void 0)||(null!=(a=this[v])&&null!=(l=a[0])?l.buffer:void 0)instanceof ArrayBuffer)for(u=[[],[]],this[f]=u[0],this[m]=u[1],t=r=0,c=this[v].length;0<=c?r<c:r>c;t=0<=c?++r:--r)_=this.map_to_screen(this[v][t],this[g][t]),d=_[0],y=_[1],this[f].push(d),this[m].push(y);else h=this.map_to_screen(this[v],this[g]),this[f]=h[0],this[m]=h[1];return this._map_data()},r.prototype._map_data=function(){},r.prototype.map_to_screen=function(t,e){return this.renderer.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},r}(l.View),r.Glyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._coords=[],e.coords=function(t){var e,r,n,i,s,a,l;for(e=this.prototype._coords.concat(t),this.prototype._coords=e,s={},r=0,n=t.length;r<n;r++)i=t[r],a=i[0],l=i[1],s[a]=[o.NumberSpec],s[l]=[o.NumberSpec];return this.define(s)},e.internal({x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"]}),e}(u.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(103),s=t(14);r.HBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype._index_data=function(){return this._index_box(this._y.length)},e.prototype._lrtb=function(t){var e,r,n,i;return r=Math.min(this._left[t],this._right[t]),n=Math.max(this._left[t],this._right[t]),i=this._y[t]+.5*this._height[t],e=this._y[t]-.5*this._height[t],[r,n,i,e]},e.prototype._map_data=function(){var t,e,r,n,i,o;for(o=this.renderer.yscale.v_compute(this._y),this.sy=this.renderer.plot_view.canvas.v_vy_to_sy(o),i=this.renderer.xscale.v_compute(this._right),this.sright=this.renderer.plot_view.canvas.v_vx_to_sx(i),n=this.renderer.xscale.v_compute(this._left),this.sleft=this.renderer.plot_view.canvas.v_vx_to_sx(n),this.stop=[],this.sbottom=[],this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"),t=e=0,r=this.sy.length;0<=r?e<r:e>r;t=0<=r?++e:--e)this.stop.push(this.sy[t]-this.sh[t]/2),this.sbottom.push(this.sy[t]+this.sh[t]/2);return null},e}(o.BoxView),r.HBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.HBarView,e.prototype.type=\"HBar\",e.coords([[\"left\",\"y\"]]),e.define({height:[s.DistanceSpec],right:[s.NumberSpec]}),e.override({left:0}),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(125),a=t(143),l=t(14),u=t(21);r.ImageView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.color_mapper.change,function(){return this._update_image()})},e.prototype._update_image=function(){if(null!=this.image_data)return this._set_data(),this.renderer.plot_view.request_render()},e.prototype._set_data=function(){var t,e,r,n,i,o,s,a,l,c,_,h;for(null!=this.image_data&&this.image_data.length===this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length===this._image.length||(this._width=new Array(this._image.length)),null!=this._height&&this._height.length===this._image.length||(this._height=new Array(this._image.length)),_=[],o=l=0,c=this._image.length;0<=c?l<c:l>c;o=0<=c?++l:--l)h=[],null!=this._image_shape&&(h=this._image_shape[o]),h.length>0?(a=this._image[o],this._height[o]=h[0],this._width[o]=h[1]):(a=u.concat(this._image[o]),this._height[o]=this._image[o].length,this._width[o]=this._image[o][0].length),null!=this.image_data[o]&&this.image_data[o].width===this._width[o]&&this.image_data[o].height===this._height[o]?r=this.image_data[o]:(r=document.createElement(\"canvas\"),r.width=this._width[o],r.height=this._height[o]),i=r.getContext(\"2d\"),s=i.getImageData(0,0,this._width[o],this._height[o]),n=this.model.color_mapper,t=n.v_map_screen(a,!0),e=new Uint8Array(t),s.data.set(e),i.putImageData(s,0,0),this.image_data[o]=r,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=u.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?_.push(this.max_dh=u.max(this._dh)):_.push(void 0);return _},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;o<s;o++)n=e[o],null!=i[n]&&(isNaN(c[n]+_[n]+u[n]+l[n])||(h=_[n],t.translate(0,h),t.scale(1,-1),t.translate(0,-h),t.drawImage(i[n],0|c[n],0|_[n],u[n],l[n]),t.translate(0,h),t.scale(1,-1),t.translate(0,-h)));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.bbox,t.maxX+=this.max_dw,t.maxY+=this.max_dh,t},e}(s.XYGlyphView),n=function(){return[0,2434341,5395026,7566195,9868950,12434877,14277081,15790320,16777215]},r.Image=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.ImageView,e.prototype.type=\"Image\",e.define({image:[l.NumberSpec],dw:[l.DistanceSpec],dh:[l.DistanceSpec],dilate:[l.Bool,!1],color_mapper:[l.Instance,function(){return new a.LinearColorMapper({palette:n()})}]}),e}(s.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14),a=t(21);r.ImageRGBAView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._set_data=function(t,e){var r,n,i,o,s,l,u,c,_,h,p,d,f,y,m;for(null!=this.image_data&&this.image_data.length===this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length===this._image.length||(this._width=new Array(this._image.length)),null!=this._height&&this._height.length===this._image.length||(this._height=new Array(this._image.length)),y=[],u=h=0,d=this._image.length;0<=d?h<d:h>d;u=0<=d?++h:--h)if(!(null!=e&&e.indexOf(u)<0)){if(m=[],null!=this._image_shape&&(m=this._image_shape[u]),m.length>0)r=this._image[u].buffer,this._height[u]=m[0],this._width[u]=m[1];else{for(l=a.concat(this._image[u]),r=new ArrayBuffer(4*l.length),o=new Uint32Array(r),_=p=0,f=l.length;0<=f?p<f:p>f;_=0<=f?++p:--p)o[_]=l[_];this._height[u]=this._image[u].length,this._width[u]=this._image[u][0].length}null!=this.image_data[u]&&this.image_data[u].width===this._width[u]&&this.image_data[u].height===this._height[u]?i=this.image_data[u]:(i=document.createElement(\"canvas\"),i.width=this._width[u],i.height=this._height[u]),s=i.getContext(\"2d\"),c=s.getImageData(0,0,this._width[u],this._height[u]),n=new Uint8Array(r),c.data.set(n),s.putImageData(c,0,0),this.image_data[u]=i,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?y.push(this.max_dh=a.max(this._dh)):y.push(void 0)}return y},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),o=0,s=e.length;o<s;o++)n=e[o],isNaN(c[n]+_[n]+u[n]+l[n])||(h=_[n],t.translate(0,h),t.scale(1,-1),t.translate(0,-h),t.drawImage(i[n],0|c[n],0|_[n],u[n],l[n]),t.translate(0,h),t.scale(1,-1),t.translate(0,-h));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.bbox,t.maxX+=this.max_dw,t.maxY+=this.max_dh,t},e}(o.XYGlyphView),r.ImageRGBA=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ImageRGBAView,e.prototype.type=\"ImageRGBA\",e.define({image:[s.NumberSpec],dw:[s.DistanceSpec],dh:[s.DistanceSpec],dilate:[s.Bool,!1]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(106),s=t(13),a=t(14);r.ImageURLView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.global_alpha.change,function(t){return function(){return t.renderer.request_render()}}(this))},e.prototype._index_data=function(){},e.prototype._set_data=function(){var t,e,r,n,i,o,a;for(null!=this.image&&this.image.length===this._url.length||(this.image=function(){var t,r,n,i;for(n=this._url,i=[],t=0,r=n.length;t<r;t++)e=n[t],i.push(null);return i}.call(this)),o=this.model.retry_attempts,a=this.model.retry_timeout,this.retries=function(){var t,r,n,i;for(n=this._url,i=[],t=0,r=n.length;t<r;t++)e=n[t],i.push(o);return i}.call(this),i=[],t=r=0,n=this._url.length;0<=n?r<n:r>n;t=0<=n?++r:--r)null!=this._url[t]&&(e=new Image,e.onerror=function(t){return function(e,r){return function(){return t.retries[e]>0?(s.logger.trace(\"ImageURL failed to load \"+t._url[e]+\" image, retrying in \"+a+\" ms\"),setTimeout(function(){return r.src=t._url[e]},a)):s.logger.warn(\"ImageURL unable to load \"+t._url[e]+\" image after \"+o+\" retries\"),t.retries[e]-=1}}}(this)(t,e),e.onload=function(t){return function(e,r){return function(){return t.image[r]=e,t.renderer.request_render()}}}(this)(e,t),i.push(e.src=this._url[t]));return i},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._images_rendered===!0},e.prototype._map_data=function(){var t,e,r;switch(e=function(){var t,e,n,i;if(null!=this.model.w)return this._w;for(n=this._x,i=[],t=0,e=n.length;t<e;t++)r=n[t],i.push(NaN);return i}.call(this),t=function(){var t,e,n,i;if(null!=this.model.h)return this._h;for(n=this._x,i=[],t=0,e=n.length;t<e;t++)r=n[t],i.push(NaN);return i}.call(this),this.model.properties.w.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,e,\"edge\",this.model.dilate);break;case\"screen\":this.sw=e}switch(this.model.properties.h.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,t,\"edge\",this.model.dilate);case\"screen\":return this.sh=t}},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d;for(i=r._url,l=r.image,p=r.sx,d=r.sy,h=r.sw,_=r.sh,n=r._angle,s=this.renderer.plot_view.frame,t.rect(s._left.value+1,s._bottom.value+1,s._width.value-2,s._height.value-2),t.clip(),o=!0,u=0,c=e.length;u<c;u++)a=e[u],isNaN(p[a]+d[a]+n[a])||this.retries[a]!==-1&&(null!=l[a]?this._render_image(t,a,l[a],p,d,h,_,n):o=!1);if(o&&!this._images_rendered)return this._images_rendered=!0,this.notify_finished()},e.prototype._final_sx_sy=function(t,e,r,n,i){switch(t){case\"top_left\":return[e,r];case\"top_center\":return[e-n/2,r];case\"top_right\":return[e-n,r];case\"center_right\":return[e-n,r-i/2];case\"bottom_right\":return[e-n,r-i];case\"bottom_center\":return[e-n/2,r-i];case\"bottom_left\":return[e,r-i];case\"center_left\":return[e,r-i/2];case\"center\":return[e-n/2,r-i/2]}},e.prototype._render_image=function(t,e,r,n,i,o,s,a){var l,u;return isNaN(o[e])&&(o[e]=r.width),isNaN(s[e])&&(s[e]=r.height),l=this.model.anchor,u=this._final_sx_sy(l,n[e],i[e],o[e],s[e]),n=u[0],i=u[1],t.save(),t.globalAlpha=this.model.global_alpha,a[e]?(t.translate(n,i),t.rotate(a[e]),t.drawImage(r,0,0,o[e],s[e]),t.rotate(-a[e]),t.translate(-n,-i)):t.drawImage(r,n,i,o[e],s[e]),t.restore()},e}(o.GlyphView),r.ImageURL=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ImageURLView,e.prototype.type=\"ImageURL\",e.coords([[\"x\",\"y\"]]),e.mixins([]),e.define({url:[a.StringSpec],anchor:[a.Anchor,\"top_left\"],global_alpha:[a.Number,1],angle:[a.AngleSpec,0],w:[a.DistanceSpec],h:[a.DistanceSpec],dilate:[a.Bool,!1],retry_attempts:[a.Number,0],retry_timeout:[a.Number,0]}),e}(o.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(99);r.AnnularWedge=n.AnnularWedge;var i=t(100);r.Annulus=i.Annulus;var o=t(101);r.Arc=o.Arc;var s=t(102);r.Bezier=s.Bezier;var a=t(104);r.Circle=a.Circle;var l=t(105);r.Ellipse=l.Ellipse;var u=t(106);r.Glyph=u.Glyph;var c=t(107);r.HBar=c.HBar;var _=t(108);r.Image=_.Image;var h=t(109);r.ImageRGBA=h.ImageRGBA;var p=t(110);r.ImageURL=p.ImageURL;var d=t(112);r.Line=d.Line;var f=t(113);r.MultiLine=f.MultiLine;var y=t(114);r.Oval=y.Oval;var m=t(115);r.Patch=m.Patch;var v=t(116);r.Patches=v.Patches;var g=t(117);r.Quad=g.Quad;var b=t(118);r.Quadratic=b.Quadratic;var w=t(119);r.Ray=w.Ray;var x=t(120);r.Rect=x.Rect;var k=t(121);r.Segment=k.Segment;var M=t(122);r.Text=M.Text;var S=t(123);r.VBar=S.VBar;var T=t(124);r.Wedge=T.Wedge;var O=t(125);r.XYGlyph=O.XYGlyph},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9);r.LineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u;for(l=r.sx,u=r.sy,n=!1,this.visuals.line.set_value(t),s=null,o=0,a=e.length;o<a;o++){if(i=e[o],n){if(!isFinite(l[i]+u[i])){t.stroke(),t.beginPath(),n=!1,s=i;continue}null!==s&&i-s>1&&(t.stroke(),n=!1)}n?t.lineTo(l[i],u[i]):(t.beginPath(),t.moveTo(l[i],u[i]),n=!0),s=i}if(n)return t.stroke()},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h;for(c=s.create_hit_test_result(),a={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},_=9999,h=Math.max(2,this.visuals.line.line_width.value()/2),r=n=0,l=this.sx.length-1;0<=l?n<l:n>l;r=0<=l?++n:--n)u=[{x:this.sx[r],y:this.sy[r]},{x:this.sx[r+1],y:this.sy[r+1]}],i=u[0],o=u[1],e=s.dist_to_segment(a,i,o),e<h&&e<_&&(_=e,c[\"0d\"].glyph=this.model,c[\"0d\"].get_view=function(){return this}.bind(this),c[\"0d\"].flag=!0,c[\"0d\"].indices=[r]);return c},e.prototype._hit_span=function(t){var e,r,n,i,o,a,l,u,c;for(n=[t.vx,t.vy],u=n[0],c=n[1],o=s.create_hit_test_result(),\"v\"===t.direction?(a=this.renderer.yscale.invert(c),l=this._y):(a=this.renderer.xscale.invert(u),l=this._x),e=r=0,i=l.length-1;0<=i?r<i:r>i;e=0<=i?++r:--r)(l[e]<=a&&a<=l[e+1]||l[e+1]<=a&&a<=l[e])&&(o[\"0d\"].glyph=this.model,o[\"0d\"].get_view=function(){return this}.bind(this),o[\"0d\"].flag=!0,o[\"0d\"].indices.push(e));return o},e.prototype.get_interpolation_hit=function(t,e){var r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w;return r=[e.vx,e.vy],h=r[0],p=r[1],n=[this._x[t],this._y[t],this._x[t+1],this._y[t+1]],y=n[0],b=n[1],m=n[2],w=n[3],\"point\"===e.type?(i=this.renderer.yscale.v_invert([p-1,p+1]),v=i[0],g=i[1],o=this.renderer.xscale.v_invert([h-1,h+1]),d=o[0],f=o[1]):\"v\"===e.direction?(a=this.renderer.yscale.v_invert([p,p]),v=a[0],g=a[1],l=[y,m],d=l[0],f=l[1]):(u=this.renderer.xscale.v_invert([h,h]),d=u[0],f=u[1],c=[b,w],v=c[0],g=c[1]),_=s.check_2_segments_intersect(d,v,f,g,y,b,m,w),[_.x,_.y]},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.LineView,e.prototype.type=\"Line\",e.mixins([\"line\"]),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(35),s=t(9),a=t(21),l=t(41),u=t(106);r.MultiLineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_data=function(){var t,e,r,n,i,s,u,c;for(r=[],t=e=0,n=this._xs.length;0<=n?e<n:e>n;t=0<=n?++e:--e)null!==this._xs[t]&&0!==this._xs[t].length&&(s=function(){var e,r,n,o;for(n=this._xs[t],o=[],e=0,r=n.length;e<r;e++)i=n[e],l.isStrictNaN(i)||o.push(i);return o}.call(this),c=function(){var e,r,n,i;for(n=this._ys[t],i=[],e=0,r=n.length;e<r;e++)u=n[e],l.isStrictNaN(u)||i.push(u);return i}.call(this),r.push({minX:a.min(s),minY:a.min(c),maxX:a.max(s),maxY:a.max(c),i:t}));return new o.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d;for(h=r.sxs,d=r.sys,c=[],o=0,a=e.length;o<a;o++){for(n=e[o],l=[h[n],d[n]],_=l[0],p=l[1],this.visuals.line.set_vectorize(t,n),i=s=0,u=_.length;0<=u?s<u:s>u;i=0<=u?++s:--s)0!==i?isNaN(_[i])||isNaN(p[i])?(t.stroke(),t.beginPath()):t.lineTo(_[i],p[i]):(t.beginPath(),t.moveTo(_[i],p[i]));c.push(t.stroke())}return c},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m;for(f=s.create_hit_test_result(),c={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},y=9999,r={},n=o=0,h=this.sxs.length;0<=h?o<h:o>h;n=0<=h?++o:--o){for(m=Math.max(2,this.visuals.line.cache_select(\"line_width\",n)/2),_=null,i=a=0,p=this.sxs[n].length-1;0<=p?a<p:a>p;i=0<=p?++a:--a)d=[{x:this.sxs[n][i],y:this.sys[n][i]},{x:this.sxs[n][i+1],y:this.sys[n][i+1]}],l=d[0],u=d[1],e=s.dist_to_segment(c,l,u),e<m&&e<y&&(y=e,_=[i]);_&&(r[n]=_)}return f[\"1d\"].indices=function(){var t,e,i,o;for(i=Object.keys(r),o=[],e=0,t=i.length;e<t;e++)n=i[e],o.push(parseInt(n));return o}(),f[\"2d\"].indices=r,f},e.prototype._hit_span=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f;for(l=[t.vx,t.vy],d=l[0],f=l[1],_=s.create_hit_test_result(),\"v\"===t.direction?(h=this.renderer.yscale.invert(f),p=this._ys):(h=this.renderer.xscale.invert(d),p=this._xs),e={},r=i=0,u=p.length;0<=u?i<u:i>u;r=0<=u?++i:--i){for(a=[],n=o=0,c=p[r].length-1;0<=c?o<c:o>c;n=0<=c?++o:--o)p[r][n]<=h&&h<=p[r][n+1]&&a.push(n);a.length>0&&(e[r]=a)}return _[\"1d\"].indices=function(){var t,n,i,o;for(i=Object.keys(e),o=[],n=0,t=i.length;n<t;n++)r=i[n],o.push(parseInt(r));return o}(),_[\"2d\"].indices=e,_},e.prototype.get_interpolation_hit=function(t,e,r){var n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x;return n=[r.vx,r.vy],p=n[0],d=n[1],i=[this._xs[t][e],this._ys[t][e],this._xs[t][e+1],this._ys[t][e+1]],m=i[0],w=i[1],v=i[2],x=i[3],\"point\"===r.type?(o=this.renderer.yscale.v_invert([d-1,d+1]),g=o[0],b=o[1],a=this.renderer.xscale.v_invert([p-1,p+1]),f=a[0],y=a[1]):\"v\"===r.direction?(l=this.renderer.yscale.v_invert([d,d]),g=l[0],b=l[1],u=[m,v],f=u[0],y=u[1]):(c=this.renderer.xscale.v_invert([p,p]),f=c[0],y=c[1],_=[w,x],g=_[0],b=_[1]),h=s.check_2_segments_intersect(f,g,y,b,m,w,v,x),[h.x,h.y]},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(u.GlyphView),r.MultiLine=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.MultiLineView,e.prototype.type=\"MultiLine\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\"]),e}(u.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.OvalView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"data\"===this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"===this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(u[n]+c[n]+l[n]+a[n]+this._angle[n])||(t.translate(u[n],c[n]),t.rotate(this._angle[n]),t.beginPath(),t.moveTo(0,-a[n]/2),t.bezierCurveTo(l[n]/2,-a[n]/2,l[n]/2,a[n]/2,0,a[n]/2),t.bezierCurveTo(-l[n]/2,a[n]/2,-l[n]/2,-a[n]/2,0,-a[n]/2),t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,n),t.stroke()),t.rotate(-this._angle[n]),s.push(t.translate(-u[n],-c[n])));return s},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_,h,p;return l=[o],h={},h[o]=(e+r)/2,p={},p[o]=(n+i)/2,u=this.sw[o]/this.sh[o],s=.8*Math.min(Math.abs(r-e),Math.abs(i-n)),_={},c={},u>1?(_[o]=s,c[o]=s/u):(_[o]=s*u,c[o]=s),a={sx:h,sy:p,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Oval=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.OvalView,e.prototype.type=\"Oval\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125);r.PatchView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u;if(l=r.sx,u=r.sy,this.visuals.fill.doit){for(this.visuals.fill.set_value(t),i=0,s=e.length;i<s;i++)n=e[i],0!==n?isNaN(l[n]+u[n])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(l[n],u[n]):(t.beginPath(),t.moveTo(l[n],u[n]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_value(t),o=0,a=e.length;o<a;o++)n=e[o],0!==n?isNaN(l[n]+u[n])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(l[n],u[n]):(t.beginPath(),t.moveTo(l[n],u[n]));return t.closePath(),t.stroke()}},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Patch=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PatchView,e.prototype.type=\"Patch\",e.mixins([\"line\",\"fill\"]),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(35),s=t(106),a=t(21),l=t(41),u=t(9);r.PatchesView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._build_discontinuous_object=function(t){var e,r,n,i,o,s,u,c,_;for(r={},n=i=0,_=t.length;0<=_?i<_:i>_;n=0<=_?++i:--i)for(r[n]=[],u=a.copy(t[n]);u.length>0;)o=a.findLastIndex(u,function(t){return l.isStrictNaN(t)}),o>=0?c=u.splice(o):(c=u,u=[]),e=function(){var t,e,r;for(r=[],t=0,e=c.length;t<e;t++)s=c[t],l.isStrictNaN(s)||r.push(s);return r}(),r[n].push(e);return r},e.prototype._index_data=function(){var t,e,r,n,i,s,l,u,c,_,h;for(c=this._build_discontinuous_object(this._xs),h=this._build_discontinuous_object(this._ys),i=[],t=r=0,s=this._xs.length;0<=s?r<s:r>s;t=0<=s?++r:--r)for(e=n=0,l=c[t].length;0<=l?n<l:n>l;e=0<=l?++n:--n)u=c[t][e],_=h[t][e],0!==u.length&&i.push({minX:a.min(u),minY:a.min(_),maxX:a.max(u),maxY:a.max(_),i:t});return new o.RBush(i)},e.prototype._mask_data=function(t){var e,r,n,i,o,s,a,l,c,_;return a=this.renderer.plot_view.frame.x_ranges[\"default\"],n=[a.min,a.max],o=n[0],s=n[1],_=this.renderer.plot_view.frame.y_ranges[\"default\"],i=[_.min,_.max],l=i[0],c=i[1],e=u.validate_bbox_coords([o,s],[l,c]),r=this.index.indices(e),r.sort(function(t){return function(t,e){return t-e}}(this))},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y;for(d=r.sxs,y=r.sys,this.renderer.sxss=this._build_discontinuous_object(d),this.renderer.syss=this._build_discontinuous_object(y),h=[],o=0,a=e.length;o<a;o++){if(n=e[o],u=[d[n],y[n]],p=u[0],f=u[1],this.visuals.fill.doit){for(this.visuals.fill.set_vectorize(t,n),i=s=0,c=p.length;0<=c?s<c:s>c;i=0<=c?++s:--s)0!==i?isNaN(p[i]+f[i])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(p[i],f[i]):(t.beginPath(),t.moveTo(p[i],f[i]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_vectorize(t,n),i=l=0,_=p.length;0<=_?l<_:l>_;i=0<=_?++l:--l)0!==i?isNaN(p[i]+f[i])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(p[i],f[i]):(t.beginPath(),t.moveTo(p[i],f[i]));t.closePath(),h.push(t.stroke())}else h.push(void 0)}return h},e.prototype._hit_point=function(t){var e,r,n,i,o,s,a,l,c,_,h,p,d,f,y,m,v,g,b;for(l=[t.vx,t.vy],m=l[0],v=l[1],p=this.renderer.plot_view.canvas.vx_to_sx(m),f=this.renderer.plot_view.canvas.vy_to_sy(v),g=this.renderer.xscale.invert(m),b=this.renderer.yscale.invert(v),e=this.index.indices({minX:g,minY:b,maxX:g,maxY:b}),r=[],n=s=0,c=e.length;0<=c?s<c:s>c;n=0<=c?++s:--s)for(i=e[n],d=this.renderer.sxss[i],y=this.renderer.syss[i],o=a=0,_=d.length;0<=_?a<_:a>_;o=0<=_?++a:--a)u.point_in_poly(p,f,d[o],y[o])&&r.push(i);return h=u.create_hit_test_result(),h[\"1d\"].indices=r,h},e.prototype._get_snap_coord=function(t){var e,r,n,i;for(i=0,e=0,r=t.length;e<r;e++)n=t[e],i+=n;return i/t.length},e.prototype.scx=function(t,e,r){var n,i,o,s,a;if(1===this.renderer.sxss[t].length)return this._get_snap_coord(this.sxs[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],n=i=0,o=s.length;0<=o?i<o:i>o;n=0<=o?++i:--i)if(u.point_in_poly(e,r,s[n],a[n]))return this._get_snap_coord(s[n]);return null},e.prototype.scy=function(t,e,r){var n,i,o,s,a;if(1===this.renderer.syss[t].length)return this._get_snap_coord(this.sys[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],n=i=0,o=s.length;0<=o?i<o:i>o;n=0<=o?++i:--i)if(u.point_in_poly(e,r,s[n],a[n]))return this._get_snap_coord(a[n])},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e}(s.GlyphView),r.Patches=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PatchesView,e.prototype.type=\"Patches\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(103);r.QuadView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.get_anchor_point=function(t,e,r){var n,i,o,s;switch(i=Math.min(this.sleft[e],this.sright[e]),o=Math.max(this.sright[e],this.sleft[e]),s=Math.min(this.stop[e],this.sbottom[e]),n=Math.max(this.sbottom[e],this.stop[e]),t){case\"top_left\":return{x:i,y:s};case\"top_center\":return{x:(i+o)/2,y:s};case\"top_right\":return{x:o,y:s};case\"center_right\":return{x:o,y:(s+n)/2};case\"bottom_right\":return{x:o,y:n};case\"bottom_center\":return{x:(i+o)/2,y:n};case\"bottom_left\":return{x:i,y:n};case\"center_left\":return{x:i,y:(s+n)/2};case\"center\":return{x:(i+o)/2,y:(s+n)/2}}},e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype._index_data=function(){return this._index_box(this._right.length)},e.prototype._lrtb=function(t){var e,r,n,i;return r=this._left[t],n=this._right[t],i=this._top[t],e=this._bottom[t],[r,n,i,e]},e}(o.BoxView),r.Quad=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.QuadView,e.prototype.type=\"Quad\",e.coords([[\"right\",\"bottom\"],[\"left\",\"top\"]]),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(35),a=t(106);n=function(t,e,r){var n,i;return e===(t+r)/2?[t,r]:(i=(t-e)/(t-2*e+r),n=t*Math.pow(1-i,2)+2*e*(1-i)*i+r*Math.pow(i,2),[Math.min(t,r,n),Math.max(t,r,n)])},r.QuadraticView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._index_data=function(){var t,e,r,i,o,a,l,u,c,_;for(r=[],t=e=0,i=this._x0.length;0<=i?e<i:e>i;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx[t]+this._cy[t])||(o=n(this._x0[t],this._cx[t],this._x1[t]),l=o[0],u=o[1],a=n(this._y0[t],this._cy[t],this._y1[t]),c=a[0],_=a[1],r.push({minX:l,minY:c,maxX:u,maxY:_,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;if(u=r.sx0,_=r.sy0,c=r.sx1,h=r.sy1,a=r.scx,l=r.scy,this.visuals.line.doit){for(s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(u[n]+_[n]+c[n]+h[n]+a[n]+l[n])||(t.beginPath(),t.moveTo(u[n],_[n]),t.quadraticCurveTo(a[n],l[n],c[n],h[n]),this.visuals.line.set_vectorize(t,n),s.push(t.stroke()));return s}},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(a.GlyphView),r.Quadratic=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.QuadraticView,e.prototype.type=\"Quadratic\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx\",\"cy\"]]),e.mixins([\"line\"]),e}(a.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14);r.RayView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.length.units?this.slength=this.sdist(this.renderer.xscale,this._x,this._length):this.slength=this._length;\n",
" },e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f;if(p=r.sx,d=r.sy,h=r.slength,n=r._angle,this.visuals.line.doit){for(f=this.renderer.plot_view.frame._width.value,i=this.renderer.plot_view.frame._height.value,s=2*(f+i),o=a=0,c=h.length;0<=c?a<c:a>c;o=0<=c?++a:--a)0===h[o]&&(h[o]=s);for(_=[],l=0,u=e.length;l<u;l++)o=e[l],isNaN(p[o]+d[o]+n[o]+h[o])||(t.translate(p[o],d[o]),t.rotate(n[o]),t.beginPath(),t.moveTo(0,0),t.lineTo(h[o],0),this.visuals.line.set_vectorize(t,o),t.stroke(),t.rotate(-n[o]),_.push(t.translate(-p[o],-d[o])));return _}},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Ray=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.RayView,e.prototype.type=\"Ray\",e.mixins([\"line\"]),e.define({length:[s.DistanceSpec],angle:[s.AngleSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14),l=t(21);r.RectView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){var t,e,r,n;return t=this.renderer.plot_view.canvas,\"data\"===this.model.properties.width.units?(r=this._map_dist_corner_for_data_side_length(this._x,this._width,this.renderer.xscale,t,0),this.sw=r[0],this.sx0=r[1]):(this.sw=this._width,this.sx0=function(){var t,r,n;for(n=[],e=t=0,r=this.sx.length;0<=r?t<r:t>r;e=0<=r?++t:--t)n.push(this.sx[e]-this.sw[e]/2);return n}.call(this)),\"data\"===this.model.properties.height.units?(n=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale,t,1),this.sh=n[0],this.sy1=n[1]):(this.sh=this._height,this.sy1=function(){var t,r,n;for(n=[],e=t=0,r=this.sy.length;0<=r?t<r:t>r;e=0<=r?++t:--t)n.push(this.sy[e]-this.sh[e]/2);return n}.call(this)),this.ssemi_diag=function(){var t,r,n;for(n=[],e=t=0,r=this.sw.length;0<=r?t<r:t>r;e=0<=r?++t:--t)n.push(Math.sqrt(this.sw[e]/2*this.sw[e]/2+this.sh[e]/2*this.sh[e]/2));return n}.call(this)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d;if(_=r.sx,p=r.sy,h=r.sx0,d=r.sy1,c=r.sw,u=r.sh,n=r._angle,this.visuals.fill.doit)for(o=0,a=e.length;o<a;o++)i=e[o],isNaN(_[i]+p[i]+h[i]+d[i]+c[i]+u[i]+n[i])||(this.visuals.fill.set_vectorize(t,i),n[i]?(t.translate(_[i],p[i]),t.rotate(n[i]),t.fillRect(-c[i]/2,-u[i]/2,c[i],u[i]),t.rotate(-n[i]),t.translate(-_[i],-p[i])):t.fillRect(h[i],d[i],c[i],u[i]));if(this.visuals.line.doit){for(t.beginPath(),s=0,l=e.length;s<l;s++)i=e[s],isNaN(_[i]+p[i]+h[i]+d[i]+c[i]+u[i]+n[i])||0!==c[i]&&0!==u[i]&&(n[i]?(t.translate(_[i],p[i]),t.rotate(n[i]),t.rect(-c[i]/2,-u[i]/2,c[i],u[i]),t.rotate(-n[i]),t.translate(-_[i],-p[i])):t.rect(h[i],d[i],c[i],u[i]),this.visuals.line.set_vectorize(t,i),t.stroke(),t.beginPath());return t.stroke()}},e.prototype._hit_rect=function(t){var e,r,n,i,o,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1]),o=r[0],a=r[1],n=this.renderer.yscale.v_invert([t.vy0,t.vy1]),l=n[0],u=n[1],e=s.validate_bbox_coords([o,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_point=function(t){var e,r,n,i,o,a,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j;for(f=[t.vx,t.vy],k=f[0],M=f[1],T=this.renderer.xscale.invert(k),A=this.renderer.yscale.invert(M),g=function(){var t,e,r;for(r=[],a=t=0,e=this.sx0.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(this.sx0[a]+this.sw[a]/2);return r}.call(this),b=function(){var t,e,r;for(r=[],a=t=0,e=this.sy1.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(this.sy1[a]+this.sh[a]/2);return r}.call(this),_=l.max(this._ddist(0,g,this.ssemi_diag)),h=l.max(this._ddist(1,b,this.ssemi_diag)),O=T-_,P=T+_,E=A-h,j=A+h,o=[],e=s.validate_bbox_coords([O,P],[E,j]),y=this.index.indices(e),u=0,c=y.length;u<c;u++)a=y[u],w=this.renderer.plot_view.canvas.vx_to_sx(k),x=this.renderer.plot_view.canvas.vy_to_sy(M),this._angle[a]?(n=Math.sqrt(Math.pow(w-this.sx[a],2)+Math.pow(x-this.sy[a],2)),v=Math.sin(-this._angle[a]),r=Math.cos(-this._angle[a]),p=r*(w-this.sx[a])-v*(x-this.sy[a])+this.sx[a],d=v*(w-this.sx[a])+r*(x-this.sy[a])+this.sy[a],w=p,x=d,S=Math.abs(this.sx[a]-w)<=this.sw[a]/2,i=Math.abs(this.sy[a]-x)<=this.sh[a]/2):(S=w-this.sx0[a]<=this.sw[a]&&w-this.sx0[a]>=0,i=x-this.sy1[a]<=this.sh[a]&&x-this.sy1[a]>=0),i&&S&&o.push(a);return m=s.create_hit_test_result(),m[\"1d\"].indices=o,m},e.prototype._map_dist_corner_for_data_side_length=function(t,e,r,n,i){var o,s,a,l,u,c,_,h;return null!=r.source_range.synthetic&&(t=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)h=t[e],i.push(r.source_range.synthetic(h));return i}()),s=function(){var r,n,i;for(i=[],o=r=0,n=t.length;0<=n?r<n:r>n;o=0<=n?++r:--r)i.push(Number(t[o])-e[o]/2);return i}(),a=function(){var r,n,i;for(i=[],o=r=0,n=t.length;0<=n?r<n:r>n;o=0<=n?++r:--r)i.push(Number(t[o])+e[o]/2);return i}(),u=r.v_compute(s),c=r.v_compute(a),l=this.sdist(r,s,e,\"edge\",this.model.dilate),0===i?(_=u[0]<c[0]?u:c,[l,n.v_vx_to_sx(_)]):1===i?(_=u[0]<c[0]?c:u,[l,n.v_vy_to_sy(_)]):void 0},e.prototype._ddist=function(t,e,r){var n,i,o,s,a,l,u;return 0===t?(u=this.renderer.plot_view.canvas.v_sx_to_vx(e),s=this.renderer.xscale):(u=this.renderer.plot_view.canvas.v_vy_to_sy(e),s=this.renderer.yscale),a=u,l=function(){var t,e,i;for(i=[],n=t=0,e=a.length;0<=e?t<e:t>e;n=0<=e?++t:--t)i.push(a[n]+r[n]);return i}(),i=s.v_invert(a),o=s.v_invert(l),function(){var t,e,r;for(r=[],n=t=0,e=i.length;0<=e?t<e:t>e;n=0<=e?++t:--t)r.push(Math.abs(o[n]-i[n]));return r}()},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(o.XYGlyphView),r.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.RectView,e.prototype.type=\"Rect\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],width:[a.DistanceSpec],height:[a.DistanceSpec],dilate:[a.Bool,!1]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(9),s=t(35),a=t(106);r.SegmentView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_data=function(){var t,e,r,n;for(r=[],t=e=0,n=this._x0.length;0<=n?e<n:e>n;t=0<=n?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t])||r.push({minX:Math.min(this._x0[t],this._x1[t]),minY:Math.min(this._y0[t],this._y1[t]),maxX:Math.max(this._x0[t],this._x1[t]),maxY:Math.max(this._y0[t],this._y1[t]),i:t});return new s.RBush(r)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c;if(a=r.sx0,u=r.sy0,l=r.sx1,c=r.sy1,this.visuals.line.doit){for(s=[],i=0,o=e.length;i<o;i++)n=e[i],isNaN(a[n]+u[n]+l[n]+c[n])||(t.beginPath(),t.moveTo(a[n],u[n]),t.lineTo(l[n],c[n]),this.visuals.line.set_vectorize(t,n),s.push(t.stroke()));return s}},e.prototype._hit_point=function(t){var e,r,n,i,s,a,l,u,c,_,h,p,d,f,y,m,v,g;for(h=[t.vx,t.vy],y=h[0],m=h[1],v=this.renderer.xscale.invert(y,!0),g=this.renderer.yscale.invert(m,!0),_={x:this.renderer.plot_view.canvas.vx_to_sx(y),y:this.renderer.plot_view.canvas.vy_to_sy(m)},n=[],l=2,e=this.index.indices({minX:this.renderer.xscale.invert(y-l,!0),minY:this.renderer.yscale.invert(m-l,!0),maxX:this.renderer.xscale.invert(y+l,!0),maxY:this.renderer.yscale.invert(m+l,!0)}),s=0,a=e.length;s<a;s++)i=e[s],f=Math.pow(Math.max(2,this.visuals.line.cache_select(\"line_width\",i)/2),2),p=[{x:this.sx0[i],y:this.sy0[i]},{x:this.sx1[i],y:this.sy1[i]}],u=p[0],c=p[1],r=o.dist_to_segment_squared(_,u,c),r<f&&n.push(i);return d=o.create_hit_test_result(),d[\"1d\"].indices=n,d},e.prototype._hit_span=function(t){var e,r,n,i,s,a,l,u,c,_,h,p,d,f,y,m;for(n=this.renderer.plot_view.frame.h_range,f=this.renderer.plot_view.frame.v_range,l=[t.vx,t.vy],y=l[0],m=l[1],\"v\"===t.direction?(d=this.renderer.yscale.invert(m),u=[this._y0,this._y1],h=u[0],p=u[1]):(d=this.renderer.xscale.invert(y),c=[this._x0,this._x1],h=c[0],p=c[1]),r=[],e=this.index.indices({minX:this.renderer.xscale.invert(n.min),minY:this.renderer.yscale.invert(f.min),maxX:this.renderer.xscale.invert(n.max),maxY:this.renderer.yscale.invert(f.max)}),s=0,a=e.length;s<a;s++)i=e[s],(h[i]<=d&&d<=p[i]||p[i]<=d&&d<=h[i])&&r.push(i);return _=o.create_hit_test_result(),_[\"1d\"].indices=r,_},e.prototype.scx=function(t){return(this.sx0[t]+this.sx1[t])/2},e.prototype.scy=function(t){return(this.sy0[t]+this.sy1[t])/2},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_line_legend(t,e,r,n,i,o)},e}(a.GlyphView),r.Segment=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.SegmentView,e.prototype.type=\"Segment\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"]]),e.mixins([\"line\"]),e}(a.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(14),a=t(39);r.TextView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._render=function(t,e,r){var n,i,o,s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M;for(w=r.sx,x=r.sy,o=r._x_offset,s=r._y_offset,n=r._angle,i=r._text,b=[],p=0,f=e.length;p<f;p++)if(h=e[p],!isNaN(w[h]+x[h]+o[h]+s[h]+n[h])&&null!=i[h])if(this.visuals.text.doit){if(k=\"\"+i[h],t.save(),t.translate(w[h]+o[h],x[h]+s[h]),t.rotate(n[h]),this.visuals.text.set_vectorize(t,h),k.indexOf(\"\\n\")===-1)t.fillText(k,0,0);else{switch(g=k.split(\"\\n\"),c=this.visuals.text.cache_select(\"font\",h),_=a.get_text_height(c).height,v=this.visuals.text.text_line_height.value()*_,u=v*g.length,l=this.visuals.text.cache_select(\"text_baseline\",h)){case\"top\":M=0;break;case\"middle\":M=-u/2+v/2;break;case\"bottom\":M=-u+v;break;default:M=0,console.warn(\"'\"+l+\"' baseline not supported with multi line text\")}for(d=0,y=g.length;d<y;d++)m=g[d],t.fillText(m,0,M),M+=v}b.push(t.restore())}else b.push(void 0);return b},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return t.save(),this.text_props.set_value(t),t.font=this.text_props.font_value(),t.font=t.font.replace(/\\b[\\d\\.]+[\\w]+\\b/,\"10pt\"),t.textAlign=\"right\",t.textBaseline=\"middle\",t.fillText(\"text\",x2,(i+y2)/2),t.restore()},e}(o.XYGlyphView),r.Text=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TextView,e.prototype.type=\"Text\",e.mixins([\"text\"]),e.define({text:[s.StringSpec,{field:\"text\"}],angle:[s.AngleSpec,0],x_offset:[s.NumberSpec,0],y_offset:[s.NumberSpec,0]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(103),s=t(14);r.VBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype._index_data=function(){return this._index_box(this._x.length)},e.prototype._lrtb=function(t){var e,r,n,i;return r=this._x[t]-this._width[t]/2,n=this._x[t]+this._width[t]/2,i=Math.max(this._top[t],this._bottom[t]),e=Math.min(this._top[t],this._bottom[t]),[r,n,i,e]},e.prototype._map_data=function(){var t,e,r,n,i,o;for(o=this.renderer.xscale.v_compute(this._x),this.sx=this.renderer.plot_view.canvas.v_vx_to_sx(o),i=this.renderer.yscale.v_compute(this._top),this.stop=this.renderer.plot_view.canvas.v_vy_to_sy(i),n=this.renderer.yscale.v_compute(this._bottom),this.sbottom=this.renderer.plot_view.canvas.v_vy_to_sy(n),this.sleft=[],this.sright=[],this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"),t=e=0,r=this.sx.length;0<=r?e<r:e>r;t=0<=r?++e:--e)this.sleft.push(this.sx[t]-this.sw[t]/2),this.sright.push(this.sx[t]+this.sw[t]/2);return null},e}(o.BoxView),r.VBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.VBarView,e.prototype.type=\"VBar\",e.coords([[\"x\",\"bottom\"]]),e.define({width:[s.DistanceSpec],top:[s.NumberSpec]}),e.override({bottom:0}),e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14),l=t(28);r.WedgeView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_,h;for(_=r.sx,h=r.sy,c=r.sradius,i=r._start_angle,n=r._end_angle,o=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(_[s]+h[s]+c[s]+i[s]+n[s])||(t.beginPath(),t.arc(_[s],h[s],c[s],i[s],n[s],o),t.lineTo(_[s],h[s]),t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,s),u.push(t.stroke())):u.push(void 0));return u},e.prototype._hit_point=function(t){var e,r,n,i,o,a,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F,I;for(f=[t.vx,t.vy],T=f[0],A=f[1],z=this.renderer.xscale.invert(T),D=this.renderer.yscale.invert(A),\"data\"===this.model.properties.radius.units?(C=z-this.max_radius,N=z+this.max_radius,F=D-this.max_radius,I=D+this.max_radius):(O=T-this.max_radius,P=T+this.max_radius,y=this.renderer.xscale.v_invert([O,P]),C=y[0],N=y[1],E=A-this.max_radius,j=A+this.max_radius,m=this.renderer.yscale.v_invert([E,j]),F=m[0],I=m[1]),n=[],r=s.validate_bbox_coords([C,N],[F,I]),v=this.index.indices(r),c=0,h=v.length;c<h;c++)u=v[c],d=Math.pow(this.sradius[u],2),w=this.renderer.xscale.compute(z),x=this.renderer.xscale.compute(this._x[u]),M=this.renderer.yscale.compute(D),S=this.renderer.yscale.compute(this._y[u]),o=Math.pow(w-x,2)+Math.pow(M-S,2),o<=d&&n.push([u,o]);for(i=this.model.properties.direction.value(),a=[],_=0,p=n.length;_<p;_++)g=n[_],u=g[0],o=g[1],b=this.renderer.plot_view.canvas.vx_to_sx(T),k=this.renderer.plot_view.canvas.vy_to_sy(A),e=Math.atan2(k-this.sy[u],b-this.sx[u]),l.angle_between(-e,-this._start_angle[u],-this._end_angle[u],i)&&a.push([u,o]);return s.create_1d_hit_test_result(a)},e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){return this._generic_area_legend(t,e,r,n,i,o)},e}(o.XYGlyphView),r.Wedge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.WedgeView,e.prototype.type=\"Wedge\",e.mixins([\"line\",\"fill\"]),e.define({direction:[a.Direction,\"anticlock\"],radius:[a.DistanceSpec],start_angle:[a.AngleSpec],end_angle:[a.AngleSpec]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(35),s=t(106);r.XYGlyphView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._index_data=function(){var t,e,r,n,i,s;for(r=[],t=e=0,n=this._x.length;0<=n?e<n:e>n;t=0<=n?++e:--e)i=this._x[t],s=this._y[t],!isNaN(i+s)&&isFinite(i+s)&&r.push({minX:i,minY:s,maxX:i,maxY:s,i:t});return new o.RBush(r)},e}(s.GlyphView),r.XYGlyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"XYGlyph\",e.prototype.default_view=r.XYGlyphView,e.coords([[\"x\",\"y\"]]),e}(s.Glyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(21),a=t(9);r.GraphHitTestPolicy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.do_selection=function(t,e,r,n){return!1},e.prototype.do_inspection=function(t,e,r,n){return!1},e}(o.Model),r.NodesOnly=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NodesOnly\",e.prototype._do=function(t,e,r,n){var i,o;return o=e.node_view,i=o.glyph.hit_test(t),null!==i&&(this._node_selector.update(i,r,n),!this._node_selector.indices.is_empty())},e.prototype.do_selection=function(t,e,r,n){var i;return this._node_selector=e.node_view.model.data_source.selection_manager.selector,i=this._do(t,e,r,n),e.node_view.model.data_source.selected=this._node_selector.indices,e.node_view.model.data_source.select.emit(),i},e.prototype.do_inspection=function(t,e,r,n){var i;return this._node_selector=e.model.get_selection_manager().get_or_create_inspector(e.node_view.model),i=this._do(t,e,r,n),e.node_view.model.data_source.setv({inspected:this._node_selector.indices},{silent:!0}),e.node_view.model.data_source.inspect.emit([e.node_view,{geometry:t}]),i},e}(r.GraphHitTestPolicy),r.NodesAndLinkedEdges=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"NodesAndLinkedEdges\",e.prototype._do=function(t,e,r,n){var i,o,l,u,c,_,h,p,d,f,y,m,v;if(m=[e.node_view,e.edge_view],y=m[0],l=m[1],u=y.glyph.hit_test(t),null===u)return!1;for(this._node_selector.update(u,r,n),f=function(){var t,e,r,n;for(r=u[\"1d\"].indices,n=[],t=0,e=r.length;t<e;t++)c=r[t],n.push(y.model.data_source.data.index[c]);return n}(),o=l.model.data_source,i=[],c=_=0,v=o.data.start.length;0<=v?_<v:_>v;c=0<=v?++_:--_)(s.contains(f,o.data.start[c])||s.contains(f,o.data.end[c]))&&i.push(c);for(d=a.create_hit_test_result(),h=0,p=i.length;h<p;h++)c=i[h],d[\"2d\"].indices[c]=[0];return this._edge_selector.update(d,r,n),!this._node_selector.indices.is_empty()},e.prototype.do_selection=function(t,e,r,n){var i;return this._node_selector=e.node_view.model.data_source.selection_manager.selector,this._edge_selector=e.edge_view.model.data_source.selection_manager.selector,i=this._do(t,e,r,n),e.node_view.model.data_source.selected=this._node_selector.indices,e.edge_view.model.data_source.selected=this._edge_selector.indices,e.node_view.model.data_source.select.emit(),i},e.prototype.do_inspection=function(t,e,r,n){var i;return this._node_selector=e.node_view.model.data_source.selection_manager.get_or_create_inspector(e.node_view.model),this._edge_selector=e.edge_view.model.data_source.selection_manager.get_or_create_inspector(e.edge_view.model),i=this._do(t,e,r,n),e.node_view.model.data_source.setv({inspected:this._node_selector.indices},{silent:!0}),e.edge_view.model.data_source.setv({inspected:this._edge_selector.indices},{silent:!0}),e.node_view.model.data_source.inspect.emit([e.node_view,{geometry:t}]),i},e}(r.GraphHitTestPolicy),r.EdgesAndLinkedNodes=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"EdgesAndLinkedNodes\",e.prototype._do=function(t,e,r,n){var i,o,l,u,c,_,h,p,d,f,y;if(y=[e.node_view,e.edge_view],d=y[0],o=y[1],l=o.glyph.hit_test(t),null===l)return!1;for(this._edge_selector.update(l,r,n),i=function(){var t,e,r,n;for(r=Object.keys(l[\"2d\"].indices),n=[],t=0,e=r.length;t<e;t++)u=r[t],n.push(parseInt(u));return n}(),f=[],c=0,_=i.length;c<_;c++)u=i[c],f.push(o.model.data_source.data.start[u]),f.push(o.model.data_source.data.end[u]);return p=function(){var t,e,r,n;for(r=s.uniq(f),n=[],t=0,e=r.length;t<e;t++)u=r[t],n.push(d.model.data_source.data.index.indexOf(u));return n}(),h=a.create_hit_test_result(),h[\"1d\"].indices=p,this._node_selector.update(h,r,n),!this._edge_selector.indices.is_empty()},e.prototype.do_selection=function(t,e,r,n){var i;return this._edge_selector=e.edge_view.model.data_source.selection_manager.selector,this._node_selector=e.node_view.model.data_source.selection_manager.selector,i=this._do(t,e,r,n),e.edge_view.model.data_source.selected=this._edge_selector.indices,e.node_view.model.data_source.selected=this._node_selector.indices,e.edge_view.model.data_source.select.emit(),i},e.prototype.do_inspection=function(t,e,r,n){var i;return this._edge_selector=e.edge_view.model.data_source.selection_manager.get_or_create_inspector(e.edge_view.model),this._node_selector=e.node_view.model.data_source.selection_manager.get_or_create_inspector(e.node_view.model),i=this._do(t,e,r,n),e.edge_view.model.data_source.setv({inspected:this._edge_selector.indices},{silent:!0}),e.node_view.model.data_source.setv({inspected:this._node_selector.indices},{silent:!0}),e.edge_view.model.data_source.inspect.emit([e.edge_view,{geometry:t}]),i},e}(r.GraphHitTestPolicy)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(361);n.__exportStar(t(126),r),n.__exportStar(t(128),r),n.__exportStar(t(129),r)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49);r.LayoutProvider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.get_node_coordinates=function(t){return[[],[]]},e.prototype.get_edge_coordinates=function(t){return[[],[]]},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(128),s=t(14);r.StaticLayoutProvider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"StaticLayoutProvider\",e.prototype.get_node_coordinates=function(t){var e,r,n,i,o,s,a,l,u;for(i=[[],[]],a=i[0],u=i[1],o=t.data.index,r=0,n=o.length;r<n;r++)e=o[r],s=null!=this.graph_layout[e]?this.graph_layout[e][0]:NaN,l=null!=this.graph_layout[e]?this.graph_layout[e][1]:NaN,a.push(s),u.push(l);return[a,u]},e.prototype.get_edge_coordinates=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p,d;for(a=[[],[]],p=a[0],d=a[1],h=t.data.start,r=t.data.end,n=null!=t.data.xs&&null!=t.data.ys,i=s=0,l=h.length;0<=l?s<l:s>l;i=0<=l?++s:--s)o=null!=this.graph_layout[h[i]]&&null!=this.graph_layout[r[i]],n&&o?(p.push(t.data.xs[i]),d.push(t.data.ys[i])):(o?(u=[this.graph_layout[h[i]],this.graph_layout[r[i]]],_=u[0],e=u[1]):(c=[[NaN,NaN],[NaN,NaN]],_=c[0],e=c[1]),p.push([_[0],e[0]]),d.push([_[1],e[1]]));return[p,d]},e.define({graph_layout:[s.Any,{}]}),e}(o.LayoutProvider)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(160),s=t(162),a=t(14),l=t(41);r.GridView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_regions(t),this._draw_minor_grids(t),this._draw_grids(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype._draw_regions=function(t){var e,r,n,i,o,s,a,l,u,c,_,h;if(this.visuals.band_fill.doit)for(n=this.model.grid_coords(\"major\",!1),_=n[0],h=n[1],this.visuals.band_fill.set_value(t),e=r=0,i=_.length-1;0<=i?r<i:r>i;e=0<=i?++r:--r)e%2===1&&(o=this.plot_view.map_to_screen(_[e],h[e],this._x_range_name,this._y_range_name),a=o[0],u=o[1],s=this.plot_view.map_to_screen(_[e+1],h[e+1],this._x_range_name,this._y_range_name),l=s[0],c=s[1],t.fillRect(a[0],u[0],l[1]-a[0],c[1]-u[0]),t.fill())},e.prototype._draw_grids=function(t){var e,r,n;if(this.visuals.grid_line.doit)return e=this.model.grid_coords(\"major\"),r=e[0],n=e[1],this._draw_grid_helper(t,this.visuals.grid_line,r,n)},e.prototype._draw_minor_grids=function(t){var e,r,n;if(this.visuals.minor_grid_line.doit)return e=this.model.grid_coords(\"minor\"),r=e[0],n=e[1],this._draw_grid_helper(t,this.visuals.minor_grid_line,r,n)},e.prototype._draw_grid_helper=function(t,e,r,n){var i,o,s,a,l,u,c,_;for(e.set_value(t),i=o=0,a=r.length;0<=a?o<a:o>a;i=0<=a?++o:--o){for(l=this.plot_view.map_to_screen(r[i],n[i],this._x_range_name,this._y_range_name),c=l[0],_=l[1],t.beginPath(),t.moveTo(Math.round(c[0]),Math.round(_[0])),i=s=1,u=c.length;1<=u?s<u:s>u;i=1<=u?++s:--s)t.lineTo(Math.round(c[i]),Math.round(_[i]));t.stroke()}},e}(s.RendererView),r.Grid=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.GridView,e.prototype.type=\"Grid\",e.mixins([\"line:grid_\",\"line:minor_grid_\",\"fill:band_\"]),e.define({bounds:[a.Any,\"auto\"],dimension:[a.Number,0],ticker:[a.Instance],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null}),e.prototype.ranges=function(){var t,e,r,n;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,n=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[n[e],n[r]]},e.prototype.computed_bounds=function(){var t,e,r,n,i,o,s;return i=this.ranges(),r=i[0],t=i[1],s=this.bounds,n=[r.min,r.max],l.isArray(s)?(o=Math.min(s[0],s[1]),e=Math.max(s[0],s[1]),o<n[0]?o=n[0]:o>n[1]&&(o=null),e>n[1]?e=n[1]:e<n[0]&&(e=null)):(o=n[0],e=n[1]),[o,e]},e.prototype.grid_coords=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T;for(null==e&&(e=!0),c=this.dimension,h=(c+1)%2,b=this.ranges(),g=b[0],s=b[1],w=this.computed_bounds(),M=w[0],u=w[1],T=Math.min(M,u),u=Math.max(M,u),M=T,S=this.ticker.get_ticks(M,u,g,s.min,{})[t],m=g.min,y=g.max,i=s.min,n=s.max,o=[[],[]],_=p=0,x=S.length;0<=x?p<x:p>x;_=0<=x?++p:--p)if(S[_]!==m&&S[_]!==y||!e){for(a=[],l=[],r=2,v=d=0,k=r;0<=k?d<k:d>k;v=0<=k?++d:--d)f=i+(n-i)/(r-1)*v,a.push(S[_]),l.push(f);o[c].push(a),o[h].push(l)}return o},e}(o.GuideRenderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(130);r.Grid=n.Grid},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(361);n.__exportStar(t(56),r),n.__exportStar(t(71),r),n.__exportStar(t(75),r),n.__exportStar(t(79),r),n.__exportStar(t(81),r),n.__exportStar(t(87),r),n.__exportStar(t(93),r),n.__exportStar(t(111),r),n.__exportStar(t(127),r),n.__exportStar(t(131),r),n.__exportStar(t(135),r),n.__exportStar(t(142),r),n.__exportStar(t(235),r),n.__exportStar(t(145),r),n.__exportStar(t(149),r),n.__exportStar(t(155),r),n.__exportStar(t(161),r),n.__exportStar(t(164),r),n.__exportStar(t(174),r),n.__exportStar(t(184),r),n.__exportStar(t(196),r),n.__exportStar(t(223),r)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(12),a=t(14),l=t(21),u=t(29),c=t(136);r.BoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-grid\",e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.children.change,function(t){return function(){return t.rebuild_child_views()}}(this))},e.prototype.get_height=function(){var t,e,r;return e=this.model.get_layoutable_children(),t=e.map(function(t){return t._height.value}),r=this.model._horizontal?l.max(t):l.sum(t)},e.prototype.get_width=function(){var t,e,r;return e=this.model.get_layoutable_children(),t=e.map(function(t){return t._width.value}),r=this.model._horizontal?l.sum(t):l.max(t)},e}(c.LayoutDOMView),r.Box=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._child_equal_size_width=new s.Variable(this.toString()+\".child_equal_size_width\"),this._child_equal_size_height=new s.Variable(this.toString()+\".child_equal_size_height\"),this._box_equal_size_top=new s.Variable(this.toString()+\".box_equal_size_top\"),this._box_equal_size_bottom=new s.Variable(this.toString()+\".box_equal_size_bottom\"),this._box_equal_size_left=new s.Variable(this.toString()+\".box_equal_size_left\"),this._box_equal_size_right=new s.Variable(this.toString()+\".box_equal_size_right\"),this._box_cell_align_top=new s.Variable(this.toString()+\".box_cell_align_top\"),this._box_cell_align_bottom=new s.Variable(this.toString()+\".box_cell_align_bottom\"),this._box_cell_align_left=new s.Variable(this.toString()+\".box_cell_align_left\"),this._box_cell_align_right=new s.Variable(this.toString()+\".box_cell_align_right\")}return n(e,t),e.prototype.default_view=r.BoxView,e.define({children:[a.Array,[]]}),e.internal({spacing:[a.Number,6]}),e.prototype.get_layoutable_children=function(){return this.children},e.prototype.get_constrained_variables=function(){return u.extend({},e.__super__.get_constrained_variables.call(this),{box_equal_size_top:this._box_equal_size_top,box_equal_size_bottom:this._box_equal_size_bottom,box_equal_size_left:this._box_equal_size_left,box_equal_size_right:this._box_equal_size_right,box_cell_align_top:this._box_cell_align_top,box_cell_align_bottom:this._box_cell_align_bottom,box_cell_align_left:this._box_cell_align_left,box_cell_align_right:this._box_cell_align_right})},e.prototype.get_constraints=function(){var t,e,r,n,i,o,a,l,u,c,_,h;if(r=[],e=this.get_layoutable_children(),0===e.length)return r;for(i=0,l=e.length;i<l;i++)t=e[i],h=t.get_constrained_variables(),c=this._child_rect(h),this._horizontal?null!=h.height&&r.push(s.EQ(c.height,[-1,this._height])):null!=h.width&&r.push(s.EQ(c.width,[-1,this._width])),this._horizontal?null!=h.box_equal_size_left&&null!=h.box_equal_size_right&&null!=h.width&&r.push(s.EQ([-1,h.box_equal_size_left],[-1,h.box_equal_size_right],h.width,this._child_equal_size_width)):null!=h.box_equal_size_top&&null!=h.box_equal_size_bottom&&null!=h.height&&r.push(s.EQ([-1,h.box_equal_size_top],[-1,h.box_equal_size_bottom],h.height,this._child_equal_size_height));for(a=this._info(e[0].get_constrained_variables()),r.push(s.EQ(a.span.start,0)),n=o=1,_=e.length;1<=_?o<_:o>_;n=1<=_?++o:--o)u=this._info(e[n].get_constrained_variables()),a.span.size&&r.push(s.EQ(a.span.start,a.span.size,[-1,u.span.start])),r.push(s.WEAK_EQ(a.whitespace.after,u.whitespace.before,0-this.spacing)),r.push(s.GE(a.whitespace.after,u.whitespace.before,0-this.spacing)),a=u;return this._horizontal?null!=h.width&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._width])):null!=h.height&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._height])),r=r.concat(this._align_outer_edges_constraints(!0),this._align_outer_edges_constraints(!1),this._align_inner_cell_edges_constraints(),this._box_equal_size_bounds(!0),this._box_equal_size_bounds(!1),this._box_cell_align_bounds(!0),this._box_cell_align_bounds(!1),this._box_whitespace(!0),this._box_whitespace(!1));\n",
" },e.prototype._child_rect=function(t){return{x:t.origin_x,y:t.origin_y,width:t.width,height:t.height}},e.prototype._span=function(t){return this._horizontal?{start:t.x,size:t.width}:{start:t.y,size:t.height}},e.prototype._info=function(t){var e,r;return r=this._horizontal?{before:t.whitespace_left,after:t.whitespace_right}:{before:t.whitespace_top,after:t.whitespace_bottom},e=this._span(this._child_rect(t)),{span:e,whitespace:r}},e.prototype._flatten_cell_edge_variables=function(t){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x;for(w=t?e._top_bottom_inner_cell_edge_variables:e._left_right_inner_cell_edge_variables,r=t!==this._horizontal,l=this.get_layoutable_children(),i=l.length,c={},o=0,_=0,f=l.length;_<f;_++){for(a=l[_],s=a instanceof e?a._flatten_cell_edge_variables(t):{},n=a.get_constrained_variables(),h=0,y=w.length;h<y;h++)m=w[h],m in n&&(s[m]=[n[m]]);for(p in s)x=s[p],r?(g=p.split(\" \"),d=g[0],b=g.length>1?g[1]:\"\",u=this._horizontal?\"row\":\"col\",v=d+\" \"+u+\"-\"+i+\"-\"+o+\"-\"+b):v=p,v in c?c[v]=c[v].concat(x):c[v]=x;o+=1}return c},e.prototype._align_inner_cell_edges_constraints=function(){var t,e,r,n,i,a,l,u;if(t=[],null!=this.document&&o.call(this.document.roots(),this)>=0){e=this._flatten_cell_edge_variables(this._horizontal);for(i in e)if(u=e[i],u.length>1)for(a=u[0],r=n=1,l=u.length;1<=l?n<l:n>l;r=1<=l?++n:--n)t.push(s.EQ(u[r],[-1,a]))}return t},e.prototype._find_edge_leaves=function(t){var r,n,i,o,s,a,l,u;if(i=this.get_layoutable_children(),a=[[],[]],i.length>0)if(this._horizontal===t)u=i[0],o=i[i.length-1],u instanceof e?a[0]=a[0].concat(u._find_edge_leaves(t)[0]):a[0].push(u),o instanceof e?a[1]=a[1].concat(o._find_edge_leaves(t)[1]):a[1].push(o);else for(s=0,l=i.length;s<l;s++)r=i[s],r instanceof e?(n=r._find_edge_leaves(t),a[0]=a[0].concat(n[0]),a[1]=a[1].concat(n[1])):(a[0].push(r),a[1].push(r));return a},e.prototype._align_outer_edges_constraints=function(t){var e,r,n,i,o,a,l,u,c,_;return a=this._find_edge_leaves(t),c=a[0],i=a[1],t?(_=\"on_edge_align_left\",o=\"on_edge_align_right\"):(_=\"on_edge_align_top\",o=\"on_edge_align_bottom\"),r=function(t,e){var r,n,i,o,s;for(r=[],n=0,o=t.length;n<o;n++)i=t[n],s=i.get_constrained_variables(),e in s&&r.push(s[e]);return r},u=r(c,_),n=r(i,o),l=[],e=function(t){var e,r,n,i,o;if(t.length>1){for(r=t[0],n=i=1,o=t.length;1<=o?i<o:i>o;n=1<=o?++i:--i)e=t[n],l.push(s.EQ([-1,r],e));return null}},e(u),e(n),l},e.prototype._box_insets_from_child_insets=function(t,e,r,n){var i,o,a,l,u,c,_,h,p;return c=this._find_edge_leaves(t),h=c[0],o=c[1],t?(p=e+\"_left\",a=e+\"_right\",u=this[r+\"_left\"],l=this[r+\"_right\"]):(p=e+\"_top\",a=e+\"_bottom\",u=this[r+\"_top\"],l=this[r+\"_bottom\"]),_=[],i=function(t,e,r){var i,o,a,l,u;for(i=[],o=0,l=e.length;o<l;o++)a=e[o],u=a.get_constrained_variables(),r in u&&(n?_.push(s.GE([-1,t],u[r])):_.push(s.EQ([-1,t],u[r])));return null},i(u,h,p),i(l,o,a),_},e.prototype._box_equal_size_bounds=function(t){return this._box_insets_from_child_insets(t,\"box_equal_size\",\"_box_equal_size\",!1)},e.prototype._box_cell_align_bounds=function(t){return this._box_insets_from_child_insets(t,\"box_cell_align\",\"_box_cell_align\",!1)},e.prototype._box_whitespace=function(t){return this._box_insets_from_child_insets(t,\"whitespace\",\"_whitespace\",!0)},e._left_right_inner_cell_edge_variables=[\"box_cell_align_left\",\"box_cell_align_right\"],e._top_bottom_inner_cell_edge_variables=[\"box_cell_align_top\",\"box_cell_align_bottom\"],e}(c.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(133);r.ColumnView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-grid-column\",e}(o.BoxView),r.Column=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._horizontal=!1}return n(e,t),e.prototype.type=\"Column\",e.prototype.default_view=r.ColumnView,e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(133);r.Box=n.Box;var i=t(134);r.Column=i.Column;var o=t(136);r.LayoutDOM=o.LayoutDOM;var s=t(137);r.Row=s.Row;var a=t(138);r.Spacer=a.Spacer;var l=t(139);r.WidgetBox=l.WidgetBox},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(5),a=t(14),l=t(10),u=t(12),c=t(4),_=t(6),h=t(13);r.LayoutDOMView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.is_root&&(this._solver=new u.Solver),this.child_views={},this.build_child_views(),this.connect_signals()},e.prototype.remove=function(){var t,r,n;r=this.child_views;for(t in r)n=r[t],n.remove();return this.child_views={},e.__super__.remove.call(this)},e.prototype.has_finished=function(){var t,r,n;if(!e.__super__.has_finished.call(this))return!1;n=this.child_views;for(t in n)if(r=n[t],!r.has_finished())return!1;return!0},e.prototype.notify_finished=function(){return this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document?(this._idle_notified=!0,this.model.document.notify_idle(this.model)):void 0:e.__super__.notify_finished.call(this)},e.prototype._calc_width_height=function(){var t,e,r,n;for(e=this.el;;){if(e=e.parentNode,null==e){h.logger.warn(\"detached element\"),n=t=null;break}if(r=e.getBoundingClientRect(),n=r.width,t=r.height,0!==t)break}return[n,t]},e.prototype._init_solver=function(){var t,e,r,n,i,o,s,a,l;for(this._root_width=new u.Variable(this.toString()+\".root_width\"),this._root_height=new u.Variable(this.toString()+\".root_height\"),this._solver.add_edit_variable(this._root_width),this._solver.add_edit_variable(this._root_height),n=this.model.get_all_editables(),i=0,s=n.length;i<s;i++)r=n[i],this._solver.add_edit_variable(r,u.Strength.strong);for(e=this.model.get_all_constraints(),o=0,a=e.length;o<a;o++)t=e[o],this._solver.add_constraint(t);return l=this.model.get_constrained_variables(),null!=l.width&&this._solver.add_constraint(u.EQ(l.width,this._root_width)),null!=l.height&&this._solver.add_constraint(u.EQ(l.height,this._root_height)),this._solver.update_variables()},e.prototype._suggest_dims=function(t,e){var r,n;if(n=this.model.get_constrained_variables(),null!=n.width||null!=n.height)return null!==t&&null!==e||(r=this._calc_width_height(),t=r[0],e=r[1]),null!=n.width&&null!=t&&this._solver.suggest_value(this._root_width,t),null!=n.height&&null!=e&&this._solver.suggest_value(this._root_height,e),this._solver.update_variables()},e.prototype.resize=function(t,e){return null==t&&(t=null),null==e&&(e=null),this.is_root?this._do_layout(!1,t,e):this.root.resize(t,e)},e.prototype.layout=function(t){return null==t&&(t=!0),this.is_root?this._do_layout(t):this.root.layout(t)},e.prototype._do_layout=function(t,e,r){return null==e&&(e=null),null==r&&(r=null),t&&(this._solver.clear(),this._init_solver()),this._suggest_dims(e,r),this._layout(),this._layout(),this._layout(!0),this.notify_finished()},e.prototype._layout=function(t){var e,r,n,i,o;for(null==t&&(t=!1),o=this.model.get_layoutable_children(),n=0,i=o.length;n<i;n++)e=o[n],r=this.child_views[e.id],null!=r._layout&&r._layout(t);if(this.render(),t)return this._has_finished=!0},e.prototype.rebuild_child_views=function(){return this.solver.clear(),this.build_child_views(),this.layout()},e.prototype.build_child_views=function(){var t,e,r,n,i,o;for(r=this.model.get_layoutable_children(),c.build_views(this.child_views,r,{parent:this}),s.empty(this.el),o=[],n=0,i=r.length;n<i;n++)t=r[n],e=this.child_views[t.id],o.push(this.el.appendChild(e.el));return o},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.is_root&&window.addEventListener(\"resize\",function(t){return function(){return t.resize()}}(this)),this.connect(this.model.properties.sizing_mode.change,function(t){return function(){return t.layout()}}(this))},e.prototype._render_classes=function(){var t,e,r,n,i;if(this.el.className=\"\",null!=this.className&&this.el.classList.add(this.className),null!=this.model.sizing_mode&&this.el.classList.add(\"bk-layout-\"+this.model.sizing_mode),null!=this.model.css_classes){for(n=this.model.css_classes,i=[],e=0,r=n.length;e<r;e++)t=n[e],i.push(this.el.classList.add(t));return i}},e.prototype.render=function(){var t,e;switch(this._render_classes(),this.model.sizing_mode){case\"fixed\":return null!=this.model.width?e=this.model.width:(e=this.get_width(),this.model.setv({width:e},{silent:!0})),null!=this.model.height?t=this.model.height:(t=this.get_height(),this.model.setv({height:t},{silent:!0})),this.solver.suggest_value(this.model._width,e),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=e+\"px\",this.el.style.height=t+\"px\";case\"scale_width\":return t=this.get_height(),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\";case\"scale_height\":return e=this.get_width(),this.solver.suggest_value(this.model._width,e),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\";case\"stretch_both\":return this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"}},e.prototype.get_height=function(){return null},e.prototype.get_width=function(){return null},e}(_.DOMView),r.LayoutDOM=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LayoutDOM\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._width=new u.Variable(this.toString()+\".width\"),this._height=new u.Variable(this.toString()+\".height\"),this._left=new u.Variable(this.toString()+\".left\"),this._right=new u.Variable(this.toString()+\".right\"),this._top=new u.Variable(this.toString()+\".top\"),this._bottom=new u.Variable(this.toString()+\".bottom\"),this._dom_top=new u.Variable(this.toString()+\".dom_top\"),this._dom_left=new u.Variable(this.toString()+\".dom_left\"),this._width_minus_right=new u.Variable(this.toString()+\".width_minus_right\"),this._height_minus_bottom=new u.Variable(this.toString()+\".height_minus_bottom\"),this._whitespace_top=new u.Variable(this.toString()+\".whitespace_top\"),this._whitespace_bottom=new u.Variable(this.toString()+\".whitespace_bottom\"),this._whitespace_left=new u.Variable(this.toString()+\".whitespace_left\"),this._whitespace_right=new u.Variable(this.toString()+\".whitespace_right\")},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,bottom:this._bottom.value,dom_top:this._dom_top.value,dom_left:this._dom_left.value}}}),e.prototype.dump_layout=function(){var t,r,n;for(t={},n=[this];n.length>0;)r=n.shift(),r instanceof e&&n.push.apply(n,r.get_layoutable_children()),t[r.toString()]=r.layout_bbox;return console.table(t)},e.prototype.get_all_constraints=function(){var t,e,r,n,i;for(e=this.get_constraints(),i=this.get_layoutable_children(),r=0,n=i.length;r<n;r++)t=i[r],e=t instanceof l.LayoutCanvas?e.concat(t.get_constraints()):e.concat(t.get_all_constraints());return e},e.prototype.get_all_editables=function(){var t,e,r,n,i;for(e=this.get_editables(),i=this.get_layoutable_children(),r=0,n=i.length;r<n;r++)t=i[r],e=t instanceof l.LayoutCanvas?e.concat(t.get_editables()):e.concat(t.get_all_editables());return e},e.prototype.get_constraints=function(){return[u.GE(this._dom_left),u.GE(this._dom_top),u.GE(this._left),u.GE(this._width,[-1,this._right]),u.GE(this._top),u.GE(this._height,[-1,this._bottom]),u.EQ(this._width_minus_right,[-1,this._width],this._right),u.EQ(this._height_minus_bottom,[-1,this._height],this._bottom)]},e.prototype.get_layoutable_children=function(){return[]},e.prototype.get_editables=function(){switch(this.sizing_mode){case\"fixed\":return[this._height,this._width];case\"scale_width\":return[this._height];case\"scale_height\":return[this._width];default:return[]}},e.prototype.get_constrained_variables=function(){var t;switch(t={origin_x:this._dom_left,origin_y:this._dom_top,whitespace_top:this._whitespace_top,whitespace_bottom:this._whitespace_bottom,whitespace_left:this._whitespace_left,whitespace_right:this._whitespace_right},this.sizing_mode){case\"stretch_both\":t.width=this._width,t.height=this._height;break;case\"scale_width\":t.width=this._width;break;case\"scale_height\":t.height=this._height}return t},e.define({height:[a.Number],width:[a.Number],disabled:[a.Bool,!1],sizing_mode:[a.SizingMode,\"fixed\"],css_classes:[a.Array]}),e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(133);r.RowView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-grid-row\",e}(o.BoxView),r.Row=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._horizontal=!0}return n(e,t),e.prototype.type=\"Row\",e.prototype.default_view=r.RowView,e}(o.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(136),s=t(29);r.SpacerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-spacer-box\",e.prototype.render=function(){if(e.__super__.render.call(this),\"fixed\"===this.sizing_mode)return this.el.style.width=this.model.width+\"px\",this.el.style.height=this.model.height+\"px\"},e.prototype.get_height=function(){return 1},e}(o.LayoutDOMView),r.Spacer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Spacer\",e.prototype.default_view=r.SpacerView,e.prototype.get_constrained_variables=function(){return s.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom,box_equal_size_left:this._left,box_equal_size_right:this._width_minus_right})},e}(o.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(13),s=t(14),a=t(29),l=t(136);r.WidgetBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-widget-box\",e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.children.change,function(t){return function(){return t.rebuild_child_views()}}(this))},e.prototype.render=function(){var t,e,r;return this._render_classes(),\"fixed\"!==this.model.sizing_mode&&\"scale_height\"!==this.model.sizing_mode||(r=this.get_width(),this.model._width.value!==r&&this.solver.suggest_value(this.model._width,r)),\"fixed\"!==this.model.sizing_mode&&\"scale_width\"!==this.model.sizing_mode||(e=this.get_height(),this.model._height.value!==e&&this.solver.suggest_value(this.model._height,e)),this.solver.update_variables(),\"stretch_both\"===this.model.sizing_mode?(this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"):(t=this.model._width.value-20>0?this.model._width.value-20+\"px\":\"100%\",this.el.style.width=t)},e.prototype.get_height=function(){var t,e,r,n;e=0,n=this.child_views;for(r in n)i.call(n,r)&&(t=n[r],e+=t.el.scrollHeight);return e+20},e.prototype.get_width=function(){var t,e,r,n,o;if(null!=this.model.width)return this.model.width;o=this.el.scrollWidth+20,n=this.child_views;for(r in n)i.call(n,r)&&(t=n[r],e=t.el.scrollWidth,e>o&&(o=e));return o},e}(l.LayoutDOMView),r.WidgetBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"WidgetBox\",e.prototype.default_view=r.WidgetBoxView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),\"fixed\"===this.sizing_mode&&null===this.width&&(this.width=300,o.logger.info(\"WidgetBox mode is fixed, but no width specified. Using default of 300.\")),\"scale_height\"===this.sizing_mode)return o.logger.warn(\"sizing_mode `scale_height` is not experimental for WidgetBox. Please report your results to the bokeh dev team so we can improve.\")},e.prototype.get_constrained_variables=function(){var t;return t=a.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom}),\"fixed\"!==this.sizing_mode&&(t.box_equal_size_left=this._left,t.box_equal_size_right=this._width_minus_right),t},e.prototype.get_layoutable_children=function(){return this.children},e.define({children:[s.Array,[]]}),e}(l.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(141),a=t(14),l=t(21),u=t(41);n=function(t,e){var r,n,i;if(t.length!==e.length)return!1;for(r=n=0,i=t.length;0<=i?n<i:n>i;r=0<=i?++n:--n)if(t[r]!==e[r])return!1;return!0},r.CategoricalColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"CategoricalColorMapper\",e.define({factors:[a.Array],start:[a.Number,0],end:[a.Number]}),e.prototype._get_values=function(t,e){var r,i,o,s,a,c;for(c=[],o=0,a=t.length;o<a;o++)i=t[o],u.isString(i)?s=this.factors.indexOf(i):(null!=this.start?i=null!=this.end?i.slice(this.start,this.end):i.slice(this.start):null!=this.end&&(i=i.slice(0,this.end)),s=1===i.length?this.factors.indexOf(i[0]):l.findIndex(this.factors,function(t){return n(t,i)})),r=s<0||s>=e.length?this.nan_color:e[s],c.push(r);return c},e}(s.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(240),a=t(41);r.ColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColorMapper\",e.define({palette:[o.Any],nan_color:[o.Color,\"gray\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._little_endian=this._is_little_endian(),this._palette=this._build_palette(this.palette),this.connect(this.change,function(){return this._palette=this._build_palette(this.palette)})},e.prototype.v_map_screen=function(t,e){var r,n,i,o,s,a,l,u,c,_;if(null==e&&(e=!1),_=this._get_values(t,this._palette,e),r=new ArrayBuffer(4*t.length),this._little_endian)for(n=new Uint8Array(r),i=s=0,l=t.length;0<=l?s<l:s>l;i=0<=l?++s:--s)c=_[i],o=4*i,n[o]=Math.floor(c/4278190080*255),n[o+1]=(16711680&c)>>16,n[o+2]=(65280&c)>>8,n[o+3]=255&c;else for(n=new Uint32Array(r),i=a=0,u=t.length;0<=u?a<u:a>u;i=0<=u?++a:--a)c=_[i],n[i]=c<<8|255;return r},e.prototype.compute=function(t){return null},e.prototype.v_compute=function(t){var e;return e=this._get_values(t,this.palette)},e.prototype._get_values=function(t,e,r){return null==r&&(r=!1),[]},e.prototype._is_little_endian=function(){var t,e,r,n;return t=new ArrayBuffer(4),r=new Uint8Array(t),e=new Uint32Array(t),e[1]=168496141,n=!0,10===r[4]&&11===r[5]&&12===r[6]&&13===r[7]&&(n=!1),n},e.prototype._build_palette=function(t){var e,r,n,i,o;for(i=new Uint32Array(t.length),e=function(t){return a.isNumber(t)?t:(9!==t.length&&(t+=\"ff\"),parseInt(t.slice(1),16))},r=n=0,o=t.length;0<=o?n<o:n>o;r=0<=o?++n:--n)i[r]=e(t[r]);return i},e}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(140);r.CategoricalColorMapper=n.CategoricalColorMapper;var i=t(141);r.ColorMapper=i.ColorMapper;var o=t(143);r.LinearColorMapper=o.LinearColorMapper;var s=t(144);r.LogColorMapper=s.LogColorMapper},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(25),a=t(21),l=t(141);r.LinearColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LinearColorMapper\",e.define({high:[o.Number],low:[o.Number],high_color:[o.Color],low_color:[o.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([s.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([s.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([s.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var n,i,o,s,l,u,c,_,h,p,d,f,y,m,v,g;for(null==r&&(r=!1),c=null!=(m=this.low)?m:a.min(t),i=null!=(v=this.high)?v:a.max(t),h=e.length-1,g=[],p=r?this._nan_color:this.nan_color,_=r?this._low_color:this.low_color,o=r?this._high_color:this.high_color,d=1/(i-c),y=1/e.length,s=0,u=t.length;s<u;s++)n=t[s],isNaN(n)?g.push(p):n!==i?(f=(n-c)*d,l=Math.floor(f/y),l<0?null!=this.low_color?g.push(_):g.push(e[0]):l>h?null!=this.high_color?g.push(o):g.push(e[h]):g.push(e[l])):g.push(e[h]);return g},e}(l.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(14),l=t(25),u=t(21),c=t(141);n=null!=(i=Math.log1p)?i:function(t){return Math.log(1+t)},r.LogColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LogColorMapper\",e.define({high:[a.Number],low:[a.Number],high_color:[a.Color],low_color:[a.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([l.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([l.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([l.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var i,o,s,a,l,c,_,h,p,d,f,y,m,v,g,b;for(null==r&&(r=!1),f=e.length,h=null!=(m=this.low)?m:u.min(t),o=null!=(v=this.high)?v:u.max(t),g=f/(n(o)-n(h)),d=e.length-1,b=[],y=r?this._nan_color:this.nan_color,s=r?this._high_color:this.high_color,p=r?this._low_color:this.low_color,a=0,c=t.length;a<c;a++)i=t[a],isNaN(i)?b.push(y):i>o?null!=this.high_color?b.push(s):b.push(e[d]):i!==o?i<h?null!=this.low_color?b.push(p):b.push(e[0]):(_=n(i)-n(h),l=Math.floor(_*g),l>d&&(l=d),b.push(e[l])):b.push(e[d]);return b},e}(c.ColorMapper)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w=function(t,e){function r(){this.constructor=t}for(var n in e)x.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},x={}.hasOwnProperty,k=t(146);n=Math.sqrt(3),l=function(t,e){return t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)},o=function(t,e){return t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)},s=function(t,e){return t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()},a=function(t,e){var r,i;return i=e*n,r=i/3,t.moveTo(-e,r),t.lineTo(e,r),t.lineTo(0,r-i),t.closePath()},u=function(t,e,r,n,i,s,a){var u;u=.65*i,o(t,i),l(t,u),s.doit&&(s.set_vectorize(t,e),t.stroke())},c=function(t,e,r,n,i,s,a){t.arc(0,0,i,0,2*Math.PI,!1),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),o(t,i),t.stroke())},_=function(t,e,r,n,i,o,s){t.arc(0,0,i,0,2*Math.PI,!1),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),l(t,i),t.stroke())},h=function(t,e,r,n,i,s,a){o(t,i),s.doit&&(s.set_vectorize(t,e),t.stroke())},p=function(t,e,r,n,i,o,a){s(t,i),a.doit&&(a.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},d=function(t,e,r,n,i,a,l){s(t,i),l.doit&&(l.set_vectorize(t,e),t.fill()),a.doit&&(a.set_vectorize(t,e),o(t,i),t.stroke())},f=function(t,e,r,n,i,o,s){t.rotate(Math.PI),a(t,i),t.rotate(-Math.PI),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},y=function(t,e,r,n,i,o,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},m=function(t,e,r,n,i,s,a){var l;l=2*i,t.rect(-i,-i,l,l),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),o(t,i),t.stroke())},v=function(t,e,r,n,i,o,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),l(t,i),t.stroke())},g=function(t,e,r,n,i,o,s){a(t,i),s.doit&&(s.set_vectorize(t,e),t.fill()),o.doit&&(o.set_vectorize(t,e),t.stroke())},b=function(t,e,r,n,i,o,s){l(t,i),o.doit&&(o.set_vectorize(t,e),t.stroke())},i=function(t,e){var r,n;return n=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,t),r.prototype._render_one=e,r}(k.MarkerView),r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,e),r.prototype.default_view=n,r.prototype.type=t,r}(k.Marker)},r.Asterisk=i(\"Asterisk\",u),r.CircleCross=i(\"CircleCross\",c),r.CircleX=i(\"CircleX\",_),r.Cross=i(\"Cross\",h),r.Diamond=i(\"Diamond\",p),r.DiamondCross=i(\"DiamondCross\",d),r.InvertedTriangle=i(\"InvertedTriangle\",f),r.Square=i(\"Square\",y),r.SquareCross=i(\"SquareCross\",m),r.SquareX=i(\"SquareX\",v),r.Triangle=i(\"Triangle\",g),r.X=i(\"X\",b)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(125),s=t(9),a=t(14);r.MarkerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.draw_legend_for_index=function(t,e,r,n,i,o){var s,a,l,u,c,_;return l=[o],c={},c[o]=(e+r)/2,_={},_[o]=(n+i)/2,u={},u[o]=.4*Math.min(Math.abs(r-e),Math.abs(i-n)),s={},s[o]=this._angle[o],a={sx:c,sy:_,_size:u,_angle:s},this._render(t,l,a)},e.prototype._render=function(t,e,r){var n,i,o,s,a,l,u,c,_;for(c=r.sx,_=r.sy,i=r._size,n=r._angle,u=[],s=0,a=e.length;s<a;s++)o=e[s],isNaN(c[o]+_[o]+i[o]+n[o])||(l=i[o]/2,t.beginPath(),t.translate(c[o],_[o]),n[o]&&t.rotate(n[o]),this._render_one(t,o,c[o],_[o],l,this.visuals.line,this.visuals.fill),n[o]&&t.rotate(-n[o]),u.push(t.translate(-c[o],-_[o])));return u},e.prototype._mask_data=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d;return r=this.renderer.plot_view.frame.h_range,a=r.start-this.max_size,l=r.end+this.max_size,n=this.renderer.xscale.v_invert([a,l]),_=n[0],h=n[1],o=this.renderer.plot_view.frame.v_range,u=o.start-this.max_size,c=o.end+this.max_size,i=this.renderer.yscale.v_invert([u,c]),p=i[0],d=i[1],e=s.validate_bbox_coords([_,h],[p,d]),this.index.indices(e)},e.prototype._hit_point=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M;for(u=[t.vx,t.vy],f=u[0],v=u[1],p=this.renderer.plot_view.canvas.vx_to_sx(f),d=this.renderer.plot_view.canvas.vy_to_sy(v),y=f-this.max_size,m=f+this.max_size,c=this.renderer.xscale.v_invert([y,m]),w=c[0],x=c[1],g=v-this.max_size,b=v+this.max_size,_=this.renderer.yscale.v_invert([g,b]),k=_[0],M=_[1],e=s.validate_bbox_coords([w,x],[k,M]),r=this.index.indices(e),i=[],a=0,l=r.length;a<l;a++)o=r[a],h=this._size[o]/2,n=Math.abs(this.sx[o]-p)+Math.abs(this.sy[o]-d),Math.abs(this.sx[o]-p)<=h&&Math.abs(this.sy[o]-d)<=h&&i.push([o,n]);return s.create_1d_hit_test_result(i)},e.prototype._hit_span=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k;return u=[t.vx,t.vy],d=u[0],m=u[1],c=this.bounds(),o=c.minX,a=c.minY,n=c.maxX,i=c.maxY,p=s.create_hit_test_result(),\"h\"===t.direction?(x=a,k=i,l=this.max_size/2,f=d-l,y=d+l,_=this.renderer.xscale.v_invert([f,y]),b=_[0],w=_[1]):(b=o,w=n,l=this.max_size/2,v=m-l,g=m+l,h=this.renderer.yscale.v_invert([v,g]),x=h[0],k=h[1]),e=s.validate_bbox_coords([b,w],[x,k]),r=this.index.indices(e),p[\"1d\"].indices=r,p},e.prototype._hit_rect=function(t){var e,r,n,i,o,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1]),o=r[0],a=r[1],n=this.renderer.yscale.v_invert([t.vy0,t.vy1]),l=n[0],u=n[1],e=s.validate_bbox_coords([o,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_poly=function(t){var e,r,n,i,o,a,l,u,c,_,h,p,d;for(a=[t.vx,t.vy],p=a[0],d=a[1],_=this.renderer.plot_view.canvas.v_vx_to_sx(p),h=this.renderer.plot_view.canvas.v_vy_to_sy(d),e=function(){c=[];for(var t=0,e=this.sx.length;0<=e?t<e:t>e;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],n=o=0,l=e.length;0<=l?o<l:o>l;n=0<=l?++o:--o)i=e[n],s.point_in_poly(this.sx[n],this.sy[n],_,h)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e}(o.XYGlyphView),r.Marker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mixins([\"line\",\"fill\"]),e.define({size:[a.DistanceSpec,{units:\"screen\",value:4}],angle:[a.AngleSpec,0]}),e}(o.XYGlyph)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(13),s=t(148),a=t(150),l=t(14),u=t(49);r.MapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MapOptions\",e.define({lat:[l.Number],lng:[l.Number],zoom:[l.Number,12]}),e}(u.Model),r.GMapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GMapOptions\",e.define({map_type:[l.String,\"roadmap\"],scale_control:[l.Bool,!1],styles:[l.String]}),e}(r.MapOptions),r.GMapPlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(a.PlotView),r.GMapPlot=function(t){function e(){return e.__super__.constructor.apply(this,arguments);\n",
" }return n(e,t),e.prototype.type=\"GMapPlot\",e.prototype.default_view=r.GMapPlotView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),!this.api_key)return o.logger.error(\"api_key is required. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.\")},e.prototype._init_plot_canvas=function(){return new s.GMapPlotCanvas({plot:this})},e.define({map_options:[l.Instance],api_key:[l.String]}),e}(a.Plot)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(30),u=t(151),c=t(19);n=new c.Signal(this,\"gmaps_ready\"),i=function(t){var e;return window._bokeh_gmaps_callback=function(){return n.emit()},e=document.createElement(\"script\"),e.type=\"text/javascript\",e.src=\"https://maps.googleapis.com/maps/api/js?key=\"+t+\"&callback=_bokeh_gmaps_callback\",document.body.appendChild(e)},r.GMapPlotCanvasView=function(t){function e(){return this._set_bokeh_ranges=o(this._set_bokeh_ranges,this),this._get_projected_bounds=o(this._get_projected_bounds,this),this._get_latlon_bounds=o(this._get_latlon_bounds,this),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){var r,o;return this.pause(),e.__super__.initialize.call(this,t),this._tiles_loaded=!1,this.zoom_count=0,r=this.model.plot.map_options,this.initial_zoom=r.zoom,this.initial_lat=r.lat,this.initial_lng=r.lng,this.canvas_view.map_el.style.position=\"absolute\",null==(null!=(o=window.google)?o.maps:void 0)&&(null==window._bokeh_gmaps_callback&&i(this.model.plot.api_key),n.connect(function(t){return function(){return t.request_render()}}(this))),this.unpause()},e.prototype.update_range=function(t){var r,n,i,o,s,a,l,u,c;if(null==t)r=this.model.plot.map_options,this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),e.__super__.update_range.call(this,null);else if(null!=t.sdx||null!=t.sdy)this.map.panBy(t.sdx,t.sdy),e.__super__.update_range.call(this,t);else if(null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),e.__super__.update_range.call(this,t),c=t.factor<0?-1:1,i=this.map.getZoom(),n=i+c,n>=2&&(this.map.setZoom(n),u=this._get_projected_bounds(),s=u[0],o=u[1],l=u[2],a=u[3],o-s<0&&this.map.setZoom(i)),this.unpause()}return this._set_bokeh_ranges()},e.prototype._build_map=function(){var t,e,r;return e=window.google.maps,this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID},r=this.model.plot.map_options,t={center:new e.LatLng(r.lat,r.lng),zoom:r.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[r.map_type],scaleControl:r.scale_control},null!=r.styles&&(t.styles=JSON.parse(r.styles)),this.map=new e.Map(this.canvas_view.map_el,t),e.event.addListener(this.map,\"idle\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListener(this.map,\"bounds_changed\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListenerOnce(this.map,\"tilesloaded\",function(t){return function(){return t._render_finished()}}(this)),this.connect(this.model.plot.properties.map_options.change,function(t){return function(){return t._update_options()}}(this)),this.connect(this.model.plot.map_options.properties.styles.change,function(t){return function(){return t._update_styles()}}(this)),this.connect(this.model.plot.map_options.properties.lat.change,function(t){return function(){return t._update_center(\"lat\")}}(this)),this.connect(this.model.plot.map_options.properties.lng.change,function(t){return function(){return t._update_center(\"lng\")}}(this)),this.connect(this.model.plot.map_options.properties.zoom.change,function(t){return function(){return t._update_zoom()}}(this)),this.connect(this.model.plot.map_options.properties.map_type.change,function(t){return function(){return t._update_map_type()}}(this)),this.connect(this.model.plot.map_options.properties.scale_control.change,function(t){return function(){return t._update_scale_control()}}(this))},e.prototype._render_finished=function(){return this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._tiles_loaded===!0},e.prototype._get_latlon_bounds=function(){var t,e,r,n,i,o,s;return e=this.map.getBounds(),r=e.getNorthEast(),t=e.getSouthWest(),i=t.lng(),n=r.lng(),s=t.lat(),o=r.lat(),[i,n,s,o]},e.prototype._get_projected_bounds=function(){var t,e,r,n,i,o,s,a,u,c,_;return i=this._get_latlon_bounds(),u=i[0],a=i[1],_=i[2],c=i[3],o=l.proj4(l.mercator,[u,_]),e=o[0],n=o[1],s=l.proj4(l.mercator,[a,c]),t=s[0],r=s[1],[e,t,n,r]},e.prototype._set_bokeh_ranges=function(){var t,e,r,n,i;return i=this._get_projected_bounds(),e=i[0],t=i[1],n=i[2],r=i[3],this.frame.x_range.setv({start:e,end:t}),this.frame.y_range.setv({start:n,end:r})},e.prototype._update_center=function(t){var e;return e=this.map.getCenter().toJSON(),e[t]=this.model.plot.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){var t;return t=window.google.maps,this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){var t;return t=window.google.maps,this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){return this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){return this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){return this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var r,n,i,o,s;if(n=e[0],o=e[1],s=e[2],r=e[3],this.canvas_view.map_el.style.top=o+\"px\",this.canvas_view.map_el.style.left=n+\"px\",this.canvas_view.map_el.style.width=s+\"px\",this.canvas_view.map_el.style.height=r+\"px\",null==this.map&&null!=(null!=(i=window.google)?i.maps:void 0))return this._build_map()},e.prototype._paint_empty=function(t,e){var r,n,i,o,s,a;return s=this.canvas._width.value,o=this.canvas._height.value,i=e[0],a=e[1],n=e[2],r=e[3],t.clearRect(0,0,s,o),t.beginPath(),t.moveTo(0,0),t.lineTo(0,o),t.lineTo(s,o),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(i,a),t.lineTo(i+n,a),t.lineTo(i+n,a+r),t.lineTo(i,a+r),t.lineTo(i,a),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(u.PlotCanvasView),r.GMapPlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"GMapPlotCanvas\",e.prototype.default_view=r.GMapPlotCanvasView,e.prototype.initialize=function(t,r){return this.use_map=!0,e.__super__.initialize.call(this,t,r)},e}(u.PlotCanvas)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(147);r.MapOptions=n.MapOptions;var i=t(147);r.GMapOptions=i.GMapOptions;var o=t(147);r.GMapPlot=o.GMapPlot;var s=t(148);r.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(150);r.Plot=a.Plot;var l=t(151);r.PlotCanvas=l.PlotCanvas},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(12),a=t(13),l=t(14),u=t(29),c=t(41),_=t(136),h=t(64),p=t(165),d=t(230),f=t(151),y=t(170),m=t(158),v=t(3);r.PlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-plot-layout\",e.prototype.connect_signals=function(){var t;return e.__super__.connect_signals.call(this),t=\"Title object cannot be replaced. Try changing properties on title to update it after initialization.\",this.connect(this.model.properties.title.change,function(e){return function(){return a.logger.warn(t)}}(this))},e.prototype.render=function(){var t,r,n;if(e.__super__.render.call(this),\"scale_both\"===this.model.sizing_mode)return r=this.get_width_height(),n=r[0],t=r[1],this.solver.suggest_value(this.model._width,n),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.get_width_height=function(){var t,e,r,n,i,o,s,a,l;return s=this.el.parentNode.clientHeight,a=this.el.parentNode.clientWidth,t=this.model.get_aspect_ratio(),i=a,r=a/t,o=s*t,n=s,i<o?(l=i,e=r):(l=o,e=n),[l,e]},e.prototype.get_height=function(){return this.model._width.value/this.model.get_aspect_ratio()},e.prototype.get_width=function(){return this.model._height.value*this.model.get_aspect_ratio()},e.prototype.save=function(t){return this.plot_canvas_view.save(t)},e.getters({plot_canvas_view:function(){var t;return function(){var e,r,n,i;for(n=u.values(this.child_views),i=[],e=0,r=n.length;e<r;e++)t=n[e],t instanceof f.PlotCanvasView&&i.push(t);return i}.call(this)[0]}}),e}(_.LayoutDOMView),r.Plot=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Plot\",e.prototype.default_view=r.PlotView,e.prototype.initialize=function(t){var r,n,i,o,s,a,l,_,p,d,f,y,m,v,g,b,w,x,k,M;for(e.__super__.initialize.call(this,t),y=u.values(this.extra_x_ranges).concat(this.x_range),n=0,l=y.length;n<l;n++)k=y[n],f=k.plots,c.isArray(f)&&(f=f.concat(this),k.setv(\"plots\",f,{silent:!0}));for(m=u.values(this.extra_y_ranges).concat(this.y_range),i=0,_=m.length;i<_;i++)M=m[i],f=M.plots,c.isArray(f)&&(f=f.concat(this),M.setv(\"plots\",f,{silent:!0}));for(this._horizontal=\"left\"===(v=this.toolbar_location)||\"right\"===v,null!=this.min_border&&(null==this.min_border_top&&(this.min_border_top=this.min_border),null==this.min_border_bottom&&(this.min_border_bottom=this.min_border),null==this.min_border_left&&(this.min_border_left=this.min_border),null==this.min_border_right&&(this.min_border_right=this.min_border)),null!=this.title&&(x=c.isString(this.title)?new h.Title({text:this.title}):this.title,this.add_layout(x,this.title_location)),this._plot_canvas=this._init_plot_canvas(),this.toolbar.toolbar_location=this.toolbar_location,this.toolbar.toolbar_sticky=this.toolbar_sticky,this.plot_canvas.toolbar=this.toolbar,null==this.width&&(this.width=this.plot_width),null==this.height&&(this.height=this.plot_height),g=[\"above\",\"below\",\"left\",\"right\"],o=0,p=g.length;o<p;o++)for(w=g[o],a=this.getv(w),s=0,d=a.length;s<d;s++)b=a[s],b.add_panel(w);return r=function(t){return function(e){return e._sizeable=t._horizontal?e._width:e._height}}(this),r(this),r(this.plot_canvas)},e.prototype._init_plot_canvas=function(){return new f.PlotCanvas({plot:this})},e.getters({plot_canvas:function(){return this._plot_canvas}}),e.prototype._doc_attached=function(){return this.plot_canvas.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.add_renderers=function(){var t,e;return t=1<=arguments.length?o.call(arguments,0):[],e=this.renderers,e=e.concat(t),this.renderers=e},e.prototype.add_layout=function(t,e){var r;return null==e&&(e=\"center\"),null!=t.props.plot&&(t.plot=this),\"center\"!==e&&(r=this.getv(e),r.push(t),t.add_panel(e)),this.add_renderers(t)},e.prototype.add_glyph=function(t,e,r){var n;return null==r&&(r={}),null==e&&(e=new y.ColumnDataSource),r=u.extend({},r,{data_source:e,glyph:t}),n=new m.GlyphRenderer(r),this.add_renderers(n),n},e.prototype.add_tools=function(){var t,e,r,n;for(n=1<=arguments.length?o.call(arguments,0):[],t=0,e=n.length;t<e;t++)r=n[t],null!=r.overlay&&this.add_renderers(r.overlay);return this.toolbar.tools=this.toolbar.tools.concat(n)},e.prototype.get_aspect_ratio=function(){return this.width/this.height},e.prototype.get_layoutable_children=function(){var t;return t=[this.plot_canvas],null!=this.toolbar_location&&(t=[this.toolbar,this.plot_canvas]),t},e.prototype.get_editables=function(){var t;return t=e.__super__.get_editables.call(this),\"scale_both\"===this.sizing_mode&&(t=t.concat([this._width,this._height])),t},e.prototype.get_constraints=function(){var t,r,n,i;return t=e.__super__.get_constraints.call(this),null!=this.toolbar_location&&(this.toolbar_sticky?t.push(s.EQ(this._sizeable,[-1,this.plot_canvas._sizeable])):t.push(s.EQ(this._sizeable,[-1,this.plot_canvas._sizeable],[-1,this.toolbar._sizeable])),this._horizontal?t.push(s.EQ(this._height,[-1,this.plot_canvas._height])):t.push(s.EQ(this._width,[-1,this.plot_canvas._width])),\"above\"===this.toolbar_location&&(i=this.toolbar_sticky?this.plot_canvas._top:this.plot_canvas._dom_top,t.push(s.EQ(i,[-1,this.toolbar._dom_top],[-1,this.toolbar._height]))),\"below\"===this.toolbar_location&&(this.toolbar_sticky?(t.push(s.GE(this.plot_canvas.below_panel._height,[-1,this.toolbar._height])),t.push(s.WEAK_EQ(this.toolbar._dom_top,[-1,this.plot_canvas._height],this.plot_canvas.below_panel._height))):t.push(s.EQ(this.toolbar._dom_top,[-1,this.plot_canvas._height],this.toolbar._bottom,[-1,this.toolbar._height]))),\"left\"===this.toolbar_location&&(i=this.toolbar_sticky?this.plot_canvas._left:this.plot_canvas._dom_left,t.push(s.EQ(i,[-1,this.toolbar._dom_left],[-1,this.toolbar._width]))),\"right\"===this.toolbar_location&&(this.toolbar_sticky?(t.push(s.GE(this.plot_canvas.right_panel._width,[-1,this.toolbar._width])),t.push(s.WEAK_EQ(this.toolbar._dom_left,[-1,this.plot_canvas._width],this.plot_canvas.right_panel._width))):t.push(s.EQ(this.toolbar._dom_left,[-1,this.plot_canvas._width],this.toolbar._right,[-1,this.toolbar._width]))),\"above\"!==(r=this.toolbar_location)&&\"below\"!==r||t.push(s.EQ(this._width,[-1,this.toolbar._width],[-1,this.plot_canvas._width_minus_right])),\"left\"!==(n=this.toolbar_location)&&\"right\"!==n||(t.push(s.EQ(this._height,[-1,this.toolbar._height],[-1,this.plot_canvas.above_panel._height])),t.push(s.EQ(this.toolbar._dom_top,[-1,this.plot_canvas.above_panel._height])))),null==this.toolbar_location&&(t.push(s.EQ(this._width,[-1,this.plot_canvas._width])),t.push(s.EQ(this._height,[-1,this.plot_canvas._height]))),t},e.prototype.get_constrained_variables=function(){var t;return t=u.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this.plot_canvas._top,on_edge_align_bottom:this.plot_canvas._height_minus_bottom,on_edge_align_left:this.plot_canvas._left,on_edge_align_right:this.plot_canvas._width_minus_right,box_cell_align_top:this.plot_canvas._top,box_cell_align_bottom:this.plot_canvas._height_minus_bottom,box_cell_align_left:this.plot_canvas._left,box_cell_align_right:this.plot_canvas._width_minus_right,box_equal_size_top:this.plot_canvas._top,box_equal_size_bottom:this.plot_canvas._height_minus_bottom}),\"fixed\"!==this.sizing_mode&&(t.box_equal_size_left=this.plot_canvas._left,t.box_equal_size_right=this.plot_canvas._width_minus_right),t},e.mixins([\"line:outline_\",\"fill:background_\",\"fill:border_\"]),e.define({toolbar:[l.Instance,function(){return new d.Toolbar}],toolbar_location:[l.Location,\"right\"],toolbar_sticky:[l.Bool,!0],plot_width:[l.Number,600],plot_height:[l.Number,600],title:[l.Any,function(){return new h.Title({text:\"\"})}],title_location:[l.Location,\"above\"],h_symmetry:[l.Bool,!0],v_symmetry:[l.Bool,!1],above:[l.Array,[]],below:[l.Array,[]],left:[l.Array,[]],right:[l.Array,[]],renderers:[l.Array,[]],x_range:[l.Instance],extra_x_ranges:[l.Any,{}],y_range:[l.Instance],extra_y_ranges:[l.Any,{}],x_scale:[l.Instance,function(){return new p.LinearScale}],y_scale:[l.Instance,function(){return new p.LinearScale}],lod_factor:[l.Number,10],lod_interval:[l.Number,300],lod_threshold:[l.Number,2e3],lod_timeout:[l.Number,500],hidpi:[l.Bool,!0],output_backend:[l.OutputBackend,\"canvas\"],min_border:[l.Number,5],min_border_top:[l.Number,null],min_border_left:[l.Number,null],min_border_bottom:[l.Number,null],min_border_right:[l.Number,null],inner_width:[l.Number],inner_height:[l.Number],layout_width:[l.Number],layout_height:[l.Number],match_aspect:[l.Bool,!1],aspect_scale:[l.Number,1]}),e.override({outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"}),e.getters({all_renderers:function(){var t,e,r,n,i;for(n=this.renderers,r=this.toolbar.tools,t=0,e=r.length;t<e;t++)i=r[t],n=n.concat(i.synthetic_renderers);return n},x_mapper_type:function(){return log.warning(\"x_mapper_type attr is deprecated, use x_scale\"),this.x_scale},y_mapper_type:function(){return log.warning(\"y_mapper_type attr is deprecated, use y_scale\"),this.y_scale},webgl:function(){return log.warning(\"webgl attr is deprecated, use output_backend\"),\"webgl\"===this.output_backend},tool_events:function(){return log.warning(\"tool_events attr is deprecated, use SelectionGeometry Event\"),null}}),e}(_.LayoutDOM),v.register_with_event(v.UIEvent,r.Plot)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l=function(t,e){function r(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},u={}.hasOwnProperty,c=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},_=[].slice,h=t(77),p=t(78),d=t(153),f=t(158),y=t(136),m=t(19),v=t(4),g=t(20),b=t(3),w=t(10),x=t(45),k=t(6),M=t(12),S=t(13),T=t(7),O=t(14),P=t(40),A=t(41),E=t(21),j=t(29),z=t(11);a=null,r.PlotCanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.className=\"bk-plot-wrapper\",e.prototype.state={history:[],index:-1},e.prototype.view_options=function(){return j.extend({plot_view:this,parent:this},this.options)},e.prototype.pause=function(){return null==this._is_paused?this._is_paused=1:this._is_paused+=1},e.prototype.unpause=function(t){if(null==t&&(t=!1),this._is_paused-=1,0===this._is_paused&&!t)return this.request_render()},e.prototype.request_render=function(){return this.request_paint()},e.prototype.request_paint=function(){this.is_paused||this.throttled_paint()},e.prototype.remove=function(){return v.remove_views(this.renderer_views),v.remove_views(this.tool_views),this.canvas_view.remove(),this.canvas_view=null,e.__super__.remove.call(this)},e.prototype.initialize=function(t){var r,n,i,o;for(this.pause(),e.__super__.initialize.call(this,t),this.force_paint=new m.Signal(this,\"force_paint\"),this.state_changed=new m.Signal(this,\"state_changed\"),this.lod_started=!1,this.visuals=new x.Visuals(this.model.plot),this._initial_state_info={range:null,selection:{},dimensions:{width:this.model.canvas._width.value,height:this.model.canvas._height.value}},this.frame=this.model.frame,this.canvas=this.model.canvas,this.canvas_view=new this.canvas.default_view({model:this.canvas,parent:this}),this.el.appendChild(this.canvas_view.el),this.canvas_view.render(),\"webgl\"===this.model.plot.output_backend&&this.init_webgl(),this.throttled_paint=P.throttle(function(t){return function(){return t.force_paint.emit()}}(this),15),this.ui_event_bus=new g.UIEvents(this,this.model.toolbar,this.canvas_view.el,this.model.plot),this.levels={},o=T.RenderLevel,r=0,n=o.length;r<n;r++)i=o[r],this.levels[i]={};return this.renderer_views={},this.tool_views={},this.build_levels(),this.build_tools(),this.connect_signals(),this.update_dataranges(),this.unpause(!0),S.logger.debug(\"PlotView initialized\"),this},e.prototype.set_cursor=function(t){return null==t&&(t=\"default\"),this.canvas_view.el.style.cursor=t},e.getters({canvas_overlays:function(){return this.canvas_view.overlays_el},is_paused:function(){return null!=this._is_paused&&0!==this._is_paused}}),e.prototype.init_webgl=function(){var t,e,r;return t=this.canvas_view.ctx,e=a,null==e&&(a=e=document.createElement(\"canvas\"),r={premultipliedAlpha:!0},e.gl=e.getContext(\"webgl\",r)||e.getContext(\"experimental-webgl\",r)),null!=e.gl?t.glcanvas=e:S.logger.warn(\"WebGL is not supported, falling back to 2D canvas.\")},e.prototype.prepare_webgl=function(t,e){var r,n,i,o;if(n=this.canvas_view.ctx,r=this.canvas_view.get_canvas_element(),n.glcanvas)return n.glcanvas.width=r.width,n.glcanvas.height=r.height,o=n.glcanvas.gl,o.viewport(0,0,n.glcanvas.width,n.glcanvas.height),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT||o.DEPTH_BUFFER_BIT),o.enable(o.SCISSOR_TEST),i=n.glcanvas.height-t*(e[1]+e[3]),o.scissor(t*e[0],i,t*e[2],t*e[3]),o.enable(o.BLEND),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE_MINUS_DST_ALPHA,o.ONE)},e.prototype.blit_webgl=function(t){var e;if(e=this.canvas_view.ctx,e.glcanvas)return S.logger.debug(\"drawing with WebGL\"),e.restore(),e.drawImage(e.glcanvas,0,0),e.save(),e.scale(t,t),e.translate(.5,.5)},e.prototype.update_dataranges=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,f,y,m,v,g,b,w,x,k,M,T,O,P,A,E,z,C,N,D,F,I,B;for(o=this.model.frame,e={},v={},n=!1,k=j.values(o.x_ranges).concat(j.values(o.y_ranges)),l=0,_=k.length;l<_;l++)x=k[l],x instanceof d.DataRange1d&&\"log\"===x.scale_hint&&(n=!0);M=this.renderer_views;for(u in M)C=M[u],t=null!=(T=C.glyph)&&\"function\"==typeof T.bounds?T.bounds():void 0,null!=t&&(e[u]=t),n&&(m=null!=(O=C.glyph)&&\"function\"==typeof O.log_bounds?O.log_bounds():void 0,null!=m&&(v[u]=m));if(i=!1,s=!1,this.model.plot.match_aspect!==!1&&0!==this.frame._width.value&&0!==this.frame._height.value){x=1/this.model.plot.aspect_scale*(this.frame._width.value/this.frame._height.value);for(u in e)C=e[u],isFinite(C.maxX)&&isFinite(C.minX)&&isFinite(C.maxY)&&isFinite(C.minY)&&(N=C.maxX-C.minX,N<=0&&(N=1),a=C.maxY-C.minY,a<=0&&(a=1),D=.5*(C.maxX+C.minX),I=.5*(C.maxY+C.minY),N<x*a?N=x*a:a=N/x,e[u].maxX=D+.5*N,e[u].minX=D-.5*N,e[u].maxY=I+.5*a,e[u].minY=I-.5*a)}for(P=j.values(o.x_ranges),c=0,h=P.length;c<h;c++)F=P[c],F instanceof d.DataRange1d&&(r=\"log\"===F.scale_hint?v:e,F.update(r,0,this.model.id),F.follow&&(i=!0)),null!=F.bounds&&(s=!0);for(A=j.values(o.y_ranges),g=0,p=A.length;g<p;g++)B=A[g],B instanceof d.DataRange1d&&(r=\"log\"===B.scale_hint?v:e,B.update(r,1,this.model.id),B.follow&&(i=!0)),null!=B.bounds&&(s=!0);if(i&&s){for(S.logger.warn(\"Follow enabled so bounds are unset.\"),E=j.values(o.x_ranges),b=0,f=E.length;b<f;b++)F=E[b],F.bounds=null;for(z=j.values(o.y_ranges),w=0,y=z.length;w<y;w++)B=z[w],B.bounds=null}return this.range_update_timestamp=Date.now()},e.prototype.map_to_screen=function(t,e,r,n){return null==r&&(r=\"default\"),null==n&&(n=\"default\"),this.frame.map_to_screen(t,e,this.canvas,r,n)},e.prototype.push_state=function(t,e){var r,n;return r=(null!=(n=this.state.history[this.state.index])?n.info:void 0)||{},e=j.extend({},this._initial_state_info,r,e),this.state.history.slice(0,this.state.index+1),this.state.history.push({type:t,info:e}),this.state.index=this.state.history.length-1,this.state_changed.emit()},e.prototype.clear_state=function(){return this.state={history:[],index:-1},this.state_changed.emit()},e.prototype.can_undo=function(){return this.state.index>=0},e.prototype.can_redo=function(){return this.state.index<this.state.history.length-1},e.prototype.undo=function(){if(this.can_undo())return this.state.index-=1,this._do_state_change(this.state.index),this.state_changed.emit()},e.prototype.redo=function(){if(this.can_redo())return this.state.index+=1,this._do_state_change(this.state.index),this.state_changed.emit()},e.prototype._do_state_change=function(t){var e,r;if(e=(null!=(r=this.state.history[t])?r.info:void 0)||this._initial_state_info,null!=e.range&&this.update_range(e.range),null!=e.selection)return this.update_selection(e.selection)},e.prototype.get_selection=function(){var t,e,r,n,i,o;for(o=[],r=this.model.plot.renderers,t=0,e=r.length;t<e;t++)n=r[t],n instanceof f.GlyphRenderer&&(i=n.data_source.selected,o[n.id]=i);return o},e.prototype.update_selection=function(t){var e,r,n,i,o,s,a;for(i=this.model.plot.renderers,a=[],r=0,n=i.length;r<n;r++)s=i[r],s instanceof f.GlyphRenderer&&(e=s.data_source,null!=t?(o=s.id,c.call(t,o)>=0?a.push(e.selected=t[s.id]):a.push(void 0)):a.push(e.selection_manager.clear()));return a},e.prototype.reset_selection=function(){return this.update_selection(null)},e.prototype._update_ranges_together=function(t){var e,r,n,i,o,s,a,l,u,c;for(c=1,e=0,n=t.length;e<n;e++)s=t[e],u=s[0],o=s[1],c=Math.min(c,this._get_weight_to_constrain_interval(u,o));if(c<1){for(l=[],r=0,i=t.length;r<i;r++)a=t[r],u=a[0],o=a[1],o.start=c*o.start+(1-c)*u.start,l.push(o.end=c*o.end+(1-c)*u.end);return l}},e.prototype._update_ranges_individually=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m;for(n=!1,i=0,s=t.length;i<s;i++)h=t[i],y=h[0],_=h[1],f=y.start>y.end,r||(m=this._get_weight_to_constrain_interval(y,_),m<1&&(_.start=m*_.start+(1-m)*y.start,_.end=m*_.end+(1-m)*y.end)),null!=y.bounds&&(u=y.bounds[0],l=y.bounds[1],c=Math.abs(_.end-_.start),f?(null!=u&&u>=_.end&&(n=!0,_.end=u,null==e&&null==r||(_.start=u+c)),null!=l&&l<=_.start&&(n=!0,_.start=l,null==e&&null==r||(_.end=l-c))):(null!=u&&u>=_.start&&(n=!0,_.start=u,null==e&&null==r||(_.end=u+c)),null!=l&&l<=_.end&&(n=!0,_.end=l,null==e&&null==r||(_.start=l-c))));if(!r||!n){for(d=[],o=0,a=t.length;o<a;o++)p=t[o],y=p[0],_=p[1],y.have_updated_interactively=!0,y.start!==_.start||y.end!==_.end?d.push(y.setv(_)):d.push(void 0);return d}},e.prototype._get_weight_to_constrain_interval=function(t,e){var r,n,i,o,s,a,l,u,c;return s=t.min_interval,n=t.max_interval,c=1,null!=t.bounds&&(u=t.bounds,o=u[0],r=u[1],null!=o&&null!=r&&(i=Math.abs(r-o),n=null!=n?Math.min(n,i):i)),null==s&&null==n||(l=Math.abs(t.end-t.start),a=Math.abs(e.end-e.start),s>0&&a<s&&(c=(l-s)/(l-a)),n>0&&a>n&&(c=(n-l)/(a-l)),c=Math.max(0,Math.min(1,c))),c},e.prototype.update_range=function(t,e,r){var n,i,o,s,a,l,u;if(this.pause(),null==t){o=this.frame.x_ranges;for(n in o)u=o[n],u.reset();s=this.frame.y_ranges;for(n in s)u=s[n],u.reset();this.update_dataranges()}else{i=[],a=this.frame.x_ranges;for(n in a)u=a[n],i.push([u,t.xrs[n]]);l=this.frame.y_ranges;for(n in l)u=l[n],i.push([u,t.yrs[n]]);r&&this._update_ranges_together(i),this._update_ranges_individually(i,e,r)}return this.unpause()},e.prototype.reset_range=function(){return this.update_range(null)},e.prototype.build_levels=function(){var t,e,r,n,i,o,s,a,l,u,c;for(l=this.model.plot.all_renderers,a=Object.keys(this.renderer_views),s=v.build_views(this.renderer_views,l,this.view_options()),u=E.difference(a,function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)o=l[t],r.push(o.id);return r}()),e=0,n=u.length;e<n;e++)t=u[e],delete this.levels.glyph[t];for(r=0,i=s.length;r<i;r++)c=s[r],this.levels[c.model.level][c.model.id]=c,c.connect_signals();return this},e.prototype.get_renderer_views=function(){var t,e,r,n,i;for(n=this.model.plot.renderers,i=[],t=0,e=n.length;t<e;t++)r=n[t],i.push(this.levels[r.level][r.id]);return i},e.prototype.build_tools=function(){var t,e,r,n,i,o;for(i=this.model.plot.toolbar.tools,r=v.build_views(this.tool_views,i,this.view_options()),n=[],t=0,e=r.length;t<e;t++)o=r[t],o.connect_signals(),n.push(this.ui_event_bus.register_tool(o));return n},e.prototype.connect_signals=function(){var t,r,n,i;e.__super__.connect_signals.call(this),this.connect(this.force_paint,function(t){return function(){return t.paint()}}(this)),r=this.model.frame.x_ranges;for(t in r)i=r[t],this.connect(i.change,function(){return this.request_render()});n=this.model.frame.y_ranges;for(t in n)i=n[t],this.connect(i.change,function(){return this.request_render()});return this.connect(this.model.plot.properties.renderers.change,function(t){return function(){return t.build_levels()}}(this)),this.connect(this.model.plot.toolbar.properties.tools.change,function(t){return function(){return t.build_levels(),t.build_tools()}}(this)),this.connect(this.model.plot.change,function(){return this.request_render()})},e.prototype.set_initial_range=function(){var t,e,r,n,i,o,s;t=!0,o={},r=this.frame.x_ranges;for(e in r){if(i=r[e],null==i.start||null==i.end||A.isStrictNaN(i.start+i.end)){t=!1;break}o[e]={start:i.start,end:i.end}}if(t){s={},n=this.frame.y_ranges;for(e in n){if(i=n[e],null==i.start||null==i.end||A.isStrictNaN(i.start+i.end)){t=!1;break}s[e]={start:i.start,end:i.end}}}return t?(this._initial_state_info.range=this.initial_range_info={xrs:o,yrs:s},S.logger.debug(\"initial ranges set\")):S.logger.warn(\"could not set initial ranges\")},e.prototype.update_constraints=function(){var t,e,r;this.solver.suggest_value(this.frame._width,this.canvas._width.value),this.solver.suggest_value(this.frame._height,this.canvas._height.value),e=this.renderer_views;for(t in e)r=e[t],null!=r.model.panel&&z.update_panel_constraints(r);return this.solver.update_variables()},e.prototype._layout=function(t){if(null==t&&(t=!1),this.render(),t)return this.model.plot.setv({inner_width:Math.round(this.frame._width.value),inner_height:Math.round(this.frame._height.value),layout_width:Math.round(this.canvas._width.value),layout_height:Math.round(this.canvas._height.value)},{no_change:!0}),this.request_paint()},e.prototype.has_finished=function(){var t,r,n,i;if(!e.__super__.has_finished.call(this))return!1;r=this.levels;for(t in r){n=r[t];for(t in n)if(i=n[t],!i.has_finished())return!1}return!0},e.prototype.render=function(){var t,e;return e=this.model._width.value,t=this.model._height.value,this.canvas_view.set_dims([e,t]),this.update_constraints(),this.model.plot.match_aspect!==!1&&0!==this.frame._width.value&&0!==this.frame._height.value&&this.update_dataranges(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.paint=function(){var t,e,r,n,i,o,s,a,l,u,c;if(!this.is_paused){S.logger.trace(\"PlotCanvas.render() for \"+this.model.id),this.canvas_view.prepare_canvas(),Date.now()-this.interactive_timestamp<this.model.plot.lod_interval?(this.lod_started||(this.model.plot.trigger_event(new b.LODStart({})),this.lod_started=!0),this.interactive=!0,i=this.model.plot.lod_timeout,setTimeout(function(t){return function(){return t.interactive&&Date.now()-t.interactive_timestamp>i&&(t.interactive=!1),t.request_render()}}(this),i)):(this.interactive=!1,this.lod_started&&(this.model.plot.trigger_event(new b.LODEnd({})),this.lod_started=!1)),s=this.renderer_views;for(n in s)if(a=s[n],null==this.range_update_timestamp||a.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}return this.model.frame._update_scales(),t=this.canvas_view.ctx,t.pixel_ratio=o=this.canvas.pixel_ratio,t.save(),t.scale(o,o),t.translate(.5,.5),e=[this.canvas.vx_to_sx(this.frame._left.value),this.canvas.vy_to_sy(this.frame._top.value),this.frame._width.value,this.frame._height.value],this._map_hook(t,e),this._paint_empty(t,e),this.prepare_webgl(o,e),t.save(),this.visuals.outline_line.doit&&(this.visuals.outline_line.set_value(t),u=e[0],c=e[1],l=e[2],r=e[3],u+l===this.canvas._width.value&&(l-=1),c+r===this.canvas._height.value&&(r-=1),t.strokeRect(u,c,l,r)),t.restore(),this._paint_levels(t,[\"image\",\"underlay\",\"glyph\"],e),this.blit_webgl(o),this._paint_levels(t,[\"annotation\"],e),this._paint_levels(t,[\"overlay\"]),null==this.initial_range_info&&this.set_initial_range(),t.restore(),this._has_finished?void 0:(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y;for(t.save(),null!=r&&\"canvas\"===this.model.plot.output_backend&&(t.beginPath(),t.rect.apply(t,r),t.clip()),i={},h=this.model.plot.renderers,n=o=0,a=h.length;o<a;n=++o)p=h[n],i[p.id]=n;for(y=function(t){return i[t.model.id]},s=0,l=e.length;s<l;s++)for(c=e[s],f=E.sortBy(j.values(this.levels[c]),y),\n",
" _=0,u=f.length;_<u;_++)d=f[_],d.render();return t.restore()},e.prototype._map_hook=function(t,e){},e.prototype._paint_empty=function(t,e){if(t.clearRect(0,0,this.canvas_view.model._width.value,this.canvas_view.model._height.value),this.visuals.border_fill.doit&&(this.visuals.border_fill.set_value(t),t.fillRect(0,0,this.canvas_view.model._width.value,this.canvas_view.model._height.value),t.clearRect.apply(t,e)),this.visuals.background_fill.doit)return this.visuals.background_fill.set_value(t),t.fillRect.apply(t,e)},e.prototype.save=function(t){var e,r,n,i,o,s,a;return\"canvas\"===(o=this.model.plot.output_backend)||\"webgl\"===o?(r=this.canvas_view.get_canvas_element(),null!=r.msToBlob?(e=r.msToBlob(),window.navigator.msSaveBlob(e,t)):(i=document.createElement(\"a\"),i.href=r.toDataURL(\"image/png\"),i.download=t+\".png\",i.target=\"_blank\",i.dispatchEvent(new MouseEvent(\"click\")))):\"svg\"===this.model.plot.output_backend?(s=this.canvas_view.ctx.getSerializedSvg(!0),a=new Blob([s],{type:\"text/plain\"}),n=document.createElement(\"a\"),n.download=t+\".svg\",n.innerHTML=\"Download svg\",n.href=window.URL.createObjectURL(a),n.onclick=function(t){return document.body.removeChild(t.target)},n.style.display=\"none\",document.body.appendChild(n),n.click()):void 0},e}(k.DOMView),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"AbovePanel\",e}(w.LayoutCanvas),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"BelowPanel\",e}(w.LayoutCanvas),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"LeftPanel\",e}(w.LayoutCanvas),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"RightPanel\",e}(w.LayoutCanvas),r.PlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"PlotCanvas\",e.prototype.default_view=r.PlotCanvasView,e.prototype.initialize=function(t,r){var a;return e.__super__.initialize.call(this,t,r),this.canvas=new h.Canvas({map:null!=(a=this.use_map)&&a,initial_width:this.plot.plot_width,initial_height:this.plot.plot_height,use_hidpi:this.plot.hidpi,output_backend:this.plot.output_backend}),this.frame=new p.CartesianFrame({x_range:this.plot.x_range,extra_x_ranges:this.plot.extra_x_ranges,x_scale:this.plot.x_scale,y_range:this.plot.y_range,extra_y_ranges:this.plot.extra_y_ranges,y_scale:this.plot.y_scale}),this.above_panel=new n,this.below_panel=new i,this.left_panel=new o,this.right_panel=new s,S.logger.debug(\"PlotCanvas initialized\")},e.prototype._doc_attached=function(){return this.canvas.attach_document(this.document),this.frame.attach_document(this.document),this.above_panel.attach_document(this.document),this.below_panel.attach_document(this.document),this.left_panel.attach_document(this.document),this.right_panel.attach_document(this.document),e.__super__._doc_attached.call(this),S.logger.debug(\"PlotCanvas attached to document\")},e.override({sizing_mode:\"stretch_both\"}),e.internal({plot:[O.Instance],toolbar:[O.Instance],canvas:[O.Instance],frame:[O.Instance]}),e.prototype.get_layoutable_children=function(){var t,e;return t=[this.above_panel,this.below_panel,this.left_panel,this.right_panel,this.canvas,this.frame],e=function(e){var r,n,i,o;for(o=[],r=0,n=e.length;r<n;r++)i=e[r],null!=i.panel?o.push(t.push(i.panel)):o.push(void 0);return o},e(this.plot.above),e(this.plot.below),e(this.plot.left),e(this.plot.right),t},e.prototype.get_constraints=function(){return e.__super__.get_constraints.call(this).concat(this._get_constant_constraints(),this._get_side_constraints())},e.prototype._get_constant_constraints=function(){return[M.GE(this.above_panel._height,-this.plot.min_border_top),M.GE(this.below_panel._height,-this.plot.min_border_bottom),M.GE(this.left_panel._width,-this.plot.min_border_left),M.GE(this.right_panel._width,-this.plot.min_border_right),M.EQ(this.above_panel._top,[-1,this.canvas._top]),M.EQ(this.above_panel._bottom,[-1,this.frame._top]),M.EQ(this.above_panel._left,[-1,this.left_panel._right]),M.EQ(this.above_panel._right,[-1,this.right_panel._left]),M.EQ(this.below_panel._top,[-1,this.frame._bottom]),M.EQ(this.below_panel._bottom,[-1,this.canvas._bottom]),M.EQ(this.below_panel._left,[-1,this.left_panel._right]),M.EQ(this.below_panel._right,[-1,this.right_panel._left]),M.EQ(this.left_panel._top,[-1,this.above_panel._bottom]),M.EQ(this.left_panel._bottom,[-1,this.below_panel._top]),M.EQ(this.left_panel._left,[-1,this.canvas._left]),M.EQ(this.left_panel._right,[-1,this.frame._left]),M.EQ(this.right_panel._top,[-1,this.above_panel._bottom]),M.EQ(this.right_panel._bottom,[-1,this.below_panel._top]),M.EQ(this.right_panel._left,[-1,this.frame._right]),M.EQ(this.right_panel._right,[-1,this.canvas._right]),M.EQ(this._top,[-1,this.above_panel._height]),M.EQ(this._left,[-1,this.left_panel._width]),M.EQ(this._height,[-1,this._bottom],[-1,this.below_panel._height]),M.EQ(this._width,[-1,this._right],[-1,this.right_panel._width])]},e.prototype._get_side_constraints=function(){var t,e,r,n,i,o,s,a,l,u,c,h,p,d,f,y,m;if(n=[],e=function(){var t;return t=1<=arguments.length?_.call(arguments,0):[],n.push.apply(n,t)},t=this.plot.above,r=this.plot.below,a=this.plot.left,y=this.plot.right,i=function(t){return t[0]},m=function(t){return t[t.length-1]},t.length>0)for(e(M.EQ(i(t).panel._bottom,[-1,this.above_panel._bottom])),e(M.LE(m(t).panel._top,[-1,this.above_panel._top])),e.apply(null,E.pairwise(t,function(t,e){return M.EQ(t.panel._top,[-1,e.panel._bottom])})),o=0,l=t.length;o<l;o++)f=t[o],e(M.EQ(f.panel._left,[-1,this.above_panel._left])),e(M.EQ(f.panel._right,[-1,this.above_panel._right]));if(r.length>0)for(e(M.EQ(i(r).panel._top,[-1,this.below_panel._top])),e(M.GE(m(r).panel._bottom,[-1,this.below_panel._bottom])),e.apply(null,E.pairwise(r,function(t,e){return M.EQ(t.panel._bottom,[-1,e.panel._top])})),s=0,u=r.length;s<u;s++)f=r[s],e(M.EQ(f.panel._left,[-1,this.below_panel._left])),e(M.EQ(f.panel._right,[-1,this.below_panel._right]));if(a.length>0)for(e(M.EQ(i(a).panel._right,[-1,this.left_panel._right])),e(M.GE(m(a).panel._left,[-1,this.left_panel._left])),e.apply(null,E.pairwise(a,function(t,e){return M.EQ(t.panel._left,[-1,e.panel._right])})),p=0,c=a.length;p<c;p++)f=a[p],e(M.EQ(f.panel._top,[-1,this.left_panel._top])),e(M.EQ(f.panel._bottom,[-1,this.left_panel._bottom]));if(y.length>0)for(e(M.EQ(i(y).panel._left,[-1,this.right_panel._left])),e(M.LE(m(y).panel._right,[-1,this.right_panel._right])),e.apply(null,E.pairwise(y,function(t,e){return M.EQ(t.panel._right,[-1,e.panel._left])})),d=0,h=y.length;d<h;d++)f=y[d],e(M.EQ(f.panel._top,[-1,this.right_panel._top])),e(M.EQ(f.panel._bottom,[-1,this.right_panel._bottom]));return n},e}(y.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(156),s=t(14);r.DataRange=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"DataRange\",e.define({names:[s.Array,[]],renderers:[s.Array,[]]}),e}(o.Range)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(152),s=t(158),a=t(13),l=t(14),u=t(22);r.DataRange1d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"DataRange1d\",e.define({start:[l.Number],end:[l.Number],range_padding:[l.Number,.1],range_padding_units:[l.PaddingUnits,\"percent\"],flipped:[l.Bool,!1],follow:[l.StartEnd],follow_interval:[l.Number],default_span:[l.Number,2],bounds:[l.Any],min_interval:[l.Any],max_interval:[l.Any]}),e.internal({scale_hint:[l.String,\"auto\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.plot_bounds={},this.have_updated_interactively=!1,this._initial_start=this.start,this._initial_end=this.end,this._initial_range_padding=this.range_padding,this._initial_range_padding_units=this.range_padding_units,this._initial_follow=this.follow,this._initial_follow_interval=this.follow_interval,this._initial_default_span=this.default_span},e.getters({min:function(){return Math.min(this.start,this.end)},max:function(){return Math.max(this.start,this.end)}}),e.prototype.computed_renderers=function(){var t,e,r,n,i,o,l,u,c,_,h;if(o=this.names,_=this.renderers,0===_.length)for(c=this.plots,e=0,n=c.length;e<n;e++)l=c[e],t=l.renderers,h=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)u=t[e],u instanceof s.GlyphRenderer&&n.push(u);return n}(),_=_.concat(h);for(o.length>0&&(_=function(){var t,e,r;for(r=[],t=0,e=_.length;t<e;t++)u=_[t],o.indexOf(u.name)>=0&&r.push(u);return r}()),a.logger.debug(\"computed \"+_.length+\" renderers for DataRange1d \"+this.id),r=0,i=_.length;r<i;r++)u=_[r],a.logger.trace(\" - \"+u.type+\" \"+u.id);return _},e.prototype._compute_plot_bounds=function(t,e){var r,n,i,o;for(o=u.empty(),r=0,n=t.length;r<n;r++)i=t[r],null!=e[i.id]&&(o=u.union(o,e[i.id]));return o},e.prototype._compute_min_max=function(t,e){var r,n,i,o,s,a,l;o=u.empty();for(r in t)l=t[r],o=u.union(o,l);return 0===e?(s=[o.minX,o.maxX],i=s[0],n=s[1]):(a=[o.minY,o.maxY],i=a[0],n=a[1]),[i,n]},e.prototype._compute_range=function(t,e){var r,n,i,o,s,l,u,c,_,h,p,d,f;return u=null!=(c=this.range_padding)?c:0,\"log\"===this.scale_hint?((isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(e)||!isFinite(e)||e<=0?.1:e/100,a.logger.warn(\"could not determine minimum data value for log axis, DataRange1d using value \"+t)),(isNaN(e)||!isFinite(e)||e<=0)&&(e=isNaN(t)||!isFinite(t)||t<=0?10:100*t,a.logger.warn(\"could not determine maximum data value for log axis, DataRange1d using value \"+e)),e===t?(d=this.default_span+.001,r=Math.log(t)/Math.log(10)):(\"percent\"===this.range_padding_units?(l=Math.log(t)/Math.log(10),s=Math.log(e)/Math.log(10),d=(s-l)*(1+u)):(l=Math.log(t-u)/Math.log(10),s=Math.log(e+u)/Math.log(10),d=s-l),r=(l+s)/2),_=[Math.pow(10,r-d/2),Math.pow(10,r+d/2)],f=_[0],n=_[1]):(d=e===t?this.default_span:\"percent\"===this.range_padding_units?(e-t)*(1+u):e-t+2*u,r=(e+t)/2,h=[r-d/2,r+d/2],f=h[0],n=h[1]),o=1,this.flipped&&(p=[n,f],f=p[0],n=p[1],o=-1),i=this.follow_interval,null!=i&&Math.abs(f-n)>i&&(\"start\"===this.follow?n=f+o*i:\"end\"===this.follow&&(f=n-o*i)),[f,n]},e.prototype.update=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p;if(!this.have_updated_interactively)return h=this.computed_renderers(),this.plot_bounds[r]=this._compute_plot_bounds(h,t),u=this._compute_min_max(this.plot_bounds,e),a=u[0],s=u[1],c=this._compute_range(a,s),p=c[0],o=c[1],null!=this._initial_start&&(\"log\"===this.scale_hint?this._initial_start>0&&(p=this._initial_start):p=this._initial_start),null!=this._initial_end&&(\"log\"===this.scale_hint?this._initial_end>0&&(o=this._initial_end):o=this._initial_end),_=[this.start,this.end],i=_[0],n=_[1],p===i&&o===n||(l={},p!==i&&(l.start=p),o!==n&&(l.end=o),this.setv(l)),\"auto\"===this.bounds&&this.setv({bounds:[p,o]},{silent:!0}),this.change.emit()},e.prototype.reset=function(){return this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()},e}(o.DataRange)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(156),s=t(14),a=t(21),l=t(41);r.map_one_level=function(t,e,r){var n,i,o,s,a;for(null==r&&(r=0),a={},i=o=0,s=t.length;o<s;i=++o){if(n=t[i],n in a)throw new Error(\"duplicate factor or subfactor \"+n);a[n]={value:.5+i*(1+e)+r}}return[a,(t.length-1)*e]},r.map_two_levels=function(t,e,n,i){var o,s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x;for(null==i&&(i=0),h={},b={},w=[],l=0,c=t.length;l<c;l++)d=t[l],o=d[0],s=d[1],o in b||(b[o]=[],w.push(o)),b[o].push(s);for(m=i,x=0,u=0,_=w.length;u<_;u++)o=w[u],p=b[o].length,f=r.map_one_level(b[o],n,m),y=f[0],v=f[1],x+=v,g=a.sum(function(){var t,e,r,n;for(r=b[o],n=[],t=0,e=r.length;t<e;t++)s=r[t],n.push(y[s].value);return n}()),h[o]={value:g/p,mapping:y},m+=p+e+v;return[h,w,(w.length-1)*e+x]},r.map_three_levels=function(t,e,n,i,o){var s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;for(null==o&&(o=0),y={},T={},O=[],c=0,p=t.length;c<p;c++)g=t[c],s=g[0],l=g[1],u=g[2],s in T||(T[s]=[],O.push(s)),T[s].push([l,u]);for(m=[],k=o,P=0,_=0,d=O.length;_<d;_++){for(s=O[_],v=T[s].length,b=r.map_two_levels(T[s],n,i,k),w=b[0],x=b[1],M=b[2],h=0,f=x.length;h<f;h++)l=x[h],m.push([s,l]);P+=M,S=a.sum(function(){var t,e,r,n,i;for(r=T[s],i=[],e=0,t=r.length;e<t;e++)n=r[e],l=n[0],u=n[1],i.push(w[l].value);return i}()),y[s]={value:S/v,mapping:w},k+=v+e+M}return[y,O,m,(O.length-1)*e+P]},r.FactorRange=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"FactorRange\",e.define({factors:[s.Array,[]],factor_padding:[s.Number,0],subgroup_padding:[s.Number,.8],group_padding:[s.Number,1.4],range_padding:[s.Number,0],range_padding_units:[s.PaddingUnits,\"percent\"],start:[s.Number],end:[s.Number],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.getters({min:function(){return this.start},max:function(){return this.end}}),e.internal({levels:[s.Number],mids:[s.Array],tops:[s.Array],tops_groups:[s.Array]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._init(),this.connect(this.properties.factors.change,function(){return this._init()}),this.connect(this.properties.factor_padding.change,function(){return this._init()}),this.connect(this.properties.group_padding.change,function(){return this._init()}),this.connect(this.properties.subgroup_padding.change,function(){return this._init()}),this.connect(this.properties.range_padding.change,function(){return this._init()}),this.connect(this.properties.range_padding_units.change,function(){return this._init()})},e.prototype.reset=function(){return this._init(),this.change.emit()},e.prototype.synthetic=function(t){var e;return l.isNumber(t)?t:l.isString(t)?this._lookup([t]):(e=0,l.isNumber(t[t.length-1])&&(e=t[t.length-1],t=t.slice(0,-1)),this._lookup(t)+e)},e.prototype.v_synthetic=function(t){var e,r;return e=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(this.synthetic(r));return i}.call(this)},e.prototype._init=function(){var t,e,n,i,o,s,u,c;if(a.all(this.factors,l.isString))i=1,o=r.map_one_level(this.factors,this.factor_padding),this._mapping=o[0],n=o[1];else if(a.all(this.factors,function(t){return l.isArray(t)&&2===t.length&&l.isString(t[0])&&l.isString(t[1])}))i=2,s=r.map_two_levels(this.factors,this.group_padding,this.factor_padding),this._mapping=s[0],this.tops=s[1],n=s[2];else{if(!a.all(this.factors,function(t){return l.isArray(t)&&3===t.length&&l.isString(t[0])&&l.isString(t[1])&&l.isString(t[2])}))throw new Error(\"\");i=3,u=r.map_three_levels(this.factors,this.group_padding,this.subgroup_padding,this.factor_padding),this._mapping=u[0],this.tops=u[1],this.mids=u[2],n=u[3]}if(c=0,t=this.factors.length+n,\"percent\"===this.range_padding_units?(e=(t-c)*this.range_padding/2,c-=e,t+=e):(c-=this.range_padding,t+=this.range_padding),this.setv({start:c,end:t,levels:i},{silent:!0}),\"auto\"===this.bounds)return this.setv({bounds:[c,t]},{silent:!0})},e.prototype._lookup=function(t){return 1===t.length?this._mapping[t[0]].value:2===t.length?this._mapping[t[0]].mapping[t[1]].value:3===t.length?this._mapping[t[0]].mapping[t[1]].mapping[t[2]].value:void 0},e}(o.Range)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(152);r.DataRange=n.DataRange;var i=t(153);r.DataRange1d=i.DataRange1d;var o=t(154);r.FactorRange=o.FactorRange;var s=t(156);r.Range=s.Range;var a=t(157);r.Range1d=a.Range1d},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(14);r.Range=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Range\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.change,function(){var t;return null!=(t=this.callback)?t.execute(this):void 0})},e.define({callback:[s.Instance]}),e.internal({plots:[s.Array,[]]}),e.prototype.reset=function(){return this.change.emit()},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(156),s=t(14);r.Range1d=function(t){function e(){var t,r;return this instanceof e?e.__super__.constructor.apply(this,arguments):(r=arguments[0],t=arguments[1],new e({start:r,end:t}))}return n(e,t),e.prototype.type=\"Range1d\",e.define({start:[s.Number,0],end:[s.Number,1],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.prototype._set_auto_bounds=function(){var t,e;if(\"auto\"===this.bounds)return e=Math.min(this._initial_start,this._initial_end),t=Math.max(this._initial_start,this._initial_end),this.setv({bounds:[e,t]},{silent:!0})},e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._initial_start=this.start,this._initial_end=this.end,this._set_auto_bounds()},e.getters({min:function(){return Math.min(this.start,this.end)},max:function(){return Math.max(this.start,this.end)}}),e.prototype.reset=function(){return this._set_auto_bounds(),this.start!==this._initial_start||this.end!==this._initial_end?this.setv({start:this._initial_start,end:this._initial_end}):this.change.emit()},e}(o.Range)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(162),a=t(112),l=t(175),u=t(169),c=t(13),_=t(14),h=t(21),p=t(29);r.GlyphRendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r,n,i,s,a,u,c,_,h,d;if(e.__super__.initialize.call(this,t),r=this.model.glyph,s=o.call(r.mixins,\"fill\")>=0,a=o.call(r.mixins,\"line\")>=0,i=p.clone(r.attributes),delete i.id,c=function(t){var e;return e=p.clone(i),s&&p.extend(e,t.fill),a&&p.extend(e,t.line),new r.constructor(e)},this.glyph=this.build_glyph_view(r),d=this.model.selection_glyph,null==d?d=c({fill:{},line:{}}):\"auto\"===d&&(d=c(this.model.selection_defaults)),this.selection_glyph=this.build_glyph_view(d),h=this.model.nonselection_glyph,null==h?h=c({fill:{},line:{}}):\"auto\"===h&&(h=c(this.model.nonselection_defaults)),this.nonselection_glyph=this.build_glyph_view(h),u=this.model.hover_glyph,null!=u&&(this.hover_glyph=this.build_glyph_view(u)),_=this.model.muted_glyph,null!=_&&(this.muted_glyph=this.build_glyph_view(_)),n=c(this.model.decimated_defaults),this.decimated_glyph=this.build_glyph_view(n),this.xscale=this.plot_view.frame.xscales[this.model.x_range_name],this.yscale=this.plot_view.frame.yscales[this.model.y_range_name],this.set_data(!1),this.model.data_source instanceof l.RemoteDataSource)return this.model.data_source.setup()},e.getters({xmapper:function(){return log.warning(\"xmapper attr is deprecated, use xscale\"),this.xscale},ymapper:function(){return log.warning(\"ymapper attr is deprecated, use yscale\"),this.yscale}}),e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this,plot_view:this.plot_view,parent:this})},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()}),this.connect(this.model.glyph.change,function(){return this.set_data()}),this.connect(this.model.data_source.change,function(){return this.set_data()}),this.connect(this.model.data_source.streaming,function(){return this.set_data()}),this.connect(this.model.data_source.patching,function(t){return this.set_data(!0,t)}),this.connect(this.model.data_source.select,function(){return this.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return this.request_render()}),this.connect(this.model.properties.view.change,function(){return this.set_data()}),this.connect(this.model.view.change,function(){return this.set_data()}),this.connect(this.model.glyph.transformchange,function(){return this.set_data()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){var r,n,i,o,s,a,l;for(null==t&&(t=!0),l=Date.now(),a=this.model.data_source,this.all_indices=this.model.view.indices,this.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.glyph.set_data(a,this.all_indices,e),this.glyph.set_visuals(a),this.decimated_glyph.set_visuals(a),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(a),this.nonselection_glyph.set_visuals(a)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(a),null!=this.muted_glyph&&this.muted_glyph.set_visuals(a),o=this.plot_model.plot.lod_factor,this.decimated=[],n=i=0,s=Math.floor(this.all_indices.length/o);0<=s?i<s:i>s;n=0<=s?++i:--i)this.decimated.push(n*o);if(r=Date.now()-l,c.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): set_data finished in \"+r+\"ms\"),this.set_data_timestamp=Date.now(),t)return this.request_render()},e.prototype.render=function(){var t,e,r,n,i,s,l,u,_,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C;if(this.model.visible){if(A=Date.now(),l=this.glyph.glglyph,E=Date.now(),this.glyph.map_data(),e=Date.now()-A,j=Date.now(),p=this.glyph.mask_data(this.all_indices),p.length===this.all_indices.length&&(p=function(){S=[];for(var t=0,e=this.all_indices.length;0<=e?t<e:t>e;0<=e?t++:t--)S.push(t);return S}.apply(this)),r=Date.now()-j,t=this.plot_view.canvas_view.ctx,t.save(),T=this.model.data_source.selected,T=T&&0!==T.length?T[\"0d\"].glyph?this.model.view.convert_indices_from_subset(p):T[\"1d\"].indices.length>0?T[\"1d\"].indices:function(){var t,e,r,n;for(r=Object.keys(T[\"2d\"].indices),n=[],t=0,e=r.length;t<e;t++)_=r[t],n.push(parseInt(_));return n}():[],d=this.model.data_source.inspected,d=d&&0!==d.length?d[\"0d\"].glyph?this.model.view.convert_indices_from_subset(p):d[\"1d\"].indices.length>0?d[\"1d\"].indices:function(){var t,e,r,n;for(r=Object.keys(d[\"2d\"].indices),n=[],t=0,e=r.length;t<e;t++)_=r[t],n.push(parseInt(_));return n}():[],d=function(){var t,e,r,n;for(n=[],t=0,e=p.length;t<e;t++)_=p[t],r=this.all_indices[_],o.call(d,r)>=0&&n.push(_);return n}.call(this),b=this.plot_model.plot.lod_threshold,this.plot_view.interactive&&!l&&null!=b&&this.all_indices.length>b?(p=this.decimated,u=this.decimated_glyph,k=this.decimated_glyph,P=this.selection_glyph):(u=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,k=this.nonselection_glyph,P=this.selection_glyph),null!=this.hover_glyph&&d.length&&(p=h.difference(p,d)),T.length&&this.have_selection_glyphs()){for(C=Date.now(),O={},f=0,m=T.length;f<m;f++)_=T[f],O[_]=!0;if(T=new Array,x=new Array,this.glyph instanceof a.LineView)for(M=this.all_indices,y=0,v=M.length;y<v;y++)_=M[y],null!=O[_]?T.push(_):x.push(_);else for(w=0,g=p.length;w<g;w++)_=p[w],null!=O[this.all_indices[_]]?T.push(_):x.push(_);i=Date.now()-C,z=Date.now(),k.render(t,x,this.glyph),P.render(t,T,this.glyph),null!=this.hover_glyph&&(this.glyph instanceof a.LineView?this.hover_glyph.render(t,this.model.view.convert_indices_from_subset(d),this.glyph):this.hover_glyph.render(t,d,this.glyph)),n=Date.now()-z}else z=Date.now(),this.glyph instanceof a.LineView?this.hover_glyph&&d.length?this.hover_glyph.render(t,this.model.view.convert_indices_from_subset(d),this.glyph):u.render(t,this.all_indices,this.glyph):(u.render(t,p,this.glyph),this.hover_glyph&&d.length&&this.hover_glyph.render(t,d,this.glyph)),n=Date.now()-z;return this.last_dtrender=n,s=Date.now()-A,c.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): render finished in \"+s+\"ms\"),c.logger.trace(\" - map_data finished in : \"+e+\"ms\"),null!=r&&c.logger.trace(\" - mask_data finished in : \"+r+\"ms\"),null!=i&&c.logger.trace(\" - selection mask finished in : \"+i+\"ms\"),c.logger.trace(\" - glyph renders finished in : \"+n+\"ms\"),t.restore()}},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e.prototype.draw_legend=function(t,e,r,n,i,o,s){var a;return a=this.model.get_reference_point(o,s),this.glyph.draw_legend_for_index(t,e,r,n,i,a)},e.prototype.hit_test=function(t,e,r,n){return null==n&&(n=\"select\"),this.model.hit_test_helper(t,this,e,r,n)},e}(s.RendererView),r.GlyphRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.GlyphRendererView,e.prototype.type=\"GlyphRenderer\",e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),null==this.view.source)return this.view.source=this.data_source,this.view.compute_indices()},e.prototype.get_reference_point=function(t,e){var r,n,i;return i=0,null!=t&&null!=this.data_source.get_column&&(r=this.data_source.get_column(t),r&&(n=r.indexOf(e),n>0&&(i=n))),i},e.prototype.hit_test_helper=function(t,e,r,n,i){var o,s,a,l;return!!this.visible&&(o=e.glyph.hit_test(t),null!==o&&(s=this.view.convert_selection_from_subset(o),\"select\"===i?(l=this.data_source.selection_manager.selector,l.update(s,r,n),this.data_source.selected=l.indices,this.data_source.select.emit()):(a=this.data_source.selection_manager.get_or_create_inspector(this),a.update(s,!0,!1,!0),this.data_source.setv({inspected:a.indices},{silent:!0}),this.data_source.inspect.emit([e,{geometry:t}])),!s.is_empty()))},e.prototype.get_selection_manager=function(){return this.data_source.selection_manager},e.define({x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"],data_source:[_.Instance],view:[_.Instance,function(){return new u.CDSView}],glyph:[_.Instance],hover_glyph:[_.Instance],nonselection_glyph:[_.Any,\"auto\"],selection_glyph:[_.Any,\"auto\"],muted_glyph:[_.Instance],muted:[_.Bool,!1]}),e.override({level:\"glyph\"}),e.prototype.selection_defaults={fill:{},line:{}},e.prototype.decimated_defaults={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},e.prototype.nonselection_defaults={fill:{fill_alpha:.2,line_alpha:.2},line:{}},e}(s.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(162),s=t(126),a=t(14),l=t(4);r.GraphRendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.xscale=this.plot_view.frame.xscales[\"default\"],this.yscale=this.plot_view.frame.yscales[\"default\"],this._renderer_views={},r=l.build_views(this._renderer_views,[this.model.node_renderer,this.model.edge_renderer],this.plot_view.view_options()),this.node_view=r[0],this.edge_view=r[1],this.set_data()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.layout_provider.change,function(){return this.set_data()}),this.connect(this.model.node_renderer.data_source.select,function(){return this.set_data()}),this.connect(this.model.node_renderer.data_source.inspect,function(){return this.set_data()}),this.connect(this.model.edge_renderer.data_source.select,function(){return this.set_data()}),this.connect(this.model.edge_renderer.data_source.inspect,function(){return this.set_data()})},e.prototype.set_data=function(t){var e,r;if(null==t&&(t=!0),this.node_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.edge_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),e=this.model.layout_provider.get_node_coordinates(this.model.node_renderer.data_source),this.node_view.glyph._x=e[0],this.node_view.glyph._y=e[1],r=this.model.layout_provider.get_edge_coordinates(this.model.edge_renderer.data_source),this.edge_view.glyph._xs=r[0],this.edge_view.glyph._ys=r[1],this.node_view.glyph.index=this.node_view.glyph._index_data(),this.edge_view.glyph.index=this.edge_view.glyph._index_data(),t)return this.request_render()},e.prototype.render=function(){return this.edge_view.render(),this.node_view.render()},e.prototype.hit_test=function(t,e,r,n){var i,o,s;return null==n&&(n=\"select\"),!!this.model.visible&&(i=!1,i=\"select\"===n?null!=(o=this.model.selection_policy)?o.do_selection(t,this,e,r):void 0:null!=(s=this.model.inspection_policy)?s.do_inspection(t,this,e,r):void 0)},e}(o.RendererView),r.GraphRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.GraphRendererView,e.prototype.type=\"GraphRenderer\",e.prototype.get_selection_manager=function(){return this.node_renderer.data_source.selection_manager},e.define({x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],layout_provider:[a.Instance],node_renderer:[a.Instance],edge_renderer:[a.Instance],selection_policy:[a.Instance,function(){return new s.NodesOnly}],inspection_policy:[a.Instance,function(){return new s.NodesOnly}]}),e.override({level:\"glyph\"}),e}(o.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(162),s=t(14);r.GuideRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GuideRenderer\",e.define({plot:[s.Instance]}),e.override({level:\"overlay\"}),e}(o.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(158);r.GlyphRenderer=n.GlyphRenderer;var i=t(159);r.GraphRenderer=i.GraphRenderer;var o=t(160);r.GuideRenderer=o.GuideRenderer;var s=t(162);r.Renderer=s.Renderer},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(6),s=t(45),a=t(14),l=t(31),u=t(29),c=t(49);r.RendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view,this.visuals=new s.Visuals(this.model),this._has_finished=!0},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.request_render=function(){return this.plot_view.request_render()},e.prototype.set_data=function(t){var e,r,n;if(e=this.model.materialize_dataspecs(t),u.extend(this,e),this.plot_model.use_map&&(null!=this._x&&(r=l.project_xy(this._x,this._y),\n",
" this._x=r[0],this._y=r[1]),null!=this._xs))return n=l.project_xsys(this._xs,this._ys),this._xs=n[0],this._ys=n[1],n},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e}(o.DOMView),r.Renderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Renderer\",e.define({level:[a.RenderLevel,null],visible:[a.Bool,!0]}),e}(c.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(165);r.CategoricalScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CategoricalScale\",e.prototype.compute=function(t){return e.__super__.compute.call(this,this.source_range.synthetic(t))},e.prototype.v_compute=function(t){return e.__super__.v_compute.call(this,this.source_range.v_synthetic(t))},e}(o.LinearScale)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(163);r.CategoricalScale=n.CategoricalScale;var i=t(165);r.LinearScale=i.LinearScale;var o=t(166);r.LogScale=o.LogScale;var s=t(167);r.Scale=s.Scale},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(167);r.LinearScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LinearScale\",e.prototype.compute=function(t){var e,r,n;return n=this._compute_state(),e=n[0],r=n[1],e*t+r},e.prototype.v_compute=function(t){var e,r,n,i,o,s,a,l;for(s=this._compute_state(),e=s[0],o=s[1],a=new Float64Array(t.length),n=r=0,i=t.length;r<i;n=++r)l=t[n],a[n]=e*l+o;return a},e.prototype.invert=function(t){var e,r,n;return n=this._compute_state(),e=n[0],r=n[1],(t-r)/e},e.prototype.v_invert=function(t){var e,r,n,i,o,s,a,l;for(s=this._compute_state(),e=s[0],o=s[1],a=new Float64Array(t.length),n=r=0,i=t.length;r<i;n=++r)l=t[n],a[n]=(l-o)/e;return a},e.prototype._compute_state=function(){var t,e,r,n,i,o;return n=this.source_range.start,r=this.source_range.end,o=this.target_range.start,i=this.target_range.end,t=(i-o)/(r-n),e=-(t*n)+o,[t,e]},e}(o.Scale)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(167);r.LogScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LogScale\",e.prototype.compute=function(t){var e,r,n,i,o,s,a;return s=this._compute_state(),r=s[0],o=s[1],n=s[2],i=s[3],0===n?a=0:(e=(Math.log(t)-i)/n,a=isFinite(e)?e*r+o:NaN),a},e.prototype.v_compute=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p;if(u=this._compute_state(),r=u[0],l=u[1],i=u[2],o=u[3],h=new Float64Array(t.length),0===i)for(n=s=0,c=t.length;0<=c?s<c:s>c;n=0<=c?++s:--s)h[n]=0;else for(n=a=0,_=t.length;0<=_?a<_:a>_;n=0<=_?++a:--a)e=(Math.log(t[n])-o)/i,p=isFinite(e)?e*r+l:NaN,h[n]=p;return h},e.prototype.invert=function(t){var e,r,n,i,o,s;return o=this._compute_state(),e=o[0],i=o[1],r=o[2],n=o[3],s=(t-i)/e,Math.exp(r*s+n)},e.prototype.v_invert=function(t){var e,r,n,i,o,s,a,l,u,c;for(a=this._compute_state(),e=a[0],s=a[1],n=a[2],i=a[3],u=new Float64Array(t.length),r=o=0,l=t.length;0<=l?o<l:o>l;r=0<=l?++o:--o)c=(t[r]-s)/e,u[r]=Math.exp(n*c+i);return u},e.prototype._get_safe_factor=function(t,e){var r,n,i,o;return o=t<0?0:t,r=e<0?0:e,o===r&&(0===o?(i=[1,10],o=i[0],r=i[1]):(n=Math.log(o)/Math.log(10),o=Math.pow(10,Math.floor(n)),r=Math.ceil(n)!==Math.floor(n)?Math.pow(10,Math.ceil(n)):Math.pow(10,Math.ceil(n)+1))),[o,r]},e.prototype._compute_state=function(){var t,e,r,n,i,o,s,a,l,u,c,_;return l=this.source_range.start,a=this.source_range.end,_=this.target_range.start,c=this.target_range.end,s=c-_,o=this._get_safe_factor(l,a),u=o[0],t=o[1],0===u?(r=Math.log(t),n=0):(r=Math.log(t)-Math.log(u),n=Math.log(u)),e=s,i=_,[e,i,r,n]},e}(o.Scale)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(235),s=t(14);r.Scale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.internal({source_range:[s.Any],target_range:[s.Any]}),e.prototype.map_to_target=function(t){return this.compute(t)},e.prototype.v_map_to_target=function(t){return this.v_compute(t)},e.prototype.map_from_target=function(t){return this.invert(t)},e.prototype.v_map_from_target=function(t){return this.v_invert(t)},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(175),a=t(13),l=t(14);r.AjaxDataSource=function(t){function e(){return this.get_data=n(this.get_data,this),this.setup=n(this.setup,this),this.destroy=n(this.destroy,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"AjaxDataSource\",e.define({mode:[l.String,\"replace\"],content_type:[l.String,\"application/json\"],http_headers:[l.Any,{}],max_size:[l.Number],method:[l.String,\"POST\"],if_modified:[l.Bool,!1]}),e.prototype.destroy=function(){if(null!=this.interval)return clearInterval(this.interval)},e.prototype.setup=function(){if(null==this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval))return this.interval=setInterval(this.get_data,this.polling_interval,this.mode,this.max_size,this.if_modified)},e.prototype.get_data=function(t,e,r){var n,i,o,s;null==e&&(e=0),null==r&&(r=!1),s=new XMLHttpRequest,s.open(this.method,this.data_url,!0),s.withCredentials=!1,s.setRequestHeader(\"Content-Type\",this.content_type),i=this.http_headers;for(n in i)o=i[n],s.setRequestHeader(n,o);return s.addEventListener(\"load\",function(r){return function(){var n,i,o,a,l,u;if(200===s.status)switch(i=JSON.parse(s.responseText),t){case\"replace\":return r.data=i;case\"append\":for(l=r.data,u=r.columns(),o=0,a=u.length;o<a;o++)n=u[o],i[n]=l[n].concat(i[n]).slice(-e);return r.data=i}}}(this)),s.addEventListener(\"error\",function(t){return function(){return a.logger.error(\"Failed to fetch JSON from \"+t.data_url+\" with code \"+s.status)}}(this)),s.send(),null},e}(s.RemoteDataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(14),a=t(9),l=t(21),u=t(171);r.CDSView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CDSView\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.compute_indices()},e.define({filters:[s.Array,[]],source:[s.Instance]}),e.internal({indices:[s.Array,[]],indices_map:[s.Any,{}]}),e.prototype.connect_signals=function(){var t,r,n;if(e.__super__.connect_signals.call(this),this.connect(this.properties.filters.change,function(){return this.compute_indices(),this.change.emit()}),null!=(null!=(t=this.source)?t.change:void 0)&&this.connect(this.source.change,function(){return this.compute_indices()}),null!=(null!=(r=this.source)?r.streaming:void 0)&&this.connect(this.source.streaming,function(){return this.compute_indices()}),null!=(null!=(n=this.source)?n.patching:void 0))return this.connect(this.source.patching,function(){return this.compute_indices()})},e.prototype.compute_indices=function(){var t,e,r,n;return e=function(){var e,r,n,i;for(n=this.filters,i=[],e=0,r=n.length;e<r;e++)t=n[e],i.push(t.compute_indices(this.source));return i}.call(this),e=function(){var t,n,i;for(i=[],t=0,n=e.length;t<n;t++)r=e[t],null!=r&&i.push(r);return i}(),e.length>0?this.indices=l.intersection.apply(this,e):this.source instanceof u.ColumnarDataSource&&(this.indices=null!=(n=this.source)?n.get_indices():void 0),this.indices_map_to_subset()},e.prototype.indices_map_to_subset=function(){var t,e,r,n;for(this.indices_map={},n=[],t=e=0,r=this.indices.length;0<=r?e<r:e>r;t=0<=r?++e:--e)n.push(this.indices_map[this.indices[t]]=t);return n},e.prototype.convert_selection_from_subset=function(t){var e,r,n;return n=a.create_hit_test_result(),n.update_through_union(t),r=function(){var r,n,i,o;for(i=t[\"1d\"].indices,o=[],r=0,n=i.length;r<n;r++)e=i[r],o.push(this.indices[e]);return o}.call(this),n[\"1d\"].indices=r,n},e.prototype.convert_selection_to_subset=function(t){var e,r,n;return n=a.create_hit_test_result(),n.update_through_union(t),r=function(){var r,n,i,o;for(i=t[\"1d\"].indices,o=[],r=0,n=i.length;r<n;r++)e=i[r],o.push(this.indices_map[e]);return o}.call(this),n[\"1d\"].indices=r,n},e.prototype.convert_indices_from_subset=function(t){var e;return function(){var r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(this.indices[e]);return i}.call(this)},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(171),s=t(8),a=t(14),l=t(26),u=t(34),c=t(41);r.concat_typed_arrays=function(t,e){var r;return r=new t.constructor(t.length+e.length),r.set(t,0),r.set(e,t.length),r},r.stream_to_column=function(t,e,n){var i,o,s,a,l,u,c,_,h,p;if(null!=t.concat)return t=t.concat(e),t.length>n&&(t=t.slice(-n)),t;if(p=t.length+e.length,null!=n&&p>n){for(_=p-n,i=t.length,t.length<n&&(h=new t.constructor(n),h.set(t,0),t=h),o=s=l=_,u=i;l<=u?s<u:s>u;o=l<=u?++s:--s)t[o-_]=t[o];for(o=a=0,c=e.length;0<=c?a<c:a>c;o=0<=c?++a:--a)t[o+(i-_)]=e[o];return t}return h=new t.constructor(e),r.concat_typed_arrays(t,h)},r.slice=function(t,e){var r,n,i,o,s,a,l;return c.isObject(t)?[null!=(r=t.start)?r:0,null!=(n=t.stop)?n:e,null!=(i=t.step)?i:1]:(o=[t,t+1,1],s=o[0],l=o[1],a=o[2],o)},r.patch_to_column=function(t,e,n){var i,o,s,a,u,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C;for(w=new l.Set,x=!1,m=0,v=e.length;m<v;m++)for(k=e[m],s=k[0],C=k[1],c.isArray(s)?(w.push(s[0]),z=n[s[0]],h=t[s[0]]):(c.isNumber(s)?(C=[C],w.push(s)):x=!0,s=[0,0,s],z=[1,t.length],h=t),2===s.length&&(z=[1,z[0]],s=[s[0],0,s[1]]),i=0,M=r.slice(s[1],z[0]),a=M[0],_=M[1],u=M[2],S=r.slice(s[2],z[1]),d=S[0],y=S[1],f=S[2],o=g=T=a,O=_,P=u;P>0?g<O:g>O;o=g+=P)for(p=b=A=d,E=y,j=f;j>0?b<E:b>E;p=b+=j)x&&w.push(p),h[o*z[1]+p]=C[i],i++;return w},r.ColumnDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColumnDataSource\",e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),r=u.decode_column_data(this.data),this.data=r[0],this._shapes=r[1],r},e.define({data:[a.Any,{}]}),e.prototype.attributes_as_json=function(t,r){var n,o,s,a;null==t&&(t=!0),null==r&&(r=e._value_to_json),n={},s=this.serializable_attributes();for(o in s)i.call(s,o)&&(a=s[o],\"data\"===o&&(a=u.encode_column_data(a,this._shapes)),t?n[o]=a:o in this._set_after_defaults&&(n[o]=a));return r(\"attributes\",n,this)},e._value_to_json=function(t,e,r){return c.isObject(e)&&\"data\"===t?u.encode_column_data(e,r._shapes):s.HasProps._value_to_json(t,e,r)},e.prototype.stream=function(t,e){var n,i,o;n=this.data;for(i in t)o=t[i],n[i]=r.stream_to_column(n[i],t[i],e);return this.setv(\"data\",n,{silent:!0}),this.streaming.emit()},e.prototype.patch=function(t){var e,n,i,o;e=this.data,o=new l.Set;for(n in t)i=t[n],o=o.union(r.patch_to_column(e[n],i,this._shapes[n]));return this.setv(\"data\",e,{silent:!0}),this.patching.emit(o.values)},e}(o.ColumnarDataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(172),s=t(19),a=t(13),l=t(16),u=t(14),c=t(21);r.ColumnarDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ColumnarDataSource\",e.define({column_names:[u.Array,[]]}),e.internal({selection_manager:[u.Instance,function(t){return new l.SelectionManager({source:t})}],inspected:[u.Any],_shapes:[u.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.select=new s.Signal(this,\"select\"),this.inspect=new s.Signal(this,\"inspect\"),this.streaming=new s.Signal(this,\"streaming\"),this.patching=new s.Signal(this,\"patching\")},e.prototype.get_column=function(t){var e;return null!=(e=this.data[t])?e:null},e.prototype.columns=function(){return Object.keys(this.data)},e.prototype.get_length=function(t){var e,r,n,i;switch(null==t&&(t=!0),r=c.uniq(function(){var t,r;t=this.data,r=[];for(e in t)i=t[e],r.push(i.length);return r}.call(this)),r.length){case 0:return null;case 1:return r[0];default:if(n=\"data source has columns of inconsistent lengths\",t)return a.logger.warn(n),r.sort()[0];throw new Error(n)}},e.prototype.get_indices=function(){var t,e;return t=this.get_length(),null==t&&(t=1),function(){e=[];for(var r=0;0<=t?r<t:r>t;0<=t?r++:r--)e.push(r);return e}.apply(this)},e}(o.DataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(9),a=t(14),l=t(41);r.DataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"DataSource\",e.define({selected:[a.Any,s.create_hit_test_result()],callback:[a.Any]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.properties.selected.change,function(t){return function(){var e;if(e=t.callback,null!=e)return l.isFunction(e)?e(t):e.execute(t)}}(this))},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(171),s=t(13),a=t(14);r.GeoJSONDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"GeoJSONDataSource\",e.define({geojson:[a.Any]}),e.internal({data:[a.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._update_data(),this.connect(this.properties.geojson.change,function(t){return function(){return t._update_data()}}(this))},e.prototype._update_data=function(){return this.data=this.geojson_to_column_data()},e.prototype._get_new_list_array=function(t){var e,r,n,i;for(i=[],e=r=0,n=t;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push([]);return i},e.prototype._get_new_nan_array=function(t){var e,r,n,i;for(i=[],e=r=0,n=t;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push(NaN);return i},e.prototype._flatten_function=function(t,e){return t.concat([[NaN,NaN,NaN]]).concat(e)},e.prototype._add_properties=function(t,e,r,n){var i,o;o=[];for(i in t.properties)e.hasOwnProperty(i)||(e[i]=this._get_new_nan_array(n)),o.push(e[i][r]=t.properties[i]);return o},e.prototype._add_geometry=function(t,e,r){var n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E;switch(t.type){case\"Point\":return i=t.coordinates,e.x[r]=i[0],e.y[r]=i[1],e.z[r]=null!=(w=i[2])?w:NaN;case\"LineString\":for(n=t.coordinates,O=[],u=c=0,h=n.length;c<h;u=++c)i=n[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],O.push(e.zs[r][u]=null!=(x=i[2])?x:NaN);return O;case\"Polygon\":for(t.coordinates.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),o=t.coordinates[0],P=[],u=_=0,p=o.length;_<p;u=++_)i=o[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],P.push(e.zs[r][u]=null!=(k=i[2])?k:NaN);return P;case\"MultiPoint\":return s.logger.warn(\"MultiPoint not supported in Bokeh\");case\"MultiLineString\":for(l=t.coordinates.reduce(this._flatten_function),A=[],u=m=0,d=l.length;m<d;u=++m)i=l[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],A.push(e.zs[r][u]=null!=(M=i[2])?M:NaN);return A;case\"MultiPolygon\":for(a=[],S=t.coordinates,v=0,f=S.length;v<f;v++)b=S[v],b.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),a.push(b[0]);for(l=a.reduce(this._flatten_function),E=[],u=g=0,y=l.length;g<y;u=++g)i=l[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],E.push(e.zs[r][u]=null!=(T=i[2])?T:NaN);return E;default:throw new Error(\"Invalid type \"+t.type)}},e.prototype._get_items_length=function(t){var e,r,n,i,o,s,a,l,u,c,_;for(e=0,i=a=0,u=t.length;a<u;i=++a)if(o=t[i],n=\"Feature\"===o.type?o.geometry:o,\"GeometryCollection\"===n.type)for(_=n.geometries,s=l=0,c=_.length;l<c;s=++l)r=_[s],e+=1;else e+=1;return e},e.prototype.geojson_to_column_data=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f;if(n=JSON.parse(this.geojson),\"GeometryCollection\"!==(d=n.type)&&\"FeatureCollection\"!==d)throw new Error(\"Bokeh only supports type GeometryCollection and FeatureCollection at top level\");if(\"GeometryCollection\"===n.type){if(null==n.geometries)throw new Error(\"No geometries found in GeometryCollection\");if(0===n.geometries.length)throw new Error(\"geojson.geometries must have one or more items\");l=n.geometries}if(\"FeatureCollection\"===n.type){if(null==n.features)throw new Error(\"No features found in FeaturesCollection\");if(0===n.features.length)throw new Error(\"geojson.features must have one or more items\");l=n.features}for(a=this._get_items_length(l),e={x:this._get_new_nan_array(a),y:this._get_new_nan_array(a),z:this._get_new_nan_array(a),xs:this._get_new_list_array(a),ys:this._get_new_list_array(a),zs:this._get_new_list_array(a)},t=0,o=c=0,h=l.length;c<h;o=++c)if(s=l[o],i=\"Feature\"===s.type?s.geometry:s,\"GeometryCollection\"===i.type)for(f=i.geometries,u=_=0,p=f.length;_<p;u=++_)r=f[u],this._add_geometry(r,e,t),\"Feature\"===s.type&&this._add_properties(s,e,t,a),t+=1;else this._add_geometry(i,e,t),\"Feature\"===s.type&&this._add_properties(s,e,t,a),t+=1;return e},e}(o.ColumnarDataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(168);r.AjaxDataSource=n.AjaxDataSource;var i=t(170);r.ColumnDataSource=i.ColumnDataSource;var o=t(171);r.ColumnarDataSource=o.ColumnarDataSource;var s=t(169);r.CDSView=s.CDSView;var a=t(172);r.DataSource=a.DataSource;var l=t(173);r.GeoJSONDataSource=l.GeoJSONDataSource;var u=t(175);r.RemoteDataSource=u.RemoteDataSource},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(170),s=t(14);r.RemoteDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"RemoteDataSource\",e.define({data_url:[s.String],polling_interval:[s.Number]}),e}(o.ColumnDataSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,l=t(180),u=t(14),c=t(21);n=function(t,e,r){return Math.max(e,Math.min(r,t))},i=function(t,e){return null==e&&(e=Math.E),Math.log(t)/Math.log(e)},r.AdaptiveTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"AdaptiveTicker\",e.define({base:[u.Number,10],mantissas:[u.Array,[1,2,5]],min_interval:[u.Number,0],max_interval:[u.Number]}),e.prototype.initialize=function(t,r){var n,i;return e.__super__.initialize.call(this,t,r),n=c.nth(this.mantissas,-1)/this.base,i=c.nth(this.mantissas,0)*this.base,this.extended_mantissas=[n].concat(a.call(this.mantissas),[i]),this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()},e.prototype.get_interval=function(t,e,r){var o,s,a,l,u,_,h,p,d;return a=e-t,u=this.get_ideal_interval(t,e,r),d=Math.floor(i(u/this.base_factor,this.base)),_=Math.pow(this.base,d)*this.base_factor,h=u/_,s=this.extended_mantissas,l=s.map(function(t){return Math.abs(r-a/(t*_))}),o=s[c.argmin(l)],p=o*_,n(p,this.get_min_interval(),this.get_max_interval())},e}(l.ContinuousTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(176);r.BasicTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"BasicTicker\",e}(o.AdaptiveTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(189);r.CategoricalTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CategoricalTicker\",e.prototype.get_ticks=function(t,e,r,n,i){var o,s,a,l,u,c;return o=i.desired_n_ticks,s=this._collect(r.factors,r,t,e),c=this._collect(null!=(l=r.tops)?l:[],r,t,e),a=this._collect(null!=(u=r.mids)?u:[],r,t,e),{major:s,tops:c,mids:a,minor:[]}},e.prototype._collect=function(t,e,r,n){var i,o,s,a,l;for(l=[],s=0,a=t.length;s<a;s++)o=t[s],i=e.synthetic(o),i>r&&i<n&&l.push(o);return l},e}(o.Ticker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(180),s=t(14),a=t(21),l=t(29);r.CompositeTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"CompositeTicker\",e.define({tickers:[s.Array,[]]}),e.getters({min_intervals:function(){var t,e,r,n,i;for(r=this.tickers,n=[],t=0,e=r.length;t<e;t++)i=r[t],n.push(i.get_min_interval());return n},max_intervals:function(){var t,e,r,n,i;for(r=this.tickers,n=[],t=0,e=r.length;t<e;t++)i=r[t],n.push(i.get_max_interval());return n},min_interval:function(){return this.min_intervals[0]},max_interval:function(){return this.max_intervals[0]}}),e.prototype.get_best_ticker=function(t,e,r){var n,i,o,s,u,c,_,h;return s=e-t,c=this.get_ideal_interval(t,e,r),h=[a.sortedIndex(this.min_intervals,c)-1,a.sortedIndex(this.max_intervals,c)],_=[this.min_intervals[h[0]],this.max_intervals[h[1]]],u=_.map(function(t){return Math.abs(r-s/t)}),l.isEmpty(u.filter(function(t){return!isNaN(t)}))?i=this.tickers[0]:(n=a.argmin(u),o=h[n],i=this.tickers[o]),i},e.prototype.get_interval=function(t,e,r){var n;return n=this.get_best_ticker(t,e,r),n.get_interval(t,e,r)},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var i,o;return i=this.get_best_ticker(t,e,n),o=i.get_ticks_no_defaults(t,e,r,n)},e}(o.ContinuousTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(189),s=t(14);r.ContinuousTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ContinuousTicker\",e.define({num_minor_ticks:[s.Number,5],desired_num_ticks:[s.Number,6]}),e.prototype.get_interval=void 0,e.prototype.get_min_interval=function(){return this.min_interval},e.prototype.get_max_interval=function(){var t;return null!=(t=this.max_interval)?t:Infinity},e.prototype.get_ideal_interval=function(t,e,r){var n;return n=e-t,n/r},e}(o.Ticker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a,l=function(t,e){function r(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},u={}.hasOwnProperty,c=t(21),_=t(176),h=t(179),p=t(182),d=t(187),f=t(191),y=t(190);i=y.ONE_MILLI,a=y.ONE_SECOND,o=y.ONE_MINUTE,n=y.ONE_HOUR,s=y.ONE_MONTH,r.DatetimeTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"DatetimeTicker\",e.override({num_minor_ticks:0,tickers:function(){return[new _.AdaptiveTicker({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*i,num_minor_ticks:0}),new _.AdaptiveTicker({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:a,max_interval:30*o,num_minor_ticks:0}),new _.AdaptiveTicker({mantissas:[1,2,4,6,8,12],base:24,min_interval:n,max_interval:12*n,num_minor_ticks:0}),new p.DaysTicker({days:c.range(1,32)}),new p.DaysTicker({days:c.range(1,31,3)}),new p.DaysTicker({days:[1,8,15,22]}),new p.DaysTicker({days:[1,15]}),new d.MonthsTicker({months:c.range(0,12,1)}),new d.MonthsTicker({months:c.range(0,12,2)}),new d.MonthsTicker({months:c.range(0,12,4)}),new d.MonthsTicker({months:c.range(0,12,6)}),new f.YearsTicker({})]}}),e}(h.CompositeTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a=function(t,e){function r(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},l={}.hasOwnProperty,u=t(188),c=t(190),_=t(14),h=t(21);i=c.copy_date,s=c.last_month_no_later_than,n=c.ONE_DAY,o=function(t,e){var r,n,o,a,l;for(l=s(new Date(t)),o=s(new Date(e)),a=i(o),o.setUTCMonth(o.getUTCMonth()+1),n=[],r=l;;)if(n.push(i(r)),r.setUTCMonth(r.getUTCMonth()+1),r>o)break;return n},r.DaysTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"DaysTicker\",e.define({days:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,o;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,r),i=this.days,o=i.length>1?(i[1]-i[0])*n:31*n,this.interval=o},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d,f;return d=o(t,e),c=this.days,_=function(t){return function(t,e){var r,n,o,s,a,l;for(r=[],a=0,l=c.length;a<l;a++)n=c[a],o=i(t),o.setUTCDate(n),s=new Date(o.getTime()+e/2),s.getUTCMonth()===t.getUTCMonth()&&r.push(o);return r}}(this),p=this.interval,u=h.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t<e;t++)a=d[t],r.push(_(a,p));return r}()),s=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],r.push(l.getTime());return r}(),f=s.filter(function(r){return t<=r&&r<=e}),{major:f,minor:[]}},e}(u.SingleIntervalTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(180),s=t(14);r.FixedTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"FixedTicker\",e.define({ticks:[s.Array,[]]}),e.prototype.get_ticks_no_defaults=function(t,e,r,n){return{major:this.ticks,minor:[]}},e}(o.ContinuousTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(176);r.AdaptiveTicker=n.AdaptiveTicker;var i=t(177);r.BasicTicker=i.BasicTicker;var o=t(178);r.CategoricalTicker=o.CategoricalTicker;var s=t(179);r.CompositeTicker=s.CompositeTicker;var a=t(180);r.ContinuousTicker=a.ContinuousTicker;var l=t(181);r.DatetimeTicker=l.DatetimeTicker;var u=t(182);r.DaysTicker=u.DaysTicker;var c=t(183);r.FixedTicker=c.FixedTicker;var _=t(185);r.LogTicker=_.LogTicker;var h=t(186);r.MercatorTicker=h.MercatorTicker;var p=t(187);r.MonthsTicker=p.MonthsTicker;var d=t(188);r.SingleIntervalTicker=d.SingleIntervalTicker;var f=t(189);r.Ticker=f.Ticker;var y=t(191);r.YearsTicker=y.YearsTicker},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(21),s=t(176);r.LogTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LogTicker\",e.override({mantissas:[1,5]}),e.prototype.get_ticks_no_defaults=function(t,e,r,n){var i,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F;if(A=this.num_minor_ticks,O=[],i=this.base,k=Math.log(t)/Math.log(i),w=Math.log(e)/Math.log(i),x=w-k,isFinite(x)){if(x<2){if(_=this.get_interval(t,e,n),z=Math.floor(t/_),s=Math.ceil(e/_),u=o.range(z,s+1),D=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],0!==l&&r.push(l*_);return r}(),D=D.filter(function(r){return t<=r&&r<=e}),A>0&&D.length>0){for(S=_/A,T=function(){var t,e,r;for(r=[],c=t=0,e=A;0<=e?t<e:t>e;c=0<=e?++t:--t)r.push(c*S);return r}(),j=T.slice(1,+T.length+1||9e9),h=0,f=j.length;h<f;h++)F=j[h],O.push(D[0]-F);for(p=0,y=D.length;p<y;p++)for(N=D[p],d=0,m=T.length;d<m;d++)F=T[d],O.push(N+F)}}else if(C=Math.ceil(.999999*k),a=Math.floor(1.000001*w),_=Math.ceil((a-C)/9),D=o.range(C,a+1,_),D=D.map(function(t){return Math.pow(i,t)}),D=D.filter(function(r){return t<=r&&r<=e}),A>0&&D.length>0){for(S=Math.pow(i,_)/A,T=function(){var t,e,r;for(r=[],c=t=1,e=A;1<=e?t<=e:t>=e;c=1<=e?++t:--t)r.push(c*S);return r}(),M=0,v=T.length;M<v;M++)F=T[M],O.push(D[0]/F);for(O.push(D[0]),P=0,g=D.length;P<g;P++)for(N=D[P],E=0,b=T.length;E<b;E++)F=T[E],O.push(N*F)}}else D=[];return{major:D,minor:O}},e}(s.AdaptiveTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(177),s=t(14),a=t(30);r.MercatorTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MercatorTicker\",e.define({dimension:[s.LatLon]}),e.prototype.get_ticks_no_defaults=function(t,r,n,i){var o,s,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D;if(null==this.dimension)throw new Error(\"MercatorTicker.dimension not configured\");if(w=a.clip_mercator(t,r,this.dimension),t=w[0],r=w[1],\"lon\"===this.dimension?(x=a.proj4(a.mercator).inverse([t,n]),g=x[0],m=x[1],T=a.proj4(a.mercator).inverse([r,n]),v=T[0],m=T[1]):(O=a.proj4(a.mercator).inverse([n,t]),m=O[0],g=O[1],P=a.proj4(a.mercator).inverse([n,r]),m=P[0],v=P[1]),b=e.__super__.get_ticks_no_defaults.call(this,g,v,n,i),D={major:[],minor:[]},\"lon\"===this.dimension){for(A=b.major,s=0,h=A.length;s<h;s++)N=A[s],a.in_bounds(N,\"lon\")&&(E=a.proj4(a.mercator).forward([N,m]),y=E[0],o=E[1],D.major.push(y));for(j=b.minor,l=0,p=j.length;l<p;l++)N=j[l],a.in_bounds(N,\"lon\")&&(z=a.proj4(a.mercator).forward([N,m]),y=z[0],o=z[1],D.minor.push(y))}else{for(C=b.major,u=0,d=C.length;u<d;u++)N=C[u],a.in_bounds(N,\"lat\")&&(k=a.proj4(a.mercator).forward([m,N]),o=k[0],_=k[1],D.major.push(_));for(M=b.minor,c=0,f=M.length;c<f;c++)N=M[c],a.in_bounds(N,\"lat\")&&(S=a.proj4(a.mercator).forward([m,N]),o=S[0],_=S[1],D.minor.push(_))}return D},e}(o.BasicTicker)},function(t,e,r){\n",
" \"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o,s,a=function(t,e){function r(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},l={}.hasOwnProperty,u=t(188),c=t(190),_=t(14),h=t(21);i=c.copy_date,s=c.last_year_no_later_than,n=c.ONE_MONTH,o=function(t,e){var r,n,o,a;for(a=s(new Date(t)),o=s(new Date(e)),o.setUTCFullYear(o.getUTCFullYear()+1),n=[],r=a;;)if(n.push(i(r)),r.setUTCFullYear(r.getUTCFullYear()+1),r>o)break;return n},r.MonthsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"MonthsTicker\",e.define({months:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,o;return e.__super__.initialize.call(this,t,r),o=this.months,i=o.length>1?(o[1]-o[0])*n:12*n,this.interval=i},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d;return d=o(t,e),c=this.months,_=function(t){return c.map(function(e){var r;return r=i(t),r.setUTCMonth(e),r})},u=h.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t<e;t++)a=d[t],r.push(_(a));return r}()),s=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],r.push(l.getTime());return r}(),p=s.filter(function(r){return t<=r&&r<=e}),{major:p,minor:[]}},e}(u.SingleIntervalTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(180),s=t(14);r.SingleIntervalTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"SingleIntervalTicker\",e.define({interval:[s.Number]}),e.getters({min_interval:function(){return this.interval},max_interval:function(){return this.interval}}),e.prototype.get_interval=function(t,e,r){return this.interval},e}(o.ContinuousTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49),s=t(21),a=t(41);r.Ticker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Ticker\",e.prototype.get_ticks=function(t,e,r,n,i){var o;return o=i.desired_n_ticks,this.get_ticks_no_defaults(t,e,n,this.desired_num_ticks)},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var i,o,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S;if(c=this.get_interval(t,e,n),x=Math.floor(t/c),i=Math.ceil(e/c),l=a.isStrictNaN(x)||a.isStrictNaN(i)?[]:s.range(x,i+1),M=function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)o=l[t],r.push(o*c);return r}(),M=M.filter(function(r){return t<=r&&r<=e}),b=this.num_minor_ticks,g=[],b>0&&M.length>0){for(m=c/b,v=function(){var t,e,r;for(r=[],u=t=0,e=b;0<=e?t<e:t>e;u=0<=e?++t:--t)r.push(u*m);return r}(),w=v.slice(1,+v.length+1||9e9),_=0,d=w.length;_<d;_++)S=w[_],g.push(M[0]-S);for(h=0,f=M.length;h<f;h++)for(k=M[h],p=0,y=v.length;p<y;p++)S=v[p],g.push(k+S)}return{major:M,minor:g}},e}(o.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ONE_MILLI=1,r.ONE_SECOND=1e3,r.ONE_MINUTE=60*r.ONE_SECOND,r.ONE_HOUR=60*r.ONE_MINUTE,r.ONE_DAY=24*r.ONE_HOUR,r.ONE_MONTH=30*r.ONE_DAY,r.ONE_YEAR=365*r.ONE_DAY,r.copy_date=function(t){return new Date(t.getTime())},r.last_month_no_later_than=function(t){return t=r.copy_date(t),t.setUTCDate(1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t},r.last_year_no_later_than=function(t){return t=r.last_month_no_later_than(t),t.setUTCMonth(0),t}},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(177),l=t(188),u=t(190);i=u.last_year_no_later_than,n=u.ONE_YEAR,r.YearsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"YearsTicker\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.interval=n,this.basic_ticker=new a.BasicTicker({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var o,s,a,l,u,c;return a=i(new Date(t)).getUTCFullYear(),s=i(new Date(e)).getUTCFullYear(),c=this.basic_ticker.get_ticks_no_defaults(a,s,r,n).major,o=function(){var t,e,r;for(r=[],t=0,e=c.length;t<e;t++)u=c[t],r.push(Date.UTC(u,0,1));return r}(),l=o.filter(function(r){return t<=r&&r<=e}),{major:l,minor:[]}},e}(l.SingleIntervalTicker)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197),s=t(14);r.BBoxTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"BBoxTileSource\",e.define({use_latlon:[s.Bool,!1]}),e.prototype.get_image_url=function(t,e,r){var n,i,o,s,a,l,u;return n=this.string_lookup_replace(this.url,this.extra_url_vars),this.use_latlon?(i=this.get_tile_geographic_bounds(t,e,r),a=i[0],u=i[1],s=i[2],l=i[3]):(o=this.get_tile_meter_bounds(t,e,r),a=o[0],u=o[1],s=o[2],l=o[3]),n.replace(\"{XMIN}\",a).replace(\"{YMIN}\",u).replace(\"{XMAX}\",s).replace(\"{YMAX}\",l)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(162),a=t(13),l=t(14);r.DynamicImageView=function(t){function e(){return this._on_image_error=n(this._on_image_error,this),this._on_image_load=n(this._on_image_load,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},e.prototype._set_data=function(){return this.map_plot=this.plot_view.model.plot,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_view.frame,this.x_range=this.map_plot.x_range,this.y_range=this.map_plot.y_range,this.lastImage=void 0,this.extent=this.get_extent()},e.prototype._map_data=function(){return this.initial_extent=this.get_extent()},e.prototype._on_image_load=function(t){var e;if(e=t.target.image_data,e.img=t.target,e.loaded=!0,this.lastImage=e,this.get_extent().join(\":\")===e.cache_key)return this.request_render()},e.prototype._on_image_error=function(t){var e;return a.logger.error(\"Error loading image: \"+t.target.src),e=t.target.image_data,this.model.image_source.remove_image(e)},e.prototype._create_image=function(t){var e;return e=new Image,e.onload=this._on_image_load,e.onerror=this._on_image_error,e.alt=\"\",e.image_data={bounds:t,loaded:!1,cache_key:t.join(\":\")},this.model.image_source.add_image(e.image_data),e.src=this.model.image_source.get_image_url(t[0],t[1],t[2],t[3],Math.ceil(this.map_frame._height.value),Math.ceil(this.map_frame._width.value)),e},e.prototype.render=function(t,e,r){var n,i;return null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),n=this.get_extent(),this.render_timer&&clearTimeout(this.render_timer),i=this.model.image_source.images[n.join(\":\")],null!=i&&i.loaded?void this._draw_image(n.join(\":\")):(null!=this.lastImage&&this._draw_image(this.lastImage.cache_key),null==i?this.render_timer=setTimeout(function(t){return function(){return t._create_image(n)}}(this),125):void 0)},e.prototype._draw_image=function(t){var e,r,n,i,o,s,a,l,u,c,_;if(e=this.model.image_source.images[t],null!=e)return this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha,r=this.plot_view.frame.map_to_screen([e.bounds[0]],[e.bounds[3]],this.plot_view.canvas),l=r[0],_=r[1],n=this.plot_view.frame.map_to_screen([e.bounds[2]],[e.bounds[1]],this.plot_view.canvas),a=n[0],c=n[1],l=l[0],_=_[0],a=a[0],c=c[0],o=a-l,i=c-_,s=l,u=_,this.map_canvas.drawImage(e.img,s,u,o,i),this.map_canvas.restore()},e.prototype._set_rect=function(){var t,e,r,n,i;return r=this.plot_model.plot.properties.outline_line_width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame._left.value)+r/2,n=this.plot_view.canvas.vy_to_sy(this.map_frame._top.value)+r/2,i=this.map_frame._width.value-r,t=this.map_frame._height.value-r,this.map_canvas.rect(e,n,i,t),this.map_canvas.clip()},e}(s.RendererView),r.DynamicImageRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.DynamicImageView,e.prototype.type=\"DynamicImageRenderer\",e.define({alpha:[l.Number,1],image_source:[l.Instance],render_parents:[l.Bool,!0]}),e.override({level:\"underlay\"}),e}(s.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ImagePool=function(){function t(){this.images=[]}return t.prototype.pop=function(){var t;return t=this.images.pop(),null!=t?t:new Image},t.prototype.push=function(t){if(!(this.images.length>50))return t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(49);r.ImageSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return n(e,t),e.prototype.type=\"ImageSource\",e.define({url:[o.String,\"\"],extra_url_vars:[o.Any,{}]}),e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),t=t.replace(\"{height}\",\"{HEIGHT}\"),t=t.replace(\"{width}\",\"{WIDTH}\"),this.url=t},e.prototype.string_lookup_replace=function(t,e){var r,n,i;n=t;for(r in e)i=e[r],n=n.replace(\"{\"+r+\"}\",i.toString());return n},e.prototype.add_image=function(t){return this.images[t.cache_key]=t},e.prototype.remove_image=function(t){return delete this.images[t.cache_key]},e.prototype.get_image_url=function(t,e,r,n,i,o){var s;return s=this.string_lookup_replace(this.url,this.extra_url_vars),s.replace(\"{XMIN}\",t).replace(\"{YMIN}\",e).replace(\"{XMAX}\",r).replace(\"{YMAX}\",n).replace(\"{WIDTH}\",o).replace(\"{HEIGHT}\",i)},e}(s.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(192);r.BBoxTileSource=n.BBoxTileSource;var i=t(193);r.DynamicImageRenderer=i.DynamicImageRenderer;var o=t(195);r.ImageSource=o.ImageSource;var s=t(197);r.MercatorTileSource=s.MercatorTileSource;var a=t(198);r.QUADKEYTileSource=a.QUADKEYTileSource;var l=t(199);r.TileRenderer=l.TileRenderer;var u=t(200);r.TileSource=u.TileSource;var c=t(202);r.TMSTileSource=c.TMSTileSource;var _=t(203);r.WMTSTileSource=_.WMTSTileSource},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(200),a=t(14);r.MercatorTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"MercatorTileSource\",e.define({wrap_around:[a.Bool,!0]}),e.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097}),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this._resolutions=function(){var t,e,n,i;for(i=[],r=t=e=this.min_zoom,n=this.max_zoom;e<=n?t<=n:t>=n;r=e<=n?++t:--t)i.push(this.get_resolution(r));return i}.call(this)},e.prototype._computed_initial_resolution=function(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size},e.prototype.is_valid_tile=function(t,e,r){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,r)))&&!(e<0||e>=Math.pow(2,r))},e.prototype.retain_children=function(t){var e,r,n,i,o,s,a;i=t.quadkey,n=i.length,r=n+3,o=this.tiles,s=[];for(e in o)a=o[e],0===a.quadkey.indexOf(i)&&a.quadkey.length>n&&a.quadkey.length<=r?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,r,n,i,s,a,l,u,c,_,h,p,d,f,y;r=4,s=t.tile_coords,h=s[0],p=s[1],d=s[2],n=function(){var t,e,n,i;for(i=[],f=t=e=h-r,n=h+r;e<=n?t<=n:t>=n;f=e<=n?++t:--t)i.push(f);return i}(),i=function(){var t,e,n,i;for(i=[],y=t=e=p-r,n=p+r;e<=n?t<=n:t>=n;y=e<=n?++t:--t)i.push(y);return i}(),a=this.tiles,c=[];for(e in a)_=a[e],_.tile_coords[2]===d&&(l=_.tile_coords[0],o.call(n,l)>=0)&&(u=_.tile_coords[1],o.call(i,u)>=0)?c.push(_.retain=!0):c.push(void 0);return c},e.prototype.retain_parents=function(t){var e,r,n,i,o;r=t.quadkey,n=this.tiles,i=[];for(e in n)o=n[e],i.push(o.retain=0===r.indexOf(o.quadkey));return i},e.prototype.children_by_tile_xyz=function(t,e,r){var n,i,o,s,a,l,u,c,_;for(_=this.calculate_world_x_by_tile_xyz(t,e,r),0!==_&&(l=this.normalize_xyz(t,e,r),t=l[0],e=l[1],r=l[2]),a=this.tile_xyz_to_quadkey(t,e,r),i=[],o=s=0;s<=3;o=s+=1)u=this.quadkey_to_tile_xyz(a+o.toString()),t=u[0],e=u[1],r=u[2],0!==_&&(c=this.denormalize_xyz(t,e,r,_),t=c[0],e=c[1],r=c[2]),n=this.get_tile_meter_bounds(t,e,r),null!=n&&i.push([t,e,r,n]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var n,i;return i=this.tile_xyz_to_quadkey(t,e,r),n=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(n)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,r){var n,i;return n=(t[2]-t[0])/r,i=(t[3]-t[1])/e,[n,i]},e.prototype.get_level_by_extent=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=(t[2]-t[0])/r,c=(t[3]-t[1])/e,l=Math.max(u,c),n=0,a=this._resolutions,i=0,o=a.length;i<o;i++){if(s=a[i],l>s){if(0===n)return 0;if(n>0)return n-1}n+=1}},e.prototype.get_closest_level_by_extent=function(t,e,r){var n,i,o,s,a;return s=(t[2]-t[0])/r,a=(t[3]-t[1])/e,i=Math.max(s,a),o=this._resolutions,n=this._resolutions.reduce(function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t}),this._resolutions.indexOf(n)},e.prototype.snap_to_zoom=function(t,e,r,n){var i,o,s,a,l,u,c,_,h;return i=this._resolutions[n],o=r*i,s=e*i,u=t[0],h=t[1],l=t[2],_=t[3],a=(o-(l-u))/2,c=(s-(_-h))/2,[u-a,h-c,l+a,_+c]},e.prototype.tms_to_wmts=function(t,e,r){\"Note this works both ways\";return[t,Math.pow(2,r)-1-e,r]},e.prototype.wmts_to_tms=function(t,e,r){\"Note this works both ways\";return[t,Math.pow(2,r)-1-e,r]},e.prototype.pixels_to_meters=function(t,e,r){var n,i,o;return o=this.get_resolution(r),n=t*o-this.x_origin_offset,i=e*o-this.y_origin_offset,[n,i]},e.prototype.meters_to_pixels=function(t,e,r){var n,i,o;return o=this.get_resolution(r),n=(t+this.x_origin_offset)/o,i=(e+this.y_origin_offset)/o,[n,i]},e.prototype.pixels_to_tile=function(t,e){var r,n;return r=Math.ceil(t/parseFloat(this.tile_size)),r=0===r?r:r-1,n=Math.max(Math.ceil(e/parseFloat(this.tile_size))-1,0),[r,n]},e.prototype.pixels_to_raster=function(t,e,r){var n;return n=this.tile_size<<r,[t,n-e]},e.prototype.meters_to_tile=function(t,e,r){var n,i,o;return o=this.meters_to_pixels(t,e,r),n=o[0],i=o[1],this.pixels_to_tile(n,i)},e.prototype.get_tile_meter_bounds=function(t,e,r){var n,i,o,s,a,l;return n=this.pixels_to_meters(t*this.tile_size,e*this.tile_size,r),s=n[0],l=n[1],i=this.pixels_to_meters((t+1)*this.tile_size,(e+1)*this.tile_size,r),o=i[0],a=i[1],null!=s&&null!=l&&null!=o&&null!=a?[s,l,o,a]:void 0},e.prototype.get_tile_geographic_bounds=function(t,e,r){var n,i,o,s,a,l;return n=this.get_tile_meter_bounds(t,e,r),l=this.utils.meters_extent_to_geographic(n),a=l[0],s=l[1],o=l[2],i=l[3],[a,s,o,i]},e.prototype.get_tiles_by_extent=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w;for(null==r&&(r=1),g=t[0],w=t[1],v=t[2],b=t[3],o=this.meters_to_tile(g,w,e),d=o[0],m=o[1],s=this.meters_to_tile(v,b,e),p=s[0],y=s[1],d-=r,m-=r,p+=r,y+=r,_=[],f=n=a=y,l=m;n>=l;f=n+=-1)for(h=i=u=d,c=p;i<=c;h=i+=1)this.is_valid_tile(h,f,e)&&_.push([h,f,e,this.get_tile_meter_bounds(h,f,e)]);return _=this.sort_tiles_from_center(_,[d,m,p,y])},e.prototype.quadkey_to_tile_xyz=function(t){\"Computes tile x, y and z values based on quadKey.\";var e,r,n,i,o,s,a,l;for(o=0,s=0,a=t.length,e=r=i=a;r>0;e=r+=-1)switch(l=t.charAt(a-e),n=1<<e-1,l){case\"0\":continue;case\"1\":o|=n;break;case\"2\":s|=n;break;case\"3\":o|=n,s|=n;break;default:throw new TypeError(\"Invalid Quadkey: \"+t)}return[o,s,a]},e.prototype.tile_xyz_to_quadkey=function(t,e,r){\"Computes quadkey value based on tile x, y and z values.\";var n,i,o,s,a,l;for(a=\"\",i=o=l=r;o>0;i=o+=-1)n=0,s=1<<i-1,0!==(t&s)&&(n+=1),0!==(e&s)&&(n+=2),a+=n.toString();return a},e.prototype.children_by_tile_xyz=function(t,e,r){var n,i,o,s,a,l;for(a=this.tile_xyz_to_quadkey(t,e,r),i=[],o=s=0;s<=3;o=s+=1)l=this.quadkey_to_tile_xyz(a+o.toString()),t=l[0],e=l[1],r=l[2],n=this.get_tile_meter_bounds(t,e,r),null!=n&&i.push([t,e,r,n]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var n,i;return i=this.tile_xyz_to_quadkey(t,e,r),n=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(n)},e.prototype.get_closest_parent_by_tile_xyz=function(t,e,r){var n,i,o,s,a;for(a=this.calculate_world_x_by_tile_xyz(t,e,r),i=this.normalize_xyz(t,e,r),t=i[0],e=i[1],r=i[2],n=this.tile_xyz_to_quadkey(t,e,r);n.length>0;)if(n=n.substring(0,n.length-1),o=this.quadkey_to_tile_xyz(n),t=o[0],e=o[1],r=o[2],s=this.denormalize_xyz(t,e,r,a),t=s[0],e=s[1],r=s[2],this.tile_xyz_to_key(t,e,r)in this.tiles)return[t,e,r];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,r){var n;return this.wrap_around?(n=Math.pow(2,r),[(t%n+n)%n,e,r]):[t,e,r]},e.prototype.denormalize_xyz=function(t,e,r,n){return[t+n*Math.pow(2,r),e,r]},e.prototype.denormalize_meters=function(t,e,r,n){return[t+2*n*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,r){return Math.floor(t/Math.pow(2,r))},e}(s.TileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197);r.QUADKEYTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"QUADKEYTileSource\",e.prototype.get_image_url=function(t,e,r){var n,i,o;return n=this.string_lookup_replace(this.url,this.extra_url_vars),o=this.tms_to_wmts(t,e,r),t=o[0],e=o[1],r=o[2],i=this.tile_xyz_to_quadkey(t,e,r),n.replace(\"{Q}\",i)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(194),l=t(203),u=t(162),c=t(5),_=t(14),h=t(41);r.TileRendererView=function(t){function e(){return this._update=n(this._update,this),this._prefetch_tiles=n(this._prefetch_tiles,this),this._on_tile_error=n(this._on_tile_error,this),this._on_tile_cache_load=n(this._on_tile_cache_load,this),this._on_tile_load=n(this._on_tile_load,this),this._add_attribution=n(this._add_attribution,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return this.attributionEl=null,this._tiles=[],e.__super__.initialize.apply(this,arguments)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},e.prototype._set_data=function(){return this.pool=new a.ImagePool,this.map_plot=this.plot_model.plot,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_model.frame,this.x_range=this.map_plot.x_range,this.y_range=this.map_plot.y_range,this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},e.prototype._add_attribution=function(){var t,e,r,n,i;if(t=this.model.tile_source.attribution,h.isString(t)&&t.length>0)return null==this.attributionEl&&(i=this.plot_model.canvas._right.value-this.plot_model.frame._right.value,e=this.plot_model.frame._bottom.value,r=this.map_frame._width.value,this.attributionEl=c.div({\"class\":\"bk-tile-attribution\",style:{position:\"absolute\",bottom:e+\"px\",right:i+\"px\",\"max-width\":r+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}}),n=this.plot_view.canvas_view.events_el,n.appendChild(this.attributionEl)),this.attributionEl.innerHTML=t},e.prototype._map_data=function(){var t,e;return this.initial_extent=this.get_extent(),e=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),t=this.model.tile_source.snap_to_zoom(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,e),this.x_range.start=t[0],this.y_range.start=t[1],this.x_range.end=t[2],this.y_range.end=t[3],this._add_attribution()},e.prototype._on_tile_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.current=!0,e.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.loaded=!0,e.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){var e;return e=t.target.tile_data,e.finished=!0},e.prototype._create_tile=function(t,e,r,n,i){var o,s,a;return null==i&&(i=!1),o=this.model.tile_source.normalize_xyz(t,e,r),a=this.pool.pop(),i?a.onload=this._on_tile_cache_load:a.onload=this._on_tile_load,a.onerror=this._on_tile_error,a.alt=\"\",a.tile_data={tile_coords:[t,e,r],normalized_coords:o,quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,r),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,r),bounds:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[3]},this.model.tile_source.tiles[a.tile_data.cache_key]=a.tile_data,a.src=(s=this.model.tile_source).get_image_url.apply(s,o),this._tiles.push(a),a},e.prototype._enforce_aspect_ratio=function(){var t,e,r;return(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value)&&(t=this.get_extent(),r=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom(t,this.map_frame._height.value,this.map_frame._width.value,r),this.x_range.setv({start:e[0],end:e[2]}),this.y_range.setv({start:e[1],end:e[3]}),this.extent=e,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0)},e.prototype.has_finished=function(){var t,r,n,i;if(!e.__super__.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(n=this._tiles,t=0,r=n.length;t<r;t++)if(i=n[t],!i.tile_data.finished)return!1;return!0},e.prototype.render=function(t,e,r){if(null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),!this._enforce_aspect_ratio())return this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles,500),this.has_finished()?this.notify_finished():void 0},e.prototype._draw_tile=function(t){var e,r,n,i,o,s,a,l,u,c,_;if(_=this.model.tile_source.tiles[t],null!=_)return e=this.plot_view.frame.map_to_screen([_.bounds[0]],[_.bounds[3]],this.plot_view.canvas),a=e[0],c=e[1],r=this.plot_view.frame.map_to_screen([_.bounds[2]],[_.bounds[1]],this.plot_view.canvas),s=r[0],u=r[1],a=a[0],c=c[0],s=s[0],u=u[0],i=s-a,n=u-c,o=a,l=c,this.map_canvas.drawImage(_.img,o,l,i,n)},e.prototype._set_rect=function(){var t,e,r,n,i;return r=this.plot_model.plot.properties.outline_line_width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame._left.value)+r/2,n=this.plot_view.canvas.vy_to_sy(this.map_frame._top.value)+r/2,i=this.map_frame._width.value-r,t=this.map_frame._height.value-r,this.map_canvas.rect(e,n,i,t),this.map_canvas.clip()},e.prototype._render_tiles=function(t){var e,r,n;for(this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha,e=0,r=t.length;e<r;e++)n=t[e],this._draw_tile(n);return this.map_canvas.restore()},e.prototype._prefetch_tiles=function(){var t,e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g;for(p=this.model.tile_source,a=this.get_extent(),l=this.map_frame._height.value,f=this.map_frame._width.value,g=this.model.tile_source.get_level_by_extent(a,l,f),d=this.model.tile_source.get_tiles_by_extent(a,g),_=[],h=u=0,c=Math.min(10,d.length);u<=c;h=u+=1)y=h[0],m=h[1],v=h[2],t=h[3],n=this.model.tile_source.children_by_tile_xyz(y,m,v),_.push(function(){var t,a,l;for(l=[],t=0,a=n.length;t<a;t++)e=n[t],i=e[0],o=e[1],s=e[2],r=e[3],p.tile_xyz_to_key(i,o,s)in p.tiles||l.push(this._create_tile(i,o,s,r,!0));return l}.call(this));return _},e.prototype._fetch_tiles=function(t){var e,r,n,i,o,s,a,l;for(i=[],r=0,n=t.length;r<n;r++)o=t[r],s=o[0],a=o[1],l=o[2],e=o[3],i.push(this._create_tile(s,a,l,e));return i},e.prototype._update=function(){var t,e,r,n,i,o,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F,I,B,R;for(z=this.model.tile_source,b=z.min_zoom,g=z.max_zoom,z.update(),c=this.get_extent(),R=this.extent[2]-this.extent[0]<c[2]-c[0],_=this.map_frame._height.value,N=this.map_frame._width.value,B=z.get_level_by_extent(c,_,N),A=!1,B<b?(c=this.extent,B=b,A=!0):B>g&&(c=this.extent,B=g,A=!0),A&&(this.x_range.setv({x_range:{start:c[0],end:c[2]}}),this.y_range.setv({start:c[1],end:c[3]}),this.extent=c),this.extent=c,C=z.get_tiles_by_extent(c,B),M=[],w=[],r=[],o=[],h=0,y=C.length;h<y;h++){if(E=C[h],D=E[0],F=E[1],I=E[2],t=E[3],f=z.tile_xyz_to_key(D,F,I),j=z.tiles[f],null!=j&&j.loaded===!0)r.push(f);else if(this.model.render_parents&&(P=z.get_closest_parent_by_tile_xyz(D,F,I),S=P[0],T=P[1],O=P[2],x=z.tile_xyz_to_key(S,T,O),k=z.tiles[x],null!=k&&k.loaded&&s.call(M,x)<0&&M.push(x),R))for(o=z.children_by_tile_xyz(D,F,I),p=0,m=o.length;p<m;p++)e=o[p],a=e[0],l=e[1],u=e[2],n=e[3],i=z.tile_xyz_to_key(a,l,u),i in z.tiles&&o.push(i);null==j&&w.push(E)}for(this._render_tiles(M),this._render_tiles(o),this._render_tiles(r),d=0,v=r.length;d<v;d++)E=r[d],z.tiles[E].current=!0;return null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout(function(t){return function(){return t._fetch_tiles(w)}}(this),65)},e}(u.RendererView),r.TileRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.TileRendererView,e.prototype.type=\"TileRenderer\",e.define({alpha:[_.Number,1],x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"],tile_source:[_.Instance,function(){return new l.WMTSTileSource}],render_parents:[_.Bool,!0]}),e.override({level:\"underlay\"}),e}(u.Renderer)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(194),s=t(201),a=t(13),l=t(14),u=t(49);r.TileSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.utils=new s.ProjectionUtils,this.pool=new o.ImagePool,this.tiles={},this.normalize_case()}return n(e,t),e.prototype.type=\"TileSource\",e.define({url:[l.String,\"\"],tile_size:[l.Number,256],max_zoom:[l.Number,30],min_zoom:[l.Number,0],extra_url_vars:[l.Any,{}],attribution:[l.String,\"\"],x_origin_offset:[l.Number],y_origin_offset:[l.Number],initial_resolution:[l.Number]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.normalize_case()},e.prototype.string_lookup_replace=function(t,e){var r,n,i;n=t;for(r in e)i=e[r],n=n.replace(\"{\"+r+\"}\",i.toString());return n},e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{x}\",\"{X}\"),t=t.replace(\"{y}\",\"{Y}\"),t=t.replace(\"{z}\",\"{Z}\"),t=t.replace(\"{q}\",\"{Q}\"),t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),this.url=t},e.prototype.update=function(){var t,e,r,n;a.logger.debug(\"TileSource: tile cache count: \"+Object.keys(this.tiles).length),e=this.tiles,r=[];for(t in e)n=e[t],n.current=!1,r.push(n.retain=!1);return r},e.prototype.tile_xyz_to_key=function(t,e,r){var n;return n=t+\":\"+e+\":\"+r},e.prototype.key_to_tile_xyz=function(t){var e;return function(){var r,n,i,o;for(i=t.split(\":\"),o=[],r=0,n=i.length;r<n;r++)e=i[r],o.push(parseInt(e));return o}()},e.prototype.sort_tiles_from_center=function(t,e){var r,n,i,o,s,a;return o=e[0],a=e[1],i=e[2],s=e[3],r=(i-o)/2+o,n=(s-a)/2+a,t.sort(function(t,e){var i,o;return i=Math.sqrt(Math.pow(r-t[0],2)+Math.pow(n-t[1],2)),o=Math.sqrt(Math.pow(r-e[0],2)+Math.pow(n-e[1],2)),i-o}),t},e.prototype.prune_tiles=function(){var t,e,r,n,i;e=this.tiles;for(t in e)i=e[t],i.retain=i.current||i.tile_coords[2]<3,i.current&&(this.retain_neighbors(i),this.retain_children(i),this.retain_parents(i));r=this.tiles,n=[];for(t in r)i=r[t],i.retain?n.push(void 0):n.push(this.remove_tile(t));return n},e.prototype.remove_tile=function(t){var e;if(e=this.tiles[t],null!=e)return this.pool.push(e.img),delete this.tiles[t]},e.prototype.get_image_url=function(t,e,r){var n;return n=this.string_lookup_replace(this.url,this.extra_url_vars),n.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e.prototype.retain_neighbors=function(t){throw new Error(\"Not Implemented\")},e.prototype.retain_parents=function(t){throw new Error(\"Not Implemented\")},e.prototype.retain_children=function(t){throw new Error(\"Not Implemented\")},e.prototype.tile_xyz_to_quadkey=function(t,e,r){throw new Error(\"Not Implemented\")},e.prototype.quadkey_to_tile_xyz=function(t){throw new Error(\"Not Implemented\")},e}(u.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(30);r.ProjectionUtils=function(){function t(){this.origin_shift=2*Math.PI*6378137/2}return t.prototype.geographic_to_meters=function(t,e){return n.proj4(n.wgs84,n.mercator,[t,e])},t.prototype.meters_to_geographic=function(t,e){return n.proj4(n.mercator,n.wgs84,[t,e])},t.prototype.geographic_extent_to_meters=function(t){var e,r,n,i,o,s;return i=t[0],s=t[1],n=t[2],o=t[3],e=this.geographic_to_meters(i,s),i=e[0],s=e[1],r=this.geographic_to_meters(n,o),n=r[0],o=r[1],[i,s,n,o]},t.prototype.meters_extent_to_geographic=function(t){var e,r,n,i,o,s;return i=t[0],s=t[1],n=t[2],o=t[3],e=this.meters_to_geographic(i,s),i=e[0],s=e[1],r=this.meters_to_geographic(n,o),n=r[0],o=r[1],[i,s,n,o]},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197);r.TMSTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"TMSTileSource\",\n",
" e.prototype.get_image_url=function(t,e,r){var n;return n=this.string_lookup_replace(this.url,this.extra_url_vars),n.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197);r.WMTSTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"WMTSTileSource\",e.prototype.get_image_url=function(t,e,r){var n,i;return n=this.string_lookup_replace(this.url,this.extra_url_vars),i=this.tms_to_wmts(t,e,r),t=i[0],e=i[1],r=i[2],n.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(212),s=t(19);r.ActionToolButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._clicked=function(){return this.model[\"do\"].emit()},e}(o.ButtonToolButtonView),r.ActionToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model[\"do\"],function(){return this.doit()})},e}(o.ButtonToolView),r.ActionTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this[\"do\"]=new s.Signal(this,\"do\")},e}(o.ButtonTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204),s=t(14);r.HelpToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.doit=function(){return window.open(this.model.redirect)},e}(o.ActionToolView),r.HelpTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.HelpToolView,e.prototype.type=\"HelpTool\",e.prototype.tool_name=\"Help\",e.prototype.icon=\"bk-tool-icon-help\",e.define({help_tooltip:[s.String,\"Click the question mark to learn more about Bokeh plot tools.\"],redirect:[s.String,\"https://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#built-in-tools\"]}),e.getters({tooltip:function(){return this.help_tooltip}}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204);r.RedoToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.plot_view.state_changed,function(t){return function(){return t.model.disabled=!t.plot_view.can_redo()}}(this))},e.prototype.doit=function(){return this.plot_view.redo()},e}(o.ActionToolView),r.RedoTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.RedoToolView,e.prototype.type=\"RedoTool\",e.prototype.tool_name=\"Redo\",e.prototype.icon=\"bk-tool-icon-redo\",e.override({disabled:!0}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204),s=t(3),a=t(14);r.ResetToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.doit=function(){return this.plot_view.clear_state(),this.plot_view.reset_range(),this.plot_view.reset_selection(),this.plot_model.plot.trigger_event(new s.Reset)},e}(o.ActionToolView),r.ResetTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ResetToolView,e.prototype.type=\"ResetTool\",e.prototype.tool_name=\"Reset\",e.prototype.icon=\"bk-tool-icon-reset\",e.define({reset_size:[a.Bool,!0]}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204);r.SaveToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.doit=function(){return this.plot_view.save(\"bokeh_plot\")},e}(o.ActionToolView),r.SaveTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.SaveToolView,e.prototype.type=\"SaveTool\",e.prototype.tool_name=\"Save\",e.prototype.icon=\"bk-tool-icon-save\",e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204);r.UndoToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.plot_view.state_changed,function(t){return function(){return t.model.disabled=!t.plot_view.can_undo()}}(this))},e.prototype.doit=function(){return this.plot_view.undo()},e}(o.ActionToolView),r.UndoTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.UndoToolView,e.prototype.type=\"UndoTool\",e.prototype.tool_name=\"Undo\",e.prototype.icon=\"bk-tool-icon-undo\",e.override({disabled:!0}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204),s=t(43),a=t(14);r.ZoomInToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.doit=function(){var t,e,r,n,i;return e=this.plot_model.frame,t=this.model.dimensions,r=\"width\"===t||\"both\"===t,n=\"height\"===t||\"both\"===t,i=s.scale_range(e,this.model.factor,r,n),this.plot_view.push_state(\"zoom_out\",{range:i}),this.plot_view.update_range(i,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(o.ActionToolView),r.ZoomInTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ZoomInToolView,e.prototype.type=\"ZoomInTool\",e.prototype.tool_name=\"Zoom In\",e.prototype.icon=\"bk-tool-icon-zoom-in\",e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({factor:[a.Percent,.1],dimensions:[a.Dimensions,\"both\"]}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(204),s=t(43),a=t(14);r.ZoomOutToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.doit=function(){var t,e,r,n,i;return e=this.plot_model.frame,t=this.model.dimensions,r=\"width\"===t||\"both\"===t,n=\"height\"===t||\"both\"===t,i=s.scale_range(e,-this.model.factor,r,n),this.plot_view.push_state(\"zoom_out\",{range:i}),this.plot_view.update_range(i,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(o.ActionToolView),r.ZoomOutTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.ZoomOutToolView,e.prototype.type=\"ZoomOutTool\",e.prototype.tool_name=\"Zoom Out\",e.prototype.icon=\"bk-tool-icon-zoom-out\",e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({factor:[a.Percent,.1],dimensions:[a.Dimensions,\"both\"]}),e}(o.ActionTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(6),s=t(228),a=t(5),l=t(14);r.ButtonToolButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-toolbar-button\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.change,function(t){return function(){return t.render()}}(this)),this.el.addEventListener(\"click\",function(t){return function(e){return t._clicked(e)}}(this)),this.render()},e.prototype.render=function(){var t,e;return a.empty(this.el),this.el.disabled=this.model.disabled,t=a.div({\"class\":[\"bk-btn-icon\",this.model.icon]}),e=a.span({\"class\":\"bk-tip\"},this.model.tooltip),this.el.appendChild(t),this.el.appendChild(e)},e.prototype._clicked=function(t){},e}(o.DOMView),r.ButtonToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(s.ToolView),r.ButtonTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.icon=null,e.getters({tooltip:function(){return this.tool_name}}),e.internal({disabled:[l.Boolean,!1]}),e}(s.Tool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(219),a=t(54),l=t(14);r.BoxSelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,r,n,i,o,s,a,l,u;return r=this.plot_view.canvas,n=[r.sx_to_vx(t.bokeh.sx),r.sy_to_vy(t.bokeh.sy)],o=this.plot_model.frame,i=this.model.dimensions,s=this.model._get_dim_limits(this._baseboint,n,o,i),l=s[0],u=s[1],this.model.overlay.update({left:l[0],right:l[1],top:u[1],bottom:u[0]}),this.model.select_every_mousemove&&(e=null!=(a=t.srcEvent.shiftKey)&&a,this._do_select(l,u,!1,e)),null},e.prototype._pan_end=function(t){var e,r,n,i,o,s,a,l,u;return r=this.plot_view.canvas,n=[r.sx_to_vx(t.bokeh.sx),r.sy_to_vy(t.bokeh.sy)],o=this.plot_model.frame,i=this.model.dimensions,s=this.model._get_dim_limits(this._baseboint,n,o,i),l=s[0],u=s[1],e=null!=(a=t.srcEvent.shiftKey)&&a,this._do_select(l,u,!0,e),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,this.plot_view.push_state(\"box_select\",{selection:this.plot_view.get_selection()}),null},e.prototype._do_select=function(t,e,r,n){var i,o,s,a,l;return o=t[0],s=t[1],a=e[0],l=e[1],null==n&&(n=!1),i={type:\"rect\",vx0:o,vx1:s,vy0:a,vy1:l},this._select(i,r,n)},e.prototype._emit_callback=function(t){var e,r,n,i,o;n=this.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx0=e.vx_to_sx(t.vx0),t.sx1=e.vx_to_sx(t.vx1),t.sy0=e.vy_to_sy(t.vy0),t.sy1=e.vy_to_sy(t.vy1),i=r.xscales[n.x_range_name],o=r.yscales[n.y_range_name],t.x0=i.invert(t.vx0),t.x1=i.invert(t.vx1),t.y0=o.invert(t.vy0),t.y1=o.invert(t.vy1),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),n=function(){return new a.BoxAnnotation({level:\"overlay\",render_mode:\"css\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},r.BoxSelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BoxSelectToolView,e.prototype.type=\"BoxSelectTool\",e.prototype.tool_name=\"Box Select\",e.prototype.icon=\"bk-tool-icon-box-select\",e.prototype.event_type=\"pan\",e.prototype.default_order=30,e.define({dimensions:[l.Dimensions,\"both\"],select_every_mousemove:[l.Bool,!1],callback:[l.Instance],overlay:[l.Instance,n]}),e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e}(s.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(215),a=t(54),l=t(14);r.BoxZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._match_aspect=function(t,e,r){var n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b;return s=r.h_range.end,a=r.h_range.start,d=r.v_range.end,y=r.v_range.start,v=s-a,o=d-y,n=v/o,m=Math.abs(t[0]-e[0]),f=Math.abs(t[1]-e[1]),p=0===f?0:m/f,p>=n?(u=[1,p/n],g=u[0],b=u[1]):(c=[n/p,1],g=c[0],b=c[1]),t[0]<=e[0]?(l=t[0],_=t[0]+m*g,_>s&&(_=s)):(_=t[0],l=t[0]-m*g,l<a&&(l=a)),m=Math.abs(_-l),t[1]<=e[1]?(i=t[1],h=t[1]+m/n,h>d&&(h=d)):(h=t[1],i=t[1]-m/n,i<y&&(i=y)),f=Math.abs(h-i),t[0]<=e[0]?_=t[0]+n*f:l=t[0]-n*f,[[l,_],[i,h]]},e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,r,n,i,o,s,a,l;return e=this.plot_view.canvas,r=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],i=this.plot_model.frame,n=this.model.dimensions,this.model.match_aspect&&\"both\"===n?(o=this._match_aspect(this._baseboint,r,i),a=o[0],l=o[1]):(s=this.model._get_dim_limits(this._baseboint,r,i,n),a=s[0],l=s[1]),this.model.overlay.update({left:a[0],right:a[1],top:l[1],bottom:l[0]}),null},e.prototype._pan_end=function(t){var e,r,n,i,o,s,a,l;return e=this.plot_view.canvas,r=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],i=this.plot_model.frame,n=this.model.dimensions,this.model.match_aspect&&\"both\"===n?(o=this._match_aspect(this._baseboint,r,i),a=o[0],l=o[1]):(s=this.model._get_dim_limits(this._baseboint,r,i,n),a=s[0],l=s[1]),this._update(a,l),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,null},e.prototype._update=function(t,e){var r,n,i,o,s,a,l,u,c,_,h;if(!(Math.abs(t[1]-t[0])<=5||Math.abs(e[1]-e[0])<=5)){c={},i=this.plot_view.frame.xscales;for(n in i)l=i[n],o=l.v_invert(t),u=o[0],r=o[1],c[n]={start:u,end:r};_={},s=this.plot_view.frame.yscales;for(n in s)l=s[n],a=l.v_invert(e),u=a[0],r=a[1],_[n]={start:u,end:r};return h={xrs:c,yrs:_},this.plot_view.push_state(\"box_zoom\",{range:h}),this.plot_view.update_range(h)}},e}(s.GestureToolView),n=function(){return new a.BoxAnnotation({level:\"overlay\",render_mode:\"css\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},r.BoxZoomTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BoxZoomToolView,e.prototype.type=\"BoxZoomTool\",e.prototype.tool_name=\"Box Zoom\",e.prototype.icon=\"bk-tool-icon-box-zoom\",e.prototype.event_type=\"pan\",e.prototype.default_order=20,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"],overlay:[l.Instance,n],match_aspect:[l.Bool,!1]}),e}(s.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(212);r.GestureToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(o.ButtonToolView),r.GestureTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.event_type=null,e.prototype.default_order=null,e}(o.ButtonTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(219),a=t(61),l=t(14);r.LassoSelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data=null},e.prototype._active_change=function(){if(!this.model.active)return this._clear_overlay()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_overlay()},e.prototype._pan_start=function(t){var e,r,n;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),n=e.sy_to_vy(t.bokeh.sy),this.data={vx:[r],vy:[n]},null},e.prototype._pan=function(t){var e,r,n,i,o,s,a,l;if(r=this.plot_view.canvas,a=r.sx_to_vx(t.bokeh.sx),l=r.sy_to_vy(t.bokeh.sy),n=this.plot_model.frame.h_range,s=this.plot_model.frame.v_range,a>n.end&&(a=n.end),a<n.start&&(a=n.start),l>s.end&&(l=s.end),l<s.start&&(l=s.start),this.data.vx.push(a),this.data.vy.push(l),i=this.model.overlay,i.update({xs:this.data.vx,ys:this.data.vy}),this.model.select_every_mousemove)return e=null!=(o=t.srcEvent.shiftKey)&&o,this._do_select(this.data.vx,this.data.vy,!1,e)},e.prototype._pan_end=function(t){var e,r;return this._clear_overlay(),e=null!=(r=t.srcEvent.shiftKey)&&r,this._do_select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state(\"lasso_select\",{selection:this.plot_view.get_selection()})},e.prototype._clear_overlay=function(){return this.model.overlay.update({xs:[],ys:[]})},e.prototype._do_select=function(t,e,r,n){var i;return i={type:\"poly\",vx:t,vy:e},this._select(i,r,n)},e.prototype._emit_callback=function(t){var e,r,n,i,o;n=this.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx=e.v_vx_to_sx(t.vx),t.sy=e.v_vy_to_sy(t.vy),i=r.xscales[n.x_range_name],o=r.yscales[n.y_range_name],t.x=i.v_invert(t.vx),t.y=o.v_invert(t.vy),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),n=function(){return new a.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},r.LassoSelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.LassoSelectToolView,e.prototype.type=\"LassoSelectTool\",e.prototype.tool_name=\"Lasso Select\",e.prototype.icon=\"bk-tool-icon-lasso-select\",e.prototype.event_type=\"pan\",e.prototype.default_order=12,e.define({select_every_mousemove:[l.Bool,!0],callback:[l.Instance],overlay:[l.Instance,n]}),e}(s.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(215),s=t(14);r.PanToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._pan_start=function(t){var e,r,n,i,o,s;return this.last_dx=0,this.last_dy=0,e=this.plot_view.canvas,r=this.plot_view.frame,o=e.sx_to_vx(t.bokeh.sx),s=e.sy_to_vy(t.bokeh.sy),r.contains(o,s)||(n=r.h_range,i=r.v_range,(o<n.start||o>n.end)&&(this.v_axis_only=!0),(s<i.start||s>i.end)&&(this.h_axis_only=!0)),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan=function(t){return this._update(t.deltaX,-t.deltaY),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan_end=function(t){if(this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info)return this.plot_view.push_state(\"pan\",{range:this.pan_info})},e.prototype._update=function(t,e){var r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;i=this.plot_view.frame,l=t-this.last_dx,u=e-this.last_dy,o=i.h_range,w=o.start-l,b=o.end-l,T=i.v_range,S=T.start-u,M=T.end-u,r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||this.v_axis_only?(v=o.start,g=o.end,f=0):(v=w,g=b,f=-l),\"height\"!==r&&\"both\"!==r||this.h_axis_only?(x=T.start,k=T.end,y=0):(x=S,k=M,y=u),this.last_dx=t,this.last_dy=e,O={},c=i.xscales;for(a in c)d=c[a],_=d.v_invert([v,g]),m=_[0],n=_[1],O[a]={start:m,end:n};P={},h=i.yscales;for(a in h)d=h[a],p=d.v_invert([x,k]),m=p[0],n=p[1],P[a]={start:m,end:n};return this.pan_info={xrs:O,yrs:P,sdx:f,sdy:y},this.plot_view.update_range(this.pan_info,s=!0),null},e}(o.GestureToolView),r.PanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.PanToolView,e.prototype.type=\"PanTool\",e.prototype.tool_name=\"Pan\",e.prototype.event_type=\"pan\",e.prototype.default_order=10,e.define({dimensions:[s.Dimensions,\"both\"]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},icon:function(){var t;return t=function(){switch(this.dimensions){case\"both\":return\"pan\";case\"width\":return\"xpan\";case\"height\":return\"ypan\"}}.call(this),\"bk-tool-icon-\"+t}}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(219),a=t(61),l=t(14),u=t(21);r.PolySelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data={vx:[],vy:[]}},e.prototype._active_change=function(){if(!this.model.active)return this._clear_data()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_data()},e.prototype._doubletap=function(t){var e,r;return e=null!=(r=t.srcEvent.shiftKey)&&r,this._do_select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()},e.prototype._clear_data=function(){return this.data={vx:[],vy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e,r,n;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),n=e.sy_to_vy(t.bokeh.sy),this.data.vx.push(r),this.data.vy.push(n),this.model.overlay.update({xs:u.copy(this.data.vx),ys:u.copy(this.data.vy)})},e.prototype._do_select=function(t,e,r,n){var i;return i={type:\"poly\",vx:t,vy:e},this._select(i,r,n)},e.prototype._emit_callback=function(t){var e,r,n,i,o;n=this.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx=e.v_vx_to_sx(t.vx),t.sy=e.v_vx_to_sx(t.vy),i=r.xscales[n.x_range_name],o=r.yscales[n.y_range_name],t.x=i.v_invert(t.vx),t.y=i.v_invert(t.vy),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),n=function(){return new a.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},r.PolySelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.PolySelectToolView,e.prototype.type=\"PolySelectTool\",e.prototype.tool_name=\"Poly Select\",e.prototype.icon=\"bk-tool-icon-polygon-select\",e.prototype.event_type=\"tap\",e.prototype.default_order=11,e.define({callback:[l.Instance],overlay:[l.Instance,n]}),e}(s.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(215),s=t(158),a=t(159),l=t(13),u=t(14),c=t(29),_=t(3);r.SelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.getters({computed_renderers:function(){var t,e,r,n;return n=this.model.renderers,e=this.model.names,0===n.length&&(t=this.plot_model.plot.renderers,n=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],(r instanceof s.GlyphRenderer||r instanceof a.GraphRenderer)&&i.push(r);return i}()),e.length>0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t<i;t++)r=n[t],e.indexOf(r.name)>=0&&o.push(r);return o}()),n}}),e.prototype._computed_renderers_by_data_source=function(){var t,e,r,n,i,o;for(i={},n=this.computed_renderers,t=0,e=n.length;t<e;t++)r=n[t],r instanceof a.GraphRenderer?o=r.node_renderer.data_source.id:r instanceof s.GlyphRenderer&&(o=r.data_source.id),o in i?i[o]=i[o].concat([r]):i[o]=[r];return i},e.prototype._keyup=function(t){var e,r,n,i,o,s,a;if(27===t.keyCode){for(o=this.computed_renderers,s=[],r=0,n=o.length;r<n;r++)i=o[r],e=i.data_source,a=e.selection_manager,s.push(a.clear());return s}},e.prototype._select=function(t,e,r){var n,i,o,s,a,l;a=this._computed_renderers_by_data_source();for(n in a)s=a[n],l=s[0].get_selection_manager(),o=function(){var t,e,r;for(r=[],t=0,e=s.length;t<e;t++)i=s[t],r.push(this.plot_view.renderer_views[i.id]);return r}.call(this),l.select(o,t,e,r);return null!=this.model.callback&&this._emit_callback(t),this._emit_selection_event(t,e),null},e.prototype._emit_selection_event=function(t,e){var r,n,i,o,s,a;switch(null==e&&(e=!0),r=c.clone(t),s=this.plot_view.frame.xscales[\"default\"],a=this.plot_view.frame.yscales[\"default\"],r.type){case\"point\":r.x=s.invert(r.vx),r.y=a.invert(r.vy);break;case\"rect\":r.x0=s.invert(r.vx0),r.y0=a.invert(r.vy0),r.x1=s.invert(r.vx1),r.y1=a.invert(r.vy1);break;case\"poly\":for(r.x=new Array(r.vx.length),r.y=new Array(r.vy.length),n=i=0,o=r.vx.length;0<=o?i<o:i>o;n=0<=o?++i:--i)r.x[n]=s.invert(r.vx[n]),r.y[n]=a.invert(r.vy[n]);break;default:l.logger.debug(\"Unrecognized selection geometry type: '\"+r.type+\"'\")}return this.plot_model.plot.trigger_event(new _.SelectionGeometry({geometry:r,\"final\":e}))},e}(o.GestureToolView),r.SelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({renderers:[u.Array,[]],names:[u.Array,[]]}),e.internal({multi_select_modifier:[u.String,\"shift\"]}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(219),s=t(14),a=t(41);r.TapToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._tap=function(t){var e,r,n,i,o;return r=this.plot_view.canvas,i=r.sx_to_vx(t.bokeh.sx),o=r.sy_to_vy(t.bokeh.sy),e=null!=(n=t.srcEvent.shiftKey)&&n,this._select(i,o,!0,e)},e.prototype._select=function(t,e,r,n){var i,o,s,l,u,c,_,h,p,d,f,y,m;if(u={type:\"point\",vx:t,vy:e},o=this.model.callback,s={geometries:u},\"select\"===this.model.behavior){y=this._computed_renderers_by_data_source();for(i in y)f=y[i],m=f[0].get_selection_manager(),p=function(){var t,e,r;for(r=[],t=0,e=f.length;t<e;t++)h=f[t],r.push(this.plot_view.renderer_views[h.id]);return r}.call(this),l=m.select(p,u,r,n),l&&null!=o&&(s.source=m.source,a.isFunction(o)?o(this,s):o.execute(this,s));this._emit_selection_event(u),this.plot_view.push_state(\"tap\",{selection:this.plot_view.get_selection()})}else for(d=this.computed_renderers,c=0,_=d.length;c<_;c++)h=d[c],m=h.get_selection_manager(),l=m.inspect(this.plot_view.renderer_views[h.id],u),l&&null!=o&&(s.source=m.source,a.isFunction(o)?o(this,s):o.execute(this,s));return null},e}(o.SelectToolView),r.TapTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.TapToolView,e.prototype.type=\"TapTool\",e.prototype.tool_name=\"Tap\",e.prototype.icon=\"bk-tool-icon-tap-select\",e.prototype.event_type=\"tap\",e.prototype.default_order=10,e.define({behavior:[s.String,\"select\"],callback:[s.Any]}),e}(o.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(215),s=t(14);r.WheelPanToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._scroll=function(t){var e;return e=this.model.speed*t.bokeh.delta,e>.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T;switch(r=this.plot_model.frame,n=r.h_range,v=r.v_range,s=[n.start,n.end],b=s[0],g=s[1],a=[v.start,v.end],k=a[0],x=a[1],this.model.dimension){case\"height\":M=Math.abs(x-k),d=b,f=g,y=k+M*t,m=x+M*t;break;case\"width\":w=Math.abs(g-b),d=b-w*t,f=g-w*t,y=k,m=x}S={},l=r.xscales;for(i in l)h=l[i],u=h.v_invert([d,f]),p=u[0],e=u[1],S[i]={start:p,end:e};T={},c=r.yscales;for(i in c)h=c[i],_=h.v_invert([y,m]),p=_[0],e=_[1],T[i]={start:p,end:e};return o={xrs:S,yrs:T,factor:t},this.plot_view.push_state(\"wheel_pan\",{range:o}),this.plot_view.update_range(o,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(o.GestureToolView),r.WheelPanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"WheelPanTool\",e.prototype.default_view=r.WheelPanToolView,e.prototype.tool_name=\"Wheel Pan\",e.prototype.icon=\"bk-tool-icon-wheel-pan\",e.prototype.event_type=\"scroll\",e.prototype.default_order=12,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}),e.define({dimension:[s.Dimension,\"width\"]}),e.internal({speed:[s.Number,.001]}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(215),a=t(43),l=t(14);\"undefined\"!=typeof n&&null!==n||(n={}),r.WheelZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pinch=function(t){var e;return e=t.scale>=1?20*(t.scale-1):-20/t.scale,t.bokeh.delta=e,this._scroll(t)},e.prototype._scroll=function(t){var e,r,n,i,o,s,l,u,c,_;return n=this.plot_model.frame,o=n.h_range,l=n.v_range,u=this.plot_view.canvas.sx_to_vx(t.bokeh.sx),c=this.plot_view.canvas.sy_to_vy(t.bokeh.sy),e=this.model.dimensions,i=(\"width\"===e||\"both\"===e)&&o.min<u&&u<o.max,s=(\"height\"===e||\"both\"===e)&&l.min<c&&c<l.max,r=this.model.speed*t.bokeh.delta,_=a.scale_range(n,r,i,s,{x:u,y:c}),this.plot_view.push_state(\"wheel_zoom\",{range:_}),this.plot_view.update_range(_,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(s.GestureToolView),r.WheelZoomTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.WheelZoomToolView,\n",
" e.prototype.type=\"WheelZoomTool\",e.prototype.tool_name=\"Wheel Zoom\",e.prototype.icon=\"bk-tool-icon-wheel-zoom\",e.prototype.event_type=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",e.prototype.default_order=10,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"]}),e.internal({speed:[l.Number,1/600]}),e}(s.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(204);r.ActionTool=n.ActionTool;var i=t(205);r.HelpTool=i.HelpTool;var o=t(206);r.RedoTool=o.RedoTool;var s=t(207);r.ResetTool=s.ResetTool;var a=t(208);r.SaveTool=a.SaveTool;var l=t(209);r.UndoTool=l.UndoTool;var u=t(210);r.ZoomInTool=u.ZoomInTool;var c=t(211);r.ZoomOutTool=c.ZoomOutTool;var _=t(212);r.ButtonTool=_.ButtonTool;var h=t(213);r.BoxSelectTool=h.BoxSelectTool;var p=t(214);r.BoxZoomTool=p.BoxZoomTool;var d=t(215);r.GestureTool=d.GestureTool;var f=t(216);r.LassoSelectTool=f.LassoSelectTool;var y=t(217);r.PanTool=y.PanTool;var m=t(218);r.PolySelectTool=m.PolySelectTool;var v=t(219);r.SelectTool=v.SelectTool;var g=t(220);r.TapTool=g.TapTool;var b=t(221);r.WheelPanTool=b.WheelPanTool;var w=t(222);r.WheelZoomTool=w.WheelZoomTool;var x=t(224);r.CrosshairTool=x.CrosshairTool;var k=t(225);r.HoverTool=k.HoverTool;var M=t(226);r.InspectTool=M.InspectTool;var S=t(228);r.Tool=S.Tool;var T=t(229);r.ToolProxy=T.ToolProxy;var O=t(230);r.Toolbar=O.Toolbar;var P=t(231);r.ToolbarBase=P.ToolbarBase;var A=t(232);r.ToolbarBoxToolbar=A.ToolbarBoxToolbar;var E=t(232);r.ToolbarBox=E.ToolbarBox},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(226),s=t(62),a=t(14),l=t(29);r.CrosshairToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._move=function(t){var e,r,n,i;if(this.model.active)return r=this.plot_model.frame,e=this.plot_model.canvas,n=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),r.contains(n,i)||(n=i=null),this._update_spans(n,i)},e.prototype._move_exit=function(t){return this._update_spans(null,null)},e.prototype._update_spans=function(t,e){var r;if(r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||(this.model.spans.width.computed_location=e),\"height\"===r||\"both\"===r)return this.model.spans.height.computed_location=t},e}(o.InspectToolView),r.CrosshairTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.default_view=r.CrosshairToolView,e.prototype.type=\"CrosshairTool\",e.prototype.tool_name=\"Crosshair\",e.prototype.icon=\"bk-tool-icon-crosshair\",e.define({dimensions:[a.Dimensions,\"both\"],line_color:[a.Color,\"black\"],line_width:[a.Number,1],line_alpha:[a.Number,1]}),e.internal({location_units:[a.SpatialUnits,\"screen\"],render_mode:[a.RenderMode,\"css\"],spans:[a.Any]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)},synthetic_renderers:function(){return l.values(this.spans)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.spans={width:new s.Span({for_hover:!0,dimension:\"width\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new s.Span({for_hover:!0,dimension:\"height\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}},e}(o.InspectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(226),a=t(65),l=t(158),u=t(159),c=t(9),_=t(38),h=t(5),p=t(14),d=t(29),f=t(41),y=t(4);n=function(t){var e,r,n,i,o;return\"#\"===t.substr(0,1)?t:(r=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),i=parseInt(r[2]),n=parseInt(r[3]),e=parseInt(r[4]),o=e|n<<8|i<<16,r[1]+\"#\"+o.toString(16))},r.HoverToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.ttviews={}},e.prototype.remove=function(){return y.remove_views(this.ttviews),e.__super__.remove.call(this)},e.prototype.connect_signals=function(){var t,r,n,i;for(e.__super__.connect_signals.call(this),i=this.computed_renderers,t=0,r=i.length;t<r;t++)n=i[t],n instanceof l.GlyphRenderer?this.connect(n.data_source.inspect,this._update):n instanceof u.GraphRenderer&&(this.connect(n.node_renderer.data_source.inspect,this._update),this.connect(n.edge_renderer.data_source.inspect,this._update));return this.connect(this.model.properties.renderers.change,function(){return this._computed_renderers=this._ttmodels=null}),this.connect(this.model.properties.names.change,function(){return this._computed_renderers=this._ttmodels=null}),this.connect(this.model.properties.tooltips.change,function(){return this._ttmodels=null})},e.prototype._compute_renderers=function(){var t,e,r,n;return n=this.model.renderers,e=this.model.names,0===n.length&&(t=this.plot_model.plot.renderers,n=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],(r instanceof l.GlyphRenderer||r instanceof u.GraphRenderer)&&i.push(r);return i}()),e.length>0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t<i;t++)r=n[t],e.indexOf(r.name)>=0&&o.push(r);return o}()),n},e.prototype._compute_ttmodels=function(){var t,e,r,n,i,o,s,c,_,h,p;if(h={},_=this.model.tooltips,null!=_)for(s=this.computed_renderers,t=0,r=s.length;t<r;t++)o=s[t],o instanceof l.GlyphRenderer?(c=new a.Tooltip({custom:f.isString(_)||f.isFunction(_),attachment:this.model.attachment,show_arrow:this.model.show_arrow}),h[o.id]=c):o instanceof u.GraphRenderer&&(c=new a.Tooltip({custom:f.isString(_)||f.isFunction(_),attachment:this.model.attachment,show_arrow:this.model.show_arrow}),h[o.node_renderer.id]=c,h[o.edge_renderer.id]=c);for(i=y.build_views(this.ttviews,d.values(h),{parent:this,plot_view:this.plot_view}),e=0,n=i.length;e<n;e++)p=i[e],p.connect_signals();return h},e.getters({computed_renderers:function(){return null==this._computed_renderers&&(this._computed_renderers=this._compute_renderers()),this._computed_renderers},ttmodels:function(){return null==this._ttmodels&&(this._ttmodels=this._compute_ttmodels()),this._ttmodels}}),e.prototype._clear=function(){var t,e,r,n;this._inspect(Infinity,Infinity),t=this.ttmodels,e=[];for(r in t)n=t[r],e.push(n.clear());return e},e.prototype._move=function(t){var e,r,n;if(this.model.active)return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),n=e.sy_to_vy(t.bokeh.sy),this.plot_view.frame.contains(r,n)?this._inspect(r,n):this._clear()},e.prototype._move_exit=function(){return this._clear()},e.prototype._inspect=function(t,e,r){var n,i,o,s,a,l;for(n={type:\"point\",vx:t,vy:e},\"mouse\"===this.model.mode?n.type=\"point\":(n.type=\"span\",\"vline\"===this.model.mode?n.direction=\"h\":n.direction=\"v\"),a=this.computed_renderers,i=0,o=a.length;i<o;i++)s=a[i],l=s.get_selection_manager(),l.inspect(this.plot_view.renderer_views[s.id],n);null!=this.model.callback&&this._emit_callback(n)},e.prototype._update=function(t){var e,r,n,i,o,s,a,u,_,h,p,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C,N,D,F,I,B,R,L,V,G,U,q,Y,X,W,H,Q,J,$,Z,K,tt,et,rt;if(G=t[0],O=t[1],f=O.geometry,this.model.active&&(Q=null!=(P=this.ttmodels[G.model.id])?P:null,null!=Q&&(Q.clear(),g=G.model.get_selection_manager().inspectors[G.model.id].indices,G.model instanceof l.GlyphRenderer&&(g=G.model.view.convert_selection_to_subset(g)),h=G.model.get_selection_manager().source,!g.is_empty()))){for($=f.vx,Z=f.vy,e=this.plot_model.canvas,p=this.plot_model.frame,W=e.vx_to_sx($),H=e.vy_to_sy(Z),tt=p.xscales[G.model.x_range_name],rt=p.yscales[G.model.y_range_name],K=tt.invert($),et=rt.invert(Z),N=g[\"0d\"].indices,x=0,M=N.length;x<M;x++){switch(y=N[x],s=G.glyph._x[y+1],a=G.glyph._y[y+1],m=y,this.model.line_policy){case\"interp\":D=G.glyph.get_interpolation_hit(y,f),s=D[0],a=D[1],U=tt.compute(s),q=rt.compute(a);break;case\"prev\":U=e.sx_to_vx(G.glyph.sx[y]),q=e.sy_to_vy(G.glyph.sy[y]);break;case\"next\":U=e.sx_to_vx(G.glyph.sx[y+1]),q=e.sy_to_vy(G.glyph.sy[y+1]),m=y+1;break;case\"nearest\":r=G.glyph.sx[y],n=G.glyph.sy[y],u=c.dist_2_pts(r,n,W,H),i=G.glyph.sx[y+1],o=G.glyph.sy[y+1],_=c.dist_2_pts(i,o,W,H),u<_?(F=[r,n],Y=F[0],X=F[1]):(I=[i,o],Y=I[0],X=I[1],m=y+1),s=G.glyph._x[y],a=G.glyph._y[y],U=e.sx_to_vx(Y),q=e.sy_to_vy(X);break;default:B=[$,Z],U=B[0],q=B[1]}J={index:m,x:K,y:et,vx:$,vy:Z,sx:W,sy:H,data_x:s,data_y:a,rx:U,ry:q},Q.add(U,q,this._render_tooltips(h,m,J))}for(R=g[\"1d\"].indices,k=0,S=R.length;k<S;k++)if(y=R[k],d.isEmpty(g[\"2d\"].indices))s=null!=(j=G.glyph._x)?j[y]:void 0,a=null!=(z=G.glyph._y)?z[y]:void 0,\"snap_to_data\"===this.model.point_policy?(T=G.glyph.get_anchor_point(this.model.anchor,y,[W,H]),null==T&&(T=G.glyph.get_anchor_point(\"center\",y,[W,H])),U=e.sx_to_vx(T.x),q=e.sy_to_vy(T.y)):(C=[$,Z],U=C[0],q=C[1]),v=G.model instanceof l.GlyphRenderer?G.model.view.convert_indices_from_subset([y])[0]:y,J={index:v,x:K,y:et,vx:$,vy:Z,sx:W,sy:H,data_x:s,data_y:a},Q.add(U,q,this._render_tooltips(h,y,J));else{L=g[\"2d\"].indices;for(y in L){switch(b=L[y][0],s=G.glyph._xs[y][b],a=G.glyph._ys[y][b],w=b,this.model.line_policy){case\"interp\":V=G.glyph.get_interpolation_hit(y,b,f),s=V[0],a=V[1],U=tt.compute(s),q=rt.compute(a);break;case\"prev\":U=e.sx_to_vx(G.glyph.sxs[y][b]),q=e.sy_to_vy(G.glyph.sys[y][b]);break;case\"next\":U=e.sx_to_vx(G.glyph.sxs[y][b+1]),q=e.sy_to_vy(G.glyph.sys[y][b+1]),w=b+1;break;case\"nearest\":r=G.glyph.sxs[y][b],n=G.glyph.sys[y][b],u=c.dist_2_pts(r,n,W,H),i=G.glyph.sxs[y][b+1],o=G.glyph.sys[y][b+1],_=c.dist_2_pts(i,o,W,H),u<_?(A=[r,n],Y=A[0],X=A[1]):(E=[i,o],Y=E[0],X=E[1],w=b+1),s=G.glyph._xs[y][b],a=G.glyph._ys[y][b],U=e.sx_to_vx(Y),q=e.sy_to_vy(X)}J={index:y,segment_index:w,x:K,y:et,vx:$,vy:Z,sx:W,sy:H,data_x:s,data_y:a},Q.add(U,q,this._render_tooltips(h,y,J))}}return null}},e.prototype._emit_callback=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p;for(c=this.computed_renderers,s=0,a=c.length;s<a;s++)u=c[s],o=u.data_source.inspected,r=this.plot_model.canvas,i=this.plot_model.frame,t.sx=r.vx_to_sx(t.vx),t.sy=r.vy_to_sy(t.vy),h=i.xscales[u.x_range_name],p=i.yscales[u.y_range_name],t.x=h.invert(t.vx),t.y=p.invert(t.vy),e=this.model.callback,_=[e,{index:o,geometry:t,renderer:u}],l=_[0],n=_[1],f.isFunction(e)?e(l,n):e.execute(l,n)},e.prototype._render_tooltips=function(t,e,r){var i,o,s,a,l,u,c,p,d,y,m,v,g,b,w,x,k,M;if(k=this.model.tooltips,f.isString(k))return l=h.div(),l.innerHTML=_.replace_placeholders(k,t,e,this.model.formatters,r),l;if(f.isFunction(k))return k(t,r);for(w=h.div({style:{display:\"table\",borderSpacing:\"2px\"}}),c=0,d=k.length;c<d;c++)if(v=k[c],p=v[0],M=v[1],b=h.div({style:{display:\"table-row\"}}),w.appendChild(b),i=h.div({style:{display:\"table-cell\"},\"class\":\"bk-tooltip-row-label\"},p+\": \"),b.appendChild(i),i=h.div({style:{display:\"table-cell\"},\"class\":\"bk-tooltip-row-value\"}),b.appendChild(i),M.indexOf(\"$color\")>=0){if(g=M.match(/\\$color(\\[.*\\])?:(\\w*)/),y=g[0],m=g[1],o=g[2],a=t.get_column(o),null==a){l=h.span({},o+\" unknown\"),i.appendChild(l);continue}if(u=(null!=m?m.indexOf(\"hex\"):void 0)>=0,x=(null!=m?m.indexOf(\"swatch\"):void 0)>=0,s=a[e],null==s){l=h.span({},\"(null)\"),i.appendChild(l);continue}u&&(s=n(s)),l=h.span({},s),i.appendChild(l),x&&(l=h.span({\"class\":\"bk-tooltip-color-block\",style:{backgroundColor:s}},\" \"),i.appendChild(l))}else M=M.replace(\"$~\",\"$data_\"),l=h.span(),l.innerHTML=_.replace_placeholders(M,t,e,this.model.formatters,r),i.appendChild(l);return w},e}(s.InspectToolView),r.HoverTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.HoverToolView,e.prototype.type=\"HoverTool\",e.prototype.tool_name=\"Hover\",e.prototype.icon=\"bk-tool-icon-hover\",e.define({tooltips:[p.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"canvas (x, y)\",\"($sx, $sy)\"]]],formatters:[p.Any,{}],renderers:[p.Array,[]],names:[p.Array,[]],mode:[p.String,\"mouse\"],point_policy:[p.String,\"snap_to_data\"],line_policy:[p.String,\"nearest\"],show_arrow:[p.Boolean,!0],anchor:[p.String,\"center\"],attachment:[p.String,\"horizontal\"],callback:[p.Any]}),e}(s.InspectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(212);r.InspectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(s.ButtonToolView),r.InspectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.event_type=\"move\",e.define({toggleable:[o.Bool,!0]}),e.override({active:!0}),e}(s.ButtonTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(212);r.OnOffButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.model.active?this.el.classList.add(\"bk-active\"):this.el.classList.remove(\"bk-active\")},e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(o.ButtonToolButtonView)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(44),a=t(21),l=t(49);r.ToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.active.change,function(t){return function(){return t.model.active?t.activate():t.deactivate()}}(this))},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(s.View),r.Tool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.getters({synthetic_renderers:function(){return[]}}),e.internal({active:[o.Boolean,!1]}),e.prototype._get_dim_tooltip=function(t,e){switch(e){case\"width\":return t+\" (x-axis)\";case\"height\":return t+\" (y-axis)\";case\"both\":return t}},e.prototype._get_dim_limits=function(t,e,r,n){var i,o,s,l,u,c,_,h;return s=t[0],c=t[1],l=e[0],_=e[1],i=r.h_range,\"width\"===n||\"both\"===n?(u=[a.min([s,l]),a.max([s,l])],u=[a.max([u[0],i.min]),a.min([u[1],i.max])]):u=[i.min,i.max],o=r.v_range,\"height\"===n||\"both\"===n?(h=[a.min([c,_]),a.max([c,_])],h=[a.max([h[0],o.min]),a.min([h[1],o.max])]):h=[o.min,o.max],[u,h]},e}(l.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(19),a=t(49);r.ToolProxy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this[\"do\"]=new s.Signal(this,\"do\"),this.connect(this[\"do\"],function(){return this.doit()}),this.connect(this.properties.active.change,function(){return this.set_active()})},e.prototype.doit=function(){var t,e,r,n;for(r=this.tools,t=0,e=r.length;t<e;t++)n=r[t],n[\"do\"].emit();return null},e.prototype.set_active=function(){var t,e,r,n;for(r=this.tools,t=0,e=r.length;t<e;t++)n=r[t],n.active=this.active;return null},e.define({tools:[o.Array,[]],active:[o.Bool,!1],tooltip:[o.String],tool_name:[o.String],disabled:[o.Bool,!1],event_type:[o.String],icon:[o.String]}),e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(a.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(14),a=t(21),l=t(204),u=t(205),c=t(215),_=t(226),h=t(231);r.Toolbar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"Toolbar\",e.prototype.default_view=h.ToolbarBaseView,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.connect(this.properties.tools.change,function(){return this._init_tools()}),this._init_tools()},e.prototype._init_tools=function(){var t,e,r,n,i,s,h;for(i=this.tools,r=0,n=i.length;r<n;r++)if(s=i[r],s instanceof _.InspectTool)a.any(this.inspectors,function(t){return function(t){return t.id===s.id}}(this))||(this.inspectors=this.inspectors.concat([s]));else if(s instanceof u.HelpTool)a.any(this.help,function(t){return function(t){return t.id===s.id}}(this))||(this.help=this.help.concat([s]));else if(s instanceof l.ActionTool)a.any(this.actions,function(t){return function(t){return t.id===s.id}}(this))||(this.actions=this.actions.concat([s]));else if(s instanceof c.GestureTool){if(e=s.event_type,!(e in this.gestures)){logger.warn(\"Toolbar: unknown event type '\"+e+\"' for tool: \"+s.type+\" (\"+s.id+\")\");continue}a.any(this.gestures[e].tools,function(t){return function(t){return t.id===s.id}}(this))||(this.gestures[e].tools=this.gestures[e].tools.concat([s])),this.connect(s.properties.active.change,this._active_change.bind(null,s))}\"auto\"===this.active_inspect||(this.active_inspect instanceof _.InspectTool?this.inspectors.map(function(t){return function(e){if(e!==t.active_inspect)return e.active=!1}}(this)):this.active_inspect instanceof Array?this.inspectors.map(function(t){return function(e){if(o.call(t.active_inspect,e)<0)return e.active=!1}}(this)):null===this.active_inspect&&this.inspectors.map(function(t){return t.active=!1})),t=function(t){return function(e){return e.active?t._active_change(e):e.active=!0}}(this);for(e in this.gestures)if(h=this.gestures[e].tools,0!==h.length){if(this.gestures[e].tools=a.sortBy(h,function(t){return t.default_order}),\"tap\"===e){if(null===this.active_tap)continue;t(\"auto\"===this.active_tap?this.gestures[e].tools[0]:this.active_tap)}if(\"pan\"===e){if(null===this.active_drag)continue;t(\"auto\"===this.active_drag?this.gestures[e].tools[0]:this.active_drag)}if(\"pinch\"===e||\"scroll\"===e){if(null===this.active_scroll||\"auto\"===this.active_scroll)continue;t(this.active_scroll)}}return null},e.define({active_drag:[s.Any,\"auto\"],active_inspect:[s.Any,\"auto\"],active_scroll:[s.Any,\"auto\"],active_tap:[s.Any,\"auto\"]}),e}(h.ToolbarBase)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=function(t,e){return function(){return t.apply(e,arguments)}},s=t(13),a=t(12),l=t(5),u=t(14),c=t(136),_=t(204),h=t(227);r.ToolbarBaseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-toolbar-wrapper\",e.prototype.template=function(){var t,e,r;return null!=this.model.logo?(t=\"grey\"===this.model.logo?\"bk-grey\":null,e=l.a({href:\"https://bokeh.pydata.org/\",target:\"_blank\",\"class\":[\"bk-logo\",\"bk-logo-small\",t]})):e=null,r=this.model.toolbar_sticky?\"sticky\":\"not-sticky\",l.div({\"class\":[\"bk-toolbar-\"+this.model.toolbar_location,\"bk-toolbar-\"+r]},e,l.div({\"class\":\"bk-button-bar\"},l.div({\"class\":\"bk-button-bar-list\",type:\"pan\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"scroll\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"pinch\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"tap\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"press\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"rotate\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"actions\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"inspectors\"}),l.div({\"class\":\"bk-button-bar-list\",type:\"help\"})))},e.prototype.render=function(){var t,e,r,n,i,o,s,a,u,c,p,d,f,y,m,v;for(l.empty(this.el),\"fixed\"!==this.model.sizing_mode&&(this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"),this.el.appendChild(this.template()),t=this.el.querySelector(\".bk-button-bar-list[type='inspectors']\"),f=this.model.inspectors,n=0,a=f.length;n<a;n++)d=f[n],d.toggleable&&t.appendChild(new h.OnOffButtonView({model:d,parent:this}).el);for(t=this.el.querySelector(\".bk-button-bar-list[type='help']\"),y=this.model.help,i=0,u=y.length;i<u;i++)d=y[i],t.appendChild(new _.ActionToolButtonView({model:d,parent:this}).el);for(t=this.el.querySelector(\".bk-button-bar-list[type='actions']\"),m=this.model.actions,o=0,c=m.length;o<c;o++)d=m[o],t.appendChild(new _.ActionToolButtonView({model:d,parent:this}).el);r=this.model.gestures;for(e in r)for(t=this.el.querySelector(\".bk-button-bar-list[type='\"+e+\"']\"),v=r[e].tools,s=0,p=v.length;s<p;s++)d=v[s],t.appendChild(new h.OnOffButtonView({model:d,parent:this}).el);return this},e}(c.LayoutDOMView),r.ToolbarBase=function(t){function e(){return this._active_change=o(this._active_change,this),e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ToolbarBase\",e.prototype.default_view=r.ToolbarBaseView,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._set_sizeable(),this.connect(this.properties.toolbar_location.change,function(t){return function(){return t._set_sizeable()}}(this))},e.prototype._set_sizeable=function(){var t,e;return t=\"left\"===(e=this.toolbar_location)||\"right\"===e,this._sizeable=t?this._width:this._height},e.prototype._active_change=function(t){var e,r;return r=t.event_type,t.active?(e=this.gestures[r].active,null!=e&&(s.logger.debug(\"Toolbar: deactivating tool: \"+e.type+\" (\"+e.id+\") for event type '\"+r+\"'\"),e.active=!1),this.gestures[r].active=t,s.logger.debug(\"Toolbar: activating tool: \"+t.type+\" (\"+t.id+\") for event type '\"+r+\"'\")):this.gestures[r].active=null,null},e.prototype.get_constraints=function(){return e.__super__.get_constraints.call(this).concat(a.EQ(this._sizeable,-30))},e.define({tools:[u.Array,[]],logo:[u.String,\"normal\"]}),e.internal({gestures:[u.Any,function(){return{pan:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},press:{tools:[],active:null},rotate:{tools:[],active:null}}}],actions:[u.Array,[]],inspectors:[u.Array,[]],help:[u.Array,[]],toolbar_location:[u.Location,\"right\"],toolbar_sticky:[u.Bool]}),e.override({sizing_mode:null}),e}(c.LayoutDOM)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(14),a=t(21),l=t(204),u=t(205),c=t(215),_=t(226),h=t(231),p=t(229),d=t(133);r.ToolbarBoxToolbar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ToolbarBoxToolbar\",e.prototype.default_view=h.ToolbarBaseView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this._init_tools(),this.merge_tools===!0)return this._merge_tools()},e.define({merge_tools:[s.Bool,!0]}),e.prototype._init_tools=function(){var t,e,r,n,i,o;for(n=this.tools,i=[],e=0,r=n.length;e<r;e++)o=n[e],o instanceof _.InspectTool?a.any(this.inspectors,function(t){return function(t){return t.id===o.id}}(this))?i.push(void 0):i.push(this.inspectors=this.inspectors.concat([o])):o instanceof u.HelpTool?a.any(this.help,function(t){return function(t){return t.id===o.id}}(this))?i.push(void 0):i.push(this.help=this.help.concat([o])):o instanceof l.ActionTool?a.any(this.actions,function(t){return function(t){return t.id===o.id}}(this))?i.push(void 0):i.push(this.actions=this.actions.concat([o])):o instanceof c.GestureTool?(t=o.event_type,a.any(this.gestures[t].tools,function(t){return function(t){return t.id===o.id}}(this))?i.push(void 0):i.push(this.gestures[t].tools=this.gestures[t].tools.concat([o]))):i.push(void 0);return i},e.prototype._merge_tools=function(){var t,e,r,n,i,s,l,u,c,_,h,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P,A,E,j,z,C;for(c={},t={},i={},b=[],w=[],k=this.help,l=0,f=k.length;l<f;l++)s=k[l],M=s.redirect,o.call(w,M)<0&&(b.push(s),w.push(s.redirect));this.help=b,S=this.gestures;for(n in S){u=S[n],n in i||(i[n]={}),T=u.tools;for(_=0,y=T.length;_<y;_++)j=T[_],j.type in i[n]||(i[n][j.type]=[]),i[n][j.type].push(j)}for(O=this.inspectors,h=0,m=O.length;h<m;h++)j=O[h],j.type in c||(c[j.type]=[]),c[j.type].push(j);for(P=this.actions,d=0,v=P.length;d<v;d++)j=P[d],j.type in t||(t[j.type]=[]),t[j.type].push(j);g=function(t,e){return null==e&&(e=!1),new p.ToolProxy({tools:t,event_type:t[0].event_type,tooltip:t[0].tool_name,tool_name:t[0].tool_name,icon:t[0].icon,active:e})};for(n in i){this.gestures[n].tools=[],A=i[n];for(z in A)C=A[z],C.length>0&&(x=g(C),this.gestures[n].tools.push(x),this.connect(x.properties.active.change,this._active_change.bind(null,x)))}this.actions=[];for(z in t)C=t[z],C.length>0&&this.actions.push(g(C));this.inspectors=[];for(z in c)C=c[z],C.length>0&&this.inspectors.push(g(C,e=!0));E=[];for(r in this.gestures)C=this.gestures[r].tools,0!==C.length&&(this.gestures[r].tools=a.sortBy(C,function(t){return t.default_order}),\"pinch\"!==r&&\"scroll\"!==r?E.push(this.gestures[r].tools[0].active=!0):E.push(void 0));return E},e}(h.ToolbarBase),r.ToolbarBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.className=\"bk-toolbar-box\",e.prototype.get_width=function(){return this.model._horizontal===!0?30:null},e.prototype.get_height=function(){return 30},e}(d.BoxView),r.ToolbarBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"ToolbarBox\",e.prototype.default_view=r.ToolbarBoxView,e.prototype.initialize=function(t){var n;return e.__super__.initialize.call(this,t),this._toolbar=new r.ToolbarBoxToolbar(t),this._horizontal=\"left\"===(n=this.toolbar_location)||\"right\"===n,this._sizeable=this._horizontal?this._width:this._height},e.prototype._doc_attached=function(){return this._toolbar.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.get_layoutable_children=function(){return[this._toolbar]},e.define({toolbar_location:[s.Location,\"right\"],merge_tools:[s.Bool,!0],tools:[s.Any,[]],logo:[s.String,\"normal\"]}),e}(d.Box)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(240),a=t(14),l=t(29);r.CustomJSTransform=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,e),i.prototype.type=\"CustomJSTransform\",i.define({args:[a.Any,{}],func:[a.String,\"\"],v_func:[a.String,\"\"]}),i.getters({values:function(){return this._make_values()},scalar_transform:function(){return this._make_transform(\"x\",this.func)},vector_transform:function(){return this._make_transform(\"xs\",this.v_func)}}),i.prototype.compute=function(e){return this.scalar_transform.apply(this,o.call(this.values).concat([e],[t],[r]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,o.call(this.values).concat([e],[t],[r]))},i.prototype._make_transform=function(t,e){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,o.call(Object.keys(this.args)).concat([t],[\"require\"],[\"exports\"],[e]),function(){})},i.prototype._make_values=function(){return l.values(this.args)},i}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14);r.Dodge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({value:[s.Number,0],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),t+this.value},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(233);r.CustomJSTransform=n.CustomJSTransform;var i=t(234);r.Dodge=i.Dodge;var o=t(236);r.Interpolator=o.Interpolator;var s=t(237);r.Jitter=s.Jitter;var a=t(238);r.LinearInterpolator=a.LinearInterpolator;var l=t(239);r.StepInterpolator=l.StepInterpolator;var u=t(240);r.Transform=u.Transform},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(240),a=t(14);r.Interpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_sorted=[],this._y_sorted=[],this._sorted_dirty=!0,this.connect(this.change,function(){return this._sorted_dirty=!0})},e.define({x:[a.Any],y:[a.Any],data:[a.Any],clip:[a.Bool,!0]}),e.prototype.sort=function(t){var e,r,n,i,s,a,l,u,c,_,h;if(null==t&&(t=!1),typeof this.x!=typeof this.y)throw new Error(\"The parameters for x and y must be of the same type, either both strings which define a column in the data source or both arrays of the same length\");if(\"string\"==typeof this.x&&null===this.data)throw new Error(\"If the x and y parameters are not specified as an array, the data parameter is reqired.\");if(this._sorted_dirty!==!1){if(_=[],h=[],\"string\"==typeof this.x){if(r=this.data,e=r.columns(),l=this.x,o.call(e,l)<0)throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");if(u=this.y,o.call(e,u)<0)throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");_=r.get_column(this.x),h=r.get_column(this.y)}else _=this.x,h=this.y;if(_.length!==h.length)throw new Error(\"The length for x and y do not match\");if(_.length<2)throw new Error(\"x and y must have at least two elements to support interpolation\");a=[];for(i in _)a.push({x:_[i],y:h[i]});for(t===!0?a.sort(function(t,e){var r,n;return null!=(r=t.x<e.x)?r:-{1:null!=(n=t.x===e.x)?n:{0:1}}}):a.sort(function(t,e){var r,n;return null!=(r=t.x>e.x)?r:-{1:null!=(n=t.x===e.x)?n:{0:1}}}),s=n=0,c=a.length;0<=c?n<c:n>c;s=0<=c?++n:--n)this._x_sorted[s]=a[s].x,this._y_sorted[s]=a[s].y;return this._sorted_dirty=!1}},e}(s.Transform)},function(t,e,r){\"use strict\";\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14),a=t(28);r.Jitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({mean:[s.Number,0],width:[s.Number,1],distribution:[s.Distribution,\"uniform\"],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),\"uniform\"===this.distribution?t+this.mean+(a.random()-.5)*this.width:\"normal\"===this.distribution?t+a.rnorm(this.mean,this.width):void 0},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(21),s=t(236);r.LinearInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.compute=function(t){var e,r,n,i,s,a,l;if(this.sort(e=!1),this.clip===!0){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return null}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return t===this._x_sorted[0]?this._y_sorted[0]:(r=o.findLastIndex(this._x_sorted,function(e){return e<t}),i=this._x_sorted[r],s=this._x_sorted[r+1],a=this._y_sorted[r],l=this._y_sorted[r+1],n=a+(t-i)/(s-i)*(l-a))},e.prototype.v_compute=function(t){var e,r,n,i,o;for(i=new Float64Array(t.length),r=e=0,n=t.length;e<n;r=++e)o=t[r],i[r]=this.compute(o);return i},e}(s.Interpolator)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(236),s=t(14),a=t(21);r.StepInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({mode:[s.TransformStepMode,\"after\"]}),e.prototype.compute=function(t){var e,r,n,i,o,s;if(this.sort(e=!1),this.clip===!0){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return null}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return n=-1,\"after\"===this.mode&&(n=a.findLastIndex(this._x_sorted,function(e){return t>=e})),\"before\"===this.mode&&(n=a.findIndex(this._x_sorted,function(e){return t<=e})),\"center\"===this.mode&&(r=function(){var e,r,n,i;for(n=this._x_sorted,i=[],e=0,r=n.length;e<r;e++)s=n[e],i.push(Math.abs(s-t));return i}.call(this),i=a.min(r),n=a.findIndex(r,function(t){return i===t})),o=n!==-1?this._y_sorted[n]:null},e.prototype.v_compute=function(t){var e,r,n,i,o;for(i=new Float64Array(t.length),r=e=0,n=t.length;e<n;r=++e)o=t[r],i[r]=this.compute(o);return i},e}(o.Interpolator)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(49);r.Transform=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.v_compute=function(t){var e,r,n,i,o,s;for(null!=(null!=(i=this.range)?i.v_synthetic:void 0)&&(t=this.range.v_synthetic(t)),o=new Float64Array(t.length),r=e=0,n=t.length;e<n;r=++e)s=t[r],o[r]=this.compute(s,!1);return o},e}(o.Model)},function(t,e,r){\"use strict\";\"function\"!=typeof WeakMap&&t(310),\"function\"!=typeof Set&&t(300);var n=String.prototype;n.repeat||(n.repeat=function(t){if(null==this)throw new TypeError(\"can't convert \"+this+\" to object\");var e=\"\"+this;if(t=+t,t!=t&&(t=0),t<0)throw new RangeError(\"repeat count must be non-negative\");if(t==1/0)throw new RangeError(\"repeat count must be less than infinity\");if(t=Math.floor(t),0==e.length||0==t)return\"\";if(e.length*t>=1<<28)throw new RangeError(\"repeat count must not overflow maximum string size\");for(var r=\"\";1==(1&t)&&(r+=e),t>>>=1,0!=t;)e+=e;return r})},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(36);r.Message=function(){function t(t,e,r){this.header=t,this.metadata=e,this.content=r,this.buffers=[]}return t.assemble=function(e,r,n){var i,o,s;return o=JSON.parse(e),s=JSON.parse(r),i=JSON.parse(n),new t(o,s,i)},t.prototype.assemble_buffer=function(t,e){var r;if(r=null!=this.header.num_buffers?this.header.num_buffers:0,r<=this.buffers.length)throw new Error(\"too many buffers received, expecting \"+r);return this.buffers.push([t,e])},t.create=function(e,r,n){var i;return null==n&&(n={}),i=t.create_header(e),new t(i,r,n)},t.create_header=function(t){return{msgid:n.uniqueId(),msgtype:t}},t.prototype.complete=function(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(!(\"num_buffers\"in this.header)||this.buffers.length===this.header.num_buffers)},t.prototype.send=function(t){var e,r,n,i;if(i=null!=this.header.num_buffers?this.header.num_buffers:0,i>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");return r=JSON.stringify(this.header),n=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(r),t.send(n),t.send(e)},t.prototype.msgid=function(){return this.header.msgid},t.prototype.msgtype=function(){return this.header.msgtype},t.prototype.reqid=function(){return this.header.reqid},t.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(242);r.Receiver=function(){function t(){this.message=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){return this._current_consumer(t),null},t.prototype._HEADER=function(t){return this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA,null},t.prototype._METADATA=function(t){return this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT,null},t.prototype._CONTENT=function(t){var e,r,i,o;return this._assume_text(t),this._fragments.push(t),o=this._fragments.slice(0,3),r=o[0],i=o[1],e=o[2],this._partial=n.Message.assemble(r,i,e),this._check_complete(),null},t.prototype._BUFFER_HEADER=function(t){return this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD,null},t.prototype._BUFFER_PAYLOAD=function(t){return this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete(),null},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error(\"Expected text fragment but received binary fragment\")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")},t.prototype._check_complete=function(){return this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER,null},t}()},function(t,e,r){\"use strict\";function n(t){var e=document.createElement(\"div\");e.style.backgroundColor=\"#f2dede\",e.style.border=\"1px solid #a94442\",e.style.borderRadius=\"4px\",e.style.display=\"inline-block\",e.style.fontFamily=\"sans-serif\",e.style.marginTop=\"5px\",e.style.minWidth=\"200px\",e.style.padding=\"5px 5px 5px 10px\";var r=document.createElement(\"span\");r.style.backgroundColor=\"#a94442\",r.style.borderRadius=\"0px 4px 0px 0px\",r.style.color=\"white\",r.style.cursor=\"pointer\",r.style.cssFloat=\"right\",r.style.fontSize=\"0.8em\",r.style.margin=\"-6px -6px 0px 0px\",r.style.padding=\"2px 5px 4px 5px\",r.title=\"close\",r.setAttribute(\"aria-label\",\"close\"),r.appendChild(document.createTextNode(\"x\")),r.addEventListener(\"click\",function(){return o.removeChild(e)});var n=document.createElement(\"h3\");n.style.color=\"#a94442\",n.style.margin=\"8px 0px 0px 0px\",n.style.padding=\"0px\",n.appendChild(document.createTextNode(\"Bokeh Error\"));var i=document.createElement(\"pre\");i.style.whiteSpace=\"unset\",i.style.overflowX=\"auto\",i.appendChild(document.createTextNode(t.message||t)),e.appendChild(r),e.appendChild(n),e.appendChild(i);var o=document.getElementsByTagName(\"body\")[0];o.insertBefore(e,o.firstChild)}function i(t,e){void 0===e&&(e=!1);try{return t()}catch(r){if(n(r),e)return;throw r}}Object.defineProperty(r,\"__esModule\",{value:!0}),r.safely=i},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.version=\"0.12.10\"},function(t,e,r){!function(){\"use strict\";function t(t,e){var r,n=Object.keys(e);for(r=0;r<n.length;r++)t=t.replace(new RegExp(\"\\\\{\"+n[r]+\"\\\\}\",\"gi\"),e[n[r]]);return t}function r(t){var e,r,n;if(!t)throw new Error(\"cannot create a random attribute name for an undefined object\");e=\"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\",r=\"\";do for(r=\"\",n=0;n<12;n++)r+=e[Math.floor(Math.random()*e.length)];while(t[r]);return r}function n(t,e){var r,n,i,o={};for(t=t.split(\",\"),e=e||10,r=0;r<t.length;r+=2)n=\"&\"+t[r+1]+\";\",i=parseInt(t[r],e),o[n]=\"&#\"+i+\";\";return o[\"\\\\xa0\"]=\"&#160;\",o}function i(t){var e={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"};return e[t]||e.start}function o(t){var e={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return e[t]||e.alphabetic}var s,a,l,u,c;c=n(\"50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro\",32),s={strokeStyle:{svgAttr:\"stroke\",canvas:\"#000000\",svg:\"none\",apply:\"stroke\"},fillStyle:{svgAttr:\"fill\",canvas:\"#000000\",svg:null,apply:\"fill\"},lineCap:{svgAttr:\"stroke-linecap\",canvas:\"butt\",svg:\"butt\",apply:\"stroke\"},lineJoin:{svgAttr:\"stroke-linejoin\",canvas:\"miter\",svg:\"miter\",apply:\"stroke\"},miterLimit:{svgAttr:\"stroke-miterlimit\",canvas:10,svg:4,apply:\"stroke\"},lineWidth:{svgAttr:\"stroke-width\",canvas:1,svg:1,apply:\"stroke\"},globalAlpha:{svgAttr:\"opacity\",canvas:1,svg:1,apply:\"fill stroke\"},font:{canvas:\"10px sans-serif\"},shadowColor:{canvas:\"#000000\"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:\"start\"},textBaseline:{canvas:\"alphabetic\"},lineDash:{svgAttr:\"stroke-dasharray\",canvas:[],svg:null,apply:\"stroke\"}},l=function(t,e){this.__root=t,this.__ctx=e},l.prototype.addColorStop=function(e,r){var n,i,o=this.__ctx.__createElement(\"stop\");o.setAttribute(\"offset\",e),r.indexOf(\"rgba\")!==-1?(n=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi,i=n.exec(r),o.setAttribute(\"stop-color\",t(\"rgb({r},{g},{b})\",{r:i[1],g:i[2],b:i[3]})),o.setAttribute(\"stop-opacity\",i[4])):o.setAttribute(\"stop-color\",r),this.__root.appendChild(o)},u=function(t,e){this.__root=t,this.__ctx=e},a=function(t){var e,r={width:500,height:500,enableMirroring:!1};return arguments.length>1?(e=r,e.width=arguments[0],e.height=arguments[1]):e=t?t:r,this instanceof a?(this.width=e.width||r.width,this.height=e.height||r.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:r.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement(\"canvas\"),this.__ctx=this.__canvas.getContext(\"2d\")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),this.__root.setAttribute(\"version\",1.1),this.__root.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\"),this.__root.setAttributeNS(\"http://www.w3.org/2000/xmlns/\",\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\"),this.__root.setAttribute(\"width\",this.width),this.__root.setAttribute(\"height\",this.height),this.__ids={},this.__defs=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"defs\"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"),void this.__root.appendChild(this.__currentElement)):new a(e)},a.prototype.__createElement=function(t,e,r){\"undefined\"==typeof e&&(e={});var n,i,o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(r&&(o.setAttribute(\"fill\",\"none\"),o.setAttribute(\"stroke\",\"none\")),n=0;n<s.length;n++)i=s[n],o.setAttribute(i,e[i]);return o},a.prototype.__setDefaultStyles=function(){var t,e,r=Object.keys(s);for(t=0;t<r.length;t++)e=r[t],this[e]=s[e].canvas},a.prototype.__applyStyleState=function(t){var e,r,n=Object.keys(t);for(e=0;e<n.length;e++)r=n[e],this[r]=t[r]},a.prototype.__getStyleState=function(){var t,e,r={},n=Object.keys(s);for(t=0;t<n.length;t++)e=n[t],r[e]=this[e];return r},a.prototype.__applyStyleToCurrentElement=function(e){var r=this.__currentElement,n=this.__currentElementsToStyle;n&&(r.setAttribute(e,\"\"),r=n.element,n.children.forEach(function(t){t.setAttribute(e,\"\")}));var i,o,a,c,_,h,p=Object.keys(s);for(i=0;i<p.length;i++)if(o=s[p[i]],a=this[p[i]],o.apply)if(a instanceof u){if(a.__ctx)for(;a.__ctx.__defs.childNodes.length;)c=a.__ctx.__defs.childNodes[0].getAttribute(\"id\"),this.__ids[c]=c,this.__defs.appendChild(a.__ctx.__defs.childNodes[0]);r.setAttribute(o.apply,t(\"url(#{id})\",{id:a.__root.getAttribute(\"id\")}))}else if(a instanceof l)r.setAttribute(o.apply,t(\"url(#{id})\",{id:a.__root.getAttribute(\"id\")}));else if(o.apply.indexOf(e)!==-1&&o.svg!==a)if(\"stroke\"!==o.svgAttr&&\"fill\"!==o.svgAttr||a.indexOf(\"rgba\")===-1){var d=o.svgAttr;if(\"globalAlpha\"===p[i]&&(d=e+\"-\"+o.svgAttr,r.getAttribute(d)))continue;r.setAttribute(d,a)}else{_=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi,h=_.exec(a),r.setAttribute(o.svgAttr,t(\"rgb({r},{g},{b})\",{r:h[1],g:h[2],b:h[3]}));var f=h[4],y=this.globalAlpha;null!=y&&(f*=y),r.setAttribute(o.svgAttr+\"-opacity\",f)}},a.prototype.__closestGroupOrSvg=function(t){return t=t||this.__currentElement,\"g\"===t.nodeName||\"svg\"===t.nodeName?t:this.__closestGroupOrSvg(t.parentNode)},a.prototype.getSerializedSvg=function(t){var e,r,n,i,o,s,a=(new XMLSerializer).serializeToString(this.__root);if(s=/xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg\".+xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg/gi,s.test(a)&&(a=a.replace('xmlns=\"http://www.w3.org/2000/svg','xmlns:xlink=\"http://www.w3.org/1999/xlink')),t)for(e=Object.keys(c),r=0;r<e.length;r++)n=e[r],i=c[n],o=new RegExp(n,\"gi\"),o.test(a)&&(a=a.replace(o,i));return a},a.prototype.getSvg=function(){return this.__root},a.prototype.save=function(){var t=this.__createElement(\"g\"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__stack.push(this.__getStyleState())},a.prototype.restore=function(){this.__currentElement=this.__groupStack.pop(),this.__currentElementsToStyle=null,this.__currentElement||(this.__currentElement=this.__root.childNodes[1]);var t=this.__stack.pop();this.__applyStyleState(t)},a.prototype.__addTransform=function(t){var e=this.__closestGroupOrSvg();if(e.childNodes.length>0){\"path\"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var r=this.__createElement(\"g\");e.appendChild(r),this.__currentElement=r}var n=this.__currentElement.getAttribute(\"transform\");n?n+=\" \":n=\"\",n+=t,this.__currentElement.setAttribute(\"transform\",n)},a.prototype.scale=function(e,r){void 0===r&&(r=e),this.__addTransform(t(\"scale({x},{y})\",{x:e,y:r}))},a.prototype.rotate=function(e){var r=180*e/Math.PI;this.__addTransform(t(\"rotate({angle},{cx},{cy})\",{angle:r,cx:0,cy:0}))},a.prototype.translate=function(e,r){this.__addTransform(t(\"translate({x},{y})\",{x:e,y:r}))},a.prototype.transform=function(e,r,n,i,o,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:r,c:n,d:i,e:o,f:s}))},a.prototype.beginPath=function(){var t,e;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),e=this.__closestGroupOrSvg(),e.appendChild(t),this.__currentElement=t},a.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;\"path\"===t.nodeName?t.setAttribute(\"d\",this.__currentDefaultPath):console.error(\"Attempted to apply path command to node\",t.nodeName)},a.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},a.prototype.moveTo=function(e,r){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:r},this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},a.prototype.lineTo=function(e,r){this.__currentPosition={x:e,y:r},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(t(\"L {x} {y}\",{x:e,y:r})):this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.bezierCurveTo=function(e,r,n,i,o,s){this.__currentPosition={x:o,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:r,cp2x:n,cp2y:i,x:o,y:s}))},a.prototype.quadraticCurveTo=function(e,r,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:r,x:n,y:i}))};var _=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};a.prototype.arcTo=function(t,e,r,n,i){var o=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(\"undefined\"!=typeof o&&\"undefined\"!=typeof s){if(i<0)throw new Error(\"IndexSizeError: The radius provided (\"+i+\") is negative.\");if(o===t&&s===e||t===r&&e===n||0===i)return void this.lineTo(t,e);var a=_([o-t,s-e]),l=_([r-t,n-e]);if(a[0]*l[1]===a[1]*l[0])return void this.lineTo(t,e);var u=a[0]*l[0]+a[1]*l[1],c=Math.acos(Math.abs(u)),h=_([a[0]+l[0],a[1]+l[1]]),p=i/Math.sin(c/2),d=t+p*h[0],f=e+p*h[1],y=[-a[1],a[0]],m=[l[1],-l[0]],v=function(t){var e=t[0],r=t[1];return r>=0?Math.acos(e):-Math.acos(e)},g=v(y),b=v(m);this.lineTo(d+y[0]*i,f+y[1]*i),this.arc(d,f,i,g,b)}},a.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},a.prototype.rect=function(t,e,r,n){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()},a.prototype.fillRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"fill\")},a.prototype.strokeRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute(\"transform\"),r=this.__root.childNodes[1],n=r.childNodes,i=n.length-1;i>=0;i--)n[i]&&r.removeChild(n[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)},a.prototype.clearRect=function(t,e,r,n){if(0===t&&0===e&&r===this.width&&n===this.height)return void this.__clearCanvas();var i,o=this.__closestGroupOrSvg();i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n,fill:\"#FFFFFF\"},!0),o.appendChild(i)},a.prototype.createLinearGradient=function(t,e,n,i){var o=this.__createElement(\"linearGradient\",{id:r(this.__ids),x1:t+\"px\",x2:n+\"px\",y1:e+\"px\",y2:i+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(o),new l(o,this)},a.prototype.createRadialGradient=function(t,e,n,i,o,s){var a=this.__createElement(\"radialGradient\",{id:r(this.__ids),cx:i+\"px\",cy:o+\"px\",r:s+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(a),new l(a,this)},a.prototype.__parseFont=function(){var t=/^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\'\\\"\\sa-z0-9]+?)\\s*$/i,e=t.exec(this.font),r={style:e[1]||\"normal\",size:e[4]||\"10px\",family:e[6]||\"sans-serif\",weight:e[3]||\"normal\",decoration:e[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(r.decoration=\"underline\"),this.__fontHref&&(r.href=this.__fontHref),r},a.prototype.__wrapTextLink=function(t,e){if(t.href){var r=this.__createElement(\"a\");return r.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),r.appendChild(e),r}return e},a.prototype.__applyText=function(t,e,r,n){var s=this.__parseFont(),a=this.__closestGroupOrSvg(),l=this.__createElement(\"text\",{\"font-family\":s.family,\"font-size\":s.size,\"font-style\":s.style,\"font-weight\":s.weight,\"text-decoration\":s.decoration,x:e,y:r,\"text-anchor\":i(this.textAlign),\"dominant-baseline\":o(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(n),a.appendChild(this.__wrapTextLink(s,l))},a.prototype.fillText=function(t,e,r){this.__applyText(t,e,r,\"fill\")},a.prototype.strokeText=function(t,e,r){this.__applyText(t,e,r,\"stroke\")},a.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},a.prototype.arc=function(e,r,n,i,o,s){if(i!==o){i%=2*Math.PI,o%=2*Math.PI,i===o&&(o=(o+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+n*Math.cos(o),l=r+n*Math.sin(o),u=e+n*Math.cos(i),c=r+n*Math.sin(i),_=s?0:1,h=0,p=o-i;p<0&&(p+=2*Math.PI),h=s?p>Math.PI?0:1:p>Math.PI?1:0,this.lineTo(u,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:h,sweepFlag:_,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},a.prototype.clip=function(){var e=this.__closestGroupOrSvg(),n=this.__createElement(\"clipPath\"),i=r(this.__ids),o=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute(\"id\",i),n.appendChild(this.__currentElement),this.__defs.appendChild(n),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:i})),e.appendChild(o),this.__currentElement=o},a.prototype.drawImage=function(){var t,e,r,n,i,o,s,l,u,c,_,h,p,d,f,y=Array.prototype.slice.call(arguments),m=y[0],v=0,g=0;if(3===y.length)t=y[1],e=y[2],i=m.width,o=m.height,r=i,n=o;else if(5===y.length)t=y[1],e=y[2],r=y[3],n=y[4],i=m.width,o=m.height;else{if(9!==y.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);v=y[1],g=y[2],i=y[3],o=y[4],t=y[5],e=y[6],r=y[7],n=y[8]}s=this.__closestGroupOrSvg(),_=this.__currentElement;var b=\"translate(\"+t+\", \"+e+\")\";if(m instanceof a){if(l=m.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(u=l.childNodes[0];u.childNodes.length;)f=u.childNodes[0].getAttribute(\"id\"),this.__ids[f]=f,this.__defs.appendChild(u.childNodes[0]);if(c=l.childNodes[1]){var w,x=c.getAttribute(\"transform\");w=x?x+\" \"+b:b,c.setAttribute(\"transform\",w),s.appendChild(c)}}}else\"IMG\"===m.nodeName?(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),(v||g||i!==m.width||o!==m.height)&&(p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.drawImage(m,v,g,i,o,0,0,r,n),m=p),h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===m.nodeName?m.toDataURL():m.getAttribute(\"src\")),s.appendChild(h)):\"CANVAS\"===m.nodeName&&(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.imageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.oImageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.drawImage(m,v,g,i,o,0,0,r,n),m=p,h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",m.toDataURL()),s.appendChild(h))},a.prototype.createPattern=function(t,e){var n,i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),o=r(this.__ids);return i.setAttribute(\"id\",o),i.setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?(n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),n.setAttribute(\"width\",t.width),n.setAttribute(\"height\",t.height),n.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),i.appendChild(n),this.__defs.appendChild(i)):t instanceof a&&(i.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(i)),new u(i,this)},a.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},a.prototype.drawFocusRing=function(){},a.prototype.createImageData=function(){},a.prototype.getImageData=function(){},a.prototype.putImageData=function(){},a.prototype.globalCompositeOperation=function(){},a.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=a),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=a)}()},function(t,e,r){\"use strict\";var n,i=t(270),o=t(280),s=t(284),a=t(279),l=t(284),u=t(286),c=Function.prototype.bind,_=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,o=u(e)&&l(e.value);return n=i(e),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?o:(e.value=c.call(o,r.resolveContext?r.resolveContext(this):this),_(this,t,e),this[t])},n},e.exports=function(t){var e=o(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,r){return n(r,t,e)})}},function(t,e,r){\"use strict\";var n,i=t(267),o=t(280),s=t(273),a=t(287);n=e.exports=function(t,e){var r,n,s,l,u;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,\"c\"),n=a.call(t,\"e\"),s=a.call(t,\"w\")),u={value:e,configurable:r,enumerable:n,writable:s},l?i(o(l),u):u},n.gs=function(t,e,r){var n,l,u,c;return\"string\"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,l=!1):(n=a.call(t,\"c\"),l=a.call(t,\"e\")),c={get:e,set:r,configurable:n,enumerable:l},u?i(o(u),c):c}},function(t,e,r){\"use strict\";var n=t(286);e.exports=function(){return n(this).length=0,this}},function(t,e,r){\"use strict\";var n=t(261),i=t(265),o=t(286),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(t){var e,r,c,_;if(!n(t))return s.apply(this,arguments);for(r=i(o(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c)),e=c;e<r;++e)if(a.call(this,e)&&(_=this[e],n(_)))return e;return-1}},function(t,e,r){\"use strict\";e.exports=t(252)()?Array.from:t(253)},function(t,e,r){\"use strict\";e.exports=function(){var t,e,r=Array.from;return\"function\"==typeof r&&(t=[\"raz\",\"dwa\"],e=r(t),Boolean(e&&e!==t&&\"dwa\"===e[1]))}},function(t,e,r){\"use strict\";var n=t(305).iterator,i=t(254),o=t(255),s=t(265),a=t(284),l=t(286),u=t(275),c=t(290),_=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,f,y,m,v,g,b,w,x,k=arguments[1],M=arguments[2];if(t=Object(l(t)),u(k)&&a(k),this&&this!==Array&&o(this))e=this;else{if(!k){if(i(t))return m=t.length,1!==m?Array.apply(null,t):(y=new Array(1),y[0]=t[0],y);if(_(t)){for(y=new Array(m=t.length),r=0;r<m;++r)y[r]=t[r];return y}}y=[]}if(!_(t))if(void 0!==(w=t[n])){for(g=a(w).call(t),e&&(y=new e),b=g.next(),r=0;!b.done;)x=k?h.call(k,M,b.value,r):b.value,e?(p.value=x,d(y,r,p)):y[r]=x,b=g.next(),++r;m=r}else if(c(t)){for(m=t.length,e&&(y=new e),r=0,f=0;r<m;++r)x=t[r],r+1<m&&(v=x.charCodeAt(0),v>=55296&&v<=56319&&(x+=t[++r])),x=k?h.call(k,M,x,f):x,e?(p.value=x,d(y,f,p)):y[f]=x,++f;m=f}if(void 0===m)for(m=s(t.length),e&&(y=new e(m)),r=0;r<m;++r)x=k?h.call(k,M,t[r],r):t[r],e?(p.value=x,d(y,r,p)):y[r]=x;return e&&(p.value=null,y.length=m),y}},function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(t(256));e.exports=function(t){return\"function\"==typeof t&&n.call(t)===i}},function(t,e,r){\"use strict\";e.exports=function(){}},function(t,e,r){e.exports=function(){return this}()},function(t,e,r){\"use strict\";e.exports=t(259)()?Math.sign:t(260)},function(t,e,r){\"use strict\";e.exports=function(){var t=Math.sign;return\"function\"==typeof t&&(1===t(10)&&t(-20)===-1)}},function(t,e,r){\"use strict\";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},function(t,e,r){\"use strict\";e.exports=t(262)()?Number.isNaN:t(263)},function(t,e,r){\"use strict\";e.exports=function(){var t=Number.isNaN;return\"function\"==typeof t&&(!t({})&&t(NaN)&&!t(34))}},function(t,e,r){\"use strict\";e.exports=function(t){return t!==t}},function(t,e,r){\"use strict\";var n=t(258),i=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){\"use strict\";var n=t(264),i=Math.max;e.exports=function(t){return i(0,n(t))}},function(t,e,r){\"use strict\";var n=t(284),i=t(286),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;\n",
" e.exports=function(t,e){return function(r,u){var c,_=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=a(r),h&&c.sort(\"function\"==typeof h?o.call(h,r):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,n){return l.call(r,t)?s.call(u,_,r[t],t,r,n):e})}}},function(t,e,r){\"use strict\";e.exports=t(268)()?Object.assign:t(269)},function(t,e,r){\"use strict\";e.exports=function(){var t,e=Object.assign;return\"function\"==typeof e&&(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}},function(t,e,r){\"use strict\";var n=t(276),i=t(286),o=Math.max;e.exports=function(t,e){var r,s,a,l=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;s<l;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){\"use strict\";var n=t(251),i=t(267),o=t(286);e.exports=function(t){var e=Object(o(t)),r=arguments[1],s=Object(arguments[2]);if(e!==t&&!r)return e;var a={};return r?n(r,function(e){(s.ensure||e in t)&&(a[e]=t[e])}):i(a,t),a}},function(t,e,r){\"use strict\";var n,i=Object.create;t(282)()||(n=t(283)),e.exports=function(){var t,e,r;return n?1!==n.level?i:(t={},e={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){return\"__proto__\"===t?void(e[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(e[t]=r)}),Object.defineProperties(t,e),Object.defineProperty(n,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,r){return i(null===e?t:e,r)}):i}()},function(t,e,r){\"use strict\";e.exports=t(266)(\"forEach\")},function(t,e,r){\"use strict\";e.exports=function(t){return\"function\"==typeof t}},function(t,e,r){\"use strict\";var n=t(275),i={\"function\":!0,object:!0};e.exports=function(t){return n(t)&&i[typeof t]||!1}},function(t,e,r){\"use strict\";var n=t(256)();e.exports=function(t){return t!==n&&null!==t}},function(t,e,r){\"use strict\";e.exports=t(277)()?Object.keys:t(278)},function(t,e,r){\"use strict\";e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(t){return!1}}},function(t,e,r){\"use strict\";var n=t(275),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},function(t,e,r){\"use strict\";var n=t(284),i=t(272),o=Function.prototype.call;e.exports=function(t,e){var r={},s=arguments[2];return n(e),i(t,function(t,n,i,a){r[n]=o.call(e,s,t,n,i,a)}),r}},function(t,e,r){\"use strict\";var n=t(275),i=Array.prototype.forEach,o=Object.create,s=function(t,e){var r;for(r in t)e[r]=t[r]};e.exports=function(t){var e=o(null);return i.call(arguments,function(t){n(t)&&s(Object(t),e)}),e}},function(t,e,r){\"use strict\";e.exports=t(282)()?Object.setPrototypeOf:t(283)},function(t,e,r){\"use strict\";var n=Object.create,i=Object.getPrototypeOf,o={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return\"function\"==typeof t&&i(t(e(null),o))===o}},function(t,e,r){\"use strict\";var n,i=t(274),o=t(286),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(o(t),null===e||i(e))return t;throw new TypeError(\"Prototype must be null or an object\")},e.exports=function(t){var e,r;return t?(2===t.level?t.set?(r=t.set,e=function(t,e){return r.call(n(t,e),e),t}):e=function(t,e){return n(t,e).__proto__=e,t}:e=function i(t,e){var r;return n(t,e),r=s.call(i.nullPolyfill,t),r&&delete i.nullPolyfill.__proto__,null===e&&(e=i.nullPolyfill),t.__proto__=e,r&&a(i.nullPolyfill,\"__proto__\",l),t},Object.defineProperty(e,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(n){try{t=n.set,t.call(e,r)}catch(i){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:(e={},e.__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}()),t(271)},function(t,e,r){\"use strict\";e.exports=function(t){if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");return t}},function(t,e,r){\"use strict\";var n=t(274);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not an Object\");return t}},function(t,e,r){\"use strict\";var n=t(275);e.exports=function(t){if(!n(t))throw new TypeError(\"Cannot use null or undefined\");return t}},function(t,e,r){\"use strict\";e.exports=t(288)()?String.prototype.contains:t(289)},function(t,e,r){\"use strict\";var n=\"razdwatrzy\";e.exports=function(){return\"function\"==typeof n.contains&&(n.contains(\"dwa\")===!0&&n.contains(\"foo\")===!1)}},function(t,e,r){\"use strict\";var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])>-1}},function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},function(t,e,r){\"use strict\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do t=i().toString(36).slice(2);while(n[t]);return t}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(287),s=t(248),a=t(295),l=Object.defineProperty;n=e.exports=function(t,e){return this instanceof n?(a.call(this,t),e=e?o.call(e,\"key+value\")?\"key+value\":o.call(e,\"key\")?\"key\":\"value\":\"value\",void l(this,\"__kind__\",s(\"\",e))):new n(t,e)},i&&i(n,a),n.prototype=Object.create(a.prototype,{constructor:s(n),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t}),toString:s(function(){return\"[object Array Iterator]\"})})},function(t,e,r){\"use strict\";var n=t(254),i=t(284),o=t(290),s=t(294),a=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,_,h,p,d,f,y,m=arguments[2];if(a(t)||n(t)?r=\"array\":o(t)?r=\"string\":t=s(t),i(e),_=function(){h=!0},\"array\"===r)return void u.call(t,function(t){if(l.call(e,m,t,_),h)return!0});if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,m,c.value,_),h)return;c=t.next()}else for(d=t.length,p=0;p<d&&(f=t[p],p+1<d&&(y=f.charCodeAt(0),y>=55296&&y<=56319&&(f+=t[++p])),l.call(e,m,f,_),!h);++p);}},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(292),s=t(297),a=t(298),l=t(305).iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():n(t)?new o(t):i(t)?new s(t):new o(t)}},function(t,e,r){\"use strict\";var n,i=t(249),o=t(267),s=t(284),a=t(286),l=t(248),u=t(247),c=t(305),_=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){return this instanceof n?(h(this,{__list__:l(\"w\",a(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),void(e&&(s(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear)))):new n(t,e)},h(n.prototype,o({constructor:l(n),_next:l(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)}),toString:l(function(){return\"[object Iterator]\"})},u({_onAdd:l(function(t){if(!(t>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void _(this,\"__redo__\",l(\"c\",[t]));this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)}}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),_(n.prototype,c.iterator,l(function(){return this})),_(n.prototype,c.toStringTag,l(\"\",\"Iterator\"))},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(305).iterator,s=Array.isArray;e.exports=function(t){return null!=t&&(!!s(t)||(!!i(t)||(!!n(t)||\"function\"==typeof t[o])))}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(248),s=t(295),a=Object.defineProperty;n=e.exports=function(t){return this instanceof n?(t=String(t),s.call(this,t),void a(this,\"__length__\",o(\"\",t.length))):new n(t)},i&&i(n,s),n.prototype=Object.create(s.prototype,{constructor:o(n),_next:o(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:o(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0),e>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)}),toString:o(function(){return\"[object String Iterator]\"})})},function(t,e,r){\"use strict\";var n=t(296);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not iterable\");return t}},function(e,r,n){/*!\n",
" * @overview es6-promise - a tiny implementation of Promises/A+.\n",
" * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n",
" * @license Licensed under MIT license\n",
" * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE\n",
" * @version 3.0.2\n",
" */\n",
" (function(){\"use strict\";function n(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}function i(t){return\"function\"==typeof t}function o(t){return\"object\"==typeof t&&null!==t}function s(t){q=t}function a(t){H=t}function l(){return function(){process.nextTick(p)}}function u(){return function(){U(p)}}function c(){var t=0,e=new $(p),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function _(){var t=new MessageChannel;return t.port1.onmessage=p,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(p,1)}}function p(){for(var t=0;t<W;t+=2){var e=tt[t],r=tt[t+1];e(r),tt[t]=void 0,tt[t+1]=void 0}W=0}function d(){try{var t=e,r=t(\"vertx\");return U=r.runOnLoop||r.runOnContext,u()}catch(n){return h()}}function f(){}function y(){return new TypeError(\"You cannot resolve a promise with itself\")}function m(){return new TypeError(\"A promises callback cannot return that same promise.\")}function v(t){try{return t.then}catch(e){return it.error=e,it}}function g(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function b(t,e,r){H(function(t){var n=!1,i=g(r,e,function(r){n||(n=!0,e!==r?k(t,r):S(t,r))},function(e){n||(n=!0,T(t,e))},\"Settle: \"+(t._label||\" unknown promise\"));!n&&i&&(n=!0,T(t,i))},t)}function w(t,e){e._state===rt?S(t,e._result):e._state===nt?T(t,e._result):O(e,void 0,function(e){k(t,e)},function(e){T(t,e)})}function x(t,e){if(e.constructor===t.constructor)w(t,e);else{var r=v(e);r===it?T(t,it.error):void 0===r?S(t,e):i(r)?b(t,e,r):S(t,e)}}function k(t,e){t===e?T(t,y()):n(e)?x(t,e):S(t,e)}function M(t){t._onerror&&t._onerror(t._result),P(t)}function S(t,e){t._state===et&&(t._result=e,t._state=rt,0!==t._subscribers.length&&H(P,t))}function T(t,e){t._state===et&&(t._state=nt,t._result=e,H(M,t))}function O(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+rt]=r,i[o+nt]=n,0===o&&t._state&&H(P,t)}function P(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,o=t._result,s=0;s<e.length;s+=3)n=e[s],i=e[s+r],n?j(r,n,i,o):i(o);t._subscribers.length=0}}function A(){this.error=null}function E(t,e){try{return t(e)}catch(r){return ot.error=r,ot}}function j(t,e,r,n){var o,s,a,l,u=i(r);if(u){if(o=E(r,n),o===ot?(l=!0,s=o.error,o=null):a=!0,e===o)return void T(e,m())}else o=n,a=!0;e._state!==et||(u&&a?k(e,o):l?T(e,s):t===rt?S(e,o):t===nt&&T(e,o))}function z(t,e){try{e(function(e){k(t,e)},function(e){T(t,e)})}catch(r){T(t,r)}}function C(t,e){var r=this;r._instanceConstructor=t,r.promise=new t(f),r._validateInput(e)?(r._input=e,r.length=e.length,r._remaining=e.length,r._init(),0===r.length?S(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&S(r.promise,r._result))):T(r.promise,r._validationError())}function N(t){return new st(this,t).promise}function D(t){function e(t){k(i,t)}function r(t){T(i,t)}var n=this,i=new n(f);if(!X(t))return T(i,new TypeError(\"You must pass an array to race.\")),i;for(var o=t.length,s=0;i._state===et&&s<o;s++)O(n.resolve(t[s]),void 0,e,r);return i}function F(t){var e=this;if(t&&\"object\"==typeof t&&t.constructor===e)return t;var r=new e(f);return k(r,t),r}function I(t){var e=this,r=new e(f);return T(r,t),r}function B(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}function R(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}function L(t){this._id=_t++,this._state=void 0,this._result=void 0,this._subscribers=[],f!==t&&(i(t)||B(),this instanceof L||R(),z(this,t))}function V(){var t;if(\"undefined\"!=typeof global)t=global;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(e){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var r=t.Promise;r&&\"[object Promise]\"===Object.prototype.toString.call(r.resolve())&&!r.cast||(t.Promise=ht)}var G;G=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)};var U,q,Y,X=G,W=0,H=({}.toString,function(t,e){tt[W]=t,tt[W+1]=e,W+=2,2===W&&(q?q(p):Y())}),Q=\"undefined\"!=typeof window?window:void 0,J=Q||{},$=J.MutationObserver||J.WebKitMutationObserver,Z=\"undefined\"!=typeof process&&\"[object process]\"==={}.toString.call(process),K=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel,tt=new Array(1e3);Y=Z?l():$?c():K?_():void 0===Q&&\"function\"==typeof e?d():h();var et=void 0,rt=1,nt=2,it=new A,ot=new A;C.prototype._validateInput=function(t){return X(t)},C.prototype._validationError=function(){return new Error(\"Array Methods must be provided an Array\")},C.prototype._init=function(){this._result=new Array(this.length)};var st=C;C.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===et&&i<e;i++)t._eachEntry(n[i],i)},C.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;o(t)?t.constructor===n&&t._state!==et?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},C.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===et&&(n._remaining--,t===nt?T(i,r):n._result[e]=r),0===n._remaining&&S(i,n._result)},C.prototype._willSettleAt=function(t,e){var r=this;O(t,void 0,function(t){r._settledAt(rt,e,t)},function(t){r._settledAt(nt,e,t)})};var at=N,lt=D,ut=F,ct=I,_t=0,ht=L;L.all=at,L.race=lt,L.resolve=ut,L.reject=ct,L._setScheduler=s,L._setAsap=a,L._asap=H,L.prototype={constructor:L,then:function(t,e){var r=this,n=r._state;if(n===rt&&!t||n===nt&&!e)return this;var i=new this.constructor(f),o=r._result;if(n){var s=arguments[n-1];H(function(){j(n,i,s,o)})}else O(r,i,t,e);return i},\"catch\":function(t){return this.then(null,t)}};var pt=V,dt={Promise:ht,polyfill:pt};\"function\"==typeof t&&t.amd?t(function(){return dt}):\"undefined\"!=typeof r&&r.exports?r.exports=dt:\"undefined\"!=typeof this&&(this.ES6Promise=dt),pt()}).call(this)},function(t,e,r){\"use strict\";t(301)()||Object.defineProperty(t(257),\"Set\",{value:t(304),configurable:!0,enumerable:!1,writable:!0})},function(t,e,r){\"use strict\";e.exports=function(){var t,e,r;return\"function\"==typeof Set&&(t=new Set([\"raz\",\"dwa\",\"trzy\"]),\"[object Set]\"===String(t)&&(3===t.size&&(\"function\"==typeof t.add&&(\"function\"==typeof t.clear&&(\"function\"==typeof t[\"delete\"]&&(\"function\"==typeof t.entries&&(\"function\"==typeof t.forEach&&(\"function\"==typeof t.has&&(\"function\"==typeof t.keys&&(\"function\"==typeof t.values&&(e=t.values(),r=e.next(),r.done===!1&&\"raz\"===r.value)))))))))))}},function(t,e,r){\"use strict\";e.exports=function(){return\"undefined\"!=typeof Set&&\"[object Set]\"===Object.prototype.toString.call(Set.prototype)}()},function(t,e,r){\"use strict\";var n,i=t(281),o=t(287),s=t(248),a=t(295),l=t(305).toStringTag,u=Object.defineProperty;n=e.exports=function(t,e){return this instanceof n?(a.call(this,t.__setData__,t),e=e&&o.call(e,\"key+value\")?\"key+value\":\"value\",void u(this,\"__kind__\",s(\"\",e))):new n(t,e)},i&&i(n,a),n.prototype=Object.create(a.prototype,{constructor:s(n),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__list__[t]]}),toString:s(function(){return\"[object Set Iterator]\"})}),u(n.prototype,l,s(\"c\",\"Set Iterator\"))},function(t,e,r){\"use strict\";var n,i,o,s=t(249),a=t(250),l=t(281),u=t(284),c=t(248),_=t(314),h=t(305),p=t(298),d=t(293),f=t(303),y=t(302),m=Function.prototype.call,v=Object.defineProperty,g=Object.getPrototypeOf;y&&(o=Set),e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");return t=y&&l?l(new o,g(this)):this,null!=e&&p(e),v(t,\"__setData__\",c(\"c\",[])),e?(d(e,function(t){a.call(this,t)===-1&&this.push(t)},t.__setData__),t):t},y&&(l&&l(n,o),n.prototype=Object.create(o.prototype,{constructor:c(n)})),_(Object.defineProperties(n.prototype,{add:c(function(t){return this.has(t)?this:(this.emit(\"_add\",this.__setData__.push(t)-1,t),this)}),clear:c(function(){this.__setData__.length&&(s.call(this.__setData__),this.emit(\"_clear\"))}),\"delete\":c(function(t){var e=a.call(this.__setData__,t);return e!==-1&&(this.__setData__.splice(e,1),this.emit(\"_delete\",e,t),!0)}),entries:c(function(){return new f(this,\"key+value\")}),forEach:c(function(t){var e,r,n,i=arguments[1];for(u(t),e=this.values(),r=e._next();void 0!==r;)n=e._resolve(r),m.call(t,i,n,n,this),r=e._next()}),has:c(function(t){return a.call(this.__setData__,t)!==-1}),keys:c(i=function(){return this.values()}),size:c.gs(function(){return this.__setData__.length}),values:c(function(){return new f(this)}),toString:c(function(){return\"[object Set]\"})})),v(n.prototype,h.iterator,c(i)),v(n.prototype,h.toStringTag,c(\"c\",\"Set\"))},function(t,e,r){\"use strict\";e.exports=t(306)()?Symbol:t(308)},function(t,e,r){\"use strict\";var n={object:!0,symbol:!0};e.exports=function(){var t;if(\"function\"!=typeof Symbol)return!1;t=Symbol(\"test symbol\");try{String(t)}catch(e){return!1}return!!n[typeof Symbol.iterator]&&(!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag])}},function(t,e,r){\"use strict\";e.exports=function(t){return!!t&&(\"symbol\"==typeof t||!!t.constructor&&(\"Symbol\"===t.constructor.name&&\"Symbol\"===t[t.constructor.toStringTag]))}},function(t,e,r){\"use strict\";var n,i,o,s,a=t(248),l=t(309),u=Object.create,c=Object.defineProperties,_=Object.defineProperty,h=Object.prototype,p=u(null);if(\"function\"==typeof Symbol){n=Symbol;try{String(n()),s=!0}catch(d){}}var f=function(){var t=u(null);return function(e){for(var r,n,i=0;t[e+(i||\"\")];)++i;return e+=i||\"\",t[e]=!0,r=\"@@\"+e,_(h,r,a.gs(null,function(t){n||(n=!0,_(this,r,a(t)),n=!1)})),r}}();o=function(t){if(this instanceof o)throw new TypeError(\"Symbol is not a constructor\");return i(t)},e.exports=i=function y(t){var e;if(this instanceof y)throw new TypeError(\"Symbol is not a constructor\");return s?n(t):(e=u(o.prototype),t=void 0===t?\"\":String(t),c(e,{__description__:a(\"\",t),__name__:a(\"\",f(t))}))},c(i,{\"for\":a(function(t){return p[t]?p[t]:p[t]=i(String(t))}),keyFor:a(function(t){var e;l(t);for(e in p)if(p[e]===t)return e}),hasInstance:a(\"\",n&&n.hasInstance||i(\"hasInstance\")),isConcatSpreadable:a(\"\",n&&n.isConcatSpreadable||i(\"isConcatSpreadable\")),iterator:a(\"\",n&&n.iterator||i(\"iterator\")),match:a(\"\",n&&n.match||i(\"match\")),replace:a(\"\",n&&n.replace||i(\"replace\")),search:a(\"\",n&&n.search||i(\"search\")),species:a(\"\",n&&n.species||i(\"species\")),split:a(\"\",n&&n.split||i(\"split\")),toPrimitive:a(\"\",n&&n.toPrimitive||i(\"toPrimitive\")),toStringTag:a(\"\",n&&n.toStringTag||i(\"toStringTag\")),unscopables:a(\"\",n&&n.unscopables||i(\"unscopables\"))}),c(o.prototype,{constructor:a(i),toString:a(\"\",function(){return this.__name__})}),c(i.prototype,{toString:a(function(){return\"Symbol (\"+l(this).__description__+\")\"}),valueOf:a(function(){return l(this)})}),_(i.prototype,i.toPrimitive,a(\"\",function(){var t=l(this);return\"symbol\"==typeof t?t:t.toString()})),_(i.prototype,i.toStringTag,a(\"c\",\"Symbol\")),_(o.prototype,i.toStringTag,a(\"c\",i.prototype[i.toStringTag])),_(o.prototype,i.toPrimitive,a(\"c\",i.prototype[i.toPrimitive]))},function(t,e,r){\"use strict\";var n=t(307);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not a symbol\");return t}},function(t,e,r){\"use strict\";t(311)()||Object.defineProperty(t(257),\"WeakMap\",{value:t(313),configurable:!0,enumerable:!1,writable:!0})},function(t,e,r){\"use strict\";e.exports=function(){var t,e;if(\"function\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(r){return!1}return\"[object WeakMap]\"===String(t)&&(\"function\"==typeof t.set&&(t.set({},1)===t&&(\"function\"==typeof t[\"delete\"]&&(\"function\"==typeof t.has&&\"one\"===t.get(e)))))}},function(t,e,r){\"use strict\";e.exports=function(){return\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)}()},function(t,e,r){\"use strict\";var n,i=t(281),o=t(285),s=t(286),a=t(291),l=t(248),u=t(294),c=t(293),_=t(305).toStringTag,h=t(312),p=Array.isArray,d=Object.defineProperty,f=Object.prototype.hasOwnProperty,y=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");return t=h&&i&&WeakMap!==n?i(new WeakMap,y(this)):this,null!=e&&(p(e)||(e=u(e))),d(t,\"__weakMapData__\",l(\"c\",\"$weakMap$\"+a())),e?(c(e,function(e){s(e),t.set(e[0],e[1])}),t):t},h&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:l(n)})),Object.defineProperties(n.prototype,{\"delete\":l(function(t){return!!f.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(f.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return f.call(o(t),this.__weakMapData__)}),set:l(function(t,e){return d(o(t),this.__weakMapData__,l(\"c\",e)),this}),toString:l(function(){return\"[object WeakMap]\"})}),d(n.prototype,_,l(\"c\",\"WeakMap\"))},function(t,e,r){\"use strict\";var n,i,o,s,a,l,u,c=t(248),_=t(284),h=Function.prototype.apply,p=Function.prototype.call,d=Object.create,f=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return _(e),m.call(this,\"__ee__\")?r=this.__ee__:(r=v.value=d(null),f(this,\"__ee__\",v),v.value=null),r[t]?\"object\"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return _(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),h.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(_(e),!m.call(this,\"__ee__\"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],\"object\"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(m.call(this,\"__ee__\")&&(i=this.__ee__[t]))if(\"object\"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)h.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];h.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},l={on:c(n),once:c(i),off:c(o),emit:c(s)},u=y({},l),e.exports=r=function(t){return null==t?d(u):y(Object(t),l)},r.methods=a},function(e,r,n){/*! Hammer.JS - v2.0.7 - 2016-04-22\n",
" * http://hammerjs.github.io/\n",
" *\n",
" * Copyright (c) 2016 Jorik Tangelder;\n",
" * Licensed under the MIT license */\n",
" !function(e,n,i,o){\"use strict\";function s(t,e,r){return setTimeout(_(t,r),e)}function a(t,e,r){return!!Array.isArray(t)&&(l(t,r[e],r),!0)}function l(t,e,r){var n;if(t)if(t.forEach)t.forEach(e,r);else if(t.length!==o)for(n=0;n<t.length;)e.call(r,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function u(t,r,n){var i=\"DEPRECATED METHOD: \"+r+\"\\n\"+n+\" AT \\n\";return function(){var r=new Error(\"get-stack-trace\"),n=r&&r.stack?r.stack.replace(/^[^\\(]+?[\\n$]/gm,\"\").replace(/^\\s+at\\s+/gm,\"\").replace(/^Object.<anonymous>\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,n),t.apply(this,arguments)}}function c(t,e,r){var n,i=e.prototype;n=t.prototype=Object.create(i),n.constructor=t,n._super=i,r&&pt(n,r)}function _(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==yt?t.apply(e?e[0]||o:o,e):t}function p(t,e){return t===o?e:t}function d(t,e,r){l(v(e),function(e){t.addEventListener(e,r,!1)})}function f(t,e,r){l(v(e),function(e){t.removeEventListener(e,r,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function v(t){return t.trim().split(/\\s+/g)}function g(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;n<t.length;){if(r&&t[n][r]==e||!r&&t[n]===e)return n;n++}return-1}function b(t){return Array.prototype.slice.call(t,0)}function w(t,e,r){for(var n=[],i=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];g(i,s)<0&&n.push(t[o]),i[o]=s,o++}return r&&(n=e?n.sort(function(t,r){return t[e]>r[e]}):n.sort()),n}function x(t,e){for(var r,n,i=e[0].toUpperCase()+e.slice(1),s=0;s<dt.length;){if(r=dt[s],n=r?r+i:e,n in t)return n;s++}return o}function k(){return xt++}function M(t){var r=t.ownerDocument||t;return r.defaultView||r.parentWindow||e}function S(t,e){var r=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){h(t.options.enable,[t])&&r.handler(e)},this.init()}function T(t){var e,r=t.options.inputClass;return new(e=r?r:St?L:Tt?U:Mt?Y:R)(t,O)}function O(t,e,r){var n=r.pointers.length,i=r.changedPointers.length,o=e&zt&&n-i===0,s=e&(Nt|Dt)&&n-i===0;r.isFirst=!!o,r.isFinal=!!s,o&&(t.session={}),r.eventType=e,P(t,r),t.emit(\"hammer.input\",r),t.recognize(r),t.session.prevInput=r}function P(t,e){var r=t.session,n=e.pointers,i=n.length;r.firstInput||(r.firstInput=j(e)),i>1&&!r.firstMultiple?r.firstMultiple=j(e):1===i&&(r.firstMultiple=!1);var o=r.firstInput,s=r.firstMultiple,a=s?s.center:o.center,l=e.center=z(n);e.timeStamp=gt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=F(a,l),e.distance=D(a,l),A(r,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=C(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=vt(u.x)>vt(u.y)?u.x:u.y,e.scale=s?B(s.pointers,n):1,e.rotation=s?I(s.pointers,n):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,E(r,e);var c=t.element;y(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function A(t,e){var r=e.center,n=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==zt&&o.eventType!==Nt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-n.x),e.deltaY=i.y+(r.y-n.y)}function E(t,e){var r,n,i,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Dt&&(l>jt||a.velocity===o)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,_=C(l,u,c);n=_.x,i=_.y,r=vt(_.x)>vt(_.y)?_.x:_.y,s=N(u,c),t.lastInterval=e}else r=a.velocity,n=a.velocityX,i=a.velocityY,s=a.direction;e.velocity=r,e.velocityX=n,e.velocityY=i,e.direction=s}function j(t){for(var e=[],r=0;r<t.pointers.length;)e[r]={clientX:mt(t.pointers[r].clientX),clientY:mt(t.pointers[r].clientY)},r++;return{timeStamp:gt(),pointers:e,center:z(e),deltaX:t.deltaX,deltaY:t.deltaY}}function z(t){var e=t.length;if(1===e)return{x:mt(t[0].clientX),y:mt(t[0].clientY)};for(var r=0,n=0,i=0;i<e;)r+=t[i].clientX,n+=t[i].clientY,i++;return{x:mt(r/e),y:mt(n/e)}}function C(t,e,r){return{x:e/t||0,y:r/t||0}}function N(t,e){return t===e?Ft:vt(t)>=vt(e)?t<0?It:Bt:e<0?Rt:Lt}function D(t,e,r){r||(r=qt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(n*n+i*i)}function F(t,e,r){r||(r=qt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return 180*Math.atan2(i,n)/Math.PI}function I(t,e){return F(e[1],e[0],Yt)+F(t[1],t[0],Yt)}function B(t,e){return D(e[0],e[1],Yt)/D(t[0],t[1],Yt)}function R(){this.evEl=Wt,this.evWin=Ht,this.pressed=!1,S.apply(this,arguments)}function L(){this.evEl=$t,this.evWin=Zt,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=te,this.evWin=ee,this.started=!1,S.apply(this,arguments)}function G(t,e){var r=b(t.touches),n=b(t.changedTouches);return e&(Nt|Dt)&&(r=w(r.concat(n),\"identifier\",!0)),[r,n]}function U(){this.evTarget=ne,this.targetIds={},S.apply(this,arguments)}function q(t,e){var r=b(t.touches),n=this.targetIds;if(e&(zt|Ct)&&1===r.length)return n[r[0].identifier]=!0,[r,r];var i,o,s=b(t.changedTouches),a=[],l=this.target;if(o=r.filter(function(t){return y(t.target,l)}),e===zt)for(i=0;i<o.length;)n[o[i].identifier]=!0,i++;for(i=0;i<s.length;)n[s[i].identifier]&&a.push(s[i]),e&(Nt|Dt)&&delete n[s[i].identifier],i++;return a.length?[w(o.concat(a),\"identifier\",!0),a]:void 0}function Y(){S.apply(this,arguments);var t=_(this.handler,this);this.touch=new U(this.manager,t),this.mouse=new R(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function X(t,e){t&zt?(this.primaryTouch=e.changedPointers[0].identifier,W.call(this,e)):t&(Nt|Dt)&&W.call(this,e)}function W(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY};this.lastTouches.push(r);var n=this.lastTouches,i=function(){var t=n.indexOf(r);t>-1&&n.splice(t,1)};setTimeout(i,ie)}}function H(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],o=Math.abs(e-i.x),s=Math.abs(r-i.y);if(o<=oe&&s<=oe)return!0}return!1}function Q(t,e){this.manager=t,this.set(e)}function J(t){if(m(t,_e))return _e;var e=m(t,he),r=m(t,pe);return e&&r?_e:e||r?e?he:pe:m(t,ce)?ce:ue}function $(){if(!ae)return!1;var t={},r=e.CSS&&e.CSS.supports;return[\"auto\",\"manipulation\",\"pan-y\",\"pan-x\",\"pan-x pan-y\",\"none\"].forEach(function(n){t[n]=!r||e.CSS.supports(\"touch-action\",n)}),t}function Z(t){this.options=pt({},this.defaults,t||{}),this.id=k(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=fe,this.simultaneous={},this.requireFail=[]}function K(t){return t&be?\"cancel\":t&ve?\"end\":t&me?\"move\":t&ye?\"start\":\"\"}function tt(t){return t==Lt?\"down\":t==Rt?\"up\":t==It?\"left\":t==Bt?\"right\":\"\"}function et(t,e){var r=e.manager;return r?r.get(t):t}function rt(){Z.apply(this,arguments)}function nt(){rt.apply(this,arguments),this.pX=null,this.pY=null}function it(){rt.apply(this,arguments)}function ot(){Z.apply(this,arguments),this._timer=null,this._input=null}function st(){rt.apply(this,arguments)}function at(){rt.apply(this,arguments)}function lt(){Z.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ut(t,e){return e=e||{},e.recognizers=p(e.recognizers,ut.defaults.preset),new ct(t,e)}function ct(t,e){this.options=pt({},ut.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=T(this),this.touchAction=new Q(this,this.options.touchAction),_t(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function _t(t,e){var r=t.element;if(r.style){var n;l(t.options.cssProps,function(i,o){n=x(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||\"\"}),e||(t.oldCssProps={})}}function ht(t,e){var r=n.createEvent(\"Event\");r.initEvent(t,!0,!0),r.gesture=e,e.target.dispatchEvent(r)}var pt,dt=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],ft=n.createElement(\"div\"),yt=\"function\",mt=Math.round,vt=Math.abs,gt=Date.now;pt=\"function\"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(n!==o&&null!==n)for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e}:Object.assign;var bt=u(function(t,e,r){for(var n=Object.keys(e),i=0;i<n.length;)(!r||r&&t[n[i]]===o)&&(t[n[i]]=e[n[i]]),i++;return t},\"extend\",\"Use `assign`.\"),wt=u(function(t,e){return bt(t,e,!0)},\"merge\",\"Use `assign`.\"),xt=1,kt=/mobile|tablet|ip(ad|hone|od)|android/i,Mt=\"ontouchstart\"in e,St=x(e,\"PointerEvent\")!==o,Tt=Mt&&kt.test(navigator.userAgent),Ot=\"touch\",Pt=\"pen\",At=\"mouse\",Et=\"kinect\",jt=25,zt=1,Ct=2,Nt=4,Dt=8,Ft=1,It=2,Bt=4,Rt=8,Lt=16,Vt=It|Bt,Gt=Rt|Lt,Ut=Vt|Gt,qt=[\"x\",\"y\"],Yt=[\"clientX\",\"clientY\"];S.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(M(this.element),this.evWin,this.domHandler)}};var Xt={mousedown:zt,mousemove:Ct,mouseup:Nt},Wt=\"mousedown\",Ht=\"mousemove mouseup\";c(R,S,{handler:function(t){var e=Xt[t.type];e&zt&&0===t.button&&(this.pressed=!0),e&Ct&&1!==t.which&&(e=Nt),this.pressed&&(e&Nt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:At,srcEvent:t}))}});var Qt={pointerdown:zt,pointermove:Ct,pointerup:Nt,pointercancel:Dt,pointerout:Dt},Jt={2:Ot,3:Pt,4:At,5:Et},$t=\"pointerdown\",Zt=\"pointermove pointerup pointercancel\";e.MSPointerEvent&&!e.PointerEvent&&($t=\"MSPointerDown\",Zt=\"MSPointerMove MSPointerUp MSPointerCancel\"),c(L,S,{handler:function(t){var e=this.store,r=!1,n=t.type.toLowerCase().replace(\"ms\",\"\"),i=Qt[n],o=Jt[t.pointerType]||t.pointerType,s=o==Ot,a=g(e,t.pointerId,\"pointerId\");i&zt&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):i&(Nt|Dt)&&(r=!0),a<0||(e[a]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),r&&e.splice(a,1))}});var Kt={touchstart:zt,touchmove:Ct,touchend:Nt,touchcancel:Dt},te=\"touchstart\",ee=\"touchstart touchmove touchend touchcancel\";c(V,S,{handler:function(t){var e=Kt[t.type];if(e===zt&&(this.started=!0),this.started){var r=G.call(this,t,e);e&(Nt|Dt)&&r[0].length-r[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:r[0],changedPointers:r[1],pointerType:Ot,srcEvent:t})}}});var re={touchstart:zt,touchmove:Ct,touchend:Nt,touchcancel:Dt},ne=\"touchstart touchmove touchend touchcancel\";c(U,S,{handler:function(t){var e=re[t.type],r=q.call(this,t,e);r&&this.callback(this.manager,e,{pointers:r[0],changedPointers:r[1],pointerType:Ot,srcEvent:t})}});var ie=2500,oe=25;c(Y,S,{handler:function(t,e,r){var n=r.pointerType==Ot,i=r.pointerType==At;if(!(i&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(n)X.call(this,e,r);else if(i&&H.call(this,r))return;this.callback(t,e,r)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var se=x(ft.style,\"touchAction\"),ae=se!==o,le=\"compute\",ue=\"auto\",ce=\"manipulation\",_e=\"none\",he=\"pan-x\",pe=\"pan-y\",de=$();Q.prototype={set:function(t){t==le&&(t=this.compute()),ae&&this.manager.element.style&&de[t]&&(this.manager.element.style[se]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){h(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),J(t.join(\" \"))},preventDefaults:function(t){var e=t.srcEvent,r=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var n=this.actions,i=m(n,_e)&&!de[_e],o=m(n,pe)&&!de[pe],s=m(n,he)&&!de[he];if(i){var a=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(a&&l&&u)return}return s&&o?void 0:i||o&&r&Vt||s&&r&Gt?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var fe=1,ye=2,me=4,ve=8,ge=ve,be=16,we=32;Z.prototype={defaults:{},set:function(t){return pt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(a(t,\"recognizeWith\",this))return this;var e=this.simultaneous;return t=et(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return a(t,\"dropRecognizeWith\",this)?this:(t=et(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(a(t,\"requireFailure\",this))return this;var e=this.requireFail;return t=et(t,this),g(e,t)===-1&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(a(t,\"dropRequireFailure\",this))return this;t=et(t,this);var e=g(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){r.manager.emit(e,t)}var r=this,n=this.state;n<ve&&e(r.options.event+K(n)),e(r.options.event),t.additionalEvent&&e(t.additionalEvent),n>=ve&&e(r.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=we)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(we|fe)))return!1;t++}return!0},recognize:function(t){var e=pt({},t);return h(this.options.enable,[this,e])?(this.state&(ge|be|we)&&(this.state=fe),this.state=this.process(e),void(this.state&(ye|me|ve|be)&&this.tryEmit(e))):(this.reset(),void(this.state=we))},process:function(t){},getTouchAction:function(){},reset:function(){}},c(rt,Z,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,r=t.eventType,n=e&(ye|me),i=this.attrTest(t);return n&&(r&Dt||!i)?e|be:n||i?r&Nt?e|ve:e&ye?e|me:ye:we}}),c(nt,rt,{defaults:{event:\"pan\",threshold:10,pointers:1,direction:Ut},getTouchAction:function(){var t=this.options.direction,e=[];return t&Vt&&e.push(pe),t&Gt&&e.push(he),e},directionTest:function(t){var e=this.options,r=!0,n=t.distance,i=t.direction,o=t.deltaX,s=t.deltaY;return i&e.direction||(e.direction&Vt?(i=0===o?Ft:o<0?It:Bt,r=o!=this.pX,n=Math.abs(t.deltaX)):(i=0===s?Ft:s<0?Rt:Lt,r=s!=this.pY,n=Math.abs(t.deltaY))),t.direction=i,r&&n>e.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,rt,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ye)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(ot,Z,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,n=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!n||!r||t.eventType&(Nt|Dt)&&!i)this.reset();else if(t.eventType&zt)this.reset(),this._timer=s(function(){this.state=ge,this.tryEmit()},e.time,this);else if(t.eventType&Nt)return ge;return we},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ge&&(t&&t.eventType&Nt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),c(st,rt,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ye)}}),c(at,rt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Vt|Gt,pointers:1},getTouchAction:function(){return nt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,r=this.options.direction;return r&(Vt|Gt)?e=t.overallVelocity:r&Vt?e=t.overallVelocityX:r&Gt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventType&Nt},emit:function(t){var e=tt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(lt,Z,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,n=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),t.eventType&zt&&0===this.count)return this.failTimeout();if(n&&i&&r){if(t.eventType!=Nt)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t;var l=this.count%e.taps;if(0===l)return this.hasRequireFailures()?(this._timer=s(function(){this.state=ge,this.tryEmit()},e.interval,this),ye):ge}return we},failTimeout:function(){return this._timer=s(function(){this.state=we},this.options.interval,this),we},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ge&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ut.VERSION=\"2.0.7\",ut.defaults={domEvents:!1,touchAction:le,enable:!0,inputTarget:null,inputClass:null,preset:[[st,{enable:!1}],[it,{enable:!1},[\"rotate\"]],[at,{direction:Vt}],[nt,{direction:Vt},[\"swipe\"]],[lt],[lt,{event:\"doubletap\",taps:2},[\"tap\"]],[ot]],cssProps:{userSelect:\"none\",touchSelect:\"none\",touchCallout:\"none\",contentZooming:\"none\",userDrag:\"none\",tapHighlightColor:\"rgba(0,0,0,0)\"}};var xe=1,ke=2;ct.prototype={set:function(t){return pt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?ke:xe},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var r,n=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&ge)&&(i=e.curRecognizer=null);for(var o=0;o<n.length;)r=n[o],e.stopped===ke||i&&r!=i&&!r.canRecognizeWith(i)?r.reset():r.recognize(t),!i&&r.state&(ye|me|ve)&&(i=e.curRecognizer=r),o++}},get:function(t){if(t instanceof Z)return t;for(var e=this.recognizers,r=0;r<e.length;r++)if(e[r].options.event==t)return e[r];return null},add:function(t){if(a(t,\"add\",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(a(t,\"remove\",this))return this;if(t=this.get(t)){var e=this.recognizers,r=g(e,t);r!==-1&&(e.splice(r,1),this.touchAction.update())}return this},on:function(t,e){if(t!==o&&e!==o){var r=this.handlers;return l(v(t),function(t){r[t]=r[t]||[],r[t].push(e)}),this}},off:function(t,e){if(t!==o){var r=this.handlers;return l(v(t),function(t){e?r[t]&&r[t].splice(g(r[t],e),1):delete r[t]}),this}},emit:function(t,e){this.options.domEvents&&ht(t,e);var r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<r.length;)r[n](e),n++}},destroy:function(){this.element&&_t(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},pt(ut,{INPUT_START:zt,INPUT_MOVE:Ct,INPUT_END:Nt,INPUT_CANCEL:Dt,STATE_POSSIBLE:fe,STATE_BEGAN:ye,STATE_CHANGED:me,STATE_ENDED:ve,STATE_RECOGNIZED:ge,STATE_CANCELLED:be,STATE_FAILED:we,DIRECTION_NONE:Ft,DIRECTION_LEFT:It,DIRECTION_RIGHT:Bt,DIRECTION_UP:Rt,DIRECTION_DOWN:Lt,DIRECTION_HORIZONTAL:Vt,DIRECTION_VERTICAL:Gt,DIRECTION_ALL:Ut,Manager:ct,Input:S,TouchAction:Q,TouchInput:U,MouseInput:R,PointerEventInput:L,TouchMouseInput:Y,SingleTouchInput:V,Recognizer:Z,AttrRecognizer:rt,Tap:lt,Pan:nt,Swipe:at,Pinch:it,Rotate:st,Press:ot,on:d,off:f,each:l,merge:wt,extend:bt,assign:pt,inherit:c,bindFn:_,prefixed:x});var Me=\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{};Me.Hammer=ut,\"function\"==typeof t&&t.amd?t(function(){return ut}):\"undefined\"!=typeof r&&r.exports?r.exports=ut:e[i]=ut}(window,document,\"Hammer\")},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=t(321);!function(t){t[t.Le=0]=\"Le\",t[t.Ge=1]=\"Ge\",t[t.Eq=2]=\"Eq\"}(n=r.Operator||(r.Operator={}));var o=function(){function t(t,e,r){void 0===r&&(r=i.Strength.required),this._id=s++,this._operator=e,this._expression=t,this._strength=i.Strength.clip(r)}return t.Compare=function(t,e){return t.id-e.id},t.prototype.toString=function(){var t=this,e=function(){switch(t._operator){case n.Le:return\"<=\";case n.Ge:return\">=\";case n.Eq:return\"==\"}};return this._expression+\" \"+e()+\" 0\"},Object.defineProperty(t.prototype,\"id\",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"expression\",{get:function(){return this._expression},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"op\",{get:function(){return this._operator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"strength\",{get:function(){return this._strength},enumerable:!0,configurable:!0}),t}();r.Constraint=o;var s=0},function(t,e,r){\"use strict\";function n(t){for(var e=0,r=function(){return 0},n=s.createMap(o.Variable.Compare),i=0,a=t.length;i<a;++i){var l=t[i];if(\"number\"==typeof l)e+=l;else if(l instanceof o.Variable)n.setDefault(l,r).second+=1;else{if(!(l instanceof Array))throw new Error(\"invalid Expression argument: \"+JSON.stringify(l));if(2!==l.length)throw new Error(\"array must have length 2\");var u=l[0],c=l[1];if(\"number\"!=typeof u)throw new Error(\"array item 0 must be a number\");if(!(c instanceof o.Variable))throw new Error(\"array item 1 must be a variable\");n.setDefault(c,r).second+=u}}return{terms:n,constant:e}}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(325),o=t(328),s=t(319),a=function(){function t(){var t=n(arguments);this._terms=t.terms,this._constant=t.constant}return t.prototype.toString=function(){var t=[];i.forEach(this._terms,function(e){t.push([e.first,e.second])});for(var e=!0,r=\"\",n=0,o=t;n<o.length;n++){var s=o[n],a=s[0],l=s[1];e?(e=!1,r+=1==l?\"\"+a:l==-1?\"-\"+a:l+\"*\"+a):r+=1==l?\" + \"+a:l==-1?\" - \"+a:l>=0?\" + \"+l+a:\" - \"+-l+a}var u=this.constant;return u<0?r+=\" - \"+-u:u>0&&(r+=\" + \"+u),r},Object.defineProperty(t.prototype,\"terms\",{get:function(){return this._terms},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"constant\",{get:function(){return this._constant},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"value\",{get:function(){var t=this._constant;return i.forEach(this._terms,function(e){t+=e.first.value*e.second}),t},enumerable:!0,configurable:!0}),t}();r.Expression=a},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" function n(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),n(t(328)),n(t(317)),n(t(316)),n(t(321)),n(t(320))},function(t,e,r){\"use strict\";function n(t){return new i.AssociativeArray(t)}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(325);r.createMap=n},function(t,e,r){\"use strict\";function n(t){var e=1e-8;return t<0?-t<e:t<e}function i(){return h.createMap(c.Constraint.Compare)}function o(){return h.createMap(y.Compare)}function s(){return h.createMap(l.Variable.Compare)}function a(){return h.createMap(l.Variable.Compare)}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var l=t(328),u=t(317),c=t(316),_=t(321),h=t(319),p=t(325),d=function(){function t(){this._cnMap=i(),this._rowMap=o(),this._varMap=s(),this._editMap=a(),this._infeasibleRows=[],this._objective=new v,this._artificial=null,this._idTick=0}return t.prototype.addConstraint=function(t){var e=this._cnMap.find(t);if(void 0!==e)throw new Error(\"duplicate constraint\");var r=this._createRow(t),i=r.row,o=r.tag,s=this._chooseSubject(i,o);if(s.type()===f.Invalid&&i.allDummies()){if(!n(i.constant())){for(var a=[],l=0,u=t.expression.terms._array;l<u.length;l++){var c=u[l];a.push(c.first.name)}var _=[\"LE\",\"GE\",\"EQ\"][t.op];throw new Error(\"unsatisfiable constraint [\"+a.join(\",\")+\"] operator: \"+_)}s=o.marker}if(s.type()===f.Invalid){if(!this._addWithArtificialVariable(i))throw new Error(\"unsatisfiable constraint\")}else i.solveFor(s),this._substitute(s,i),this._rowMap.insert(s,i);this._cnMap.insert(t,o),this._optimize(this._objective)},t.prototype.removeConstraint=function(t,e){void 0===e&&(e=!1);var r=this._cnMap.erase(t);if(void 0===r){if(e)return;throw new Error(\"unknown constraint\")}this._removeConstraintEffects(t,r.second);var n=r.second.marker,i=this._rowMap.erase(n);if(void 0===i){var o=this._getMarkerLeavingSymbol(n);if(o.type()===f.Invalid)throw new Error(\"failed to find leaving row\");i=this._rowMap.erase(o),i.second.solveForEx(o,n),this._substitute(n,i.second)}this._optimize(this._objective)},t.prototype.hasConstraint=function(t){return this._cnMap.contains(t)},t.prototype.addEditVariable=function(t,e){var r=this._editMap.find(t);if(void 0!==r)throw new Error(\"duplicate edit variable: \"+t.name);if(e=_.Strength.clip(e),e===_.Strength.required)throw new Error(\"bad required strength\");var n=new u.Expression(t),i=new c.Constraint(n,c.Operator.Eq,e);this.addConstraint(i);var o=this._cnMap.find(i).second,s={tag:o,constraint:i,constant:0};this._editMap.insert(t,s)},t.prototype.removeEditVariable=function(t,e){void 0===e&&(e=!1);var r=this._editMap.erase(t);if(void 0===r){if(e)return;throw new Error(\"unknown edit variable: \"+t.name)}this.removeConstraint(r.second.constraint,e)},t.prototype.hasEditVariable=function(t){return this._editMap.contains(t)},t.prototype.suggestValue=function(t,e){var r=this._editMap.find(t);if(void 0===r)throw new Error(\"unknown edit variable: \"+t.name);var n=this._rowMap,i=r.second,o=e-i.constant;i.constant=e;var s=i.tag.marker,a=n.find(s);if(void 0!==a)return a.second.add(-o)<0&&this._infeasibleRows.push(s),void this._dualOptimize();var l=i.tag.other;if(a=n.find(l),void 0!==a)return a.second.add(o)<0&&this._infeasibleRows.push(l),void this._dualOptimize();for(var u=0,c=n.size();u<c;++u){var _=n.itemAt(u),h=_.second,p=h.coefficientFor(s);0!==p&&h.add(o*p)<0&&_.first.type()!==f.External&&this._infeasibleRows.push(_.first)}this._dualOptimize()},t.prototype.updateVariables=function(){for(var t=this._varMap,e=this._rowMap,r=0,n=t.size();r<n;++r){var i=t.itemAt(r),o=e.find(i.second),s=0;void 0!==o&&(s=o.second.constant(),s===-0&&(s=0)),i.first.setValue(s)}},t.prototype.getConstraints=function(){var t=[];return p.forEach(this._cnMap,function(e){t.push(e.first)}),t},Object.defineProperty(t.prototype,\"numConstraints\",{get:function(){return this._cnMap.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"numEditVariables\",{get:function(){return this._editMap.size()},enumerable:!0,configurable:!0}),t.prototype._getVarSymbol=function(t){var e=this,r=function(){return e._makeSymbol(f.External)};return this._varMap.setDefault(t,r).second},t.prototype._createRow=function(t){for(var e=t.expression,r=new v(e.constant),i=e.terms,o=0,s=i.size();o<s;++o){var a=i.itemAt(o);if(!n(a.second)){var l=this._getVarSymbol(a.first),u=this._rowMap.find(l);void 0!==u?r.insertRow(u.second,a.second):r.insertSymbol(l,a.second)}}var h=this._objective,p=t.strength,d={marker:m,other:m};switch(t.op){case c.Operator.Le:case c.Operator.Ge:var y=t.op===c.Operator.Le?1:-1,g=this._makeSymbol(f.Slack);if(d.marker=g,r.insertSymbol(g,y),p<_.Strength.required){var b=this._makeSymbol(f.Error);d.other=b,r.insertSymbol(b,-y),h.insertSymbol(b,p)}break;case c.Operator.Eq:if(p<_.Strength.required){var w=this._makeSymbol(f.Error),x=this._makeSymbol(f.Error);d.marker=w,d.other=x,r.insertSymbol(w,-1),r.insertSymbol(x,1),h.insertSymbol(w,p),h.insertSymbol(x,p)}else{var k=this._makeSymbol(f.Dummy);d.marker=k,r.insertSymbol(k)}}return r.constant()<0&&r.reverseSign(),{row:r,tag:d}},t.prototype._chooseSubject=function(t,e){for(var r=t.cells(),n=0,i=r.size();n<i;++n){var o=r.itemAt(n);if(o.first.type()===f.External)return o.first}var s=e.marker.type();return(s===f.Slack||s===f.Error)&&t.coefficientFor(e.marker)<0?e.marker:(s=e.other.type(),(s===f.Slack||s===f.Error)&&t.coefficientFor(e.other)<0?e.other:m)},t.prototype._addWithArtificialVariable=function(t){var e=this._makeSymbol(f.Slack);this._rowMap.insert(e,t.copy()),this._artificial=t.copy(),this._optimize(this._artificial);var r=n(this._artificial.constant());this._artificial=null;var i=this._rowMap.erase(e);if(void 0!==i){var o=i.second;if(o.isConstant())return r;var s=this._anyPivotableSymbol(o);if(s.type()===f.Invalid)return!1;o.solveForEx(e,s),this._substitute(s,o),this._rowMap.insert(s,o)}for(var a=this._rowMap,l=0,u=a.size();l<u;++l)a.itemAt(l).second.removeSymbol(e);return this._objective.removeSymbol(e),r},t.prototype._substitute=function(t,e){for(var r=this._rowMap,n=0,i=r.size();n<i;++n){var o=r.itemAt(n);o.second.substitute(t,e),o.second.constant()<0&&o.first.type()!==f.External&&this._infeasibleRows.push(o.first)}this._objective.substitute(t,e),this._artificial&&this._artificial.substitute(t,e)},t.prototype._optimize=function(t){for(;;){var e=this._getEnteringSymbol(t);if(e.type()===f.Invalid)return;var r=this._getLeavingSymbol(e);if(r.type()===f.Invalid)throw new Error(\"the objective is unbounded\");var n=this._rowMap.erase(r).second;n.solveForEx(r,e),this._substitute(e,n),this._rowMap.insert(e,n)}},t.prototype._dualOptimize=function(){for(var t=this._rowMap,e=this._infeasibleRows;0!==e.length;){var r=e.pop(),n=t.find(r);if(void 0!==n&&n.second.constant()<0){var i=this._getDualEnteringSymbol(n.second);if(i.type()===f.Invalid)throw new Error(\"dual optimize failed\");var o=n.second;t.erase(r),o.solveForEx(r,i),this._substitute(i,o),t.insert(i,o)}}},t.prototype._getEnteringSymbol=function(t){for(var e=t.cells(),r=0,n=e.size();r<n;++r){var i=e.itemAt(r),o=i.first;if(i.second<0&&o.type()!==f.Dummy)return o}return m},t.prototype._getDualEnteringSymbol=function(t){for(var e=Number.MAX_VALUE,r=m,n=t.cells(),i=0,o=n.size();i<o;++i){var s=n.itemAt(i),a=s.first,l=s.second;if(l>0&&a.type()!==f.Dummy){var u=this._objective.coefficientFor(a),c=u/l;c<e&&(e=c,r=a)}}return r},t.prototype._getLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,r=m,n=this._rowMap,i=0,o=n.size();i<o;++i){var s=n.itemAt(i),a=s.first;if(a.type()!==f.External){var l=s.second,u=l.coefficientFor(t);if(u<0){var c=-l.constant()/u;c<e&&(e=c,r=a)}}}return r},t.prototype._getMarkerLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,r=e,n=e,i=m,o=i,s=i,a=i,l=this._rowMap,u=0,c=l.size();u<c;++u){var _=l.itemAt(u),h=_.second,p=h.coefficientFor(t);if(0!==p){var d=_.first;if(d.type()===f.External)a=d;else if(p<0){var y=-h.constant()/p;y<r&&(r=y,o=d)}else{var y=h.constant()/p;y<n&&(n=y,s=d)}}}return o!==i?o:s!==i?s:a},t.prototype._removeConstraintEffects=function(t,e){e.marker.type()===f.Error&&this._removeMarkerEffects(e.marker,t.strength),e.other.type()===f.Error&&this._removeMarkerEffects(e.other,t.strength)},t.prototype._removeMarkerEffects=function(t,e){var r=this._rowMap.find(t);void 0!==r?this._objective.insertRow(r.second,-e):this._objective.insertSymbol(t,-e)},t.prototype._anyPivotableSymbol=function(t){for(var e=t.cells(),r=0,n=e.size();r<n;++r){var i=e.itemAt(r),o=i.first.type();if(o===f.Slack||o===f.Error)return i.first}return m},t.prototype._makeSymbol=function(t){return new y(t,(this._idTick++))},t}();r.Solver=d;var f;!function(t){t[t.Invalid=0]=\"Invalid\",t[t.External=1]=\"External\",t[t.Slack=2]=\"Slack\",t[t.Error=3]=\"Error\",t[t.Dummy=4]=\"Dummy\"}(f||(f={}));var y=function(){function t(t,e){this._id=e,this._type=t}return t.Compare=function(t,e){return t.id()-e.id()},t.prototype.id=function(){return this._id},t.prototype.type=function(){return this._type},t}(),m=new y(f.Invalid,(-1)),v=function(){function t(t){void 0===t&&(t=0),this._cellMap=h.createMap(y.Compare),this._constant=t}return t.prototype.cells=function(){return this._cellMap},t.prototype.constant=function(){return this._constant},t.prototype.isConstant=function(){return this._cellMap.empty()},t.prototype.allDummies=function(){for(var t=this._cellMap,e=0,r=t.size();e<r;++e){var n=t.itemAt(e);if(n.first.type()!==f.Dummy)return!1}return!0},t.prototype.copy=function(){var e=new t(this._constant);return e._cellMap=this._cellMap.copy(),e},t.prototype.add=function(t){return this._constant+=t},t.prototype.insertSymbol=function(t,e){void 0===e&&(e=1);var r=this._cellMap.setDefault(t,function(){return 0});n(r.second+=e)&&this._cellMap.erase(t)},t.prototype.insertRow=function(t,e){void 0===e&&(e=1),this._constant+=t._constant*e;for(var r=t._cellMap,n=0,i=r.size();n<i;++n){var o=r.itemAt(n);this.insertSymbol(o.first,o.second*e)}},t.prototype.removeSymbol=function(t){this._cellMap.erase(t)},t.prototype.reverseSign=function(){this._constant=-this._constant;for(var t=this._cellMap,e=0,r=t.size();e<r;++e){var n=t.itemAt(e);n.second=-n.second}},t.prototype.solveFor=function(t){var e=this._cellMap,r=e.erase(t),n=-1/r.second;this._constant*=n;for(var i=0,o=e.size();i<o;++i)e.itemAt(i).second*=n},t.prototype.solveForEx=function(t,e){this.insertSymbol(t,-1),this.solveFor(e)},t.prototype.coefficientFor=function(t){var e=this._cellMap.find(t);return void 0!==e?e.second:0},t.prototype.substitute=function(t,e){var r=this._cellMap.erase(t);void 0!==r&&this.insertRow(e,r.second)},t}()},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n;!function(t){function e(t,e,r,n){void 0===n&&(n=1);var i=0;return i+=1e6*Math.max(0,Math.min(1e3,t*n)),i+=1e3*Math.max(0,Math.min(1e3,e*n)),i+=Math.max(0,Math.min(1e3,r*n))}function r(e){return Math.max(0,Math.min(t.required,e))}t.create=e,t.required=e(1e3,1e3,1e3),t.strong=e(1,0,0),t.medium=e(0,1,0),t.weak=e(0,0,1),t.clip=r}(n=r.Strength||(r.Strength={}))},function(t,e,r){\"use strict\";function n(t,e,r){for(var n,i,o=0,s=t.length;s>0;)n=s>>1,i=o+n,r(t[i],e)<0?(o=i+1,s-=n+1):s=n;return o}function i(t,e,r){var i=n(t,e,r);if(i===t.length)return-1;var o=t[i];return 0!==r(o,e)?-1:i}function o(t,e,r){var i=n(t,e,r);if(i!==t.length){var o=t[i];if(0===r(o,e))return o}}function s(t,e){var r=p.asArray(t),n=r.length;if(n<=1)return r;r.sort(e);for(var i=[r[0]],o=1,s=0;o<n;++o){var a=r[o];0!==e(i[s],a)&&(i.push(a),++s)}return i}function a(t,e,r){for(var n=0,i=0,o=t.length,s=e.length;n<o&&i<s;){var a=r(t[n],e[i]);if(a<0)++n;else{if(!(a>0))return!1;++i}}return!0}function l(t,e,r){var n=t.length,i=e.length;if(n>i)return!1;for(var o=0,s=0;o<n&&s<i;){var a=r(t[o],e[s]);if(a<0)return!1;a>0?++s:(++o,++s)}return!(o<n)}function u(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n<o&&i<s;){var l=t[n],u=e[i],c=r(l,u);c<0?(a.push(l),++n):c>0?(a.push(u),++i):(a.push(l),++n,++i)}for(;n<o;)a.push(t[n]),++n;for(;i<s;)a.push(e[i]),++i;return a}function c(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n<o&&i<s;){var l=t[n],u=e[i],c=r(l,u);c<0?++n:c>0?++i:(a.push(l),++n,++i)}return a}function _(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n<o&&i<s;){var l=t[n],u=e[i],c=r(l,u);c<0?(a.push(l),++n):c>0?++i:(++n,++i)}for(;n<o;)a.push(t[n]),++n;return a}function h(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n<o&&i<s;){var l=t[n],u=e[i],c=r(l,u);c<0?(a.push(l),++n):c>0?(a.push(u),++i):(++n,++i)}for(;n<o;)a.push(t[n]),++n;for(;i<s;)a.push(e[i]),++i;return a}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var p=t(326);r.lowerBound=n,r.binarySearch=i,r.binaryFind=o,r.asSet=s,r.setIsDisjoint=a,r.setIsSubset=l,r.setUnion=u,r.setIntersection=c,r.setDifference=_,r.setSymmetricDifference=h},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(326),i=function(){function t(){this._array=[]}return t.prototype.size=function(){return this._array.length},t.prototype.empty=function(){return 0===this._array.length},t.prototype.itemAt=function(t){return this._array[t]},t.prototype.takeAt=function(t){return this._array.splice(t,1)[0]},t.prototype.clear=function(){this._array=[]},t.prototype.swap=function(t){var e=this._array;this._array=t._array,t._array=e},t.prototype.__iter__=function(){return n.iter(this._array)},t.prototype.__reversed__=function(){return n.reversed(this._array)},t}();r.ArrayBase=i},function(t,e,r){\"use strict\";function n(t){return function(e,r){return t(e.first,r)}}function i(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n<o&&i<s;){var l=t[n],u=e[i],c=r(l.first,u.first);c<0?(a.push(l.copy()),++n):c>0?(a.push(u.copy()),++i):(a.push(u.copy()),++n,++i)}for(;n<o;)a.push(t[n].copy()),++n;for(;i<s;)a.push(e[i].copy()),++i;return a}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(r,\"__esModule\",{value:!0});var s=t(327),a=t(323),l=t(322),u=t(326),c=function(t){function e(e){var r=t.call(this)||this;return r._compare=e,r._wrapped=n(e),r}return o(e,t),e.prototype.comparitor=function(){return this._compare},e.prototype.indexOf=function(t){return l.binarySearch(this._array,t,this._wrapped)},e.prototype.contains=function(t){return l.binarySearch(this._array,t,this._wrapped)>=0},e.prototype.find=function(t){return l.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e());return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e());return r.splice(n,0,i),i}return o},e.prototype.insert=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e);return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e);return r.splice(n,0,i),i}return o.second=e,o},e.prototype.update=function(t){var r=this;t instanceof e?this._array=i(this._array,t._array,this._compare):u.forEach(t,function(t){r.insert(t.first,t.second)})},e.prototype.erase=function(t){var e=this._array,r=l.binarySearch(e,t,this._wrapped);if(!(r<0))return e.splice(r,1)[0]},e.prototype.copy=function(){for(var t=new e(this._compare),r=t._array,n=this._array,i=0,o=n.length;i<o;++i)r.push(n[i].copy());return t},e}(a.ArrayBase);r.AssociativeArray=c},function(t,e,r){\"use strict\";function n(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),n(t(322)),n(t(323)),n(t(324)),n(t(326)),n(t(327))},function(t,e,r){\"use strict\";function n(t){return t instanceof Array?new c(t):t.__iter__()}function i(t){return t instanceof Array?new _(t):t.__reversed__()}function o(t){return t.__next__()}function s(t){if(t instanceof Array)return t.slice();for(var e,r=[],n=t.__iter__();void 0!==(e=n.__next__());)r.push(e);return r}function a(t,e){if(t instanceof Array){for(var r=0,n=t.length;r<n;++r)if(e(t[r])===!1)return}else for(var i,o=t.__iter__();void 0!==(i=o.__next__());)if(e(i)===!1)return}function l(t,e){var r=[];if(t instanceof Array)for(var n=0,i=t.length;n<i;++n)r.push(e(t[n]));else for(var o,s=t.__iter__();void 0!==(o=s.__next__());)r.push(e(o));return r}function u(t,e){var r,n=[];if(t instanceof Array)for(var i=0,o=t.length;i<o;++i)r=t[i],e(r)&&n.push(r);else for(var s=t.__iter__();void 0!==(r=s.__next__());)e(r)&&n.push(r);return n}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var c=function(){function t(t,e){\"undefined\"==typeof e&&(e=0),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[this._index++]},t.prototype.__iter__=function(){return this},t}();r.ArrayIterator=c;var _=function(){function t(t,e){\"undefined\"==typeof e&&(e=t.length),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[--this._index]},t.prototype.__iter__=function(){return this},t}();r.ReverseArrayIterator=_,r.iter=n,r.reversed=i,r.next=o,r.asArray=s,r.forEach=a,r.map=l,r.filter=u},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.copy=function(){return new t(this.first,this.second)},t}();r.Pair=n},function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(){function t(t){void 0===t&&(t=\"\"),this._value=0,this._context=null,this._id=i++,this._name=t}return t.Compare=function(t,e){return t.id-e.id},t.prototype.toString=function(){return this._name},Object.defineProperty(t.prototype,\"id\",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"name\",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.setName=function(t){this._name=t},Object.defineProperty(t.prototype,\"context\",{get:function(){return this._context},enumerable:!0,configurable:!0}),t.prototype.setContext=function(t){this._context=t},Object.defineProperty(t.prototype,\"value\",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){this._value=t},t}();r.Variable=n;var i=0},function(t,e,r){function n(t){this._value=t}function i(t){var e,r=\"\";for(e=0;e<t;e++)r+=\"0\";return r}function o(t,e){var r,n,o,s,a;return a=t.toString(),r=a.split(\"e\")[0],s=a.split(\"e\")[1],n=r.split(\".\")[0],o=r.split(\".\")[1]||\"\",a=n+o+i(s-o.length),e>0&&(a+=\".\"+i(e)),a}function s(t,e,r,n){var i,s,a=Math.pow(10,e);return s=t.toFixed(0).search(\"e\")>-1?o(t,e):(r(t*a)/a).toFixed(e),n&&(i=new RegExp(\"0{1,\"+n+\"}$\"),s=s.replace(i,\"\")),s}function a(t,e,r){var n;return n=e.indexOf(\"$\")>-1?l(t,e,r):e.indexOf(\"%\")>-1?u(t,e,r):e.indexOf(\":\")>-1?c(t):_(t,e,r)}function l(t,e,r){var n,i,o=e,s=o.indexOf(\"$\"),a=o.indexOf(\"(\"),l=o.indexOf(\"+\"),u=o.indexOf(\"-\"),c=\"\",h=\"\";if(o.indexOf(\"$\")===-1?\"infix\"===m[g].currency.position?(h=m[g].currency.symbol,m[g].currency.spaceSeparated&&(h=\" \"+h+\" \")):m[g].currency.spaceSeparated&&(c=\" \"):o.indexOf(\" $\")>-1?(c=\" \",o=o.replace(\" $\",\"\")):o.indexOf(\"$ \")>-1?(c=\" \",o=o.replace(\"$ \",\"\")):o=o.replace(\"$\",\"\"),i=_(t,o,r,h),e.indexOf(\"$\")===-1)switch(m[g].currency.position){case\"postfix\":i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+m[g].currency.symbol),i=i.join(\"\")):i=i+c+m[g].currency.symbol;break;case\"infix\":break;case\"prefix\":i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),n=Math.max(a,u)+1,i.splice(n,0,m[g].currency.symbol+c),i=i.join(\"\")):i=m[g].currency.symbol+c+i;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else s<=1?i.indexOf(\"(\")>-1||i.indexOf(\"+\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),n=1,(s<a||s<l||s<u)&&(n=0),i.splice(n,0,m[g].currency.symbol+c),i=i.join(\"\")):i=m[g].currency.symbol+c+i:i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+m[g].currency.symbol),i=i.join(\"\")):i=i+c+m[g].currency.symbol;return i}function u(t,e,r){var n,i=\"\";return t=100*t,e.indexOf(\" %\")>-1?(i=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\"),n=_(t,e,r),n.indexOf(\")\")>-1?(n=n.split(\"\"),n.splice(-1,0,i+\"%\"),n=n.join(\"\")):n=n+i+\"%\",n}function c(t){var e=Math.floor(t/60/60),r=Math.floor((t-60*e*60)/60),n=Math.round(t-60*e*60-60*r);return e+\":\"+(r<10?\"0\"+r:r)+\":\"+(n<10?\"0\"+n:n)}function _(t,e,r,n){var i,o,a,l,u,c,_,h,p,d,f,y,v,w,x,k,M,S,T=!1,O=!1,P=!1,A=\"\",E=!1,j=!1,z=!1,C=!1,N=!1,D=\"\",F=\"\",I=Math.abs(t),B=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],R=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],L=\"\",V=!1,G=!1,U=\"\";if(0===t&&null!==b)return b;if(!isFinite(t))return\"\"+t;if(0===e.indexOf(\"{\")){var q=e.indexOf(\"}\");if(q===-1)throw Error('Format should also contain a \"}\"');y=e.slice(1,q),e=e.slice(q+1)}else y=\"\";if(e.indexOf(\"}\")===e.length-1){var Y=e.indexOf(\"{\");if(Y===-1)throw Error('Format should also contain a \"{\"');v=e.slice(Y+1,-1),e=e.slice(0,Y+1)}else v=\"\";var X;if(X=e.indexOf(\".\")===-1?e.match(/([0-9]+).*/):e.match(/([0-9]+)\\..*/),S=null===X?-1:X[1].length,e.indexOf(\"-\")!==-1&&(V=!0),e.indexOf(\"(\")>-1?(T=!0,e=e.slice(1,-1)):e.indexOf(\"+\")>-1&&(O=!0,e=e.replace(/\\+/g,\"\")),e.indexOf(\"a\")>-1){if(d=e.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],d=parseInt(d[0],10),E=e.indexOf(\"aK\")>=0,j=e.indexOf(\"aM\")>=0,z=e.indexOf(\"aB\")>=0,C=e.indexOf(\"aT\")>=0,N=E||j||z||C,e.indexOf(\" a\")>-1?(A=\" \",e=e.replace(\" a\",\"\")):e=e.replace(\"a\",\"\"),u=Math.floor(Math.log(I)/Math.LN10)+1,_=u%3,_=0===_?3:_,d&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-d,h=3*~~((Math.min(d,u)-_)/3),I/=Math.pow(10,h),e.indexOf(\".\")===-1&&d>3))for(e+=\"[.]\",k=0===c?0:3*~~(c/3)-c,k=k<0?k+3:k,i=0;i<k;i++)e+=\"0\";Math.floor(Math.log(Math.abs(t))/Math.LN10)+1!==d&&(I>=Math.pow(10,12)&&!N||C?(A+=m[g].abbreviations.trillion,t/=Math.pow(10,12)):I<Math.pow(10,12)&&I>=Math.pow(10,9)&&!N||z?(A+=m[g].abbreviations.billion,t/=Math.pow(10,9)):I<Math.pow(10,9)&&I>=Math.pow(10,6)&&!N||j?(A+=m[g].abbreviations.million,t/=Math.pow(10,6)):(I<Math.pow(10,6)&&I>=Math.pow(10,3)&&!N||E)&&(A+=m[g].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf(\"b\")>-1)for(e.indexOf(\" b\")>-1?(D=\" \",e=e.replace(\" b\",\"\")):e=e.replace(\"b\",\"\"),l=0;l<=B.length;l++)if(o=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=o&&t<a){D+=B[l],o>0&&(t/=o);break}if(e.indexOf(\"d\")>-1)for(e.indexOf(\" d\")>-1?(D=\" \",e=e.replace(\" d\",\"\")):e=e.replace(\"d\",\"\"),l=0;l<=R.length;l++)if(o=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=o&&t<a){D+=R[l],o>0&&(t/=o);break}if(e.indexOf(\"o\")>-1&&(e.indexOf(\" o\")>-1?(F=\" \",e=e.replace(\" o\",\"\")):e=e.replace(\"o\",\"\"),m[g].ordinal&&(F+=m[g].ordinal(t))),e.indexOf(\"[.]\")>-1&&(P=!0,e=e.replace(\"[.]\",\".\")),p=t.toString().split(\".\")[0],f=e.split(\".\")[1],w=e.indexOf(\",\"),f){if(f.indexOf(\"*\")!==-1?L=s(t,t.toString().split(\".\")[1].length,r):f.indexOf(\"[\")>-1?(f=f.replace(\"]\",\"\"),f=f.split(\"[\"),L=s(t,f[0].length+f[1].length,r,f[1].length)):L=s(t,f.length,r),p=L.split(\".\")[0],L.split(\".\")[1].length){var W=n?A+n:m[g].delimiters.decimal;L=W+L.split(\".\")[1]}else L=\"\";P&&0===Number(L.slice(1))&&(L=\"\")}else p=s(t,null,r);return p.indexOf(\"-\")>-1&&(p=p.slice(1),G=!0),p.length<S&&(p=new Array(S-p.length+1).join(\"0\")+p),w>-1&&(p=p.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+m[g].delimiters.thousands)),0===e.indexOf(\".\")&&(p=\"\"),x=e.indexOf(\"(\"),M=e.indexOf(\"-\"),U=x<M?(T&&G?\"(\":\"\")+(V&&G||!T&&G?\"-\":\"\"):(V&&G||!T&&G?\"-\":\"\")+(T&&G?\"(\":\"\"),y+U+(!G&&O&&0!==t?\"+\":\"\")+p+L+(F?F:\"\")+(A&&!n?A:\"\")+(D?D:\"\")+(T&&G?\")\":\"\")+v}function h(t,e){m[t]=e}function p(t){g=t;var e=m[t].defaults;e&&e.format&&f.defaultFormat(e.format),e&&e.currencyFormat&&f.defaultCurrencyFormat(e.currencyFormat)}function d(t,e,r,n){return null!=r&&r!==f.culture()&&f.setCulture(r),a(Number(t),null!=e?e:w,null==n?Math.round:n)}/*!\n",
" * numbro.js\n",
" * version : 1.6.2\n",
" * author : Företagsplatsen AB\n",
" * license : MIT\n",
" * http://www.foretagsplatsen.se\n",
" */\n",
" var f,y=\"1.6.2\",m={},v=m,g=\"en-US\",b=null,w=\"0,0\",x=\"0$\",k=(\"undefined\"!=typeof e&&e.exports,{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?\"th\":1===e?\"st\":2===e?\"nd\":3===e?\"rd\":\"th\"},currency:{symbol:\"$\",position:\"prefix\"},defaults:{currencyFormat:\",0000 a\"},formats:{fourDigits:\"0000 a\",fullWithTwoDecimals:\"$ ,0.00\",fullWithTwoDecimalsNoCurrency:\",0.00\"}});f=function(t){return f.isNumbro(t)?t=t.value():0===t||\"undefined\"==typeof t?t=0:Number(t)||(t=f.fn.unformat(t)),new n(Number(t))},f.version=y,f.isNumbro=function(t){return t instanceof n},f.setLanguage=function(t,e){console.warn(\"`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead\");var r=t,n=t.split(\"-\")[0],i=null;v[r]||(Object.keys(v).forEach(function(t){i||t.split(\"-\")[0]!==n||(i=t)}),r=i||e||\"en-US\"),p(r)},f.setCulture=function(t,e){var r=t,n=t.split(\"-\")[1],i=null;m[r]||(n&&Object.keys(m).forEach(function(t){i||t.split(\"-\")[1]!==n||(i=t)}),r=i||e||\"en-US\"),p(r)},f.language=function(t,e){if(console.warn(\"`language` is deprecated since version 1.6.0. Use `culture` instead\"),!t)return g;if(t&&!e){if(!v[t])throw new Error(\"Unknown language : \"+t);p(t)}return!e&&v[t]||h(t,e),f},f.culture=function(t,e){if(!t)return g;if(t&&!e){if(!m[t])throw new Error(\"Unknown culture : \"+t);p(t)}return!e&&m[t]||h(t,e),f},f.languageData=function(t){if(console.warn(\"`languageData` is deprecated since version 1.6.0. Use `cultureData` instead\"),!t)return v[g];if(!v[t])throw new Error(\"Unknown language : \"+t);return v[t]},f.cultureData=function(t){if(!t)return m[g];if(!m[t])throw new Error(\"Unknown culture : \"+t);return m[t]},f.culture(\"en-US\",k),f.languages=function(){return console.warn(\"`languages` is deprecated since version 1.6.0. Use `cultures` instead\"),v},f.cultures=function(){return m},f.zeroFormat=function(t){b=\"string\"==typeof t?t:null},f.defaultFormat=function(t){w=\"string\"==typeof t?t:\"0.0\"},f.defaultCurrencyFormat=function(t){x=\"string\"==typeof t?t:\"0$\"},f.validate=function(t,e){var r,n,i,o,s,a,l,u;if(\"string\"!=typeof t&&(t+=\"\",console.warn&&console.warn(\"Numbro.js: Value is not string. It has been co-erced to: \",t)),t=t.trim(),t.match(/^\\d+$/))return!0;if(\"\"===t)return!1;try{l=f.cultureData(e)}catch(c){l=f.cultureData(f.culture())}return i=l.currency.symbol,s=l.abbreviations,r=l.delimiters.decimal,n=\".\"===l.delimiters.thousands?\"\\\\.\":l.delimiters.thousands,u=t.match(/^[^\\d]+/),(null===u||(t=t.substr(1),u[0]===i))&&(u=t.match(/[^\\d]+$/),(null===u||(t=t.slice(0,-1),u[0]===s.thousand||u[0]===s.million||u[0]===s.billion||u[0]===s.trillion))&&(a=new RegExp(n+\"{2}\"),!t.match(/[^\\d.,]/g)&&(o=t.split(r),!(o.length>2)&&(o.length<2?!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(a):1===o[0].length?!!o[0].match(/^\\d+$/)&&!o[0].match(a)&&!!o[1].match(/^\\d+$/):!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(a)&&!!o[1].match(/^\\d+$/)))))},e.exports={format:d}},function(t,e,r){function n(t,e){if(!(this instanceof n))return new n(t);e=e||function(t){if(t)throw t};var r=i(t);if(\"object\"!=typeof r)return void e(t);var s=n.projections.get(r.projName);if(!s)return void e(t);if(r.datumCode&&\"none\"!==r.datumCode){var c=l[r.datumCode];c&&(r.datum_params=c.towgs84?c.towgs84.split(\",\"):null,r.ellps=c.ellipse,r.datumName=c.datumName?c.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||\"enu\";var _=a.sphere(r.a,r.b,r.rf,r.ellps,r.sphere),h=a.eccentricity(_.a,_.b,_.rf,r.R_A),p=r.datum||u(r.datumCode,r.datum_params,_.a,_.b,h.es,h.ep2);o(this,r),o(this,s),this.a=_.a,this.b=_.b,this.rf=_.rf,this.sphere=_.sphere,this.es=h.es,this.e=h.e,this.ep2=h.ep2,this.datum=p,this.init(),e(null,this)}var i=t(350),o=t(348),s=t(352),a=t(347),l=t(338),u=t(343);n.projections=s,n.projections.start(),e.exports=n},function(t,e,r){e.exports=function(t,e,r){var n,i,o,s=r.x,a=r.y,l=r.z||0,u={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==r.z)switch(0===o?(n=s,i=\"x\"):1===o?(n=a,i=\"y\"):(n=l,i=\"z\"),t.axis[o]){case\"e\":u[i]=n;break;case\"w\":u[i]=-n;break;case\"n\":u[i]=n;break;case\"s\":u[i]=-n;break;case\"u\":void 0!==r[i]&&(u.z=n);break;case\"d\":void 0!==r[i]&&(u.z=-n);break;default:return null}return u}},function(t,e,r){var n=2*Math.PI,i=3.14159265359,o=t(335);e.exports=function(t){return Math.abs(t)<=i?t:t-o(t)*n}},function(t,e,r){e.exports=function(t,e,r){var n=t*e;return r/Math.sqrt(1-n*n)}},function(t,e,r){var n=Math.PI/2;e.exports=function(t,e){for(var r,i,o=.5*t,s=n-2*Math.atan(e),a=0;a<=15;a++)if(r=t*Math.sin(s),i=n-2*Math.atan(e*Math.pow((1-r)/(1+r),o))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}},function(t,e,r){e.exports=function(t){return t<0?-1:1}},function(t,e,r){e.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},function(t,e,r){var n=Math.PI/2;e.exports=function(t,e,r){var i=t*r,o=.5*t;return i=Math.pow((1-i)/(1+i),o),Math.tan(.5*(n-e))/i}},function(t,e,r){r.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},r.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},r.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},r.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},r.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},r.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},r.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},r.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},r.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},r.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},r.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},r.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},r.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},r.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},r.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},r.rnb72={towgs84:\"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",ellipse:\"intl\",datumName:\"Reseau National Belge 1972\"}},function(t,e,r){r.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},r.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},r.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},r.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},r.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},r.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},r.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},r.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},r.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},r.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},r.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},r.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},r.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},r.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},r.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},r.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},r.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},r.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},r.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},r.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},r.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},r.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},r.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},r.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},r.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},r.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},r.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},r.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},r.hough={a:6378270,rf:297,ellipseName:\"Hough\"},r.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},r.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},r.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},r.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},r.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},r.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},r.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},r.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},r.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},r.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},r.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},r.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},r.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},r.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},function(t,e,r){r.greenwich=0,r.lisbon=-9.131906111111,r.paris=2.337229166667,r.bogota=-74.080916666667,r.madrid=-3.687938888889,r.rome=12.452333333333,r.bern=7.439583333333,r.jakarta=106.807719444444,r.ferro=-17.666666666667,r.brussels=4.367975,r.stockholm=18.058277777778,r.athens=23.7163375,r.oslo=10.722916666667},function(t,e,r){r.ft={to_meter:.3048},r[\"us-ft\"]={to_meter:1200/3937}},function(t,e,r){function n(t,e,r){var n;return Array.isArray(r)?(n=a(t,e,r),3===r.length?[n.x,n.y,n.z]:[n.x,n.y]):a(t,e,r)}function i(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function o(t,e,r){t=i(t);var o,s=!1;return\"undefined\"==typeof e?(e=t,t=l,s=!0):(\"undefined\"!=typeof e.x||Array.isArray(e))&&(r=e,e=t,t=l,s=!0),e=i(e),r?n(t,e,r):(o={forward:function(r){return n(t,e,r)},inverse:function(r){return n(e,t,r)}},s&&(o.oProj=e),o)}var s=t(330),a=t(355),l=s(\"WGS84\");e.exports=o},function(t,e,r){function n(t,e,r,n,u,c){var _={};return _.datum_type=s,t&&\"none\"===t&&(_.datum_type=a),e&&(_.datum_params=e.map(parseFloat),0===_.datum_params[0]&&0===_.datum_params[1]&&0===_.datum_params[2]||(_.datum_type=i),_.datum_params.length>3&&(0===_.datum_params[3]&&0===_.datum_params[4]&&0===_.datum_params[5]&&0===_.datum_params[6]||(_.datum_type=o,_.datum_params[3]*=l,_.datum_params[4]*=l,_.datum_params[5]*=l,_.datum_params[6]=_.datum_params[6]/1e6+1))),_.a=r,_.b=n,_.es=u,_.ep2=c,_}var i=1,o=2,s=4,a=5,l=484813681109536e-20;e.exports=n},function(t,e,r){\"use strict\";var n=1,i=2,o=Math.PI/2;r.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(t.datum_type===n?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))},r.geodeticToGeocentric=function(t,e,r){var n,i,s,a,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-o&&u>-1.001*o)u=-o;else if(u>o&&u<1.001*o)u=o;else if(u<-o||u>o)return null;return l>Math.PI&&(l-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),s=i*i,n=r/Math.sqrt(1-e*s),{x:(n+c)*a*Math.cos(l),y:(n+c)*a*Math.sin(l),z:(n*(1-e)+c)*i}},r.geocentricToGeodetic=function(t,e,r,n){var i,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w=1e-12,x=w*w,k=30,M=t.x,S=t.y,T=t.z?t.z:0;if(i=Math.sqrt(M*M+S*S),s=Math.sqrt(M*M+S*S+T*T),i/r<w){if(v=0,s/r<w)return g=o,b=-n,{x:t.x,y:t.y,z:t.z}}else v=Math.atan2(S,M);a=T/s,l=i/s,u=1/Math.sqrt(1-e*(2-e)*l*l),h=l*(1-e)*u,p=a*u,m=0;do m++,_=r/Math.sqrt(1-e*p*p),b=i*h+T*p-_*(1-e*p*p),c=e*_/(_+b),u=1/Math.sqrt(1-c*(2-c)*l*l),d=l*(1-c)*u,f=a*u,y=f*h-d*p,h=d,p=f;while(y*y>x&&m<k);return g=Math.atan(f/Math.abs(d)),{x:v,y:g,z:b}},r.geocentricToWgs84=function(t,e,r){if(e===n)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===i){var o=r[0],s=r[1],a=r[2],l=r[3],u=r[4],c=r[5],_=r[6];return{x:_*(t.x-c*t.y+u*t.z)+o,y:_*(c*t.x+t.y-l*t.z)+s,z:_*(-u*t.x+l*t.y+t.z)+a}}},r.geocentricFromWgs84=function(t,e,r){if(e===n)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===i){var o=r[0],s=r[1],a=r[2],l=r[3],u=r[4],c=r[5],_=r[6],h=(t.x-o)/_,p=(t.y-s)/_,d=(t.z-a)/_;return{x:h+c*p-u*d,y:-c*h+p+l*d,z:u*h-l*p+d}}}},function(t,e,r){function n(t){return t===i||t===o}var i=1,o=2,s=5,a=t(344);e.exports=function(t,e,r){return a.compareDatums(t,e)?r:t.datum_type===s||e.datum_type===s?r:t.es!==e.es||t.a!==e.a||n(t.datum_type)||n(e.datum_type)?(r=a.geodeticToGeocentric(r,t.es,t.a),n(t.datum_type)&&(r=a.geocentricToWgs84(r,t.datum_type,t.datum_params)),n(e.datum_type)&&(r=a.geocentricFromWgs84(r,e.datum_type,e.datum_params)),a.geocentricToGeodetic(r,e.es,e.a,e.b)):r}},function(t,e,r){function n(t){var e=this;if(2===arguments.length){var r=arguments[1];\"string\"==typeof r?\"+\"===r.charAt(0)?n[t]=o(arguments[1]):n[t]=s(arguments[1]):n[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?n.apply(e,t):n(t)});if(\"string\"==typeof t){if(t in n)return n[t]}else\"EPSG\"in t?n[\"EPSG:\"+t.EPSG]=t:\"ESRI\"in t?n[\"ESRI:\"+t.ESRI]=t:\"IAU2000\"in t?n[\"IAU2000:\"+t.IAU2000]=t:console.log(t);return}}var i=t(349),o=t(351),s=t(356);i(n),e.exports=n},function(t,e,r){var n=.16666666666666666,i=.04722222222222222,o=.022156084656084655,s=1e-10,a=t(339);r.eccentricity=function(t,e,r,s){var a=t*t,l=e*e,u=(a-l)/a,c=0;s?(t*=1-u*(n+u*(i+u*o)),a=t*t,u=0):c=Math.sqrt(u);var _=(a-l)/l;return{es:u,e:c,ep2:_}},r.sphere=function(t,e,r,n,i){if(!t){var o=a[n];o||(o=a.WGS84),t=o.a,e=o.b,r=o.rf}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)<s)&&(i=!0,e=t),{a:t,b:e,rf:r,sphere:i}}},function(t,e,r){e.exports=function(t,e){t=t||{};var r,n;if(!e)return t;for(n in e)r=e[n],void 0!==r&&(t[n]=r);return t}},function(t,e,r){e.exports=function(t){t(\"EPSG:4326\",\"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\"),t(\"EPSG:4269\",\"+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees\"),t(\"EPSG:3857\",\"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs\"),t.WGS84=t[\"EPSG:4326\"],t[\"EPSG:3785\"]=t[\"EPSG:3857\"],t.GOOGLE=t[\"EPSG:3857\"],t[\"EPSG:900913\"]=t[\"EPSG:3857\"],t[\"EPSG:102113\"]=t[\"EPSG:3857\"]}},function(t,e,r){function n(t){return\"string\"==typeof t}function i(t){return t in l}function o(t){return _.some(function(e){return t.indexOf(e)>-1})}function s(t){return\"+\"===t[0]}function a(t){return n(t)?i(t)?l[t]:o(t)?u(t):s(t)?c(t):void 0:t}var l=t(346),u=t(356),c=t(351),_=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];e.exports=a},function(t,e,r){var n=.017453292519943295,i=t(340),o=t(341);e.exports=function(t){var e,r,s,a={},l=t.split(\"+\").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var r=e.split(\"=\");return r.push(!0),t[r[0].toLowerCase()]=r[1],t},{}),u={proj:\"projName\",datum:\"datumCode\",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*n},lat_1:function(t){a.lat1=t*n},lat_2:function(t){a.lat2=t*n},lat_ts:function(t){a.lat_ts=t*n},lon_0:function(t){a.long0=t*n},lon_1:function(t){a.long1=t*n},lon_2:function(t){a.long2=t*n},alpha:function(t){a.alpha=parseFloat(t)*n},lonc:function(t){a.longc=t*n},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(\",\").map(function(t){return parseFloat(t)})},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t,o[t]&&(a.to_meter=o[t].to_meter)},from_greenwich:function(t){a.from_greenwich=t*n},pm:function(t){a.from_greenwich=(i[t]?i[t]:parseFloat(t))*n},nadgrids:function(t){\"@null\"===t?a.datumCode=\"none\":a.nadgrids=t},axis:function(t){var e=\"ewnsud\";3===t.length&&e.indexOf(t.substr(0,1))!==-1&&e.indexOf(t.substr(1,1))!==-1&&e.indexOf(t.substr(2,1))!==-1&&(a.axis=t)}};for(e in l)r=l[e],e in u?(s=u[e],\"function\"==typeof s?s(r):a[s]=r):a[e]=r;return\"string\"==typeof a.datumCode&&\"WGS84\"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},function(t,e,r){function n(t,e){var r=s.length;return t.names?(s[r]=t,t.names.forEach(function(t){o[t.toLowerCase()]=r}),this):(console.log(e),!0)}var i=[t(354),t(353)],o={},s=[];r.add=n,r.get=function(t){if(!t)return!1;var e=t.toLowerCase();return\"undefined\"!=typeof o[e]&&s[o[e]]?s[o[e]]:void 0},r.start=function(){i.forEach(n)}},function(t,e,r){function n(t){return t}r.init=function(){},r.forward=n,r.inverse=n,r.names=[\"longlat\",\"identity\"]},function(t,e,r){var n=t(333),i=Math.PI/2,o=1e-10,s=57.29577951308232,a=t(332),l=Math.PI/4,u=t(337),c=t(334);r.init=function(){var t=this.b/this.a;this.es=1-t*t,\"x0\"in this||(this.x0=0),\"y0\"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=n(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},r.forward=function(t){var e=t.x,r=t.y;if(r*s>90&&r*s<-90&&e*s>180&&e*s<-180)return null;var n,c;if(Math.abs(Math.abs(r)-i)<=o)return null;if(this.sphere)n=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*r));else{var _=Math.sin(r),h=u(this.e,r,_);n=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0-this.a*this.k0*Math.log(h)}return t.x=n,t.y=c,t},r.inverse=function(t){var e,r,n=t.x-this.x0,o=t.y-this.y0;if(this.sphere)r=i-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var s=Math.exp(-o/(this.a*this.k0));if(r=c(this.e,s),r===-9999)return null}return e=a(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t},r.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},function(t,e,r){function n(t,e){return(t.datum.datum_type===s||t.datum.datum_type===a)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===s||e.datum.datum_type===a)&&\"WGS84\"!==t.datumCode}var i=.017453292519943295,o=57.29577951308232,s=1,a=2,l=t(345),u=t(331),c=t(330),_=t(336);e.exports=function h(t,e,r){var s;return Array.isArray(r)&&(r=_(r)),t.datum&&e.datum&&n(t,e)&&(s=new c(\"WGS84\"),r=h(t,s,r),t=s),\"enu\"!==t.axis&&(r=u(t,!1,r)),\"longlat\"===t.projName?r={x:r.x*i,y:r.y*i}:(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter}),r=t.inverse(r)),t.from_greenwich&&(r.x+=t.from_greenwich),r=l(t.datum,e.datum,r),e.from_greenwich&&(r={x:r.x-e.grom_greenwich,y:r.y}),\"longlat\"===e.projName?r={x:r.x*o,y:r.y*o}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter})),\"enu\"!==e.axis?u(e,!0,r):r}},function(t,e,r){function n(t,e,r){t[e]=r.map(function(t){var e={};return i(t,e),e}).reduce(function(t,e){return u(t,e)},{})}function i(t,e){var r;return Array.isArray(t)?(r=t.shift(),\"PARAMETER\"===r&&(r=t.shift()),1===t.length?Array.isArray(t[0])?(e[r]={},i(t[0],e[r])):e[r]=t[0]:t.length?\"TOWGS84\"===r?e[r]=t:(e[r]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(r)>-1?(e[r]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[r].auth=t[2])):\"SPHEROID\"===r?(e[r]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[r].auth=t[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(r)>-1?(t[0]=[\"name\",t[0]],n(e,r,t)):t.every(function(t){return Array.isArray(t)})?n(e,r,t):i(t,e[r])):e[r]=!0,void 0):void(e[t]=!0)}function o(t,e){var r=e[0],n=e[1];!(r in t)&&n in t&&(t[r]=t[n],3===e.length&&(t[r]=e[2](t[r])))}function s(t){return t*l}function a(t){function e(e){var r=t.to_meter||1;return parseFloat(e,10)*r}\"GEOGCS\"===t.type?t.projName=\"longlat\":\"LOCAL_CS\"===t.type?(t.projName=\"identity\",t.local=!0):\"object\"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),\"metre\"===t.units&&(t.units=\"meter\"),t.UNIT.convert&&(\"GEOGCS\"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),\"d_\"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==t.datumCode&&\"new_zealand_1949\"!==t.datumCode||(t.datumCode=\"nzgd49\"),\"wgs_1984\"===t.datumCode&&(\"Mercator_Auxiliary_Sphere\"===t.PROJECTION&&(t.sphere=!0),t.datumCode=\"wgs84\"),\"_ferro\"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),\"_jakarta\"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf(\"belge\")&&(t.datumCode=\"rnb72\"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps=\"intl\"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf(\"osgb_1936\")&&(t.datumCode=\"osgb36\")),t.b&&!isFinite(t.b)&&(t.b=t.a);var r=function(e){return o(t,e)},n=[[\"standard_parallel_1\",\"Standard_Parallel_1\"],[\"standard_parallel_2\",\"Standard_Parallel_2\"],[\"false_easting\",\"False_Easting\"],[\"false_northing\",\"False_Northing\"],[\"central_meridian\",\"Central_Meridian\"],[\"latitude_of_origin\",\"Latitude_Of_Origin\"],[\"latitude_of_origin\",\"Central_Parallel\"],[\"scale_factor\",\"Scale_Factor\"],[\"k0\",\"scale_factor\"],[\"latitude_of_center\",\"Latitude_of_center\"],[\"lat0\",\"latitude_of_center\",s],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",s],[\"x0\",\"false_easting\",e],[\"y0\",\"false_northing\",e],[\"long0\",\"central_meridian\",s],[\"lat0\",\"latitude_of_origin\",s],[\"lat0\",\"standard_parallel_1\",s],[\"lat1\",\"standard_parallel_1\",s],[\"lat2\",\"standard_parallel_2\",s],[\"alpha\",\"azimuth\",s],[\"srsCode\",\"name\"]];n.forEach(r),t.long0||!t.longc||\"Albers_Conic_Equal_Area\"!==t.projName&&\"Lambert_Azimuthal_Equal_Area\"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||\"Stereographic_South_Pole\"!==t.projName&&\"Polar Stereographic (variant B)\"!==t.projName||(t.lat0=s(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var l=.017453292519943295,u=t(348);e.exports=function(t,e){var r=JSON.parse((\",\"+t).replace(/\\s*\\,\\s*([A-Z_0-9]+?)(\\[)/g,',[\"$1\",').slice(1).replace(/\\s*\\,\\s*([A-Z_0-9]+?)\\]/g,',\"$1\"]').replace(/,\\[\"VERTCS\".+/,\"\")),n=r.shift(),o=r.shift();r.unshift([\"name\",o]),r.unshift([\"type\",n]),r.unshift(\"output\");var s={};return i(r,s),a(s.output),u(e,s.output)}},function(t,e,r){\"use strict\";function n(t,e,r,s,a){for(r=r||0,s=s||t.length-1,a=a||o;s>r;){if(s-r>600){var l=s-r+1,u=e-r+1,c=Math.log(l),_=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*_*(l-_)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(e-u*_/l+h)),d=Math.min(s,Math.floor(e+(l-u)*_/l+h));n(t,e,p,d,a)}var f=t[e],y=r,m=s;for(i(t,r,e),a(t[s],f)>0&&i(t,r,s);y<m;){for(i(t,y,m),y++,m--;a(t[y],f)<0;)y++;for(;a(t[m],f)>0;)m--}0===a(t[r],f)?i(t,r,m):(m++,i(t,m,s)),m<=e&&(r=m+1),e<=m&&(s=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function o(t,e){return t<e?-1:t>e?1:0}e.exports=n},function(t,e,r){\"use strict\";function n(t,e){return this instanceof n?(this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),void this.clear()):new n(t,e)}function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,r,n,i){i||(i=y(null)),i.minX=1/0,i.minY=1/0,i.maxX=-(1/0),i.maxY=-(1/0);for(var o,s=e;s<r;s++)o=t.children[s],a(i,t.leaf?n(o):o);return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function _(t){return t.maxX-t.minX+(t.maxY-t.minY)}function h(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){var r=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function m(t,e,r,n,i){for(var o,s=[e,r];s.length;)r=s.pop(),e=s.pop(),r-e<=n||(o=e+Math.ceil((r-e)/n/2)*n,v(t,o,e,r,i),s.push(e,o,o,r))}e.exports=n;var v=t(357);n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],n=this.toBBox;if(!f(t,e))return r;for(var i,o,s,a,l=[];e;){for(i=0,o=e.children.length;i<o;i++)s=e.children[i],a=e.leaf?n(s):s,f(t,a)&&(e.leaf?r.push(s):d(t,a)?this._all(s,r):l.push(s));e=l.pop()}return r},collides:function(t){var e=this.data,r=this.toBBox;if(!f(t,e))return!1;for(var n,i,o,s,a=[];e;){for(n=0,i=e.children.length;n<i;n++)if(o=e.children[n],s=e.leaf?r(o):o,f(t,s)){if(e.leaf||d(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,r=t.length;e<r;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(t,e){if(!t)return this;for(var r,n,o,s,a=this.data,l=this.toBBox(t),u=[],c=[];a||u.length;){if(a||(a=u.pop(),n=u[u.length-1],r=c.pop(),s=!0),a.leaf&&(o=i(t,a.children,e),o!==-1))return a.children.splice(o,1),u.push(a),this._condense(u),this;s||a.leaf||!d(a,l)?n?(r++,a=n.children[r],s=!1):a=null:(u.push(a),c.push(r),r=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},_build:function(t,e,r,n){var i,s=r-e+1,a=this._maxEntries;if(s<=a)return i=y(t.slice(e,r+1)),o(i,this.toBBox),i;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),i=y([]),i.leaf=!1,i.height=n;var l,u,c,_,h=Math.ceil(s/a),p=h*Math.ceil(Math.sqrt(a));for(m(t,e,r,p,this.compareMinX),l=e;l<=r;l+=p)for(c=Math.min(l+p-1,r),m(t,l,c,h,this.compareMinY),u=l;u<=c;u+=h)_=Math.min(u+h-1,c),i.children.push(this._build(t,u,_,n-1));return o(i,this.toBBox),i},_chooseSubtree:function(t,e,r,n){for(var i,o,s,a,l,u,_,p;;){if(n.push(e),e.leaf||n.length-1===r)break;for(_=p=1/0,i=0,o=e.children.length;i<o;i++)s=e.children[i],l=c(s),u=h(t,s)-l,u<p?(p=u,_=l<_?l:_,a=s):u===p&&l<_&&(_=l,a=s);e=a||e.children[0]}return e},_insert:function(t,e,r){var n=this.toBBox,i=r?t:n(t),o=[],s=this._chooseSubtree(i,this.data,e,o);for(s.children.push(t),a(s,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var s=this._chooseSplitIndex(r,i,n),a=y(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=y([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){var n,i,o,a,l,u,_,h;for(u=_=1/0,n=e;n<=r-e;n++)i=s(t,0,n,this.toBBox),o=s(t,n,r,this.toBBox),a=p(i,o),l=c(i)+c(o),a<u?(u=a,h=n,_=l<_?l:_):a===u&&l<_&&(_=l,h=n);return h},_chooseSplitAxis:function(t,e,r){var n=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u,o=this._allDistMargin(t,e,r,n),s=this._allDistMargin(t,e,r,i);o<s&&t.children.sort(n)},_allDistMargin:function(t,e,r,n){t.children.sort(n);var i,o,l=this.toBBox,u=s(t,0,e,l),c=s(t,r-e,r,l),h=_(u)+_(c);for(i=e;i<r-e;i++)o=t.children[i],a(u,t.leaf?l(o):o),h+=_(u);for(i=r-e-1;i>=e;i--)o=t.children[i],a(c,t.leaf?l(o):o),h+=_(c);return h},_adjustParentBBoxes:function(t,e,r){for(var n=r;n>=0;n--)a(e[n],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children,e.splice(e.indexOf(t[r]),1)):this.clear():o(t[r],this.toBBox)},_initFormat:function(t){var e=[\"return a\",\" - b\",\";\"];this.compareMinX=new Function(\"a\",\"b\",e.join(t[0])),this.compareMinY=new Function(\"a\",\"b\",e.join(t[1])),this.toBBox=new Function(\"a\",\"return {minX: a\"+t[0]+\", minY: a\"+t[1]+\", maxX: a\"+t[2]+\", maxY: a\"+t[3]+\"};\")}}},function(e,r,n){!function(){\"use strict\";function e(t){return i(o(t),arguments)}function r(t,r){return e.apply(null,[t].concat(r||[]))}function i(t,r){var n,i,o,a,l,u,c,_,h,p=1,d=t.length,f=\"\";for(i=0;i<d;i++)if(\"string\"==typeof t[i])f+=t[i];else if(Array.isArray(t[i])){if(a=t[i],a[2])for(n=r[p],o=0;o<a[2].length;o++){if(!n.hasOwnProperty(a[2][o]))throw new Error(e('[sprintf] property \"%s\" does not exist',a[2][o]));n=n[a[2][o]]}else n=a[1]?r[a[1]]:r[p++];if(s.not_type.test(a[8])&&s.not_primitive.test(a[8])&&n instanceof Function&&(n=n()),s.numeric_arg.test(a[8])&&\"number\"!=typeof n&&isNaN(n))throw new TypeError(e(\"[sprintf] expecting number but found %T\",n));switch(s.number.test(a[8])&&(_=n>=0),a[8]){case\"b\":n=parseInt(n,10).toString(2);break;case\"c\":n=String.fromCharCode(parseInt(n,10));break;case\"d\":case\"i\":n=parseInt(n,10);break;case\"j\":n=JSON.stringify(n,null,a[6]?parseInt(a[6]):0);break;case\"e\":n=a[7]?parseFloat(n).toExponential(a[7]):parseFloat(n).toExponential();break;case\"f\":n=a[7]?parseFloat(n).toFixed(a[7]):parseFloat(n);break;case\"g\":n=a[7]?String(Number(n.toPrecision(a[7]))):parseFloat(n);break;case\"o\":n=(parseInt(n,10)>>>0).toString(8);break;case\"s\":n=String(n),n=a[7]?n.substring(0,a[7]):n;break;case\"t\":n=String(!!n),n=a[7]?n.substring(0,a[7]):n;break;case\"T\":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a[7]?n.substring(0,a[7]):n;break;case\"u\":n=parseInt(n,10)>>>0;break;case\"v\":n=n.valueOf(),n=a[7]?n.substring(0,a[7]):n;break;case\"x\":n=(parseInt(n,10)>>>0).toString(16);break;case\"X\":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}s.json.test(a[8])?f+=n:(!s.number.test(a[8])||_&&!a[3]?h=\"\":(h=_?\"+\":\"-\",n=n.toString().replace(s.sign,\"\")),u=a[4]?\"0\"===a[4]?\"0\":a[4].charAt(1):\" \",c=a[6]-(h+n).length,l=a[6]&&c>0?u.repeat(c):\"\",f+=a[5]?h+n+l:\"0\"===u?h+l+n:l+h+n)}return f}function o(t){if(a[t])return a[t];for(var e,r=t,n=[],i=0;r;){if(null!==(e=s.text.exec(r)))n.push(e[0]);else if(null!==(e=s.modulo.exec(r)))n.push(\"%\");else{if(null===(e=s.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(e[2]){i|=1;var o=[],l=e[2],u=[];if(null===(u=s.key.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(u[1]);\"\"!==(l=l.substring(u[0].length));)if(null!==(u=s.key_access.exec(l)))o.push(u[1]);else{if(null===(u=s.index_access.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(u[1])}e[2]=o}else i|=2;if(3===i)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");n.push(e)}r=r.substring(e[0].length)}return a[t]=n}var s={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,\n",
" index_access:/^\\[(\\d+)\\]/,sign:/^[\\+\\-]/},a=Object.create(null);\"undefined\"!=typeof n&&(n.sprintf=e,n.vsprintf=r),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=r,\"function\"==typeof t&&t.amd&&t(function(){return{sprintf:e,vsprintf:r}}))}()},function(e,r,n){!function(e){\"object\"==typeof r&&r.exports?r.exports=e():\"function\"==typeof t?t(e):this.tz=e()}(function(){function t(t,e,r){var n,i=e.day[1];do n=new Date(Date.UTC(r,e.month,Math.abs(i++)));while(e.day[0]<7&&n.getUTCDay()!=e.day[0]);return n={clock:e.clock,sort:n.getTime(),rule:e,save:6e4*e.save,offset:t.offset},n[n.clock]=n.sort+6e4*e.time,n.posix?n.wallclock=n[n.clock]+(t.offset+e.saved):n.posix=n[n.clock]-(t.offset+e.saved),n}function e(e,r,n){var i,o,s,a,l,u,c,_=e[e.zone],h=[],p=new Date(n).getUTCFullYear(),d=1;for(i=1,o=_.length;i<o&&!(_[i][r]<=n);i++);if(s=_[i],s.rules){for(u=e[s.rules],c=p+1;c>=p-d;--c)for(i=0,o=u.length;i<o;i++)u[i].from<=c&&c<=u[i].to?h.push(t(s,u[i],c)):u[i].to<c&&1==d&&(d=c-u[i].to);for(h.sort(function(t,e){return t.sort-e.sort}),i=0,o=h.length;i<o;i++)n>=h[i][r]&&h[i][h[i].clock]>s[h[i].clock]&&(a=h[i])}return a&&((l=/^(.*)\\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function r(t,r){return\"UTC\"==t.zone?r:(t.entry=e(t,\"posix\",r),r+t.entry.offset+t.entry.save)}function n(t,r){if(\"UTC\"==t.zone)return r;var n,i;return t.entry=n=e(t,\"wallclock\",r),i=r-n.wallclock,0<i&&i<n.save?null:r-n.offset-n.save}function i(t,e,i){var o,s=+(i[1]+1),a=i[2]*s,l=u.indexOf(i[3].toLowerCase());if(l>9)e+=a*_[l-10];else{if(o=new Date(r(t,e)),l<7)for(;a;)o.setUTCDate(o.getUTCDate()+s),o.getUTCDay()==l&&(a-=s);else 7==l?o.setUTCFullYear(o.getUTCFullYear()+a):8==l?o.setUTCMonth(o.getUTCMonth()+a):o.setUTCDate(o.getUTCDate()+a);null==(e=n(t,o.getTime()))&&(e=n(t,o.getTime()+864e5*s)-864e5*s)}return e}function o(t){if(!t.length)return\"1.0.6\";var e,o,s,a,l,u=Object.create(this),_=[];for(e=0;e<t.length;e++)if(a=t[e],Array.isArray(a))e||isNaN(a[1])?a.splice.apply(t,[e--,1].concat(a)):l=a;else if(isNaN(a)){if(s=typeof a,\"string\"==s)~a.indexOf(\"%\")?u.format=a:e||\"*\"!=a?!e&&(s=/^(\\d{4})-(\\d{2})-(\\d{2})(?:[T\\s](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?(Z|(([+-])(\\d{2}(:\\d{2}){0,2})))?)?$/.exec(a))?(l=[],l.push.apply(l,s.slice(1,8)),s[9]?(l.push(s[10]+1),l.push.apply(l,s[11].split(/:/))):s[8]&&l.push(1)):/^\\w{2,3}_\\w{2}$/.test(a)?u.locale=a:(s=c.exec(a))?_.push(s):u.zone=a:l=a;else if(\"function\"==s){if(s=a.call(u))return s}else if(/^\\w{2,3}_\\w{2}$/.test(a.name))u[a.name]=a;else if(a.zones){for(s in a.zones)u[s]=a.zones[s];for(s in a.rules)u[s]=a.rules[s]}}else e||(l=a);if(u[u.locale]||delete u.locale,u[u.zone]||delete u.zone,null!=l){if(\"*\"==l)l=u.clock();else if(Array.isArray(l)){for(o=!l[7],e=0;e<11;e++)l[e]=+(l[e]||0);--l[1],l=Date.UTC.apply(Date.UTC,l.slice(0,8))+-l[7]*(36e5*l[8]+6e4*l[9]+1e3*l[10])}else l=Math.floor(l);if(!isNaN(l)){if(o&&(l=n(u,l)),null==l)return l;for(e=0,o=_.length;e<o;e++)l=i(u,l,_[e]);return u.format?(s=new Date(r(u,l)),u.format.replace(/%([-0_^]?)(:{0,3})(\\d*)(.)/g,function(t,e,r,n,i){var o,a,c=\"0\";if(o=u[i]){for(t=String(o.call(u,s,l,e,r.length)),\"_\"==(e||o.style)&&(c=\" \"),a=\"-\"==e?0:o.pad||0;t.length<a;)t=c+t;for(a=\"-\"==e?0:n||o.pad;t.length<a;)t=c+t;\"N\"==i&&a<t.length&&(t=t.slice(0,a)),\"^\"==e&&(t=t.toUpperCase())}return t})):l}}return function(){return u.convert(arguments)}}function s(t,e){var r,n,i;return n=new Date(Date.UTC(t.getUTCFullYear(),0)),r=Math.floor((t.getTime()-n.getTime())/864e5),n.getUTCDay()==e?i=0:(i=7-n.getUTCDay()+e,8==i&&(i=1)),r>=i?Math.floor((r-i)/7)+1:0}function a(t){var e,r,n;return r=t.getUTCFullYear(),e=new Date(Date.UTC(r,0)).getUTCDay(),n=s(t,1)+(e>1&&e<=4?1:0),n?53!=n||4==e||3==e&&29==new Date(r,1,29).getDate()?[n,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(r=t.getUTCFullYear()-1,e=new Date(Date.UTC(r,0)).getUTCDay(),n=4==e||3==e&&29==new Date(r,1,29).getDate()?53:52,[n,t.getUTCFullYear()-1])}var l={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(t,e,r,n){var i,o,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],u=3600;for(i=0;i<3;i++)l.push((\"0\"+Math.floor(a/u)).slice(-2)),a%=u,u/=60;return\"^\"!=r||s?(\"^\"==r&&(n=3),3==n?(o=l.join(\":\"),o=o.replace(/:00$/,\"\"),\"^\"!=r&&(o=o.replace(/:00$/,\"\"))):n?(o=l.slice(0,n+1).join(\":\"),\"^\"==r&&(o=o.replace(/:00$/,\"\"))):o=l.slice(0,2).join(\"\"),o=(s<0?\"-\":\"+\")+o,o=o.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[r]||\"$1$2\")):\"Z\"},\"%\":function(t){return\"%\"},n:function(t){return\"\\n\"},t:function(t){return\"\\t\"},U:function(t){return s(t,0)},W:function(t){return s(t,1)},V:function(t){return a(t)[0]},G:function(t){return a(t)[1]},g:function(t){return a(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,\"%H:%M\"])},T:function(t,e){return this.convert([e,\"%H:%M:%S\"])},D:function(t,e){return this.convert([e,\"%m/%d/%y\"])},F:function(t,e){return this.convert([e,\"%Y-%m-%d\"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||\"%I:%M:%S\"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:o,locale:\"en_US\",en_US:{date:\"%m/%d/%Y\",time24:\"%I:%M:%S %p\",time12:\"%I:%M:%S %p\",dateTime:\"%a %d %b %Y %I:%M:%S %p %Z\",meridiem:[\"AM\",\"PM\"],month:{abbrev:\"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec\".split(\"|\"),full:\"January|February|March|April|May|June|July|August|September|October|November|December\".split(\"|\")},day:{abbrev:\"Sun|Mon|Tue|Wed|Thu|Fri|Sat\".split(\"|\"),full:\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday\".split(\"|\")}}},u=\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond\",c=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+u+\")s?\\\\s*$\",\"i\"),_=[36e5,6e4,1e3,1];return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,function(t){l[t].pad=2}),l.N.pad=9,l.j.pad=3,l.k.style=\"_\",l.l.style=\"_\",l.e.style=\"_\",function(){return l.convert(arguments)}})},function(e,r,n){/*! *****************************************************************************\n",
" Copyright (c) Microsoft Corporation. All rights reserved.\n",
" Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n",
" this file except in compliance with the License. You may obtain a copy of the\n",
" License at http://www.apache.org/licenses/LICENSE-2.0\n",
" \n",
" THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n",
" KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\n",
" WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n",
" MERCHANTABLITY OR NON-INFRINGEMENT.\n",
" \n",
" See the Apache Version 2.0 License for specific language governing permissions\n",
" and limitations under the License.\n",
" ***************************************************************************** */\n",
" var i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b;!function(e){function n(t,e){return\"function\"==typeof Object.create?Object.defineProperty(t,\"__esModule\",{value:!0}):t.__esModule=!0,function(r,n){return t[r]=e?e(r,n):n}}var i=\"object\"==typeof global?global:\"object\"==typeof self?self:\"object\"==typeof this?this:{};\"function\"==typeof t&&t.amd?t(\"tslib\",[\"exports\"],function(t){e(n(i,n(t)))}):e(\"object\"==typeof r&&\"object\"==typeof r.exports?n(i,n(r.exports)):n(i))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};i=function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)},o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&(r[n[i]]=t[n[i]]);return r},a=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},l=function(t,e){return function(r,n){e(r,n,t)}},u=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},c=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{l(n.next(t))}catch(e){o(e)}}function a(t){try{l(n[\"throw\"](t))}catch(e){o(e)}}function l(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},_=function(t,e){function r(t){return function(e){return n([t,e])}}function n(r){if(i)throw new TypeError(\"Generator is already executing.\");for(;l;)try{if(i=1,o&&(s=o[2&r[0]?\"return\":r[0]?\"throw\":\"next\"])&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,o=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){l.label=r[1];break}if(6===r[0]&&l.label<s[1]){l.label=s[1],s=r;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(r);break}s[2]&&l.ops.pop(),l.trys.pop();continue}r=e.call(t,l)}catch(n){r=[6,n],o=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),\"throw\":r(1),\"return\":r(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},h=function(t,e){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])},p=function(t){var e=\"function\"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},d=function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o[\"return\"])&&r.call(o)}finally{if(i)throw i.error}}return s},f=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t},y=function(t){return this instanceof y?(this.v=t,this):new y(t)},m=function(t,e,r){function n(t){c[t]&&(u[t]=function(e){return new Promise(function(r,n){_.push([t,e,r,n])>1||i(t,e)})})}function i(t,e){try{o(c[t](e))}catch(r){l(_[0][3],r)}}function o(t){t.value instanceof y?Promise.resolve(t.value.v).then(s,a):l(_[0][2],t)}function s(t){i(\"next\",t)}function a(t){i(\"throw\",t)}function l(t,e){t(e),_.shift(),_.length&&i(_[0][0],_[0][1])}if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var u,c=r.apply(t,e||[]),_=[];return u={},n(\"next\"),n(\"throw\"),n(\"return\"),u[Symbol.asyncIterator]=function(){return this},u},v=function(t){function e(e,i){t[e]&&(r[e]=function(r){return(n=!n)?{value:y(t[e](r)),done:\"return\"===e}:i?i(r):r})}var r,n;return r={},e(\"next\"),e(\"throw\",function(t){throw t}),e(\"return\"),r[Symbol.iterator]=function(){return this},r},g=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e=t[Symbol.asyncIterator];return e?e.call(t):\"function\"==typeof p?p(t):t[Symbol.iterator]()},b=function(t,e){return Object.defineProperty?Object.defineProperty(t,\"raw\",{value:e}):t.raw=e,t},t(\"__extends\",i),t(\"__assign\",o),t(\"__rest\",s),t(\"__decorate\",a),t(\"__param\",l),t(\"__metadata\",u),t(\"__awaiter\",c),t(\"__generator\",_),t(\"__exportStar\",h),t(\"__values\",p),t(\"__read\",d),t(\"__spread\",f),t(\"__await\",y),t(\"__asyncGenerator\",m),t(\"__asyncDelegator\",v),t(\"__asyncValues\",g),t(\"__makeTemplateObject\",b)})}],{base:0,\"client/connection\":1,\"client/session\":2,\"core/bokeh_events\":3,\"core/build_views\":4,\"core/dom\":5,\"core/dom_view\":6,\"core/enums\":7,\"core/has_props\":8,\"core/hittest\":9,\"core/layout/layout_canvas\":10,\"core/layout/side_panel\":11,\"core/layout/solver\":12,\"core/logging\":13,\"core/properties\":14,\"core/property_mixins\":15,\"core/selection_manager\":16,\"core/selector\":17,\"core/settings\":18,\"core/signaling\":19,\"core/ui_events\":20,\"core/util/array\":21,\"core/util/bbox\":22,\"core/util/callback\":23,\"core/util/canvas\":24,\"core/util/color\":25,\"core/util/data_structures\":26,\"core/util/eq\":27,\"core/util/math\":28,\"core/util/object\":29,\"core/util/proj4\":30,\"core/util/projections\":31,\"core/util/refs\":32,\"core/util/selection\":33,\"core/util/serialization\":34,\"core/util/spatial\":35,\"core/util/string\":36,\"core/util/svg_colors\":37,\"core/util/templating\":38,\"core/util/text\":39,\"core/util/throttle\":40,\"core/util/types\":41,\"core/util/wheel\":42,\"core/util/zoom\":43,\"core/view\":44,\"core/visuals\":45,document:46,embed:47,main:48,model:49,\"models/annotations/annotation\":50,\"models/annotations/arrow\":51,\"models/annotations/arrow_head\":52,\"models/annotations/band\":53,\"models/annotations/box_annotation\":54,\"models/annotations/color_bar\":55,\"models/annotations/index\":56,\"models/annotations/label\":57,\"models/annotations/label_set\":58,\"models/annotations/legend\":59,\"models/annotations/legend_item\":60,\"models/annotations/poly_annotation\":61,\"models/annotations/span\":62,\"models/annotations/text_annotation\":63,\"models/annotations/title\":64,\"models/annotations/tooltip\":65,\"models/annotations/whisker\":66,\"models/axes/axis\":67,\"models/axes/categorical_axis\":68,\"models/axes/continuous_axis\":69,\"models/axes/datetime_axis\":70,\"models/axes/index\":71,\"models/axes/linear_axis\":72,\"models/axes/log_axis\":73,\"models/callbacks/customjs\":74,\"models/callbacks/index\":75,\"models/callbacks/open_url\":76,\"models/canvas/canvas\":77,\"models/canvas/cartesian_frame\":78,\"models/canvas/index\":79,\"models/expressions/expression\":80,\"models/expressions/index\":81,\"models/expressions/stack\":82,\"models/filters/boolean_filter\":83,\"models/filters/customjs_filter\":84,\"models/filters/filter\":85,\"models/filters/group_filter\":86,\"models/filters/index\":87,\"models/filters/index_filter\":88,\"models/formatters/basic_tick_formatter\":89,\"models/formatters/categorical_tick_formatter\":90,\"models/formatters/datetime_tick_formatter\":91,\"models/formatters/func_tick_formatter\":92,\"models/formatters/index\":93,\"models/formatters/log_tick_formatter\":94,\"models/formatters/mercator_tick_formatter\":95,\"models/formatters/numeral_tick_formatter\":96,\"models/formatters/printf_tick_formatter\":97,\"models/formatters/tick_formatter\":98,\"models/glyphs/annular_wedge\":99,\"models/glyphs/annulus\":100,\"models/glyphs/arc\":101,\"models/glyphs/bezier\":102,\"models/glyphs/box\":103,\"models/glyphs/circle\":104,\"models/glyphs/ellipse\":105,\"models/glyphs/glyph\":106,\"models/glyphs/hbar\":107,\"models/glyphs/image\":108,\"models/glyphs/image_rgba\":109,\"models/glyphs/image_url\":110,\"models/glyphs/index\":111,\"models/glyphs/line\":112,\"models/glyphs/multi_line\":113,\"models/glyphs/oval\":114,\"models/glyphs/patch\":115,\"models/glyphs/patches\":116,\"models/glyphs/quad\":117,\"models/glyphs/quadratic\":118,\"models/glyphs/ray\":119,\"models/glyphs/rect\":120,\"models/glyphs/segment\":121,\"models/glyphs/text\":122,\"models/glyphs/vbar\":123,\"models/glyphs/wedge\":124,\"models/glyphs/xy_glyph\":125,\"models/graphs/graph_hit_test_policy\":126,\"models/graphs/index\":127,\"models/graphs/layout_provider\":128,\"models/graphs/static_layout_provider\":129,\"models/grids/grid\":130,\"models/grids/index\":131,\"models/index\":132,\"models/layouts/box\":133,\"models/layouts/column\":134,\"models/layouts/index\":135,\"models/layouts/layout_dom\":136,\"models/layouts/row\":137,\"models/layouts/spacer\":138,\"models/layouts/widget_box\":139,\"models/mappers/categorical_color_mapper\":140,\"models/mappers/color_mapper\":141,\"models/mappers/index\":142,\"models/mappers/linear_color_mapper\":143,\"models/mappers/log_color_mapper\":144,\"models/markers/index\":145,\"models/markers/marker\":146,\"models/plots/gmap_plot\":147,\"models/plots/gmap_plot_canvas\":148,\"models/plots/index\":149,\"models/plots/plot\":150,\"models/plots/plot_canvas\":151,\"models/ranges/data_range\":152,\"models/ranges/data_range1d\":153,\"models/ranges/factor_range\":154,\"models/ranges/index\":155,\"models/ranges/range\":156,\"models/ranges/range1d\":157,\"models/renderers/glyph_renderer\":158,\"models/renderers/graph_renderer\":159,\"models/renderers/guide_renderer\":160,\"models/renderers/index\":161,\"models/renderers/renderer\":162,\"models/scales/categorical_scale\":163,\"models/scales/index\":164,\"models/scales/linear_scale\":165,\"models/scales/log_scale\":166,\"models/scales/scale\":167,\"models/sources/ajax_data_source\":168,\"models/sources/cds_view\":169,\"models/sources/column_data_source\":170,\"models/sources/columnar_data_source\":171,\"models/sources/data_source\":172,\"models/sources/geojson_data_source\":173,\"models/sources/index\":174,\"models/sources/remote_data_source\":175,\"models/tickers/adaptive_ticker\":176,\"models/tickers/basic_ticker\":177,\"models/tickers/categorical_ticker\":178,\"models/tickers/composite_ticker\":179,\"models/tickers/continuous_ticker\":180,\"models/tickers/datetime_ticker\":181,\"models/tickers/days_ticker\":182,\"models/tickers/fixed_ticker\":183,\"models/tickers/index\":184,\"models/tickers/log_ticker\":185,\"models/tickers/mercator_ticker\":186,\"models/tickers/months_ticker\":187,\"models/tickers/single_interval_ticker\":188,\"models/tickers/ticker\":189,\"models/tickers/util\":190,\"models/tickers/years_ticker\":191,\"models/tiles/bbox_tile_source\":192,\"models/tiles/dynamic_image_renderer\":193,\"models/tiles/image_pool\":194,\"models/tiles/image_source\":195,\"models/tiles/index\":196,\"models/tiles/mercator_tile_source\":197,\"models/tiles/quadkey_tile_source\":198,\"models/tiles/tile_renderer\":199,\"models/tiles/tile_source\":200,\"models/tiles/tile_utils\":201,\"models/tiles/tms_tile_source\":202,\"models/tiles/wmts_tile_source\":203,\"models/tools/actions/action_tool\":204,\"models/tools/actions/help_tool\":205,\"models/tools/actions/redo_tool\":206,\"models/tools/actions/reset_tool\":207,\"models/tools/actions/save_tool\":208,\"models/tools/actions/undo_tool\":209,\"models/tools/actions/zoom_in_tool\":210,\"models/tools/actions/zoom_out_tool\":211,\"models/tools/button_tool\":212,\"models/tools/gestures/box_select_tool\":213,\"models/tools/gestures/box_zoom_tool\":214,\"models/tools/gestures/gesture_tool\":215,\"models/tools/gestures/lasso_select_tool\":216,\"models/tools/gestures/pan_tool\":217,\"models/tools/gestures/poly_select_tool\":218,\"models/tools/gestures/select_tool\":219,\"models/tools/gestures/tap_tool\":220,\"models/tools/gestures/wheel_pan_tool\":221,\"models/tools/gestures/wheel_zoom_tool\":222,\"models/tools/index\":223,\"models/tools/inspectors/crosshair_tool\":224,\"models/tools/inspectors/hover_tool\":225,\"models/tools/inspectors/inspect_tool\":226,\"models/tools/on_off_button\":227,\"models/tools/tool\":228,\"models/tools/tool_proxy\":229,\"models/tools/toolbar\":230,\"models/tools/toolbar_base\":231,\"models/tools/toolbar_box\":232,\"models/transforms/customjs_transform\":233,\"models/transforms/dodge\":234,\"models/transforms/index\":235,\"models/transforms/interpolator\":236,\"models/transforms/jitter\":237,\"models/transforms/linear_interpolator\":238,\"models/transforms/step_interpolator\":239,\"models/transforms/transform\":240,polyfill:241,\"protocol/message\":242,\"protocol/receiver\":243,safely:244,version:245},48)});/*!\n",
" Copyright (c) 2012, Anaconda, Inc.\n",
" All rights reserved.\n",
" \n",
" Redistribution and use in source and binary forms, with or without modification,\n",
" are permitted provided that the following conditions are met:\n",
" \n",
" Redistributions of source code must retain the above copyright notice,\n",
" this list of conditions and the following disclaimer.\n",
" \n",
" Redistributions in binary form must reproduce the above copyright notice,\n",
" this list of conditions and the following disclaimer in the documentation\n",
" and/or other materials provided with the distribution.\n",
" \n",
" Neither the name of Anaconda nor the names of any contributors\n",
" may be used to endorse or promote products derived from this software\n",
" without specific prior written permission.\n",
" \n",
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n",
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n",
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n",
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n",
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n",
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n",
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n",
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n",
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n",
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n",
" THE POSSIBILITY OF SUCH DAMAGE.\n",
" */\n",
" \n",
" //# sourceMappingURL=bokeh.min.js.map\n",
" \n",
" /* END bokeh.min.js */\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" /* BEGIN bokeh-widgets.min.js */\n",
" !function(t,e){e(t.Bokeh)}(this,function(t){var e;return function(e,n,r){if(null!=t)return t.register_plugin(e,n,r);throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\")}({369:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(14),a=t(5),u=t(4),l=t(409);n.AbstractButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.icon_views={},this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.remove=function(){return u.remove_views(this.icon_views),e.__super__.remove.call(this)},e.prototype._render_button=function(){var t;return t=1<=arguments.length?o.call(arguments,0):[],a.button.apply(null,[{type:\"button\",disabled:this.model.disabled,\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]}].concat(o.call(t)))},e.prototype.render=function(){var t;return e.__super__.render.call(this),a.empty(this.el),this.buttonEl=this._render_button(this.model.label),this.buttonEl.addEventListener(\"click\",function(t){return function(e){return t._button_click(e)}}(this)),this.el.appendChild(this.buttonEl),t=this.model.icon,null!=t&&(u.build_views(this.icon_views,[t],{parent:this}),a.prepend(this.buttonEl,this.icon_views[t.id].el,a.nbsp)),this},e.prototype._button_click=function(t){return t.preventDefault(),this.change_input()},e.prototype.change_input=function(){var t;return null!=(t=this.model.callback)?t.execute(this.model):void 0},e}(l.WidgetView),n.AbstractButton=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AbstractButton\",e.prototype.default_view=n.AbstractButtonView,e.define({callback:[s.Instance],label:[s.String,\"Button\"],icon:[s.Instance],button_type:[s.String,\"default\"]}),e}(l.Widget)},370:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(409);n.AbstractIcon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AbstractIcon\",e}(o.Widget)},371:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(400),s=t(14),a=t(5),u=t(13),l=t(23),c=t(409);n.AbstractSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return this.connect(this.model.change,function(t){return function(){return t.render()}}(this))},e.prototype._calc_to=function(){},e.prototype._calc_from=function(t){},e.prototype.render=function(){var t,n,r,i,s,u,c,p,d,h,f,_,m;if(null==this.sliderEl&&e.__super__.render.call(this),null!=this.model.callback)switch(t=function(t){return function(){return t.model.callback.execute(t.model)}}(this),this.model.callback_policy){case\"continuous\":this.callback_wrapper=t;break;case\"throttle\":this.callback_wrapper=l.throttle(t,this.model.callback_throttle)}return s=\"bk-noUi-\",c=this._calc_to(),p=c.start,n=c.end,m=c.value,d=c.step,this.model.tooltips?(r={to:function(t){return function(e){return t.model.pretty(e)}}(this)},f=function(){var t,e,n;for(n=[],i=t=0,e=m.length;0<=e?t<e:t>e;i=0<=e?++t:--t)n.push(r);return n}()):f=!1,this.el.classList.add(\"bk-slider\"),null==this.sliderEl?(this.sliderEl=a.div(),this.el.appendChild(this.sliderEl),o.create(this.sliderEl,{cssPrefix:s,range:{min:p,max:n},start:m,step:d,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:f,orientation:this.model.orientation,direction:this.model.direction}),this.sliderEl.noUiSlider.on(\"slide\",function(t){return function(e,n,r){return t._slide(r)}}(this)),this.sliderEl.noUiSlider.on(\"change\",function(t){return function(e,n,r){return t._change(r)}}(this)),h=function(t){return function(e,n){var r,i;return r=t.sliderEl.querySelectorAll(\".\"+s+\"handle\")[e],i=r.querySelector(\".\"+s+\"tooltip\"),i.style.display=n?\"block\":\"\"}}(this),this.sliderEl.noUiSlider.on(\"start\",function(t){return function(t,e){return h(e,!0)}}(this)),this.sliderEl.noUiSlider.on(\"end\",function(t){return function(t,e){return h(e,!1)}}(this))):this.sliderEl.noUiSlider.updateOptions({range:{min:p,max:n},start:m,step:d}),null!=this.titleEl&&this.el.removeChild(this.titleEl),null!=this.valueEl&&this.el.removeChild(this.valueEl),null!=this.model.title&&(0!==this.model.title.length&&(this.titleEl=a.label({},this.model.title+\":\"),this.el.insertBefore(this.titleEl,this.sliderEl)),this.model.show_value&&(u=function(){var t,e,n;for(n=[],t=0,e=m.length;t<e;t++)_=m[t],n.push(this.model.pretty(_));return n}.call(this).join(\" .. \"),this.valueEl=a.div({\"class\":\"bk-slider-value\"},u),this.el.insertBefore(this.valueEl,this.sliderEl))),this.model.disabled||(this.sliderEl.querySelector(\".\"+s+\"connect\").style.backgroundColor=this.model.bar_color),this.model.disabled?this.sliderEl.setAttribute(\"disabled\",!0):this.sliderEl.removeAttribute(\"disabled\"),this},e.prototype._slide=function(t){var e,n,r;return r=this._calc_from(t),e=function(){var e,r,i;for(i=[],e=0,r=t.length;e<r;e++)n=t[e],i.push(this.model.pretty(n));return i}.call(this).join(\" .. \"),u.logger.debug(\"[slider slide] value = \"+e),null!=this.valueEl&&(this.valueEl.textContent=e),this.model.value=r,\"function\"==typeof this.callback_wrapper?this.callback_wrapper():void 0},e.prototype._change=function(t){var e,n,r,i;switch(i=this._calc_from(t),e=function(){var e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(this.model.pretty(r));return i}.call(this).join(\" .. \"),u.logger.debug(\"[slider change] value = \"+e),null!=this.valueEl&&(this.valueEl.value=e),this.model.value=i,this.model.callback_policy){case\"mouseup\":case\"throttle\":return null!=(n=this.model.callback)?n.execute(this.model):void 0}},e}(c.WidgetView),n.AbstractSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AbstractSlider\",e.prototype.default_view=n.AbstractSliderView,e.define({title:[s.String,\"\"],show_value:[s.Bool,!0],start:[s.Any],end:[s.Any],value:[s.Any],step:[s.Number,1],format:[s.String],orientation:[s.Orientation,\"horizontal\"],direction:[s.Any,\"ltr\"],tooltips:[s.Boolean,!0],callback:[s.Instance],callback_throttle:[s.Number,200],callback_policy:[s.String,\"throttle\"],bar_color:[s.Color,\"#e6e6e6\"]}),e.prototype.behaviour=null,e.prototype.connected=!1,e.prototype._formatter=function(t,e){return\"\"+t},e.prototype.pretty=function(t){return this._formatter(t,this.format)},e}(c.Widget)},372:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(397),s=t(376),a=t(5),u=t(14);n.AutocompleteInputView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),s.clear_menus.connect(function(t){return function(){return t._clear_menu()}}(this))},e.prototype.render=function(){return e.__super__.render.call(this),this.inputEl.classList.add(\"bk-autocomplete-input\"),this.inputEl.addEventListener(\"keydown\",function(t){return function(e){return t._keydown(e)}}(this)),this.inputEl.addEventListener(\"keyup\",function(t){return function(e){return t._keyup(e)}}(this)),this.menuEl=a.ul({\"class\":\"bk-bs-dropdown-menu\"}),this.menuEl.addEventListener(\"click\",function(t){return function(e){return t._item_click(e)}}(this)),this.el.appendChild(this.menuEl),this},e.prototype._render_items=function(t){var e,n,r,i,o;for(a.empty(this.menuEl),i=[],e=0,r=t.length;e<r;e++)o=t[e],n=a.li({},a.a({data:{text:o}},o)),i.push(this.menuEl.appendChild(n));return i},e.prototype._open_menu=function(){return this.el.classList.add(\"bk-bs-open\")},e.prototype._clear_menu=function(){return this.el.classList.remove(\"bk-bs-open\")},e.prototype._item_click=function(t){var e,n;if(t.preventDefault(),t.target!==t.currentTarget)return e=t.target,n=e.dataset.text,this.model.value=n},e.prototype._keydown=function(t){},e.prototype._keyup=function(t){var e,n,r,i,o,s;switch(t.keyCode){case a.Keys.Enter:return console.log(\"enter\");case a.Keys.Esc:return this._clear_menu();case a.Keys.Up:case a.Keys.Down:return console.log(\"up/down\");default:if(s=this.inputEl.value,s.length<=1)return void this._clear_menu();for(e=[],i=this.model.completions,n=0,r=i.length;n<r;n++)o=i[n],o.indexOf(s)!==-1&&e.push(o);return 0===e.length?this._clear_menu():(this._render_items(e),this._open_menu())}},e}(o.TextInputView),n.AutocompleteInput=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"AutocompleteInput\",e.prototype.default_view=n.AutocompleteInputView,e.define({completions:[u.Array,[]]}),e.internal({active:[u.Boolean,!0]}),e}(o.TextInput)},373:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(3),a=t(369);n.ButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.change_input=function(){return this.model.trigger_event(new s.ButtonClick({})),this.model.clicks=this.model.clicks+1,e.__super__.change_input.call(this)},e}(a.AbstractButtonView),n.Button=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Button\",e.prototype.default_view=n.ButtonView,e.define({clicks:[o.Number,0]}),e}(a.AbstractButton),s.register_with_event(s.ButtonClick,n.Button)},374:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},s=t(5),a=t(14),u=t(409);n.CheckboxButtonGroupView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t,n,r,i,a,u,l,c,p;for(e.__super__.render.call(this),s.empty(this.el),n=s.div({\"class\":\"bk-bs-btn-group\"}),this.el.appendChild(n),t=this.model.active,c=this.model.labels,r=a=0,l=c.length;a<l;r=++a)p=c[r],i=s.input({type:\"checkbox\",value:\"\"+r,checked:o.call(t,r)>=0}),i.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),u=s.label({\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]},i,p),o.call(t,r)>=0&&u.classList.add(\"bk-bs-active\"),n.appendChild(u);return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],n=t=0,r=i.length;t<r;n=++t)e=i[n],e.checked&&o.push(n);return o}.call(this),this.model.active=t,null!=(r=this.model.callback)?r.execute(this.model):void 0},e}(u.WidgetView),n.CheckboxButtonGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"CheckboxButtonGroup\",e.prototype.default_view=n.CheckboxButtonGroupView,e.define({active:[a.Array,[]],labels:[a.Array,[]],button_type:[a.String,\"default\"],callback:[a.Instance]}),e}(u.Widget)},375:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},s=t(5),a=t(14),u=t(409);n.CheckboxGroupView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t,n,r,i,a,u,l,c,p;for(e.__super__.render.call(this),s.empty(this.el),t=this.model.active,c=this.model.labels,r=a=0,l=c.length;a<l;r=++a)p=c[r],i=s.input({type:\"checkbox\",value:\"\"+r}),i.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.model.disabled&&(i.disabled=!0),o.call(t,r)>=0&&(i.checked=!0),u=s.label({},i,p),this.model.inline?(u.classList.add(\"bk-bs-checkbox-inline\"),this.el.appendChild(u)):(n=s.div({\"class\":\"bk-bs-checkbox\"},u),this.el.appendChild(n));return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],n=t=0,r=i.length;t<r;n=++t)e=i[n],e.checked&&o.push(n);return o}.call(this),this.model.active=t,null!=(r=this.model.callback)?r.execute(this.model):void 0},e}(u.WidgetView),n.CheckboxGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"CheckboxGroup\",e.prototype.default_view=n.CheckboxGroupView,e.define({active:[a.Array,[]],labels:[a.Array,[]],inline:[a.Bool,!1],callback:[a.Instance]}),e}(u.Widget)},376:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=t(19);n.clear_menus=new r.Signal({},\"clear_menus\"),document.addEventListener(\"click\",function(){return n.clear_menus.emit(void 0)})},377:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(383),a=t(5),u=t(14),l=t(401);l.prototype.adjustPosition=function(){var t,e,n,r,i,o,s,a,u;if(!this._o.container)return this.el.style.position=\"absolute\",e=this._o.trigger,u=this.el.offsetWidth,n=this.el.offsetHeight,a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight,i=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,t=e.getBoundingClientRect(),r=t.left+window.pageXOffset,o=t.bottom+window.pageYOffset,r-=this.el.parentElement.offsetLeft,o-=this.el.parentElement.offsetTop,(this._o.reposition&&r+u>a||this._o.position.indexOf(\"right\")>-1&&r-u+e.offsetWidth>0)&&(r=r-u+e.offsetWidth),(this._o.reposition&&o+n>s+i||this._o.position.indexOf(\"top\")>-1&&o-n-e.offsetHeight>0)&&(o=o-n-e.offsetHeight),this.el.style.left=r+\"px\",this.el.style.top=o+\"px\"},n.DatePickerView=function(t){function e(){return this._on_select=r(this._on_select,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.className=\"bk-widget-form-group\",e.prototype.render=function(){return e.__super__.render.call(this),null!=this._picker&&this._picker.destroy(),a.empty(this.el),this.labelEl=a.label({},this.model.title),this.el.appendChild(this.labelEl),this.inputEl=a.input({type:\"text\",\"class\":\"bk-widget-form-input\",disabled:this.model.disabled}),this.el.appendChild(this.inputEl),this._picker=new l({field:this.inputEl,defaultDate:new Date(this.model.value),setDefaultDate:!0,minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this._on_select}),this._root_element.appendChild(this._picker.el),this},e.prototype._on_select=function(t){return this.model.value=t.toDateString(),this.change_input()},e}(s.InputWidgetView),n.DatePicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"DatePicker\",e.prototype.default_view=n.DatePickerView,e.define({value:[u.Any,Date.now()],min_date:[u.Any],max_date:[u.Any]}),e}(s.InputWidget)},378:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(360),s=t(371);n.DateRangeSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}},e.prototype._calc_from=function(t){return t},e}(s.AbstractSliderView),n.DateRangeSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"DateRangeSlider\",e.prototype.default_view=n.DateRangeSliderView,e.prototype.behaviour=\"drag\",e.prototype.connected=[!1,!0,!1],e.prototype._formatter=o,e.override({format:\"%d %b %Y\"}),e}(s.AbstractSlider)},379:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(360),s=t(371);n.DateSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}},e.prototype._calc_from=function(t){var e;return e=t[0]},e}(s.AbstractSliderView),n.DateSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"DateSlider\",e.prototype.default_view=n.DateSliderView,e.prototype.behaviour=\"tap\",e.prototype.connected=[!0,!1],e.prototype._formatter=o,e.override({format:\"%d %b %Y\"}),e}(s.AbstractSlider)},380:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(385),s=t(5),a=t(14);n.DivView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=s.div(),this.model.render_as_text?t.textContent=this.model.text:t.innerHTML=this.model.text,this.markupEl.appendChild(t),this},e}(o.MarkupView),n.Div=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Div\",e.prototype.default_view=n.DivView,e.define({render_as_text:[a.Bool,!1]}),e}(o.Markup)},381:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(14),a=t(369),u=t(376);n.DropdownView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),u.clear_menus.connect(function(t){return function(){return t._clear_menu()}}(this))},e.prototype.render=function(){var t,n,r,i,s,a,u,l,c,p,d;for(e.__super__.render.call(this),this.model.is_split_button?(this.el.classList.add(\"bk-bs-btn-group\"),t=this._render_button(o.span({\"class\":\"bk-bs-caret\"})),t.classList.add(\"bk-bs-dropdown-toggle\"),t.addEventListener(\"click\",function(t){return function(e){return t._caret_click(e)}}(this)),this.el.appendChild(t)):(this.el.classList.add(\"bk-bs-dropdown\"),this.buttonEl.classList.add(\"bk-bs-dropdown-toggle\"),this.buttonEl.appendChild(o.span({\"class\":\"bk-bs-caret\"}))),this.model.active&&this.el.classList.add(\"bk-bs-open\"),s=[],p=this.model.menu,n=0,u=p.length;n<u;n++)r=p[n],null!=r?(a=r[0],d=r[1],l=o.a({},a),l.dataset.value=d,l.addEventListener(\"click\",function(t){return function(e){return t._item_click(e)}}(this)),i=o.li({},l)):i=o.li({\"class\":\"bk-bs-divider\"}),s.push(i);return c=o.ul({\"class\":\"bk-bs-dropdown-menu\"},s),this.el.appendChild(c),this},e.prototype._clear_menu=function(){return this.model.active=!1},e.prototype._toggle_menu=function(){var t;if(t=this.model.active,u.clear_menus.emit(),!t)return this.model.active=!0},e.prototype._button_click=function(t){return t.preventDefault(),t.stopPropagation(),this.model.is_split_button?(this._clear_menu(),this.set_value(this.model.default_value)):this._toggle_menu()},e.prototype._caret_click=function(t){return t.preventDefault(),t.stopPropagation(),this._toggle_menu()},e.prototype._item_click=function(t){return t.preventDefault(),this._clear_menu(),this.set_value(t.currentTarget.dataset.value)},e.prototype.set_value=function(t){return this.buttonEl.value=this.model.value=t,this.change_input()},e}(a.AbstractButtonView),n.Dropdown=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Dropdown\",e.prototype.default_view=n.DropdownView,e.define({value:[s.String],default_value:[s.String],menu:[s.Array,[]]}),e.override({label:\"Dropdown\"}),e.internal({active:[s.Boolean,!1]}),e.getters({is_split_button:function(){return null!=this.default_value}}),e}(a.AbstractButton)},382:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=t(369);n.AbstractButton=r.AbstractButton;var i=t(370);n.AbstractIcon=i.AbstractIcon;var o=t(372);n.AutocompleteInput=o.AutocompleteInput;var s=t(373);n.Button=s.Button;var a=t(374);n.CheckboxButtonGroup=a.CheckboxButtonGroup;var u=t(375);n.CheckboxGroup=u.CheckboxGroup;var l=t(377);n.DatePicker=l.DatePicker;var c=t(378);n.DateRangeSlider=c.DateRangeSlider;var p=t(379);n.DateSlider=p.DateSlider;var d=t(380);n.Div=d.Div;var h=t(381);n.Dropdown=h.Dropdown;var f=t(383);n.InputWidget=f.InputWidget;var _=t(385);n.Markup=_.Markup;var m=t(386);n.MultiSelect=m.MultiSelect;var y=t(387);n.Panel=y.Panel;var g=t(388);n.Paragraph=g.Paragraph;var v=t(389);n.PasswordInput=v.PasswordInput;var b=t(390);n.PreText=b.PreText;var w=t(391);n.RadioButtonGroup=w.RadioButtonGroup;var k=t(392);n.RadioGroup=k.RadioGroup;var x=t(393);n.RangeSlider=x.RangeSlider;var S=t(394);n.Select=S.Select;var E=t(395);n.Slider=E.Slider;var D=t(396);n.Tabs=D.Tabs;var M=t(397);n.TextInput=M.TextInput;var C=t(398);n.Toggle=C.Toggle;var P=t(409);n.Widget=P.Widget},383:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(409),s=t(14);n.InputWidgetView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.change_input=function(){var t;return null!=(t=this.model.callback)?t.execute(this.model):void 0},e}(o.WidgetView),n.InputWidget=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"InputWidget\",e.prototype.default_view=n.InputWidgetView,e.define({callback:[s.Instance],title:[s.String,\"\"]}),e}(o.Widget)},384:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=t(382);n.Widgets=r;var i=t(0);i.register_models(r)},385:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(5),a=t(29),u=t(409);n.MarkupView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t;return e.__super__.render.call(this),s.empty(this.el),t=a.extend({width:this.model.width+\"px\",height:this.model.height+\"px\"},this.model.style),this.markupEl=s.div({style:t}),this.el.appendChild(this.markupEl)},e}(u.WidgetView),n.Markup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Markup\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.define({text:[o.String,\"\"],style:[o.Any,{}]}),e}(u.Widget)},386:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},a=t(5),u=t(41),l=t(14),c=t(383);n.MultiSelectView=function(t){function e(){return this.render_selection=r(this.render_selection,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.value.change,function(){return this.render_selection()}),this.connect(this.model.properties.options.change,function(){return this.render()}),this.connect(this.model.properties.name.change,function(){return this.render()}),this.connect(this.model.properties.title.change,function(){return this.render()}),this.connect(this.model.properties.size.change,function(){return this.render()})},e.prototype.render=function(){var t,n;return e.__super__.render.call(this),a.empty(this.el),t=a.label({\"for\":this.model.id},this.model.title),this.el.appendChild(t),n=this.model.options.map(function(t){return function(e){var n,r,i;return u.isString(e)?i=n=e:(i=e[0],n=e[1]),r=s.call(t.model.value,i)>=0,a.option({selected:r,value:i},n)}}(this)),this.selectEl=a.select({multiple:!0,\"class\":\"bk-widget-form-input\",id:this.model.id,name:this.model.name,size:this.model.size},n),this.selectEl.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.el.appendChild(this.selectEl),this},e.prototype.render_selection=function(){var t,e,n,r,i,o,s,a,u;for(a={},o=this.model.value,e=0,r=o.length;e<r;e++)u=o[e],a[u]=!0;for(s=this.el.querySelectorAll(\"option\"),n=0,i=s.length;n<i;n++)t=s[n],a[t.value]&&(t.selected=\"selected\");return this.selectEl.size=this.model.size},e.prototype.change_input=function(){var t,n,r,i,o,s;for(r=null!==this.el.querySelector(\"select:focus\"),s=[],o=this.el.querySelectorAll(\"option\"),n=0,i=o.length;n<i;n++)t=o[n],t.selected&&s.push(t.value);if(this.model.value=s,e.__super__.change_input.call(this),r)return this.selectEl.focus()},e}(c.InputWidgetView),n.MultiSelect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"MultiSelect\",e.prototype.default_view=n.MultiSelectView,e.define({value:[l.Array,[]],options:[l.Array,[]],size:[l.Number,4]}),e}(c.InputWidget)},387:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(409),s=t(14),a=t(5);n.PanelView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){return e.__super__.render.call(this),a.empty(this.el),this},e}(o.WidgetView),n.Panel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Panel\",e.prototype.default_view=n.PanelView,e.define({title:[s.String,\"\"],child:[s.Instance],closable:[s.Bool,!1]}),e}(o.Widget)},388:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(385),s=t(5);n.ParagraphView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=s.p({style:{margin:0}},this.model.text),this.markupEl.appendChild(t)},e}(o.MarkupView),n.Paragraph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Paragraph\",e.prototype.default_view=n.ParagraphView,e}(o.Markup)},389:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(397);n.PasswordInputView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.inputEl.type=\"password\"},e}(o.TextInputView),n.PasswordInput=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"PasswordInput\",e.prototype.default_view=n.PasswordInputView,e}(o.TextInput)},390:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(385),s=t(5);n.PreTextView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=s.pre({style:{overflow:\"auto\"}},this.model.text),this.markupEl.appendChild(t)},e}(o.MarkupView),n.PreText=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"PreText\",e.prototype.default_view=n.PreTextView,e}(o.Markup)},391:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(36),a=t(14),u=t(409);n.RadioButtonGroupView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t,n,r,i,a,u,l,c,p,d;for(e.__super__.render.call(this),o.empty(this.el),n=o.div({\"class\":\"bk-bs-btn-group\"}),this.el.appendChild(n),c=s.uniqueId(),t=this.model.active,p=this.model.labels,\n",
" r=a=0,l=p.length;a<l;r=++a)d=p[r],i=o.input({type:\"radio\",name:c,value:\"\"+r,checked:r===t}),i.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),u=o.label({\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]},i,d),r===t&&u.classList.add(\"bk-bs-active\"),n.appendChild(u);return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],e=t=0,r=i.length;t<r;e=++t)n=i[e],n.checked&&o.push(e);return o}.call(this),this.model.active=t[0],null!=(r=this.model.callback)?r.execute(this.model):void 0},e}(u.WidgetView),n.RadioButtonGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"RadioButtonGroup\",e.prototype.default_view=n.RadioButtonGroupView,e.define({active:[a.Any,null],labels:[a.Array,[]],button_type:[a.String,\"default\"],callback:[a.Instance]}),e}(u.Widget)},392:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(36),a=t(14),u=t(409);n.RadioGroupView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t,n,r,i,a,u,l,c,p,d;for(e.__super__.render.call(this),o.empty(this.el),c=s.uniqueId(),t=this.model.active,p=this.model.labels,r=a=0,l=p.length;a<l;r=++a)d=p[r],i=o.input({type:\"radio\",name:c,value:\"\"+r}),i.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.model.disabled&&(i.disabled=!0),r===t&&(i.checked=!0),u=o.label({},i,d),this.model.inline?(u.classList.add(\"bk-bs-radio-inline\"),this.el.appendChild(u)):(n=o.div({\"class\":\"bk-bs-radio\"},u),this.el.appendChild(n));return this},e.prototype.change_input=function(){var t,e,n,r;return t=function(){var t,r,i,o;for(i=this.el.querySelectorAll(\"input\"),o=[],e=t=0,r=i.length;t<r;e=++t)n=i[e],n.checked&&o.push(e);return o}.call(this),this.model.active=t[0],null!=(r=this.model.callback)?r.execute(this.model):void 0},e}(u.WidgetView),n.RadioGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"RadioGroup\",e.prototype.default_view=n.RadioGroupView,e.define({active:[a.Any,null],labels:[a.Array,[]],inline:[a.Bool,!1],callback:[a.Instance]}),e}(u.Widget)},393:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(329),s=t(371);n.RangeSliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}},e.prototype._calc_from=function(t){return t},e}(s.AbstractSliderView),n.RangeSlider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"RangeSlider\",e.prototype.default_view=n.RangeSliderView,e.prototype.behaviour=\"drag\",e.prototype.connected=[!1,!0,!1],e.prototype._formatter=o.format,e.override({format:\"0[.]00\"}),e}(s.AbstractSlider)},394:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(41),a=t(13),u=t(14),l=t(383);n.SelectView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t,n;return e.__super__.render.call(this),o.empty(this.el),t=o.label({\"for\":this.model.id},this.model.title),this.el.appendChild(t),n=this.model.options.map(function(t){return function(e){var n,r,i;return s.isString(e)?i=n=e:(i=e[0],n=e[1]),r=t.model.value===i,o.option({selected:r,value:i},n)}}(this)),this.selectEl=o.select({\"class\":\"bk-widget-form-input\",id:this.model.id,name:this.model.name},n),this.selectEl.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.el.appendChild(this.selectEl),this},e.prototype.change_input=function(){var t;return t=this.selectEl.value,a.logger.debug(\"selectbox: value = \"+t),this.model.value=t,e.__super__.change_input.call(this)},e}(l.InputWidgetView),n.Select=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Select\",e.prototype.default_view=n.SelectView,e.define({value:[u.String,\"\"],options:[u.Any,[]]}),e}(l.InputWidget)},395:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(329),s=t(371);n.SliderView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}},e.prototype._calc_from=function(t){var e;return e=t[0],Number.isInteger(this.model.start)&&Number.isInteger(this.model.end)&&Number.isInteger(this.model.step)?0|e:e},e}(s.AbstractSliderView),n.Slider=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Slider\",e.prototype.default_view=n.SliderView,e.prototype.behaviour=\"tap\",e.prototype.connected=[!0,!1],e.prototype._formatter=o.format,e.override({format:\"0[.]00\"}),e}(s.AbstractSlider)},396:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(5),s=t(21),a=t(14),u=t(409);n.TabsView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.tabs.change,function(t){return function(){return t.rebuild_child_views()}}(this))},e.prototype.render=function(){var t,n,r,i,a,u,l,c,p,d,h;if(e.__super__.render.call(this),o.empty(this.el),r=this.model.tabs.length,0!==r){for(this.model.active>=r&&(this.model.active=r-1),d=this.model.tabs.map(function(t,e){return o.li({},o.span({data:{index:e}},t.title))}),d[this.model.active].classList.add(\"bk-bs-active\"),h=o.ul({\"class\":[\"bk-bs-nav\",\"bk-bs-nav-tabs\"]},d),this.el.appendChild(h),u=this.model.tabs.map(function(t){return o.div({\"class\":\"bk-bs-tab-pane\"})}),u[this.model.active].classList.add(\"bk-bs-active\"),l=o.div({\"class\":\"bk-bs-tab-content\"},u),this.el.appendChild(l),h.addEventListener(\"click\",function(t){return function(e){var n,r,i,o;if(e.preventDefault(),e.target!==e.currentTarget&&(n=e.target,i=t.model.active,r=parseInt(n.dataset.index),i!==r))return d[i].classList.remove(\"bk-bs-active\"),u[i].classList.remove(\"bk-bs-active\"),d[r].classList.add(\"bk-bs-active\"),u[r].classList.add(\"bk-bs-active\"),t.model.active=r,null!=(o=t.model.callback)?o.execute(t.model):void 0}}(this)),c=s.zip(this.model.children,u),n=0,i=c.length;n<i;n++)p=c[n],t=p[0],a=p[1],a.appendChild(this.child_views[t.id].el);return this}},e}(u.WidgetView),n.Tabs=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Tabs\",e.prototype.default_view=n.TabsView,e.define({tabs:[a.Array,[]],active:[a.Number,0],callback:[a.Instance]}),e.getters({children:function(){var t,e,n,r,i;for(n=this.tabs,r=[],t=0,e=n.length;t<e;t++)i=n[t],r.push(i.child);return r}}),e.prototype.get_layoutable_children=function(){return this.children},e}(u.Widget)},397:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(13),s=t(14),a=t(5),u=t(383);n.TextInputView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.className=\"bk-widget-form-group\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.render()})},e.prototype.render=function(){var t;return e.__super__.render.call(this),a.empty(this.el),t=a.label({\"for\":this.model.id},this.model.title),this.el.appendChild(t),this.inputEl=a.input({type:\"text\",\"class\":\"bk-widget-form-input\",id:this.model.id,name:this.model.name,value:this.model.value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.inputEl.addEventListener(\"change\",function(t){return function(){return t.change_input()}}(this)),this.el.appendChild(this.inputEl),this.model.height&&(this.inputEl.style.height=this.model.height-35+\"px\"),this},e.prototype.change_input=function(){var t;return t=this.inputEl.value,o.logger.debug(\"widget/text_input: value = \"+t),this.model.value=t,e.__super__.change_input.call(this)},e}(u.InputWidgetView),n.TextInput=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"TextInput\",e.prototype.default_view=n.TextInputView,e.define({value:[s.String,\"\"],placeholder:[s.String,\"\"]}),e}(u.InputWidget)},398:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(369);n.ToggleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.model.active&&this.buttonEl.classList.add(\"bk-bs-active\"),this},e.prototype.change_input=function(){return this.model.active=!this.model.active,e.__super__.change_input.call(this)},e}(s.AbstractButtonView),n.Toggle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Toggle\",e.prototype.default_view=n.ToggleView,e.define({active:[o.Bool,!1]}),e.override({label:\"Toggle\"}),e}(s.AbstractButton)},409:function(t,e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(136);n.WidgetView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.className=\"bk-widget\",e.prototype.render=function(){if(this._render_classes(),null!=this.model.height&&(this.el.style.height=this.model.height+\"px\"),null!=this.model.width)return this.el.style.width=this.model.width+\"px\"},e}(o.LayoutDOMView),n.Widget=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type=\"Widget\",e.prototype.default_view=n.WidgetView,e}(o.LayoutDOM)},400:function(t,n,r){/*! nouislider - 10.1.0 - 2017-07-28 17:11:18 */\n",
" !function(t){\"function\"==typeof e&&e.amd?e([],t):\"object\"==typeof r?n.exports=t():window.noUiSlider=t()}(function(){\"use strict\";function t(t){return\"object\"==typeof t&&\"function\"==typeof t.to&&\"function\"==typeof t.from}function e(t){t.parentElement.removeChild(t)}function n(t){t.preventDefault()}function r(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function i(t,e){return Math.round(t/e)*e}function o(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.documentElement,o=f(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),e?n.top+o.y-i.clientTop:n.left+o.x-i.clientLeft}function s(t){return\"number\"==typeof t&&!isNaN(t)&&isFinite(t)}function a(t,e,n){n>0&&(p(t,e),setTimeout(function(){d(t,e)},n))}function u(t){return Math.max(Math.min(t,100),0)}function l(t){return Array.isArray(t)?t:[t]}function c(t){t=String(t);var e=t.split(\".\");return e.length>1?e[1].length:0}function p(t,e){t.classList?t.classList.add(e):t.className+=\" \"+e}function d(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function h(t,e){return t.classList?t.classList.contains(e):new RegExp(\"\\\\b\"+e+\"\\\\b\").test(t.className)}function f(t){var e=void 0!==window.pageXOffset,n=\"CSS1Compat\"===(t.compatMode||\"\"),r=e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,i=e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop;return{x:r,y:i}}function _(){return window.navigator.pointerEnabled?{start:\"pointerdown\",move:\"pointermove\",end:\"pointerup\"}:window.navigator.msPointerEnabled?{start:\"MSPointerDown\",move:\"MSPointerMove\",end:\"MSPointerUp\"}:{start:\"mousedown touchstart\",move:\"mousemove touchmove\",end:\"mouseup touchend\"}}function m(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e)}catch(n){}return t}function y(){return window.CSS&&CSS.supports&&CSS.supports(\"touch-action\",\"none\")}function g(t,e){return 100/(e-t)}function v(t,e){return 100*e/(t[1]-t[0])}function b(t,e){return v(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function w(t,e){return e*(t[1]-t[0])/100+t[0]}function k(t,e){for(var n=1;t>=e[n];)n+=1;return n}function x(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=k(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+b([r,i],n)/g(o,s)}function S(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=k(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],w([r,i],(n-o)*g(o,s))}function E(t,e,n,r){if(100===r)return r;var o,s,a=k(r,t);return n?(o=t[a-1],s=t[a],r-o>(s-o)/2?s:o):e[a-1]?t[a-1]+i(r-t[a-1],e[a-1]):r}function D(t,e,n){var r;if(\"number\"==typeof e&&(e=[e]),\"[object Array]\"!==Object.prototype.toString.call(e))throw new Error(\"noUiSlider (\"+Z+\"): 'range' contains invalid value.\");if(r=\"min\"===t?0:\"max\"===t?100:parseFloat(t),!s(r)||!s(e[0]))throw new Error(\"noUiSlider (\"+Z+\"): 'range' value isn't numeric.\");n.xPct.push(r),n.xVal.push(e[0]),r?n.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(n.xSteps[0]=e[1]),n.xHighestCompleteStep.push(0)}function M(t,e,n){if(!e)return!0;n.xSteps[t]=v([n.xVal[t],n.xVal[t+1]],e)/g(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function C(t,e,n){this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var r,i=[];for(r in t)t.hasOwnProperty(r)&&i.push([t[r],r]);for(i.length&&\"object\"==typeof i[0][0]?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),r=0;r<i.length;r++)D(i[r][1],i[r][0],this);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)M(r,this.xNumSteps[r],this)}function P(e){if(t(e))return!0;throw new Error(\"noUiSlider (\"+Z+\"): 'format' requires 'to' and 'from' methods.\")}function O(t,e){if(!s(e))throw new Error(\"noUiSlider (\"+Z+\"): 'step' is not numeric.\");t.singleStep=e}function A(t,e){if(\"object\"!=typeof e||Array.isArray(e))throw new Error(\"noUiSlider (\"+Z+\"): 'range' is not an object.\");if(void 0===e.min||void 0===e.max)throw new Error(\"noUiSlider (\"+Z+\"): Missing 'min' or 'max' in 'range'.\");if(e.min===e.max)throw new Error(\"noUiSlider (\"+Z+\"): 'range' 'min' and 'max' cannot be equal.\");t.spectrum=new C(e,t.snap,t.singleStep)}function V(t,e){if(e=l(e),!Array.isArray(e)||!e.length)throw new Error(\"noUiSlider (\"+Z+\"): 'start' option is incorrect.\");t.handles=e.length,t.start=e}function N(t,e){if(t.snap=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'snap' option must be a boolean.\")}function I(t,e){if(t.animate=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'animate' option must be a boolean.\")}function R(t,e){if(t.animationDuration=e,\"number\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'animationDuration' option must be a number.\")}function j(t,e){var n,r=[!1];if(\"lower\"===e?e=[!0,!1]:\"upper\"===e&&(e=[!1,!0]),e===!0||e===!1){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error(\"noUiSlider (\"+Z+\"): 'connect' option doesn't match handle count.\");r=e}t.connect=r}function T(t,e){switch(e){case\"horizontal\":t.ort=0;break;case\"vertical\":t.ort=1;break;default:throw new Error(\"noUiSlider (\"+Z+\"): 'orientation' option is invalid.\")}}function L(t,e){if(!s(e))throw new Error(\"noUiSlider (\"+Z+\"): 'margin' option must be numeric.\");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error(\"noUiSlider (\"+Z+\"): 'margin' option is only supported on linear sliders.\")}function W(t,e){if(!s(e))throw new Error(\"noUiSlider (\"+Z+\"): 'limit' option must be numeric.\");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error(\"noUiSlider (\"+Z+\"): 'limit' option is only supported on linear sliders with 2 or more handles.\")}function B(t,e){if(!s(e))throw new Error(\"noUiSlider (\"+Z+\"): 'padding' option must be numeric.\");if(0!==e){if(t.padding=t.spectrum.getMargin(e),!t.padding)throw new Error(\"noUiSlider (\"+Z+\"): 'padding' option is only supported on linear sliders.\");if(t.padding<0)throw new Error(\"noUiSlider (\"+Z+\"): 'padding' option must be a positive number.\");if(t.padding>=50)throw new Error(\"noUiSlider (\"+Z+\"): 'padding' option must be less than half the range.\")}}function z(t,e){switch(e){case\"ltr\":t.dir=0;break;case\"rtl\":t.dir=1;break;default:throw new Error(\"noUiSlider (\"+Z+\"): 'direction' option was not recognized.\")}}function U(t,e){if(\"string\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'behaviour' must be a string containing options.\");var n=e.indexOf(\"tap\")>=0,r=e.indexOf(\"drag\")>=0,i=e.indexOf(\"fixed\")>=0,o=e.indexOf(\"snap\")>=0,s=e.indexOf(\"hover\")>=0;if(i){if(2!==t.handles)throw new Error(\"noUiSlider (\"+Z+\"): 'fixed' behaviour must be used with 2 handles\");L(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function F(t,e){if(t.multitouch=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'multitouch' option must be a boolean.\")}function Y(t,e){if(e!==!1)if(e===!0){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(!0)}else{if(t.tooltips=l(e),t.tooltips.length!==t.handles)throw new Error(\"noUiSlider (\"+Z+\"): must pass a formatter for all handles.\");t.tooltips.forEach(function(t){if(\"boolean\"!=typeof t&&(\"object\"!=typeof t||\"function\"!=typeof t.to))throw new Error(\"noUiSlider (\"+Z+\"): 'tooltips' must be passed a formatter or 'false'.\")})}}function H(t,e){t.ariaFormat=e,P(e)}function q(t,e){t.format=e,P(e)}function G(t,e){if(void 0!==e&&\"string\"!=typeof e&&e!==!1)throw new Error(\"noUiSlider (\"+Z+\"): 'cssPrefix' must be a string or `false`.\");t.cssPrefix=e}function X(t,e){if(void 0!==e&&\"object\"!=typeof e)throw new Error(\"noUiSlider (\"+Z+\"): 'cssClasses' must be an object.\");if(\"string\"==typeof t.cssPrefix){t.cssClasses={};for(var n in e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n])}else t.cssClasses=e}function K(t,e){if(e!==!0&&e!==!1)throw new Error(\"noUiSlider (\"+Z+\"): 'useRequestAnimationFrame' option should be true (default) or false.\");t.useRequestAnimationFrame=e}function J(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:tt,format:tt},n={step:{r:!1,t:O},start:{r:!0,t:V},connect:{r:!0,t:j},direction:{r:!0,t:z},snap:{r:!1,t:N},animate:{r:!1,t:I},animationDuration:{r:!1,t:R},range:{r:!0,t:A},orientation:{r:!1,t:T},margin:{r:!1,t:L},limit:{r:!1,t:W},padding:{r:!1,t:B},behaviour:{r:!0,t:U},multitouch:{r:!0,t:F},ariaFormat:{r:!1,t:H},format:{r:!1,t:q},tooltips:{r:!1,t:Y},cssPrefix:{r:!1,t:G},cssClasses:{r:!1,t:X},useRequestAnimationFrame:{r:!1,t:K}},r={connect:!1,direction:\"ltr\",behaviour:\"tap\",multitouch:!1,orientation:\"horizontal\",cssPrefix:\"noUi-\",cssClasses:{target:\"target\",base:\"base\",origin:\"origin\",handle:\"handle\",handleLower:\"handle-lower\",handleUpper:\"handle-upper\",horizontal:\"horizontal\",vertical:\"vertical\",background:\"background\",connect:\"connect\",ltr:\"ltr\",rtl:\"rtl\",draggable:\"draggable\",drag:\"state-drag\",tap:\"state-tap\",active:\"active\",tooltip:\"tooltip\",pips:\"pips\",pipsHorizontal:\"pips-horizontal\",pipsVertical:\"pips-vertical\",marker:\"marker\",markerHorizontal:\"marker-horizontal\",markerVertical:\"marker-vertical\",markerNormal:\"marker-normal\",markerLarge:\"marker-large\",markerSub:\"marker-sub\",value:\"value\",valueHorizontal:\"value-horizontal\",valueVertical:\"value-vertical\",valueNormal:\"value-normal\",valueLarge:\"value-large\",valueSub:\"value-sub\"},useRequestAnimationFrame:!0};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(n).forEach(function(i){if(void 0===t[i]&&void 0===r[i]){if(n[i].r)throw new Error(\"noUiSlider (\"+Z+\"): '\"+i+\"' is required.\");return!0}n[i].t(e,void 0===t[i]?r[i]:t[i])}),e.pips=t.pips;var i=[[\"left\",\"top\"],[\"right\",\"bottom\"]];return e.style=i[e.dir][e.ort],e.styleOposite=i[e.dir?0:1][e.ort],e}function $(t,i,s){function c(t,e){var n=kt.createElement(\"div\");return e&&p(n,e),t.appendChild(n),n}function g(t,e){var n=c(t,i.cssClasses.origin),r=c(n,i.cssClasses.handle);return r.setAttribute(\"data-handle\",e),r.setAttribute(\"tabindex\",\"0\"),r.setAttribute(\"role\",\"slider\"),r.setAttribute(\"aria-orientation\",i.ort?\"vertical\":\"horizontal\"),0===e?p(r,i.cssClasses.handleLower):e===i.handles-1&&p(r,i.cssClasses.handleUpper),n}function v(t,e){return!!e&&c(t,i.cssClasses.connect)}function b(t,e){ut=[],lt=[],lt.push(v(e,t[0]));for(var n=0;n<i.handles;n++)ut.push(g(e,n)),yt[n]=n,lt.push(v(e,t[n+1]))}function w(t){p(t,i.cssClasses.target),0===i.dir?p(t,i.cssClasses.ltr):p(t,i.cssClasses.rtl),0===i.ort?p(t,i.cssClasses.horizontal):p(t,i.cssClasses.vertical),at=c(t,i.cssClasses.base)}function k(t,e){return!!i.tooltips[e]&&c(t.firstChild,i.cssClasses.tooltip)}function x(){var t=ut.map(k);it(\"update\",function(e,n,r){if(t[n]){var o=e[n];i.tooltips[n]!==!0&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML=o}})}function S(){it(\"update\",function(t,e,n,r,o){yt.forEach(function(t){var e=ut[t],r=Y(mt,t,0,!0,!0,!0),s=Y(mt,t,100,!0,!0,!0),a=o[t],u=i.ariaFormat.to(n[t]);e.children[0].setAttribute(\"aria-valuemin\",r.toFixed(1)),e.children[0].setAttribute(\"aria-valuemax\",s.toFixed(1)),e.children[0].setAttribute(\"aria-valuenow\",a.toFixed(1)),e.children[0].setAttribute(\"aria-valuetext\",u)})})}function E(t,e,n){if(\"range\"===t||\"steps\"===t)return vt.xVal;if(\"count\"===t){if(!e)throw new Error(\"noUiSlider (\"+Z+\"): 'values' required for mode 'count'.\");var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t=\"positions\"}return\"positions\"===t?e.map(function(t){return vt.fromStepping(n?vt.getStep(t):t)}):\"values\"===t?n?e.map(function(t){return vt.fromStepping(vt.getStep(vt.toStepping(t)))}):e:void 0}function D(t,e,n){function i(t,e){return(t+e).toFixed(7)/1}var o={},s=vt.xVal[0],a=vt.xVal[vt.xVal.length-1],u=!1,l=!1,c=0;return n=r(n.slice().sort(function(t,e){return t-e})),n[0]!==s&&(n.unshift(s),u=!0),n[n.length-1]!==a&&(n.push(a),l=!0),n.forEach(function(r,s){var a,p,d,h,f,_,m,y,g,v,b=r,w=n[s+1];if(\"steps\"===e&&(a=vt.xNumSteps[s]),a||(a=w-b),b!==!1&&void 0!==w)for(a=Math.max(a,1e-7),p=b;p<=w;p=i(p,a)){for(h=vt.toStepping(p),f=h-c,y=f/t,g=Math.round(y),v=f/g,d=1;d<=g;d+=1)_=c+d*v,o[_.toFixed(5)]=[\"x\",0];m=n.indexOf(p)>-1?1:\"steps\"===e?2:0,!s&&u&&(m=0),p===w&&l||(o[h.toFixed(5)]=[p,m]),c=h}}),o}function M(t,e,n){function r(t,e){var n=e===i.cssClasses.value,r=n?l:d,o=n?a:u;return e+\" \"+r[i.ort]+\" \"+o[t]}function o(t,o){o[1]=o[1]&&e?e(o[0],o[1]):o[1];var a=c(s,!1);a.className=r(o[1],i.cssClasses.marker),a.style[i.style]=t+\"%\",o[1]&&(a=c(s,!1),a.className=r(o[1],i.cssClasses.value),a.style[i.style]=t+\"%\",a.innerText=n.to(o[0]))}var s=kt.createElement(\"div\"),a=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],u=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],l=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],d=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return p(s,i.cssClasses.pips),p(s,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){o(e,t[e])}),s}function C(){pt&&(e(pt),pt=null)}function P(t){C();var e=t.mode,n=t.density||1,r=t.filter||!1,i=t.values||!1,o=t.stepped||!1,s=E(e,i,o),a=D(n,e,s),u=t.format||{to:Math.round};return pt=_t.appendChild(M(a,r,u))}function O(){var t=at.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||at[e]:t.height||at[e]}function A(t,e,n,r){var o=function(o){return!_t.hasAttribute(\"disabled\")&&(!h(_t,i.cssClasses.tap)&&(!!(o=V(o,r.pageOffset,r.target||e))&&(!(t===dt.start&&void 0!==o.buttons&&o.buttons>1)&&((!r.hover||!o.buttons)&&(ft||o.preventDefault(),o.calcPoint=o.points[i.ort],void n(o,r))))))},s=[];return t.split(\" \").forEach(function(t){e.addEventListener(t,o,!!ft&&{passive:!0}),s.push([t,o])}),s}function V(t,e,n){var r,o,s=0===t.type.indexOf(\"touch\"),a=0===t.type.indexOf(\"mouse\"),u=0===t.type.indexOf(\"pointer\");if(0===t.type.indexOf(\"MSPointer\")&&(u=!0),s&&i.multitouch){var l=function(t){return t.target===n||n.contains(t.target)};if(\"touchstart\"===t.type){var c=Array.prototype.filter.call(t.touches,l);if(c.length>1)return!1;r=c[0].pageX,o=c[0].pageY}else{var p=Array.prototype.find.call(t.changedTouches,l);if(!p)return!1;r=p.pageX,o=p.pageY}}else if(s){if(t.touches.length>1)return!1;r=t.changedTouches[0].pageX,o=t.changedTouches[0].pageY}return e=e||f(kt),(a||u)&&(r=t.clientX+e.x,o=t.clientY+e.y),t.pageOffset=e,t.points=[r,o],t.cursor=a||u,t}function N(t){var e=t-o(at,i.ort),n=100*e/O();return i.dir?100-n:n}function I(t){var e=100,n=!1;return ut.forEach(function(r,i){if(!r.hasAttribute(\"disabled\")){var o=Math.abs(mt[i]-t);o<e&&(n=i,e=o)}}),n}function R(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=Y(i,t,i[t]+e,o[n],s[n],!1);r===!1?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=X(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){j(\"update\",t),j(\"slide\",t)})}function j(t,e,n){Object.keys(wt).forEach(function(r){var o=r.split(\".\")[0];t===o&&wt[r].forEach(function(t){t.call(ct,bt.map(i.format.to),e,bt.slice(),n||!1,mt.slice())})})}function T(t,e){\"mouseout\"===t.type&&\"HTML\"===t.target.nodeName&&null===t.relatedTarget&&W(t,e)}function L(t,e){if(navigator.appVersion.indexOf(\"MSIE 9\")===-1&&0===t.buttons&&0!==e.buttonsProperty)return W(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint),r=100*n/e.baseSize;R(n>0,r,e.locations,e.handleNumbers)}function W(t,e){e.handle&&(d(e.handle,i.cssClasses.active),gt-=1),e.listeners.forEach(function(t){xt.removeEventListener(t[0],t[1])}),0===gt&&(d(_t,i.cssClasses.drag),G(),t.cursor&&(St.style.cursor=\"\",St.removeEventListener(\"selectstart\",n))),e.handleNumbers.forEach(function(t){j(\"change\",t),j(\"set\",t),j(\"end\",t)})}function B(t,e){var r;if(1===e.handleNumbers.length){var o=ut[e.handleNumbers[0]];if(o.hasAttribute(\"disabled\"))return!1;r=o.children[0],gt+=1,p(r,i.cssClasses.active)}t.stopPropagation();var s=[],a=A(dt.move,xt,L,{target:t.target,handle:r,listeners:s,startCalcPoint:t.calcPoint,baseSize:O(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:mt.slice()}),u=A(dt.end,xt,W,{target:t.target,handle:r,listeners:s,handleNumbers:e.handleNumbers}),l=A(\"mouseout\",xt,T,{target:t.target,handle:r,listeners:s,handleNumbers:e.handleNumbers});s.push.apply(s,a.concat(u,l)),t.cursor&&(St.style.cursor=getComputedStyle(t.target).cursor,ut.length>1&&p(_t,i.cssClasses.drag),St.addEventListener(\"selectstart\",n,!1)),e.handleNumbers.forEach(function(t){j(\"start\",t)})}function z(t){t.stopPropagation();var e=N(t.calcPoint),n=I(e);return n!==!1&&(i.events.snap||a(_t,i.cssClasses.tap,i.animationDuration),X(n,e,!0,!0),G(),j(\"slide\",n,!0),j(\"update\",n,!0),j(\"change\",n,!0),j(\"set\",n,!0),void(i.events.snap&&B(t,{handleNumbers:[n]})))}function U(t){var e=N(t.calcPoint),n=vt.getStep(e),r=vt.fromStepping(n);Object.keys(wt).forEach(function(t){\"hover\"===t.split(\".\")[0]&&wt[t].forEach(function(t){t.call(ct,r)})})}function F(t){t.fixed||ut.forEach(function(t,e){A(dt.start,t.children[0],B,{handleNumbers:[e]})}),t.tap&&A(dt.start,at,z,{}),t.hover&&A(dt.move,at,U,{hover:!0}),t.drag&&lt.forEach(function(e,n){if(e!==!1&&0!==n&&n!==lt.length-1){var r=ut[n-1],o=ut[n],s=[e];p(e,i.cssClasses.draggable),t.fixed&&(s.push(r.children[0]),s.push(o.children[0])),s.forEach(function(t){A(dt.start,t,B,{handles:[r,o],handleNumbers:[n-1,n]})})}})}function Y(t,e,n,r,o,s){return ut.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e<ut.length-1&&(n=Math.min(n,t[e+1]-i.margin))),ut.length>1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e<ut.length-1&&(n=Math.max(n,t[e+1]-i.limit))),i.padding&&(0===e&&(n=Math.max(n,i.padding)),e===ut.length-1&&(n=Math.min(n,100-i.padding))),n=vt.getStep(n),n=u(n),!(n===t[e]&&!s)&&n}function H(t){return t+\"%\"}function q(t,e){mt[t]=e,bt[t]=vt.fromStepping(e);var n=function(){ut[t].style[i.style]=H(e),K(t),K(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}function G(){yt.forEach(function(t){var e=mt[t]>50?-1:1,n=3+(ut.length+e*t);ut[t].childNodes[0].style.zIndex=n})}function X(t,e,n,r){return e=Y(mt,t,e,n,r,!1),e!==!1&&(q(t,e),!0)}function K(t){if(lt[t]){var e=0,n=100;0!==t&&(e=mt[t-1]),t!==lt.length-1&&(n=mt[t]),lt[t].style[i.style]=H(e),lt[t].style[i.styleOposite]=H(100-n)}}function $(t,e){null!==t&&t!==!1&&(\"number\"==typeof t&&(t=String(t)),t=i.format.from(t),t===!1||isNaN(t)||X(e,vt.toStepping(t),!1,!1))}function Q(t,e){var n=l(t),r=void 0===mt[0];e=void 0===e||!!e,n.forEach($),i.animate&&!r&&a(_t,i.cssClasses.tap,i.animationDuration),yt.forEach(function(t){X(t,mt[t],!0,!1)}),G(),yt.forEach(function(t){j(\"update\",t),null!==n[t]&&e&&j(\"set\",t)})}function tt(t){Q(i.start,t)}function et(){var t=bt.map(i.format.to);return 1===t.length?t[0]:t}function nt(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&d(_t,i.cssClasses[t]);for(;_t.firstChild;)_t.removeChild(_t.firstChild);delete _t.noUiSlider}function rt(){return mt.map(function(t,e){var n=vt.getNearbySteps(t),r=bt[e],i=n.thisStep.step,o=null;i!==!1&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:n.stepBefore.step!==!1&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=vt.countStepDecimals();return null!==i&&i!==!1&&(i=Number(i.toFixed(s))),null!==o&&o!==!1&&(o=Number(o.toFixed(s))),[o,i]})}function it(t,e){wt[t]=wt[t]||[],wt[t].push(e),\"update\"===t.split(\".\")[0]&&ut.forEach(function(t,e){j(\"update\",e)})}function ot(t){var e=t&&t.split(\".\")[0],n=e&&t.substring(e.length);Object.keys(wt).forEach(function(t){var r=t.split(\".\")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete wt[t]})}function st(t,e){var n=et(),r=[\"margin\",\"limit\",\"padding\",\"range\",\"animate\",\"snap\",\"step\",\"format\"];r.forEach(function(e){void 0!==t[e]&&(s[e]=t[e])});var o=J(s);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),vt=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,i.pips&&P(i.pips),mt=[],Q(t.start||n,e)}var at,ut,lt,ct,pt,dt=_(),ht=y(),ft=ht&&m(),_t=t,mt=[],yt=[],gt=0,vt=i.spectrum,bt=[],wt={},kt=t.ownerDocument,xt=kt.documentElement,St=kt.body;if(_t.noUiSlider)throw new Error(\"noUiSlider (\"+Z+\"): Slider was already initialized.\");return w(_t),b(i.connect,at),ct={destroy:nt,steps:rt,on:it,off:ot,get:et,set:Q,reset:tt,__moveHandles:function(t,e,n){R(t,e,mt,n)},options:s,updateOptions:st,target:_t,removePips:C,pips:P},F(i.events),Q(i.start),i.pips&&P(i.pips),i.tooltips&&x(),S(),ct}function Q(t,e){if(!t||!t.nodeName)throw new Error(\"noUiSlider (\"+Z+\"): create requires a single element, got: \"+t);var n=J(e,t),r=$(t,n,e);return t.noUiSlider=r,r}var Z=\"10.1.0\";C.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!==0)throw new Error(\"noUiSlider (\"+Z+\"): 'limit', 'margin' and 'padding' must be divisible by step.\");return 2===this.xPct.length&&v(this.xVal,t)},C.prototype.toStepping=function(t){return t=x(this.xVal,this.xPct,t)},C.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},C.prototype.getStep=function(t){return t=E(this.xPct,this.xSteps,this.snap,t)},C.prototype.getNearbySteps=function(t){var e=k(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},C.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(c);return Math.max.apply(null,t)},C.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var tt={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{version:Z,create:Q}})},401:function(t,n,r){/*!\n",
" * Pikaday\n",
" *\n",
" * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday\n",
" */\n",
" !function(i,o){\"use strict\";var s;if(\"object\"==typeof r){try{s=t(\"moment\")}catch(a){}n.exports=o(s)}else\"function\"==typeof e&&e.amd?e(function(t){var e=\"moment\";try{s=t(e)}catch(n){}return o(s)}):i.Pikaday=o(i.moment)}(this,function(t){\"use strict\";var e=\"function\"==typeof t,n=!!window.addEventListener,r=window.document,i=window.setTimeout,o=function(t,e,r,i){n?t.addEventListener(e,r,!!i):t.attachEvent(\"on\"+e,r)},s=function(t,e,r,i){n?t.removeEventListener(e,r,!!i):t.detachEvent(\"on\"+e,r)},a=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")},u=function(t,e){return(\" \"+t.className+\" \").indexOf(\" \"+e+\" \")!==-1},l=function(t,e){u(t,e)||(t.className=\"\"===t.className?e:t.className+\" \"+e)},c=function(t,e){t.className=a((\" \"+t.className+\" \").replace(\" \"+e+\" \",\" \"))},p=function(t){return/Array/.test(Object.prototype.toString.call(t))},d=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},h=function(t){var e=t.getDay();return 0===e||6===e},f=function(t){return t%4===0&&t%100!==0||t%400===0},_=function(t,e){return[31,f(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},m=function(t){d(t)&&t.setHours(0,0,0,0)},y=function(t,e){return t.getTime()===e.getTime()},g=function(t,e,n){var r,i;for(r in e)i=void 0!==t[r],i&&\"object\"==typeof e[r]&&null!==e[r]&&void 0===e[r].nodeName?d(e[r])?n&&(t[r]=new Date(e[r].getTime())):p(e[r])?n&&(t[r]=e[r].slice(0)):t[r]=g({},e[r],n):!n&&i||(t[r]=e[r]);return t},v=function(t,e,n){var i;r.createEvent?(i=r.createEvent(\"HTMLEvents\"),i.initEvent(e,!0,!1),i=g(i,n),t.dispatchEvent(i)):r.createEventObject&&(i=r.createEventObject(),i=g(i,n),t.fireEvent(\"on\"+e,i))},b=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},w={field:null,bound:void 0,position:\"bottom left\",reposition:!0,format:\"YYYY-MM-DD\",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:\"\",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:\"left\",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:\"Previous Month\",nextMonth:\"Next Month\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],weekdaysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},k=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},x=function(t){var e=[],n=\"false\";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class=\"is-empty\"></td>';e.push(\"is-outside-current-month\"),t.enableSelectionDaysInNextAndPreviousMonths||e.push(\"is-selection-disabled\")}return t.isDisabled&&e.push(\"is-disabled\"),t.isToday&&e.push(\"is-today\"),t.isSelected&&(e.push(\"is-selected\"),n=\"true\"),t.hasEvent&&e.push(\"has-event\"),t.isInRange&&e.push(\"is-inrange\"),t.isStartRange&&e.push(\"is-startrange\"),t.isEndRange&&e.push(\"is-endrange\"),'<td data-day=\"'+t.day+'\" class=\"'+e.join(\" \")+'\" aria-selected=\"'+n+'\"><button class=\"pika-button pika-day\" type=\"button\" data-pika-year=\"'+t.year+'\" data-pika-month=\"'+t.month+'\" data-pika-day=\"'+t.day+'\">'+t.day+\"</button></td>\"},S=function(t,e,n){var r=new Date(n,0,1),i=Math.ceil(((new Date(n,e,t)-r)/864e5+r.getDay()+1)/7);return'<td class=\"pika-week\">'+i+\"</td>\"},E=function(t,e,n,r){return'<tr class=\"pika-row'+(n?\" pick-whole-week\":\"\")+(r?\" is-selected\":\"\")+'\">'+(e?t.reverse():t).join(\"\")+\"</tr>\"},D=function(t){return\"<tbody>\"+t.join(\"\")+\"</tbody>\"},M=function(t){var e,n=[];for(t.showWeekNumber&&n.push(\"<th></th>\"),e=0;e<7;e++)n.push('<th scope=\"col\"><abbr title=\"'+k(t,e)+'\">'+k(t,e,!0)+\"</abbr></th>\");return\"<thead><tr>\"+(t.isRTL?n.reverse():n).join(\"\")+\"</tr></thead>\"},C=function(t,e,n,r,i,o){var s,a,u,l,c,d=t._o,h=n===d.minYear,f=n===d.maxYear,_='<div id=\"'+o+'\" class=\"pika-title\" role=\"heading\" aria-live=\"assertive\">',m=!0,y=!0;for(u=[],s=0;s<12;s++)u.push('<option value=\"'+(n===i?s-e:12+s-e)+'\"'+(s===r?' selected=\"selected\"':\"\")+(h&&s<d.minMonth||f&&s>d.maxMonth?'disabled=\"disabled\"':\"\")+\">\"+d.i18n.months[s]+\"</option>\");for(l='<div class=\"pika-label\">'+d.i18n.months[r]+'<select class=\"pika-select pika-select-month\" tabindex=\"-1\">'+u.join(\"\")+\"</select></div>\",p(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),u=[];s<a&&s<=d.maxYear;s++)s>=d.minYear&&u.push('<option value=\"'+s+'\"'+(s===n?' selected=\"selected\"':\"\")+\">\"+s+\"</option>\");return c='<div class=\"pika-label\">'+n+d.yearSuffix+'<select class=\"pika-select pika-select-year\" tabindex=\"-1\">'+u.join(\"\")+\"</select></div>\",_+=d.showMonthAfterYear?c+l:l+c,h&&(0===r||d.minMonth>=r)&&(m=!1),f&&(11===r||d.maxMonth<=r)&&(y=!1),0===e&&(_+='<button class=\"pika-prev'+(m?\"\":\" is-disabled\")+'\" type=\"button\">'+d.i18n.previousMonth+\"</button>\"),e===t._o.numberOfMonths-1&&(_+='<button class=\"pika-next'+(y?\"\":\" is-disabled\")+'\" type=\"button\">'+d.i18n.nextMonth+\"</button>\"),_+=\"</div>\"},P=function(t,e,n){return'<table cellpadding=\"0\" cellspacing=\"0\" class=\"pika-table\" role=\"grid\" aria-labelledby=\"'+n+'\">'+M(t)+D(e)+\"</table>\"},O=function(s){var a=this,l=a.config(s);a._onMouseDown=function(t){if(a._v){t=t||window.event;var e=t.target||t.srcElement;if(e)if(u(e,\"is-disabled\")||(!u(e,\"pika-button\")||u(e,\"is-empty\")||u(e.parentNode,\"is-disabled\")?u(e,\"pika-prev\")?a.prevMonth():u(e,\"pika-next\")&&a.nextMonth():(a.setDate(new Date(e.getAttribute(\"data-pika-year\"),e.getAttribute(\"data-pika-month\"),e.getAttribute(\"data-pika-day\"))),l.bound&&i(function(){a.hide(),l.blurFieldOnSelect&&l.field&&l.field.blur()},100))),u(e,\"pika-select\"))a._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}}},a._onChange=function(t){t=t||window.event;var e=t.target||t.srcElement;e&&(u(e,\"pika-select-month\")?a.gotoMonth(e.value):u(e,\"pika-select-year\")&&a.gotoYear(e.value))},a._onKeyChange=function(t){if(t=t||window.event,a.isVisible())switch(t.keyCode){case 13:case 27:l.field&&l.field.blur();break;case 37:t.preventDefault(),a.adjustDate(\"subtract\",1);break;case 38:a.adjustDate(\"subtract\",7);break;case 39:a.adjustDate(\"add\",1);break;case 40:a.adjustDate(\"add\",7)}},a._onInputChange=function(n){var r;n.firedBy!==a&&(l.parse?r=l.parse(l.field.value,l.format):e?(r=t(l.field.value,l.format,l.formatStrict),r=r&&r.isValid()?r.toDate():null):r=new Date(Date.parse(l.field.value)),d(r)&&a.setDate(r),a._v||a.show())},a._onInputFocus=function(){a.show()},a._onInputClick=function(){a.show()},a._onInputBlur=function(){var t=r.activeElement;do if(u(t,\"pika-single\"))return;while(t=t.parentNode);a._c||(a._b=i(function(){a.hide()},50)),a._c=!1},a._onClick=function(t){t=t||window.event;var e=t.target||t.srcElement,r=e;if(e){!n&&u(e,\"pika-select\")&&(e.onchange||(e.setAttribute(\"onchange\",\"return;\"),o(e,\"change\",a._onChange)));do if(u(r,\"pika-single\")||r===l.trigger)return;while(r=r.parentNode);a._v&&e!==l.trigger&&r!==l.trigger&&a.hide()}},a.el=r.createElement(\"div\"),a.el.className=\"pika-single\"+(l.isRTL?\" is-rtl\":\"\")+(l.theme?\" \"+l.theme:\"\"),o(a.el,\"mousedown\",a._onMouseDown,!0),o(a.el,\"touchend\",a._onMouseDown,!0),o(a.el,\"change\",a._onChange),o(r,\"keydown\",a._onKeyChange),l.field&&(l.container?l.container.appendChild(a.el):l.bound?r.body.appendChild(a.el):l.field.parentNode.insertBefore(a.el,l.field.nextSibling),o(l.field,\"change\",a._onInputChange),l.defaultDate||(e&&l.field.value?l.defaultDate=t(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var c=l.defaultDate;d(c)?l.setDefaultDate?a.setDate(c,!0):a.gotoDate(c):a.gotoDate(new Date),l.bound?(this.hide(),a.el.className+=\" is-bound\",o(l.trigger,\"click\",a._onInputClick),o(l.trigger,\"focus\",a._onInputFocus),o(l.trigger,\"blur\",a._onInputBlur)):this.show()};return O.prototype={config:function(t){this._o||(this._o=g({},w,!0));var e=g(this._o,t,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme=\"string\"==typeof e.theme&&e.theme?e.theme:null,e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn=\"function\"==typeof e.disableDayFn?e.disableDayFn:null;var n=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=n>4?4:n,d(e.minDate)||(e.minDate=!1),d(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&(e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),p(e.yearRange)){var r=(new Date).getFullYear()-10;e.yearRange[0]=parseInt(e.yearRange[0],10)||r,e.yearRange[1]=parseInt(e.yearRange[1],10)||r}else e.yearRange=Math.abs(parseInt(e.yearRange,10))||w.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(n){return n=n||this._o.format,d(this._d)?this._o.toString?this._o.toString(this._d,n):e?t(this._d).format(n):this._d.toDateString():\"\"},getMoment:function(){return e?t(this._d):null},setMoment:function(n,r){e&&t.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return d(this._d)?new Date(this._d.getTime()):null},setDate:function(t,e){if(!t)return this._d=null,this._o.field&&(this._o.field.value=\"\",v(this._o.field,\"change\",{firedBy:this})),this.draw();if(\"string\"==typeof t&&(t=new Date(Date.parse(t))),d(t)){var n=this._o.minDate,r=this._o.maxDate;d(n)&&t<n?t=n:d(r)&&t>r&&(t=r),this._d=new Date(t.getTime()),m(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,\"change\",{firedBy:this})),e||\"function\"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(t){var e=!0;if(d(t)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=t.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),e=i<n.getTime()||r.getTime()<i}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}],\"right\"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(t,e){var n,r=this.getDate()||new Date,i=24*parseInt(e)*60*60*1e3;\"add\"===t?n=new Date(r.valueOf()+i):\"subtract\"===t&&(n=new Date(r.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=b(this.calendars[0]);for(var t=1;t<this._o.numberOfMonths;t++)this.calendars[t]=b({month:this.calendars[0].month+t,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())},setMinDate:function(t){t instanceof Date?(m(t),this._o.minDate=t,this._o.minYear=t.getFullYear(),this._o.minMonth=t.getMonth()):(this._o.minDate=w.minDate,this._o.minYear=w.minYear,this._o.minMonth=w.minMonth,this._o.startRange=w.startRange),this.draw()},setMaxDate:function(t){t instanceof Date?(m(t),this._o.maxDate=t,this._o.maxYear=t.getFullYear(),this._o.maxMonth=t.getMonth()):(this._o.maxDate=w.maxDate,this._o.maxYear=w.maxYear,this._o.maxMonth=w.maxMonth,this._o.endRange=w.endRange),this.draw()},setStartRange:function(t){this._o.startRange=t},setEndRange:function(t){this._o.endRange=t},draw:function(t){if(this._v||t){var e,n=this._o,r=n.minYear,o=n.maxYear,s=n.minMonth,a=n.maxMonth,u=\"\";this._y<=r&&(this._y=r,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=o&&(this._y=o,!isNaN(a)&&this._m>a&&(this._m=a)),e=\"pika-title-\"+Math.random().toString(36).replace(/[^a-z]+/g,\"\").substr(0,2);for(var l=0;l<n.numberOfMonths;l++)u+='<div class=\"pika-lendar\">'+C(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e)+\"</div>\";this.el.innerHTML=u,n.bound&&\"hidden\"!==n.field.type&&i(function(){n.trigger.focus()},1),\"function\"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute(\"aria-label\",\"Use the arrow keys to pick a date\")}},adjustPosition:function(){var t,e,n,i,o,s,a,u,l,c;if(!this._o.container){if(this.el.style.position=\"absolute\",t=this._o.trigger,e=t,n=this.el.offsetWidth,i=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,s=window.innerHeight||r.documentElement.clientHeight,a=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,\"function\"==typeof t.getBoundingClientRect)c=t.getBoundingClientRect(),u=c.left+window.pageXOffset,l=c.bottom+window.pageYOffset;else for(u=e.offsetLeft,l=e.offsetTop+e.offsetHeight;e=e.offsetParent;)u+=e.offsetLeft,l+=e.offsetTop;(this._o.reposition&&u+n>o||this._o.position.indexOf(\"right\")>-1&&u-n+t.offsetWidth>0)&&(u=u-n+t.offsetWidth),(this._o.reposition&&l+i>s+a||this._o.position.indexOf(\"top\")>-1&&l-i-t.offsetHeight>0)&&(l=l-i-t.offsetHeight),this.el.style.left=u+\"px\",this.el.style.top=l+\"px\"}},render:function(t,e,n){var r=this._o,i=new Date,o=_(t,e),s=new Date(t,e,1).getDay(),a=[],u=[];m(i),r.firstDay>0&&(s-=r.firstDay,s<0&&(s+=7));for(var l=0===e?11:e-1,c=11===e?0:e+1,p=0===e?t-1:t,f=11===e?t+1:t,g=_(p,l),v=o+s,b=v;b>7;)b-=7;v+=7-b;for(var w=!1,k=0,D=0;k<v;k++){var M=new Date(t,e,1+(k-s)),C=!!d(this._d)&&y(M,this._d),O=y(M,i),A=r.events.indexOf(M.toDateString())!==-1,V=k<s||k>=o+s,N=1+(k-s),I=e,R=t,j=r.startRange&&y(r.startRange,M),T=r.endRange&&y(r.endRange,M),L=r.startRange&&r.endRange&&r.startRange<M&&M<r.endRange,W=r.minDate&&M<r.minDate||r.maxDate&&M>r.maxDate||r.disableWeekends&&h(M)||r.disableDayFn&&r.disableDayFn(M);V&&(k<s?(N=g+N,I=l,R=p):(N-=o,I=c,R=f));var B={day:N,month:I,year:R,hasEvent:A,isSelected:C,isToday:O,isDisabled:W,isEmpty:V,isStartRange:j,isEndRange:T,isInRange:L,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&C&&(w=!0),u.push(x(B)),7===++D&&(r.showWeekNumber&&u.unshift(S(k-s,e,t)),a.push(E(u,r.isRTL,r.pickWholeWeek,w)),u=[],D=0,w=!1)}return P(r,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),c(this.el,\"is-hidden\"),this._o.bound&&(o(r,\"click\",this._onClick),this.adjustPosition()),\"function\"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var t=this._v;t!==!1&&(this._o.bound&&s(r,\"click\",this._onClick),this.el.style.position=\"static\",this.el.style.left=\"auto\",this.el.style.top=\"auto\",l(this.el,\"is-hidden\"),this._v=!1,void 0!==t&&\"function\"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),s(this.el,\"mousedown\",this._onMouseDown,!0),s(this.el,\"touchend\",this._onMouseDown,!0),s(this.el,\"change\",this._onChange),s(r,\"keydown\",this._onKeyChange),this._o.field&&(s(this._o.field,\"change\",this._onInputChange),this._o.bound&&(s(this._o.trigger,\"click\",this._onInputClick),s(this._o.trigger,\"focus\",this._onInputFocus),s(this._o.trigger,\"blur\",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},O})}},{\"models/widgets/abstract_button\":369,\"models/widgets/abstract_icon\":370,\"models/widgets/abstract_slider\":371,\"models/widgets/autocomplete_input\":372,\"models/widgets/button\":373,\"models/widgets/checkbox_button_group\":374,\"models/widgets/checkbox_group\":375,\"models/widgets/common\":376,\"models/widgets/date_picker\":377,\"models/widgets/date_range_slider\":378,\"models/widgets/date_slider\":379,\"models/widgets/div\":380,\"models/widgets/dropdown\":381,\"models/widgets/index\":382,\"models/widgets/input_widget\":383,\"models/widgets/main\":384,\"models/widgets/markup\":385,\"models/widgets/multiselect\":386,\"models/widgets/panel\":387,\"models/widgets/paragraph\":388,\"models/widgets/password_input\":389,\"models/widgets/pretext\":390,\"models/widgets/radio_button_group\":391,\"models/widgets/radio_group\":392,\"models/widgets/range_slider\":393,\"models/widgets/selectbox\":394,\"models/widgets/slider\":395,\"models/widgets/tabs\":396,\"models/widgets/text_input\":397,\"models/widgets/toggle\":398,\"models/widgets/widget\":409},384)});/*!\n",
" Copyright (c) 2012, Anaconda, Inc.\n",
" All rights reserved.\n",
" \n",
" Redistribution and use in source and binary forms, with or without modification,\n",
" are permitted provided that the following conditions are met:\n",
" \n",
" Redistributions of source code must retain the above copyright notice,\n",
" this list of conditions and the following disclaimer.\n",
" \n",
" Redistributions in binary form must reproduce the above copyright notice,\n",
" this list of conditions and the following disclaimer in the documentation\n",
" and/or other materials provided with the distribution.\n",
" \n",
" Neither the name of Anaconda nor the names of any contributors\n",
" may be used to endorse or promote products derived from this software\n",
" without specific prior written permission.\n",
" \n",
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n",
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n",
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n",
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n",
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n",
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n",
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n",
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n",
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n",
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n",
" THE POSSIBILITY OF SUCH DAMAGE.\n",
" */\n",
" \n",
" //# sourceMappingURL=bokeh-widgets.min.js.map\n",
" \n",
" /* END bokeh-widgets.min.js */\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" /* BEGIN bokeh-tables.min.js */\n",
" !function(e,t){t(e.Bokeh)}(this,function(Bokeh){var define;return function(e,t,n){if(null!=Bokeh)return Bokeh.register_plugin(e,t,n);throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\")}({402:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(14),l=e(5),s=e(29),a=e(6),u=e(49),c=e(404);n.CellEditorView=function(e){function t(e){this.args=e,t.__super__.constructor.call(this,s.extend({model:e.column.editor},e))}return o(t,e),t.prototype.className=\"bk-cell-editor\",t.prototype.inputEl=null,t.prototype.emptyValue=null,t.prototype.defaultValue=null,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render()},t.prototype.render=function(){return t.__super__.render.call(this),this.args.container.appendChild(this.el),this.el.appendChild(this.inputEl),this.renderEditor(),this.disableNavigation(),this},t.prototype.renderEditor=function(){},t.prototype.disableNavigation=function(){return this.inputEl.addEventListener(\"keydown\",function(e){return function(e){switch(e.keyCode){case l.Keys.Left:case l.Keys.Right:case l.Keys.Up:case l.Keys.Down:case l.Keys.PageUp:case l.Keys.PageDown:return e.stopImmediatePropagation()}}}(this))},t.prototype.destroy=function(){return this.remove()},t.prototype.focus=function(){return this.inputEl.focus()},t.prototype.show=function(){},t.prototype.hide=function(){},t.prototype.position=function(){},t.prototype.getValue=function(){return this.inputEl.value},t.prototype.setValue=function(e){return this.inputEl.value=e},t.prototype.serializeValue=function(){return this.getValue()},t.prototype.isValueChanged=function(){return!(\"\"===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},t.prototype.applyValue=function(e,t){return this.args.grid.getData().setField(e[c.DTINDEX_NAME],this.args.column.field,t)},t.prototype.loadValue=function(e){var t;return t=e[this.args.column.field],this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)},t.prototype.validateValue=function(e){var t;return this.args.column.validator&&(t=this.args.column.validator(e),!t.valid)?t:{valid:!0,msg:null}},t.prototype.validate=function(){return this.validateValue(this.getValue())},t}(a.DOMView),n.CellEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"CellEditor\",t.prototype.default_view=n.CellEditorView,t}(u.Model),n.StringEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.emptyValue=\"\",t.prototype.inputEl=l.input({type:\"text\"}),t.prototype.renderEditor=function(){return this.inputEl.focus(),this.inputEl.select()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()},t}(n.CellEditorView),n.StringEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"StringEditor\",t.prototype.default_view=n.StringEditorView,t.define({completions:[i.Array,[]]}),t}(n.CellEditor),n.TextEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(n.CellEditorView),n.TextEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"TextEditor\",t.prototype.default_view=n.TextEditorView,t}(n.CellEditor),n.SelectEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.inputEl=l.select(),t.prototype.renderEditor=function(){var e,t,n;for(n=this.model.options,e=0,t=n.length;e<t;e++)l.option=n[e],this.inputEl.appendChild(l.option({value:l.option},l.option));return this.focus()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.inputEl.select()},t}(n.CellEditorView),n.SelectEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"SelectEditor\",t.prototype.default_view=n.SelectEditorView,t.define({options:[i.Array,[]]}),t}(n.CellEditor),n.PercentEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(n.CellEditorView),n.PercentEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"PercentEditor\",t.prototype.default_view=n.PercentEditorView,t}(n.CellEditor),n.CheckboxEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.inputEl=l.input({type:\"checkbox\",value:\"true\"}),t.prototype.renderEditor=function(){return this.focus()},t.prototype.loadValue=function(e){return this.defaultValue=!!e[this.args.column.field],this.inputEl.checked=this.defaultValue},t.prototype.serializeValue=function(){return this.inputEl.checked},t}(n.CellEditorView),n.CheckboxEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"CheckboxEditor\",t.prototype.default_view=n.CheckboxEditorView,t}(n.CellEditor),n.IntEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.inputEl=l.input({type:\"text\"}),t.prototype.renderEditor=function(){return this.inputEl.focus(),this.inputEl.select()},t.prototype.remove=function(){return t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid integer\"}:t.__super__.validateValue.call(this,e)},t}(n.CellEditorView),n.IntEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"IntEditor\",t.prototype.default_view=n.IntEditorView,t.define({step:[i.Number,1]}),t}(n.CellEditor),n.NumberEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.inputEl=l.input({type:\"text\"}),t.prototype.renderEditor=function(){return this.inputEl.focus(),this.inputEl.select()},t.prototype.remove=function(){return t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid number\"}:t.__super__.validateValue.call(this,e)},t}(n.CellEditorView),n.NumberEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"NumberEditor\",t.prototype.default_view=n.NumberEditorView,t.define({step:[i.Number,.01]}),t}(n.CellEditor),n.TimeEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(n.CellEditorView),n.TimeEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"TimeEditor\",t.prototype.default_view=n.TimeEditorView,t}(n.CellEditor),n.DateEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.emptyValue=new Date,t.prototype.inputEl=l.input({type:\"text\"}),t.prototype.renderEditor=function(){return this.calendarOpen=!1,this.inputEl.focus(),this.inputEl.select()},t.prototype.destroy=function(){return t.__super__.destroy.call(this)},t.prototype.show=function(){return t.__super__.show.call(this)},t.prototype.hide=function(){return t.__super__.hide.call(this)},t.prototype.position=function(e){return t.__super__.position.call(this)},t.prototype.getValue=function(){},t.prototype.setValue=function(e){},t}(n.CellEditorView),n.DateEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DateEditor\",t.prototype.default_view=n.DateEditorView,t}(n.CellEditor)},403:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(329),l=e(418),s=e(360),a=e(14),u=e(5),c=e(29),d=e(41),p=e(49);n.CellFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.doFormat=function(e,t,n,o,r){return null==n?\"\":(n+\"\").replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")},t}(p.Model),n.StringFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"StringFormatter\",t.define({font_style:[a.FontStyle,\"normal\"],text_align:[a.TextAlign,\"left\"],text_color:[a.Color]}),t.prototype.doFormat=function(e,t,n,o,r){var i,l,s,a;switch(i=this.font_style,s=this.text_align,a=this.text_color,l=u.span({},null==n?\"\":\"\"+n),i){case\"bold\":l.style.fontWeight=\"bold\";break;case\"italic\":l.style.fontStyle=\"italic\"}return null!=s&&(l.style.textAlign=s),null!=a&&(l.style.color=a),l=l.outerHTML},t}(n.CellFormatter),n.NumberFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"NumberFormatter\",t.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),t.prototype.doFormat=function(e,n,o,r,l){var s,a,u;return s=this.format,a=this.language,u=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),o=i.format(o,s,a,u),t.__super__.doFormat.call(this,e,n,o,r,l)},t}(n.StringFormatter),n.BooleanFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"BooleanFormatter\",t.define({icon:[a.String,\"check\"]}),t.prototype.doFormat=function(e,t,n,o,r){return n?u.i({\"class\":this.icon}).outerHTML:\"\"},t}(n.CellFormatter),n.DateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DateFormatter\",t.define({format:[a.String,\"ISO-8601\"]}),t.prototype.getFormat=function(){var e;return e=function(){switch(this.format){case\"ATOM\":case\"W3C\":case\"RFC-3339\":case\"ISO-8601\":return\"%Y-%m-%d\";case\"COOKIE\":return\"%a, %d %b %Y\";case\"RFC-850\":return\"%A, %d-%b-%y\";case\"RFC-1123\":case\"RFC-2822\":return\"%a, %e %b %Y\";case\"RSS\":case\"RFC-822\":case\"RFC-1036\":return\"%a, %e %b %y\";case\"TIMESTAMP\":return null;default:return\"__CUSTOM__\"}}.call(this),\"__CUSTOM__\"===e?this.format:e},t.prototype.doFormat=function(e,n,o,r,i){var l;return o=d.isString(o)?parseInt(o,10):o,l=s(o,this.getFormat()),t.__super__.doFormat.call(this,e,n,l,r,i)},t}(n.CellFormatter),n.HTMLTemplateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"HTMLTemplateFormatter\",t.define({template:[a.String,\"<%= value %>\"]}),t.prototype.doFormat=function(e,t,n,o,r){var i,s;return s=this.template,null===n?\"\":(r=c.extend({},r,{value:n}),(i=l(s))(r))},t}(n.CellFormatter)},404:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(416),l=e(414),s=e(413),a=e(9),u=e(14),c=e(36),d=e(21),p=e(13),f=e(408),h=e(409);n.DTINDEX_NAME=\"__bkdt_internal_index__\",n.DataProvider=function(){function e(e,t){if(this.source=e,this.view=t,n.DTINDEX_NAME in this.source.data)throw new Error(\"special name \"+n.DTINDEX_NAME+\" cannot be used as a data table column\");this.index=this.view.indices}return e.prototype.getLength=function(){return this.index.length},e.prototype.getItem=function(e){var t,o,r,i,l;for(o={},l=Object.keys(this.source.data),r=0,i=l.length;r<i;r++)t=l[r],o[t]=this.source.data[t][this.index[e]];return o[n.DTINDEX_NAME]=this.index[e],o},e.prototype.setItem=function(e,t){var o,r;for(o in t)r=t[o],o!==n.DTINDEX_NAME&&(this.source.data[o][this.index[e]]=r);return this._update_source_inplace(),null},e.prototype.getField=function(e,t){return t===n.DTINDEX_NAME?this.index[e]:this.source.data[t][this.index[e]]},e.prototype.setField=function(e,t,n){return this.source.data[t][this.index[e]]=n,this._update_source_inplace(),null},e.prototype.getItemMetadata=function(e){return null},e.prototype.getRecords=function(){var e;return function(){var t,n,o;for(o=[],e=t=0,n=this.getLength();0<=n?t<n:t>n;e=0<=n?++t:--t)o.push(this.getItem(e));return o}.call(this)},e.prototype.sort=function(e){var t,o,r,i;return t=function(){var t,n,r;for(r=[],t=0,n=e.length;t<n;t++)o=e[t],r.push([o.sortCol.field,o.sortAsc?1:-1]);return r}(),0===t.length&&(t=[[n.DTINDEX_NAME,1]]),i=this.getRecords(),r=this.index.slice(),this.index.sort(function(e,n){var o,l,s,a,u,c,d,p;for(l=0,s=t.length;l<s;l++)if(a=t[l],o=a[0],c=a[1],d=i[r.indexOf(e)][o],p=i[r.indexOf(n)][o],u=d===p?0:d>p?c:-c,0!==u)return u;return 0})},e.prototype._update_source_inplace=function(){this.source.properties.data.change.emit(this,this.source.attributes.data)},e}(),n.DataTableView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.className=\"bk-data-table\",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.in_selection_update=!1},t.prototype.connect_signals=function(){return t.__super__.connect_signals.call(this),this.connect(this.model.change,function(e){return function(){return e.render()}}(this)),this.connect(this.model.source.properties.data.change,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.streaming,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.patching,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.change,function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.model.view.compute_indices(),this.data.constructor(this.model.source,this.model.view),this.grid.invalidate(),this.grid.render(),this.model.source.data=this.model.source.data,this.model.source.change.emit()},t.prototype.updateSelection=function(){var e,t,n,o,r,i;if(!this.in_selection_update)return o=this.model.source.selected,r=o[\"1d\"].indices,n=function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)i=r[e],n.push(this.data.index.indexOf(i));return n}.call(this),this.in_selection_update=!0,this.grid.setSelectedRows(n),this.in_selection_update=!1,e=this.grid.getViewport(),this.model.scroll_to_selection&&!d.any(n,function(t){return e.top<=t&&t<=e.bottom})?(t=Math.max(0,Math.min.apply(null,n)-1),this.grid.scrollRowToTop(t)):void 0},t.prototype.newIndexColumn=function(){return{id:c.uniqueId(),name:\"#\",field:n.DTINDEX_NAME,width:40,behavior:\"select\",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:\"bk-cell-index\"}},t.prototype.render=function(){var e,t,o,r,u,c;return o=function(){var e,n,o,r;for(o=this.model.columns,r=[],e=0,n=o.length;e<n;e++)t=o[e],r.push(t.toColumn());return r}.call(this),\"checkbox\"===this.model.selectable&&(e=new s.CheckboxSelectColumn({cssClass:\"bk-cell-select\"}),o.unshift(e.getColumnDefinition())),this.model.row_headers&&o.unshift(this.newIndexColumn()),c=this.model.reorderable,c&&null==(\"undefined\"!=typeof $&&null!==$&&null!=(u=$.fn)?u.sortable:void 0)&&(p.logger.warn(\"jquery-ui is required to enable DataTable.reorderable\"),c=!1),r={enableCellNavigation:this.model.selectable!==!1,enableColumnReorder:c,forceFitColumns:this.model.fit_columns,autoHeight:\"auto\"===this.model.height,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:!1},null!=this.model.width?this.el.style.width=this.model.width+\"px\":this.el.style.width=this.model.default_width+\"px\",null!=this.model.height&&\"auto\"!==this.model.height&&(this.el.style.height=this.model.height+\"px\"),this.data=new n.DataProvider(this.model.source,this.model.view),this.grid=new i.Grid(this.el,this.data,o,r),this.grid.onSort.subscribe(function(e){return function(t,n){return o=n.sortCols,e.data.sort(o),e.grid.invalidate(),e.updateSelection(),e.grid.render()}}(this)),this.model.selectable!==!1&&(this.grid.setSelectionModel(new l.RowSelectionModel({selectActiveRow:null==e})),null!=e&&this.grid.registerPlugin(e),this.grid.onSelectedRowsChanged.subscribe(function(e){return function(t,n){var o,r;if(!e.in_selection_update)return r=a.create_hit_test_result(),r[\"1d\"].indices=function(){var e,t,r,i;for(r=n.rows,i=[],e=0,t=r.length;e<t;e++)o=r[e],i.push(this.data.index[o]);return i}.call(e),e.model.source.selected=r}}(this)),this.updateSelection()),this},t}(h.WidgetView),n.DataTable=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DataTable\",t.prototype.default_view=n.DataTableView,t.define({columns:[u.Array,[]],fit_columns:[u.Bool,!0],sortable:[u.Bool,!0],reorderable:[u.Bool,!0],editable:[u.Bool,!1],selectable:[u.Bool,!0],row_headers:[u.Bool,!0],scroll_to_selection:[u.Bool,!0]}),t.override({height:400}),t.internal({default_width:[u.Number,600]}),t}(f.TableWidget)},405:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=e(361);o.__exportStar(e(402),n),o.__exportStar(e(403),n);var r=e(404);n.DataTable=r.DataTable;var i=e(407);n.TableColumn=i.TableColumn;var l=e(408);n.TableWidget=l.TableWidget},406:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=e(405);n.Tables=o;var r=e(0);r.register_models(o)},407:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(403),l=e(402),s=e(14),a=e(36),u=e(49);n.TableColumn=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"TableColumn\",t.prototype.default_view=null,t.define({field:[s.String],title:[s.String],width:[s.Number,300],formatter:[s.Instance,function(){return new i.StringFormatter}],editor:[s.Instance,function(){return new l.StringEditor}],sortable:[s.Bool,!0],default_sort:[s.String,\"ascending\"]}),t.prototype.toColumn=function(){var e;return{id:a.uniqueId(),field:this.field,name:this.title,width:this.width,formatter:null!=(e=this.formatter)?e.doFormat.bind(this.formatter):void 0,editor:this.editor.default_view,sortable:this.sortable,defaultSortAsc:\"ascending\"===this.default_sort}},t}(u.Model)},408:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(409),l=e(169),s=e(14);n.TableWidget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"TableWidget\",t.prototype.initialize=function(e){if(t.__super__.initialize.call(this,e),null==this.view.source)return this.view.source=this.source,this.view.compute_indices()},t.define({source:[s.Instance],view:[s.Instance,function(){return new l.CDSView}]}),t}(i.Widget)},409:function(e,t,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var o=function(e,t){function n(){this.constructor=e}for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r={}.hasOwnProperty,i=e(136);n.WidgetView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.className=\"bk-widget\",t.prototype.render=function(){if(this._render_classes(),null!=this.model.height&&(this.el.style.height=this.model.height+\"px\"),null!=this.model.width)return this.el.style.width=this.model.width+\"px\"},t}(i.LayoutDOMView),n.Widget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"Widget\",t.prototype.default_view=n.WidgetView,t}(i.LayoutDOM)},410:function(e,t,n){/*!\n",
" * jQuery JavaScript Library v3.2.1\n",
" * https://jquery.com/\n",
" *\n",
" * Includes Sizzle.js\n",
" * https://sizzlejs.com/\n",
" *\n",
" * Copyright JS Foundation and other contributors\n",
" * Released under the MIT license\n",
" * https://jquery.org/license\n",
" *\n",
" * Date: 2017-03-20T18:59Z\n",
" */\n",
" !function(e,n){\"use strict\";\"object\"==typeof t&&\"object\"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return n(e)}:n(e)}(\"undefined\"!=typeof window?window:this,function(e,t){\"use strict\";function n(e,t){t=t||ne;var n=t.createElement(\"script\");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function o(e){var t=!!e&&\"length\"in e&&e.length,n=ge.type(e);return\"function\"!==n&&!ge.isWindow(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&t>0&&t-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function i(e,t,n){return ge.isFunction(t)?ge.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?ge.grep(e,function(e){return e===t!==n}):\"string\"!=typeof t?ge.grep(e,function(e){return se.call(t,e)>-1!==n}):Se.test(t)?ge.filter(t,e,n):(t=ge.filter(t,e),ge.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return ge.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function a(e){return e}function u(e){throw e}function c(e,t,n,o){var r;try{e&&ge.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&ge.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener(\"DOMContentLoaded\",d),e.removeEventListener(\"load\",d),ge.ready()}function p(){this.expando=ge.expando+p.uid++}function f(e){return\"true\"===e||\"false\"!==e&&(\"null\"===e?null:e===+e+\"\"?+e:Me.test(e)?JSON.parse(e):e)}function h(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o=\"data-\"+t.replace(We,\"-$&\").toLowerCase(),n=e.getAttribute(o),\"string\"==typeof n){try{n=f(n)}catch(r){}Ie.set(e,t,n)}else n=void 0;return n}function g(e,t,n,o){var r,i=1,l=20,s=o?function(){return o.cur()}:function(){return ge.css(e,t,\"\")},a=s(),u=n&&n[3]||(ge.cssNumber[t]?\"\":\"px\"),c=(ge.cssNumber[t]||\"px\"!==u&&+a)&&je.exec(ge.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+a||1;do i=i||\".5\",c/=i,ge.style(e,t,c+u);while(i!==(i=s()/a)&&1!==i&&--l)}return n&&(c=+c||+a||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=u,o.start=c,o.end=r)),r}function m(e){var t,n=e.ownerDocument,o=e.nodeName,r=ze[o];return r?r:(t=n.body.appendChild(n.createElement(o)),r=ge.css(t,\"display\"),t.parentNode.removeChild(t),\"none\"===r&&(r=\"block\"),ze[o]=r,r)}function v(e,t){for(var n,o,r=[],i=0,l=e.length;i<l;i++)o=e[i],o.style&&(n=o.style.display,t?(\"none\"===n&&(r[i]=Fe.get(o,\"display\")||null,r[i]||(o.style.display=\"\")),\"\"===o.style.display&&Be(o)&&(r[i]=m(o))):\"none\"!==n&&(r[i]=\"none\",Fe.set(o,\"display\",n)));for(i=0;i<l;i++)null!=r[i]&&(e[i].style.display=r[i]);return e}function w(e,t){var n;return n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&r(e,t)?ge.merge([e],n):n}function y(e,t){for(var n=0,o=e.length;n<o;n++)Fe.set(e[n],\"globalEval\",!t||Fe.get(t[n],\"globalEval\"))}function C(e,t,n,o,r){for(var i,l,s,a,u,c,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f<h;f++)if(i=e[f],i||0===i)if(\"object\"===ge.type(i))ge.merge(p,i.nodeType?[i]:i);else if(Ye.test(i)){for(l=l||d.appendChild(t.createElement(\"div\")),s=(Ue.exec(i)||[\"\",\"\"])[1].toLowerCase(),a=Ge[s]||Ge._default,l.innerHTML=a[1]+ge.htmlPrefilter(i)+a[2],c=a[0];c--;)l=l.lastChild;ge.merge(p,l.childNodes),l=d.firstChild,l.textContent=\"\"}else p.push(t.createTextNode(i));for(d.textContent=\"\",f=0;i=p[f++];)if(o&&ge.inArray(i,o)>-1)r&&r.push(i);else if(u=ge.contains(i.ownerDocument,i),l=w(d.appendChild(i),\"script\"),u&&y(l),n)for(c=0;i=l[c++];)Ke.test(i.type||\"\")&&n.push(i);return d}function b(){return!0}function x(){return!1}function R(){try{return ne.activeElement}catch(e){}}function E(e,t,n,o,r,i){var l,s;if(\"object\"==typeof t){\"string\"!=typeof n&&(o=o||n,n=void 0);for(s in t)E(e,s,n,o,t[s],i);return e}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&(\"string\"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===i&&(l=r,r=function(e){return ge().off(e),l.apply(this,arguments)},r.guid=l.guid||(l.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,r,o,n)})}function S(e,t){return r(e,\"table\")&&r(11!==t.nodeType?t:t.firstChild,\"tr\")?ge(\">tbody\",e)[0]||e:e}function k(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function T(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute(\"type\"),e}function P(e,t){var n,o,r,i,l,s,a,u;if(1===t.nodeType){if(Fe.hasData(e)&&(i=Fe.access(e),l=Fe.set(t,i),u=i.events)){delete l.handle,l.events={};for(r in u)for(n=0,o=u[r].length;n<o;n++)ge.event.add(t,r,u[r][n])}Ie.hasData(e)&&(s=Ie.access(e),a=ge.extend({},s),Ie.set(t,a))}}function _(e,t){var n=t.nodeName.toLowerCase();\"input\"===n&&Xe.test(e.type)?t.checked=e.checked:\"input\"!==n&&\"textarea\"!==n||(t.defaultValue=e.defaultValue)}function D(e,t,o,r){t=ie.apply([],t);var i,l,s,a,u,c,d=0,p=e.length,f=p-1,h=t[0],g=ge.isFunction(h);if(g||p>1&&\"string\"==typeof h&&!fe.checkClone&&ot.test(h))return e.each(function(n){var i=e.eq(n);g&&(t[0]=h.call(this,n,i.html())),D(i,t,o,r)});if(p&&(i=C(t,e[0].ownerDocument,!1,e,r),l=i.firstChild,1===i.childNodes.length&&(i=l),l||r)){for(s=ge.map(w(i,\"script\"),k),a=s.length;d<p;d++)u=i,d!==f&&(u=ge.clone(u,!0,!0),a&&ge.merge(s,w(u,\"script\"))),o.call(e[d],u,d);if(a)for(c=s[s.length-1].ownerDocument,ge.map(s,T),d=0;d<a;d++)u=s[d],Ke.test(u.type||\"\")&&!Fe.access(u,\"globalEval\")&&ge.contains(c,u)&&(u.src?ge._evalUrl&&ge._evalUrl(u.src):n(u.textContent.replace(it,\"\"),c))}return e}function N(e,t,n){for(var o,r=t?ge.filter(t,e):e,i=0;null!=(o=r[i]);i++)n||1!==o.nodeType||ge.cleanData(w(o)),o.parentNode&&(n&&ge.contains(o.ownerDocument,o)&&y(w(o,\"script\")),o.parentNode.removeChild(o));return e}function A(e,t,n){var o,r,i,l,s=e.style;return n=n||at(e),n&&(l=n.getPropertyValue(t)||n[t],\"\"!==l||ge.contains(e.ownerDocument,e)||(l=ge.style(e,t)),!fe.pixelMarginRight()&&st.test(l)&&lt.test(t)&&(o=s.width,r=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=l,l=n.width,s.width=o,s.minWidth=r,s.maxWidth=i)),void 0!==l?l+\"\":l}function $(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in ht)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in ht)return e}function L(e){var t=ge.cssProps[e];return t||(t=ge.cssProps[e]=H(e)||e),t}function F(e,t,n){var o=je.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||\"px\"):t}function I(e,t,n,o,r){var i,l=0;for(i=n===(o?\"border\":\"content\")?4:\"width\"===t?1:0;i<4;i+=2)\"margin\"===n&&(l+=ge.css(e,n+Oe[i],!0,r)),o?(\"content\"===n&&(l-=ge.css(e,\"padding\"+Oe[i],!0,r)),\"margin\"!==n&&(l-=ge.css(e,\"border\"+Oe[i]+\"Width\",!0,r))):(l+=ge.css(e,\"padding\"+Oe[i],!0,r),\"padding\"!==n&&(l+=ge.css(e,\"border\"+Oe[i]+\"Width\",!0,r)));return l}function M(e,t,n){var o,r=at(e),i=A(e,t,r),l=\"border-box\"===ge.css(e,\"boxSizing\",!1,r);return st.test(i)?i:(o=l&&(fe.boxSizingReliable()||i===e.style[t]),\"auto\"===i&&(i=e[\"offset\"+t[0].toUpperCase()+t.slice(1)]),i=parseFloat(i)||0,i+I(e,t,n||(l?\"border\":\"content\"),o,r)+\"px\")}function W(e,t,n,o,r){return new W.prototype.init(e,t,n,o,r)}function V(){mt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(V):e.setTimeout(V,ge.fx.interval),ge.fx.tick())}function j(){return e.setTimeout(function(){gt=void 0}),gt=ge.now()}function O(e,t){var n,o=0,r={height:e};for(t=t?1:0;o<4;o+=2-t)n=Oe[o],r[\"margin\"+n]=r[\"padding\"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var o,r=(X.tweeners[t]||[]).concat(X.tweeners[\"*\"]),i=0,l=r.length;i<l;i++)if(o=r[i].call(n,t,e))return o}function q(e,t,n){var o,r,i,l,s,a,u,c,d=\"width\"in t||\"height\"in t,p=this,f={},h=e.style,g=e.nodeType&&Be(e),m=Fe.get(e,\"fxshow\");n.queue||(l=ge._queueHooks(e,\"fx\"),null==l.unqueued&&(l.unqueued=0,s=l.empty.fire,l.empty.fire=function(){l.unqueued||s()}),l.unqueued++,p.always(function(){p.always(function(){l.unqueued--,ge.queue(e,\"fx\").length||l.empty.fire()})}));for(o in t)if(r=t[o],vt.test(r)){if(delete t[o],i=i||\"toggle\"===r,r===(g?\"hide\":\"show\")){if(\"show\"!==r||!m||void 0===m[o])continue;g=!0}f[o]=m&&m[o]||ge.style(e,o)}if(a=!ge.isEmptyObject(t),a||!ge.isEmptyObject(f)){d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=m&&m.display,null==u&&(u=Fe.get(e,\"display\")),c=ge.css(e,\"display\"),\"none\"===c&&(u?c=u:(v([e],!0),u=e.style.display||u,c=ge.css(e,\"display\"),v([e]))),(\"inline\"===c||\"inline-block\"===c&&null!=u)&&\"none\"===ge.css(e,\"float\")&&(a||(p.done(function(){h.display=u}),null==u&&(c=h.display,u=\"none\"===c?\"\":c)),h.display=\"inline-block\")),n.overflow&&(h.overflow=\"hidden\",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),a=!1;for(o in f)a||(m?\"hidden\"in m&&(g=m.hidden):m=Fe.access(e,\"fxshow\",{display:u}),i&&(m.hidden=!g),g&&v([e],!0),p.done(function(){g||v([e]),Fe.remove(e,\"fxshow\");for(o in f)ge.style(e,o,f[o])})),a=B(g?m[o]:0,o,p),o in m||(m[o]=a.start,g&&(a.end=a.start,a.start=0))}}function z(e,t){var n,o,r,i,l;for(n in e)if(o=ge.camelCase(n),r=t[o],i=e[n],Array.isArray(i)&&(r=i[1],i=e[n]=i[0]),n!==o&&(e[o]=i,delete e[n]),l=ge.cssHooks[o],l&&\"expand\"in l){i=l.expand(i),delete e[o];for(n in i)n in e||(e[n]=i[n],t[n]=r)}else t[o]=r}function X(e,t,n){var o,r,i=0,l=X.prefilters.length,s=ge.Deferred().always(function(){delete a.elem}),a=function(){if(r)return!1;for(var t=gt||j(),n=Math.max(0,u.startTime+u.duration-t),o=n/u.duration||0,i=1-o,l=0,a=u.tweens.length;l<a;l++)u.tweens[l].run(i);return s.notifyWith(e,[u,i,n]),i<1&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:ge.extend({},t),opts:ge.extend(!0,{specialEasing:{},easing:ge.easing._default},n),originalProperties:t,originalOptions:n,startTime:gt||j(),duration:n.duration,tweens:[],createTween:function(t,n){var o=ge.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(o),o},stop:function(t){var n=0,o=t?u.tweens.length:0;if(r)return this;for(r=!0;n<o;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(z(c,u.opts.specialEasing);i<l;i++)if(o=X.prefilters[i].call(u,e,c,u.opts))return ge.isFunction(o.stop)&&(ge._queueHooks(u.elem,u.opts.queue).stop=ge.proxy(o.stop,o)),o;return ge.map(c,B,u),ge.isFunction(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),ge.fx.timer(ge.extend(a,{elem:e,anim:u,queue:u.opts.queue})),u}function U(e){var t=e.match(Ne)||[];return t.join(\" \")}function K(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function G(e,t,n,o){var r;if(Array.isArray(t))ge.each(t,function(t,r){n||Pt.test(e)?o(e,r):G(e+\"[\"+(\"object\"==typeof r&&null!=r?t:\"\")+\"]\",r,n,o)});else if(n||\"object\"!==ge.type(t))o(e,t);else for(r in t)G(e+\"[\"+r+\"]\",t[r],n,o)}function Y(e){return function(t,n){\"string\"!=typeof t&&(n=t,t=\"*\");var o,r=0,i=t.toLowerCase().match(Ne)||[];if(ge.isFunction(n))for(;o=i[r++];)\"+\"===o[0]?(o=o.slice(1)||\"*\",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function Q(e,t,n,o){function r(s){var a;return i[s]=!0,ge.each(e[s]||[],function(e,s){var u=s(t,n,o);return\"string\"!=typeof u||l||i[u]?l?!(a=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),a}var i={},l=e===Vt;return r(t.dataTypes[0])||!i[\"*\"]&&r(\"*\")}function J(e,t){var n,o,r=ge.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:o||(o={}))[n]=t[n]);return o&&ge.extend(!0,e,o),e}function Z(e,t,n){for(var o,r,i,l,s=e.contents,a=e.dataTypes;\"*\"===a[0];)a.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader(\"Content-Type\"));if(o)for(r in s)if(s[r]&&s[r].test(o)){a.unshift(r);break}if(a[0]in n)i=a[0];else{for(r in n){if(!a[0]||e.converters[r+\" \"+a[0]]){i=r;break}l||(l=r)}i=i||l}if(i)return i!==a[0]&&a.unshift(i),n[i]}function ee(e,t,n,o){var r,i,l,s,a,u={},c=e.dataTypes.slice();if(c[1])for(l in e.converters)u[l.toLowerCase()]=e.converters[l];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!a&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=i,i=c.shift())if(\"*\"===i)i=a;else if(\"*\"!==a&&a!==i){if(l=u[a+\" \"+i]||u[\"* \"+i],!l)for(r in u)if(s=r.split(\" \"),s[1]===i&&(l=u[a+\" \"+s[0]]||u[\"* \"+s[0]])){l===!0?l=u[r]:u[r]!==!0&&(i=s[0],c.unshift(s[1]));break}if(l!==!0)if(l&&e[\"throws\"])t=l(t);else try{t=l(t)}catch(d){return{state:\"parsererror\",error:l?d:\"No conversion from \"+a+\" to \"+i}}}return{state:\"success\",data:t}}var te=[],ne=e.document,oe=Object.getPrototypeOf,re=te.slice,ie=te.concat,le=te.push,se=te.indexOf,ae={},ue=ae.toString,ce=ae.hasOwnProperty,de=ce.toString,pe=de.call(Object),fe={},he=\"3.2.1\",ge=function(e,t){return new ge.fn.init(e,t)},me=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,ve=/^-ms-/,we=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};ge.fn=ge.prototype={jquery:he,constructor:ge,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ge.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ge.each(this,e)},map:function(e){return this.pushStack(ge.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:le,sort:te.sort,splice:te.splice},ge.extend=ge.fn.extend=function(){var e,t,n,o,r,i,l=arguments[0]||{},s=1,a=arguments.length,u=!1;for(\"boolean\"==typeof l&&(u=l,l=arguments[s]||{},s++),\"object\"==typeof l||ge.isFunction(l)||(l={}),s===a&&(l=this,s--);s<a;s++)if(null!=(e=arguments[s]))for(t in e)n=l[t],o=e[t],l!==o&&(u&&o&&(ge.isPlainObject(o)||(r=Array.isArray(o)))?(r?(r=!1,i=n&&Array.isArray(n)?n:[]):i=n&&ge.isPlainObject(n)?n:{},l[t]=ge.extend(u,i,o)):void 0!==o&&(l[t]=o));return l},ge.extend({expando:\"jQuery\"+(he+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return\"function\"===ge.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=ge.type(e);return(\"number\"===t||\"string\"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||\"[object Object]\"!==ue.call(e))&&(!(t=oe(e))||(n=ce.call(t,\"constructor\")&&t.constructor,\"function\"==typeof n&&de.call(n)===pe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?ae[ue.call(e)]||\"object\":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(ve,\"ms-\").replace(we,ye)},each:function(e,t){var n,r=0;if(o(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?\"\":(e+\"\").replace(me,\"\")},makeArray:function(e,t){var n=t||[];return null!=e&&(o(Object(e))?ge.merge(n,\"string\"==typeof e?[e]:e):le.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,r=e.length;o<n;o++)e[r++]=t[o];return e.length=r,e},grep:function(e,t,n){for(var o,r=[],i=0,l=e.length,s=!n;i<l;i++)o=!t(e[i],i),o!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,l=0,s=[];if(o(e))for(r=e.length;l<r;l++)i=t(e[l],l,n),null!=i&&s.push(i);else for(l in e)i=t(e[l],l,n),null!=i&&s.push(i);return ie.apply([],s)},guid:1,proxy:function(e,t){var n,o,r;if(\"string\"==typeof t&&(n=e[t],t=e,e=n),ge.isFunction(e))return o=re.call(arguments,2),r=function(){return e.apply(t||this,o.concat(re.call(arguments)))},r.guid=e.guid=e.guid||ge.guid++,r},now:Date.now,support:fe}),\"function\"==typeof Symbol&&(ge.fn[Symbol.iterator]=te[Symbol.iterator]),ge.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(e,t){ae[\"[object \"+t+\"]\"]=t.toLowerCase()});var Ce=/*!\n",
" * Sizzle CSS Selector Engine v2.3.3\n",
" * https://sizzlejs.com/\n",
" *\n",
" * Copyright jQuery Foundation and other contributors\n",
" * Released under the MIT license\n",
" * http://jquery.org/license\n",
" *\n",
" * Date: 2016-08-08\n",
" */\n",
" function(e){function t(e,t,n,o){var r,i,l,s,a,u,c,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],\"string\"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!o&&((t?t.ownerDocument||t:j)!==$&&A(t),t=t||$,L)){if(11!==h&&(a=ve.exec(e)))if(r=a[1]){if(9===h){if(!(l=t.getElementById(r)))return n;if(l.id===r)return n.push(l),n}else if(p&&(l=p.getElementById(r))&&W(t,l)&&l.id===r)return n.push(l),n}else{if(a[2])return J.apply(n,t.getElementsByTagName(e)),n;if((r=a[3])&&x.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&!X[e+\" \"]&&(!F||!F.test(e))){if(1!==h)p=t,c=e;else if(\"object\"!==t.nodeName.toLowerCase()){for((s=t.getAttribute(\"id\"))?s=s.replace(be,xe):t.setAttribute(\"id\",s=V),u=k(e),i=u.length;i--;)u[i]=\"#\"+s+\" \"+f(u[i]);c=u.join(\",\"),p=we.test(e)&&d(t.parentNode)||t}if(c)try{return J.apply(n,p.querySelectorAll(c)),n}catch(g){}finally{s===V&&t.removeAttribute(\"id\")}}}return P(e.replace(se,\"$1\"),t,n,o)}function n(){function e(n,o){return t.push(n+\" \")>R.cacheLength&&delete e[t.shift()],e[n+\" \"]=o}var t=[];return e}function o(e){return e[V]=!0,e}function r(e){var t=$.createElement(\"fieldset\");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split(\"|\"),o=n.length;o--;)R.attrHandle[n[o]]=t}function l(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return\"input\"===n&&t.type===e}}function a(e){return function(t){var n=t.nodeName.toLowerCase();return(\"input\"===n||\"button\"===n)&&t.type===e}}function u(e){return function(t){return\"form\"in t?t.parentNode&&t.disabled===!1?\"label\"in t?\"label\"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:\"label\"in t&&t.disabled===e}}function c(e){return o(function(t){return t=+t,o(function(n,o){for(var r,i=e([],n.length,t),l=i.length;l--;)n[r=i[l]]&&(n[r]=!(o[r]=n[r]))})})}function d(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}function p(){}function f(e){for(var t=0,n=e.length,o=\"\";t<n;t++)o+=e[t].value;return o}function h(e,t,n){var o=t.dir,r=t.next,i=r||o,l=n&&\"parentNode\"===i,s=B++;return t.first?function(t,n,r){for(;t=t[o];)if(1===t.nodeType||l)return e(t,n,r);return!1}:function(t,n,a){var u,c,d,p=[O,s];if(a){for(;t=t[o];)if((1===t.nodeType||l)&&e(t,n,a))return!0}else for(;t=t[o];)if(1===t.nodeType||l)if(d=t[V]||(t[V]={}),c=d[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[o]||t;else{if((u=c[i])&&u[0]===O&&u[1]===s)return p[2]=u[2];if(c[i]=p,p[2]=e(t,n,a))return!0}return!1}}function g(e){return e.length>1?function(t,n,o){for(var r=e.length;r--;)if(!e[r](t,n,o))return!1;return!0}:e[0]}function m(e,n,o){for(var r=0,i=n.length;r<i;r++)t(e,n[r],o);return o}function v(e,t,n,o,r){for(var i,l=[],s=0,a=e.length,u=null!=t;s<a;s++)(i=e[s])&&(n&&!n(i,o,r)||(l.push(i),u&&t.push(s)));return l}function w(e,t,n,r,i,l){return r&&!r[V]&&(r=w(r)),i&&!i[V]&&(i=w(i,l)),o(function(o,l,s,a){var u,c,d,p=[],f=[],h=l.length,g=o||m(t||\"*\",s.nodeType?[s]:s,[]),w=!e||!o&&t?g:v(g,p,e,s,a),y=n?i||(o?e:h||r)?[]:l:w;if(n&&n(w,y,s,a),r)for(u=v(y,f),r(u,[],s,a),c=u.length;c--;)(d=u[c])&&(y[f[c]]=!(w[f[c]]=d));if(o){if(i||e){if(i){for(u=[],c=y.length;c--;)(d=y[c])&&u.push(w[c]=d);i(null,y=[],u,a)}for(c=y.length;c--;)(d=y[c])&&(u=i?ee(o,d):p[c])>-1&&(o[u]=!(l[u]=d))}}else y=v(y===l?y.splice(h,y.length):y),i?i(null,l,y,a):J.apply(l,y)})}function y(e){for(var t,n,o,r=e.length,i=R.relative[e[0].type],l=i||R.relative[\" \"],s=i?1:0,a=h(function(e){return e===t},l,!0),u=h(function(e){return ee(t,e)>-1},l,!0),c=[function(e,n,o){var r=!i&&(o||n!==_)||((t=n).nodeType?a(e,n,o):u(e,n,o));return t=null,r}];s<r;s++)if(n=R.relative[e[s].type])c=[h(g(c),n)];else{if(n=R.filter[e[s].type].apply(null,e[s].matches),n[V]){for(o=++s;o<r&&!R.relative[e[o].type];o++);return w(s>1&&g(c),s>1&&f(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace(se,\"$1\"),n,s<o&&y(e.slice(s,o)),o<r&&y(e=e.slice(o)),o<r&&f(e))}c.push(n)}return g(c)}function C(e,n){var r=n.length>0,i=e.length>0,l=function(o,l,s,a,u){var c,d,p,f=0,h=\"0\",g=o&&[],m=[],w=_,y=o||i&&R.find.TAG(\"*\",u),C=O+=null==w?1:Math.random()||.1,b=y.length;for(u&&(_=l===$||l||u);h!==b&&null!=(c=y[h]);h++){if(i&&c){for(d=0,l||c.ownerDocument===$||(A(c),s=!L);p=e[d++];)if(p(c,l||$,s)){a.push(c);break}u&&(O=C)}r&&((c=!p&&c)&&f--,o&&g.push(c))}if(f+=h,r&&h!==f){for(d=0;p=n[d++];)p(g,m,l,s);if(o){if(f>0)for(;h--;)g[h]||m[h]||(m[h]=Y.call(a));m=v(m)}J.apply(a,m),u&&!o&&m.length>0&&f+n.length>1&&t.uniqueSort(a)}return u&&(O=C,_=w),g};return r?o(l):l}var b,x,R,E,S,k,T,P,_,D,N,A,$,H,L,F,I,M,W,V=\"sizzle\"+1*new Date,j=e.document,O=0,B=0,q=n(),z=n(),X=n(),U=function(e,t){return e===t&&(N=!0),0},K={}.hasOwnProperty,G=[],Y=G.pop,Q=G.push,J=G.push,Z=G.slice,ee=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},te=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",ne=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",oe=\"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",re=\"\\\\[\"+ne+\"*(\"+oe+\")(?:\"+ne+\"*([*^$|!~]?=)\"+ne+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+oe+\"))|)\"+ne+\"*\\\\]\",ie=\":(\"+oe+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+re+\")*)|.*)\\\\)|)\",le=new RegExp(ne+\"+\",\"g\"),se=new RegExp(\"^\"+ne+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+ne+\"+$\",\"g\"),ae=new RegExp(\"^\"+ne+\"*,\"+ne+\"*\"),ue=new RegExp(\"^\"+ne+\"*([>+~]|\"+ne+\")\"+ne+\"*\"),ce=new RegExp(\"=\"+ne+\"*([^\\\\]'\\\"]*?)\"+ne+\"*\\\\]\",\"g\"),de=new RegExp(ie),pe=new RegExp(\"^\"+oe+\"$\"),fe={ID:new RegExp(\"^#(\"+oe+\")\"),CLASS:new RegExp(\"^\\\\.(\"+oe+\")\"),TAG:new RegExp(\"^(\"+oe+\"|[*])\"),ATTR:new RegExp(\"^\"+re),PSEUDO:new RegExp(\"^\"+ie),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+ne+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+ne+\"*(?:([+-]|)\"+ne+\"*(\\\\d+)|))\"+ne+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+te+\")$\",\"i\"),needsContext:new RegExp(\"^\"+ne+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+ne+\"*((?:-\\\\d)?\\\\d*)\"+ne+\"*\\\\)|)(?=[^-]|$)\",\"i\")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\\d$/i,me=/^[^{]+\\{\\s*\\[native \\w/,ve=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,we=/[+~]/,ye=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+ne+\"?|(\"+ne+\")|.)\",\"ig\"),Ce=function(e,t,n){var o=\"0x\"+t-65536;return o!==o||n?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},be=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,xe=function(e,t){return t?\"\\0\"===e?\"�\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},Re=function(){A()},Ee=h(function(e){return e.disabled===!0&&(\"form\"in e||\"label\"in e)},{dir:\"parentNode\",next:\"legend\"});try{J.apply(G=Z.call(j.childNodes),j.childNodes),G[j.childNodes.length].nodeType}catch(Se){J={apply:G.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&\"HTML\"!==t.nodeName},A=t.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:j;return o!==$&&9===o.nodeType&&o.documentElement?($=o,H=$.documentElement,L=!S($),j!==$&&(n=$.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",Re,!1):n.attachEvent&&n.attachEvent(\"onunload\",Re)),x.attributes=r(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),x.getElementsByTagName=r(function(e){return e.appendChild($.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),x.getElementsByClassName=me.test($.getElementsByClassName),x.getById=r(function(e){return H.appendChild(e).id=V,!$.getElementsByName||!$.getElementsByName(V).length}),x.getById?(R.filter.ID=function(e){var t=e.replace(ye,Ce);return function(e){return e.getAttribute(\"id\")===t}},R.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(R.filter.ID=function(e){var t=e.replace(ye,Ce);return function(e){var n=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return n&&n.value===t}},R.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&L){var n,o,r,i=t.getElementById(e);if(i){if(n=i.getAttributeNode(\"id\"),n&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if(n=i.getAttributeNode(\"id\"),n&&n.value===e)return[i]}return[]}}),R.find.TAG=x.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if(\"*\"===e){for(;n=i[r++];)1===n.nodeType&&o.push(n);return o}return i},R.find.CLASS=x.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&L)return t.getElementsByClassName(e)},I=[],F=[],(x.qsa=me.test($.querySelectorAll))&&(r(function(e){H.appendChild(e).innerHTML=\"<a id='\"+V+\"'></a><select id='\"+V+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\",e.querySelectorAll(\"[msallowcapture^='']\").length&&F.push(\"[*^$]=\"+ne+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||F.push(\"\\\\[\"+ne+\"*(?:value|\"+te+\")\"),e.querySelectorAll(\"[id~=\"+V+\"-]\").length||F.push(\"~=\"),e.querySelectorAll(\":checked\").length||F.push(\":checked\"),e.querySelectorAll(\"a#\"+V+\"+*\").length||F.push(\".#.+[+~]\")}),r(function(e){e.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var t=$.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&F.push(\"name\"+ne+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&F.push(\":enabled\",\":disabled\"),H.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&F.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),F.push(\",.*:\")})),(x.matchesSelector=me.test(M=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&r(function(e){x.disconnectedMatch=M.call(e,\"*\"),M.call(e,\"[s!='']:x\"),I.push(\"!=\",ie)}),F=F.length&&new RegExp(F.join(\"|\")),I=I.length&&new RegExp(I.join(\"|\")),t=me.test(H.compareDocumentPosition),W=t||me.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===$||e.ownerDocument===j&&W(j,e)?-1:t===$||t.ownerDocument===j&&W(j,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!r||!i)return e===$?-1:t===$?1:r?-1:i?1:D?ee(D,e)-ee(D,t):0;if(r===i)return l(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[o]===a[o];)o++;return o?l(s[o],a[o]):s[o]===j?-1:a[o]===j?1:0},$):$},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==$&&A(e),n=n.replace(ce,\"='$1']\"),x.matchesSelector&&L&&!X[n+\" \"]&&(!I||!I.test(n))&&(!F||!F.test(n)))try{var o=M.call(e,n);if(o||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(r){}return t(n,$,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==$&&A(e),W(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==$&&A(e);var n=R.attrHandle[t.toLowerCase()],o=n&&K.call(R.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==o?o:x.attributes||!L?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},t.escape=function(e){return(e+\"\").replace(be,xe)},t.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},t.uniqueSort=function(e){var t,n=[],o=0,r=0;if(N=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(U),N){for(;t=e[r++];)t===e[r]&&(o=n.push(r));for(;o--;)e.splice(n[o],1)}return D=null,e},E=t.getText=function(e){var t,n=\"\",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=E(t);return n},R=t.selectors={cacheLength:50,createPseudo:o,match:fe,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Ce),e[3]=(e[3]||e[4]||e[5]||\"\").replace(ye,Ce),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&de.test(n)&&(t=k(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,Ce).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+\" \"];return t||(t=new RegExp(\"(^|\"+ne+\")\"+e+\"(\"+ne+\"|$)\"))&&q(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,n,o){return function(r){var i=t.attr(r,e);return null==i?\"!=\"===n:!n||(i+=\"\",\"=\"===n?i===o:\"!=\"===n?i!==o:\"^=\"===n?o&&0===i.indexOf(o):\"*=\"===n?o&&i.indexOf(o)>-1:\"$=\"===n?o&&i.slice(-o.length)===o:\"~=\"===n?(\" \"+i.replace(le,\" \")+\" \").indexOf(o)>-1:\"|=\"===n&&(i===o||i.slice(0,o.length+1)===o+\"-\"))}},CHILD:function(e,t,n,o,r){var i=\"nth\"!==e.slice(0,3),l=\"last\"!==e.slice(-4),s=\"of-type\"===t;return 1===o&&0===r?function(e){return!!e.parentNode}:function(t,n,a){var u,c,d,p,f,h,g=i!==l?\"nextSibling\":\"previousSibling\",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),w=!a&&!s,y=!1;if(m){if(i){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g=\"only\"===e&&!h&&\"nextSibling\"}return!0}if(h=[l?m.firstChild:m.lastChild],l&&w){for(p=m,d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),u=c[e]||[],f=u[0]===O&&u[1],y=f&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(y=f=0)||h.pop();)if(1===p.nodeType&&++y&&p===t){c[e]=[O,f,y];break}}else if(w&&(p=t,d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),u=c[e]||[],f=u[0]===O&&u[1],y=f),y===!1)for(;(p=++f&&p&&p[g]||(y=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++y||(w&&(d=p[V]||(p[V]={}),c=d[p.uniqueID]||(d[p.uniqueID]={}),c[e]=[O,y]),p!==t)););return y-=r,y===o||y%o===0&&y/o>=0}}},PSEUDO:function(e,n){var r,i=R.pseudos[e]||R.setFilters[e.toLowerCase()]||t.error(\"unsupported pseudo: \"+e);return i[V]?i(n):i.length>1?(r=[e,e,\"\",n],R.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,t){for(var o,r=i(e,n),l=r.length;l--;)o=ee(e,r[l]),e[o]=!(t[o]=r[l])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=T(e.replace(se,\"$1\"));return r[V]?o(function(e,t,n,o){for(var i,l=r(e,null,o,[]),s=e.length;s--;)(i=l[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:o(function(e){return function(n){return t(e,n).length>0}}),contains:o(function(e){return e=e.replace(ye,Ce),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:o(function(e){return pe.test(e||\"\")||t.error(\"unsupported lang: \"+e),e=e.replace(ye,Ce).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute(\"xml:lang\")||t.getAttribute(\"lang\"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+\"-\");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!R.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var o=n<0?n+t:n;--o>=0;)e.push(o);return e}),gt:c(function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e})}},R.pseudos.nth=R.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})R.pseudos[b]=s(b);for(b in{submit:!0,reset:!0})R.pseudos[b]=a(b);return p.prototype=R.filters=R.pseudos,R.setFilters=new p,k=t.tokenize=function(e,n){var o,r,i,l,s,a,u,c=z[e+\" \"];if(c)return n?0:c.slice(0);for(s=e,a=[],u=R.preFilter;s;){o&&!(r=ae.exec(s))||(r&&(s=s.slice(r[0].length)||s),a.push(i=[])),o=!1,(r=ue.exec(s))&&(o=r.shift(),i.push({value:o,type:r[0].replace(se,\" \")}),s=s.slice(o.length));for(l in R.filter)!(r=fe[l].exec(s))||u[l]&&!(r=u[l](r))||(o=r.shift(),i.push({value:o,type:l,matches:r}),s=s.slice(o.length));if(!o)break}return n?s.length:s?t.error(e):z(e,a).slice(0)},T=t.compile=function(e,t){var n,o=[],r=[],i=X[e+\" \"];if(!i){for(t||(t=k(e)),n=t.length;n--;)i=y(t[n]),i[V]?o.push(i):r.push(i);i=X(e,C(r,o)),i.selector=e}return i},P=t.select=function(e,t,n,o){var r,i,l,s,a,u=\"function\"==typeof e&&e,c=!o&&k(e=u.selector||e);if(n=n||[],1===c.length){if(i=c[0]=c[0].slice(0),i.length>2&&\"ID\"===(l=i[0]).type&&9===t.nodeType&&L&&R.relative[i[1].type]){if(t=(R.find.ID(l.matches[0].replace(ye,Ce),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(r=fe.needsContext.test(e)?0:i.length;r--&&(l=i[r],!R.relative[s=l.type]);)if((a=R.find[s])&&(o=a(l.matches[0].replace(ye,Ce),we.test(i[0].type)&&d(t.parentNode)||t))){if(i.splice(r,1),e=o.length&&f(i),!e)return J.apply(n,o),n;break}}return(u||T(e,c))(o,t,!L,n,!t||we.test(e)&&d(t.parentNode)||t),n},x.sortStable=V.split(\"\").sort(U).join(\"\")===V,x.detectDuplicates=!!N,A(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition($.createElement(\"fieldset\"))}),r(function(e){return e.innerHTML=\"<a href='#'></a>\",\"#\"===e.firstChild.getAttribute(\"href\")})||i(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML=\"<input/>\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||i(\"value\",function(e,t,n){if(!n&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute(\"disabled\")})||i(te,function(e,t,n){var o;if(!n)return e[t]===!0?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),t}(e);ge.find=Ce,ge.expr=Ce.selectors,ge.expr[\":\"]=ge.expr.pseudos,ge.uniqueSort=ge.unique=Ce.uniqueSort,ge.text=Ce.getText,ge.isXMLDoc=Ce.isXML,ge.contains=Ce.contains,ge.escapeSelector=Ce.escape;var be=function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&ge(e).is(n))break;o.push(e)}return o},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Re=ge.expr.match.needsContext,Ee=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i,Se=/^.[^:#\\[\\.,]*$/;ge.filter=function(e,t,n){var o=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===o.nodeType?ge.find.matchesSelector(o,e)?[o]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodeType}))},ge.fn.extend({find:function(e){var t,n,o=this.length,r=this;if(\"string\"!=typeof e)return this.pushStack(ge(e).filter(function(){for(t=0;t<o;t++)if(ge.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<o;t++)ge.find(e,r[t],n);return o>1?ge.uniqueSort(n):n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,\"string\"==typeof e&&Re.test(e)?ge(e):e||[],!1).length}});var ke,Te=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,Pe=ge.fn.init=function(e,t,n){var o,r;if(!e)return this;if(n=n||ke,\"string\"==typeof e){if(o=\"<\"===e[0]&&\">\"===e[e.length-1]&&e.length>=3?[null,e,null]:Te.exec(e),!o||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),Ee.test(o[1])&&ge.isPlainObject(t))for(o in t)ge.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return r=ne.getElementById(o[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ge.isFunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makeArray(e,this)};Pe.prototype=ge.fn,ke=ge(ne);var _e=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ge.contains(this,t[e]))return!0})},closest:function(e,t){var n,o=0,r=this.length,i=[],l=\"string\"!=typeof e&&ge(e);if(!Re.test(e))for(;o<r;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(l?l.index(n)>-1:1===n.nodeType&&ge.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?ge.uniqueSort(i):i)},index:function(e){return e?\"string\"==typeof e?se.call(ge(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ge.uniqueSort(ge.merge(this.get(),ge(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ge.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,\"parentNode\")},parentsUntil:function(e,t,n){return be(e,\"parentNode\",n)},next:function(e){return l(e,\"nextSibling\")},prev:function(e){return l(e,\"previousSibling\")},nextAll:function(e){return be(e,\"nextSibling\")},prevAll:function(e){return be(e,\"previousSibling\")},nextUntil:function(e,t,n){return be(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return be(e,\"previousSibling\",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return r(e,\"iframe\")?e.contentDocument:(r(e,\"template\")&&(e=e.content||e),ge.merge([],e.childNodes))}},function(e,t){ge.fn[e]=function(n,o){var r=ge.map(this,t,n);return\"Until\"!==e.slice(-5)&&(o=n),o&&\"string\"==typeof o&&(r=ge.filter(o,r)),this.length>1&&(De[e]||ge.uniqueSort(r),_e.test(e)&&r.reverse()),this.pushStack(r)}});var Ne=/[^\\x20\\t\\r\\n\\f]+/g;ge.Callbacks=function(e){e=\"string\"==typeof e?s(e):ge.extend({},e);var t,n,o,r,i=[],l=[],a=-1,u=function(){for(r=r||e.once,o=t=!0;l.length;a=-1)for(n=l.shift();++a<i.length;)i[a].apply(n[0],n[1])===!1&&e.stopOnFalse&&(a=i.length,n=!1);e.memory||(n=!1),t=!1,r&&(i=n?[]:\"\")},c={add:function(){return i&&(n&&!t&&(a=i.length-1,l.push(n)),function o(t){ge.each(t,function(t,n){ge.isFunction(n)?e.unique&&c.has(n)||i.push(n):n&&n.length&&\"string\"!==ge.type(n)&&o(n)})}(arguments),n&&!t&&u()),this},remove:function(){return ge.each(arguments,function(e,t){for(var n;(n=ge.inArray(t,i,n))>-1;)i.splice(n,1),n<=a&&a--}),this},has:function(e){return e?ge.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=l=[],i=n=\"\",this},disabled:function(){return!i},lock:function(){return r=l=[],n||t||(i=n=\"\"),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],l.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!o}};return c},ge.extend({Deferred:function(t){var n=[[\"notify\",\"progress\",ge.Callbacks(\"memory\"),ge.Callbacks(\"memory\"),2],[\"resolve\",\"done\",ge.Callbacks(\"once memory\"),ge.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",ge.Callbacks(\"once memory\"),ge.Callbacks(\"once memory\"),1,\"rejected\"]],o=\"pending\",r={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},\"catch\":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return ge.Deferred(function(t){ge.each(n,function(n,o){var r=ge.isFunction(e[o[4]])&&e[o[4]];i[o[1]](function(){var e=r&&r.apply(this,arguments);e&&ge.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+\"With\"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,o,r){function i(t,n,o,r){return function(){var s=this,c=arguments,d=function(){var e,d;if(!(t<l)){if(e=o.apply(s,c),e===n.promise())throw new TypeError(\"Thenable self-resolution\");d=e&&(\"object\"==typeof e||\"function\"==typeof e)&&e.then,ge.isFunction(d)?r?d.call(e,i(l,n,a,r),i(l,n,u,r)):(l++,d.call(e,i(l,n,a,r),i(l,n,u,r),i(l,n,a,n.notifyWith))):(o!==a&&(s=void 0,c=[e]),(r||n.resolveWith)(s,c))}},p=r?d:function(){try{d()}catch(e){ge.Deferred.exceptionHook&&ge.Deferred.exceptionHook(e,p.stackTrace),t+1>=l&&(o!==u&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(ge.Deferred.getStackHook&&(p.stackTrace=ge.Deferred.getStackHook()),e.setTimeout(p))}}var l=0;return ge.Deferred(function(e){n[0][3].add(i(0,e,ge.isFunction(r)?r:a,e.notifyWith)),n[1][3].add(i(0,e,ge.isFunction(t)?t:a)),n[2][3].add(i(0,e,ge.isFunction(o)?o:u))}).promise()},promise:function(e){return null!=e?ge.extend(e,r):r}},i={};return ge.each(n,function(e,t){var l=t[2],s=t[5];r[t[1]]=l.add,s&&l.add(function(){o=s},n[3-e][2].disable,n[0][2].lock),l.add(t[3].fire),i[t[0]]=function(){return i[t[0]+\"With\"](this===i?void 0:this,arguments),this},i[t[0]+\"With\"]=l.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,o=Array(n),r=re.call(arguments),i=ge.Deferred(),l=function(e){return function(n){o[e]=this,r[e]=arguments.length>1?re.call(arguments):n,--t||i.resolveWith(o,r)}};if(t<=1&&(c(e,i.done(l(n)).resolve,i.reject,!t),\"pending\"===i.state()||ge.isFunction(r[n]&&r[n].then)))return i.then();for(;n--;)c(r[n],l(n),i.reject);return i.promise()}});var Ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ge.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Ae.test(t.name)&&e.console.warn(\"jQuery.Deferred exception: \"+t.message,t.stack,n)},ge.readyException=function(t){e.setTimeout(function(){throw t})};var $e=ge.Deferred();ge.fn.ready=function(e){return $e.then(e)[\"catch\"](function(e){ge.readyException(e)}),this},ge.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ge.readyWait:ge.isReady)||(ge.isReady=!0,e!==!0&&--ge.readyWait>0||$e.resolveWith(ne,[ge]))}}),ge.ready.then=$e.then,\"complete\"===ne.readyState||\"loading\"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(ge.ready):(ne.addEventListener(\"DOMContentLoaded\",d),e.addEventListener(\"load\",d));var He=function(e,t,n,o,r,i,l){var s=0,a=e.length,u=null==n;if(\"object\"===ge.type(n)){r=!0;for(s in n)He(e,t,s,n[s],!0,i,l)}else if(void 0!==o&&(r=!0,ge.isFunction(o)||(l=!0),u&&(l?(t.call(e,o),t=null):(u=t,t=function(e,t,n){return u.call(ge(e),n)})),t))for(;s<a;s++)t(e[s],n,l?o:o.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):a?t(e[0],n):i},Le=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};p.uid=1,p.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Le(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,r=this.cache(e);if(\"string\"==typeof t)r[ge.camelCase(t)]=n;else for(o in t)r[ge.camelCase(o)]=t[o];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ge.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&\"string\"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o=e[this.expando];if(void 0!==o){if(void 0!==t){Array.isArray(t)?t=t.map(ge.camelCase):(t=ge.camelCase(t),t=t in o?[t]:t.match(Ne)||[]),n=t.length;for(;n--;)delete o[t[n]]}(void 0===t||ge.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ge.isEmptyObject(t)}};var Fe=new p,Ie=new p,Me=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,We=/[A-Z]/g;ge.extend({hasData:function(e){return Ie.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Ie.access(e,t,n)},removeData:function(e,t){Ie.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),ge.fn.extend({data:function(e,t){var n,o,r,i=this[0],l=i&&i.attributes;if(void 0===e){if(this.length&&(r=Ie.get(i),1===i.nodeType&&!Fe.get(i,\"hasDataAttrs\"))){for(n=l.length;n--;)l[n]&&(o=l[n].name,0===o.indexOf(\"data-\")&&(o=ge.camelCase(o.slice(5)),h(i,o,r[o])));Fe.set(i,\"hasDataAttrs\",!0)}return r}return\"object\"==typeof e?this.each(function(){Ie.set(this,e)}):He(this,function(t){var n;if(i&&void 0===t){if(n=Ie.get(i,e),void 0!==n)return n;if(n=h(i,e),void 0!==n)return n}else this.each(function(){Ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var o;if(e)return t=(t||\"fx\")+\"queue\",o=Fe.get(e,t),n&&(!o||Array.isArray(n)?o=Fe.access(e,t,ge.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||\"fx\";var n=ge.queue(e,t),o=n.length,r=n.shift(),i=ge._queueHooks(e,t),l=function(){ge.dequeue(e,t)};\"inprogress\"===r&&(r=n.shift(),o--),r&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete i.stop,r.call(e,l,i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Fe.get(e,n)||Fe.access(e,n,{empty:ge.Callbacks(\"once memory\").add(function(){Fe.remove(e,[t+\"queue\",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return\"string\"!=typeof e&&(t=e,e=\"fx\",n--),arguments.length<n?ge.queue(this[0],e):void 0===t?this:this.each(function(){var n=ge.queue(this,e,t);ge._queueHooks(this,e),\"fx\"===e&&\"inprogress\"!==n[0]&&ge.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ge.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,t){var n,o=1,r=ge.Deferred(),i=this,l=this.length,s=function(){--o||r.resolveWith(i,[i])};for(\"string\"!=typeof e&&(t=e,e=void 0),e=e||\"fx\";l--;)n=Fe.get(i[l],e+\"queueHooks\"),n&&n.empty&&(o++,n.empty.add(s));return s(),r.promise(t)}});var Ve=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,je=new RegExp(\"^(?:([+-])=|)(\"+Ve+\")([a-z%]*)$\",\"i\"),Oe=[\"Top\",\"Right\",\"Bottom\",\"Left\"],Be=function(e,t){return e=t||e,\"none\"===e.style.display||\"\"===e.style.display&&ge.contains(e.ownerDocument,e)&&\"none\"===ge.css(e,\"display\")},qe=function(e,t,n,o){var r,i,l={};for(i in t)l[i]=e.style[i],e.style[i]=t[i];r=n.apply(e,o||[]);for(i in t)e.style[i]=l[i];return r},ze={};ge.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){Be(this)?ge(this).show():ge(this).hide()})}});var Xe=/^(?:checkbox|radio)$/i,Ue=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i,Ke=/^$|\\/(?:java|ecma)script/i,Ge={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,\n",
" Ge.th=Ge.td;var Ye=/<|&#?\\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement(\"div\")),n=ne.createElement(\"input\");n.setAttribute(\"type\",\"radio\"),n.setAttribute(\"checked\",\"checked\"),n.setAttribute(\"name\",\"t\"),t.appendChild(n),fe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML=\"<textarea>x</textarea>\",fe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qe=ne.documentElement,Je=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\\.(.+)|)/;ge.event={global:{},add:function(e,t,n,o,r){var i,l,s,a,u,c,d,p,f,h,g,m=Fe.get(e);if(m)for(n.handler&&(i=n,n=i.handler,r=i.selector),r&&ge.find.matchesSelector(Qe,r),n.guid||(n.guid=ge.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(t){return\"undefined\"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||\"\").match(Ne)||[\"\"],u=t.length;u--;)s=et.exec(t[u])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f&&(d=ge.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=ge.event.special[f]||{},c=ge.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&ge.expr.match.needsContext.test(r),namespace:h.join(\".\")},i),(p=a[f])||(p=a[f]=[],p.delegateCount=0,d.setup&&d.setup.call(e,o,h,l)!==!1||e.addEventListener&&e.addEventListener(f,l)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),ge.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,l,s,a,u,c,d,p,f,h,g,m=Fe.hasData(e)&&Fe.get(e);if(m&&(a=m.events)){for(t=(t||\"\").match(Ne)||[\"\"],u=t.length;u--;)if(s=et.exec(t[u])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f){for(d=ge.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,p=a[f]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),l=i=p.length;i--;)c=p[i],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&(\"**\"!==o||!c.selector)||(p.splice(i,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));l&&!p.length&&(d.teardown&&d.teardown.call(e,h,m.handle)!==!1||ge.removeEvent(e,f,m.handle),delete a[f])}else for(f in a)ge.event.remove(e,f+t[u],n,o,!0);ge.isEmptyObject(a)&&Fe.remove(e,\"handle events\")}},dispatch:function(e){var t,n,o,r,i,l,s=ge.event.fix(e),a=new Array(arguments.length),u=(Fe.get(this,\"events\")||{})[s.type]||[],c=ge.event.special[s.type]||{};for(a[0]=s,t=1;t<arguments.length;t++)a[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,s)!==!1){for(l=ge.event.handlers.call(this,s,u),t=0;(r=l[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,o=((ge.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,a),void 0!==o&&(s.result=o)===!1&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,o,r,i,l,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&!(\"click\"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(\"click\"!==e.type||u.disabled!==!0)){for(i=[],l={},n=0;n<a;n++)o=t[n],r=o.selector+\" \",void 0===l[r]&&(l[r]=o.needsContext?ge(r,this).index(u)>-1:ge.find(r,this,null,[u]).length),l[r]&&i.push(o);i.length&&s.push({elem:u,handlers:i})}return u=this,a<t.length&&s.push({elem:u,handlers:t.slice(a)}),s},addProp:function(e,t){Object.defineProperty(ge.Event.prototype,e,{enumerable:!0,configurable:!0,get:ge.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[ge.expando]?e:new ge.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==R()&&this.focus)return this.focus(),!1},delegateType:\"focusin\"},blur:{trigger:function(){if(this===R()&&this.blur)return this.blur(),!1},delegateType:\"focusout\"},click:{trigger:function(){if(\"checkbox\"===this.type&&this.click&&r(this,\"input\"))return this.click(),!1},_default:function(e){return r(e.target,\"a\")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ge.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ge.Event=function(e,t){return this instanceof ge.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?b:x,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ge.extend(this,t),this.timeStamp=e&&e.timeStamp||ge.now(),void(this[ge.expando]=!0)):new ge.Event(e,t)},ge.Event.prototype={constructor:ge.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=b,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=b,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=b,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ge.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,\"char\":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},ge.event.addProp),ge.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(e,t){ge.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=this,r=e.relatedTarget,i=e.handleObj;return r&&(r===o||ge.contains(o,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),ge.fn.extend({on:function(e,t,n,o){return E(this,e,t,n,o)},one:function(e,t,n,o){return E(this,e,t,n,o,1)},off:function(e,t,n){var o,r;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,ge(e.delegateTarget).off(o.namespace?o.origType+\".\"+o.namespace:o.origType,o.selector,o.handler),this;if(\"object\"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return t!==!1&&\"function\"!=typeof t||(n=t,t=void 0),n===!1&&(n=x),this.each(function(){ge.event.remove(this,e,n,t)})}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,nt=/<script|<style|<link/i,ot=/checked\\s*(?:[^=]|=\\s*.checked.)/i,rt=/^true\\/(.*)/,it=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;ge.extend({htmlPrefilter:function(e){return e.replace(tt,\"<$1></$2>\")},clone:function(e,t,n){var o,r,i,l,s=e.cloneNode(!0),a=ge.contains(e.ownerDocument,e);if(!(fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ge.isXMLDoc(e)))for(l=w(s),i=w(e),o=0,r=i.length;o<r;o++)_(i[o],l[o]);if(t)if(n)for(i=i||w(e),l=l||w(s),o=0,r=i.length;o<r;o++)P(i[o],l[o]);else P(e,s);return l=w(s,\"script\"),l.length>0&&y(l,!a&&w(e,\"script\")),s},cleanData:function(e){for(var t,n,o,r=ge.event.special,i=0;void 0!==(n=e[i]);i++)if(Le(n)){if(t=n[Fe.expando]){if(t.events)for(o in t.events)r[o]?ge.event.remove(n,o):ge.removeEvent(n,o,t.handle);n[Fe.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return He(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.appendChild(e)}})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ge.cleanData(w(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return He(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!nt.test(e)&&!Ge[(Ue.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=ge.htmlPrefilter(e);try{for(;n<o;n++)t=this[n]||{},1===t.nodeType&&(ge.cleanData(w(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return D(this,arguments,function(t){var n=this.parentNode;ge.inArray(this,e)<0&&(ge.cleanData(w(this)),n&&n.replaceChild(t,this))},e)}}),ge.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,t){ge.fn[e]=function(e){for(var n,o=[],r=ge(e),i=r.length-1,l=0;l<=i;l++)n=l===i?this:this.clone(!0),ge(r[l])[t](n),le.apply(o,n.get());return this.pushStack(o)}});var lt=/^margin/,st=new RegExp(\"^(\"+Ve+\")(?!px)[a-z%]+$\",\"i\"),at=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText=\"box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%\",s.innerHTML=\"\",Qe.appendChild(l);var t=e.getComputedStyle(s);n=\"1%\"!==t.top,i=\"2px\"===t.marginLeft,o=\"4px\"===t.width,s.style.marginRight=\"50%\",r=\"4px\"===t.marginRight,Qe.removeChild(l),s=null}}var n,o,r,i,l=ne.createElement(\"div\"),s=ne.createElement(\"div\");s.style&&(s.style.backgroundClip=\"content-box\",s.cloneNode(!0).style.backgroundClip=\"\",fe.clearCloneStyle=\"content-box\"===s.style.backgroundClip,l.style.cssText=\"border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute\",l.appendChild(s),ge.extend(fe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),o},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),i}}))}();var ut=/^(none|table(?!-c[ea]).+)/,ct=/^--/,dt={position:\"absolute\",visibility:\"hidden\",display:\"block\"},pt={letterSpacing:\"0\",fontWeight:\"400\"},ft=[\"Webkit\",\"Moz\",\"ms\"],ht=ne.createElement(\"div\").style;ge.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=A(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":\"cssFloat\"},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,i,l,s=ge.camelCase(t),a=ct.test(t),u=e.style;return a||(t=L(s)),l=ge.cssHooks[t]||ge.cssHooks[s],void 0===n?l&&\"get\"in l&&void 0!==(r=l.get(e,!1,o))?r:u[t]:(i=typeof n,\"string\"===i&&(r=je.exec(n))&&r[1]&&(n=g(e,t,r),i=\"number\"),null!=n&&n===n&&(\"number\"===i&&(n+=r&&r[3]||(ge.cssNumber[s]?\"\":\"px\")),fe.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(u[t]=\"inherit\"),l&&\"set\"in l&&void 0===(n=l.set(e,n,o))||(a?u.setProperty(t,n):u[t]=n)),void 0)}},css:function(e,t,n,o){var r,i,l,s=ge.camelCase(t),a=ct.test(t);return a||(t=L(s)),l=ge.cssHooks[t]||ge.cssHooks[s],l&&\"get\"in l&&(r=l.get(e,!0,n)),void 0===r&&(r=A(e,t,o)),\"normal\"===r&&t in pt&&(r=pt[t]),\"\"===n||n?(i=parseFloat(r),n===!0||isFinite(i)?i||0:r):r}}),ge.each([\"height\",\"width\"],function(e,t){ge.cssHooks[t]={get:function(e,n,o){if(n)return!ut.test(ge.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?M(e,t,o):qe(e,dt,function(){return M(e,t,o)})},set:function(e,n,o){var r,i=o&&at(e),l=o&&I(e,t,o,\"border-box\"===ge.css(e,\"boxSizing\",!1,i),i);return l&&(r=je.exec(n))&&\"px\"!==(r[3]||\"px\")&&(e.style[t]=n,n=ge.css(e,t)),F(e,n,l)}}}),ge.cssHooks.marginLeft=$(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(A(e,\"marginLeft\"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+\"px\"}),ge.each({margin:\"\",padding:\"\",border:\"Width\"},function(e,t){ge.cssHooks[e+t]={expand:function(n){for(var o=0,r={},i=\"string\"==typeof n?n.split(\" \"):[n];o<4;o++)r[e+Oe[o]+t]=i[o]||i[o-2]||i[0];return r}},lt.test(e)||(ge.cssHooks[e+t].set=F)}),ge.fn.extend({css:function(e,t){return He(this,function(e,t,n){var o,r,i={},l=0;if(Array.isArray(t)){for(o=at(e),r=t.length;l<r;l++)i[t[l]]=ge.css(e,t[l],!1,o);return i}return void 0!==n?ge.style(e,t,n):ge.css(e,t)},e,t,arguments.length>1)}}),ge.Tween=W,W.prototype={constructor:W,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(ge.cssNumber[n]?\"\":\"px\")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,\"\"),t&&\"auto\"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ge.cssProps[e.prop]]&&!ge.cssHooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},ge.fx=W.prototype.init,ge.fx.step={};var gt,mt,vt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;ge.Animation=ge.extend(X,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,je.exec(t),n),n}]},tweener:function(e,t){ge.isFunction(e)?(t=e,e=[\"*\"]):e=e.match(Ne);for(var n,o=0,r=e.length;o<r;o++)n=e[o],X.tweeners[n]=X.tweeners[n]||[],X.tweeners[n].unshift(t)},prefilters:[q],prefilter:function(e,t){t?X.prefilters.unshift(e):X.prefilters.push(e)}}),ge.speed=function(e,t,n){var o=e&&\"object\"==typeof e?ge.extend({},e):{complete:n||!n&&t||ge.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ge.isFunction(t)&&t};return ge.fx.off?o.duration=0:\"number\"!=typeof o.duration&&(o.duration in ge.fx.speeds?o.duration=ge.fx.speeds[o.duration]:o.duration=ge.fx.speeds._default),null!=o.queue&&o.queue!==!0||(o.queue=\"fx\"),o.old=o.complete,o.complete=function(){ge.isFunction(o.old)&&o.old.call(this),o.queue&&ge.dequeue(this,o.queue)},o},ge.fn.extend({fadeTo:function(e,t,n,o){return this.filter(Be).css(\"opacity\",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var r=ge.isEmptyObject(e),i=ge.speed(t,n,o),l=function(){var t=X(this,ge.extend({},e),i);(r||Fe.get(this,\"finish\"))&&t.stop(!0)};return l.finish=l,r||i.queue===!1?this.each(l):this.queue(i.queue,l)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return\"string\"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||\"fx\",[]),this.each(function(){var t=!0,r=null!=e&&e+\"queueHooks\",i=ge.timers,l=Fe.get(this);if(r)l[r]&&l[r].stop&&o(l[r]);else for(r in l)l[r]&&l[r].stop&&wt.test(r)&&o(l[r]);for(r=i.length;r--;)i[r].elem!==this||null!=e&&i[r].queue!==e||(i[r].anim.stop(n),t=!1,i.splice(r,1));!t&&n||ge.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||\"fx\"),this.each(function(){var t,n=Fe.get(this),o=n[e+\"queue\"],r=n[e+\"queueHooks\"],i=ge.timers,l=o?o.length:0;for(n.finish=!0,ge.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<l;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),ge.each([\"toggle\",\"show\",\"hide\"],function(e,t){var n=ge.fn[t];ge.fn[t]=function(e,o,r){return null==e||\"boolean\"==typeof e?n.apply(this,arguments):this.animate(O(t,!0),e,o,r)}}),ge.each({slideDown:O(\"show\"),slideUp:O(\"hide\"),slideToggle:O(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,t){ge.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),ge.timers=[],ge.fx.tick=function(){var e,t=0,n=ge.timers;for(gt=ge.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ge.fx.stop(),gt=void 0},ge.fx.timer=function(e){ge.timers.push(e),ge.fx.start()},ge.fx.interval=13,ge.fx.start=function(){mt||(mt=!0,V())},ge.fx.stop=function(){mt=null},ge.fx.speeds={slow:600,fast:200,_default:400},ge.fn.delay=function(t,n){return t=ge.fx?ge.fx.speeds[t]||t:t,n=n||\"fx\",this.queue(n,function(n,o){var r=e.setTimeout(n,t);o.stop=function(){e.clearTimeout(r)}})},function(){var e=ne.createElement(\"input\"),t=ne.createElement(\"select\"),n=t.appendChild(ne.createElement(\"option\"));e.type=\"checkbox\",fe.checkOn=\"\"!==e.value,fe.optSelected=n.selected,e=ne.createElement(\"input\"),e.value=\"t\",e.type=\"radio\",fe.radioValue=\"t\"===e.value}();var yt,Ct=ge.expr.attrHandle;ge.fn.extend({attr:function(e,t){return He(this,ge.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ge.removeAttr(this,e)})}}),ge.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return\"undefined\"==typeof e.getAttribute?ge.prop(e,t,n):(1===i&&ge.isXMLDoc(e)||(r=ge.attrHooks[t.toLowerCase()]||(ge.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void ge.removeAttr(e,t):r&&\"set\"in r&&void 0!==(o=r.set(e,n,t))?o:(e.setAttribute(t,n+\"\"),n):r&&\"get\"in r&&null!==(o=r.get(e,t))?o:(o=ge.find.attr(e,t),null==o?void 0:o))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&\"radio\"===t&&r(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,r=t&&t.match(Ne);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?ge.removeAttr(e,n):e.setAttribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\\w+/g),function(e,t){var n=Ct[t]||ge.find.attr;Ct[t]=function(e,t,o){var r,i,l=t.toLowerCase();return o||(i=Ct[l],Ct[l]=r,r=null!=n(e,t,o)?l:null,Ct[l]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return He(this,ge.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ge.propFix[e]||e]})}}),ge.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&ge.isXMLDoc(e)||(t=ge.propFix[t]||t,r=ge.propHooks[t]),void 0!==n?r&&\"set\"in r&&void 0!==(o=r.set(e,n,t))?o:e[t]=n:r&&\"get\"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=ge.find.attr(e,\"tabindex\");return t?parseInt(t,10):bt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),fe.optSelected||(ge.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ge.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){ge.propFix[this.toLowerCase()]=this}),ge.fn.extend({addClass:function(e){var t,n,o,r,i,l,s,a=0;if(ge.isFunction(e))return this.each(function(t){ge(this).addClass(e.call(this,t,K(this)))});if(\"string\"==typeof e&&e)for(t=e.match(Ne)||[];n=this[a++];)if(r=K(n),o=1===n.nodeType&&\" \"+U(r)+\" \"){for(l=0;i=t[l++];)o.indexOf(\" \"+i+\" \")<0&&(o+=i+\" \");s=U(o),r!==s&&n.setAttribute(\"class\",s)}return this},removeClass:function(e){var t,n,o,r,i,l,s,a=0;if(ge.isFunction(e))return this.each(function(t){ge(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if(\"string\"==typeof e&&e)for(t=e.match(Ne)||[];n=this[a++];)if(r=K(n),o=1===n.nodeType&&\" \"+U(r)+\" \"){for(l=0;i=t[l++];)for(;o.indexOf(\" \"+i+\" \")>-1;)o=o.replace(\" \"+i+\" \",\" \");s=U(o),r!==s&&n.setAttribute(\"class\",s)}return this},toggleClass:function(e,t){var n=typeof e;return\"boolean\"==typeof t&&\"string\"===n?t?this.addClass(e):this.removeClass(e):ge.isFunction(e)?this.each(function(n){ge(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,o,r,i;if(\"string\"===n)for(o=0,r=ge(this),i=e.match(Ne)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&\"boolean\"!==n||(t=K(this),t&&Fe.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||e===!1?\"\":Fe.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,o=0;for(t=\" \"+e+\" \";n=this[o++];)if(1===n.nodeType&&(\" \"+U(K(n))+\" \").indexOf(t)>-1)return!0;return!1}});var Rt=/\\r/g;ge.fn.extend({val:function(e){var t,n,o,r=this[0];{if(arguments.length)return o=ge.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=o?e.call(this,n,ge(this).val()):e,null==r?r=\"\":\"number\"==typeof r?r+=\"\":Array.isArray(r)&&(r=ge.map(r,function(e){return null==e?\"\":e+\"\"})),t=ge.valHooks[this.type]||ge.valHooks[this.nodeName.toLowerCase()],t&&\"set\"in t&&void 0!==t.set(this,r,\"value\")||(this.value=r))});if(r)return t=ge.valHooks[r.type]||ge.valHooks[r.nodeName.toLowerCase()],t&&\"get\"in t&&void 0!==(n=t.get(r,\"value\"))?n:(n=r.value,\"string\"==typeof n?n.replace(Rt,\"\"):null==n?\"\":n)}}}),ge.extend({valHooks:{option:{get:function(e){var t=ge.find.attr(e,\"value\");return null!=t?t:U(ge.text(e))}},select:{get:function(e){var t,n,o,i=e.options,l=e.selectedIndex,s=\"select-one\"===e.type,a=s?null:[],u=s?l+1:i.length;for(o=l<0?u:s?l:0;o<u;o++)if(n=i[o],(n.selected||o===l)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,\"optgroup\"))){if(t=ge(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,o,r=e.options,i=ge.makeArray(t),l=r.length;l--;)o=r[l],(o.selected=ge.inArray(ge.valHooks.option.get(o),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),ge.each([\"radio\",\"checkbox\"],function(){ge.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ge.inArray(ge(e).val(),t)>-1}},fe.checkOn||(ge.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(t,n,o,r){var i,l,s,a,u,c,d,p=[o||ne],f=ce.call(t,\"type\")?t.type:t,h=ce.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(l=s=o=o||ne,3!==o.nodeType&&8!==o.nodeType&&!Et.test(f+ge.event.triggered)&&(f.indexOf(\".\")>-1&&(h=f.split(\".\"),f=h.shift(),h.sort()),u=f.indexOf(\":\")<0&&\"on\"+f,t=t[ge.expando]?t:new ge.Event(f,\"object\"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join(\".\"),t.rnamespace=t.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:ge.makeArray(n,[t]),d=ge.event.special[f]||{},r||!d.trigger||d.trigger.apply(o,n)!==!1)){if(!r&&!d.noBubble&&!ge.isWindow(o)){for(a=d.delegateType||f,Et.test(a+f)||(l=l.parentNode);l;l=l.parentNode)p.push(l),s=l;s===(o.ownerDocument||ne)&&p.push(s.defaultView||s.parentWindow||e)}for(i=0;(l=p[i++])&&!t.isPropagationStopped();)t.type=i>1?a:d.bindType||f,c=(Fe.get(l,\"events\")||{})[t.type]&&Fe.get(l,\"handle\"),c&&c.apply(l,n),c=u&&l[u],c&&c.apply&&Le(l)&&(t.result=c.apply(l,n),t.result===!1&&t.preventDefault());return t.type=f,r||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!Le(o)||u&&ge.isFunction(o[f])&&!ge.isWindow(o)&&(s=o[u],s&&(o[u]=null),ge.event.triggered=f,o[f](),ge.event.triggered=void 0,s&&(o[u]=s)),t.result}},simulate:function(e,t,n){var o=ge.extend(new ge.Event,n,{type:e,isSimulated:!0});ge.event.trigger(o,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,t){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.focusin=\"onfocusin\"in e,fe.focusin||ge.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=Fe.access(o,t);r||o.addEventListener(e,n,!0),Fe.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=Fe.access(o,t)-1;r?Fe.access(o,t,r):(o.removeEventListener(e,n,!0),Fe.remove(o,t))}}});var St=e.location,kt=ge.now(),Tt=/\\?/;ge.parseXML=function(t){var n;if(!t||\"string\"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(o){n=void 0}return n&&!n.getElementsByTagName(\"parsererror\").length||ge.error(\"Invalid XML: \"+t),n};var Pt=/\\[\\]$/,_t=/\\r?\\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,o=[],r=function(e,t){var n=ge.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(Array.isArray(e)||e.jquery&&!ge.isPlainObject(e))ge.each(e,function(){r(this.name,this.value)});else for(n in e)G(n,e[n],t,r);return o.join(\"&\")},ge.fn.extend({serialize:function(){return ge.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ge.prop(this,\"elements\");return e?ge.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(\":disabled\")&&Nt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:Array.isArray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(_t,\"\\r\\n\")}}):{name:t.name,value:n.replace(_t,\"\\r\\n\")}}).get()}});var At=/%20/g,$t=/#.*$/,Ht=/([?&])_=[^&]*/,Lt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Mt=/^\\/\\//,Wt={},Vt={},jt=\"*/\".concat(\"*\"),Ot=ne.createElement(\"a\");Ot.href=St.href,ge.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:\"GET\",isLocal:Ft.test(St.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":jt,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":ge.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,ge.ajaxSettings),t):J(ge.ajaxSettings,e)},ajaxPrefilter:Y(Wt),ajaxTransport:Y(Vt),ajax:function(t,n){function o(t,n,o,s){var u,p,f,C,b,x=n;c||(c=!0,a&&e.clearTimeout(a),r=void 0,l=s||\"\",R.readyState=t>0?4:0,u=t>=200&&t<300||304===t,o&&(C=Z(h,R,o)),C=ee(h,C,R,u),u?(h.ifModified&&(b=R.getResponseHeader(\"Last-Modified\"),b&&(ge.lastModified[i]=b),b=R.getResponseHeader(\"etag\"),b&&(ge.etag[i]=b)),204===t||\"HEAD\"===h.type?x=\"nocontent\":304===t?x=\"notmodified\":(x=C.state,p=C.data,f=C.error,u=!f)):(f=x,!t&&x||(x=\"error\",t<0&&(t=0))),R.status=t,R.statusText=(n||x)+\"\",u?v.resolveWith(g,[p,x,R]):v.rejectWith(g,[R,x,f]),R.statusCode(y),y=void 0,d&&m.trigger(u?\"ajaxSuccess\":\"ajaxError\",[R,h,u?p:f]),w.fireWith(g,[R,x]),d&&(m.trigger(\"ajaxComplete\",[R,h]),--ge.active||ge.event.trigger(\"ajaxStop\")))}\"object\"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,l,s,a,u,c,d,p,f,h=ge.ajaxSetup({},n),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?ge(g):ge.event,v=ge.Deferred(),w=ge.Callbacks(\"once memory\"),y=h.statusCode||{},C={},b={},x=\"canceled\",R={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Lt.exec(l);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?l:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)R.always(e[R.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),o(0,t),this}};if(v.promise(R),h.url=((t||h.url||St.href)+\"\").replace(Mt,St.protocol+\"//\"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||\"*\").toLowerCase().match(Ne)||[\"\"],null==h.crossDomain){u=ne.createElement(\"a\");try{u.href=h.url,u.href=u.href,h.crossDomain=Ot.protocol+\"//\"+Ot.host!=u.protocol+\"//\"+u.host}catch(E){h.crossDomain=!0}}if(h.data&&h.processData&&\"string\"!=typeof h.data&&(h.data=ge.param(h.data,h.traditional)),Q(Wt,h,n,R),c)return R;d=ge.event&&h.global,d&&0===ge.active++&&ge.event.trigger(\"ajaxStart\"),h.type=h.type.toUpperCase(),h.hasContent=!It.test(h.type),i=h.url.replace($t,\"\"),h.hasContent?h.data&&h.processData&&0===(h.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(h.data=h.data.replace(At,\"+\")):(f=h.url.slice(i.length),h.data&&(i+=(Tt.test(i)?\"&\":\"?\")+h.data,delete h.data),h.cache===!1&&(i=i.replace(Ht,\"$1\"),f=(Tt.test(i)?\"&\":\"?\")+\"_=\"+kt++ +f),h.url=i+f),h.ifModified&&(ge.lastModified[i]&&R.setRequestHeader(\"If-Modified-Since\",ge.lastModified[i]),ge.etag[i]&&R.setRequestHeader(\"If-None-Match\",ge.etag[i])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&R.setRequestHeader(\"Content-Type\",h.contentType),R.setRequestHeader(\"Accept\",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(\"*\"!==h.dataTypes[0]?\", \"+jt+\"; q=0.01\":\"\"):h.accepts[\"*\"]);for(p in h.headers)R.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(h.beforeSend.call(g,R,h)===!1||c))return R.abort();if(x=\"abort\",w.add(h.complete),R.done(h.success),R.fail(h.error),r=Q(Vt,h,n,R)){if(R.readyState=1,d&&m.trigger(\"ajaxSend\",[R,h]),c)return R;h.async&&h.timeout>0&&(a=e.setTimeout(function(){R.abort(\"timeout\")},h.timeout));try{c=!1,r.send(C,o)}catch(E){if(c)throw E;o(-1,E)}}else o(-1,\"No Transport\");return R},getJSON:function(e,t,n){return ge.get(e,t,n,\"json\")},getScript:function(e,t){return ge.get(e,void 0,t,\"script\")}}),ge.each([\"get\",\"post\"],function(e,t){ge[t]=function(e,n,o,r){return ge.isFunction(n)&&(r=r||o,o=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,dataType:r,data:n,success:o},ge.isPlainObject(e)&&e))}}),ge._evalUrl=function(e){return ge.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,\"throws\":!0})},ge.fn.extend({wrapAll:function(e){var t;return this[0]&&(ge.isFunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ge.isFunction(e)?this.each(function(t){ge(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ge.isFunction(e);return this.each(function(n){ge(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){ge(this).replaceWith(this.childNodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length);\n",
" },ge.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Bt={0:200,1223:204},qt=ge.ajaxSettings.xhr();fe.cors=!!qt&&\"withCredentials\"in qt,fe.ajax=qt=!!qt,ge.ajaxTransport(function(t){var n,o;if(fe.cors||qt&&!t.crossDomain)return{send:function(r,i){var l,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(l in t.xhrFields)s[l]=t.xhrFields[l];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r[\"X-Requested-With\"]||(r[\"X-Requested-With\"]=\"XMLHttpRequest\");for(l in r)s.setRequestHeader(l,r[l]);n=function(e){return function(){n&&(n=o=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,\"abort\"===e?s.abort():\"error\"===e?\"number\"!=typeof s.status?i(0,\"error\"):i(s.status,s.statusText):i(Bt[s.status]||s.status,s.statusText,\"text\"!==(s.responseType||\"text\")||\"string\"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),o=s.onerror=n(\"error\"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&o()})},n=n(\"abort\");try{s.send(t.hasContent&&t.data||null)}catch(a){if(n)throw a}},abort:function(){n&&n()}}}),ge.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ge.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return ge.globalEval(e),e}}}),ge.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),ge.ajaxTransport(\"script\",function(e){if(e.crossDomain){var t,n;return{send:function(o,r){t=ge(\"<script>\").prop({charset:e.scriptCharset,src:e.url}).on(\"load error\",n=function(e){t.remove(),n=null,e&&r(\"error\"===e.type?404:200,e.type)}),ne.head.appendChild(t[0])},abort:function(){n&&n()}}}});var zt=[],Xt=/(=)\\?(?=&|$)|\\?\\?/;ge.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=zt.pop()||ge.expando+\"_\"+kt++;return this[e]=!0,e}}),ge.ajaxPrefilter(\"json jsonp\",function(t,n,o){var r,i,l,s=t.jsonp!==!1&&(Xt.test(t.url)?\"url\":\"string\"==typeof t.data&&0===(t.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Xt.test(t.data)&&\"data\");if(s||\"jsonp\"===t.dataTypes[0])return r=t.jsonpCallback=ge.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xt,\"$1\"+r):t.jsonp!==!1&&(t.url+=(Tt.test(t.url)?\"&\":\"?\")+t.jsonp+\"=\"+r),t.converters[\"script json\"]=function(){return l||ge.error(r+\" was not called\"),l[0]},t.dataTypes[0]=\"json\",i=e[r],e[r]=function(){l=arguments},o.always(function(){void 0===i?ge(e).removeProp(r):e[r]=i,t[r]&&(t.jsonpCallback=n.jsonpCallback,zt.push(r)),l&&ge.isFunction(i)&&i(l[0]),l=i=void 0}),\"script\"}),fe.createHTMLDocument=function(){var e=ne.implementation.createHTMLDocument(\"\").body;return e.innerHTML=\"<form></form><form></form>\",2===e.childNodes.length}(),ge.parseHTML=function(e,t,n){if(\"string\"!=typeof e)return[];\"boolean\"==typeof t&&(n=t,t=!1);var o,r,i;return t||(fe.createHTMLDocument?(t=ne.implementation.createHTMLDocument(\"\"),o=t.createElement(\"base\"),o.href=ne.location.href,t.head.appendChild(o)):t=ne),r=Ee.exec(e),i=!n&&[],r?[t.createElement(r[1])]:(r=C([e],t,i),i&&i.length&&ge(i).remove(),ge.merge([],r.childNodes))},ge.fn.load=function(e,t,n){var o,r,i,l=this,s=e.indexOf(\" \");return s>-1&&(o=U(e.slice(s)),e=e.slice(0,s)),ge.isFunction(t)?(n=t,t=void 0):t&&\"object\"==typeof t&&(r=\"POST\"),l.length>0&&ge.ajax({url:e,type:r||\"GET\",dataType:\"html\",data:t}).done(function(e){i=arguments,l.html(o?ge(\"<div>\").append(ge.parseHTML(e)).find(o):e)}).always(n&&function(e,t){l.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},ge.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){ge.fn[t]=function(e){return this.on(t,e)}}),ge.expr.pseudos.animated=function(e){return ge.grep(ge.timers,function(t){return e===t.elem}).length},ge.offset={setOffset:function(e,t,n){var o,r,i,l,s,a,u,c=ge.css(e,\"position\"),d=ge(e),p={};\"static\"===c&&(e.style.position=\"relative\"),s=d.offset(),i=ge.css(e,\"top\"),a=ge.css(e,\"left\"),u=(\"absolute\"===c||\"fixed\"===c)&&(i+a).indexOf(\"auto\")>-1,u?(o=d.position(),l=o.top,r=o.left):(l=parseFloat(i)||0,r=parseFloat(a)||0),ge.isFunction(t)&&(t=t.call(e,n,ge.extend({},s))),null!=t.top&&(p.top=t.top-s.top+l),null!=t.left&&(p.left=t.left-s.left+r),\"using\"in t?t.using.call(e,p):d.css(p)}},ge.fn.extend({offset:function(e)
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment