diff --git a/examples/Carbon_Flux.ipynb b/examples/Carbon_Flux.ipynb index 5c1c03f..0e4dfbc 100644 --- a/examples/Carbon_Flux.ipynb +++ b/examples/Carbon_Flux.ipynb @@ -9,9 +9,1531 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, - "outputs": [], + "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[toinsert.length - 1].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[toinsert.length - 1].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[toinsert.length - 1]);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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=function(t,e,i){var n={},r=function(i){var o=null!=e[i]?e[i]:i;if(!n[o]){if(!t[o]){var s=new Error(\"Cannot find module '\"+i+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=n[o]={exports:{}};t[o].call(a.exports,r,a,a.exports)}return n[o].exports},o=r(52);return o.require=r,o.register_plugin=function(i,n,s){for(var a in i)t[a]=i[a];for(var a in n)e[a]=n[a];var l=r(s);for(var a in l)o[a]=l[a];return l},o}([function(t,e,i){var n=t(142),r=t(32);i.overrides={};var o=r.clone(n);i.Models=function(t){var e=i.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},i.Models.register=function(t,e){i.overrides[t]=e},i.Models.unregister=function(t){delete i.overrides[t]},i.Models.register_models=function(t,e,i){if(void 0===e&&(e=!1),null!=t)for(var n in t){var r=t[n];e||!o.hasOwnProperty(n)?o[n]=r:null!=i?i(n):console.warn(\"Model '\"+n+\"' was already registered\")}},i.register_models=i.Models.register_models,i.Models.registered_names=function(){return Object.keys(o)},i.index={}},function(t,e,i){var n=t(319),r=t(14),o=t(50),s=t(262),a=t(263),l=t(2);i.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",i.DEFAULT_SESSION_ID=\"default\";var h=0,c=function(){function t(t,e,n,o,s){void 0===t&&(t=i.DEFAULT_SERVER_WEBSOCKET_URL),void 0===e&&(e=i.DEFAULT_SESSION_ID),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null),this.url=t,this.id=e,this.args_string=n,this._on_have_session_hook=o,this._on_closed_permanently_hook=s,this._number=h++,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,r.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\")}return t.prototype.connect=function(){var t=this;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{var e=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id;return null!=this.args_string&&this.args_string.length>0&&(e+=\"&\"+this.args_string),this.socket=new WebSocket(e),new n.Promise(function(e,i){t.socket.binaryType=\"arraybuffer\",t.socket.onopen=function(){return t._on_open(e,i)},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(i)}})}catch(t){return r.logger.error(\"websocket creation failed to url: \"+this.url),r.logger.error(\" - \"+t),n.Promise.reject(t)}},t.prototype.close=function(){this.closed_permanently||(r.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&&(this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null))},t.prototype._schedule_reconnect=function(t){var e=this;setTimeout(function(){e.closed_permanently||r.logger.info(\"Websocket connection \"+e._number+\" disconnected, will not attempt to reconnect\");return},t)},t.prototype.send=function(t){if(null==this.socket)throw new Error(\"not connected so cannot send \"+t);t.send(this.socket)},t.prototype.send_with_reply=function(t){var e=this,i=new n.Promise(function(i,n){e._pending_replies[t.msgid()]=[i,n],e.send(t)});return i.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=s.Message.create(\"PULL-DOC-REQ\",{}),e=this.send_with_reply(t);return 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(){var t=this;null==this.session?r.logger.debug(\"Pulling session for first time\"):r.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(e){if(null==t.session)if(t.closed_permanently)r.logger.debug(\"Got new document after connection was already closed\");else{var i=o.Document.from_json(e),n=o.Document._compute_patch_since_json(e,i);if(n.events.length>0){r.logger.debug(\"Sending \"+n.events.length+\" changes from model construction back to server\");var a=s.Message.create(\"PATCH-DOC\",{},n);t.send(a)}t.session=new l.ClientSession(t,i,t.id),r.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)}else t.session.document.replace_with_json(e),r.logger.debug(\"Updated existing session with new pulled doc\")},function(t){throw t}).catch(function(t){null!=console.trace&&console.trace(t),r.logger.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){var i=this;r.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){i._awaiting_ack_handler(t)}},t.prototype._on_message=function(t){null==this._current_handler&&r.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(t.data)}catch(t){this._close_bad_protocol(t.toString())}if(null!=this._receiver.message){var e=this._receiver.message,i=e.problem();null!=i&&this._close_bad_protocol(i),this._current_handler(e)}},t.prototype._on_close=function(t){var e=this;r.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);for(var i=function(){for(var t in e._pending_replies){var i=e._pending_replies[t];return delete e._pending_replies[t],i}return null},n=i();null!=n;)n[1](\"Disconnected\"),n=i();this.closed_permanently||this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){r.logger.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){r.logger.error(\"Closing connection: \"+t),null!=this.socket&&this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){var e=this;\"ACK\"===t.msgtype()?(this._current_handler=function(t){return e._steady_state_handler(t)},this._repull_session_doc(),null!=this._pending_ack&&(this._pending_ack[0](this),this._pending_ack=null)):this._close_bad_protocol(\"First message was not an ACK\")},t.prototype._steady_state_handler=function(t){if(t.reqid()in this._pending_replies){var e=this._pending_replies[t.reqid()];delete this._pending_replies[t.reqid()],e[0](t)}else this.session.handle(t)},t}();i.ClientConnection=c,i.pull_session=function(t,e,i){return new n.Promise(function(n,o){return new c(t,e,i,function(t){try{n(t)}catch(e){throw r.logger.error(\"Promise handler threw an error, closing session \"+e),t.close(),e}},function(){o(new Error(\"Connection was closed before we successfully pulled a session\"))}).connect().then(function(t){},function(t){throw r.logger.error(\"Failed to connect to Bokeh server \"+t),t})})}},function(t,e,i){var n=t(14),r=t(50),o=t(262),s=function(){function t(t,e,i){var n=this;this._connection=t,this.document=e,this.id=i,this._document_listener=function(t){return n._document_changed(t)},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=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(){this._connection.close()},t.prototype.send_event=function(t){var e=o.Message.create(\"EVENT\",{},JSON.stringify(t));this._connection.send(e)},t.prototype._connection_closed=function(){this.document.remove_on_change(this._document_listener)},t.prototype.request_server_info=function(){var t=o.Message.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t);return 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){if(t.setter_id!==this.id&&(!(t instanceof r.ModelChangedEvent)||t.attr in t.model.serializable_attributes())){var e=o.Message.create(\"PATCH-DOC\",{},this.document.create_json_patch([t]));this._connection.send(e)}},t.prototype._handle_patch=function(t){this.document.apply_json_patch(t.content,t.buffers,this.id)},t.prototype._handle_ok=function(t){n.logger.trace(\"Unhandled OK reply to \"+t.reqid())},t.prototype._handle_error=function(t){n.logger.error(\"Unhandled ERROR reply to \"+t.reqid()+\": \"+t.content.text)},t}();i.ClientSession=s},function(t,e,i){function n(t){return function(e){e.prototype.event_name=t,a[t]=e}}var r=t(380),o=t(14),s=t(32),a={};i.register_event_class=n,i.register_with_event=function(t){for(var e=[],i=1;i0&&(this._pending=!0);for(var h=0;h1)return r(t,i);var s={x:e.x+o*(i.x-e.x),y:e.y+o*(i.y-e.y)};return r(t,s)}var s=t(21),a=t(181);i.point_in_poly=function(t,e,i,n){for(var r=!1,o=i[i.length-1],s=n[n.length-1],a=0;an&&(s=[n,i],i=s[0],n=s[1]);r>o&&(a=[o,r],r=a[0],o=a[1]);return{minX:i,minY:r,maxX:n,maxY:o};var s,a},i.dist_2_pts=r,i.dist_to_segment_squared=o,i.dist_to_segment=function(t,e,i){return Math.sqrt(o(t,e,i))},i.check_2_segments_intersect=function(t,e,i,n,r,o,s,a){var l=(a-o)*(i-t)-(s-r)*(n-e);if(0==l)return{hit:!1,x:null,y:null};var h=e-o,c=t-r,u=(s-r)*h-(a-o)*c,_=(i-t)*h-(n-e)*c;c=_/l;var p=t+(h=u/l)*(i-t),d=e+h*(n-e);return{hit:h>0&&h<1&&c>0&&c<1,x:p,y:d}}},function(t,e,i){var n=t(13),r=t(21);i.vstack=function(t,e){var i=[];if(e.length>0){i.push(n.EQ(r.head(e)._bottom,[-1,t._bottom])),i.push(n.EQ(r.tail(e)._top,[-1,t._top])),i.push.apply(i,r.pairwise(e,function(t,e){return n.EQ(t._top,[-1,e._bottom])}));for(var o=0,s=e;o0){i.push(n.EQ(r.head(e)._right,[-1,t._right])),i.push(n.EQ(r.tail(e)._left,[-1,t._left])),i.push.apply(i,r.pairwise(e,function(t,e){return n.EQ(t._left,[-1,e._right])}));for(var o=0,s=e;o0){var n=r[e];return null==n&&(r[e]=n=new t(e,i)),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 o)this._log_level=e;else{if(!n.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 i=\"[\"+this._name+\"]\";for(var r in t.log_levels){var s=t.log_levels[r];s.level0){var d=this.source.selection_policy.hit_test(e,r);u=u||this.source.selection_policy.do_selection(d,this.source,i,n)}return u},e.prototype.inspect=function(t,e){var i=!1;if(t instanceof s.GlyphRendererView){var n=t.hit_test(e);if(null!=n){i=!n.is_empty();var r=this.get_or_create_inspector(t.model);r.update(n,!0,!1),this.source.setv({inspected:r},{silent:!0}),this.source.inspect.emit([t,{geometry:e}])}}else if(t instanceof a.GraphRendererView){var n=t.model.inspection_policy.hit_test(e,t);i=i||t.model.inspection_policy.do_inspection(n,e,t,!1,!1)}return i},e.prototype.clear=function(t){this.source.selected.clear(),null!=t&&this.get_or_create_inspector(t.model).clear()},e.prototype.get_or_create_inspector=function(t){return null==this.inspectors[t.id]&&(this.inspectors[t.id]=new o.Selection),this.inspectors[t.id]},e}(r.HasProps);i.SelectionManager=h,h.initClass()},function(t,e,i){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}();i.Settings=n,i.settings=new n},function(t,e,i){function n(t,e,i,n){return l.find(t,function(t){return t.signal===e&&t.slot===i&&t.context===n})}function r(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()}var s=t(380),a=t(25),l=t(21),h=function(){function t(t,e){this.sender=t,this.name=e}return t.prototype.connect=function(t,e){void 0===e&&(e=null),u.has(this.sender)||u.set(this.sender,[]);var i=u.get(this.sender);if(null!=n(i,this,t,e))return!1;var r=e||t;_.has(r)||_.set(r,[]);var o=_.get(r),s={signal:this,slot:t,context:e};return i.push(s),o.push(s),!0},t.prototype.disconnect=function(t,e){void 0===e&&(e=null);var i=u.get(this.sender);if(null==i||0===i.length)return!1;var o=n(i,this,t,e);if(null==o)return!1;var s=e||t,a=_.get(s);return o.signal=null,r(i),r(a),!0},t.prototype.emit=function(t){for(var e=u.get(this.sender)||[],i=0,n=e;i0;var p=function(){function t(t,e,i,n){this.plot_view=t,this.toolbar=e,this.hit_area=i,this.plot=n,this.pan_start=new o.Signal(this,\"pan:start\"),this.pan=new o.Signal(this,\"pan\"),this.pan_end=new o.Signal(this,\"pan:end\"),this.pinch_start=new o.Signal(this,\"pinch:start\"),this.pinch=new o.Signal(this,\"pinch\"),this.pinch_end=new o.Signal(this,\"pinch:end\"),this.rotate_start=new o.Signal(this,\"rotate:start\"),this.rotate=new o.Signal(this,\"rotate\"),this.rotate_end=new o.Signal(this,\"rotate:end\"),this.tap=new o.Signal(this,\"tap\"),this.doubletap=new o.Signal(this,\"doubletap\"),this.press=new o.Signal(this,\"press\"),this.move_enter=new o.Signal(this,\"move:enter\"),this.move=new o.Signal(this,\"move\"),this.move_exit=new o.Signal(this,\"move:exit\"),this.scroll=new o.Signal(this,\"scroll\"),this.keydown=new o.Signal(this,\"keydown\"),this.keyup=new o.Signal(this,\"keyup\"),this.hammer=new r(this.hit_area),this._configure_hammerjs()}return t.prototype._configure_hammerjs=function(){var t=this;this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",function(e){return t._doubletap(e)}),this.hammer.on(\"tap\",function(e){return t._tap(e)}),this.hammer.on(\"press\",function(e){return t._press(e)}),this.hammer.get(\"pan\").set({direction:r.DIRECTION_ALL}),this.hammer.on(\"panstart\",function(e){return t._pan_start(e)}),this.hammer.on(\"pan\",function(e){return t._pan(e)}),this.hammer.on(\"panend\",function(e){return t._pan_end(e)}),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",function(e){return t._pinch_start(e)}),this.hammer.on(\"pinch\",function(e){return t._pinch(e)}),this.hammer.on(\"pinchend\",function(e){return t._pinch_end(e)}),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",function(e){return t._rotate_start(e)}),this.hammer.on(\"rotate\",function(e){return t._rotate(e)}),this.hammer.on(\"rotateend\",function(e){return t._rotate_end(e)}),this.hit_area.addEventListener(\"mousemove\",function(e){return t._mouse_move(e)}),this.hit_area.addEventListener(\"mouseenter\",function(e){return t._mouse_enter(e)}),this.hit_area.addEventListener(\"mouseleave\",function(e){return t._mouse_exit(e)}),this.hit_area.addEventListener(\"wheel\",function(e){return t._mouse_wheel(e)}),document.addEventListener(\"keydown\",function(e){return t._key_down(e)}),document.addEventListener(\"keyup\",function(e){return t._key_up(e)})},t.prototype.register_tool=function(t){var e=this,i=t.model.event_type;null!=i&&(u.isString(i)?this._register_tool(t,i):i.forEach(function(i,n){return e._register_tool(t,i,n<1)}))},t.prototype._register_tool=function(t,e,n){void 0===n&&(n=!0);var r=t,o=r.model.id,a=function(t){return function(e){e.id==o&&t(e.e)}},l=function(t){return function(e){t(e.e)}};switch(e){case\"pan\":null!=r._pan_start&&r.connect(this.pan_start,a(r._pan_start.bind(r))),null!=r._pan&&r.connect(this.pan,a(r._pan.bind(r))),null!=r._pan_end&&r.connect(this.pan_end,a(r._pan_end.bind(r)));break;case\"pinch\":null!=r._pinch_start&&r.connect(this.pinch_start,a(r._pinch_start.bind(r))),null!=r._pinch&&r.connect(this.pinch,a(r._pinch.bind(r))),null!=r._pinch_end&&r.connect(this.pinch_end,a(r._pinch_end.bind(r)));break;case\"rotate\":null!=r._rotate_start&&r.connect(this.rotate_start,a(r._rotate_start.bind(r))),null!=r._rotate&&r.connect(this.rotate,a(r._rotate.bind(r))),null!=r._rotate_end&&r.connect(this.rotate_end,a(r._rotate_end.bind(r)));break;case\"move\":null!=r._move_enter&&r.connect(this.move_enter,a(r._move_enter.bind(r))),null!=r._move&&r.connect(this.move,a(r._move.bind(r))),null!=r._move_exit&&r.connect(this.move_exit,a(r._move_exit.bind(r)));break;case\"tap\":null!=r._tap&&r.connect(this.tap,a(r._tap.bind(r)));break;case\"press\":null!=r._press&&r.connect(this.press,a(r._press.bind(r)));break;case\"scroll\":null!=r._scroll&&r.connect(this.scroll,a(r._scroll.bind(r)));break;default:throw new Error(\"unsupported event_type: \"+e)}n&&(null!=r._doubletap&&r.connect(this.doubletap,l(r._doubletap.bind(r))),null!=r._keydown&&r.connect(this.keydown,l(r._keydown.bind(r))),null!=r._keyup&&r.connect(this.keyup,l(r._keyup.bind(r))),i.is_mobile&&null!=r._scroll&&\"pinch\"==e&&(s.logger.debug(\"Registering scroll on touch screen\"),r.connect(this.scroll,a(r._scroll.bind(r)))))},t.prototype._hit_test_renderers=function(t,e){for(var i=this.plot_view.get_renderer_views(),n=0,r=h.reversed(i);n0,\"'step' must be a positive number\"),null==e&&(e=t,t=0);for(var n=Math.max,r=Math.ceil,o=Math.abs,s=t<=e?i:-i,a=n(r(o(e-t)/i),0),l=Array(a),c=0;c0?0:n-1;r>=0&&r=0?e:t.length+e]},i.zip=function(t,e){for(var i=Math.min(t.length,e.length),n=new Array(i),r=0;rn||void 0===i)return 1;if(io&&(e=o),null==i||i>o-e?i=o-e:i<0&&(i=0);for(var s=o-i+n.length,a=new t.constructor(s),l=0;li&&(i=e);return i},i.maxBy=function(t,e){if(0==t.length)throw new Error(\"maxBy() called with an empty array\");for(var i=t[0],n=e(i),r=1,o=t.length;rn&&(i=s,n=a)}return i},i.sum=function(t){for(var e=0,i=0,n=t.length;i=0&&c>=0))throw new Error(\"invalid bbox {x: \"+a+\", y: \"+l+\", width: \"+h+\", height: \"+c+\"}\");this.x0=a,this.y0=l,this.x1=a+h,this.y1=l+c}}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,\"left\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"top\",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"right\",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"bottom\",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"p0\",{get:function(){return[this.x0,this.y0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"p1\",{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.y0},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}),Object.defineProperty(t.prototype,\"rect\",{get:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"h_range\",{get:function(){return{start:this.x0,end:this.x1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"v_range\",{get:function(){return{start:this.y0,end:this.y1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"ranges\",{get:function(){return[this.h_range,this.v_range]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"aspect\",{get:function(){return this.width/this.height},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.clip=function(t,e){return tthis.x1&&(t=this.x1),ethis.y1&&(e=this.y1),[t,e]},t.prototype.union=function(e){return new t({x0:n(this.x0,e.x0),y0:n(this.y0,e.y0),x1:r(this.x1,e.x1),y1:r(this.y1,e.y1)})},t}();i.BBox=o},function(t,e,i){i.delay=function(t,e){return setTimeout(t,e)};var n=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;i.defer=function(t){return n(t)},i.throttle=function(t,e,i){void 0===i&&(i={});var n,r,o,s=null,a=0,l=function(){a=!1===i.leading?0:Date.now(),s=null,o=t.apply(n,r),s||(n=r=null)};return function(){var h=Date.now();a||!1!==i.leading||(a=h);var c=e-(h-a);return n=this,r=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=h,o=t.apply(n,r),s||(n=r=null)):s||!1===i.trailing||(s=setTimeout(l,c)),o}},i.once=function(t){var e,i=!1;return function(){return i||(i=!0,e=t()),e}}},function(t,e,i){i.fixup_ctx=function(t){(function(t){t.setLineDash||(t.setLineDash=function(e){t.mozDash=e,t.webkitLineDash=e});t.getLineDash||(t.getLineDash=function(){return t.mozDash})})(t),function(t){t.setLineDashOffset=function(e){t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}}(t),function(t){t.setImageSmoothingEnabled=function(e){t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e=t.imageSmoothingEnabled;return null==e||e}}(t),function(t){t.measureText&&null==t.html5MeasureText&&(t.html5MeasureText=t.measureText,t.measureText=function(e){var i=t.html5MeasureText(e);return i.ascent=1.6*t.html5MeasureText(\"m\").width,i})}(t),function(t){t.ellipse||(t.ellipse=function(e,i,n,r,o,s,a,l){void 0===l&&(l=!1);t.translate(e,i),t.rotate(o);var h=n,c=r;l&&(h=-n,c=-r);t.moveTo(-h,0),t.bezierCurveTo(-h,.551784*c,.551784*-h,c,0,c),t.bezierCurveTo(.551784*h,c,h,.551784*c,h,0),t.bezierCurveTo(h,.551784*-c,.551784*h,-c,0,-c),t.bezierCurveTo(.551784*-h,-c,-h,.551784*-c,-h,0),t.rotate(-o),t.translate(-e,-i)})}(t)},i.get_scale_ratio=function(t,e,i){if(\"svg\"==i)return 1;if(e){var n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}return 1}},function(t,e,i){function n(t){var e=Number(t).toString(16);return 1==e.length?\"0\"+e:e}function r(t){if(0==(t+=\"\").indexOf(\"#\"))return t;if(o.is_svg_color(t))return o.svg_colors[t];if(0==t.indexOf(\"rgb\")){var e=t.replace(/^rgba?\\(|\\s+|\\)$/g,\"\").split(\",\"),i=e.slice(0,3).map(n).join(\"\");return 4==e.length&&(i+=n(Math.floor(255*parseFloat(e[3])))),\"#\"+i.slice(0,8)}return t}var o=t(39),s=t(21);i.color2hex=r,i.color2rgba=function(t,e){void 0===e&&(e=1);if(!t)return[0,0,0,0];var i=r(t);(i=i.replace(/ |#/g,\"\")).length<=4&&(i=i.replace(/(.)/g,\"$1$1\"));var n=i.match(/../g).map(function(t){return parseInt(t,16)/255});for(;n.length<3;)n.push(0);n.length<4&&n.push(e);return n.slice(0,4)},i.valid_rgb=function(t){var e;switch(t.substring(0,4)){case\"rgba\":e={start:\"rgba(\",len:4,alpha:!0};break;case\"rgb(\":e={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);var i=t.replace(e.start,\"\").replace(\")\",\"\").split(\",\").map(parseFloat);if(i.length!=e.len)throw new Error(\"color expects rgba \"+e.len+\"-tuple, received \"+t);if(e.alpha&&!(0<=i[3]&&i[3]<=1))throw new Error(\"color expects rgba 4-tuple to have alpha value between 0 and 1\");if(s.includes(i.slice(0,3).map(function(t){return 0<=t&&t<=255}),!1))throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}},function(t,e,i){i.is_ie=navigator.userAgent.indexOf(\"MSIE\")>=0||navigator.userAgent.indexOf(\"Trident\")>0||navigator.userAgent.indexOf(\"Edge\")>0,i.is_little_endian=function(){var t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t);i[1]=168496141;var n=!0;return 10==e[4]&&11==e[5]&&12==e[6]&&13==e[7]&&(n=!1),n}()},function(t,e,i){var n=t(21),r=t(30),o=t(44),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 i=this._existing(t);null==i?this._dict[t]=e:o.isArray(i)?i.push(e):this._dict[t]=[i,e]},t.prototype.remove_value=function(t,e){var i=this._existing(t);if(o.isArray(i)){var s=n.difference(i,[e]);s.length>0?this._dict[t]=s:delete this._dict[t]}else r.isEqual(i,e)&&delete this._dict[t]},t.prototype.get_one=function(t,e){var i=this._existing(t);if(o.isArray(i)){if(1===i.length)return i[0];throw new Error(e)}return i},t}();i.MultiDict=s;var a=function(){function t(e){this.values=null==e?[]:e instanceof t?n.copy(e.values):this._compact(e)}return t.prototype._compact=function(t){for(var e=[],i=0,n=t;i2*Math.PI;)t-=2*Math.PI;return t}function r(t,e){return Math.abs(n(t-e))}function o(){return Math.random()}i.angle_norm=n,i.angle_dist=r,i.angle_between=function(t,e,i,o){var s=n(t),a=r(e,i),l=r(e,s)<=a&&r(s,i)<=a;return\"anticlock\"==o?l:!l},i.random=o,i.randomIn=function(t,e){null==e&&(e=t,t=0);return t+Math.floor(Math.random()*(e-t+1))},i.atan2=function(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])},i.rnorm=function(t,e){var i,n;for(;i=o(),n=o(),n=(2*n-1)*Math.sqrt(1/Math.E*2),!(-4*i*i*Math.log(i)>=n*n););var r=n/i;return r=t+e*r},i.clamp=function(t,e,i){return t>i?i:th[e][0]&&t0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]}},function(t,e,i){function n(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,2*t.length),i=0,n=e.length;i0){this.index=new n(t.length);for(var e=0,i=t;e\"'`])/g,function(t){switch(t){case\"&\":return\"&\";case\"<\":return\"<\";case\">\":return\">\";case'\"':return\""\";case\"'\":return\"'\";case\"`\":return\"`\";default:return t}})},i.unescape=function(t){return t.replace(/&(amp|lt|gt|quot|#x27|#x60);/g,function(t,e){switch(e){case\"amp\":return\"&\";case\"lt\":return\"<\";case\"gt\":return\">\";case\"quot\":return'\"';case\"#x27\":return\"'\";case\"#x60\":return\"`\";default:return e}})},i.use_strict=function(t){return\"'use strict';\\n\"+t}},function(t,e,i){i.svg_colors={indianred:\"#CD5C5C\",lightcoral:\"#F08080\",salmon:\"#FA8072\",darksalmon:\"#E9967A\",lightsalmon:\"#FFA07A\",crimson:\"#DC143C\",red:\"#FF0000\",firebrick:\"#B22222\",darkred:\"#8B0000\",pink:\"#FFC0CB\",lightpink:\"#FFB6C1\",hotpink:\"#FF69B4\",deeppink:\"#FF1493\",mediumvioletred:\"#C71585\",palevioletred:\"#DB7093\",coral:\"#FF7F50\",tomato:\"#FF6347\",orangered:\"#FF4500\",darkorange:\"#FF8C00\",orange:\"#FFA500\",gold:\"#FFD700\",yellow:\"#FFFF00\",lightyellow:\"#FFFFE0\",lemonchiffon:\"#FFFACD\",lightgoldenrodyellow:\"#FAFAD2\",papayawhip:\"#FFEFD5\",moccasin:\"#FFE4B5\",peachpuff:\"#FFDAB9\",palegoldenrod:\"#EEE8AA\",khaki:\"#F0E68C\",darkkhaki:\"#BDB76B\",lavender:\"#E6E6FA\",thistle:\"#D8BFD8\",plum:\"#DDA0DD\",violet:\"#EE82EE\",orchid:\"#DA70D6\",fuchsia:\"#FF00FF\",magenta:\"#FF00FF\",mediumorchid:\"#BA55D3\",mediumpurple:\"#9370DB\",blueviolet:\"#8A2BE2\",darkviolet:\"#9400D3\",darkorchid:\"#9932CC\",darkmagenta:\"#8B008B\",purple:\"#800080\",indigo:\"#4B0082\",slateblue:\"#6A5ACD\",darkslateblue:\"#483D8B\",mediumslateblue:\"#7B68EE\",greenyellow:\"#ADFF2F\",chartreuse:\"#7FFF00\",lawngreen:\"#7CFC00\",lime:\"#00FF00\",limegreen:\"#32CD32\",palegreen:\"#98FB98\",lightgreen:\"#90EE90\",mediumspringgreen:\"#00FA9A\",springgreen:\"#00FF7F\",mediumseagreen:\"#3CB371\",seagreen:\"#2E8B57\",forestgreen:\"#228B22\",green:\"#008000\",darkgreen:\"#006400\",yellowgreen:\"#9ACD32\",olivedrab:\"#6B8E23\",olive:\"#808000\",darkolivegreen:\"#556B2F\",mediumaquamarine:\"#66CDAA\",darkseagreen:\"#8FBC8F\",lightseagreen:\"#20B2AA\",darkcyan:\"#008B8B\",teal:\"#008080\",aqua:\"#00FFFF\",cyan:\"#00FFFF\",lightcyan:\"#E0FFFF\",paleturquoise:\"#AFEEEE\",aquamarine:\"#7FFFD4\",turquoise:\"#40E0D0\",mediumturquoise:\"#48D1CC\",darkturquoise:\"#00CED1\",cadetblue:\"#5F9EA0\",steelblue:\"#4682B4\",lightsteelblue:\"#B0C4DE\",powderblue:\"#B0E0E6\",lightblue:\"#ADD8E6\",skyblue:\"#87CEEB\",lightskyblue:\"#87CEFA\",deepskyblue:\"#00BFFF\",dodgerblue:\"#1E90FF\",cornflowerblue:\"#6495ED\",royalblue:\"#4169E1\",blue:\"#0000FF\",mediumblue:\"#0000CD\",darkblue:\"#00008B\",navy:\"#000080\",midnightblue:\"#191970\",cornsilk:\"#FFF8DC\",blanchedalmond:\"#FFEBCD\",bisque:\"#FFE4C4\",navajowhite:\"#FFDEAD\",wheat:\"#F5DEB3\",burlywood:\"#DEB887\",tan:\"#D2B48C\",rosybrown:\"#BC8F8F\",sandybrown:\"#F4A460\",goldenrod:\"#DAA520\",darkgoldenrod:\"#B8860B\",peru:\"#CD853F\",chocolate:\"#D2691E\",saddlebrown:\"#8B4513\",sienna:\"#A0522D\",brown:\"#A52A2A\",maroon:\"#800000\",white:\"#FFFFFF\",snow:\"#FFFAFA\",honeydew:\"#F0FFF0\",mintcream:\"#F5FFFA\",azure:\"#F0FFFF\",aliceblue:\"#F0F8FF\",ghostwhite:\"#F8F8FF\",whitesmoke:\"#F5F5F5\",seashell:\"#FFF5EE\",beige:\"#F5F5DC\",oldlace:\"#FDF5E6\",floralwhite:\"#FFFAF0\",ivory:\"#FFFFF0\",antiquewhite:\"#FAEBD7\",linen:\"#FAF0E6\",lavenderblush:\"#FFF0F5\",mistyrose:\"#FFE4E1\",gainsboro:\"#DCDCDC\",lightgray:\"#D3D3D3\",lightgrey:\"#D3D3D3\",silver:\"#C0C0C0\",darkgray:\"#A9A9A9\",darkgrey:\"#A9A9A9\",gray:\"#808080\",grey:\"#808080\",dimgray:\"#696969\",dimgrey:\"#696969\",lightslategray:\"#778899\",lightslategrey:\"#778899\",slategray:\"#708090\",slategrey:\"#708090\",darkslategray:\"#2F4F4F\",darkslategrey:\"#2F4F4F\",black:\"#000000\"},i.is_svg_color=function(t){return t in i.svg_colors}},function(t,e,i){function n(t,e,i){if(c.isNumber(t)){var n=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\"}}();return s.sprintf(n,t)}return\"\"+t}function r(t,e,r,o){if(null==r)return n;if(null!=o&&(t in o||e in o)){var s=e in o?e:t,a=o[s];if(c.isString(a)){if(a in i.DEFAULT_FORMATTERS)return i.DEFAULT_FORMATTERS[a];throw new Error(\"Unknown tooltip field formatter type '\"+a+\"'\")}return function(t,e,i){return a.format(t,e,i)}}return i.DEFAULT_FORMATTERS.numeral}function o(t,e,i,n){if(\"$\"==t[0]){if(t.substring(1)in n)return n[t.substring(1)];throw new Error(\"Unknown special variable '\"+t+\"'\")}var r=e.get_column(t);if(null==r)return null;if(c.isNumber(i))return r[i];var o=r[i.index];if(c.isTypedArray(o)||c.isArray(o)){if(c.isArray(o[0])){var s=o[i.dim2];return s[i.dim1]}return o[i.flat_index]}return o}var s=t(378),a=t(350),l=t(379),h=t(38),c=t(44);i.DEFAULT_FORMATTERS={numeral:function(t,e,i){return a.format(t,e)},datetime:function(t,e,i){return l(t,e)},printf:function(t,e,i){return s.sprintf(e,t)}},i.basic_formatter=n,i.get_formatter=r,i.get_value=o,i.replace_placeholders=function(t,e,i,n,s){void 0===s&&(s={});var a=t.replace(/(?:^|[^@])([@|\\$](?:\\w+|{[^{}]+}))(?:{[^{}]+})?/g,function(t,e,i){return\"\"+e});return t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t,e,i){return e+\"@$\"+i}),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t,l,c,u,_){var p=o(c=null!=u?u:c,e,i,s);if(null==p)return\"\"+l+h.escape(\"???\");if(\"safe\"==_)return\"\"+l+p;var d=r(c,a,_,n);return\"\"+l+h.escape(d(p,_,s))})}},function(t,e,i){var n=t(5),r={};i.get_text_height=function(t){if(null!=r[t])return r[t];var e=n.span({style:{font:t}},\"Hg\"),i=n.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),o=n.div({},e,i);document.body.appendChild(o);try{i.style.verticalAlign=\"baseline\";var s=n.offset(i).top-n.offset(e).top;i.style.verticalAlign=\"bottom\";var a=n.offset(i).top-n.offset(e).top,l={height:a,ascent:s,descent:a-s};return r[t]=l,l}finally{document.body.removeChild(o)}}},function(t,e,i){var n=(\"undefined\"!=typeof window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.msRequestAnimationFrame:void 0)||function(t){return t(Date.now()),-1};i.throttle=function(t,e){var i=null,r=0,o=!1,s=function(){r=Date.now(),i=null,o=!1,t()};return function(){var t=Date.now(),a=e-(t-r);a<=0&&!o?(null!=i&&clearTimeout(i),o=!0,n(s)):i||o||(i=setTimeout(function(){return n(s)},a))}}},function(t,e,i){i.concat=function(t){for(var e=[],i=1;i0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}},t.prototype.interactive_start=function(t){null==this._interactive_plot&&(this._interactive_plot=t,this._interactive_plot.trigger_event(new a.LODStart({}))),this._interactive_timestamp=Date.now()},t.prototype.interactive_stop=function(t){null!=this._interactive_plot&&this._interactive_plot.id===t.id&&this._interactive_plot.trigger_event(new a.LODEnd({})),this._interactive_plot=null,this._interactive_timestamp=null},t.prototype.interactive_duration=function(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp},t.prototype.destructively_move=function(t){if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");t.clear();var e=p.copy(this._roots);this.clear();for(var i=0,n=e;i=0&&this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){for(var e=0,i=this._callbacks;e0||p.difference(f,a).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");var g={},y=[];for(var b in i._all_models)if(b in o){var x=t._events_to_sync_objects(o[b],u[b],i,g);y=y.concat(x)}return{references:t._references_json(d.values(g),!1),events:y}},t.prototype.to_json_string=function(t){return void 0===t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){void 0===e&&(e=!0);var i=this._roots.map(function(t){return t.id}),n=d.values(this._all_models);return{title:this._title,roots:{root_ids:i,references:t._references_json(n,e)}}},t.from_json_string=function(e){var i=JSON.parse(e);return t.from_json(i)},t.from_json=function(e){s.logger.debug(\"Creating Document from JSON\");var i=e.version,n=-1!==i.indexOf(\"+\")||-1!==i.indexOf(\"-\"),r=\"Library versions: JS (\"+o.version+\") / Python (\"+i+\")\";n||o.version===i?s.logger.debug(r):(s.logger.warn(\"JS/Python version mismatch\"),s.logger.warn(r));var a=e.roots,l=a.root_ids,h=a.references,c=t._instantiate_references_json(h,{});t._initialize_references_json(h,{},c);for(var u=new t,_=0,p=l;_0?t.consume(e.buffers[0].buffer):t.consume(e.content.data);var i=t.message;null!=i&&this.apply_json_patch(i.content,i.buffers)}function r(t,e){if(\"undefined\"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){d.logger.info(\"Registering Jupyter comms for target \"+t);var r=Jupyter.notebook.kernel.comm_manager;try{r.register_target(t,function(i){d.logger.info(\"Registering Jupyter comms for target \"+t);var r=new x.Receiver;i.on_msg(n.bind(e,r))})}catch(t){d.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+t+\")\")}}else if(e.roots()[0].id in i.kernels){d.logger.info(\"Registering JupyterLab comms for target \"+t);var o=i.kernels[e.roots()[0].id];try{o.registerCommTarget(t,function(i){d.logger.info(\"Registering JupyterLab comms for target \"+t);var r=new x.Receiver;i.onMsg=n.bind(e,r)})}catch(t){d.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+t+\")\")}}else console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest jupyterlab_bokeh extension is installed. In an exported notebook this warning is expected.\")}function o(t){var e=new t.default_view({model:t,parent:null});return p.index[t.id]=e,e}function s(t){var e=t.elementid,n=document.getElementById(e);if(null==n)throw new Error(\"Error rendering Bokeh model: could not find tag with id: \"+e);if(!document.body.contains(n))throw new Error(\"Error rendering Bokeh model: element with id '\"+e+\"' must be under \");if(\"SCRIPT\"==n.tagName){!function(t,e){var i=t.dataset,n=i.bokehLogLevel,r=i.bokehDocId,o=i.bokehModelId,s=i.bokehSessionId;null!=n&&n.length>0&&d.set_log_level(n);null!=r&&r.length>0&&(e.docid=r);null!=o&&o.length>0&&(e.modelid=o);null!=s&&s.length>0&&(e.sessionid=s);d.logger.info(\"Will inject Bokeh script tag with params \"+JSON.stringify(e))}(n,t);var r=v.div({class:i.BOKEH_ROOT});v.replaceWith(n,r);var o=v.div();r.appendChild(o),n=o}return n}function a(t,e,i){var n=i.get_model_by_id(t);if(null==n)throw new Error(\"Model \"+t+\" was not in document \"+i);var r=o(n);return r.renderTo(e,!0),r}function l(t,e,i){function n(t){var i=o(t);i.renderTo(e),r[t.id]=i}void 0===i&&(i=!1);for(var r={},s=0,a=t.roots();s=0;e--)t.lineTo(this._upper_sx[e],this._upper_sy[e]);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]);for(var e=0,i=this._lower_sx.length;el||(_[r].push(c[f]),_[o].push(0));for(var f=0,v=u.length;fl||(p[r].push(u[f]),p[o].push(0));var m={major:this._format_major_labels(_[r],c)},g={major:[[],[]],minor:[[],[]]};return g.major[r]=i.v_compute(_[r]),g.minor[r]=i.v_compute(p[r]),g.major[o]=_[o],g.minor[o]=p[o],\"vertical\"==this.orientation&&(g.major[r]=d.map(g.major[r],function(e){return t-e}),g.minor[r]=d.map(g.minor[r],function(e){return t-e})),{coords:g,labels:m}},e}(r.Annotation);i.ColorBar=g,g.initClass()},function(t,e,i){var n=t(54);i.Annotation=n.Annotation;var r=t(55);i.Arrow=r.Arrow;var o=t(56);i.ArrowHead=o.ArrowHead;var s=t(56);i.OpenHead=s.OpenHead;var a=t(56);i.NormalHead=a.NormalHead;var l=t(56);i.TeeHead=l.TeeHead;var h=t(56);i.VeeHead=h.VeeHead;var c=t(57);i.Band=c.Band;var u=t(58);i.BoxAnnotation=u.BoxAnnotation;var _=t(59);i.ColorBar=_.ColorBar;var p=t(61);i.Label=p.Label;var d=t(62);i.LabelSet=d.LabelSet;var f=t(63);i.Legend=f.Legend;var v=t(64);i.LegendItem=v.LegendItem;var m=t(65);i.PolyAnnotation=m.PolyAnnotation;var g=t(66);i.Span=g.Span;var y=t(67);i.TextAnnotation=y.TextAnnotation;var b=t(68);i.Title=b.Title;var x=t(69);i.ToolbarPanel=x.ToolbarPanel;var w=t(70);i.Tooltip=w.Tooltip;var k=t(71);i.Whisker=k.Whisker},function(t,e,i){var n=t(380),r=t(67),o=t(5),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.visuals.warm_cache()},e.prototype._get_size=function(){var t=this.plot_view.canvas_view.ctx;if(this.visuals.text.set_value(t),this.model.panel.is_horizontal){var e=t.measureText(this.model.text).ascent;return e}var i=t.measureText(this.model.text).width;return i},e.prototype.render=function(){if(this.model.visible||\"css\"!=this.model.render_mode||o.hide(this.el),this.model.visible){var t;switch(this.model.angle_units){case\"rad\":t=-this.model.angle;break;case\"deg\":t=-this.model.angle*Math.PI/180;break;default:throw new Error(\"unreachable code\")}var e=null!=this.model.panel?this.model.panel:this.plot_view.frame,i=this.plot_view.frame.xscales[this.model.x_range_name],n=this.plot_view.frame.yscales[this.model.y_range_name],r=\"data\"==this.model.x_units?i.compute(this.model.x):e.xview.compute(this.model.x),s=\"data\"==this.model.y_units?n.compute(this.model.y):e.yview.compute(this.model.y);r+=this.model.x_offset,s-=this.model.y_offset;var a=\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this);a(this.plot_view.canvas_view.ctx,this.model.text,r,s,t)}},e}(r.TextAnnotationView);i.LabelView=a;var l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Label\",this.prototype.default_view=a,this.mixins([\"text\",\"line:border_\",\"fill:background_\"]),this.define({x:[s.Number],x_units:[s.SpatialUnits,\"data\"],y:[s.Number],y_units:[s.SpatialUnits,\"data\"],text:[s.String],angle:[s.Angle,0],angle_units:[s.AngleUnits,\"rad\"],x_offset:[s.Number,0],y_offset:[s.Number,0],x_range_name:[s.String,\"default\"],y_range_name:[s.String,\"default\"]}),this.override({background_fill_color:null,border_line_color:null})},e}(r.TextAnnotation);i.Label=l,l.initClass()},function(t,e,i){var n=t(380),r=t(67),o=t(184),s=t(5),a=t(15),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){if(t.prototype.initialize.call(this,e),this.set_data(this.model.source),\"css\"==this.model.render_mode)for(var i=0,n=this._text.length;i0?(this.el.style.top=v+\"px\",this.el.style.left=f+\"px\"):s.hide(this.el)}},e}(o.AnnotationView);i.TooltipView=l;var h=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.initClass=function(){this.prototype.type=\"Tooltip\",this.prototype.default_view=l,this.define({attachment:[a.String,\"horizontal\"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),this.override({level:\"overlay\"}),this.internal({data:[a.Any,[]],custom:[a.Any]})},e.prototype.clear=function(){this.data=[]},e.prototype.add=function(t,e,i){this.data=this.data.concat([[t,e,i]])},e}(o.Annotation);i.Tooltip=h,h.initClass()},function(t,e,i){var n=t(380),r=t(54),o=t(184),s=t(56),a=t(15),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.set_data(this.model.source)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.patching,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.change,function(){return e.set_data(e.model.source)})},e.prototype.set_data=function(e){t.prototype.set_data.call(this,e),this.visuals.warm_cache(e),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e=this.plot_model.frame,i=this.model.dimension,n=e.xscales[this.model.x_range_name],r=e.yscales[this.model.y_range_name],o=\"height\"==i?r:n,s=\"height\"==i?n:r,a=\"height\"==i?e.yview:e.xview,l=\"height\"==i?e.xview:e.yview;t=\"data\"==this.model.lower.units?o.v_compute(this._lower):a.v_compute(this._lower);var h;h=\"data\"==this.model.upper.units?o.v_compute(this._upper):a.v_compute(this._upper);var c;c=\"data\"==this.model.base.units?s.v_compute(this._base):l.v_compute(this._base);var u=\"height\"==i?[1,0]:[0,1],_=u[0],p=u[1],d=[t,c],f=[h,c];this._lower_sx=d[_],this._lower_sy=d[p],this._upper_sx=f[_],this._upper_sy=f[p]},e.prototype.render=function(){if(this.model.visible){this._map_data();var t=this.plot_view.canvas_view.ctx;if(this.visuals.line.doit)for(var e=0,i=this._lower_sx.length;eu&&(u=f)}return u>0&&(u+=n),u},e}(r.GuideRendererView);i.AxisView=p;var d=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Axis\",this.prototype.default_view=p,this.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),this.define({bounds:[o.Any,\"auto\"],ticker:[o.Instance,null],formatter:[o.Instance,null],x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"],axis_label:[o.String,\"\"],axis_label_standoff:[o.Int,5],major_label_standoff:[o.Int,5],major_label_orientation:[o.Any,\"horizontal\"],major_label_overrides:[o.Any,{}],major_tick_in:[o.Number,2],major_tick_out:[o.Number,6],minor_tick_in:[o.Number,0],minor_tick_out:[o.Number,4],fixed_location:[o.Any,null]}),this.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.prototype.add_panel=function(t){this.panel=new s.SidePanel({side:t}),this.panel.attach_document(this.document)},Object.defineProperty(e.prototype,\"normals\",{get:function(){return this.panel.normals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"dimension\",{get:function(){return this.panel.dimension},enumerable:!0,configurable:!0}),e.prototype.compute_labels=function(t){for(var e=this.formatter.doFormat(t,this),i=0;ic(a-h)?(n=_(u(o,s),a),r=u(_(o,s),h)):(n=u(o,s),r=_(o,s)),[n,r]}throw new Error(\"user bounds '\"+e+\"' not understood\")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rule_coords\",{get:function(){var t=this.dimension,e=(t+1)%2,i=this.ranges[0],n=this.computed_bounds,r=n[0],o=n[1],s=new Array(2),a=new Array(2),l=[s,a];return l[t][0]=Math.max(r,i.min),l[t][1]=Math.min(o,i.max),l[t][0]>l[t][1]&&(l[t][0]=l[t][1]=NaN),l[e][0]=this.loc,l[e][1]=this.loc,l},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"tick_coords\",{get:function(){for(var t=this.dimension,e=(t+1)%2,i=this.ranges[0],n=this.computed_bounds,r=n[0],o=n[1],s=this.ticker.get_ticks(r,o,i,this.loc,{}),a=s.major,l=s.minor,h=[[],[]],c=[[],[]],u=[i.min,i.max],_=u[0],p=u[1],d=0;dp||(h[t].push(a[d]),h[e].push(this.loc));for(var d=0;dp||(c[t].push(l[d]),c[e].push(this.loc));return{major:h,minor:c}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"loc\",{get:function(){if(null!=this.fixed_location){if(l.isNumber(this.fixed_location))return this.fixed_location;var t=this.ranges,e=t[1];if(e instanceof h.FactorRange)return e.synthetic(this.fixed_location);throw new Error(\"unexpected\")}var i=this.ranges,n=i[1];switch(this.panel.side){case\"left\":case\"below\":return n.start;case\"right\":case\"above\":return n.end}},enumerable:!0,configurable:!0}),e}(r.GuideRenderer);i.Axis=d,d.initClass()},function(t,e,i){var n=t(380),r=t(72),o=t(192),s=t(97),a=t(15),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){this._draw_group_separators(t,e,i)},e.prototype._draw_group_separators=function(t,e,i){var n=this.model.ranges[0],r=this.model.computed_bounds,o=r[0],s=r[1];if(n.tops&&!(n.tops.length<2)&&this.visuals.separator_line.doit){for(var a=this.model.dimension,l=(a+1)%2,h=[[],[]],c=0,u=0;uo&&f1&&(l.tops[e]=a.tops),l.tops[i]=a.tops.map(function(e){return t.loc}),l},enumerable:!0,configurable:!0}),e}(r.Axis);i.CategoricalAxis=h,h.initClass()},function(t,e,i){var n=t(380),r=t(72),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"ContinuousAxis\"},e}(r.Axis);i.ContinuousAxis=o,o.initClass()},function(t,e,i){var n=t(380),r=t(77),o=t(98),s=t(195),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.LinearAxisView);i.DatetimeAxisView=a;var l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"DatetimeAxis\",this.prototype.default_view=a,this.override({ticker:function(){return new s.DatetimeTicker},formatter:function(){return new o.DatetimeTickFormatter}})},e}(r.LinearAxis);i.DatetimeAxis=l,l.initClass()},function(t,e,i){var n=t(72);i.Axis=n.Axis;var r=t(73);i.CategoricalAxis=r.CategoricalAxis;var o=t(74);i.ContinuousAxis=o.ContinuousAxis;var s=t(75);i.DatetimeAxis=s.DatetimeAxis;var a=t(77);i.LinearAxis=a.LinearAxis;var l=t(78);i.LogAxis=l.LogAxis;var h=t(79);i.MercatorAxis=h.MercatorAxis},function(t,e,i){var n=t(380),r=t(72),o=t(74),s=t(96),a=t(191),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.LinearAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"LinearAxis\",this.prototype.default_view=l,this.override({ticker:function(){return new a.BasicTicker},formatter:function(){return new s.BasicTickFormatter}})},e}(o.ContinuousAxis);i.LinearAxis=h,h.initClass()},function(t,e,i){var n=t(380),r=t(72),o=t(74),s=t(101),a=t(199),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.LogAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"LogAxis\",this.prototype.default_view=l,this.override({ticker:function(){return new a.LogTicker},formatter:function(){return new s.LogTickFormatter}})},e}(o.ContinuousAxis);i.LogAxis=h,h.initClass()},function(t,e,i){var n=t(380),r=t(72),o=t(77),s=t(102),a=t(200),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.AxisView);i.MercatorAxisView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"MercatorAxis\",this.prototype.default_view=l,this.override({ticker:function(){return new a.MercatorTicker({dimension:\"lat\"})},formatter:function(){return new s.MercatorTickFormatter({dimension:\"lat\"})}})},e}(o.LinearAxis);i.MercatorAxis=h,h.initClass()},function(t,e,i){var n=t(380),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Callback\"},e}(r.Model);i.Callback=o,o.initClass()},function(t,e,i){var n=t(380),r=t(80),o=t(15),s=t(32),a=t(38),l=function(e){function i(t){return e.call(this,t)||this}return n.__extends(i,e),i.initClass=function(){this.prototype.type=\"CustomJS\",this.define({args:[o.Any,{}],code:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(i.prototype,\"names\",{get:function(){return s.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"values\",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"func\",{get:function(){var t=this.use_strict?a.use_strict(this.code):this.code;return new(Function.bind.apply(Function,[void 0].concat(this.names,[\"cb_obj\",\"cb_data\",\"require\",\"exports\",t])))},enumerable:!0,configurable:!0}),i.prototype.execute=function(e,i){return this.func.apply(e,this.values.concat(e,i,t,{}))},i}(r.Callback);i.CustomJS=l,l.initClass()},function(t,e,i){var n=t(81);i.CustomJS=n.CustomJS;var r=t(83);i.OpenURL=r.OpenURL},function(t,e,i){var n=t(380),r=t(80),o=t(15),s=t(35),a=t(40),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"OpenURL\",this.define({url:[o.String,\"http://\"]})},e.prototype.execute=function(t,e){for(var i=0,n=s.get_indices(e.source);i0?a.all(e,l.isBoolean)?(e.length!==t.get_length()&&s.logger.warn(\"BooleanFilter \"+this.id+\": length of booleans doesn't match data source\"),a.range(0,e.length).filter(function(t){return!0===e[t]})):(s.logger.warn(\"BooleanFilter \"+this.id+\": booleans should be array of booleans, defaulting to no filtering\"),null):(null!=e&&0==e.length?s.logger.warn(\"BooleanFilter \"+this.id+\": booleans is empty, defaulting to no filtering\"):s.logger.warn(\"BooleanFilter \"+this.id+\": booleans was not set, defaulting to no filtering\"),null)},e}(r.Filter);i.BooleanFilter=h,h.initClass()},function(t,e,i){var n=t(380),r=t(92),o=t(15),s=t(32),a=t(38),l=function(e){function i(t){return e.call(this,t)||this}return n.__extends(i,e),i.initClass=function(){this.prototype.type=\"CustomJSFilter\",this.define({args:[o.Any,{}],code:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(i.prototype,\"names\",{get:function(){return s.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"values\",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"func\",{get:function(){var t=this.use_strict?a.use_strict(this.code):this.code;return new(Function.bind.apply(Function,[void 0].concat(this.names,[\"source\",\"require\",\"exports\",t])))},enumerable:!0,configurable:!0}),i.prototype.compute_indices=function(i){return this.filter=this.func.apply(this,this.values.concat([i,t,{}])),e.prototype.compute_indices.call(this,i)},i}(r.Filter);i.CustomJSFilter=l,l.initClass()},function(t,e,i){var n=t(380),r=t(53),o=t(15),s=t(44),a=t(21),l=t(14),h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Filter\",this.define({filter:[o.Array,null]})},e.prototype.compute_indices=function(t){var e=this.filter;return null!=e&&e.length>=0?s.isArrayOf(e,s.isBoolean)?a.range(0,e.length).filter(function(t){return!0===e[t]}):s.isArrayOf(e,s.isInteger)?e:(l.logger.warn(\"Filter \"+this.id+\": filter should either be array of only booleans or only integers, defaulting to no filtering\"),null):(l.logger.warn(\"Filter \"+this.id+\": filter was not set to be an array, defaulting to no filtering\"),null)},e}(r.Model);i.Filter=h,h.initClass()},function(t,e,i){var n=t(380),r=t(92),o=t(15),s=t(14),a=t(21),l=function(t){function e(e){var i=t.call(this,e)||this;return i.indices=null,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"GroupFilter\",this.define({column_name:[o.String],group:[o.String]})},e.prototype.compute_indices=function(t){var e=this,i=t.get_column(this.column_name);return null==i?(s.logger.warn(\"group filter: groupby column not found in data source\"),null):(this.indices=a.range(0,t.get_length()||0).filter(function(t){return i[t]===e.group}),0===this.indices.length&&s.logger.warn(\"group filter: group '\"+this.group+\"' did not match any values in column '\"+this.column_name+\"'\"),this.indices)},e}(r.Filter);i.GroupFilter=l,l.initClass()},function(t,e,i){var n=t(90);i.BooleanFilter=n.BooleanFilter;var r=t(91);i.CustomJSFilter=r.CustomJSFilter;var o=t(92);i.Filter=o.Filter;var s=t(93);i.GroupFilter=s.GroupFilter;var a=t(95);i.IndexFilter=a.IndexFilter},function(t,e,i){var n=t(380),r=t(92),o=t(15),s=t(14),a=t(44),l=t(21),h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"IndexFilter\",this.define({indices:[o.Array,null]})},e.prototype.compute_indices=function(t){return null!=this.indices&&this.indices.length>=0?l.all(this.indices,a.isInteger)?this.indices:(s.logger.warn(\"IndexFilter \"+this.id+\": indices should be array of integers, defaulting to no filtering\"),null):(s.logger.warn(\"IndexFilter \"+this.id+\": indices was not set, defaulting to no filtering\"),null)},e}(r.Filter);i.IndexFilter=h,h.initClass()},function(t,e,i){var n=t(380),r=t(105),o=t(15),s=t(44),a=function(t){function e(e){var i=t.call(this,e)||this;return i.last_precision=3,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"BasicTickFormatter\",this.define({precision:[o.Any,\"auto\"],use_scientific:[o.Bool,!0],power_limit_high:[o.Number,5],power_limit_low:[o.Number,-3]})},Object.defineProperty(e.prototype,\"scientific_limit_low\",{get:function(){return Math.pow(10,this.power_limit_low)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scientific_limit_high\",{get:function(){return Math.pow(10,this.power_limit_high)},enumerable:!0,configurable:!0}),e.prototype.doFormat=function(t,e){if(0==t.length)return[];var i=0;t.length>=2&&(i=Math.abs(t[1]-t[0])/1e4);var n=!1;if(this.use_scientific)for(var r=0,o=t;ri&&(l>=this.scientific_limit_high||l<=this.scientific_limit_low)){n=!0;break}}var h=new Array(t.length),c=this.precision;if(null==c||s.isNumber(c))if(n)for(var u=0,_=t.length;u<_;u++)h[u]=t[u].toExponential(c||void 0);else for(var u=0,_=t.length;u<_;u++)h[u]=t[u].toFixed(c||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");else for(var p=this.last_precision,d=this.last_precision<=15;d?p<=15:p>=15;d?p++:p--){var f=!0;if(n){for(var u=0,_=t.length;u<_;u++)if(h[u]=t[u].toExponential(p),u>0&&h[u]===h[u-1]){f=!1;break}if(f)break}else{for(var u=0,_=t.length;u<_;u++)if(h[u]=t[u].toFixed(p).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),u>0&&h[u]==h[u-1]){f=!1;break}if(f)break}if(f){this.last_precision=p;break}}return h},e}(r.TickFormatter);i.BasicTickFormatter=a,a.initClass()},function(t,e,i){var n=t(380),r=t(105),o=t(21),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"CategoricalTickFormatter\"},e.prototype.doFormat=function(t,e){return o.copy(t)},e}(r.TickFormatter);i.CategoricalTickFormatter=s,s.initClass()},function(t,e,i){function n(t){return a(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})}function r(t,e){if(_.isFunction(e))return e(t);var i=s.sprintf(\"$1%06d\",function(t){return Math.round(t/1e3%1*1e6)}(t));return-1==(e=e.replace(/((^|[^%])(%%)*)%f/,i)).indexOf(\"%\")?e:a(t,e)}var o=t(380),s=t(378),a=t(379),l=t(105),h=t(14),c=t(15),u=t(21),_=t(44),p=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],d=function(t){function e(e){var i=t.call(this,e)||this;return i.strip_leading_zeros=!0,i}return o.__extends(e,t),e.initClass=function(){this.prototype.type=\"DatetimeTickFormatter\",this.define({microseconds:[c.Array,[\"%fus\"]],milliseconds:[c.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[c.Array,[\"%Ss\"]],minsec:[c.Array,[\":%M:%S\"]],minutes:[c.Array,[\":%M\",\"%Mm\"]],hourmin:[c.Array,[\"%H:%M\"]],hours:[c.Array,[\"%Hh\",\"%H:%M\"]],days:[c.Array,[\"%m/%d\",\"%a%d\"]],months:[c.Array,[\"%m/%Y\",\"%b %Y\"]],years:[c.Array,[\"%Y\"]]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this._update_width_formats()},e.prototype._update_width_formats=function(){var t=+a(new Date),e=function(e){var i=e.map(function(e){return r(t,e).length}),n=u.sortBy(u.zip(i,e),function(t){var e=t[0];return e});return u.unzip(n)};this._width_formats={microseconds:e(this.microseconds),milliseconds:e(this.milliseconds),seconds:e(this.seconds),minsec:e(this.minsec),minutes:e(this.minutes),hourmin:e(this.hourmin),hours:e(this.hours),days:e(this.days),months:e(this.months),years:e(this.years)}},e.prototype._get_resolution_str=function(t,e){var i=1.1*t;switch(!1){case!(i<.001):return\"microseconds\";case!(i<1):return\"milliseconds\";case!(i<60):return e>=60?\"minsec\":\"seconds\";case!(i<3600):return e>=3600?\"hourmin\":\"minutes\";case!(i<86400):return\"hours\";case!(i<2678400):return\"days\";case!(i<31536e3):return\"months\";default:return\"years\"}},e.prototype.doFormat=function(t,e){if(0==t.length)return[];for(var i=Math.abs(t[t.length-1]-t[0])/1e3,o=i/(t.length-1),s=this._get_resolution_str(o,i),a=this._width_formats[s],l=a[1][0],c=[],u=p.indexOf(s),_={},d=0,f=p;d0&&r[o]==r[o-1]){n=!0;break}return n?this.basic_formatter.doFormat(t,e):r},e}(r.TickFormatter);i.LogTickFormatter=l,l.initClass()},function(t,e,i){var n=t(380),r=t(96),o=t(15),s=t(33),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"MercatorTickFormatter\",this.define({dimension:[o.LatLon]})},e.prototype.doFormat=function(e,i){if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0==e.length)return[];var n=e.length,r=new Array(n);if(\"lon\"==this.dimension)for(var o=0;o=x&&f.push([y,S])}for(var T=this.model.properties.direction.value(),C=[],A=0,E=f;A=v&&c.push([d,k])}return o.create_hit_test_result_from_hits(c)},e.prototype.draw_legend_for_index=function(t,e,i){var n=e.x0,r=e.y0,o=e.x1,s=e.y1,a=i+1,l=new Array(a);l[i]=(n+o)/2;var h=new Array(a);h[i]=(r+s)/2;var c=.5*Math.min(Math.abs(o-n),Math.abs(s-r)),u=new Array(a);u[i]=.4*c;var _=new Array(a);_[i]=.8*c,this._render(t,[i],{sx:l,sy:h,sinner_radius:u,souter_radius:_})},e}(r.XYGlyphView);i.AnnulusView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Annulus\",this.prototype.default_view=l,this.mixins([\"line\",\"fill\"]),this.define({inner_radius:[s.DistanceSpec],outer_radius:[s.DistanceSpec]})},e}(r.XYGlyph);i.Annulus=h,h.initClass()},function(t,e,i){var n=t(380),r=t(135),o=t(132),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._map_data=function(){\"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,i){var n=i.sx,r=i.sy,o=i.sradius,s=i._start_angle,a=i._end_angle;if(this.visuals.line.doit)for(var l=this.model.properties.direction.value(),h=0,c=e;h1?(_[i]=u,p[i]=u/c):(_[i]=u*c,p[i]=u),this._render(t,[i],{sx:l,sy:h,sw:_,sh:p})},e.prototype._bounds=function(t){var e=t.minX,i=t.maxX,n=t.minY,r=t.maxY;return{minX:e-this.max_w2,maxX:i+this.max_w2,minY:n-this.max_h2,maxY:r+this.max_h2}},e}(r.XYGlyphView);i.EllipseView=s;var a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Ellipse\",this.prototype.default_view=s,this.mixins([\"line\",\"fill\"]),this.define({angle:[o.AngleSpec,0],width:[o.DistanceSpec],height:[o.DistanceSpec]})},e}(r.XYGlyph);i.Ellipse=a,a.initClass()},function(t,e,i){var n=t(380),r=t(9),o=t(15),s=t(24),a=t(33),l=t(49),h=t(48),c=t(53),u=t(14),_=t(22),p=t(32),d=t(44),f=t(120),v=t(165),m=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._nohit_warned={},t}return n.__extends(i,e),i.prototype.initialize=function(i){e.prototype.initialize.call(this,i),this._nohit_warned={},this.renderer=i.renderer,this.visuals=new l.Visuals(this.model);var n=this.renderer.plot_view.gl;if(null!=n){var r=null;try{r=t(441)}catch(t){if(\"MODULE_NOT_FOUND\"!==t.code)throw t;u.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\")}if(null!=r){var o=r[this.model.type+\"GLGlyph\"];null!=o&&(this.glglyph=new o(n.ctx,this))}}},i.prototype.set_visuals=function(t){this.visuals.warm_cache(t),null!=this.glglyph&&this.glglyph.set_visuals_changed()},i.prototype.render=function(t,e,i){t.beginPath(),null!=this.glglyph&&this.glglyph.render(t,e,i)||this._render(t,e,i)},i.prototype.has_finished=function(){return!0},i.prototype.notify_finished=function(){this.renderer.notify_finished()},i.prototype._bounds=function(t){return t},i.prototype.bounds=function(){return this._bounds(this.index.bbox)},i.prototype.log_bounds=function(){for(var t=s.empty(),e=this.index.search(s.positive_x()),i=0,n=e;it.maxX&&(t.maxX=r.maxX)}for(var o=this.index.search(s.positive_y()),a=0,l=o;at.maxY&&(t.maxY=h.maxY)}return this._bounds(t)},i.prototype.get_anchor_point=function(t,e,i){var n=i[0],r=i[1];switch(t){case\"center\":return{x:this.scenterx(e,n,r),y:this.scentery(e,n,r)};default:return null}},i.prototype.sdist=function(t,e,i,n,r){void 0===n&&(n=\"edge\"),void 0===r&&(r=!1);var o,s,a=e.length;if(\"center\"==n){var l=_.map(i,function(t){return t/2});o=new Float64Array(a);for(var h=0;h0){n=this._image[e];var r=this._image_shape[e];this._height[e]=r[0],this._width[e]=r[1]}else{var o=this._image[e];n=a.concat(o),this._height[e]=o.length,this._width[e]=o[0].length}var s=this.image_data[e],l=void 0;null!=s&&s.width==this._width[e]&&s.height==this._height[e]?l=s:((l=document.createElement(\"canvas\")).width=this._width[e],l.height=this._height[e]);var h=l.getContext(\"2d\"),c=h.getImageData(0,0,this._width[e],this._height[e]),u=t.v_compute(n);c.data.set(u),h.putImageData(c,0,0),this.image_data[e]=l,this.max_dw=0,\"data\"==this.model.properties.dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,\"data\"==this.model.properties.dh.units&&(this.max_dh=a.max(this._dh))}},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\":this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);break;case\"screen\":this.sh=this._dh}},e.prototype._render=function(t,e,i){var n=i.image_data,r=i.sx,o=i.sy,s=i.sw,a=i.sh,l=t.getImageSmoothingEnabled();t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.global_alpha;for(var h=0,c=e;h0){n=this._image[e].buffer;var r=this._image_shape[e];this._height[e]=r[0],this._width[e]=r[1]}else{var o=this._image[e],a=s.concat(o);n=new ArrayBuffer(4*a.length);for(var l=new Uint32Array(n),h=0,c=a.length;h0?(o.logger.trace(\"ImageURL failed to load \"+t._url[e]+\" image, retrying in \"+r+\" ms\"),setTimeout(function(){return a.src=t._url[e]},r)):o.logger.warn(\"ImageURL unable to load \"+t._url[e]+\" image after \"+n+\" retries\"),t.retries[e]-=1},a.onload=function(){t.image[e]=a,t.renderer.request_render()},a.src=l._url[e]},l=this,h=0,c=this._url.length;h1&&(t.stroke(),o=!1)}o?t.lineTo(n[h],r[h]):(t.beginPath(),t.moveTo(n[h],r[h]),o=!0),s=h}o&&t.stroke()},e.prototype._hit_point=function(t){for(var e=this,i=s.create_empty_hit_test_result(),n={x:t.sx,y:t.sy},r=9999,o=Math.max(2,this.visuals.line.line_width.value()/2),a=0,l=this.sx.length-1;a0&&(l[h]=u)}return a.indices=s.keys(l).map(function(t){return parseInt(t,10)}),a.multiline_indices=l,a},e.prototype.get_interpolation_hit=function(t,e,i){var n,r,s,a,l=i.sx,h=i.sy,c=this._xs[t][e],u=this._ys[t][e],_=this._xs[t][e+1],p=this._ys[t][e+1];\"point\"==i.type?(m=this.renderer.yscale.r_invert(h-1,h+1),s=m[0],a=m[1],g=this.renderer.xscale.r_invert(l-1,l+1),n=g[0],r=g[1]):\"v\"==i.direction?(y=this.renderer.yscale.r_invert(h,h),s=y[0],a=y[1],n=(b=[c,_])[0],r=b[1]):(x=this.renderer.xscale.r_invert(l,l),n=x[0],r=x[1],s=(w=[u,p])[0],a=w[1]);var d=o.check_2_segments_intersect(n,s,r,a,c,u,_,p),f=d.x,v=d.y;return[f,v];var m,g,y,b,x,w},e.prototype.draw_legend_for_index=function(t,e,i){c.generic_line_legend(this.visuals,t,e,i)},e.prototype.scenterx=function(){throw new Error(\"not implemented\")},e.prototype.scentery=function(){throw new Error(\"not implemented\")},e}(h.GlyphView);i.MultiLineView=u;var _=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"MultiLine\",this.prototype.default_view=u,this.coords([[\"xs\",\"ys\"]]),this.mixins([\"line\"])},e}(h.Glyph);i.MultiLine=_,_.initClass()},function(t,e,i){var n=t(380),r=t(135),o=t(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._set_data=function(){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&&(this.max_h2=this.max_height/2)},e.prototype._map_data=function(){\"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,i){for(var n=i.sx,r=i.sy,o=i.sw,s=i.sh,a=i._angle,l=0,h=e;l1?(_[i]=u,p[i]=u/c):(_[i]=u*c,p[i]=u),this._render(t,[i],{sx:l,sy:h,sw:_,sh:p})},e.prototype._bounds=function(t){var e=t.minX,i=t.maxX,n=t.minY,r=t.maxY;return{minX:e-this.max_w2,maxX:i+this.max_w2,minY:n-this.max_h2,maxY:r+this.max_h2}},e}(r.XYGlyphView);i.OvalView=s;var a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Oval\",this.prototype.default_view=s,this.mixins([\"line\",\"fill\"]),this.define({angle:[o.AngleSpec,0],width:[o.DistanceSpec],height:[o.DistanceSpec]})},e}(r.XYGlyph);i.Oval=a,a.initClass()},function(t,e,i){var n=t(380),r=t(135),o=t(132),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){var n=i.sx,r=i.sy;if(this.visuals.fill.doit){this.visuals.fill.set_value(t);for(var o=0,s=e;o0;){var o=a.findLastIndex(r,function(t){return h.isStrictNaN(t)}),s=void 0;o>=0?s=r.splice(o):(s=r,r=[]);var l=s.filter(function(t){return!h.isStrictNaN(t)});e[i].push(l)}}return e},e.prototype._index_data=function(){for(var t=this._build_discontinuous_object(this._xs),e=this._build_discontinuous_object(this._ys),i=[],n=0,o=this._xs.length;n=0,x=i-this.sy1[a]<=this.sh[a]&&i-this.sy1[a]>=0;x&&w&&m.push(a)}var A=s.create_empty_hit_test_result();return A.indices=m,A},e.prototype._map_dist_corner_for_data_side_length=function(t,e,i){for(var n=t.length,r=new Float64Array(n),o=new Float64Array(n),s=0;so[1]&&(e=o[1]);else{t=o[0],e=o[1];for(var s=0,l=this.plot.select(r.Axis);s1?y[1]:\"\",w=this._horizontal?\"row\":\"col\";g=b+\" \"+w+\"-\"+o+\"-\"+a+\"-\"+x}else g=v;s[g]=g in s?s[g].concat(m):m}a++}return s},e.prototype._align_inner_cell_edges_constraints=function(){var t=[];if(null!=this.document&&s.includes(this.document.roots(),this)){var e=this._flatten_cell_edge_variables(this._horizontal);for(var i in e){var n=e[i];if(n.length>1)for(var o=n[0],a=1;a0)if(this._horizontal==t){var r=i[0],o=i[i.length-1];r instanceof e?n[0]=n[0].concat(r._find_edge_leaves(t)[0]):n[0].push(r),o instanceof e?n[1]=n[1].concat(o._find_edge_leaves(t)[1]):n[1].push(o)}else for(var s=0,a=i;s1)for(var e=t[0],i=1;i0?this.model._width.value-20+\"px\":\"100%\",this.el.style.width=i}},e.prototype.get_height=function(){var t=0;for(var e in this.child_views){var i=this.child_views[e],n=i.el,r=getComputedStyle(n),o=parseInt(r.marginTop)||0,s=parseInt(r.marginBottom)||0;t+=n.offsetHeight+o+s}return t+20},e.prototype.get_width=function(){if(null!=this.model.width)return this.model.width;var t=this.el.scrollWidth+20;for(var e in this.child_views){var i=this.child_views[e],n=i.el.scrollWidth;n>t&&(t=n)}return t},e}(a.LayoutDOMView);i.WidgetBoxView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"WidgetBox\",this.prototype.default_view=l,this.define({children:[o.Array,[]]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),\"fixed\"==this.sizing_mode&&null==this.width&&(this.width=300,r.logger.info(\"WidgetBox mode is fixed, but no width specified. Using default of 300.\"))},e.prototype.get_constrained_variables=function(){var e=s.extend({},t.prototype.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});return\"fixed\"!=this.sizing_mode&&(e.box_equal_size_left=this._left,e.box_equal_size_right=this._width_minus_right),e},e.prototype.get_layoutable_children=function(){return this.children},e}(a.LayoutDOM);i.WidgetBox=h,h.initClass()},function(t,e,i){var n=t(380),r=t(151),o=t(15),s=t(21),a=t(44),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"CategoricalColorMapper\",this.define({factors:[o.Array],start:[o.Number,0],end:[o.Number]})},e.prototype._v_compute=function(t,e,i,n){for(var r=n.nan_color,o=function(n,o){var h=t[n],c=void 0;a.isString(h)?c=l.factors.indexOf(h):(null!=l.start?h=null!=l.end?h.slice(l.start,l.end):h.slice(l.start):null!=l.end&&(h=h.slice(0,l.end)),c=1==h.length?l.factors.indexOf(h[0]):s.findIndex(l.factors,function(t){return function(t,e){if(t.length!=e.length)return!1;for(var i=0,n=t.length;i=i.length?r:i[c],e[n]=u},l=this,h=0,c=t.length;hc?null!=a?a:i[c]:i[m]}else e[p]=i[c]}},e}(r.ContinuousColorMapper);i.LinearColorMapper=s,s.initClass()},function(t,e,i){var n=t(380),r=t(152),o=t(22),s=null!=Math.log1p?Math.log1p:function(t){return Math.log(1+t)},a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"LogColorMapper\"},e.prototype._v_compute=function(t,e,i,n){for(var r=n.nan_color,a=n.low_color,l=n.high_color,h=i.length,c=null!=this.low?this.low:o.min(t),u=null!=this.high?this.high:o.max(t),_=h/(s(u)-s(c)),p=i.length-1,d=0,f=t.length;du)e[d]=null!=l?l:i[p];else if(v!=u)if(vp&&(g=p),e[d]=i[g]}else e[d]=i[p]}},e}(r.ContinuousColorMapper);i.LogColorMapper=a,a.initClass()},function(t,e,i){function n(t,e){t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)}function r(t,e){t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)}function o(t,e){t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()}function s(t,e){var i=e*c,n=i/3;t.moveTo(-e,n),t.lineTo(e,n),t.lineTo(0,n-i),t.closePath()}function a(t,e){var i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(i,t),i.initClass=function(){this.prototype._render_one=e},i}(h.MarkerView);i.initClass();var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(n,e),n.initClass=function(){this.prototype.default_view=i,this.prototype.type=t},n}(h.Marker);return n.initClass(),n}var l=t(380),h=t(157),c=Math.sqrt(3);i.Asterisk=a(\"Asterisk\",function(t,e,i,o,s){var a=.65*i;r(t,i),n(t,a),o.doit&&(o.set_vectorize(t,e),t.stroke())}),i.CircleCross=a(\"CircleCross\",function(t,e,i,n,o){t.arc(0,0,i,0,2*Math.PI,!1),o.doit&&(o.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.CircleX=a(\"CircleX\",function(t,e,i,r,o){t.arc(0,0,i,0,2*Math.PI,!1),o.doit&&(o.set_vectorize(t,e),t.fill());r.doit&&(r.set_vectorize(t,e),n(t,i),t.stroke())}),i.Cross=a(\"Cross\",function(t,e,i,n,o){r(t,i),n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.Diamond=a(\"Diamond\",function(t,e,i,n,r){o(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.DiamondCross=a(\"DiamondCross\",function(t,e,i,n,s){o(t,i),s.doit&&(s.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.Hex=a(\"Hex\",function(t,e,i,n,r){(function(t,e){var i=e/2,n=c*i;t.moveTo(e,0),t.lineTo(i,-n),t.lineTo(-i,-n),t.lineTo(-e,0),t.lineTo(-i,n),t.lineTo(i,n),t.closePath()})(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.InvertedTriangle=a(\"InvertedTriangle\",function(t,e,i,n,r){t.rotate(Math.PI),s(t,i),t.rotate(-Math.PI),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.Square=a(\"Square\",function(t,e,i,n,r){var o=2*i;t.rect(-i,-i,o,o),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.SquareCross=a(\"SquareCross\",function(t,e,i,n,o){var s=2*i;t.rect(-i,-i,s,s),o.doit&&(o.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),r(t,i),t.stroke())}),i.SquareX=a(\"SquareX\",function(t,e,i,r,o){var s=2*i;t.rect(-i,-i,s,s),o.doit&&(o.set_vectorize(t,e),t.fill());r.doit&&(r.set_vectorize(t,e),n(t,i),t.stroke())}),i.Triangle=a(\"Triangle\",function(t,e,i,n,r){s(t,i),r.doit&&(r.set_vectorize(t,e),t.fill());n.doit&&(n.set_vectorize(t,e),t.stroke())}),i.X=a(\"X\",function(t,e,i,r,o){n(t,i),r.doit&&(r.set_vectorize(t,e),t.stroke())})},function(t,e,i){var n=t(380),r=t(135),o=t(9),s=t(15),a=t(21),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){for(var n=i.sx,r=i.sy,o=i._size,s=i._angle,a=0,l=e;a=2){this.map.setZoom(r);var o=this._get_projected_bounds(),s=o[0],a=o[1];a-s<0&&this.map.setZoom(n)}this.unpause()}this._set_bokeh_ranges()},e.prototype._build_map=function(){var t=this,e=google.maps;this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID};var i=this.model.plot.map_options,n={center:new e.LatLng(i.lat,i.lng),zoom:i.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[i.map_type],scaleControl:i.scale_control};null!=i.styles&&(n.styles=JSON.parse(i.styles)),this.map=new e.Map(this.canvas_view.map_el,n),e.event.addListener(this.map,\"idle\",function(){return t._set_bokeh_ranges()}),e.event.addListener(this.map,\"bounds_changed\",function(){return t._set_bokeh_ranges()}),e.event.addListenerOnce(this.map,\"tilesloaded\",function(){return t._render_finished()}),this.connect(this.model.plot.properties.map_options.change,function(){return t._update_options()}),this.connect(this.model.plot.map_options.properties.styles.change,function(){return t._update_styles()}),this.connect(this.model.plot.map_options.properties.lat.change,function(){return t._update_center(\"lat\")}),this.connect(this.model.plot.map_options.properties.lng.change,function(){return t._update_center(\"lng\")}),this.connect(this.model.plot.map_options.properties.zoom.change,function(){return t._update_zoom()}),this.connect(this.model.plot.map_options.properties.map_type.change,function(){return t._update_map_type()}),this.connect(this.model.plot.map_options.properties.scale_control.change,function(){return t._update_scale_control()})},e.prototype._render_finished=function(){this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return t.prototype.has_finished.call(this)&&!0===this._tiles_loaded},e.prototype._get_latlon_bounds=function(){var t=this.map.getBounds(),e=t.getNorthEast(),i=t.getSouthWest(),n=i.lng(),r=e.lng(),o=i.lat(),s=e.lat();return[n,r,o,s]},e.prototype._get_projected_bounds=function(){var t=this._get_latlon_bounds(),e=t[0],i=t[1],n=t[2],r=t[3],s=o.wgs84_mercator.forward([e,n]),a=s[0],l=s[1],h=o.wgs84_mercator.forward([i,r]),c=h[0],u=h[1];return[a,c,l,u]},e.prototype._set_bokeh_ranges=function(){var t=this._get_projected_bounds(),e=t[0],i=t[1],n=t[2],r=t[3];this.frame.x_range.setv({start:e,end:i}),this.frame.y_range.setv({start:n,end:r})},e.prototype._update_center=function(t){var 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(){this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3];this.canvas_view.map_el.style.top=n+\"px\",this.canvas_view.map_el.style.left=i+\"px\",this.canvas_view.map_el.style.width=r+\"px\",this.canvas_view.map_el.style.height=o+\"px\",null==this.map&&\"undefined\"!=typeof google&&null!=google.maps&&this._build_map()},e.prototype._paint_empty=function(t,e){var i=this.canvas._width.value,n=this.canvas._height.value,r=e[0],o=e[1],s=e[2],a=e[3];t.clearRect(0,0,i,n),t.beginPath(),t.moveTo(0,0),t.lineTo(0,n),t.lineTo(i,n),t.lineTo(i,0),t.lineTo(0,0),t.moveTo(r,o),t.lineTo(r+s,o),t.lineTo(r+s,o+a),t.lineTo(r,o+a),t.lineTo(r,o),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(s.PlotCanvasView);i.GMapPlotCanvasView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"GMapPlotCanvas\",this.prototype.default_view=l},e.prototype.initialize=function(){this.use_map=!0,t.prototype.initialize.call(this)},e}(s.PlotCanvas);i.GMapPlotCanvas=h,h.initClass()},function(t,e,i){var n=t(158);i.MapOptions=n.MapOptions;var r=t(158);i.GMapOptions=r.GMapOptions;var o=t(158);i.GMapPlot=o.GMapPlot;var s=t(159);i.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(161);i.Plot=a.Plot;var l=t(162);i.PlotCanvas=l.PlotCanvas},function(t,e,i){var n=t(380),r=t(13),o=t(14),s=t(15),a=t(19),l=t(21),h=t(32),c=t(44),u=t(146),_=t(68),p=t(176),d=t(248),f=t(69),v=t(162),m=t(184),g=t(169),y=t(3),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){t.prototype.connect_signals.call(this);this.connect(this.model.properties.title.change,function(){return o.logger.warn(\"Title object cannot be replaced. Try changing properties on title to update it after initialization.\")})},e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(\"bk-plot-layout\")},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){this.plot_canvas_view.save(t)},Object.defineProperty(e.prototype,\"plot_canvas_view\",{get:function(){return this.child_views[this.model.plot_canvas.id]},enumerable:!0,configurable:!0}),e}(u.LayoutDOMView);i.PlotView=b;var x=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Plot\",this.prototype.default_view=b,this.mixins([\"line:outline_\",\"fill:background_\",\"fill:border_\"]),this.define({toolbar:[s.Instance,function(){return new d.Toolbar}],toolbar_location:[s.Location,\"right\"],toolbar_sticky:[s.Boolean,!0],plot_width:[s.Number,600],plot_height:[s.Number,600],title:[s.Any,function(){return new _.Title({text:\"\"})}],title_location:[s.Location,\"above\"],h_symmetry:[s.Bool,!0],v_symmetry:[s.Bool,!1],above:[s.Array,[]],below:[s.Array,[]],left:[s.Array,[]],right:[s.Array,[]],renderers:[s.Array,[]],x_range:[s.Instance],extra_x_ranges:[s.Any,{}],y_range:[s.Instance],extra_y_ranges:[s.Any,{}],x_scale:[s.Instance,function(){return new p.LinearScale}],y_scale:[s.Instance,function(){return new p.LinearScale}],lod_factor:[s.Number,10],lod_interval:[s.Number,300],lod_threshold:[s.Number,2e3],lod_timeout:[s.Number,500],hidpi:[s.Bool,!0],output_backend:[s.OutputBackend,\"canvas\"],min_border:[s.Number,5],min_border_top:[s.Number,null],min_border_left:[s.Number,null],min_border_bottom:[s.Number,null],min_border_right:[s.Number,null],inner_width:[s.Number],inner_height:[s.Number],layout_width:[s.Number],layout_height:[s.Number],match_aspect:[s.Bool,!1],aspect_scale:[s.Number,1]}),this.override({outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"}),y.register_with_event(y.UIEvent,this)},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.reset=new a.Signal0(this,\"reset\");for(var e=0,i=h.values(this.extra_x_ranges).concat(this.x_range);el.end;if(!i){var u=this._get_weight_to_constrain_interval(l,h);u<1&&(h.start=u*h.start+(1-u)*l.start,h.end=u*h.end+(1-u)*l.end)}if(null!=l.bounds&&\"auto\"!=l.bounds){var _=l.bounds,p=_[0],d=_[1],f=Math.abs(h.end-h.start);c?(null!=p&&p>=h.end&&(r=!0,h.end=p,(e||i)&&(h.start=p+f)),null!=d&&d<=h.start&&(r=!0,h.start=d,(e||i)&&(h.end=d-f))):(null!=p&&p>=h.start&&(r=!0,h.start=p,(e||i)&&(h.end=p+f)),null!=d&&d<=h.end&&(r=!0,h.end=d,(e||i)&&(h.start=d-f)))}}if(!(i&&r&&n))for(var v=0,m=t;v0&&c0&&c>n&&(l=(n-h)/(c-h)),l=Math.max(0,Math.min(1,l))}return l},e.prototype.update_range=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this.pause();var r=this.frame,o=r.x_ranges,s=r.y_ranges;if(null==t){for(var a in o){var l=o[a];l.reset()}for(var h in s){var l=s[h];l.reset()}this.update_dataranges()}else{var c=[];for(var u in o){var l=o[u];c.push([l,t.xrs[u]])}for(var _ in s){var l=s[_];c.push([l,t.yrs[_]])}i&&this._update_ranges_together(c),this._update_ranges_individually(c,e,i,n)}this.unpause()},e.prototype.reset_range=function(){this.update_range(null)},e.prototype.build_levels=function(){var t=this.model.plot.all_renderers,e=S.keys(this.renderer_views),i=u.build_views(this.renderer_views,t,this.view_options()),n=k.difference(e,t.map(function(t){return t.id}));for(var r in this.levels)for(var o=0,s=n;o=0&&in.lod_timeout&&e.interactive_stop(n),t.request_render()},n.lod_timeout):e.interactive_stop(n)}for(var r in this.renderer_views){var o=this.renderer_views[r];if(null==this.range_update_timestamp||o instanceof a.GlyphRendererView&&o.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}}this.model.frame.update_scales();var s=this.canvas_view.ctx,l=this.canvas.pixel_ratio;s.save(),s.scale(l,l),s.translate(.5,.5);var h=[this.frame._left.value,this.frame._top.value,this.frame._width.value,this.frame._height.value];if(this._map_hook(s,h),this._paint_empty(s,h),this.prepare_webgl(l,h),s.save(),this.visuals.outline_line.doit){this.visuals.outline_line.set_value(s);var c=h[0],u=h[1],_=h[2],p=h[3];c+_==this.canvas._width.value&&(_-=1),u+p==this.canvas._height.value&&(p-=1),s.strokeRect(c,u,_,p)}s.restore(),this._paint_levels(s,[\"image\",\"underlay\",\"glyph\"],h,!0),this.blit_webgl(l),this._paint_levels(s,[\"annotation\"],h,!0),this._paint_levels(s,[\"overlay\"],h,!1),null==this._initial_state_info.range&&this.set_initial_range(),s.restore(),this._has_finished||(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,i,n){t.save(),n&&(t.beginPath(),t.rect.apply(t,i),t.clip());for(var r={},o=0;o0&&(e=e.filter(function(e){return h.includes(t,e.name)})),s.logger.debug(\"computed \"+e.length+\" renderers for DataRange1d \"+this.id);for(var l=0,c=e;lu&&(\"start\"==this.follow?n=i+c*u:\"end\"==this.follow&&(i=n-c*u)),[i,n];var _},e.prototype.update=function(t,e,i,n){if(!this.have_updated_interactively){var r=this.computed_renderers(),o=this._compute_plot_bounds(r,t);null!=n&&(o=this.adjust_bounds_for_aspect(o,n)),this._plot_bounds[i]=o;var s=this._compute_min_max(this._plot_bounds,e),a=s[0],l=s[1],h=this._compute_range(a,l),c=h[0],u=h[1];null!=this._initial_start&&(\"log\"==this.scale_hint?this._initial_start>0&&(c=this._initial_start):c=this._initial_start),null!=this._initial_end&&(\"log\"==this.scale_hint?this._initial_end>0&&(u=this._initial_end):u=this._initial_end);var _=[this.start,this.end],p=_[0],d=_[1];if(c!=p||u!=d){var f={};c!=p&&(f.start=c),u!=d&&(f.end=u),this.setv(f)}\"auto\"==this.bounds&&this.setv({bounds:[c,u]},{silent:!0}),this.change.emit()}},e.prototype.reset=function(){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}(r.DataRange);i.DataRange1d=c,c.initClass()},function(t,e,i){function n(t,e,i){void 0===i&&(i=0);for(var n={},r=0;rthis.end},enumerable:!0,configurable:!0}),e.prototype.reset=function(){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}(r.Range);i.Range1d=s,s.initClass()},function(t,e,i){var n=t(380),r=t(173),o=t(120),s=t(183),a=t(14),l=t(15),h=t(22),c=t(21),u=t(32),_=t(165),p={fill:{},line:{}},d={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},f={fill:{fill_alpha:.2},line:{}},v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){function i(t){var e=u.clone(s);return r&&u.extend(e,t.fill),o&&u.extend(e,t.line),new n.constructor(e)}t.prototype.initialize.call(this,e);var n=this.model.glyph,r=c.includes(n.mixins,\"fill\"),o=c.includes(n.mixins,\"line\"),s=u.clone(n.attributes);delete s.id,this.glyph=this.build_glyph_view(n);var a=this.model.selection_glyph;null==a?a=i({fill:{},line:{}}):\"auto\"===a&&(a=i(p)),this.selection_glyph=this.build_glyph_view(a);var l=this.model.nonselection_glyph;null==l?l=i({fill:{},line:{}}):\"auto\"===l&&(l=i(f)),this.nonselection_glyph=this.build_glyph_view(l);var h=this.model.hover_glyph;null!=h&&(this.hover_glyph=this.build_glyph_view(h));var _=this.model.muted_glyph;null!=_&&(this.muted_glyph=this.build_glyph_view(_));var v=i(d);this.decimated_glyph=this.build_glyph_view(v),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),null!=this.model.data_source.setup&&this.model.data_source.setup()},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(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.request_render()}),this.connect(this.model.glyph.change,function(){return e.set_data()}),this.connect(this.model.data_source.change,function(){return e.set_data()}),this.connect(this.model.data_source.streaming,function(){return e.set_data()}),this.connect(this.model.data_source.patching,function(t){return e.set_data(!0,t)}),this.connect(this.model.data_source._select,function(){return e.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return e.request_render()}),this.connect(this.model.properties.view.change,function(){return e.set_data()}),this.connect(this.model.view.change,function(){return e.set_data()});var i=this.plot_model.frame,n=i.x_ranges,r=i.y_ranges;for(var o in n){var s=n[o];s instanceof _.FactorRange&&this.connect(s.change,function(){return e.set_data()})}for(var a in r){var s=r[a];s instanceof _.FactorRange&&this.connect(s.change,function(){return e.set_data()})}this.connect(this.model.glyph.transformchange,function(){return e.set_data()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=null);var i=Date.now(),n=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(n,this.all_indices,e),this.glyph.set_visuals(n),this.decimated_glyph.set_visuals(n),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(n),this.nonselection_glyph.set_visuals(n)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(n),null!=this.muted_glyph&&this.muted_glyph.set_visuals(n);var r=this.plot_model.plot.lod_factor;this.decimated=[];for(var o=0,s=Math.floor(this.all_indices.length/r);o0?d[\"1d\"].indices:function(){for(var t=[],e=0,i=Object.keys(d[\"2d\"].indices);e0&&!i&&null!=y&&this.all_indices.length>y?(s=this.decimated,f=this.decimated_glyph,v=this.decimated_glyph,m=this.selection_glyph):(f=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,v=this.nonselection_glyph,m=this.selection_glyph),null!=this.hover_glyph&&g.length&&(s=c.difference(s,g));var b,x=null;if(u.length&&this.have_selection_glyphs()){for(var w=Date.now(),k={},S=0,T=u;S0){for(var a=i[0],l=0,h=i;l0){for(var a=i[0],l=0,h=i;l0?this.selected_glyphs[0]:null},enumerable:!0,configurable:!0}),e.prototype.add_to_selected_glyphs=function(t){this.selected_glyphs.push(t)},e.prototype.update=function(t,e,i){this.final=e,i?this.update_through_union(t):(this.indices=t.indices,this.line_indices=t.line_indices,this.selected_glyphs=t.selected_glyphs,this.get_view=t.get_view,this.multiline_indices=t.multiline_indices,this.image_indices=t.image_indices)},e.prototype.clear=function(){this.final=!0,this.indices=[],this.line_indices=[],this.multiline_indices={},this.get_view=function(){return null},this.selected_glyphs=[]},e.prototype.is_empty=function(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length},e.prototype.update_through_union=function(t){this.indices=s.union(t.indices,this.indices),this.selected_glyphs=s.union(t.selected_glyphs,this.selected_glyphs),this.line_indices=s.union(t.line_indices,this.line_indices),this.get_view()||(this.get_view=t.get_view),this.multiline_indices=a.merge(t.multiline_indices,this.multiline_indices)},e.prototype.update_through_intersection=function(t){this.indices=s.intersection(t.indices,this.indices),this.selected_glyphs=s.union(t.selected_glyphs,this.selected_glyphs),this.line_indices=s.union(t.line_indices,this.line_indices),this.get_view()||(this.get_view=t.get_view),this.multiline_indices=a.merge(t.multiline_indices,this.multiline_indices)},e}(r.Model);i.Selection=l,l.initClass()},function(t,e,i){var n=t(380),r=t(189),o=t(14),s=t(15),a=function(t){function e(e){var i=t.call(this,e)||this;return i.initialized=!1,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"AjaxDataSource\",this.define({mode:[s.String,\"replace\"],content_type:[s.String,\"application/json\"],http_headers:[s.Any,{}],max_size:[s.Number],method:[s.String,\"POST\"],if_modified:[s.Bool,!1]})},e.prototype.destroy=function(){null!=this.interval&&clearInterval(this.interval),t.prototype.destroy.call(this)},e.prototype.setup=function(){var t=this;if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval)){var e=function(){return t.get_data(t.mode,t.max_size,t.if_modified)};this.interval=setInterval(e,this.polling_interval)}},e.prototype.get_data=function(t,e,i){var n=this;void 0===e&&(e=0),void 0===i&&(i=!1);var r=this.prepare_request();r.addEventListener(\"load\",function(){return n.do_load(r,t,e)}),r.addEventListener(\"error\",function(){return n.do_error(r)}),r.send()},e.prototype.prepare_request=function(){var t=new XMLHttpRequest;t.open(this.method,this.data_url,!0),t.withCredentials=!1,t.setRequestHeader(\"Content-Type\",this.content_type);var e=this.http_headers;for(var i in e){var n=e[i];t.setRequestHeader(i,n)}return t},e.prototype.do_load=function(t,e,i){if(200===t.status){var n=JSON.parse(t.responseText);switch(e){case\"replace\":this.data=n;break;case\"append\":for(var r=this.data,o=0,s=this.columns();o0?this.indices=a.intersection.apply(this,e):this.source instanceof l.ColumnarDataSource&&(this.indices=this.source.get_indices()),this.indices_map_to_subset()},e.prototype.indices_map_to_subset=function(){this.indices_map={};for(var t=0;ti?n.slice(-i):n}if(_.isTypedArray(t)){var r=t.length+e.length;if(null!=i&&r>i){var o=r-i,s=t.length,n=void 0;t.length1&&o.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\");for(var p=t.coordinates[0],u=0;u1&&o.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),v.push(y[0])}for(var c=v.reduce(r),u=0;ui&&l0&&h.length>0){for(var _=r/c,p=s.range(0,c).map(function(t){return t*_}),d=0,f=p.slice(1);d1?this.interval=(e[1]-e[0])*o.ONE_DAY:this.interval=31*o.ONE_DAY},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=function(t,e){var i=o.last_month_no_later_than(new Date(t)),n=o.last_month_no_later_than(new Date(e));n.setUTCMonth(n.getUTCMonth()+1);var r=[],s=i;for(;r.push(o.copy_date(s)),s.setUTCMonth(s.getUTCMonth()+1),!(s>n););return r}(t,e),s=this.days,l=this.interval,h=a.concat(r.map(function(t){return function(t,e){for(var i=[],n=0,r=s;n0&&r.length>0){for(var f=_/s,v=o.range(0,s).map(function(t){return t*f}),m=0,g=v.slice(1);m0&&r.length>0){for(var E=Math.pow(l,A)/s,v=o.range(1,s+1).map(function(t){return t*E}),M=0,O=v;M1?this.interval=(e[1]-e[0])*o.ONE_MONTH:this.interval=12*o.ONE_MONTH},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=function(t,e){var i=o.last_year_no_later_than(new Date(t)),n=o.last_year_no_later_than(new Date(e));n.setUTCFullYear(n.getUTCFullYear()+1);var r=[],s=i;for(;r.push(o.copy_date(s)),s.setUTCFullYear(s.getUTCFullYear()+1),!(s>n););return r}(t,e),s=this.months,l=a.concat(r.map(function(t){return s.map(function(e){var i=o.copy_date(t);return i.setUTCMonth(e),i})})),h=l.map(function(t){return t.getTime()}),c=h.filter(function(i){return t<=i&&i<=e});return{major:c,minor:[]}},e}(r.SingleIntervalTicker);i.MonthsTicker=l,l.initClass()},function(t,e,i){var n=t(380),r=t(194),o=t(15),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"SingleIntervalTicker\",this.define({interval:[o.Number]})},e.prototype.get_interval=function(t,e,i){return this.interval},Object.defineProperty(e.prototype,\"min_interval\",{get:function(){return this.interval},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"max_interval\",{get:function(){return this.interval},enumerable:!0,configurable:!0}),e}(r.ContinuousTicker);i.SingleIntervalTicker=s,s.initClass()},function(t,e,i){var n=t(380),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Ticker\"},e}(r.Model);i.Ticker=o,o.initClass()},function(t,e,i){function n(t){return new Date(t.getTime())}function r(t){var e=n(t);return e.setUTCDate(1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),e}i.ONE_MILLI=1,i.ONE_SECOND=1e3,i.ONE_MINUTE=60*i.ONE_SECOND,i.ONE_HOUR=60*i.ONE_MINUTE,i.ONE_DAY=24*i.ONE_HOUR,i.ONE_MONTH=30*i.ONE_DAY,i.ONE_YEAR=365*i.ONE_DAY,i.copy_date=n,i.last_month_no_later_than=r,i.last_year_no_later_than=function(t){var e=r(t);return e.setUTCMonth(0),e}},function(t,e,i){var n=t(380),r=t(191),o=t(202),s=t(204),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"YearsTicker\"},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.interval=s.ONE_YEAR,this.basic_ticker=new r.BasicTicker({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=s.last_year_no_later_than(new Date(t)).getUTCFullYear(),o=s.last_year_no_later_than(new Date(e)).getUTCFullYear(),a=this.basic_ticker.get_ticks_no_defaults(r,o,i,n).major,l=a.map(function(t){return Date.UTC(t,0,1)}),h=l.filter(function(i){return t<=i&&i<=e});return{major:h,minor:[]}},e}(o.SingleIntervalTicker);i.YearsTicker=a,a.initClass()},function(t,e,i){var n=t(380),r=t(209),o=t(15),s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"BBoxTileSource\",this.define({use_latlon:[o.Bool,!1]})},e.prototype.get_image_url=function(t,e,i){var n,r,o,s,a=this.string_lookup_replace(this.url,this.extra_url_vars);return this.use_latlon?(l=this.get_tile_geographic_bounds(t,e,i),r=l[0],s=l[1],n=l[2],o=l[3]):(h=this.get_tile_meter_bounds(t,e,i),r=h[0],s=h[1],n=h[2],o=h[3]),a.replace(\"{XMIN}\",r.toString()).replace(\"{YMIN}\",s.toString()).replace(\"{XMAX}\",n.toString()).replace(\"{YMAX}\",o.toString());var l,h},e}(r.MercatorTileSource);i.BBoxTileSource=s,s.initClass()},function(t,e,i){var n=t(44),r=function(){function t(){this.images=[]}return t.prototype.pop=function(){var t=this.images.pop();return null!=t?t:new Image},t.prototype.push=function(t){if(!(this.images.length>50)){n.isArray(t)?(e=this.images).push.apply(e,t):this.images.push(t);var e}},t}();i.ImagePool=r},function(t,e,i){var n=t(206);i.BBoxTileSource=n.BBoxTileSource;var r=t(209);i.MercatorTileSource=r.MercatorTileSource;var o=t(210);i.QUADKEYTileSource=o.QUADKEYTileSource;var s=t(211);i.TileRenderer=s.TileRenderer;var a=t(212);i.TileSource=a.TileSource;var l=t(214);i.TMSTileSource=l.TMSTileSource;var h=t(215);i.WMTSTileSource=h.WMTSTileSource},function(t,e,i){var n=t(380),r=t(212),o=t(15),s=t(21),a=t(213),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"MercatorTileSource\",this.define({snap_to_zoom:[o.Bool,!1],wrap_around:[o.Bool,!0]}),this.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097})},e.prototype.initialize=function(){var e=this;t.prototype.initialize.call(this),this._resolutions=s.range(this.min_zoom,this.max_zoom+1).map(function(t){return e.get_resolution(t)})},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,i){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,i)))&&!(e<0||e>=Math.pow(2,i))},e.prototype.parent_by_tile_xyz=function(t,e,i){var n=this.tile_xyz_to_quadkey(t,e,i),r=n.substring(0,n.length-1);return this.quadkey_to_tile_xyz(r)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,i){var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e;return[n,r]},e.prototype.get_level_by_extent=function(t,e,i){for(var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e,o=Math.max(n,r),s=0,a=0,l=this._resolutions;ah){if(0==s)return 0;if(s>0)return s-1}s+=1}return s-1},e.prototype.get_closest_level_by_extent=function(t,e,i){var n=(t[2]-t[0])/i,r=(t[3]-t[1])/e,o=Math.max(n,r),s=this._resolutions.reduce(function(t,e){return Math.abs(e-o)_?(h=s-r,c*=u):(h*=_,c=a-o)}var p=(h-(s-r))/2,d=(c-(a-o))/2;return[r-p,o-d,s+p,a+d]},e.prototype.tms_to_wmts=function(t,e,i){\"Note this works both ways\";return[t,Math.pow(2,i)-1-e,i]},e.prototype.wmts_to_tms=function(t,e,i){\"Note this works both ways\";return[t,Math.pow(2,i)-1-e,i]},e.prototype.pixels_to_meters=function(t,e,i){var n=this.get_resolution(i),r=t*n-this.x_origin_offset,o=e*n-this.y_origin_offset;return[r,o]},e.prototype.meters_to_pixels=function(t,e,i){var n=this.get_resolution(i),r=(t+this.x_origin_offset)/n,o=(e+this.y_origin_offset)/n;return[r,o]},e.prototype.pixels_to_tile=function(t,e){var i=Math.ceil(t/this.tile_size);i=0===i?i:i-1;var n=Math.max(Math.ceil(e/this.tile_size)-1,0);return[i,n]},e.prototype.pixels_to_raster=function(t,e,i){var n=this.tile_size<=h;d--)for(var f=l;f<=u;f++)this.is_valid_tile(f,d,e)&&p.push([f,d,e,this.get_tile_meter_bounds(f,d,e)]);return this.sort_tiles_from_center(p,[l,h,u,_]),p},e.prototype.quadkey_to_tile_xyz=function(t){for(var e=0,i=0,n=t.length,r=n;r>0;r--){var o=t.charAt(n-r),s=1<0;r--){var o=1<0;)if(r=r.substring(0,r.length-1),s=this.quadkey_to_tile_xyz(r),t=s[0],e=s[1],i=s[2],a=this.denormalize_xyz(t,e,i,n),t=a[0],e=a[1],i=a[2],this.tile_xyz_to_key(t,e,i)in this.tiles)return[t,e,i];return[0,0,0];var o,s,a},e.prototype.normalize_xyz=function(t,e,i){if(this.wrap_around){var n=Math.pow(2,i);return[(t%n+n)%n,e,i]}return[t,e,i]},e.prototype.denormalize_xyz=function(t,e,i,n){return[t+n*Math.pow(2,i),e,i]},e.prototype.denormalize_meters=function(t,e,i,n){return[t+2*n*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,i){return Math.floor(t/Math.pow(2,i))},e}(r.TileSource);i.MercatorTileSource=l,l.initClass()},function(t,e,i){var n=t(380),r=t(209),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"QUADKEYTileSource\"},e.prototype.get_image_url=function(t,e,i){var n=this.string_lookup_replace(this.url,this.extra_url_vars),r=this.tms_to_wmts(t,e,i),o=r[0],s=r[1],a=r[2],l=this.tile_xyz_to_quadkey(o,s,a);return n.replace(\"{Q}\",l)},e}(r.MercatorTileSource);i.QUADKEYTileSource=o,o.initClass()},function(t,e,i){var n=t(380),r=t(207),o=t(215),s=t(173),a=t(5),l=t(15),h=t(21),c=t(44),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){this.attributionEl=null,this._tiles=[],t.prototype.initialize.call(this,e)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},Object.defineProperty(e.prototype,\"map_plot\",{get:function(){return this.plot_model.plot},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"map_canvas\",{get:function(){return this.plot_view.canvas_view.ctx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"map_frame\",{get:function(){return this.plot_model.frame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"x_range\",{get:function(){return this.map_plot.x_range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"y_range\",{get:function(){return this.map_plot.y_range},enumerable:!0,configurable:!0}),e.prototype._set_data=function(){this.pool=new r.ImagePool,this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},e.prototype._add_attribution=function(){var t=this.model.tile_source.attribution;if(c.isString(t)&&t.length>0){if(null==this.attributionEl){var e=this.plot_model.canvas._right.value-this.plot_model.frame._right.value,i=this.plot_model.canvas._bottom.value-this.plot_model.frame._bottom.value,n=this.map_frame._width.value;this.attributionEl=a.div({class:\"bk-tile-attribution\",style:{position:\"absolute\",bottom:i+\"px\",right:e+\"px\",\"max-width\":n+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}});var r=this.plot_view.canvas_view.events_el;r.appendChild(this.attributionEl)}this.attributionEl.innerHTML=t}},e.prototype._map_data=function(){this.initial_extent=this.get_extent();var t=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,t);this.x_range.start=e[0],this.y_range.start=e[1],this.x_range.end=e[2],this.y_range.end=e[3],this._add_attribution()},e.prototype._on_tile_load=function(t,e){t.img=e.target,t.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t,e){t.img=e.target,t.loaded=!0,t.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){t.finished=!0},e.prototype._create_tile=function(t,e,i,n,r){void 0===r&&(r=!1);var o=this.model.tile_source.normalize_xyz(t,e,i),s=o[0],a=o[1],l=o[2],h=this.pool.pop(),c={img:h,tile_coords:[t,e,i],normalized_coords:[s,a,l],quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,i),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,i),bounds:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[3]};h.onload=r?this._on_tile_cache_load.bind(this,c):this._on_tile_load.bind(this,c),h.onerror=this._on_tile_error.bind(this,c),h.alt=\"\",h.src=this.model.tile_source.get_image_url(s,a,l),this.model.tile_source.tiles[c.cache_key]=c,this._tiles.push(c)},e.prototype._enforce_aspect_ratio=function(){if(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value){var t=this.get_extent(),e=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),i=this.model.tile_source.snap_to_zoom_level(t,this.map_frame._height.value,this.map_frame._width.value,e);return this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0}return!1},e.prototype.has_finished=function(){if(!t.prototype.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(var e=0,i=this._tiles;en&&(r=this.extent,l=n,c=!0),c&&(this.x_range.setv({x_range:{start:r[0],end:r[2]}}),this.y_range.setv({start:r[1],end:r[3]}),this.extent=r),this.extent=r;for(var u=e.get_tiles_by_extent(r,l),_=[],p=[],d=[],f=[],v=0,m=u;v=o?[1,_/o]:[o/_,1])[0];t[0]<=e[0]?(n=t[0],(r=t[0]+c*p)>s&&(r=s)):(r=t[0],(n=t[0]-c*p)l&&(d=l)):(d=t[1],(f=t[1]-c/o)r.end)&&(this.v_axis_only=!0),(io.end)&&(this.h_axis_only=!0)}null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e.prototype._pan=function(t){this._update(t.deltaX,t.deltaY),null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e.prototype._pan_end=function(t){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.push_state(\"pan\",{range:this.pan_info})},e.prototype._update=function(t,e){var i,n,r,o=this.plot_model.frame,s=t-this.last_dx,a=e-this.last_dy,l=o.bbox.h_range,h=l.start-s,c=l.end-s,u=o.bbox.v_range,_=u.start-a,p=u.end-a,d=this.model.dimensions;\"width\"!=d&&\"both\"!=d||this.v_axis_only?(i=l.start,n=l.end,r=0):(i=h,n=c,r=-s);var f,v,m;\"height\"!=d&&\"both\"!=d||this.h_axis_only?(f=u.start,v=u.end,m=0):(f=_,v=p,m=-a),this.last_dx=t,this.last_dy=e;var g=o.xscales,y=o.yscales,b={};for(var x in g){var w=g[x],k=w.r_invert(i,n),S=k[0],T=k[1];b[x]={start:S,end:T}}var C={};for(var A in y){var w=y[A],E=w.r_invert(f,v),S=E[0],T=E[1];C[A]={start:S,end:T}}this.pan_info={xrs:b,yrs:C,sdx:r,sdy:m},this.plot_view.update_range(this.pan_info,!0)},e}(r.GestureToolView);i.PanToolView=s;var a=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Pan\",i.event_type=\"pan\",i.default_order=10,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"PanTool\",this.prototype.default_view=s,this.define({dimensions:[o.Dimensions,\"both\"]})},Object.defineProperty(e.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"icon\",{get:function(){switch(this.dimensions){case\"both\":return\"bk-tool-icon-pan\";case\"width\":return\"bk-tool-icon-xpan\";case\"height\":return\"bk-tool-icon-ypan\"}},enumerable:!0,configurable:!0}),e}(r.GestureTool);i.PanTool=a,a.initClass()},function(t,e,i){var n=t(380),r=t(236),o=t(65),s=t(5),a=t(15),l=t(21),h=t(32),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.data={sx:[],sy:[]}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){return e._active_change()})},e.prototype._active_change=function(){this.model.active||this._clear_data()},e.prototype._keyup=function(t){t.keyCode==s.Keys.Enter&&this._clear_data()},e.prototype._doubletap=function(t){var e=t.shiftKey;this._do_select(this.data.sx,this.data.sy,!0,e),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()},e.prototype._clear_data=function(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e=t.sx,i=t.sy,n=this.plot_model.frame;n.bbox.contains(e,i)&&(this.data.sx.push(e),this.data.sy.push(i),this.model.overlay.update({xs:l.copy(this.data.sx),ys:l.copy(this.data.sy)}))},e.prototype._do_select=function(t,e,i,n){var r={type:\"poly\",sx:t,sy:e};this._select(r,i,n)},e.prototype._emit_callback=function(t){var e=this.computed_renderers[0],i=this.plot_model.frame,n=i.xscales[e.x_range_name],r=i.yscales[e.y_range_name],o=n.v_invert(t.sx),s=r.v_invert(t.sy),a=h.extend({x:o,y:s},t);this.model.callback.execute(this.model,{geometry:a})},e}(r.SelectToolView);i.PolySelectToolView=c;var u=function(){return new o.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]}})},_=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Poly Select\",i.icon=\"bk-tool-icon-polygon-select\",i.event_type=\"tap\",i.default_order=11,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"PolySelectTool\",this.prototype.default_view=c,this.define({callback:[a.Instance],overlay:[a.Instance,u]})},e}(r.SelectTool);i.PolySelectTool=_,_.initClass()},function(t,e,i){var n=t(380),r=t(232),o=t(170),s=t(251),a=t(15),l=t(32),h=t(5),c=t(3),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),Object.defineProperty(e.prototype,\"computed_renderers\",{get:function(){var t=this.model.renderers,e=this.plot_model.plot.renderers,i=this.model.names;return s.compute_renderers(t,e,i)},enumerable:!0,configurable:!0}),e.prototype._computed_renderers_by_data_source=function(){for(var t={},e=0,i=this.computed_renderers;e.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,i,n,r,o=this.plot_model.frame,s=o.bbox.h_range,a=o.bbox.v_range,l=[s.start,s.end],h=l[0],c=l[1],u=[a.start,a.end],_=u[0],p=u[1];switch(this.model.dimension){case\"height\":var d=Math.abs(p-_);e=h,i=c,n=_-d*t,r=p-d*t;break;case\"width\":var f=Math.abs(c-h);e=h-f*t,i=c-f*t,n=_,r=p;break;default:throw new Error(\"this shouldn't have happened\")}var v=o.xscales,m=o.yscales,g={};for(var y in v){var b=v[y],x=b.r_invert(e,i),w=x[0],k=x[1];g[y]={start:w,end:k}}var S={};for(var T in m){var b=m[T],C=b.r_invert(n,r),w=C[0],k=C[1];S[T]={start:w,end:k}}var A={xrs:g,yrs:S,factor:t};this.plot_view.push_state(\"wheel_pan\",{range:A}),this.plot_view.update_range(A,!1,!0),null!=this.model.document&&this.model.document.interactive_start(this.plot_model.plot)},e}(r.GestureToolView);i.WheelPanToolView=s;var a=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Wheel Pan\",i.icon=\"bk-tool-icon-wheel-pan\",i.event_type=\"scroll\",i.default_order=12,i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"WheelPanTool\",this.prototype.default_view=s,this.define({dimension:[o.Dimension,\"width\"]}),this.internal({speed:[o.Number,.001]})},Object.defineProperty(e.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)},enumerable:!0,configurable:!0}),e}(r.GestureTool);i.WheelPanTool=a,a.initClass()},function(t,e,i){var n=t(380),r=t(232),o=t(46),s=t(15),a=t(20),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._pinch=function(t){var e,i=t.sx,n=t.sy,r=t.scale;e=r>=1?20*(r-1):-20/r,this._scroll({type:\"mousewheel\",sx:i,sy:n,delta:e})},e.prototype._scroll=function(t){var e=this.plot_model.frame,i=e.bbox.h_range,n=e.bbox.v_range,r=t.sx,s=t.sy,a=this.model.dimensions,l=(\"width\"==a||\"both\"==a)&&i.start=0){var v=c.match(/\\$color(\\[.*\\])?:(\\w*)/),g=v[1],y=void 0===g?\"\":g,b=v[2],x=t.get_column(b);if(null==x){var w=p.span({},b+\" unknown\");d.appendChild(w);continue}var k=y.indexOf(\"hex\")>=0,S=y.indexOf(\"swatch\")>=0,T=m.isNumber(e)?x[e]:null;if(null==T){var C=p.span({},\"(null)\");d.appendChild(C);continue}k&&(T=f.color2hex(T));var r=p.span({},T);d.appendChild(r),S&&(r=p.span({class:\"bk-tooltip-color-block\",style:{backgroundColor:T}},\" \"),d.appendChild(r))}else{var r=p.span();r.innerHTML=_.replace_placeholders(c.replace(\"$~\",\"$data_\"),t,e,this.model.formatters,i),d.appendChild(r)}}return o},e}(s.InspectToolView);i.HoverToolView=y;var b=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Hover\",i.icon=\"bk-tool-icon-hover\",i}return o.__extends(e,t),e.initClass=function(){this.prototype.type=\"HoverTool\",this.prototype.default_view=y,this.define({tooltips:[d.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"screen (x, y)\",\"($sx, $sy)\"]]],formatters:[d.Any,{}],renderers:[d.Any,\"auto\"],names:[d.Array,[]],mode:[d.String,\"mouse\"],point_policy:[d.String,\"snap_to_data\"],line_policy:[d.String,\"nearest\"],show_arrow:[d.Boolean,!0],anchor:[d.String,\"center\"],attachment:[d.String,\"horizontal\"],callback:[d.Any]})},e}(s.InspectTool);i.HoverTool=b,b.initClass()},function(t,e,i){var n=t(380),r=t(224),o=t(245),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.ButtonToolView);i.InspectToolView=a;var l=function(t){function e(e){var i=t.call(this,e)||this;return i.event_type=\"move\",i}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"InspectTool\",this.prototype.button_view=o.OnOffButtonView,this.define({toggleable:[s.Bool,!0]}),this.override({active:!0})},e}(r.ButtonTool);i.InspectTool=l,l.initClass()},function(t,e,i){var n=t(380),r=t(224),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.render=function(){t.prototype.render.call(this),this.model.active?this.el.classList.add(\"bk-active\"):this.el.classList.remove(\"bk-active\")},e.prototype._clicked=function(){var t=this.model.active;this.model.active=!t},e}(r.ButtonToolButtonView);i.OnOffButtonView=o},function(t,e,i){var n=t(380),r=t(15),o=t(48),s=t(21),a=t(53),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.plot_view=e.plot_view},Object.defineProperty(e.prototype,\"plot_model\",{get:function(){return this.plot_view.model},enumerable:!0,configurable:!0}),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){e.model.active?e.activate():e.deactivate()})},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(o.View);i.ToolView=l;var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Tool\",this.internal({active:[r.Boolean,!1]})},Object.defineProperty(e.prototype,\"synthetic_renderers\",{get:function(){return[]},enumerable:!0,configurable:!0}),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,i,n){var r,o=t[0],a=t[1],l=e[0],h=e[1],c=i.bbox.h_range;\"width\"==n||\"both\"==n?(r=[s.min([o,l]),s.max([o,l])],r=[s.max([r[0],c.start]),s.min([r[1],c.end])]):r=[c.start,c.end];var u,_=i.bbox.v_range;return\"height\"==n||\"both\"==n?(u=[s.min([a,h]),s.max([a,h])],u=[s.max([u[0],_.start]),s.min([u[1],_.end])]):u=[_.start,_.end],[r,u]},e}(a.Model);i.Tool=h,h.initClass()},function(t,e,i){var n=t(380),r=t(15),o=t(19),s=t(53),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"ToolProxy\",this.define({tools:[r.Array,[]],active:[r.Bool,!1],disabled:[r.Bool,!1]})},Object.defineProperty(e.prototype,\"button_view\",{get:function(){return this.tools[0].button_view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"event_type\",{get:function(){return this.tools[0].event_type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"tooltip\",{get:function(){return this.tools[0].tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"tool_name\",{get:function(){return this.tools[0].tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"icon\",{get:function(){return this.tools[0].icon},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.do=new o.Signal0(this,\"do\")},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.do,function(){return e.doit()}),this.connect(this.properties.active.change,function(){return e.set_active()})},e.prototype.doit=function(){for(var t=0,e=this.tools;t0){var k=b(w);u.tools.push(k),this.connect(k.properties.active.change,this._active_change.bind(this,k))}}}this.actions=[];for(var x in i){var w=i[x];w.length>0&&this.actions.push(b(w))}this.inspectors=[];for(var x in e){var w=e[x];w.length>0&&this.inspectors.push(b(w,!0))}for(var S in this.gestures){var u=this.gestures[S];0!=u.tools.length&&(u.tools=l.sortBy(u.tools,function(t){return t.default_order}),\"pinch\"!=S&&\"scroll\"!=S&&\"multi\"!=S&&(u.tools[0].active=!0))}var T},e}(p.ToolbarBase);i.ProxyToolbar=m,m.initClass();var g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.model.toolbar.toolbar_location=this.model.toolbar_location,this._toolbar_views={},v.build_views(this._toolbar_views,[this.model.toolbar],{parent:this})},e.prototype.remove=function(){v.remove_views(this._toolbar_views),t.prototype.remove.call(this)},e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(\"bk-toolbar-box\")},e.prototype.render=function(){t.prototype.render.call(this);var e=this._toolbar_views[this.model.toolbar.id];e.render(),o.empty(this.el),this.el.appendChild(e.el)},e.prototype.get_width=function(){return this.model.toolbar.vertical?30:null},e.prototype.get_height=function(){return this.model.toolbar.horizontal?30:null},e}(f.LayoutDOMView);i.ToolbarBoxView=g;var y=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"ToolbarBox\",this.prototype.default_view=g,this.define({toolbar:[r.Instance],toolbar_location:[r.Location,\"right\"]})},Object.defineProperty(e.prototype,\"sizing_mode\",{get:function(){switch(this.toolbar_location){case\"above\":case\"below\":return\"scale_width\";case\"left\":case\"right\":return\"scale_height\"}},enumerable:!0,configurable:!0}),e}(f.LayoutDOM);i.ToolbarBox=y,y.initClass()},function(t,e,i){var n=t(169),r=t(170),o=t(21);i.compute_renderers=function(t,e,i){if(null==t)return[];var s;s=\"auto\"==t?e.filter(function(t){return t instanceof n.GlyphRenderer||t instanceof r.GraphRenderer}):t;i.length>0&&(s=s.filter(function(t){return o.includes(i,t.name)}));return s}},function(t,e,i){var n=t(380),r=t(259),o=t(15),s=t(32),a=t(38),l=function(e){function i(t){return e.call(this,t)||this}return n.__extends(i,e),i.initClass=function(){this.prototype.type=\"CustomJSTransform\",this.define({args:[o.Any,{}],func:[o.String,\"\"],v_func:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(i.prototype,\"names\",{get:function(){return s.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"values\",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),i.prototype._make_transform=function(t,e){var i=this.use_strict?a.use_strict(e):e;return new(Function.bind.apply(Function,[void 0].concat(this.names,[t,\"require\",\"exports\",i])))},Object.defineProperty(i.prototype,\"scalar_transform\",{get:function(){return this._make_transform(\"x\",this.func)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"vector_transform\",{get:function(){return this._make_transform(\"xs\",this.v_func)},enumerable:!0,configurable:!0}),i.prototype.compute=function(e){return this.scalar_transform.apply(this,this.values.concat([e,t,{}]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,this.values.concat([e,t,{}]))},i}(r.Transform);i.CustomJSTransform=l,l.initClass()},function(t,e,i){var n=t(380),r=t(259),o=t(165),s=t(15),a=t(44),l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Dodge\",this.define({value:[s.Number,0],range:[s.Instance]})},e.prototype.v_compute=function(t){var e;if(this.range instanceof o.FactorRange)e=this.range.v_synthetic(t);else{if(!a.isArrayableOf(t,a.isNumber))throw new Error(\"unexpected\");e=t}for(var i=new Float64Array(e.length),n=0;ne.x?-1:t.x==e.x?0:1}):r.sort(function(t,e){return t.xthis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(t==this._x_sorted[0])return this._y_sorted[0];var e=r.findLastIndex(this._x_sorted,function(e){return ethis._x_sorted[this._x_sorted.length-1])return NaN}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}var e;switch(this.mode){case\"after\":e=s.findLastIndex(this._x_sorted,function(e){return t>=e});break;case\"before\":e=s.findIndex(this._x_sorted,function(e){return t<=e});break;case\"center\":var i=this._x_sorted.map(function(e){return Math.abs(e-t)}),n=s.min(i);e=s.findIndex(i,function(t){return n===t});break;default:throw new Error(\"unknown mode: \"+this.mode)}return-1!=e?this._y_sorted[e]:NaN},e}(r.Interpolator);i.StepInterpolator=a,a.initClass()},function(t,e,i){var n=t(380),r=t(53),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.initClass=function(){this.prototype.type=\"Transform\"},e}(r.Model);i.Transform=o,o.initClass()},function(t,e,i){\"function\"!=typeof WeakMap&&t(330),\"function\"!=typeof Set&&t(320),Number.isInteger||(Number.isInteger=function(t){return\"number\"==typeof t&&isFinite(t)&&Math.floor(t)===t});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=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 i=\"\";1==(1&t)&&(i+=e),0!=(t>>>=1);)e+=e;return i}),Array.from||(Array.from=function(){var t=Object.prototype.toString,e=function(e){return\"function\"==typeof e||\"[object Function]\"===t.call(e)},i=Math.pow(2,53)-1,n=function(t){var e=function(t){var e=Number(t);if(isNaN(e))return 0;if(0===e||!isFinite(e))return e;return(e>0?1:-1)*Math.floor(Math.abs(e))}(t);return Math.min(Math.max(e,0),i)};return function(t){var i=Object(t);if(null==t)throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");var r,o=arguments.length>1?arguments[1]:void 0;if(void 0!==o){if(!e(o))throw new TypeError(\"Array.from: when provided, the second argument must be a function\");arguments.length>2&&(r=arguments[2])}for(var s=n(i.length),a=e(this)?Object(new this(s)):new Array(s),l=0;l0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");var i=JSON.stringify(this.header),n=JSON.stringify(this.metadata),r=JSON.stringify(this.content);t.send(i),t.send(n),t.send(r)},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}();i.Message=r},function(t,e,i){var n=t(262),r=function(){function t(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){this._current_consumer(t)},t.prototype._HEADER=function(t){this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA},t.prototype._METADATA=function(t){this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT},t.prototype._CONTENT=function(t){this._assume_text(t),this._fragments.push(t);var e=this._fragments.slice(0,3),i=e[0],r=e[1],o=e[2];this._partial=n.Message.assemble(i,r,o),this._check_complete()},t.prototype._BUFFER_HEADER=function(t){this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD},t.prototype._BUFFER_PAYLOAD=function(t){this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete()},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(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER},t}();i.Receiver=r},function(t,e,i){i.safely=function(t,e){void 0===e&&(e=!1);try{return t()}catch(t){if(function(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\",e.classList.add(\"bokeh-error-box-into-flames\");var i=document.createElement(\"span\");i.style.backgroundColor=\"#a94442\",i.style.borderRadius=\"0px 4px 0px 0px\",i.style.color=\"white\",i.style.cursor=\"pointer\",i.style.cssFloat=\"right\",i.style.fontSize=\"0.8em\",i.style.margin=\"-6px -6px 0px 0px\",i.style.padding=\"2px 5px 4px 5px\",i.title=\"close\",i.setAttribute(\"aria-label\",\"close\"),i.appendChild(document.createTextNode(\"x\")),i.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 r=document.createElement(\"pre\");r.style.whiteSpace=\"unset\",r.style.overflowX=\"auto\",r.appendChild(document.createTextNode(t.message||t)),e.appendChild(i),e.appendChild(n),e.appendChild(r);var o=document.getElementsByTagName(\"body\")[0];o.insertBefore(e,o.firstChild)}(t),e)return;throw t}}},function(t,e,i){i.version=\"0.12.16\"},/*!!\n", + " * Canvas 2 Svg v1.0.21\n", + " * A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document.\n", + " *\n", + " * Licensed under the MIT license:\n", + " * http://www.opensource.org/licenses/mit-license.php\n", + " *\n", + " * Author:\n", + " * Kerry Liu\n", + " *\n", + " * Copyright (c) 2014 Gliffy Inc.\n", + " */\n", + " function(t,e,i){!function(){\"use strict\";function t(t,e){var i,n=Object.keys(e);for(i=0;i1?((e=i).width=arguments[0],e.height=arguments[1]):e=t||i,!(this instanceof r))return new r(e);this.width=e.width||i.width,this.height=e.height||i.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:i.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\"),this.__root.appendChild(this.__currentElement)}).prototype.__createElement=function(t,e,i){void 0===e&&(e={});var n,r,o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(i&&(o.setAttribute(\"fill\",\"none\"),o.setAttribute(\"stroke\",\"none\")),n=0;n0){\"path\"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var i=this.__createElement(\"g\");e.appendChild(i),this.__currentElement=i}var n=this.__currentElement.getAttribute(\"transform\");n?n+=\" \":n=\"\",n+=t,this.__currentElement.setAttribute(\"transform\",n)},r.prototype.scale=function(e,i){void 0===i&&(i=e),this.__addTransform(t(\"scale({x},{y})\",{x:e,y:i}))},r.prototype.rotate=function(e){var i=180*e/Math.PI;this.__addTransform(t(\"rotate({angle},{cx},{cy})\",{angle:i,cx:0,cy:0}))},r.prototype.translate=function(e,i){this.__addTransform(t(\"translate({x},{y})\",{x:e,y:i}))},r.prototype.transform=function(e,i,n,r,o,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:i,c:n,d:r,e:o,f:s}))},r.prototype.beginPath=function(){var t;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t},r.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)},r.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},r.prototype.moveTo=function(e,i){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:i},this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:i}))},r.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},r.prototype.lineTo=function(e,i){this.__currentPosition={x:e,y:i},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(t(\"L {x} {y}\",{x:e,y:i})):this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:i}))},r.prototype.bezierCurveTo=function(e,i,n,r,o,s){this.__currentPosition={x:o,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:i,cp2x:n,cp2y:r,x:o,y:s}))},r.prototype.quadraticCurveTo=function(e,i,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:i,x:n,y:r}))};var l=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};r.prototype.arcTo=function(t,e,i,n,r){var o=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(void 0!==o&&void 0!==s){if(r<0)throw new Error(\"IndexSizeError: The radius provided (\"+r+\") is negative.\");if(o===t&&s===e||t===i&&e===n||0===r)this.lineTo(t,e);else{var a=l([o-t,s-e]),h=l([i-t,n-e]);if(a[0]*h[1]!=a[1]*h[0]){var c=a[0]*h[0]+a[1]*h[1],u=Math.acos(Math.abs(c)),_=l([a[0]+h[0],a[1]+h[1]]),p=r/Math.sin(u/2),d=t+p*_[0],f=e+p*_[1],v=[-a[1],a[0]],m=[h[1],-h[0]],g=function(t){var e=t[0],i=t[1];return i>=0?Math.acos(e):-Math.acos(e)},y=g(v),b=g(m);this.lineTo(d+v[0]*r,f+v[1]*r),this.arc(d,f,r,y,b)}else this.lineTo(t,e)}}},r.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},r.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},r.prototype.rect=function(t,e,i,n){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()},r.prototype.fillRect=function(t,e,i,n){var r;r=this.__createElement(\"rect\",{x:t,y:e,width:i,height:n},!0),this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement(\"fill\")},r.prototype.strokeRect=function(t,e,i,n){var r;r=this.__createElement(\"rect\",{x:t,y:e,width:i,height:n},!0),this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement(\"stroke\")},r.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute(\"transform\"),i=this.__root.childNodes[1],n=i.childNodes,r=n.length-1;r>=0;r--)n[r]&&i.removeChild(n[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)},r.prototype.clearRect=function(t,e,i,n){if(0!==t||0!==e||i!==this.width||n!==this.height){var r,o=this.__closestGroupOrSvg();r=this.__createElement(\"rect\",{x:t,y:e,width:i,height:n,fill:\"#FFFFFF\"},!0),o.appendChild(r)}else this.__clearCanvas()},r.prototype.createLinearGradient=function(t,e,n,r){var s=this.__createElement(\"linearGradient\",{id:i(this.__ids),x1:t+\"px\",x2:n+\"px\",y1:e+\"px\",y2:r+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(s),new o(s,this)},r.prototype.createRadialGradient=function(t,e,n,r,s,a){var l=this.__createElement(\"radialGradient\",{id:i(this.__ids),cx:r+\"px\",cy:s+\"px\",r:a+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(l),new o(l,this)},r.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.exec(this.font),e={style:t[1]||\"normal\",size:t[4]||\"10px\",family:t[6]||\"sans-serif\",weight:t[3]||\"normal\",decoration:t[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(e.decoration=\"underline\"),this.__fontHref&&(e.href=this.__fontHref),e},r.prototype.__wrapTextLink=function(t,e){if(t.href){var i=this.__createElement(\"a\");return i.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),i.appendChild(e),i}return e},r.prototype.__applyText=function(t,e,i,n){var r=this.__parseFont(),o=this.__closestGroupOrSvg(),s=this.__createElement(\"text\",{\"font-family\":r.family,\"font-size\":r.size,\"font-style\":r.style,\"font-weight\":r.weight,\"text-decoration\":r.decoration,x:e,y:i,\"text-anchor\":function(t){var e={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"};return e[t]||e.start}(this.textAlign),\"dominant-baseline\":function(t){var e={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return e[t]||e.alphabetic}(this.textBaseline)},!0);s.appendChild(this.__document.createTextNode(t)),this.__currentElement=s,this.__applyStyleToCurrentElement(n),o.appendChild(this.__wrapTextLink(r,s))},r.prototype.fillText=function(t,e,i){this.__applyText(t,e,i,\"fill\")},r.prototype.strokeText=function(t,e,i){this.__applyText(t,e,i,\"stroke\")},r.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},r.prototype.arc=function(e,i,n,r,o,s){if(r!==o){r%=2*Math.PI,o%=2*Math.PI,r===o&&(o=(o+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+n*Math.cos(o),l=i+n*Math.sin(o),h=e+n*Math.cos(r),c=i+n*Math.sin(r),u=s?0:1,_=0,p=o-r;p<0&&(p+=2*Math.PI),_=s?p>Math.PI?0:1:p>Math.PI?1:0,this.lineTo(h,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:_,sweepFlag:u,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},r.prototype.clip=function(){var e=this.__closestGroupOrSvg(),n=this.__createElement(\"clipPath\"),r=i(this.__ids),o=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute(\"id\",r),n.appendChild(this.__currentElement),this.__defs.appendChild(n),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:r})),e.appendChild(o),this.__currentElement=o},r.prototype.drawImage=function(){var t,e,i,n,o,s,a,l,h,c,u,_,p,d,f=Array.prototype.slice.call(arguments),v=f[0],m=0,g=0;if(3===f.length)t=f[1],e=f[2],o=v.width,s=v.height,i=o,n=s;else if(5===f.length)t=f[1],e=f[2],i=f[3],n=f[4],o=v.width,s=v.height;else{if(9!==f.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);m=f[1],g=f[2],o=f[3],s=f[4],t=f[5],e=f[6],i=f[7],n=f[8]}a=this.__closestGroupOrSvg(),this.__currentElement;var y=\"translate(\"+t+\", \"+e+\")\";if(v instanceof r){if((l=v.getSvg().cloneNode(!0)).childNodes&&l.childNodes.length>1){for(h=l.childNodes[0];h.childNodes.length;)d=h.childNodes[0].getAttribute(\"id\"),this.__ids[d]=d,this.__defs.appendChild(h.childNodes[0]);if(c=l.childNodes[1]){var b,x=c.getAttribute(\"transform\");b=x?x+\" \"+y:y,c.setAttribute(\"transform\",b),a.appendChild(c)}}}else\"IMG\"===v.nodeName?((u=this.__createElement(\"image\")).setAttribute(\"width\",i),u.setAttribute(\"height\",n),u.setAttribute(\"preserveAspectRatio\",\"none\"),(m||g||o!==v.width||s!==v.height)&&((_=this.__document.createElement(\"canvas\")).width=i,_.height=n,(p=_.getContext(\"2d\")).drawImage(v,m,g,o,s,0,0,i,n),v=_),u.setAttribute(\"transform\",y),u.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===v.nodeName?v.toDataURL():v.getAttribute(\"src\")),a.appendChild(u)):\"CANVAS\"===v.nodeName&&((u=this.__createElement(\"image\")).setAttribute(\"width\",i),u.setAttribute(\"height\",n),u.setAttribute(\"preserveAspectRatio\",\"none\"),(_=this.__document.createElement(\"canvas\")).width=i,_.height=n,(p=_.getContext(\"2d\")).imageSmoothingEnabled=!1,p.mozImageSmoothingEnabled=!1,p.oImageSmoothingEnabled=!1,p.webkitImageSmoothingEnabled=!1,p.drawImage(v,m,g,o,s,0,0,i,n),v=_,u.setAttribute(\"transform\",y),u.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",v.toDataURL()),a.appendChild(u))},r.prototype.createPattern=function(t,e){var n,o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),a=i(this.__ids);return o.setAttribute(\"id\",a),o.setAttribute(\"width\",t.width),o.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?((n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\")).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\")),o.appendChild(n),this.__defs.appendChild(o)):t instanceof r&&(o.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(o)),new s(o,this)},r.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},r.prototype.drawFocusRing=function(){},r.prototype.createImageData=function(){},r.prototype.getImageData=function(){},r.prototype.putImageData=function(){},r.prototype.globalCompositeOperation=function(){},r.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=r),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=r)}()},function(t,e,i){var n,r=t(290),o=t(300),s=t(304),a=t(299),l=t(304),h=t(306),c=Function.prototype.bind,u=Object.defineProperty,_=Object.prototype.hasOwnProperty;n=function(t,e,i){var n,o=h(e)&&l(e.value);return n=r(e),delete n.writable,delete n.value,n.get=function(){return!i.overwriteDefinition&&_.call(this,t)?o:(e.value=c.call(o,i.resolveContext?i.resolveContext(this):this),u(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,i){return n(i,t,e)})}},function(t,e,i){var n=t(287),r=t(300),o=t(293),s=t(307);(e.exports=function(t,e){var i,o,a,l,h;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=a=!0,o=!1):(i=s.call(t,\"c\"),o=s.call(t,\"e\"),a=s.call(t,\"w\")),h={value:e,configurable:i,enumerable:o,writable:a},l?n(r(l),h):h}).gs=function(t,e,i){var a,l,h,c;return\"string\"!=typeof t?(h=i,i=e,e=t,t=null):h=arguments[3],null==e?e=void 0:o(e)?null==i?i=void 0:o(i)||(h=i,i=void 0):(h=e,e=i=void 0),null==t?(a=!0,l=!1):(a=s.call(t,\"c\"),l=s.call(t,\"e\")),c={get:e,set:i,configurable:a,enumerable:l},h?n(r(h),c):c}},function(t,e,i){var n=t(306);e.exports=function(){return n(this).length=0,this}},function(t,e,i){var n=t(281),r=t(285),o=t(306),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,h=Math.floor;e.exports=function(t){var e,i,c,u;if(!n(t))return s.apply(this,arguments);for(i=r(o(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?h(c):r(this.length)-h(l(c)),e=c;e=55296&&g<=56319&&(w+=t[++i]),w=k?_.call(k,S,w,f):w,e?(p.value=w,d(v,f,p)):v[f]=w,++f;m=f}if(void 0===m)for(m=s(t.length),e&&(v=new e(m)),i=0;i0?1:-1}},function(t,e,i){e.exports=t(282)()?Number.isNaN:t(283)},function(t,e,i){e.exports=function(){var t=Number.isNaN;return\"function\"==typeof t&&(!t({})&&t(NaN)&&!t(34))}},function(t,e,i){e.exports=function(t){return t!=t}},function(t,e,i){var n=t(278),r=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*o(r(t)):t}},function(t,e,i){var n=t(284),r=Math.max;e.exports=function(t){return r(0,n(t))}},function(t,e,i){var n=t(304),r=t(306),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(i,h){var c,u=arguments[2],_=arguments[3];return i=Object(r(i)),n(h),c=a(i),_&&c.sort(\"function\"==typeof _?o.call(_,i):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,n){return l.call(i,t)?s.call(h,u,i[t],t,i,n):e})}}},function(t,e,i){e.exports=t(288)()?Object.assign:t(289)},function(t,e,i){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,i){var n=t(296),r=t(306),o=Math.max;e.exports=function(t,e){var i,s,a,l=o(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(t){i||(i=t)}},s=1;s-1}},function(t,e,i){var n=Object.prototype.toString,r=n.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||n.call(t)===r)||!1}},function(t,e,i){var n=Object.create(null),r=Math.random;e.exports=function(){var t;do{t=r().toString(36).slice(2)}while(n[t]);return t}},function(t,e,i){var n,r=t(301),o=t(307),s=t(268),a=t(325),l=t(315),h=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");l.call(this,t),e=e?o.call(e,\"key+value\")?\"key+value\":o.call(e,\"key\")?\"key\":\"value\":\"value\",h(this,\"__kind__\",s(\"\",e))},r&&r(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t})}),h(n.prototype,a.toStringTag,s(\"c\",\"Array Iterator\"))},function(t,e,i){var n=t(274),r=t(304),o=t(310),s=t(314),a=Array.isArray,l=Function.prototype.call,h=Array.prototype.some;e.exports=function(t,e){var i,c,u,_,p,d,f,v,m=arguments[2];if(a(t)||n(t)?i=\"array\":o(t)?i=\"string\":t=s(t),r(e),u=function(){_=!0},\"array\"!==i)if(\"string\"!==i)for(c=t.next();!c.done;){if(l.call(e,m,c.value,u),_)return;c=t.next()}else for(d=t.length,p=0;p=55296&&v<=56319&&(f+=t[++p]),l.call(e,m,f,u),!_);++p);else h.call(t,function(t){return l.call(e,m,t,u),_})}},function(t,e,i){var n=t(274),r=t(310),o=t(312),s=t(317),a=t(318),l=t(325).iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():n(t)?new o(t):r(t)?new s(t):new o(t)}},function(t,e,i){var n,r=t(269),o=t(287),s=t(304),a=t(306),l=t(268),h=t(267),c=t(325),u=Object.defineProperty,_=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");_(this,{__list__:l(\"w\",a(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),e&&(s(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear))},delete n.prototype.constructor,_(n.prototype,o({_next:l(function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,i){e>=t&&(this.__redo__[i]=++e)},this),this.__redo__.push(t)):u(this,\"__redo__\",l(\"c\",[t])))}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,i){e>t&&(this.__redo__[i]=--e)},this)))}),_onClear:l(function(){this.__redo__&&r.call(this.__redo__),this.__nextIndex__=0})}))),u(n.prototype,c.iterator,l(function(){return this}))},function(t,e,i){var n=t(274),r=t(295),o=t(310),s=t(325).iterator,a=Array.isArray;e.exports=function(t){return!!r(t)&&(!!a(t)||(!!o(t)||(!!n(t)||\"function\"==typeof t[s])))}},function(t,e,i){var n,r=t(301),o=t(268),s=t(325),a=t(315),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");t=String(t),a.call(this,t),l(this,\"__length__\",o(\"\",t.length))},r&&r(n,a),delete n.prototype.constructor,n.prototype=Object.create(a.prototype,{_next:o(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?i+this.__list__[this.__nextIndex__++]:i})}),l(n.prototype,s.toStringTag,o(\"c\",\"String Iterator\"))},function(t,e,i){var n=t(316);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not iterable\");return t}},/*!\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(t,e,i){(function(){\"use strict\";function i(t){return\"function\"==typeof t}function n(){return function(){setTimeout(r,1)}}function r(){for(var t=0;t=r)){for(var o=e[n+r>>1],s=n-1,a=r+1;;){do{s++}while(e[s]o);if(s>=a)break;!function(t,e,i,n){var r=t[i];t[i]=t[n],t[n]=r;var o=5*i,s=5*n,a=e[o],l=e[o+1],h=e[o+2],c=e[o+3],u=e[o+4];e[o]=e[s],e[o+1]=e[s+1],e[o+2]=e[s+2],e[o+3]=e[s+3],e[o+4]=e[s+4],e[s]=a,e[s+1]=l,e[s+2]=h,e[s+3]=c,e[s+4]=u}(e,i,s,a)}t(e,i,n,a),t(e,i,a+1,r)}}var e=function(t,e,i,n){if(void 0===t)throw new Error(\"Missing required argument: numItems.\");if(isNaN(t)||t<=0)throw new Error(\"Unpexpected numItems value: \"+t);this.numItems=+t,this.nodeSize=Math.max(+e||16,2),this.ArrayType=i||Float64Array;var r=t,o=r;this._levelBounds=[5*r];do{r=Math.ceil(r/this.nodeSize),o+=r,this._levelBounds.push(5*o)}while(1!==r);if(n){if(n instanceof ArrayBuffer)this.data=new this.ArrayType(n);else{if(!(n instanceof i))throw new Error(\"Data must be an instance of \"+i.name+\" or ArrayBuffer.\");this.data=n}this._numAdded=t,this._pos=5*o,this.minX=this.data[this._pos-4],this.minY=this.data[this._pos-3],this.maxX=this.data[this._pos-2],this.maxY=this.data[this._pos-1]}else this.data=new this.ArrayType(5*o),this._numAdded=0,this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0};return e.prototype.add=function(t,e,i,n){this.data[this._pos++]=this._numAdded++,this.data[this._pos++]=t,this.data[this._pos++]=e,this.data[this._pos++]=i,this.data[this._pos++]=n,tthis.maxX&&(this.maxX=i),n>this.maxY&&(this.maxY=n)},e.prototype.finish=function(){if(this._numAdded!==this.numItems)throw new Error(\"Added \"+this._numAdded+\" items when expected \"+this.numItems);for(var e=this.maxX-this.minX,i=this.maxY-this.minY,n=new Uint32Array(this.numItems),r=0;r>1,a=i>>1^i,l=r>>1^n&o>>1^r,h=i&r>>1^o>>1^o;a=(i=s)&(n=a)>>2^n&(i^n)>>2,l^=i&(r=l)>>2^n&(o=h)>>2,h^=n&r>>2^(i^n)&o>>2,a=(i=s=i&i>>2^n&n>>2)&(n=a)>>4^n&(i^n)>>4,l^=i&(r=l)>>4^n&(o=h)>>4,h^=n&r>>4^(i^n)&o>>4,l^=(i=s=i&i>>4^n&n>>4)&(r=l)>>8^(n=a)&(o=h)>>8;var c=t^e,u=(n=(h^=n&r>>8^(i^n)&o>>8)^h>>1)|65535^(c|(i=l^l>>1));return c=16711935&(c|c<<8),c=252645135&(c|c<<4),c=858993459&(c|c<<2),c=1431655765&(c|c<<1),u=16711935&(u|u<<8),u=252645135&(u|u<<4),u=858993459&(u|u<<2),((u=1431655765&(u|u<<1))<<1|c)>>>0}(c,u)}t(n,this.data,0,this.numItems-1);for(var _=0,p=0;_m&&(m=k),S>g&&(g=S)}this.data[this._pos++]=y,this.data[this._pos++]=f,this.data[this._pos++]=v,this.data[this._pos++]=m,this.data[this._pos++]=g}},e.prototype.search=function(t,e,i,n,r){if(this._pos!==this.data.length)throw new Error(\"Data not yet indexed - call index.finish().\");for(var o=this.data.length-5,s=this._levelBounds.length-1,a=[],l=[];void 0!==o;){for(var h=Math.min(o+5*this.nodeSize,this._levelBounds[s]),c=o;cthis.data[c+3]||e>this.data[c+4]||(o<5*this.numItems?(void 0===r||r(u))&&l.push(u):(a.push(u),a.push(s-1))))}s=a.pop(),o=a.pop()}return l},e})},/*! 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(t,e,i){!function(t,i,n,r){\"use strict\";function o(t,e,i){return setTimeout(c(t,i),e)}function s(t,e,i){return!!Array.isArray(t)&&(a(t,i[e],i),!0)}function a(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==r)for(n=0;n\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&K(n,i)}function c(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==et?t.apply(e?e[0]||r:r,e):t}function _(t,e){return t===r?e:t}function p(t,e,i){a(m(e),function(e){t.addEventListener(e,i,!1)})}function d(t,e,i){a(m(e),function(e){t.removeEventListener(e,i,!1)})}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function v(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\\s+/g)}function g(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function x(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=T(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,a=i.firstMultiple,l=a?a.center:s.center,h=e.center=C(n);e.timeStamp=rt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=O(l,h),e.distance=M(l,h),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==_t&&o.eventType!==dt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=E(e.deltaX,e.deltaY);var c=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=nt(c.x)>nt(c.y)?c.x:c.y,e.scale=a?function(t,e){return M(e[0],e[1],Tt)/M(t[0],t[1],Tt)}(a.pointers,n):1,e.rotation=a?function(t,e){return O(e[1],e[0],Tt)+O(t[1],t[0],Tt)}(a.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=ft&&(l>ut||a.velocity===r)){var h=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,u=A(l,h,c);n=u.x,o=u.y,i=nt(u.x)>nt(u.y)?u.x:u.y,s=E(h,c),t.lastInterval=e}else i=a.velocity,n=a.velocityX,o=a.velocityY,s=a.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u=t.element;f(e.srcEvent.target,u)&&(u=e.srcEvent.target);e.target=u}(t,i),t.emit(\"hammer.input\",i),t.recognize(i),t.session.prevInput=i}function T(t){for(var e=[],i=0;i=nt(e)?t<0?mt:gt:e<0?yt:bt}function M(t,e,i){i||(i=St);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function O(t,e,i){i||(i=St);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function z(){this.evEl=At,this.evWin=Et,this.pressed=!1,k.apply(this,arguments)}function P(){this.evEl=zt,this.evWin=Pt,k.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function j(){this.evTarget=Nt,this.evWin=Ft,this.started=!1,k.apply(this,arguments)}function N(){this.evTarget=It,this.targetIds={},k.apply(this,arguments)}function F(){k.apply(this,arguments);var t=c(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new z(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function D(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)};setTimeout(r,Rt)}}function I(t,e){this.manager=t,this.set(e)}function R(t){this.options=K({},this.defaults,t||{}),this.id=at++,this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=Wt,this.simultaneous={},this.requireFail=[]}function L(t){return t&Zt?\"cancel\":t&$t?\"end\":t&Qt?\"move\":t&Jt?\"start\":\"\"}function B(t){return t==bt?\"down\":t==yt?\"up\":t==mt?\"left\":t==gt?\"right\":\"\"}function V(t,e){var i=e.manager;return i?i.get(t):t}function G(){R.apply(this,arguments)}function U(){G.apply(this,arguments),this.pX=null,this.pY=null}function q(){G.apply(this,arguments)}function Y(){R.apply(this,arguments),this._timer=null,this._input=null}function X(){G.apply(this,arguments)}function H(){G.apply(this,arguments)}function W(){R.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function J(t,e){return e=e||{},e.recognizers=_(e.recognizers,J.defaults.preset),new Q(t,e)}function Q(t,e){this.options=K({},J.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e,i=t.options.inputClass;e=i||(ht?P:ct?N:lt?F:z);return new e(t,S)}(this),this.touchAction=new I(this,this.options.touchAction),$(this,!0),a(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,e){var i=t.element;if(i.style){var n;a(t.options.cssProps,function(r,o){n=x(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||\"\"}),e||(t.oldCssProps={})}}var K,Z=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],tt=i.createElement(\"div\"),et=\"function\",it=Math.round,nt=Math.abs,rt=Date.now;K=\"function\"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),i=1;i-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){i.manager.emit(e,t)}var i=this,n=this.state;n<$t&&e(i.options.event+L(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=$t&&e(i.options.event+L(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return G.prototype.attrTest.call(this,t)&&(this.state&Jt||!(this.state&Jt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=B(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(q,G,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Jt)},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)}}),h(Y,R,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Gt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(dt|ft)&&!r)this.reset();else if(t.eventType&_t)this.reset(),this._timer=o(function(){this.state=Kt,this.tryEmit()},e.time,this);else if(t.eventType&dt)return Kt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Kt&&(t&&t.eventType&dt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=rt(),this.manager.emit(this.options.event,this._input)))}}),h(X,G,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Jt)}}),h(H,G,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:xt|wt,pointers:1},getTouchAction:function(){return U.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(xt|wt)?e=t.overallVelocity:i&xt?e=t.overallVelocityX:i&wt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&nt(e)>this.options.velocity&&t.eventType&dt},emit:function(t){var e=B(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(W,R,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ut]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=\";case n.Eq:return\"==\"}}()+\" 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}();i.Constraint=o;var s=0},function(t,e,i){var n=t(346),r=t(349),o=t(340),s=function(){function t(){var t=function(t){for(var e=0,i=function(){return 0},n=o.createMap(r.Variable.Compare),s=0,a=t.length;s=0?\" + \"+l+a:\" - \"+-l+a}var h=this.constant;return h<0?i+=\" - \"+-h:h>0&&(i+=\" + \"+h),i},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 n.forEach(this._terms,function(e){t+=e.first.value*e.second}),t},enumerable:!0,configurable:!0}),t}();i.Expression=s},function(t,e,i){/*-----------------------------------------------------------------------------\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)i.hasOwnProperty(e)||(i[e]=t[e])}n(t(349)),n(t(338)),n(t(337)),n(t(342)),n(t(341))},function(t,e,i){var n=t(346);i.createMap=function(t){return new n.AssociativeArray(t)}},function(t,e,i){function n(t){return t<0?-t<1e-8:t<1e-8}var r=t(349),o=t(338),s=t(337),a=t(342),l=t(340),h=t(346),c=function(){function t(){this._cnMap=l.createMap(s.Constraint.Compare),this._rowMap=l.createMap(_.Compare),this._varMap=l.createMap(r.Variable.Compare),this._editMap=l.createMap(r.Variable.Compare),this._infeasibleRows=[],this._objective=new d,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 i=this._createRow(t),r=i.row,o=i.tag,s=this._chooseSubject(r,o);if(s.type()===u.Invalid&&r.allDummies()){if(!n(r.constant())){for(var a=[],l=0,h=t.expression.terms._array;l0&&a.type()!==u.Dummy){var h=this._objective.coefficientFor(a),c=h/l;c0;)i(t[r=o+(n=s>>1)],e)<0?(o=r+1,s-=n+1):s=n;return o}var r=t(347);i.lowerBound=n,i.binarySearch=function(t,e,i){var r=n(t,e,i);if(r===t.length)return-1;var o=t[r];if(0!==i(o,e))return-1;return r},i.binaryFind=function(t,e,i){var r=n(t,e,i);if(r===t.length)return;var o=t[r];if(0!==i(o,e))return;return o},i.asSet=function(t,e){var i=r.asArray(t),n=i.length;if(n<=1)return i;i.sort(e);for(var o=[i[0]],s=1,a=0;s0))return!1;++r}}return!0},i.setIsSubset=function(t,e,i){var n=t.length,r=e.length;if(n>r)return!1;var o=0,s=0;for(;o0?++s:(++o,++s)}if(o0?(a.push(h),++r):(a.push(l),++n,++r)}for(;n0?++r:(a.push(l),++n,++r)}return a},i.setDifference=function(t,e,i){var n=0,r=0,o=t.length,s=e.length,a=[];for(;n0?++r:(++n,++r)}for(;n0?(a.push(h),++r):(++n,++r)}for(;n=0},e.prototype.find=function(t){return s.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var i=this._array,n=s.lowerBound(i,t,this._wrapped);if(n===i.length){var o=new r.Pair(t,e());return i.push(o),o}var a=i[n];if(0!==this._compare(a.first,t)){var o=new r.Pair(t,e());return i.splice(n,0,o),o}return a},e.prototype.insert=function(t,e){var i=this._array,n=s.lowerBound(i,t,this._wrapped);if(n===i.length){var o=new r.Pair(t,e);return i.push(o),o}var a=i[n];if(0!==this._compare(a.first,t)){var o=new r.Pair(t,e);return i.splice(n,0,o),o}return a.second=e,a},e.prototype.update=function(t){var i=this;t instanceof e?this._array=function(t,e,i){var n=0,r=0,o=t.length,s=e.length,a=[];for(;n0?(a.push(h.copy()),++r):(a.push(h.copy()),++n,++r)}for(;n-1?function(t,e){var i,n,o,s,a;a=t.toString(),i=a.split(\"e\")[0],s=a.split(\"e\")[1],n=i.split(\".\")[0],o=i.split(\".\")[1]||\"\",a=n+o+r(s-o.length),e>0&&(a+=\".\"+r(e));return a}(t,e):(i(t*a)/a).toFixed(e),n&&(o=new RegExp(\"0{1,\"+n+\"}$\"),s=s.replace(o,\"\")),s}function s(t,e,i){return e.indexOf(\"$\")>-1?function(t,e,i){var n,r,o=e,s=o.indexOf(\"$\"),l=o.indexOf(\"(\"),h=o.indexOf(\"+\"),c=o.indexOf(\"-\"),_=\"\",d=\"\";-1===o.indexOf(\"$\")?\"infix\"===u[p].currency.position?(d=u[p].currency.symbol,u[p].currency.spaceSeparated&&(d=\" \"+d+\" \")):u[p].currency.spaceSeparated&&(_=\" \"):o.indexOf(\" $\")>-1?(_=\" \",o=o.replace(\" $\",\"\")):o.indexOf(\"$ \")>-1?(_=\" \",o=o.replace(\"$ \",\"\")):o=o.replace(\"$\",\"\");if(r=a(t,o,i,d),-1===e.indexOf(\"$\"))switch(u[p].currency.position){case\"postfix\":r.indexOf(\")\")>-1?((r=r.split(\"\")).splice(-1,0,_+u[p].currency.symbol),r=r.join(\"\")):r=r+_+u[p].currency.symbol;break;case\"infix\":break;case\"prefix\":r.indexOf(\"(\")>-1||r.indexOf(\"-\")>-1?(r=r.split(\"\"),n=Math.max(l,c)+1,r.splice(n,0,u[p].currency.symbol+_),r=r.join(\"\")):r=u[p].currency.symbol+_+r;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else s<=1?r.indexOf(\"(\")>-1||r.indexOf(\"+\")>-1||r.indexOf(\"-\")>-1?(r=r.split(\"\"),n=1,(s-1?((r=r.split(\"\")).splice(-1,0,_+u[p].currency.symbol),r=r.join(\"\")):r=r+_+u[p].currency.symbol;return r}(t,e,i):e.indexOf(\"%\")>-1?function(t,e,i){var n,r=\"\";t*=100,e.indexOf(\" %\")>-1?(r=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\");(n=a(t,e,i)).indexOf(\")\")>-1?((n=n.split(\"\")).splice(-1,0,r+\"%\"),n=n.join(\"\")):n=n+r+\"%\";return n}(t,e,i):e.indexOf(\":\")>-1?function(t){var e=Math.floor(t/60/60),i=Math.floor((t-60*e*60)/60),n=Math.round(t-60*e*60-60*i);return e+\":\"+(i<10?\"0\"+i:i)+\":\"+(n<10?\"0\"+n:n)}(t):a(t,e,i)}function a(t,e,i,n){var r,s,a,l,h,c,_,f,v,m,g,y,b,x,w,k,S,T,C=!1,A=!1,E=!1,M=\"\",O=!1,z=!1,P=!1,j=!1,N=!1,F=\"\",D=\"\",I=Math.abs(t),R=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],L=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],B=\"\",V=!1,G=!1,U=\"\";if(0===t&&null!==d)return d;if(!isFinite(t))return\"\"+t;if(0===e.indexOf(\"{\")){var q=e.indexOf(\"}\");if(-1===q)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(-1===Y)throw Error('Format should also contain a \"{\"');b=e.slice(Y+1,-1),e=e.slice(0,Y+1)}else b=\"\";var X;if(X=-1===e.indexOf(\".\")?e.match(/([0-9]+).*/):e.match(/([0-9]+)\\..*/),T=null===X?-1:X[1].length,-1!==e.indexOf(\"-\")&&(V=!0),e.indexOf(\"(\")>-1?(C=!0,e=e.slice(1,-1)):e.indexOf(\"+\")>-1&&(A=!0,e=e.replace(/\\+/g,\"\")),e.indexOf(\"a\")>-1){if(m=e.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],m=parseInt(m[0],10),O=e.indexOf(\"aK\")>=0,z=e.indexOf(\"aM\")>=0,P=e.indexOf(\"aB\")>=0,j=e.indexOf(\"aT\")>=0,N=O||z||P||j,e.indexOf(\" a\")>-1?(M=\" \",e=e.replace(\" a\",\"\")):e=e.replace(\"a\",\"\"),h=Math.floor(Math.log(I)/Math.LN10)+1,_=h%3,_=0===_?3:_,m&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-m,f=3*~~((Math.min(m,h)-_)/3),I/=Math.pow(10,f),-1===e.indexOf(\".\")&&m>3))for(e+=\"[.]\",k=(k=0===c?0:3*~~(c/3)-c)<0?k+3:k,r=0;r=Math.pow(10,12)&&!N||j?(M+=u[p].abbreviations.trillion,t/=Math.pow(10,12)):I=Math.pow(10,9)&&!N||P?(M+=u[p].abbreviations.billion,t/=Math.pow(10,9)):I=Math.pow(10,6)&&!N||z?(M+=u[p].abbreviations.million,t/=Math.pow(10,6)):(I=Math.pow(10,3)&&!N||O)&&(M+=u[p].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf(\"b\")>-1)for(e.indexOf(\" b\")>-1?(F=\" \",e=e.replace(\" b\",\"\")):e=e.replace(\"b\",\"\"),l=0;l<=R.length;l++)if(s=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=s&&t0&&(t/=s);break}if(e.indexOf(\"d\")>-1)for(e.indexOf(\" d\")>-1?(F=\" \",e=e.replace(\" d\",\"\")):e=e.replace(\"d\",\"\"),l=0;l<=L.length;l++)if(s=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=s&&t0&&(t/=s);break}if(e.indexOf(\"o\")>-1&&(e.indexOf(\" o\")>-1?(D=\" \",e=e.replace(\" o\",\"\")):e=e.replace(\"o\",\"\"),u[p].ordinal&&(D+=u[p].ordinal(t))),e.indexOf(\"[.]\")>-1&&(E=!0,e=e.replace(\"[.]\",\".\")),v=t.toString().split(\".\")[0],g=e.split(\".\")[1],x=e.indexOf(\",\"),g){if(-1!==g.indexOf(\"*\")?B=o(t,t.toString().split(\".\")[1].length,i):g.indexOf(\"[\")>-1?(g=(g=g.replace(\"]\",\"\")).split(\"[\"),B=o(t,g[0].length+g[1].length,i,g[1].length)):B=o(t,g.length,i),v=B.split(\".\")[0],B.split(\".\")[1].length){var H=n?M+n:u[p].delimiters.decimal;B=H+B.split(\".\")[1]}else B=\"\";E&&0===Number(B.slice(1))&&(B=\"\")}else v=o(t,null,i);return v.indexOf(\"-\")>-1&&(v=v.slice(1),G=!0),v.length-1&&(v=v.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+u[p].delimiters.thousands)),0===e.indexOf(\".\")&&(v=\"\"),w=e.indexOf(\"(\"),S=e.indexOf(\"-\"),U=w2||(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:function(t,e,i,n){null!=i&&i!==c.culture()&&c.setCulture(i);return s(Number(t),null!=e?e:f,null==n?Math.round:n)}}},function(t,e,i){function n(t,e){if(!(this instanceof n))return new n(t);e=e||function(t){if(t)throw t};var i=r(t);if(\"object\"==typeof i){var s=n.projections.get(i.projName);if(s){if(i.datumCode&&\"none\"!==i.datumCode){var c=l[i.datumCode];c&&(i.datum_params=c.towgs84?c.towgs84.split(\",\"):null,i.ellps=c.ellipse,i.datumName=c.datumName?c.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||\"enu\";var u=a.sphere(i.a,i.b,i.rf,i.ellps,i.sphere),_=a.eccentricity(u.a,u.b,u.rf,i.R_A),p=i.datum||h(i.datumCode,i.datum_params,u.a,u.b,_.es,_.ep2);o(this,i),o(this,s),this.a=u.a,this.b=u.b,this.rf=u.rf,this.sphere=u.sphere,this.es=_.es,this.e=_.e,this.ep2=_.ep2,this.datum=p,this.init(),e(null,this)}else e(t)}else e(t)}var r=t(371),o=t(369),s=t(373),a=t(368),l=t(359),h=t(364);(n.projections=s).start(),e.exports=n},function(t,e,i){e.exports=function(t,e,i){var n,r,o,s=i.x,a=i.y,l=i.z||0,h={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==i.z)switch(0===o?(n=s,r=\"x\"):1===o?(n=a,r=\"y\"):(n=l,r=\"z\"),t.axis[o]){case\"e\":h[r]=n;break;case\"w\":h[r]=-n;break;case\"n\":h[r]=n;break;case\"s\":h[r]=-n;break;case\"u\":void 0!==i[r]&&(h.z=n);break;case\"d\":void 0!==i[r]&&(h.z=-n);break;default:return null}return h}},function(t,e,i){var n=2*Math.PI,r=t(356);e.exports=function(t){return Math.abs(t)<=3.14159265359?t:t-r(t)*n}},function(t,e,i){e.exports=function(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}},function(t,e,i){var n=Math.PI/2;e.exports=function(t,e){for(var i,r,o=.5*t,s=n-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(s),r=n-2*Math.atan(e*Math.pow((1-i)/(1+i),o))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}},function(t,e,i){e.exports=function(t){return t<0?-1:1}},function(t,e,i){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,i){var n=Math.PI/2;e.exports=function(t,e,i){var r=t*i,o=.5*t;return r=Math.pow((1-r)/(1+r),o),Math.tan(.5*(n-e))/r}},function(t,e,i){i.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},i.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},i.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},i.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},i.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},i.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},i.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},i.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},i.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},i.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},i.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},i.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},i.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},i.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},i.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},i.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,i){i.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},i.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},i.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},i.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},i.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},i.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},i.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},i.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},i.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},i.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},i.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},i.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},i.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},i.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},i.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},i.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},i.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},i.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},i.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},i.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},i.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},i.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},i.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},i.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},i.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},i.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},i.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},i.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},i.hough={a:6378270,rf:297,ellipseName:\"Hough\"},i.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},i.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},i.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},i.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},i.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},i.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},i.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},i.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},i.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},i.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},i.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},i.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},i.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},i.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},function(t,e,i){i.greenwich=0,i.lisbon=-9.131906111111,i.paris=2.337229166667,i.bogota=-74.080916666667,i.madrid=-3.687938888889,i.rome=12.452333333333,i.bern=7.439583333333,i.jakarta=106.807719444444,i.ferro=-17.666666666667,i.brussels=4.367975,i.stockholm=18.058277777778,i.athens=23.7163375,i.oslo=10.722916666667},function(t,e,i){i.ft={to_meter:.3048},i[\"us-ft\"]={to_meter:1200/3937}},function(t,e,i){function n(t,e,i){var n;return Array.isArray(i)?(n=s(t,e,i),3===i.length?[n.x,n.y,n.z]:[n.x,n.y]):s(t,e,i)}function r(t){return t instanceof o?t:t.oProj?t.oProj:o(t)}var o=t(351),s=t(376),a=o(\"WGS84\");e.exports=function(t,e,i){t=r(t);var o,s=!1;void 0===e?(e=t,t=a,s=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,e=t,t=a,s=!0);return e=r(e),i?n(t,e,i):(o={forward:function(i){return n(t,e,i)},inverse:function(i){return n(e,t,i)}},s&&(o.oProj=e),o)}},function(t,e,i){var n=1,r=2,o=4,s=5,a=484813681109536e-20;e.exports=function(t,e,i,l,h,c){var u={};u.datum_type=o,t&&\"none\"===t&&(u.datum_type=s);e&&(u.datum_params=e.map(parseFloat),0===u.datum_params[0]&&0===u.datum_params[1]&&0===u.datum_params[2]||(u.datum_type=n),u.datum_params.length>3&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=r,u.datum_params[3]*=a,u.datum_params[4]*=a,u.datum_params[5]*=a,u.datum_params[6]=u.datum_params[6]/1e6+1)));return u.a=i,u.b=l,u.es=h,u.ep2=c,u}},function(t,e,i){var n=Math.PI/2;i.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(1===t.datum_type?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||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]))},i.geodeticToGeocentric=function(t,e,i){var r,o,s,a,l=t.x,h=t.y,c=t.z?t.z:0;if(h<-n&&h>-1.001*n)h=-n;else if(h>n&&h<1.001*n)h=n;else if(h<-n||h>n)return null;return l>Math.PI&&(l-=2*Math.PI),o=Math.sin(h),a=Math.cos(h),s=o*o,r=i/Math.sqrt(1-e*s),{x:(r+c)*a*Math.cos(l),y:(r+c)*a*Math.sin(l),z:(r*(1-e)+c)*o}},i.geocentricToGeodetic=function(t,e,i,r){var o,s,a,l,h,c,u,_,p,d,f,v,m,g,y,b,x=t.x,w=t.y,k=t.z?t.z:0;if(o=Math.sqrt(x*x+w*w),s=Math.sqrt(x*x+w*w+k*k),o/i<1e-12){if(g=0,s/i<1e-12)return y=n,b=-r,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(w,x);a=k/s,l=o/s,h=1/Math.sqrt(1-e*(2-e)*l*l),_=l*(1-e)*h,p=a*h,m=0;do{m++,u=i/Math.sqrt(1-e*p*p),c=e*u/(u+(b=o*_+k*p-u*(1-e*p*p))),h=1/Math.sqrt(1-c*(2-c)*l*l),v=(f=a*h)*_-(d=l*(1-c)*h)*p,_=d,p=f}while(v*v>1e-24&&m<30);return y=Math.atan(f/Math.abs(d)),{x:g,y:y,z:b}},i.geocentricToWgs84=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],l=i[5],h=i[6];return{x:h*(t.x-l*t.y+a*t.z)+n,y:h*(l*t.x+t.y-s*t.z)+r,z:h*(-a*t.x+s*t.y+t.z)+o}}},i.geocentricFromWgs84=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],l=i[5],h=i[6],c=(t.x-n)/h,u=(t.y-r)/h,_=(t.z-o)/h;return{x:c+l*u-a*_,y:-l*c+u+s*_,z:a*c-s*u+_}}}},function(t,e,i){function n(t){return t===r||t===o}var r=1,o=2,s=t(365);e.exports=function(t,e,i){return s.compareDatums(t,e)?i:5===t.datum_type||5===e.datum_type?i:t.es!==e.es||t.a!==e.a||n(t.datum_type)||n(e.datum_type)?(i=s.geodeticToGeocentric(i,t.es,t.a),n(t.datum_type)&&(i=s.geocentricToWgs84(i,t.datum_type,t.datum_params)),n(e.datum_type)&&(i=s.geocentricFromWgs84(i,e.datum_type,e.datum_params)),s.geocentricToGeodetic(i,e.es,e.a,e.b)):i}},function(t,e,i){function n(t){var e=this;if(2===arguments.length){var i=arguments[1];n[t]=\"string\"==typeof i?\"+\"===i.charAt(0)?o(arguments[1]):s(arguments[1]):i}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 r=t(370),o=t(372),s=t(377);r(n),e.exports=n},function(t,e,i){var n=t(360);i.eccentricity=function(t,e,i,n){var r=t*t,o=e*e,s=(r-o)/r,a=0;n?(r=(t*=1-s*(.16666666666666666+s*(.04722222222222222+.022156084656084655*s)))*t,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}},i.sphere=function(t,e,i,r,o){if(!t){var s=n[r];s||(s=n.WGS84),t=s.a,e=s.b,i=s.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<1e-10)&&(o=!0,e=t),{a:t,b:e,rf:i,sphere:o}}},function(t,e,i){e.exports=function(t,e){t=t||{};var i,n;if(!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}},function(t,e,i){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,i){var n=t(367),r=t(377),o=t(372),s=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];e.exports=function(t){if(!function(t){return\"string\"==typeof t}(t))return t;if(function(t){return t in n}(t))return n[t];if(function(t){return s.some(function(e){return t.indexOf(e)>-1})}(t))return r(t);if(function(t){return\"+\"===t[0]}(t))return o(t)}},function(t,e,i){var n=.017453292519943295,r=t(361),o=t(362);e.exports=function(t){var e,i,s,a={},l=t.split(\"+\").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split(\"=\");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),h={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=(r[t]?r[t]:parseFloat(t))*n},nadgrids:function(t){\"@null\"===t?a.datumCode=\"none\":a.nadgrids=t},axis:function(t){3===t.length&&-1!==\"ewnsud\".indexOf(t.substr(0,1))&&-1!==\"ewnsud\".indexOf(t.substr(1,1))&&-1!==\"ewnsud\".indexOf(t.substr(2,1))&&(a.axis=t)}};for(e in l)i=l[e],e in h?\"function\"==typeof(s=h[e])?s(i):a[s]=i:a[e]=i;return\"string\"==typeof a.datumCode&&\"WGS84\"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},function(t,e,i){function n(t,e){var i=s.length;return t.names?(s[i]=t,t.names.forEach(function(t){o[t.toLowerCase()]=i}),this):(console.log(e),!0)}var r=[t(375),t(374)],o={},s=[];i.add=n,i.get=function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==o[e]&&s[o[e]]?s[o[e]]:void 0},i.start=function(){r.forEach(n)}},function(t,e,i){function n(t){return t}i.init=function(){},i.forward=n,i.inverse=n,i.names=[\"longlat\",\"identity\"]},function(t,e,i){var n=t(354),r=Math.PI/2,o=57.29577951308232,s=t(353),a=Math.PI/4,l=t(358),h=t(355);i.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)},i.forward=function(t){var e=t.x,i=t.y;if(i*o>90&&i*o<-90&&e*o>180&&e*o<-180)return null;var n,h;if(Math.abs(Math.abs(i)-r)<=1e-10)return null;if(this.sphere)n=this.x0+this.a*this.k0*s(e-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(a+.5*i));else{var c=Math.sin(i),u=l(this.e,i,c);n=this.x0+this.a*this.k0*s(e-this.long0),h=this.y0-this.a*this.k0*Math.log(u)}return t.x=n,t.y=h,t},i.inverse=function(t){var e,i,n=t.x-this.x0,o=t.y-this.y0;if(this.sphere)i=r-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var a=Math.exp(-o/(this.a*this.k0));if(-9999===(i=h(this.e,a)))return null}return e=s(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},i.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},function(t,e,i){var n=1,r=2,o=t(366),s=t(352),a=t(351),l=t(357);e.exports=function t(e,i,h){var c;return Array.isArray(h)&&(h=l(h)),e.datum&&i.datum&&function(t,e){return(t.datum.datum_type===n||t.datum.datum_type===r)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===n||e.datum.datum_type===r)&&\"WGS84\"!==t.datumCode}(e,i)&&(c=new a(\"WGS84\"),h=t(e,c,h),e=c),\"enu\"!==e.axis&&(h=s(e,!1,h)),\"longlat\"===e.projName?h={x:.017453292519943295*h.x,y:.017453292519943295*h.y}:(e.to_meter&&(h={x:h.x*e.to_meter,y:h.y*e.to_meter}),h=e.inverse(h)),e.from_greenwich&&(h.x+=e.from_greenwich),h=o(e.datum,i.datum,h),i.from_greenwich&&(h={x:h.x-i.grom_greenwich,y:h.y}),\"longlat\"===i.projName?h={x:57.29577951308232*h.x,y:57.29577951308232*h.y}:(h=i.forward(h),i.to_meter&&(h={x:h.x/i.to_meter,y:h.y/i.to_meter})),\"enu\"!==i.axis?s(i,!0,h):h}},function(t,e,i){function n(t,e,i){t[e]=i.map(function(t){var e={};return r(t,e),e}).reduce(function(t,e){return a(t,e)},{})}function r(t,e){var i;Array.isArray(t)?(\"PARAMETER\"===(i=t.shift())&&(i=t.shift()),1===t.length?Array.isArray(t[0])?(e[i]={},r(t[0],e[i])):e[i]=t[0]:t.length?\"TOWGS84\"===i?e[i]=t:(e[i]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(i)>-1?(e[i]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[i].auth=t[2])):\"SPHEROID\"===i?(e[i]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[i].auth=t[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(i)>-1?(t[0]=[\"name\",t[0]],n(e,i,t)):t.every(function(t){return Array.isArray(t)})?n(e,i,t):r(t,e[i])):e[i]=!0):e[t]=!0}function o(t){return t*s}var s=.017453292519943295,a=t(369);e.exports=function(t,e){var i=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=i.shift(),s=i.shift();i.unshift([\"name\",s]),i.unshift([\"type\",n]),i.unshift(\"output\");var l={};return r(i,l),function(t){function e(e){var i=t.to_meter||1;return parseFloat(e,10)*i}\"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);[[\"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\",o],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",o],[\"x0\",\"false_easting\",e],[\"y0\",\"false_northing\",e],[\"long0\",\"central_meridian\",o],[\"lat0\",\"latitude_of_origin\",o],[\"lat0\",\"standard_parallel_1\",o],[\"lat1\",\"standard_parallel_1\",o],[\"lat2\",\"standard_parallel_2\",o],[\"alpha\",\"azimuth\",o],[\"srsCode\",\"name\"]].forEach(function(e){return function(t,e){var i=e[0],n=e[1];!(i in t)&&n in t&&(t[i]=t[n],3===e.length&&(t[i]=e[2](t[i])))}(t,e)}),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=o(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(l.output),a(e,l.output)}},function(t,e,i){!function(){\"use strict\";function t(e){return function(e,i){var r,o,s,a,l,h,c,u,_,p=1,d=e.length,f=\"\";for(o=0;o=0),a[8]){case\"b\":r=parseInt(r,10).toString(2);break;case\"c\":r=String.fromCharCode(parseInt(r,10));break;case\"d\":case\"i\":r=parseInt(r,10);break;case\"j\":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case\"e\":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case\"f\":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case\"g\":r=a[7]?String(Number(r.toPrecision(a[7]))):parseFloat(r);break;case\"o\":r=(parseInt(r,10)>>>0).toString(8);break;case\"s\":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case\"t\":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case\"T\":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a[7]?r.substring(0,a[7]):r;break;case\"u\":r=parseInt(r,10)>>>0;break;case\"v\":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case\"x\":r=(parseInt(r,10)>>>0).toString(16);break;case\"X\":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}n.json.test(a[8])?f+=r:(!n.number.test(a[8])||u&&!a[3]?_=\"\":(_=u?\"+\":\"-\",r=r.toString().replace(n.sign,\"\")),h=a[4]?\"0\"===a[4]?\"0\":a[4].charAt(1):\" \",c=a[6]-(_+r).length,l=a[6]&&c>0?h.repeat(c):\"\",f+=a[5]?_+r+l:\"0\"===h?_+l+r:l+_+r)}return f}(function(t){if(r[t])return r[t];var e,i=t,o=[],s=0;for(;i;){if(null!==(e=n.text.exec(i)))o.push(e[0]);else if(null!==(e=n.modulo.exec(i)))o.push(\"%\");else{if(null===(e=n.placeholder.exec(i)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(e[2]){s|=1;var a=[],l=e[2],h=[];if(null===(h=n.key.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(a.push(h[1]);\"\"!==(l=l.substring(h[0].length));)if(null!==(h=n.key_access.exec(l)))a.push(h[1]);else{if(null===(h=n.index_access.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");a.push(h[1])}e[2]=a}else s|=2;if(3===s)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");o.push(e)}i=i.substring(e[0].length)}return r[t]=o}(e),arguments)}function e(e,i){return t.apply(null,[e].concat(i||[]))}var n={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,index_access:/^\\[(\\d+)\\]/,sign:/^[\\+\\-]/},r=Object.create(null);void 0!==i&&(i.sprintf=t,i.vsprintf=e),\"undefined\"!=typeof window&&(window.sprintf=t,window.vsprintf=e)}()},function(t,e,i){!function(t){\"object\"==typeof e&&e.exports?e.exports=t():this.tz=t()}(function(){function t(t,e,i){var n,r=e.day[1];do{n=new Date(Date.UTC(i,e.month,Math.abs(r++)))}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,i,n){var r,o,s,a,l,h,c,u=e[e.zone],_=[],p=new Date(n).getUTCFullYear(),d=1;for(r=1,o=u.length;r=p-d;--c)for(r=0,o=h.length;r=_[r][i]&&_[r][_[r].clock]>s[_[r].clock]&&(a=_[r])}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 i(t,i){return\"UTC\"==t.zone?i:(t.entry=e(t,\"posix\",i),i+t.entry.offset+t.entry.save)}function n(t,i){if(\"UTC\"==t.zone)return i;var n,r;return t.entry=n=e(t,\"wallclock\",i),0<(r=i-n.wallclock)&&r9)e+=a*c[h-10];else{if(o=new Date(i(t,e)),h<7)for(;a;)o.setUTCDate(o.getUTCDate()+s),o.getUTCDay()==h&&(a-=s);else 7==h?o.setUTCFullYear(o.getUTCFullYear()+a):8==h?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,e){var i,n,r;return n=new Date(Date.UTC(t.getUTCFullYear(),0)),i=Math.floor((t.getTime()-n.getTime())/864e5),n.getUTCDay()==e?r=0:8==(r=7-n.getUTCDay()+e)&&(r=1),i>=r?Math.floor((i-r)/7)+1:0}function s(t){var e,i,n;return i=t.getUTCFullYear(),e=new Date(Date.UTC(i,0)).getUTCDay(),(n=o(t,1)+(e>1&&e<=4?1:0))?53!=n||4==e||3==e&&29==new Date(i,1,29).getDate()?[n,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(i=t.getUTCFullYear()-1,e=new Date(Date.UTC(i,0)).getUTCDay(),n=4==e||3==e&&29==new Date(i,1,29).getDate()?53:52,[n,t.getUTCFullYear()-1])}var a={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(t,e,i,n){var r,o,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],h=3600;for(r=0;r<3;r++)l.push((\"0\"+Math.floor(a/h)).slice(-2)),a%=h,h/=60;return\"^\"!=i||s?(\"^\"==i&&(n=3),3==n?(o=(o=l.join(\":\")).replace(/:00$/,\"\"),\"^\"!=i&&(o=o.replace(/:00$/,\"\"))):n?(o=l.slice(0,n+1).join(\":\"),\"^\"==i&&(o=o.replace(/:00$/,\"\"))):o=l.slice(0,2).join(\"\"),o=(s<0?\"-\":\"+\")+o,o=o.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[i]||\"$1$2\")):\"Z\"},\"%\":function(t){return\"%\"},n:function(t){return\"\\n\"},t:function(t){return\"\\t\"},U:function(t){return o(t,0)},W:function(t){return o(t,1)},V:function(t){return s(t)[0]},G:function(t){return s(t)[1]},g:function(t){return s(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:function(t){if(!t.length)return\"1.0.13\";var e,o,s,a,l,c=Object.create(this),u=[];for(e=0;e=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},a=function(t,e){return function(i,n){e(i,n,t)}},l=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},h=function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},c=function(t,e){function i(i){return function(s){return function(i){if(n)throw new TypeError(\"Generator is already executing.\");for(;a;)try{if(n=1,r&&(o=r[2&i[0]?\"return\":i[0]?\"throw\":\"next\"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}},p=function(t,e){var i=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},d=function(){for(var t=[],e=0;e1||r(t,e)})})}function r(t,e){try{!function(t){t.value instanceof f?Promise.resolve(t.value.v).then(o,s):a(c[0][2],t)}(h[t](e))}catch(t){a(c[0][3],t)}}function o(t){r(\"next\",t)}function s(t){r(\"throw\",t)}function a(t,e){t(e),c.shift(),c.length&&r(c[0][0],c[0][1])}if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var l,h=i.apply(t,e||[]),c=[];return l={},n(\"next\"),n(\"throw\"),n(\"return\"),l[Symbol.asyncIterator]=function(){return this},l},m=function(t){function e(e,r){t[e]&&(i[e]=function(i){return(n=!n)?{value:f(t[e](i)),done:\"return\"===e}:r?r(i):i})}var i,n;return i={},e(\"next\"),e(\"throw\",function(t){throw t}),e(\"return\"),i[Symbol.iterator]=function(){return this},i},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 _?_(t):t[Symbol.iterator]()},y=function(t,e){return Object.defineProperty?Object.defineProperty(t,\"raw\",{value:e}):t.raw=e,t},t(\"__extends\",n),t(\"__assign\",r),t(\"__rest\",o),t(\"__decorate\",s),t(\"__param\",a),t(\"__metadata\",l),t(\"__awaiter\",h),t(\"__generator\",c),t(\"__exportStar\",u),t(\"__values\",_),t(\"__read\",p),t(\"__spread\",d),t(\"__await\",f),t(\"__asyncGenerator\",v),t(\"__asyncDelegator\",m),t(\"__asyncValues\",g),t(\"__makeTemplateObject\",y)})}],{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/alignments\":10,\"core/layout/layout_canvas\":11,\"core/layout/side_panel\":12,\"core/layout/solver\":13,\"core/logging\":14,\"core/properties\":15,\"core/property_mixins\":16,\"core/selection_manager\":17,\"core/settings\":18,\"core/signaling\":19,\"core/ui_events\":20,\"core/util/array\":21,\"core/util/arrayable\":22,\"core/util/assert\":23,\"core/util/bbox\":24,\"core/util/callback\":25,\"core/util/canvas\":26,\"core/util/color\":27,\"core/util/compat\":28,\"core/util/data_structures\":29,\"core/util/eq\":30,\"core/util/math\":31,\"core/util/object\":32,\"core/util/projections\":33,\"core/util/refs\":34,\"core/util/selection\":35,\"core/util/serialization\":36,\"core/util/spatial\":37,\"core/util/string\":38,\"core/util/svg_colors\":39,\"core/util/templating\":40,\"core/util/text\":41,\"core/util/throttle\":42,\"core/util/typed_array\":43,\"core/util/types\":44,\"core/util/wheel\":45,\"core/util/zoom\":46,\"core/vectorization\":47,\"core/view\":48,\"core/visuals\":49,document:50,embed:51,main:52,model:53,\"models/annotations/annotation\":54,\"models/annotations/arrow\":55,\"models/annotations/arrow_head\":56,\"models/annotations/band\":57,\"models/annotations/box_annotation\":58,\"models/annotations/color_bar\":59,\"models/annotations/index\":60,\"models/annotations/label\":61,\"models/annotations/label_set\":62,\"models/annotations/legend\":63,\"models/annotations/legend_item\":64,\"models/annotations/poly_annotation\":65,\"models/annotations/span\":66,\"models/annotations/text_annotation\":67,\"models/annotations/title\":68,\"models/annotations/toolbar_panel\":69,\"models/annotations/tooltip\":70,\"models/annotations/whisker\":71,\"models/axes/axis\":72,\"models/axes/categorical_axis\":73,\"models/axes/continuous_axis\":74,\"models/axes/datetime_axis\":75,\"models/axes/index\":76,\"models/axes/linear_axis\":77,\"models/axes/log_axis\":78,\"models/axes/mercator_axis\":79,\"models/callbacks/callback\":80,\"models/callbacks/customjs\":81,\"models/callbacks/index\":82,\"models/callbacks/open_url\":83,\"models/canvas/canvas\":84,\"models/canvas/cartesian_frame\":85,\"models/canvas/index\":86,\"models/expressions/expression\":87,\"models/expressions/index\":88,\"models/expressions/stack\":89,\"models/filters/boolean_filter\":90,\"models/filters/customjs_filter\":91,\"models/filters/filter\":92,\"models/filters/group_filter\":93,\"models/filters/index\":94,\"models/filters/index_filter\":95,\"models/formatters/basic_tick_formatter\":96,\"models/formatters/categorical_tick_formatter\":97,\"models/formatters/datetime_tick_formatter\":98,\"models/formatters/func_tick_formatter\":99,\"models/formatters/index\":100,\"models/formatters/log_tick_formatter\":101,\"models/formatters/mercator_tick_formatter\":102,\"models/formatters/numeral_tick_formatter\":103,\"models/formatters/printf_tick_formatter\":104,\"models/formatters/tick_formatter\":105,\"models/glyphs/annular_wedge\":106,\"models/glyphs/annulus\":107,\"models/glyphs/arc\":108,\"models/glyphs/bezier\":109,\"models/glyphs/box\":110,\"models/glyphs/circle\":111,\"models/glyphs/ellipse\":112,\"models/glyphs/glyph\":113,\"models/glyphs/hbar\":114,\"models/glyphs/hex_tile\":115,\"models/glyphs/image\":116,\"models/glyphs/image_rgba\":117,\"models/glyphs/image_url\":118,\"models/glyphs/index\":119,\"models/glyphs/line\":120,\"models/glyphs/multi_line\":121,\"models/glyphs/oval\":122,\"models/glyphs/patch\":123,\"models/glyphs/patches\":124,\"models/glyphs/quad\":125,\"models/glyphs/quadratic\":126,\"models/glyphs/ray\":127,\"models/glyphs/rect\":128,\"models/glyphs/segment\":129,\"models/glyphs/step\":130,\"models/glyphs/text\":131,\"models/glyphs/utils\":132,\"models/glyphs/vbar\":133,\"models/glyphs/wedge\":134,\"models/glyphs/xy_glyph\":135,\"models/graphs/graph_hit_test_policy\":136,\"models/graphs/index\":137,\"models/graphs/layout_provider\":138,\"models/graphs/static_layout_provider\":139,\"models/grids/grid\":140,\"models/grids/index\":141,\"models/index\":142,\"models/layouts/box\":143,\"models/layouts/column\":144,\"models/layouts/index\":145,\"models/layouts/layout_dom\":146,\"models/layouts/row\":147,\"models/layouts/spacer\":148,\"models/layouts/widget_box\":149,\"models/mappers/categorical_color_mapper\":150,\"models/mappers/color_mapper\":151,\"models/mappers/continuous_color_mapper\":152,\"models/mappers/index\":153,\"models/mappers/linear_color_mapper\":154,\"models/mappers/log_color_mapper\":155,\"models/markers/index\":156,\"models/markers/marker\":157,\"models/plots/gmap_plot\":158,\"models/plots/gmap_plot_canvas\":159,\"models/plots/index\":160,\"models/plots/plot\":161,\"models/plots/plot_canvas\":162,\"models/ranges/data_range\":163,\"models/ranges/data_range1d\":164,\"models/ranges/factor_range\":165,\"models/ranges/index\":166,\"models/ranges/range\":167,\"models/ranges/range1d\":168,\"models/renderers/glyph_renderer\":169,\"models/renderers/graph_renderer\":170,\"models/renderers/guide_renderer\":171,\"models/renderers/index\":172,\"models/renderers/renderer\":173,\"models/scales/categorical_scale\":174,\"models/scales/index\":175,\"models/scales/linear_scale\":176,\"models/scales/log_scale\":177,\"models/scales/scale\":178,\"models/selections/index\":179,\"models/selections/interaction_policy\":180,\"models/selections/selection\":181,\"models/sources/ajax_data_source\":182,\"models/sources/cds_view\":183,\"models/sources/column_data_source\":184,\"models/sources/columnar_data_source\":185,\"models/sources/data_source\":186,\"models/sources/geojson_data_source\":187,\"models/sources/index\":188,\"models/sources/remote_data_source\":189,\"models/tickers/adaptive_ticker\":190,\"models/tickers/basic_ticker\":191,\"models/tickers/categorical_ticker\":192,\"models/tickers/composite_ticker\":193,\"models/tickers/continuous_ticker\":194,\"models/tickers/datetime_ticker\":195,\"models/tickers/days_ticker\":196,\"models/tickers/fixed_ticker\":197,\"models/tickers/index\":198,\"models/tickers/log_ticker\":199,\"models/tickers/mercator_ticker\":200,\"models/tickers/months_ticker\":201,\"models/tickers/single_interval_ticker\":202,\"models/tickers/ticker\":203,\"models/tickers/util\":204,\"models/tickers/years_ticker\":205,\"models/tiles/bbox_tile_source\":206,\"models/tiles/image_pool\":207,\"models/tiles/index\":208,\"models/tiles/mercator_tile_source\":209,\"models/tiles/quadkey_tile_source\":210,\"models/tiles/tile_renderer\":211,\"models/tiles/tile_source\":212,\"models/tiles/tile_utils\":213,\"models/tiles/tms_tile_source\":214,\"models/tiles/wmts_tile_source\":215,\"models/tools/actions/action_tool\":216,\"models/tools/actions/help_tool\":217,\"models/tools/actions/redo_tool\":218,\"models/tools/actions/reset_tool\":219,\"models/tools/actions/save_tool\":220,\"models/tools/actions/undo_tool\":221,\"models/tools/actions/zoom_in_tool\":222,\"models/tools/actions/zoom_out_tool\":223,\"models/tools/button_tool\":224,\"models/tools/edit/box_edit_tool\":225,\"models/tools/edit/edit_tool\":226,\"models/tools/edit/point_draw_tool\":227,\"models/tools/edit/poly_draw_tool\":228,\"models/tools/edit/poly_edit_tool\":229,\"models/tools/gestures/box_select_tool\":230,\"models/tools/gestures/box_zoom_tool\":231,\"models/tools/gestures/gesture_tool\":232,\"models/tools/gestures/lasso_select_tool\":233,\"models/tools/gestures/pan_tool\":234,\"models/tools/gestures/poly_select_tool\":235,\"models/tools/gestures/select_tool\":236,\"models/tools/gestures/tap_tool\":237,\"models/tools/gestures/wheel_pan_tool\":238,\"models/tools/gestures/wheel_zoom_tool\":239,\"models/tools/index\":240,\"models/tools/inspectors/crosshair_tool\":241,\"models/tools/inspectors/customjs_hover\":242,\"models/tools/inspectors/hover_tool\":243,\"models/tools/inspectors/inspect_tool\":244,\"models/tools/on_off_button\":245,\"models/tools/tool\":246,\"models/tools/tool_proxy\":247,\"models/tools/toolbar\":248,\"models/tools/toolbar_base\":249,\"models/tools/toolbar_box\":250,\"models/tools/util\":251,\"models/transforms/customjs_transform\":252,\"models/transforms/dodge\":253,\"models/transforms/index\":254,\"models/transforms/interpolator\":255,\"models/transforms/jitter\":256,\"models/transforms/linear_interpolator\":257,\"models/transforms/step_interpolator\":258,\"models/transforms/transform\":259,polyfill:260,\"protocol/index\":261,\"protocol/message\":262,\"protocol/receiver\":263,safely:264,version:265})}(this);/*!\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){!function(t){(function(e,n,i){if(null!=t)return t.register_plugin(e,n,404);throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\")})({389:function(t,e,n){var i=t(19);n.clear_menus=new i.Signal0({},\"clear_menus\"),document.addEventListener(\"click\",function(){return n.clear_menus.emit()})},390:function(t,e,n){var i=t(380),r=t(15),o=t(5),s=t(4),a=t(429),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.icon_views={},this.render()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.render()})},e.prototype.remove=function(){s.remove_views(this.icon_views),t.prototype.remove.call(this)},e.prototype._render_button=function(){for(var t=[],e=0;ei||this._o.position.indexOf(\"right\")>-1&&a-e+t.offsetWidth>0)&&(a=a-e+t.offsetWidth),(this._o.reposition&&l+n>r+o||this._o.position.indexOf(\"top\")>-1&&l-n-t.offsetHeight>0)&&(l=l-n-t.offsetHeight),this.el.style.left=a+\"px\",this.el.style.top=l+\"px\"}};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(\"bk-widget-form-group\")},e.prototype.render=function(){var e=this;t.prototype.render.call(this),null!=this._picker&&this._picker.destroy(),o.empty(this.el),this.labelEl=o.label({},this.model.title),this.el.appendChild(this.labelEl),this.inputEl=o.input({type:\"text\",class:\"bk-widget-form-input\",disabled:this.model.disabled}),this.el.appendChild(this.inputEl),this._picker=new a({field:this.inputEl,defaultDate:new Date(this.model.value),setDefaultDate:!0,minDate:null!=this.model.min_date?new Date(this.model.min_date):void 0,maxDate:null!=this.model.max_date?new Date(this.model.max_date):void 0,onSelect:function(t){return e._on_select(t)}}),this._root_element.appendChild(this._picker.el)},e.prototype._on_select=function(t){this.model.value=t.toDateString(),this.change_input()},e}(r.InputWidgetView);n.DatePickerView=l;var u=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.initClass=function(){this.prototype.type=\"DatePicker\",this.prototype.default_view=l,this.define({value:[s.Any,(new Date).toDateString()],min_date:[s.Any],max_date:[s.Any]})},e}(r.InputWidget);n.DatePicker=u,u.initClass()},398:function(t,e,n){var i=t(380),r=t(379),o=t(392),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(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}(o.AbstractSliderView);n.DateRangeSliderView=s;var a=function(t){function e(e){var n=t.call(this,e)||this;return n.behaviour=\"drag\",n.connected=[!1,!0,!1],n}return i.__extends(e,t),e.initClass=function(){this.prototype.type=\"DateRangeSlider\",this.prototype.default_view=s,this.override({format:\"%d %b %Y\"})},e.prototype._formatter=function(t,e){return r(t,e)},e}(o.AbstractSlider);n.DateRangeSlider=a,a.initClass()},399:function(t,e,n){var i=t(380),r=t(379),o=t(392),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(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=t[0];return e},e}(o.AbstractSliderView);n.DateSliderView=s;var a=function(t){function e(e){var n=t.call(this,e)||this;return n.behaviour=\"tap\",n.connected=[!0,!1],n}return i.__extends(e,t),e.initClass=function(){this.prototype.type=\"DateSlider\",this.prototype.default_view=s,this.override({format:\"%d %b %Y\"})},e.prototype._formatter=function(t,e){return r(t,e)},e}(o.AbstractSlider);n.DateSlider=a,a.initClass()},400:function(t,e,n){var i=t(380),r=t(405),o=t(5),s=t(15),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.render=function(){t.prototype.render.call(this);var e=o.div();this.model.render_as_text?e.textContent=this.model.text:e.innerHTML=this.model.text,this.markupEl.appendChild(e)},e}(r.MarkupView);n.DivView=a;var l=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.initClass=function(){this.prototype.type=\"Div\",this.prototype.default_view=a,this.define({render_as_text:[s.Bool,!1]})},e}(r.Markup);n.Div=l,l.initClass()},401:function(t,e,n){var i=t(380),r=t(5),o=t(389),s=t(15),a=t(390),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),o.clear_menus.connect(function(){return e._clear_menu()})},e.prototype.render=function(){var e=this;if(t.prototype.render.call(this),this.model.is_split_button){this.el.classList.add(\"bk-bs-btn-group\");var n=this._render_button(r.span({class:\"bk-bs-caret\"}));n.classList.add(\"bk-bs-dropdown-toggle\"),n.addEventListener(\"click\",function(t){return e._caret_click(t)}),this.el.appendChild(n)}else this.el.classList.add(\"bk-bs-dropdown\"),this.buttonEl.classList.add(\"bk-bs-dropdown-toggle\"),this.buttonEl.appendChild(r.span({class:\"bk-bs-caret\"}));this.model.active&&this.el.classList.add(\"bk-bs-open\");for(var i=[],o=0,s=this.model.menu;o=n&&(this.model.active=n-1);var i=this.model.tabs.map(function(t,e){return r.li({},r.span({data:{index:e}},t.title))});i[this.model.active].classList.add(\"bk-bs-active\");var s=r.ul({class:[\"bk-bs-nav\",\"bk-bs-nav-tabs\"]},i);this.el.appendChild(s);var a=this.model.tabs.map(function(t){return r.div({class:\"bk-bs-tab-pane\"})});a[this.model.active].classList.add(\"bk-bs-active\");var l=r.div({class:\"bk-bs-tab-content\"},a);this.el.appendChild(l),s.addEventListener(\"click\",function(t){if(t.preventDefault(),t.target!=t.currentTarget){var n=t.target,r=e.model.active,o=parseInt(n.dataset.index);r!=o&&(i[r].classList.remove(\"bk-bs-active\"),a[r].classList.remove(\"bk-bs-active\"),i[o].classList.add(\"bk-bs-active\"),a[o].classList.add(\"bk-bs-active\"),e.model.active=o,null!=e.model.callback&&e.model.callback.execute(e.model))}});for(var u=0,c=o.zip(this.model.children,a);u0&&(o(t,e),setTimeout(function(){s(t,e)},n))}function i(t){return Array.isArray(t)?t:[t]}function r(t){var e=(t=String(t)).split(\".\");return e.length>1?e[1].length:0}function o(t,e){t.classList?t.classList.add(e):t.className+=\" \"+e}function s(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function a(t){var e=void 0!==window.pageXOffset,n=\"CSS1Compat\"===(t.compatMode||\"\"),i=e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,r=e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop;return{x:i,y:r}}function l(t,e){return 100/(e-t)}function u(t,e){return 100*e/(t[1]-t[0])}function c(t,e){for(var n=1;t>=e[n];)n+=1;return n}function d(t,e,n){if(n>=t.slice(-1)[0])return 100;var i,r,o,s,a=c(n,t);return i=t[a-1],r=t[a],o=e[a-1],s=e[a],o+function(t,e){return u(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([i,r],n)/l(o,s)}function h(t,e,n,i){if(100===i)return i;var r,o,s=c(i,t);return n?(r=t[s-1],o=t[s],i-r>(o-r)/2?o:r):e[s-1]?t[s-1]+function(t,e){return Math.round(t/e)*e}(i-t[s-1],e[s-1]):i}function p(t,n,i){var r;if(\"number\"==typeof n&&(n=[n]),\"[object Array]\"!==Object.prototype.toString.call(n))throw new Error(\"noUiSlider (\"+B+\"): 'range' contains invalid value.\");if(r=\"min\"===t?0:\"max\"===t?100:parseFloat(t),!e(r)||!e(n[0]))throw new Error(\"noUiSlider (\"+B+\"): 'range' value isn't numeric.\");i.xPct.push(r),i.xVal.push(n[0]),r?i.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(i.xSteps[0]=n[1]),i.xHighestCompleteStep.push(0)}function f(t,e,n){if(!e)return!0;n.xSteps[t]=u([n.xVal[t],n.xVal[t+1]],e)/l(n.xPct[t],n.xPct[t+1]);var i=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],r=Math.ceil(Number(i.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*r;n.xHighestCompleteStep[t]=o}function m(t,e,n){this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i,r=[];for(i in t)t.hasOwnProperty(i)&&r.push([t[i],i]);for(r.length&&\"object\"==typeof r[0][0]?r.sort(function(t,e){return t[0][0]-e[0][0]}):r.sort(function(t,e){return t[0]-e[0]}),i=0;i=50)throw new Error(\"noUiSlider (\"+B+\"): 'padding' option must be less than half the range.\")}}function M(t,e){switch(e){case\"ltr\":t.dir=0;break;case\"rtl\":t.dir=1;break;default:throw new Error(\"noUiSlider (\"+B+\"): 'direction' option was not recognized.\")}}function A(t,e){if(\"string\"!=typeof e)throw new Error(\"noUiSlider (\"+B+\"): 'behaviour' must be a string containing options.\");var n=e.indexOf(\"tap\")>=0,i=e.indexOf(\"drag\")>=0,r=e.indexOf(\"fixed\")>=0,o=e.indexOf(\"snap\")>=0,s=e.indexOf(\"hover\")>=0;if(r){if(2!==t.handles)throw new Error(\"noUiSlider (\"+B+\"): 'fixed' behaviour must be used with 2 handles\");C(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:i,fixed:r,snap:o,hover:s}}function N(t,e){if(t.multitouch=e,\"boolean\"!=typeof e)throw new Error(\"noUiSlider (\"+B+\"): 'multitouch' option must be a boolean.\")}function V(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n-1?1:\"steps\"===e?2:0,!s&&a&&(m=0),d===_&&l||(r[p.toFixed(5)]=[d,m]),u=p}}),r}(n,e,s),l=t.format||{to:Math.round};return j=q.appendChild(p(a,i,l))}function v(){var t=T.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][r.ort];return 0===r.ort?t.width||T[e]:t.height||T[e]}function g(t,e,n,i){var o=function(o){return!q.hasAttribute(\"disabled\")&&(!function(t,e){return t.classList?t.classList.contains(e):new RegExp(\"\\\\b\"+e+\"\\\\b\").test(t.className)}(q,r.cssClasses.tap)&&(!!(o=function(t,e,n){var i,o,s=0===t.type.indexOf(\"touch\"),l=0===t.type.indexOf(\"mouse\"),u=0===t.type.indexOf(\"pointer\");0===t.type.indexOf(\"MSPointer\")&&(u=!0);if(s&&r.multitouch){var c=function(t){return t.target===n||n.contains(t.target)};if(\"touchstart\"===t.type){var d=Array.prototype.filter.call(t.touches,c);if(d.length>1)return!1;i=d[0].pageX,o=d[0].pageY}else{var h=Array.prototype.find.call(t.changedTouches,c);if(!h)return!1;i=h.pageX,o=h.pageY}}else if(s){if(t.touches.length>1)return!1;i=t.changedTouches[0].pageX,o=t.changedTouches[0].pageY}e=e||a(Z),(l||u)&&(i=t.clientX+e.x,o=t.clientY+e.y);return t.pageOffset=e,t.points=[i,o],t.cursor=l||u,t}(o,i.pageOffset,i.target||e))&&(!(t===F.start&&void 0!==o.buttons&&o.buttons>1)&&((!i.hover||!o.buttons)&&(H||o.preventDefault(),o.calcPoint=o.points[r.ort],void n(o,i))))))},s=[];return t.split(\" \").forEach(function(t){e.addEventListener(t,o,!!H&&{passive:!0}),s.push([t,o])}),s}function y(t){var e=t-function(t,e){var n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.documentElement,o=a(i);/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0);return e?n.top+o.y-r.clientTop:n.left+o.x-r.clientLeft}(T,r.ort),n=100*e/v();return r.dir?100-n:n}function b(t,e,n,i){var r=n.slice(),o=[!t,t],s=[t,!t];i=i.slice(),t&&i.reverse(),i.length>1?i.forEach(function(t,n){var i=D(r,t,r[t]+e,o[n],s[n],!1);!1===i?e=0:(e=i-r[t],r[t]=i)}):o=s=[!0];var a=!1;i.forEach(function(t,i){a=N(t,n[t]+e,o[i],s[i])||a}),a&&i.forEach(function(t){_(\"update\",t),_(\"slide\",t)})}function _(t,e,n){Object.keys(Q).forEach(function(i){var o=i.split(\".\")[0];t===o&&Q[i].forEach(function(t){t.call(z,$.map(r.format.to),e,$.slice(),n||!1,G.slice())})})}function w(t,e){\"mouseout\"===t.type&&\"HTML\"===t.target.nodeName&&null===t.relatedTarget&&k(t,e)}function x(t,e){if(-1===navigator.appVersion.indexOf(\"MSIE 9\")&&0===t.buttons&&0!==e.buttonsProperty)return k(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint),i=100*n/e.baseSize;b(n>0,i,e.locations,e.handleNumbers)}function k(e,n){n.handle&&(s(n.handle,r.cssClasses.active),K-=1),n.listeners.forEach(function(t){tt.removeEventListener(t[0],t[1])}),0===K&&(s(q,r.cssClasses.drag),A(),e.cursor&&(et.style.cursor=\"\",et.removeEventListener(\"selectstart\",t))),n.handleNumbers.forEach(function(t){_(\"change\",t),_(\"set\",t),_(\"end\",t)})}function S(e,n){var i;if(1===n.handleNumbers.length){var s=W[n.handleNumbers[0]];if(s.hasAttribute(\"disabled\"))return!1;i=s.children[0],K+=1,o(i,r.cssClasses.active)}e.stopPropagation();var a=[],l=g(F.move,tt,x,{target:e.target,handle:i,listeners:a,startCalcPoint:e.calcPoint,baseSize:v(),pageOffset:e.pageOffset,handleNumbers:n.handleNumbers,buttonsProperty:e.buttons,locations:G.slice()}),u=g(F.end,tt,k,{target:e.target,handle:i,listeners:a,handleNumbers:n.handleNumbers}),c=g(\"mouseout\",tt,w,{target:e.target,handle:i,listeners:a,handleNumbers:n.handleNumbers});a.push.apply(a,l.concat(u,c)),e.cursor&&(et.style.cursor=getComputedStyle(e.target).cursor,W.length>1&&o(q,r.cssClasses.drag),et.addEventListener(\"selectstart\",t,!1)),n.handleNumbers.forEach(function(t){_(\"start\",t)})}function C(t){t.stopPropagation();var e=y(t.calcPoint),i=function(t){var e=100,n=!1;return W.forEach(function(i,r){if(!i.hasAttribute(\"disabled\")){var o=Math.abs(G[r]-t);o1&&(i&&e>0&&(n=Math.max(n,t[e-1]+r.margin)),o&&e1&&r.limit&&(i&&e>0&&(n=Math.min(n,t[e-1]+r.limit)),o&&e50?-1:1,n=3+(W.length+e*t);W[t].childNodes[0].style.zIndex=n})}function N(t,e,n,i){return!1!==(e=D(G,t,e,n,i,!1))&&(function(t,e){G[t]=e,$[t]=J.fromStepping(e);var n=function(){W[t].style[r.style]=M(e),V(t),V(t+1)};window.requestAnimationFrame&&r.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}(t,e),!0)}function V(t){if(U[t]){var e=0,n=100;0!==t&&(e=G[t-1]),t!==U.length-1&&(n=G[t]),U[t].style[r.style]=M(e),U[t].style[r.styleOposite]=M(100-n)}}function I(t,e){null!==t&&!1!==t&&(\"number\"==typeof t&&(t=String(t)),!1===(t=r.format.from(t))||isNaN(t)||N(e,J.toStepping(t),!1,!1))}function P(t,e){var o=i(t),s=void 0===G[0];e=void 0===e||!!e,o.forEach(I),r.animate&&!s&&n(q,r.cssClasses.tap,r.animationDuration),X.forEach(function(t){N(t,G[t],!0,!1)}),A(),X.forEach(function(t){_(\"update\",t),null!==o[t]&&e&&_(\"set\",t)})}function R(){var t=$.map(r.format.to);return 1===t.length?t[0]:t}function L(t,e){Q[t]=Q[t]||[],Q[t].push(e),\"update\"===t.split(\".\")[0]&&W.forEach(function(t,e){_(\"update\",e)})}var T,W,U,z,j,F=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\"},Y=window.CSS&&CSS.supports&&CSS.supports(\"touch-action\",\"none\"),H=Y&&function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e)}catch(t){}return t}(),q=e,G=[],X=[],K=0,J=r.spectrum,$=[],Q={},Z=e.ownerDocument,tt=Z.documentElement,et=Z.body;if(q.noUiSlider)throw new Error(\"noUiSlider (\"+B+\"): Slider was already initialized.\");return function(t){o(t,r.cssClasses.target),0===r.dir?o(t,r.cssClasses.ltr):o(t,r.cssClasses.rtl);0===r.ort?o(t,r.cssClasses.horizontal):o(t,r.cssClasses.vertical);T=u(t,r.cssClasses.base)}(q),function(t,e){W=[],(U=[]).push(d(e,t[0]));for(var n=0;nn.stepAfter.startValue&&(r=n.stepAfter.startValue-i),o=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===t?r=null:0===t&&(o=null);var s=J.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,r]})},on:L,off:function(t){var e=t&&t.split(\".\")[0],n=e&&t.substring(e.length);Object.keys(Q).forEach(function(t){var i=t.split(\".\")[0],r=t.substring(i.length);e&&e!==i||n&&n!==r||delete Q[t]})},get:R,set:P,reset:function(t){P(r.start,t)},__moveHandles:function(t,e,n){b(t,e,G,n)},options:l,updateOptions:function(t,e){var n=R(),i=[\"margin\",\"limit\",\"padding\",\"range\",\"animate\",\"snap\",\"step\",\"format\"];i.forEach(function(e){void 0!==t[e]&&(l[e]=t[e])});var o=O(l);i.forEach(function(e){void 0!==t[e]&&(r[e]=o[e])}),J=o.spectrum,r.margin=o.margin,r.limit=o.limit,r.padding=o.padding,r.pips&&m(r.pips);G=[],P(t.start||n,e)},target:q,removePips:f,pips:m},function(t){t.fixed||W.forEach(function(t,e){g(F.start,t.children[0],S,{handleNumbers:[e]})});t.tap&&g(F.start,T,C,{});t.hover&&g(F.move,T,E,{hover:!0});t.drag&&U.forEach(function(e,n){if(!1!==e&&0!==n&&n!==U.length-1){var i=W[n-1],s=W[n],a=[e];o(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(s.children[0])),a.forEach(function(t){g(F.start,t,S,{handles:[i,s],handleNumbers:[n-1,n]})})}})}(r.events),P(r.start),r.pips&&m(r.pips),r.tooltips&&function(){var t=W.map(h);L(\"update\",function(e,n,i){if(t[n]){var o=e[n];!0!==r.tooltips[n]&&(o=r.tooltips[n].to(i[n])),t[n].innerHTML=o}})}(),L(\"update\",function(t,e,n,i,o){X.forEach(function(t){var e=W[t],i=D(G,t,0,!0,!0,!0),s=D(G,t,100,!0,!0,!0),a=o[t],l=r.ariaFormat.to(n[t]);e.children[0].setAttribute(\"aria-valuemin\",i.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\",l)})}),z}var B=\"10.1.0\";m.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error(\"noUiSlider (\"+B+\"): 'limit', 'margin' and 'padding' must be divisible by step.\");return 2===this.xPct.length&&u(this.xVal,t)},m.prototype.toStepping=function(t){return t=d(this.xVal,this.xPct,t)},m.prototype.fromStepping=function(t){return function(t,e,n){if(n>=100)return t.slice(-1)[0];var i,r,o,s,a=c(n,e);return i=t[a-1],r=t[a],o=e[a-1],s=e[a],function(t,e){return e*(t[1]-t[0])/100+t[0]}([i,r],(n-o)*l(o,s))}(this.xVal,this.xPct,t)},m.prototype.getStep=function(t){return t=h(this.xPct,this.xSteps,this.snap,t)},m.prototype.getNearbySteps=function(t){var e=c(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]}}},m.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(r);return Math.max.apply(null,t)},m.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var U={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{version:B,create:function(t,e){if(!t||!t.nodeName)throw new Error(\"noUiSlider (\"+B+\"): create requires a single element, got: \"+t);var n=O(e),i=W(t,n,e);return t.noUiSlider=i,i}}})},421:/*!\n", + " * Pikaday\n", + " *\n", + " * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday\n", + " */\n", + " function(t,e,n){!function(i,r){\"use strict\";var o;if(\"object\"==typeof n){try{o=t(\"moment\")}catch(t){}e.exports=r(o)}else i.Pikaday=r(i.moment)}(this,function(t){\"use strict\";var e=\"function\"==typeof t,n=!!window.addEventListener,i=window.document,r=window.setTimeout,o=function(t,e,i,r){n?t.addEventListener(e,i,!!r):t.attachEvent(\"on\"+e,i)},s=function(t,e,i,r){n?t.removeEventListener(e,i,!!r):t.detachEvent(\"on\"+e,i)},a=function(t,e){return-1!==(\" \"+t.className+\" \").indexOf(\" \"+e+\" \")},l=function(t){return/Array/.test(Object.prototype.toString.call(t))},u=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},c=function(t){var e=t.getDay();return 0===e||6===e},d=function(t,e){return[31,function(t){return t%4==0&&t%100!=0||t%400==0}(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},h=function(t){u(t)&&t.setHours(0,0,0,0)},p=function(t,e){return t.getTime()===e.getTime()},f=function(t,e,n){var i,r;for(i in e)(r=void 0!==t[i])&&\"object\"==typeof e[i]&&null!==e[i]&&void 0===e[i].nodeName?u(e[i])?n&&(t[i]=new Date(e[i].getTime())):l(e[i])?n&&(t[i]=e[i].slice(0)):t[i]=f({},e[i],n):!n&&r||(t[i]=e[i]);return t},m=function(t,e,n){var r;i.createEvent?((r=i.createEvent(\"HTMLEvents\")).initEvent(e,!0,!1),r=f(r,n),t.dispatchEvent(r)):i.createEventObject&&(r=i.createEventObject(),r=f(r,n),t.fireEvent(\"on\"+e,r))},v=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},g={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,keyboardInput:!0},y=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},b=function(t){var e=[],n=\"false\";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'';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\"),'\"},_=function(t,e,n){var i=new Date(n,0,1),r=Math.ceil(((new Date(n,e,t)-i)/864e5+i.getDay()+1)/7);return''+r+\"\"},w=function(t,e,n,i){return''+(e?t.reverse():t).join(\"\")+\"\"},x=function(t,e,n,i,r,o){var s,a,u,c,d,h=t._o,p=n===h.minYear,f=n===h.maxYear,m='
',v=!0,g=!0;for(u=[],s=0;s<12;s++)u.push('\");for(c='
'+h.i18n.months[i]+'
\",l(h.yearRange)?(s=h.yearRange[0],a=h.yearRange[1]+1):(s=n-h.yearRange,a=1+n+h.yearRange),u=[];s=h.minYear&&u.push('\");return d='
'+n+h.yearSuffix+'
\",h.showMonthAfterYear?m+=d+c:m+=c+d,p&&(0===i||h.minMonth>=i)&&(v=!1),f&&(11===i||h.maxMonth<=i)&&(g=!1),0===e&&(m+='\"),e===t._o.numberOfMonths-1&&(m+='\"),m+=\"
\"},k=function(t,e,n){return''+function(t){var e,n=[];t.showWeekNumber&&n.push(\"\");for(e=0;e<7;e++)n.push('\");return\"\"+(t.isRTL?n.reverse():n).join(\"\")+\"\"}(t)+function(t){return\"\"+t.join(\"\")+\"\"}(e)+\"
'+y(t,e,!0)+\"
\"},S=function(s){var l=this,c=l.config(s);l._onMouseDown=function(t){if(l._v){var e=(t=t||window.event).target||t.srcElement;if(e)if(a(e,\"is-disabled\")||(!a(e,\"pika-button\")||a(e,\"is-empty\")||a(e.parentNode,\"is-disabled\")?a(e,\"pika-prev\")?l.prevMonth():a(e,\"pika-next\")&&l.nextMonth():(l.setDate(new Date(e.getAttribute(\"data-pika-year\"),e.getAttribute(\"data-pika-month\"),e.getAttribute(\"data-pika-day\"))),c.bound&&r(function(){l.hide(),c.blurFieldOnSelect&&c.field&&c.field.blur()},100))),a(e,\"pika-select\"))l._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}}},l._onChange=function(t){var e=(t=t||window.event).target||t.srcElement;e&&(a(e,\"pika-select-month\")?l.gotoMonth(e.value):a(e,\"pika-select-year\")&&l.gotoYear(e.value))},l._onKeyChange=function(t){if(t=t||window.event,l.isVisible())switch(t.keyCode){case 13:case 27:c.field&&c.field.blur();break;case 37:t.preventDefault(),l.adjustDate(\"subtract\",1);break;case 38:l.adjustDate(\"subtract\",7);break;case 39:l.adjustDate(\"add\",1);break;case 40:l.adjustDate(\"add\",7)}},l._onInputChange=function(n){var i;n.firedBy!==l&&(i=c.parse?c.parse(c.field.value,c.format):e?(i=t(c.field.value,c.format,c.formatStrict))&&i.isValid()?i.toDate():null:new Date(Date.parse(c.field.value)),u(i)&&l.setDate(i),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var t=i.activeElement;do{if(a(t,\"pika-single\"))return}while(t=t.parentNode);l._c||(l._b=r(function(){l.hide()},50)),l._c=!1},l._onClick=function(t){var e=(t=t||window.event).target||t.srcElement,i=e;if(e){!n&&a(e,\"pika-select\")&&(e.onchange||(e.setAttribute(\"onchange\",\"return;\"),o(e,\"change\",l._onChange)));do{if(a(i,\"pika-single\")||i===c.trigger)return}while(i=i.parentNode);l._v&&e!==c.trigger&&i!==c.trigger&&l.hide()}},l.el=i.createElement(\"div\"),l.el.className=\"pika-single\"+(c.isRTL?\" is-rtl\":\"\")+(c.theme?\" \"+c.theme:\"\"),o(l.el,\"mousedown\",l._onMouseDown,!0),o(l.el,\"touchend\",l._onMouseDown,!0),o(l.el,\"change\",l._onChange),c.keyboardInput&&o(i,\"keydown\",l._onKeyChange),c.field&&(c.container?c.container.appendChild(l.el):c.bound?i.body.appendChild(l.el):c.field.parentNode.insertBefore(l.el,c.field.nextSibling),o(c.field,\"change\",l._onInputChange),c.defaultDate||(e&&c.field.value?c.defaultDate=t(c.field.value,c.format).toDate():c.defaultDate=new Date(Date.parse(c.field.value)),c.setDefaultDate=!0));var d=c.defaultDate;u(d)?c.setDefaultDate?l.setDate(d,!0):l.gotoDate(d):l.gotoDate(new Date),c.bound?(this.hide(),l.el.className+=\" is-bound\",o(c.trigger,\"click\",l._onInputClick),o(c.trigger,\"focus\",l._onInputFocus),o(c.trigger,\"blur\",l._onInputBlur)):this.show()};return S.prototype={config:function(t){this._o||(this._o=f({},g,!0));var e=f(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,u(e.minDate)||(e.minDate=!1),u(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate100&&(e.yearRange=100);return e},toString:function(n){return n=n||this._o.format,u(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,i){e&&t.isMoment(n)&&this.setDate(n.toDate(),i)},getDate:function(){return u(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=\"\",m(this._o.field,\"change\",{firedBy:this})),this.draw();if(\"string\"==typeof t&&(t=new Date(Date.parse(t))),u(t)){var n=this._o.minDate,i=this._o.maxDate;u(n)&&ti&&(t=i),this._d=new Date(t.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),m(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(u(t)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),i=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),r=t.getTime();i.setMonth(i.getMonth()+1),i.setDate(i.getDate()-1),e=r=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 u=0;u'+x(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,e)+this.render(this.calendars[u].year,this.calendars[u].month,e)+\"\";this.el.innerHTML=l,n.bound&&\"hidden\"!==n.field.type&&r(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,r,o,s,a,l,u,c;if(!this._o.container){if(this.el.style.position=\"absolute\",t=this._o.trigger,e=t,n=this.el.offsetWidth,r=this.el.offsetHeight,o=window.innerWidth||i.documentElement.clientWidth,s=window.innerHeight||i.documentElement.clientHeight,a=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,\"function\"==typeof t.getBoundingClientRect)c=t.getBoundingClientRect(),l=c.left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=e.offsetLeft,u=e.offsetTop+e.offsetHeight;e=e.offsetParent;)l+=e.offsetLeft,u+=e.offsetTop;(this._o.reposition&&l+n>o||this._o.position.indexOf(\"right\")>-1&&l-n+t.offsetWidth>0)&&(l=l-n+t.offsetWidth),(this._o.reposition&&u+r>s+a||this._o.position.indexOf(\"top\")>-1&&u-r-t.offsetHeight>0)&&(u=u-r-t.offsetHeight),this.el.style.left=l+\"px\",this.el.style.top=u+\"px\"}},render:function(t,e,n){var i=this._o,r=new Date,o=d(t,e),s=new Date(t,e,1).getDay(),a=[],l=[];h(r),i.firstDay>0&&(s-=i.firstDay)<0&&(s+=7);for(var f=0===e?11:e-1,m=11===e?0:e+1,v=0===e?t-1:t,g=11===e?t+1:t,y=d(v,f),x=o+s,S=x;S>7;)S-=7;x+=7-S;for(var C=!1,E=0,D=0;E=o+s,P=E-s+1,R=e,L=t,T=i.startRange&&p(i.startRange,M),O=i.endRange&&p(i.endRange,M),W=i.startRange&&i.endRange&&i.startRangei.maxDate||i.disableWeekends&&c(M)||i.disableDayFn&&i.disableDayFn(M);I&&(E/g,\">\")},t}(d.Model);n.CellFormatter=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"StringFormatter\",this.define({font_style:[s.FontStyle,\"normal\"],text_align:[s.TextAlign,\"left\"],text_color:[s.Color]})},t.prototype.doFormat=function(e,t,n,o,r){var i=this.font_style,l=this.text_align,s=this.text_color,c=a.span({},null==n?\"\":\"\"+n);switch(i){case\"bold\":c.style.fontWeight=\"bold\";break;case\"italic\":c.style.fontStyle=\"italic\"}return null!=l&&(c.style.textAlign=l),null!=s&&(c.style.color=s),c.outerHTML},t}(p);n.StringFormatter=f,f.initClass();var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"NumberFormatter\",this.define({format:[s.String,\"0,0\"],language:[s.String,\"en\"],rounding:[s.String,\"round\"]})},t.prototype.doFormat=function(t,n,o,i,l){var s=this,a=this.format,c=this.language,u=function(){switch(s.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}();return o=r.format(o,a,c,u),e.prototype.doFormat.call(this,t,n,o,i,l)},t}(f);n.NumberFormatter=h,h.initClass();var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"BooleanFormatter\",this.define({icon:[s.String,\"check\"]})},t.prototype.doFormat=function(e,t,n,o,r){return n?a.i({class:this.icon}).outerHTML:\"\"},t}(p);n.BooleanFormatter=g,g.initClass();var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"DateFormatter\",this.define({format:[s.String,\"ISO-8601\"]})},t.prototype.getFormat=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;default:return this.format}},t.prototype.doFormat=function(t,n,o,r,i){o=u.isString(o)?parseInt(o,10):o;var s=l(o,this.getFormat());return e.prototype.doFormat.call(this,t,n,s,r,i)},t}(p);n.DateFormatter=m,m.initClass();var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"HTMLTemplateFormatter\",this.define({template:[s.String,\"<%= value %>\"]})},t.prototype.doFormat=function(e,t,n,o,r){var l=this.template;if(null==n)return\"\";var s=i(l),a=c.extend({},r,{value:n});return s(a)},t}(p);n.HTMLTemplateFormatter=v,v.initClass()},424:function(e,t,n){var o=e(380),r=e(436).Grid,i=e(434).RowSelectionModel,l=e(433).CheckboxSelectColumn,s=e(9),a=e(15),c=e(38),u=e(21),d=e(32),p=e(14),f=e(428),h=e(429);n.DTINDEX_NAME=\"__bkdt_internal_index__\";var g=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){for(var t={},o=0,r=d.keys(this.source.data);od?c:-c;if(0!=p)return p}return 0})},e.prototype._update_source_inplace=function(){this.source.properties.data.change.emit()},e}();n.DataProvider=g;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._in_selection_update=!1,t._warned_not_reorderable=!1,t}return o.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.render()}),this.connect(this.model.source.streaming,function(){return t.updateGrid()}),this.connect(this.model.source.patching,function(){return t.updateGrid()}),this.connect(this.model.source.change,function(){return t.updateGrid(!0)}),this.connect(this.model.source.properties.data.change,function(){return t.updateGrid()}),this.connect(this.model.source.selected.change,function(){return t.updateSelection()})},t.prototype.updateGrid=function(e){void 0===e&&(e=!1),this.model.view.compute_indices(),this.data.constructor(this.model.source,this.model.view),this.grid.invalidate(),this.grid.render(),e||(this.model.source.data=this.model.source.data,this.model.source.change.emit())},t.prototype.updateSelection=function(){var e=this;if(!this._in_selection_update){var t=this.model.source.selected,n=t[\"1d\"].indices,o=n.map(function(t){return e.data.index.indexOf(t)});this._in_selection_update=!0,this.grid.setSelectedRows(o),this._in_selection_update=!1;var r=this.grid.getViewport(),i=this.model.get_scroll_index(r,o);null!=i&&this.grid.scrollRowToTop(i)}},t.prototype.newIndexColumn=function(){return{id:c.uniqueId(),name:this.model.index_header,field:n.DTINDEX_NAME,width:this.model.index_width,behavior:\"select\",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:\"bk-cell-index\",headerCssClass:\"bk-header-index\"}},t.prototype.css_classes=function(){return e.prototype.css_classes.call(this).concat(\"bk-data-table\")},t.prototype.render=function(){var e,t=this,n=this.model.columns.map(function(e){return e.toColumn()});if(\"checkbox\"==this.model.selectable&&(e=new l({cssClass:\"bk-cell-select\"}),n.unshift(e.getColumnDefinition())),null!=this.model.index_position){var o=this.model.index_position,a=this.newIndexColumn();-1==o?n.push(a):o<-1?n.splice(o+1,0,a):n.splice(o,0,a)}var c=this.model.reorderable;!c||\"undefined\"!=typeof $&&null!=$.fn&&null!=$.fn.sortable||(this._warned_not_reorderable||(p.logger.warn(\"jquery-ui is required to enable DataTable.reorderable\"),this._warned_not_reorderable=!0),c=!1);var u={enableCellNavigation:!1!==this.model.selectable,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 g(this.model.source,this.model.view),this.grid=new r(this.el,this.data,n,u),this.grid.onSort.subscribe(function(e,o){n=o.sortCols,t.data.sort(n),t.grid.invalidate(),t.updateSelection(),t.grid.render()}),!1!==this.model.selectable&&(this.grid.setSelectionModel(new i({selectActiveRow:null==e})),null!=e&&this.grid.registerPlugin(e),this.grid.onSelectedRowsChanged.subscribe(function(e,n){if(!t._in_selection_update){var o=s.create_empty_hit_test_result();o.indices=n.rows.map(function(e){return t.data.index[e]}),t.model.source.selected=o}}),this.updateSelection())},t}(h.WidgetView);n.DataTableView=m;var v=function(e){function t(t){var n=e.call(this,t)||this;return n.default_width=600,n}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"DataTable\",this.prototype.default_view=m,this.define({columns:[a.Array,[]],fit_columns:[a.Bool,!0],sortable:[a.Bool,!0],reorderable:[a.Bool,!0],editable:[a.Bool,!1],selectable:[a.Bool,!0],index_position:[a.Int,0],index_header:[a.String,\"#\"],index_width:[a.Int,40],scroll_to_selection:[a.Bool,!0]}),this.override({height:400})},t.prototype.get_scroll_index=function(e,t){return this.scroll_to_selection&&0!=t.length?u.any(t,function(t){return e.top<=t&&t<=e.bottom})?null:Math.max(0,Math.min.apply(Math,t)-1):null},t}(f.TableWidget);n.DataTable=v,v.initClass()},425:function(e,t,n){var o=e(380);o.__exportStar(e(422),n),o.__exportStar(e(423),n);var r=e(424);n.DataTable=r.DataTable;var i=e(427);n.TableColumn=i.TableColumn;var l=e(428);n.TableWidget=l.TableWidget},426:function(e,t,n){var o=e(425);n.Tables=o;var r=e(0);r.register_models(o)},427:function(e,t,n){var o=e(380),r=e(423),i=e(422),l=e(15),s=e(38),a=e(53),c=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"TableColumn\",this.define({field:[l.String],title:[l.String],width:[l.Number,300],formatter:[l.Instance,function(){return new r.StringFormatter}],editor:[l.Instance,function(){return new i.StringEditor}],sortable:[l.Bool,!0],default_sort:[l.String,\"ascending\"]})},t.prototype.toColumn=function(){return{id:s.uniqueId(),field:this.field,name:this.title,width:this.width,formatter:null!=this.formatter?this.formatter.doFormat.bind(this.formatter):void 0,model:this.editor,editor:this.editor.default_view,sortable:this.sortable,defaultSortAsc:\"ascending\"==this.default_sort}},t}(a.Model);n.TableColumn=c,c.initClass()},428:function(e,t,n){var o=e(380),r=e(429),i=e(183),l=e(15),s=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"TableWidget\",this.define({source:[l.Instance],view:[l.Instance,function(){return new i.CDSView}]})},t.prototype.initialize=function(){e.prototype.initialize.call(this),null==this.view.source&&(this.view.source=this.source,this.view.compute_indices())},t}(r.Widget);n.TableWidget=s,s.initClass()},429:function(e,t,n){var o=e(380),r=e(146),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.css_classes=function(){return e.prototype.css_classes.call(this).concat(\"bk-widget\")},t.prototype.render=function(){this._render_classes(),null!=this.model.height&&(this.el.style.height=this.model.height+\"px\"),null!=this.model.width&&(this.el.style.width=this.model.width+\"px\")},t.prototype.get_width=function(){throw new Error(\"unused\")},t.prototype.get_height=function(){throw new Error(\"unused\")},t}(r.LayoutDOMView);n.WidgetView=i;var l=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.initClass=function(){this.prototype.type=\"Widget\"},t}(r.LayoutDOM);n.Widget=l,l.initClass()},430:/*!\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,t,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){var n=(t=t||G).createElement(\"script\");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function o(e){var t=!!e&&\"length\"in e&&e.length,n=se.type(e);return\"function\"!==n&&!se.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 se.isFunction(t)?se.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?se.grep(e,function(e){return e===t!==n}):\"string\"!=typeof t?se.grep(e,function(e){return ee.call(t,e)>-1!==n}):ve.test(t)?se.filter(t,e,n):(t=se.filter(t,e),se.grep(e,function(e){return ee.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){return e}function a(e){throw e}function c(e,t,n,o){var r;try{e&&se.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&se.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}function u(){G.removeEventListener(\"DOMContentLoaded\",u),e.removeEventListener(\"load\",u),se.ready()}function d(){this.expando=se.expando+d.uid++}function p(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o=\"data-\"+t.replace(Ae,\"-$&\").toLowerCase(),\"string\"==typeof(n=e.getAttribute(o))){try{n=function(e){if(\"true\"===e)return!0;if(\"false\"===e)return!1;if(\"null\"===e)return null;if(e===+e+\"\")return+e;if(Ne.test(e))return JSON.parse(e);return e}(n)}catch(e){}De.set(e,t,n)}else n=void 0;return n}function f(e,t,n,o){var r,i=1,l=20,s=o?function(){return o.cur()}:function(){return se.css(e,t,\"\")},a=s(),c=n&&n[3]||(se.cssNumber[t]?\"\":\"px\"),u=(se.cssNumber[t]||\"px\"!==c&&+a)&&He.exec(se.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+a||1;do{u/=i=i||\".5\",se.style(e,t,u+c)}while(i!==(i=s()/a)&&1!==i&&--l)}return n&&(u=+u||+a||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=r)),r}function h(e){var t,n=e.ownerDocument,o=e.nodeName,r=Ie[o];return r||(t=n.body.appendChild(n.createElement(o)),r=se.css(t,\"display\"),t.parentNode.removeChild(t),\"none\"===r&&(r=\"block\"),Ie[o]=r,r)}function g(e,t){for(var n,o,r=[],i=0,l=e.length;i-1)r&&r.push(i);else if(c=se.contains(i.ownerDocument,i),l=m(d.appendChild(i),\"script\"),c&&v(l),n)for(u=0;i=l[u++];)je.test(i.type||\"\")&&n.push(i);return d}function y(){return!0}function C(){return!1}function b(){try{return G.activeElement}catch(e){}}function x(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)x(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)),!1===r)r=C;else if(!r)return e;return 1===i&&(l=r,(r=function(e){return se().off(e),l.apply(this,arguments)}).guid=l.guid||(l.guid=se.guid++)),e.each(function(){se.event.add(this,t,r,o,n)})}function R(e,t){return r(e,\"table\")&&r(11!==t.nodeType?t:t.firstChild,\"tr\")?se(\">tbody\",e)[0]||e:e}function S(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function E(e){var t=Ye.exec(e.type);return t?e.type=t[1]:e.removeAttribute(\"type\"),e}function k(e,t){var n,o,r,i,l,s,a,c;if(1===t.nodeType){if(Pe.hasData(e)&&(i=Pe.access(e),l=Pe.set(t,i),c=i.events)){delete l.handle,l.events={};for(r in c)for(n=0,o=c[r].length;n1&&\"string\"==typeof h&&!le.checkClone&&Ge.test(h))return e.each(function(n){var i=e.eq(n);g&&(t[0]=h.call(this,n,i.html())),P(i,t,o,r)});if(p&&(i=w(t,e[0].ownerDocument,!1,e,r),l=i.firstChild,1===i.childNodes.length&&(i=l),l||r)){for(s=se.map(m(i,\"script\"),S),a=s.length;d=0&&nb.cacheLength&&delete e[t.shift()],e[n+\" \"]=o}var t=[];return e}function o(e){return e[M]=!0,e}function r(e){var t=A.createElement(\"fieldset\");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split(\"|\"),o=n.length;o--;)b.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 c(e){return function(t){return\"form\"in t?t.parentNode&&!1===t.disabled?\"label\"in t?\"label\"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:\"label\"in t&&t.disabled===e}}function u(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&&void 0!==e.getElementsByTagName&&e}function p(){}function f(e){for(var t=0,n=e.length,o=\"\";t1?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,t,n,o,r){for(var i,l=[],s=0,a=e.length,c=null!=t;s-1&&(o[u]=!(s[u]=p))}}else y=m(y===s?y.splice(g,y.length):y),l?l(null,s,y,c):Y.apply(s,y)})}function w(e){for(var t,n,o,r=e.length,i=b.relative[e[0].type],l=i||b.relative[\" \"],s=i?1:0,a=h(function(e){return e===t},l,!0),c=h(function(e){return J(t,e)>-1},l,!0),u=[function(e,n,o){var r=!i&&(o||n!==T)||((t=n).nodeType?a(e,n,o):c(e,n,o));return t=null,r}];s1&&g(u),s>1&&f(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace(ie,\"$1\"),n,s+~]|\"+ee+\")\"+ee+\"*\"),ae=new RegExp(\"=\"+ee+\"*([^\\\\]'\\\"]*?)\"+ee+\"*\\\\]\",\"g\"),ce=new RegExp(oe),ue=new RegExp(\"^\"+te+\"$\"),de={ID:new RegExp(\"^#(\"+te+\")\"),CLASS:new RegExp(\"^\\\\.(\"+te+\")\"),TAG:new RegExp(\"^(\"+te+\"|[*])\"),ATTR:new RegExp(\"^\"+ne),PSEUDO:new RegExp(\"^\"+oe),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+ee+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+ee+\"*(?:([+-]|)\"+ee+\"*(\\\\d+)|))\"+ee+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+Z+\")$\",\"i\"),needsContext:new RegExp(\"^\"+ee+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+ee+\"*((?:-\\\\d)?\\\\d*)\"+ee+\"*\\\\)|)(?=[^-]|$)\",\"i\")},pe=/^(?:input|select|textarea|button)$/i,fe=/^h\\d$/i,he=/^[^{]+\\{\\s*\\[native \\w/,ge=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,me=/[+~]/,ve=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+ee+\"?|(\"+ee+\")|.)\",\"ig\"),we=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)},ye=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,Ce=function(e,t){return t?\"\\0\"===e?\"�\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},be=function(){N()},xe=h(function(e){return!0===e.disabled&&(\"form\"in e||\"label\"in e)},{dir:\"parentNode\",next:\"legend\"});try{Y.apply(U=Q.call(W.childNodes),W.childNodes),U[W.childNodes.length].nodeType}catch(e){Y={apply:U.length?function(e,t){G.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}C=t.support={},R=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&\"HTML\"!==t.nodeName},N=t.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:W;return o!==A&&9===o.nodeType&&o.documentElement?(A=o,$=A.documentElement,H=!R(A),W!==A&&(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",be,!1):n.attachEvent&&n.attachEvent(\"onunload\",be)),C.attributes=r(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),C.getElementsByTagName=r(function(e){return e.appendChild(A.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),C.getElementsByClassName=he.test(A.getElementsByClassName),C.getById=r(function(e){return $.appendChild(e).id=M,!A.getElementsByName||!A.getElementsByName(M).length}),C.getById?(b.filter.ID=function(e){var t=e.replace(ve,we);return function(e){return e.getAttribute(\"id\")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var t=e.replace(ve,we);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode(\"id\");return n&&n.value===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,o,r,i=t.getElementById(e);if(i){if((n=i.getAttributeNode(\"id\"))&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if((n=i.getAttributeNode(\"id\"))&&n.value===e)return[i]}return[]}}),b.find.TAG=C.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):C.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},b.find.CLASS=C.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},_=[],L=[],(C.qsa=he.test(A.querySelectorAll))&&(r(function(e){$.appendChild(e).innerHTML=\"\",e.querySelectorAll(\"[msallowcapture^='']\").length&&L.push(\"[*^$]=\"+ee+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||L.push(\"\\\\[\"+ee+\"*(?:value|\"+Z+\")\"),e.querySelectorAll(\"[id~=\"+M+\"-]\").length||L.push(\"~=\"),e.querySelectorAll(\":checked\").length||L.push(\":checked\"),e.querySelectorAll(\"a#\"+M+\"+*\").length||L.push(\".#.+[+~]\")}),r(function(e){e.innerHTML=\"\";var t=A.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&L.push(\"name\"+ee+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&L.push(\":enabled\",\":disabled\"),$.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&L.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),L.push(\",.*:\")})),(C.matchesSelector=he.test(F=$.matches||$.webkitMatchesSelector||$.mozMatchesSelector||$.oMatchesSelector||$.msMatchesSelector))&&r(function(e){C.disconnectedMatch=F.call(e,\"*\"),F.call(e,\"[s!='']:x\"),_.push(\"!=\",oe)}),L=L.length&&new RegExp(L.join(\"|\")),_=_.length&&new RegExp(_.join(\"|\")),t=he.test($.compareDocumentPosition),I=t||he.test($.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},z=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!C.sortDetached&&t.compareDocumentPosition(e)===n?e===A||e.ownerDocument===W&&I(W,e)?-1:t===A||t.ownerDocument===W&&I(W,t)?1:P?J(P,e)-J(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!r||!i)return e===A?-1:t===A?1:r?-1:i?1:P?J(P,e)-J(P,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]===W?-1:a[o]===W?1:0},A):A},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==A&&N(e),n=n.replace(ae,\"='$1']\"),C.matchesSelector&&H&&!O[n+\" \"]&&(!_||!_.test(n))&&(!L||!L.test(n)))try{var o=F.call(e,n);if(o||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(e){}return t(n,A,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==A&&N(e),I(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==A&&N(e);var n=b.attrHandle[t.toLowerCase()],o=n&&X.call(b.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==o?o:C.attributes||!H?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},t.escape=function(e){return(e+\"\").replace(ye,Ce)},t.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},t.uniqueSort=function(e){var t,n=[],o=0,r=0;if(D=!C.detectDuplicates,P=!C.sortStable&&e.slice(0),e.sort(z),D){for(;t=e[r++];)t===e[r]&&(o=n.push(r));for(;o--;)e.splice(n[o],1)}return P=null,e},x=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+=x(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=x(t);return n},(b=t.selectors={cacheLength:50,createPseudo:o,match:de,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(ve,we),e[3]=(e[3]||e[4]||e[5]||\"\").replace(ve,we),\"~=\"===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 de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&ce.test(n)&&(t=S(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(ve,we).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+\" \"];return t||(t=new RegExp(\"(^|\"+ee+\")\"+e+\"(\"+ee+\"|$)\"))&&B(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||void 0!==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(re,\" \")+\" \").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 c,u,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(d=(p=m)[M]||(p[M]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),c=u[e]||[],f=c[0]===j&&c[1],y=f&&c[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(y=f=0)||h.pop();)if(1===p.nodeType&&++y&&p===t){u[e]=[j,f,y];break}}else if(w&&(d=(p=t)[M]||(p[M]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),c=u[e]||[],f=c[0]===j&&c[1],y=f),!1===y)for(;(p=++f&&p&&p[g]||(y=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++y||(w&&(d=p[M]||(p[M]={}),(u=d[p.uniqueID]||(d[p.uniqueID]={}))[e]=[j,y]),p!==t)););return(y-=r)===o||y%o==0&&y/o>=0}}},PSEUDO:function(e,n){var r,i=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error(\"unsupported pseudo: \"+e);return i[M]?i(n):i.length>1?(r=[e,e,\"\",n],b.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,t){for(var o,r=i(e,n),l=r.length;l--;)o=J(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=E(e.replace(ie,\"$1\"));return r[M]?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(ve,we),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:o(function(e){return ue.test(e||\"\")||t.error(\"unsupported lang: \"+e),e=e.replace(ve,we).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute(\"xml:lang\")||t.getAttribute(\"lang\"))return(n=n.toLowerCase())===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===$},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!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,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return pe.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n=0;)e.push(o);return e}),gt:u(function(e,t,n){for(var o=n<0?n+t:n;++o0,i=e.length>0,l=function(o,l,s,a,c){var u,d,p,f=0,h=\"0\",g=o&&[],v=[],w=T,y=o||i&&b.find.TAG(\"*\",c),C=j+=null==w?1:Math.random()||.1,x=y.length;for(c&&(T=l===A||l||c);h!==x&&null!=(u=y[h]);h++){if(i&&u){for(d=0,l||u.ownerDocument===A||(N(u),s=!H);p=e[d++];)if(p(u,l||A,s)){a.push(u);break}c&&(j=C)}r&&((u=!p&&u)&&f--,o&&g.push(u))}if(f+=h,r&&h!==f){for(d=0;p=n[d++];)p(g,v,l,s);if(o){if(f>0)for(;h--;)g[h]||v[h]||(v[h]=K.call(a));v=m(v)}Y.apply(a,v),c&&!o&&v.length>0&&f+n.length>1&&t.uniqueSort(a)}return c&&(j=C,T=w),g};return r?o(l):l}(l,i))).selector=e}return s},k=t.select=function(e,t,n,o){var r,i,l,s,a,c=\"function\"==typeof e&&e,u=!o&&S(e=c.selector||e);if(n=n||[],1===u.length){if((i=u[0]=u[0].slice(0)).length>2&&\"ID\"===(l=i[0]).type&&9===t.nodeType&&H&&b.relative[i[1].type]){if(!(t=(b.find.ID(l.matches[0].replace(ve,we),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(r=de.needsContext.test(e)?0:i.length;r--&&(l=i[r],!b.relative[s=l.type]);)if((a=b.find[s])&&(o=a(l.matches[0].replace(ve,we),me.test(i[0].type)&&d(t.parentNode)||t))){if(i.splice(r,1),!(e=o.length&&f(i)))return Y.apply(n,o),n;break}}return(c||E(e,u))(o,t,!H,n,!t||me.test(e)&&d(t.parentNode)||t),n},C.sortStable=M.split(\"\").sort(z).join(\"\")===M,C.detectDuplicates=!!D,N(),C.sortDetached=r(function(e){return 1&e.compareDocumentPosition(A.createElement(\"fieldset\"))}),r(function(e){return e.innerHTML=\"\",\"#\"===e.firstChild.getAttribute(\"href\")})||i(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),C.attributes&&r(function(e){return e.innerHTML=\"\",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(Z,function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),t}(e);se.find=pe,se.expr=pe.selectors,se.expr[\":\"]=se.expr.pseudos,se.uniqueSort=se.unique=pe.uniqueSort,se.text=pe.getText,se.isXMLDoc=pe.isXML,se.contains=pe.contains,se.escapeSelector=pe.escape;var fe=function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&se(e).is(n))break;o.push(e)}return o},he=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ge=se.expr.match.needsContext,me=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i,ve=/^.[^:#\\[\\.,]*$/;se.filter=function(e,t,n){var o=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===o.nodeType?se.find.matchesSelector(o,e)?[o]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n,o=this.length,r=this;if(\"string\"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.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&&ge.test(e)?se(e):e||[],!1).length}});var we,ye=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,Ce=se.fn.init=function(e,t,n){var o,r;if(!e)return this;if(n=n||we,\"string\"==typeof e){if(!(o=\"<\"===e[0]&&\">\"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:G,!0)),me.test(o[1])&&se.isPlainObject(t))for(o in t)se.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(r=G.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):se.isFunction(e)?void 0!==n.ready?n.ready(e):e(se):se.makeArray(e,this)};Ce.prototype=se.fn,we=se(G);var be=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&se.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?se.uniqueSort(i):i)},index:function(e){return e?\"string\"==typeof e?ee.call(se(e),this[0]):ee.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return fe(e,\"parentNode\")},parentsUntil:function(e,t,n){return fe(e,\"parentNode\",n)},next:function(e){return l(e,\"nextSibling\")},prev:function(e){return l(e,\"previousSibling\")},nextAll:function(e){return fe(e,\"nextSibling\")},prevAll:function(e){return fe(e,\"previousSibling\")},nextUntil:function(e,t,n){return fe(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return fe(e,\"previousSibling\",n)},siblings:function(e){return he((e.parentNode||{}).firstChild,e)},children:function(e){return he(e.firstChild)},contents:function(e){return r(e,\"iframe\")?e.contentDocument:(r(e,\"template\")&&(e=e.content||e),se.merge([],e.childNodes))}},function(e,t){se.fn[e]=function(n,o){var r=se.map(this,t,n);return\"Until\"!==e.slice(-5)&&(o=n),o&&\"string\"==typeof o&&(r=se.filter(o,r)),this.length>1&&(xe[e]||se.uniqueSort(r),be.test(e)&&r.reverse()),this.pushStack(r)}});var Re=/[^\\x20\\t\\r\\n\\f]+/g;se.Callbacks=function(e){e=\"string\"==typeof e?function(e){var t={};return se.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}(e):se.extend({},e);var t,n,o,r,i=[],l=[],s=-1,a=function(){for(r=r||e.once,o=t=!0;l.length;s=-1)for(n=l.shift();++s-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?se.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=[e,(n=n||[]).slice?n.slice():n],l.push(n),t||a()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!o}};return c},se.extend({Deferred:function(t){var n=[[\"notify\",\"progress\",se.Callbacks(\"memory\"),se.Callbacks(\"memory\"),2],[\"resolve\",\"done\",se.Callbacks(\"once memory\"),se.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",se.Callbacks(\"once memory\"),se.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 se.Deferred(function(t){se.each(n,function(n,o){var r=se.isFunction(e[o[4]])&&e[o[4]];i[o[1]](function(){var e=r&&r.apply(this,arguments);e&&se.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 c=this,u=arguments,d=function(){var e,d;if(!(t=l&&(o!==a&&(c=void 0,u=[e]),n.rejectWith(c,u))}};t?p():(se.Deferred.getStackHook&&(p.stackTrace=se.Deferred.getStackHook()),e.setTimeout(p))}}var l=0;return se.Deferred(function(e){n[0][3].add(i(0,e,se.isFunction(r)?r:s,e.notifyWith)),n[1][3].add(i(0,e,se.isFunction(t)?t:s)),n[2][3].add(i(0,e,se.isFunction(o)?o:a))}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},i={};return se.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=Q.call(arguments),i=se.Deferred(),l=function(e){return function(n){o[e]=this,r[e]=arguments.length>1?Q.call(arguments):n,--t||i.resolveWith(o,r)}};if(t<=1&&(c(e,i.done(l(n)).resolve,i.reject,!t),\"pending\"===i.state()||se.isFunction(r[n]&&r[n].then)))return i.then();for(;n--;)c(r[n],l(n),i.reject);return i.promise()}});var Se=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;se.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Se.test(t.name)&&e.console.warn(\"jQuery.Deferred exception: \"+t.message,t.stack,n)},se.readyException=function(t){e.setTimeout(function(){throw t})};var Ee=se.Deferred();se.fn.ready=function(e){return Ee.then(e).catch(function(e){se.readyException(e)}),this},se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||Ee.resolveWith(G,[se]))}}),se.ready.then=Ee.then,\"complete\"===G.readyState||\"loading\"!==G.readyState&&!G.documentElement.doScroll?e.setTimeout(se.ready):(G.addEventListener(\"DOMContentLoaded\",u),e.addEventListener(\"load\",u));var ke=function(e,t,n,o,r,i,l){var s=0,a=e.length,c=null==n;if(\"object\"===se.type(n)){r=!0;for(s in n)ke(e,t,s,n[s],!0,i,l)}else if(void 0!==o&&(r=!0,se.isFunction(o)||(l=!0),c&&(l?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(se(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){De.remove(this,e)})}}),se.extend({queue:function(e,t,n){var o;if(e)return t=(t||\"fx\")+\"queue\",o=Pe.get(e,t),n&&(!o||Array.isArray(n)?o=Pe.access(e,t,se.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||\"fx\";var n=se.queue(e,t),o=n.length,r=n.shift(),i=se._queueHooks(e,t),l=function(){se.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 Pe.get(e,n)||Pe.access(e,n,{empty:se.Callbacks(\"once memory\").add(function(){Pe.remove(e,[t+\"queue\",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return\"string\"!=typeof e&&(t=e,e=\"fx\",n--),arguments.length\\x20\\t\\r\\n\\f]+)/i,je=/^$|\\/(?:java|ecma)script/i,Ve={option:[1,\"\"],thead:[1,\"\",\"
\"],col:[2,\"\",\"
\"],tr:[2,\"\",\"
\"],td:[3,\"\",\"
\"],_default:[0,\"\",\"\"]};Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td;var Be=/<|&#?\\w+;/;!function(){var e=G.createDocumentFragment(),t=e.appendChild(G.createElement(\"div\")),n=G.createElement(\"input\");n.setAttribute(\"type\",\"radio\"),n.setAttribute(\"checked\",\"checked\"),n.setAttribute(\"name\",\"t\"),t.appendChild(n),le.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML=\"\",le.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var qe=G.documentElement,Oe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xe=/^([^.]*)(?:\\.(.+)|)/;se.event={global:{},add:function(e,t,n,o,r){var i,l,s,a,c,u,d,p,f,h,g,m=Pe.get(e);if(m)for(n.handler&&(n=(i=n).handler,r=i.selector),r&&se.find.matchesSelector(qe,r),n.guid||(n.guid=se.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):void 0}),t=(t||\"\").match(Re)||[\"\"],c=t.length;c--;)s=Xe.exec(t[c])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f&&(d=se.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=se.event.special[f]||{},u=se.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&se.expr.match.needsContext.test(r),namespace:h.join(\".\")},i),(p=a[f])||((p=a[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,o,h,l)||e.addEventListener&&e.addEventListener(f,l)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,u):p.push(u),se.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,l,s,a,c,u,d,p,f,h,g,m=Pe.hasData(e)&&Pe.get(e);if(m&&(a=m.events)){for(t=(t||\"\").match(Re)||[\"\"],c=t.length;c--;)if(s=Xe.exec(t[c])||[],f=g=s[1],h=(s[2]||\"\").split(\".\").sort(),f){for(d=se.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--;)u=p[i],!r&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||o&&o!==u.selector&&(\"**\"!==o||!u.selector)||(p.splice(i,1),u.selector&&p.delegateCount--,d.remove&&d.remove.call(e,u));l&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||se.removeEvent(e,f,m.handle),delete a[f])}else for(f in a)se.event.remove(e,f+t[c],n,o,!0);se.isEmptyObject(a)&&Pe.remove(e,\"handle events\")}},dispatch:function(e){var t,n,o,r,i,l,s=se.event.fix(e),a=new Array(arguments.length),c=(Pe.get(this,\"events\")||{})[s.type]||[],u=se.event.special[s.type]||{};for(a[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&(\"click\"!==e.type||!0!==c.disabled)){for(i=[],l={},n=0;n-1:se.find(r,this,null,[c]).length),l[r]&&i.push(o);i.length&&s.push({elem:c,handlers:i})}return c=this,a\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,Ke=/\\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(Ue,\"<$1>\")},clone:function(e,t,n){var o,r,i,l,s=e.cloneNode(!0),a=se.contains(e.ownerDocument,e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(l=m(s),i=m(e),o=0,r=i.length;o0&&v(l,!a&&m(e,\"script\")),s},cleanData:function(e){for(var t,n,o,r=se.event.special,i=0;void 0!==(n=e[i]);i++)if(Te(n)){if(t=n[Pe.expando]){if(t.events)for(o in t.events)r[o]?se.event.remove(n,o):se.removeEvent(n,o,t.handle);n[Pe.expando]=void 0}n[De.expando]&&(n[De.expando]=void 0)}}}),se.fn.extend({detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return ke(this,function(e){return void 0===e?se.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 P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=R(this,e);t.appendChild(e)}})},prepend:function(){return P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=R(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return P(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return P(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&&(se.cleanData(m(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return ke(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&&!Ke.test(e)&&!Ve[(We.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n1)}}),se.Tween=F,(F.prototype={constructor:F,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||se.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(se.cssNumber[n]?\"\":\"px\")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.options.duration?this.pos=t=se.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):F.propHooks._default.set(this),this}}).init.prototype=F.prototype,(F.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=se.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){se.fx.step[e.prop]?se.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[se.cssProps[e.prop]]&&!se.cssHooks[e.prop]?e.elem[e.prop]=e.now:se.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},se.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},se.fx=F.prototype.init,se.fx.step={};var st,at,ct=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;se.Animation=se.extend(V,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,He.exec(t),n),n}]},tweener:function(e,t){se.isFunction(e)?(t=e,e=[\"*\"]):e=e.match(Re);for(var n,o=0,r=e.length;o1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?se.prop(e,t,n):(1===i&&se.isXMLDoc(e)||(r=se.attrHooks[t.toLowerCase()]||(se.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void se.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:null==(o=se.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!le.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(Re);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\\w+/g),function(e,t){var n=pt[t]||se.find.attr;pt[t]=function(e,t,o){var r,i,l=t.toLowerCase();return o||(i=pt[l],pt[l]=r,r=null!=n(e,t,o)?l:null,pt[l]=i),r}});var ft=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return ke(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&se.isXMLDoc(e)||(t=se.propFix[t]||t,r=se.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=se.find.attr(e,\"tabindex\");return t?parseInt(t,10):ft.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:\"htmlFor\",class:\"className\"}}),le.optSelected||(se.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)}}),se.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){se.propFix[this.toLowerCase()]=this}),se.fn.extend({addClass:function(e){var t,n,o,r,i,l,s,a=0;if(se.isFunction(e))return this.each(function(t){se(this).addClass(e.call(this,t,q(this)))});if(\"string\"==typeof e&&e)for(t=e.match(Re)||[];n=this[a++];)if(r=q(n),o=1===n.nodeType&&\" \"+B(r)+\" \"){for(l=0;i=t[l++];)o.indexOf(\" \"+i+\" \")<0&&(o+=i+\" \");s=B(o),r!==s&&n.setAttribute(\"class\",s)}return this},removeClass:function(e){var t,n,o,r,i,l,s,a=0;if(se.isFunction(e))return this.each(function(t){se(this).removeClass(e.call(this,t,q(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if(\"string\"==typeof e&&e)for(t=e.match(Re)||[];n=this[a++];)if(r=q(n),o=1===n.nodeType&&\" \"+B(r)+\" \"){for(l=0;i=t[l++];)for(;o.indexOf(\" \"+i+\" \")>-1;)o=o.replace(\" \"+i+\" \",\" \");s=B(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):se.isFunction(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,q(this),t),t)}):this.each(function(){var t,o,r,i;if(\"string\"===n)for(o=0,r=se(this),i=e.match(Re)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&\"boolean\"!==n||((t=q(this))&&Pe.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||!1===e?\"\":Pe.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,o=0;for(t=\" \"+e+\" \";n=this[o++];)if(1===n.nodeType&&(\" \"+B(q(n))+\" \").indexOf(t)>-1)return!0;return!1}});var gt=/\\r/g;se.fn.extend({val:function(e){var t,n,o,r=this[0];if(arguments.length)return o=se.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=o?e.call(this,n,se(this).val()):e)?r=\"\":\"number\"==typeof r?r+=\"\":Array.isArray(r)&&(r=se.map(r,function(e){return null==e?\"\":e+\"\"})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&\"set\"in t&&void 0!==t.set(this,r,\"value\")||(this.value=r))});if(r)return(t=se.valHooks[r.type]||se.valHooks[r.nodeName.toLowerCase()])&&\"get\"in t&&void 0!==(n=t.get(r,\"value\"))?n:\"string\"==typeof(n=r.value)?n.replace(gt,\"\"):null==n?\"\":n}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,\"value\");return null!=t?t:B(se.text(e))}},select:{get:function(e){var t,n,o,i=e.options,l=e.selectedIndex,s=\"select-one\"===e.type,a=s?null:[],c=s?l+1:i.length;for(o=l<0?c:s?l:0;o-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),se.each([\"radio\",\"checkbox\"],function(){se.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},le.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})});var mt=/^(?:focusinfocus|focusoutblur)$/;se.extend(se.event,{trigger:function(t,n,o,r){var i,l,s,a,c,u,d,p=[o||G],f=oe.call(t,\"type\")?t.type:t,h=oe.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(l=s=o=o||G,3!==o.nodeType&&8!==o.nodeType&&!mt.test(f+se.event.triggered)&&(f.indexOf(\".\")>-1&&(h=f.split(\".\"),f=h.shift(),h.sort()),c=f.indexOf(\":\")<0&&\"on\"+f,t=t[se.expando]?t:new se.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]:se.makeArray(n,[t]),d=se.event.special[f]||{},r||!d.trigger||!1!==d.trigger.apply(o,n))){if(!r&&!d.noBubble&&!se.isWindow(o)){for(a=d.delegateType||f,mt.test(a+f)||(l=l.parentNode);l;l=l.parentNode)p.push(l),s=l;s===(o.ownerDocument||G)&&p.push(s.defaultView||s.parentWindow||e)}for(i=0;(l=p[i++])&&!t.isPropagationStopped();)t.type=i>1?a:d.bindType||f,(u=(Pe.get(l,\"events\")||{})[t.type]&&Pe.get(l,\"handle\"))&&u.apply(l,n),(u=c&&l[c])&&u.apply&&Te(l)&&(t.result=u.apply(l,n),!1===t.result&&t.preventDefault());return t.type=f,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),n)||!Te(o)||c&&se.isFunction(o[f])&&!se.isWindow(o)&&((s=o[c])&&(o[c]=null),se.event.triggered=f,o[f](),se.event.triggered=void 0,s&&(o[c]=s)),t.result}},simulate:function(e,t,n){var o=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(o,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),se.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){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),le.focusin=\"onfocusin\"in e,le.focusin||se.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=Pe.access(o,t);r||o.addEventListener(e,n,!0),Pe.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=Pe.access(o,t)-1;r?Pe.access(o,t,r):(o.removeEventListener(e,n,!0),Pe.remove(o,t))}}});var vt=e.location,wt=se.now(),yt=/\\?/;se.parseXML=function(t){var n;if(!t||\"string\"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(e){n=void 0}return n&&!n.getElementsByTagName(\"parsererror\").length||se.error(\"Invalid XML: \"+t),n};var Ct=/\\[\\]$/,bt=/\\r?\\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;se.param=function(e,t){var n,o=[],r=function(e,t){var n=se.isFunction(t)?t():t;o[o.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(Array.isArray(e)||e.jquery&&!se.isPlainObject(e))se.each(e,function(){r(this.name,this.value)});else for(n in e)O(n,e[n],t,r);return o.join(\"&\")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,\"elements\");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(\":disabled\")&&Rt.test(this.nodeName)&&!xt.test(e)&&(this.checked||!Me.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:Array.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(bt,\"\\r\\n\")}}):{name:t.name,value:n.replace(bt,\"\\r\\n\")}}).get()}});var St=/%20/g,Et=/#.*$/,kt=/([?&])_=[^&]*/,Tt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Dt=/^\\/\\//,Nt={},At={},$t=\"*/\".concat(\"*\"),Ht=G.createElement(\"a\");Ht.href=vt.href,se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vt.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(vt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":$t,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\":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,se.ajaxSettings),t):U(se.ajaxSettings,e)},ajaxPrefilter:z(Nt),ajaxTransport:z(At),ajax:function(t,n){function o(t,n,o,s){var c,p,f,C,b,x=n;u||(u=!0,a&&e.clearTimeout(a),r=void 0,l=s||\"\",R.readyState=t>0?4:0,c=t>=200&&t<300||304===t,o&&(C=function(e,t,n){var o,r,i,l,s=e.contents,a=e.dataTypes;for(;\"*\"===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]}(h,R,o)),C=function(e,t,n,o){var r,i,l,s,a,c={},u=e.dataTypes.slice();if(u[1])for(l in e.converters)c[l.toLowerCase()]=e.converters[l];i=u.shift();for(;i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!a&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=i,i=u.shift())if(\"*\"===i)i=a;else if(\"*\"!==a&&a!==i){if(!(l=c[a+\" \"+i]||c[\"* \"+i]))for(r in c)if((s=r.split(\" \"))[1]===i&&(l=c[a+\" \"+s[0]]||c[\"* \"+s[0]])){!0===l?l=c[r]:!0!==c[r]&&(i=s[0],u.unshift(s[1]));break}if(!0!==l)if(l&&e.throws)t=l(t);else try{t=l(t)}catch(e){return{state:\"parsererror\",error:l?e:\"No conversion from \"+a+\" to \"+i}}}return{state:\"success\",data:t}}(h,C,R,c),c?(h.ifModified&&((b=R.getResponseHeader(\"Last-Modified\"))&&(se.lastModified[i]=b),(b=R.getResponseHeader(\"etag\"))&&(se.etag[i]=b)),204===t||\"HEAD\"===h.type?x=\"nocontent\":304===t?x=\"notmodified\":(x=C.state,p=C.data,f=C.error,c=!f)):(f=x,!t&&x||(x=\"error\",t<0&&(t=0))),R.status=t,R.statusText=(n||x)+\"\",c?v.resolveWith(g,[p,x,R]):v.rejectWith(g,[R,x,f]),R.statusCode(y),y=void 0,d&&m.trigger(c?\"ajaxSuccess\":\"ajaxError\",[R,h,c?p:f]),w.fireWith(g,[R,x]),d&&(m.trigger(\"ajaxComplete\",[R,h]),--se.active||se.event.trigger(\"ajaxStop\")))}\"object\"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,l,s,a,c,u,d,p,f,h=se.ajaxSetup({},n),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?se(g):se.event,v=se.Deferred(),w=se.Callbacks(\"once memory\"),y=h.statusCode||{},C={},b={},x=\"canceled\",R={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Tt.exec(l);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?l:null},setRequestHeader:function(e,t){return null==u&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)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||vt.href)+\"\").replace(Dt,vt.protocol+\"//\"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||\"*\").toLowerCase().match(Re)||[\"\"],null==h.crossDomain){c=G.createElement(\"a\");try{c.href=h.url,c.href=c.href,h.crossDomain=Ht.protocol+\"//\"+Ht.host!=c.protocol+\"//\"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&\"string\"!=typeof h.data&&(h.data=se.param(h.data,h.traditional)),X(Nt,h,n,R),u)return R;(d=se.event&&h.global)&&0==se.active++&&se.event.trigger(\"ajaxStart\"),h.type=h.type.toUpperCase(),h.hasContent=!Pt.test(h.type),i=h.url.replace(Et,\"\"),h.hasContent?h.data&&h.processData&&0===(h.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(h.data=h.data.replace(St,\"+\")):(f=h.url.slice(i.length),h.data&&(i+=(yt.test(i)?\"&\":\"?\")+h.data,delete h.data),!1===h.cache&&(i=i.replace(kt,\"$1\"),f=(yt.test(i)?\"&\":\"?\")+\"_=\"+wt+++f),h.url=i+f),h.ifModified&&(se.lastModified[i]&&R.setRequestHeader(\"If-Modified-Since\",se.lastModified[i]),se.etag[i]&&R.setRequestHeader(\"If-None-Match\",se.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||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]?\", \"+$t+\"; q=0.01\":\"\"):h.accepts[\"*\"]);for(p in h.headers)R.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,R,h)||u))return R.abort();if(x=\"abort\",w.add(h.complete),R.done(h.success),R.fail(h.error),r=X(At,h,n,R)){if(R.readyState=1,d&&m.trigger(\"ajaxSend\",[R,h]),u)return R;h.async&&h.timeout>0&&(a=e.setTimeout(function(){R.abort(\"timeout\")},h.timeout));try{u=!1,r.send(C,o)}catch(e){if(u)throw e;o(-1,e)}}else o(-1,\"No Transport\");return R},getJSON:function(e,t,n){return se.get(e,t,n,\"json\")},getScript:function(e,t){return se.get(e,void 0,t,\"script\")}}),se.each([\"get\",\"post\"],function(e,t){se[t]=function(e,n,o,r){return se.isFunction(n)&&(r=r||o,o=n,n=void 0),se.ajax(se.extend({url:e,type:t,dataType:r,data:n,success:o},se.isPlainObject(e)&&e))}}),se._evalUrl=function(e){return se.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,throws:!0})},se.fn.extend({wrapAll:function(e){var t;return this[0]&&(se.isFunction(e)&&(e=e.call(this[0])),t=se(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 se.isFunction(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=se.isFunction(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){se(this).replaceWith(this.childNodes)}),this}}),se.expr.pseudos.hidden=function(e){return!se.expr.pseudos.visible(e)},se.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},se.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},_t=se.ajaxSettings.xhr();le.cors=!!_t&&\"withCredentials\"in _t,le.ajax=_t=!!_t,se.ajaxTransport(function(t){var n,o;if(le.cors||_t&&!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(Lt[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(e){if(n)throw e}},abort:function(){n&&n()}}}),se.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),se.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 se.globalEval(e),e}}}),se.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),se.ajaxTransport(\"script\",function(e){if(e.crossDomain){var t,n;return{send:function(o,r){t=se(\"