{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "*Examples are given here in abbreviated form. We invite you to look over our other examples which explain these calculations in greater detail, as well as read the freud documentation to better understand these examples*" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(global) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", " window._bokeh_onload_callbacks = [];\n", " window._bokeh_is_loading = undefined;\n", " }\n", "\n", "\n", " \n", " if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n", " window._bokeh_timeout = Date.now() + 5000;\n", " window._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", " if (window.Bokeh !== undefined) {\n", " var el = document.getElementById(\"1c280591-11a1-4c0d-a424-dd422ed3b8ec\");\n", " el.textContent = \"BokehJS \" + Bokeh.version + \" successfully loaded.\";\n", " } else if (Date.now() < window._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", " function run_callbacks() {\n", " try {\n", " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", " }\n", " finally {\n", " delete window._bokeh_onload_callbacks\n", " }\n", " console.info(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(js_urls, callback) {\n", " window._bokeh_onload_callbacks.push(callback);\n", " if (window._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", " window._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", " window._bokeh_is_loading--;\n", " if (window._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", " };var element = document.getElementById(\"1c280591-11a1-4c0d-a424-dd422ed3b8ec\");\n", " if (element == null) {\n", " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '1c280591-11a1-4c0d-a424-dd422ed3b8ec' but no matching script tag was found. \")\n", " return false;\n", " }\n", "\n", " var js_urls = [];\n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " /* BEGIN bokeh.min.js */\n", " window.Bokeh=Bokeh=function(){var t=void 0;return function e(t,r,o){function i(n){if(!r[n]){if(!t[n]){var s=new Error(\"Cannot find module '\"+n+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=r[n]={exports:{}},l=function(e){var r=t[n][1][e];return i(r?r:e)};l.modules=i.modules,t[n][0].call(a.exports,l,a,a.exports,e,t,r,o)}return r[n].exports}i.modules=t;var n=i(o[0]);return n.require=i,n}({base:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i={}.hasOwnProperty,n=t(\"./models/index\"),s=t(\"./core/util/object\");r.overrides={},o=s.clone(n),r.Models=function(t){var e,i;if(e=null!=(i=r.overrides[t])?i:o[t],null==e)throw new Error(\"Model `\"+t+\"' does not exist. This could be due to a widget or a custom model not being registered before first usage.\");return e},r.Models.register=function(t,e){return r.overrides[t]=e},r.Models.unregister=function(t){return delete r.overrides[t]},r.Models.register_models=function(t,e,r){var n,s,a;if(null==e&&(e=!1),null==r&&(r=null),null!=t){a=[];for(s in t)i.call(t,s)&&(n=t[s],e||!o.hasOwnProperty(s)?a.push(o[s]=n):a.push(\"function\"==typeof r?r(s):void 0));return a}},r.Models.registered_names=function(){return Object.keys(o)},r.index={}},{\"./core/util/object\":\"core/util/object\",\"./models/index\":\"models/index\"}],client:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=t(\"es6-promise\"),l=t(\"./core/logging\"),u=t(\"./core/util/string\"),c=t(\"./core/util/object\"),_=t(\"./document\");r.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",r.DEFAULT_SESSION_ID=\"default\",n=function(){function t(t,e,r){this.header=t,this.metadata=e,this.content=r,this.buffers=[]}return t.assemble=function(e,r,o){var i,n,s;return n=JSON.parse(e),s=JSON.parse(r),i=JSON.parse(o),new t(n,s,i)},t.create_header=function(t,e){var r;return r={msgid:u.uniqueId(),msgtype:t},c.extend(r,e)},t.create=function(e,r,o){var i;return null==o&&(o={}),i=t.create_header(e,r),new t(i,{},o)},t.prototype.send=function(t){var e,r,o;return r=JSON.stringify(this.header),o=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(r),t.send(o),t.send(e)},t.prototype.complete=function(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(!(\"num_buffers\"in this.header)||this.buffers.length===this.header.num_buffers)},t.prototype.add_buffer=function(t){return this.buffers.push(t)},t.prototype._header_field=function(t){return t in this.header?this.header[t]:null},t.prototype.msgid=function(){return this._header_field(\"msgid\")},t.prototype.msgtype=function(){return this._header_field(\"msgtype\")},t.prototype.sessid=function(){return this._header_field(\"sessid\")},t.prototype.reqid=function(){return this._header_field(\"reqid\")},t.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},t}(),s={\"PATCH-DOC\":function(t,e){return t._for_session(function(t){return t._handle_patch(e)})},OK:function(t,e){return l.logger.trace(\"Unhandled OK reply to \"+e.reqid())},ERROR:function(t,e){return l.logger.error(\"Unhandled ERROR reply to \"+e.reqid()+\": \"+e.content.text)}},o=function(){function t(e,o,i,n,s){this.url=e,this.id=o,this.args_string=i,this._on_have_session_hook=n,this._on_closed_permanently_hook=s,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=r.DEFAULT_SERVER_WEBSOCKET_URL),null==this.id&&(this.id=r.DEFAULT_SESSION_ID),l.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\"),this.socket=null,this.closed_permanently=!1,this._fragments=[],this._partial=null,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this.session=null}return t._connection_count=0,t.prototype._for_session=function(t){if(null!==this.session)return t(this.session)},t.prototype.connect=function(){var t,e,r;if(this.closed_permanently)return a.Promise.reject(new Error(\"Cannot connect() a closed ClientConnection\"));if(null!=this.socket)return a.Promise.reject(new Error(\"Already connected\"));this._fragments=[],this._partial=null,this._pending_replies={},this._current_handler=null;try{return r=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id,(null!=(e=this.args_string)?e.length:void 0)>0&&(r+=\"&\"+this.args_string),null!=window.MozWebSocket?this.socket=new MozWebSocket(r):this.socket=new WebSocket(r),new a.Promise(function(t){return function(e,r){return t.socket.binaryType=\"arraybuffer\",t.socket.onopen=function(){return t._on_open(e,r)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(r)}}}(this))}catch(o){return t=o,l.logger.error(\"websocket creation failed to url: \"+this.url),l.logger.error(\" - \"+t),a.Promise.reject(t)}},t.prototype.close=function(){if(!this.closed_permanently&&(l.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._for_session(function(t){return t._connection_closed()}),null!=this._on_closed_permanently_hook))return this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null},t.prototype._schedule_reconnect=function(t){var e;return e=function(t){return function(){t.closed_permanently||l.logger.info(\"Websocket connection \"+t._number+\" disconnected, will not attempt to reconnect\")}}(this),setTimeout(e,t)},t.prototype.send=function(t){if(null===this.socket)throw new Error(\"not connected so cannot send \"+t);return t.send(this.socket)},t.prototype.send_event=function(t){var e;return e=n.create(\"EVENT\",{},JSON.stringify(t)),this.send(e)},t.prototype.send_with_reply=function(t){var e;return e=new a.Promise(function(e){return function(r,o){return e._pending_replies[t.msgid()]=[r,o],e.send(t)}}(this)),e.then(function(t){if(\"ERROR\"===t.msgtype())throw new Error(\"Error reply \"+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t,e;return t=n.create(\"PULL-DOC-REQ\",{}),e=this.send_with_reply(t),e.then(function(t){if(!(\"doc\"in t.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){return null===this.session?l.logger.debug(\"Pulling session for first time\"):l.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(t){return function(e){var r,o,s;return null!==t.session?(t.session.document.replace_with_json(e),l.logger.debug(\"Updated existing session with new pulled doc\")):t.closed_permanently?l.logger.debug(\"Got new document after connection was already closed\"):(r=_.Document.from_json(e),o=_.Document._compute_patch_since_json(e,r),o.events.length>0&&(l.logger.debug(\"Sending \"+o.events.length+\" changes from model construction back to server\"),s=n.create(\"PATCH-DOC\",{},o),t.send(s)),t.session=new i(t,r,t.id),l.logger.debug(\"Created a new session from new pulled doc\"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})[\"catch\"](function(t){return null!=console.trace&&console.trace(t),l.logger.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){return l.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){return this._on_message_unchecked(t)},t.prototype._on_message_unchecked=function(t){var e,r;if(null==this._current_handler&&l.logger.error(\"got a message but haven't set _current_handler\"),t.data instanceof ArrayBuffer?null==this._partial||this._partial.complete()?this._close_bad_protocol(\"Got binary from websocket but we were expecting text\"):this._partial.add_buffer(t.data):null!=this._partial?this._close_bad_protocol(\"Got text from websocket but we were expecting binary\"):(this._fragments.push(t.data),3===this._fragments.length&&(this._partial=n.assemble(this._fragments[0],this._fragments[1],this._fragments[2]),this._fragments=[],r=this._partial.problem(),null!==r&&this._close_bad_protocol(r))),null!=this._partial&&this._partial.complete())return e=this._partial,this._partial=null,this._current_handler(e)},t.prototype._on_close=function(t){var e,r;for(l.logger.info(\"Lost websocket \"+this._number+\" connection, \"+t.code+\" (\"+t.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+t.code+\" (\"+t.reason+\")\")),this._pending_ack=null),e=function(t){return function(){var e,r,o;r=t._pending_replies;for(o in r)return e=r[o],delete t._pending_replies[o],e;return null}}(this),r=e();null!==r;)r[1](\"Disconnected\"),r=e();if(!this.closed_permanently)return this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return l.logger.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){if(l.logger.error(\"Closing connection: \"+t),null!=this.socket)return this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){return\"ACK\"!==t.msgtype()?this._close_bad_protocol(\"First message was not an ACK\"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):t.msgtype()in s?s[t.msgtype()](this,t):l.logger.debug(\"Doing nothing with message \"+t.msgtype())},t}(),i=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return t.prototype.close=function(){return this._connection.close()},t.prototype.send_event=function(t){return this._connection.send_event(t)},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=n.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._document_changed=function(t){var e;if(t.setter_id!==this.id&&(!(t instanceof _.ModelChangedEvent)||t.attr in t.model.serializable_attributes()))return e=n.create(\"PATCH-DOC\",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){return this.document.apply_json_patch(t.content,this.id)},t}(),r.pull_session=function(t,e,r){var i,n,s;return s=null,i=null,n=new a.Promise(function(n,s){return i=new o(t,e,r,function(t){var e;try{return n(t)}catch(r){throw e=r,l.logger.error(\"Promise handler threw an error, closing session \"+error),t.close(),e}},function(){return s(new Error(\"Connection was closed before we successfully pulled a session\"))}),i.connect().then(function(t){},function(t){throw l.logger.error(\"Failed to connect to Bokeh server \"+t),t})}),n.close=function(){return i.close()},n}},{\"./core/logging\":\"core/logging\",\"./core/util/object\":\"core/util/object\",\"./core/util/string\":\"core/util/string\",\"./document\":\"document\",\"es6-promise\":\"es6-promise\"}],\"core/bokeh_events\":[function(t,e,r){\"use strict\";function o(t){return function(e){e.prototype.event_name=t,l[t]=e}}function i(t){for(var e=[],r=1;rl;s=0<=l?++a:--a)this.properties[o[s]].change.emit(n[o[s]]);if(i)return this;if(!u&&!e.no_change)for(;this._pending;)this._pending=!1,this.change.emit();return this._pending=!1,this._changing=!1,this},t.prototype.setv=function(t,e,r){var o,n,s,a,l;d.isObject(t)||null===t?(o=t,r=e):(o={},o[t]=e),null==r&&(r={});for(t in o)if(i.call(o,t)){if(l=o[t],s=t,null==this.props[s])throw new Error(\"property \"+this.type+\".\"+s+\" wasn't declared\");null!=r&&r.defaults||(this._set_after_defaults[t]=!0)}if(!h.isEmpty(o)){n={};for(t in o)e=o[t],n[t]=this.getv(t);if(this._setv(o,r),null==(null!=r?r.silent:void 0)){a=[];for(t in o)e=o[t],a.push(this._tell_document_about_change(t,n[t],this.getv(t),r));return a}}},t.prototype.set=function(t,e,r){return s.logger.warn(\"HasProps.set('prop_name', value) is deprecated, use HasProps.prop_name = value instead\"),this.setv(t,e,r)},t.prototype.get=function(t){return s.logger.warn(\"HasProps.get('prop_name') is deprecated, use HasProps.prop_name instead\"),this.getv(t)},t.prototype.getv=function(t){if(null==this.props[t])throw new Error(\"property \"+this.type+\".\"+t+\" wasn't declared\");return this.attributes[t]},t.prototype.ref=function(){return u.create_ref(this)},t.prototype.set_subtype=function(t){return this._subtype=t},t.prototype.attribute_is_serializable=function(t){var e;if(e=this.props[t],null==e)throw new Error(this.type+\".attribute_is_serializable('\"+t+\"'): \"+t+\" wasn't declared\");return!e.internal},t.prototype.serializable_attributes=function(){var t,e,r,o;t={},r=this.attributes;for(e in r)o=r[e],this.attribute_is_serializable(e)&&(t[e]=o);return t},t._value_to_json=function(e,r,o){var n,s,a,l,u,c,_;if(r instanceof t)return r.ref();if(d.isArray(r)){for(l=[],n=s=0,a=r.length;sa;i=0<=a?++s:--s)u=r[i],_=o[i],cn&&(r=[n,i],i=r[0],n=r[1]),s>a&&(o=[a,s],s=o[0],a=o[1]),{minX:i,minY:s,maxX:n,maxY:a}},n=function(t){return t*t},r.dist_2_pts=function(t,e,r,o){return n(t-r)+n(e-o)},o=function(t,e,o){var i,n;return i=r.dist_2_pts(e.x,e.y,o.x,o.y),0===i?r.dist_2_pts(t.x,t.y,e.x,e.y):(n=((t.x-e.x)*(o.x-e.x)+(t.y-e.y)*(o.y-e.y))/i,\n", " n<0?r.dist_2_pts(t.x,t.y,e.x,e.y):n>1?r.dist_2_pts(t.x,t.y,o.x,o.y):r.dist_2_pts(t.x,t.y,e.x+n*(o.x-e.x),e.y+n*(o.y-e.y)))},r.dist_to_segment=function(t,e,r){return Math.sqrt(o(t,e,r))},r.check_2_segments_intersect=function(t,e,r,o,i,n,s,a){var l,u,c,_,p,h,d;return c=(a-n)*(r-t)-(s-i)*(o-e),0===c?{hit:!1,x:null,y:null}:(l=e-n,u=t-i,_=(s-i)*l-(a-n)*u,p=(r-t)*l-(o-e)*u,l=_/c,u=p/c,h=t+l*(r-t),d=e+l*(o-e),{hit:l>0&&l<1&&u>0&&u<1,x:h,y:d})}},{\"./util/array\":\"core/util/array\",\"./util/object\":\"core/util/object\"}],\"core/layout/layout_canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./solver\"),s=t(\"../../model\");r.LayoutCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LayoutCanvas\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._top=new n.Variable(\"top \"+this.id),this._left=new n.Variable(\"left \"+this.id),this._width=new n.Variable(\"width \"+this.id),this._height=new n.Variable(\"height \"+this.id),this._right=new n.Variable(\"right \"+this.id),this._bottom=new n.Variable(\"bottom \"+this.id)},e.prototype.get_edit_variables=function(){var t;return t=[],t.push({edit_variable:this._top,strength:n.Strength.strong}),t.push({edit_variable:this._left,strength:n.Strength.strong}),t.push({edit_variable:this._width,strength:n.Strength.strong}),t.push({edit_variable:this._height,strength:n.Strength.strong}),t},e.prototype.get_constraints=function(){return[]},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,bottom:this._bottom.value}}}),e.prototype.dump_layout=function(){return console.log(this.toString(),this.layout_bbox)},e}(s.Model)},{\"../../model\":\"model\",\"./solver\":\"core/layout/solver\"}],\"core/layout/side_panel\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y=function(t,e){function r(){this.constructor=t}for(var o in e)g.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=t(\"./solver\"),b=t(\"./layout_canvas\"),w=t(\"core/properties\"),x=t(\"core/logging\"),k=t(\"core/util/types\");m=Math.PI/2,o=\"alphabetic\",c=\"top\",i=\"bottom\",l=\"middle\",s=\"hanging\",a=\"left\",u=\"right\",n=\"center\",d={above:{parallel:0,normal:-m,horizontal:0,vertical:-m},below:{parallel:0,normal:m,horizontal:0,vertical:m},left:{parallel:-m,normal:0,horizontal:0,vertical:-m},right:{parallel:m,normal:0,horizontal:0,vertical:m}},f={above:{justified:c,parallel:o,normal:l,horizontal:o,vertical:l},below:{justified:i,parallel:s,normal:l,horizontal:s,vertical:l},left:{justified:c,parallel:o,normal:l,horizontal:l,vertical:o},right:{justified:c,parallel:o,normal:l,horizontal:l,vertical:o}},_={above:{justified:n,parallel:n,normal:a,horizontal:n,vertical:a},below:{justified:n,parallel:n,normal:a,horizontal:n,vertical:a},left:{justified:n,parallel:n,normal:u,horizontal:u,vertical:n},right:{justified:n,parallel:n,normal:a,horizontal:a,vertical:n}},p={above:u,below:a,left:u,right:a},h={above:a,below:u,left:u,right:a},r.update_panel_constraints=function(t){var e;if(null==t.model.props.visible||t.model.visible)return e=t.solver,null!=t._size_constraint&&e.has_constraint(t._size_constraint)&&e.remove_constraint(t._size_constraint),t._size_constraint=v.GE(t.model.panel._size,-t._get_size()),e.add_constraint(t._size_constraint),null!=t._full_constraint&&e.has_constraint(t._full_constraint)&&e.remove_constraint(t._full_constraint),t._full_constraint=function(){switch(t.model.panel.side){case\"above\":case\"below\":return v.EQ(t.model.panel._width,[-1,t.plot_model.canvas._width]);case\"left\":case\"right\":return v.EQ(t.model.panel._height,[-1,t.plot_model.canvas._height])}}(),e.add_constraint(t._full_constraint)},r.SidePanel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return y(e,t),e.internal({side:[w.String],plot:[w.Instance]}),e.prototype.initialize=function(t,r){switch(e.__super__.initialize.call(this,t,r),this.side){case\"above\":return this._dim=0,this._normals=[0,-1],this._size=this._height;case\"below\":return this._dim=0,this._normals=[0,1],this._size=this._height;case\"left\":return this._dim=1,this._normals=[-1,0],this._size=this._width;case\"right\":return this._dim=1,this._normals=[1,0],this._size=this._width;default:return x.logger.error(\"unrecognized side: '\"+this.side+\"'\")}},e.prototype.get_constraints=function(){return[v.GE(this._top),v.GE(this._bottom),v.GE(this._left),v.GE(this._right),v.GE(this._width),v.GE(this._height),v.EQ(this._left,this._width,[-1,this._right]),v.EQ(this._bottom,this._height,[-1,this._top])]},e.prototype.apply_label_text_heuristics=function(t,e){var r,o,i;return i=this.side,k.isString(e)?(o=f[i][e],r=_[i][e]):0===e?(o=f[i][e],r=_[i][e]):e<0?(o=\"middle\",r=p[i]):e>0&&(o=\"middle\",r=h[i]),t.textBaseline=o,t.textAlign=r,t},e.prototype.get_label_angle_heuristic=function(t){var e;return e=this.side,d[e][t]},e}(b.LayoutCanvas)},{\"./layout_canvas\":\"core/layout/layout_canvas\",\"./solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"core/layout/solver\":[function(t,e,r){\"use strict\";function o(t){return function(){for(var e=[],r=0;r0)return o=i[e],null==o&&(o=i[e]=new t(e,r)),o;throw new TypeError(\"Logger.get() expects a string name and an optional log-level\")},Object.defineProperty(t.prototype,\"level\",{get:function(){return this.get_level()}}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){var r,i,a,u,c;if(e instanceof o)this._log_level=e;else{if(!l.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]}i=\"[\"+this._name+\"]\",u=t.log_levels,c=[];for(r in u){if(e=u[r],e===t.OFF)break;a=e.name,e.levele;r=0<=e?++t:--t)i.push(n);return i}();return null!=this.spec.transform&&(i=this.spec.transform.v_compute(i)),i},t.prototype._init=function(){var t,e,r,o;if(o=this.obj,null==o)throw new Error(\"missing property object\");if(null==o.properties)throw new Error(\"property object must be a HasProps\");if(t=this.attr,null==t)throw new Error(\"missing property attr\");if(e=o.getv(t),void 0===e&&(r=this.default_value,e=function(){switch(!1){case void 0!==r:return null;case!p.isArray(r):return _.copy(r);case!p.isFunction(r):return r(o);default:return r}}(),o.setv(t,e,{silent:!0,defaults:!0})),p.isArray(e)?this.spec={value:e}:p.isObject(e)&&void 0===e.value!=(void 0===e.field)?this.spec=e:this.spec={value:e},null!=this.spec.field&&!p.isString(this.spec.field))throw new Error(\"field value for property '\"+t+\"' is not a string\");return null!=this.spec.value&&this.validate(this.spec.value),this.init()},t.prototype.toString=function(){return this.name+\"(\"+this.obj+\".\"+this.attr+\", spec: \"+o(this.spec)+\")\"},t}(),r.simple_prop=function(t,e){var n;return n=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,r),n.prototype.name=t,n.prototype.validate=function(r){if(!e(r))throw new Error(t+\" property '\"+this.attr+\"' given invalid value: \"+o(r))},n}(r.Property)},r.Any=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Any\",function(t){return!0})),r.Array=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Array\",function(t){return p.isArray(t)||t instanceof Float64Array})),r.Bool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Bool\",p.isBoolean)),r.Boolean=r.Bool,r.Color=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Color\",function(t){return null!=u[t.toLowerCase()]||\"#\"===t.substring(0,1)||c.valid_rgb(t)})),r.Instance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Instance\",function(t){return null!=t.properties})),r.Number=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return p.isNumber(t)||p.isBoolean(t)})),r.Int=r.Number,r.Percent=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return(p.isNumber(t)||p.isBoolean(t))&&0<=t&&t<=1})),r.String=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"String\",p.isString)),r.Font=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.String),r.enum_prop=function(t,e){var o;return o=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.name=t,r}(r.simple_prop(t,function(t){return s.call(e,t)>=0}))},r.Anchor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Anchor\",l.LegendLocation)),r.AngleUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"AngleUnits\",l.AngleUnits)),r.Direction=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var e,r,o,i;for(i=new Uint8Array(t.length),e=r=0,o=t.length;0<=o?ro;e=0<=o?++r:--r)switch(t[e]){case\"clock\":i[e]=!1;break;case\"anticlock\":i[e]=!0}return i},e}(r.enum_prop(\"Direction\",l.Direction)),r.Dimension=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimension\",l.Dimension)),r.Dimensions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimensions\",l.Dimensions)),r.FontStyle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"FontStyle\",l.FontStyle)),r.LatLon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LatLon\",l.LatLon)),r.LineCap=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineCap\",l.LineCap)),r.LineJoin=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineJoin\",l.LineJoin)),r.LegendLocation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LegendLocation\",l.LegendLocation)),r.Location=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Location\",l.Location)),r.OutputBackend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"OutputBackend\",l.OutputBackend)),r.Orientation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Orientation\",l.Orientation)),r.TextAlign=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextAlign\",l.TextAlign)),r.TextBaseline=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextBaseline\",l.TextBaseline)),r.RenderLevel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderLevel\",l.RenderLevel)),r.RenderMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderMode\",l.RenderMode)),r.SizingMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SizingMode\",l.SizingMode)),r.SpatialUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SpatialUnits\",l.SpatialUnits)),r.Distribution=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Distribution\",l.DistributionTypes)),r.TransformStepMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TransformStepMode\",l.TransformStepModes)),r.PaddingUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"PaddingUnits\",l.PaddingUnits)),r.StartEnd=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"StartEnd\",l.StartEnd)),r.units_prop=function(t,e,o){var n;return n=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,r),n.prototype.name=t,n.prototype.init=function(){var r;if(null==this.spec.units&&(this.spec.units=o),this.units=this.spec.units,r=this.spec.units,s.call(e,r)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+r)},n}(r.Number)},r.Angle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var r;return\"deg\"===this.spec.units&&(t=function(){var e,o,i;for(i=[],e=0,o=t.length;e0)&&\"pinch\"===e?(n.logger.debug(\"Registering scroll on touch screen\"),i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)})):void 0},t.prototype._hit_test_renderers=function(t,e){var r,o,i,n;for(o=this.plot_view.get_renderer_views(),r=o.length-1;r>=0;r+=-1)if(n=o[r],(\"annotation\"===(i=n.model.level)||\"overlay\"===i)&&null!=n.bbox&&n.bbox().contains(t,e))return n;return null},t.prototype._hit_test_frame=function(t,e){var r,o,i;return r=this.plot_view.canvas,o=r.sx_to_vx(t),i=r.sy_to_vy(e),this.plot_view.frame.contains(o,i)},t.prototype._trigger=function(t,e){var r,o,i,n,s,a,u,c,_,p,h;switch(a=t.name,n=a.split(\":\")[0],h=this._hit_test_renderers(e.bokeh.sx,e.bokeh.sy),n){case\"move\":for(o=this.toolbar.inspectors.filter(function(t){return t.active}),s=\"default\",null!=h?(null!=h.model.cursor&&(s=h.model.cursor()),l.isEmpty(o)||(t=this.move_exit,a=t.name)):this._hit_test_frame(e.bokeh.sx,e.bokeh.sy)&&(l.isEmpty(o)||(s=\"crosshair\")),this.plot_view.set_cursor(s),p=[],u=0,_=o.length;u<_;u++)c=o[u],p.push(this.trigger(t,e,c.id));return p;case\"tap\":if(null!=h&&\"function\"==typeof h.on_hit&&h.on_hit(e.bokeh.sx,e.bokeh.sy),r=this.toolbar.gestures[n].active,null!=r)return this.trigger(t,e,r.id);break;case\"scroll\":if(i=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",r=this.toolbar.gestures[i].active,null!=r)return e.preventDefault(),e.stopPropagation(),this.trigger(t,e,r.id);break;default:if(r=this.toolbar.gestures[n].active,null!=r)return this.trigger(t,e,r.id)}},t.prototype.trigger=function(t,e,r){return null==r&&(r=null),t.emit({id:r,e:e})},t.prototype._bokify_hammer=function(t,e){var r,o,i,a,c,_;return null==e&&(e={}),\"mouse\"===t.pointerType?(c=t.srcEvent.pageX,_=t.srcEvent.pageY):(c=t.pointers[0].pageX,_=t.pointers[0].pageY),i=s.offset(t.target),o=i.left,a=i.top,t.bokeh={sx:c-o,sy:_-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):n.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._bokify_point_event=function(t,e){var r,o,i,a;return null==e&&(e={}),i=s.offset(t.currentTarget),o=i.left,a=i.top,t.bokeh={sx:t.pageX-o,sy:t.pageY-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):n.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(this.tap,t)},t.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(this.doubletap,t)},t.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(this.press,t)},t.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger(this.pan_start,t)},t.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(this.pan,t)},t.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(this.pan_end,t)},t.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_start,t)},t.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(this.pinch,t)},t.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_end,t)},t.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_start,t)},t.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(this.rotate,t)},t.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_end,t)},t.prototype._mouse_enter=function(t){return this._bokify_point_event(t),this._trigger(this.move_enter,t)},t.prototype._mouse_move=function(t){return this._bokify_point_event(t),this._trigger(this.move,t)},t.prototype._mouse_exit=function(t){return this._bokify_point_event(t),this._trigger(this.move_exit,t)},t.prototype._mouse_wheel=function(t){return this._bokify_point_event(t,{delta:a.getDeltaY(t)}),this._trigger(this.scroll,t)},t.prototype._key_down=function(t){return this.trigger(this.keydown,t)},t.prototype._key_up=function(t){return this.trigger(this.keyup,t)},t}()},{\"./bokeh_events\":\"core/bokeh_events\",\"./dom\":\"core/dom\",\"./logging\":\"core/logging\",\"./signaling\":\"core/signaling\",\"./util/object\":\"core/util/object\",\"./util/wheel\":\"core/util/wheel\",hammerjs:\"hammerjs\"}],\"core/util/array\":[function(t,e,r){\"use strict\";function o(t){return D.call(t)}function i(t){return(e=[]).concat.apply(e,t);var e}function n(t,e){return t.indexOf(e)>=0}function s(t,e){return t[e>=0?e:t.length+e]}function a(t,e){for(var r=Math.min(t.length,e.length),o=new Array(r),i=0;ir&&(r=e);return r}function y(t,e){if(0==t.length)throw new Error(\"maxBy() called with an empty array\");for(var r=t[0],o=e(r),i=1,n=t.length;io&&(r=s,o=a)}return r}function g(t){return f(u(t.length),function(e){return t[e]})}function v(t){return y(u(t.length),function(e){return t[e]})}function b(t,e){for(var r=0,o=t;r0?0:o-1;i>=0&&io||void 0===r)return 1;if(r=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.union=function(e){return new t({x0:Math.min(this.x0,e.x0),y0:Math.min(this.y0,e.y0),x1:Math.max(this.x1,e.x1),y1:Math.max(this.y1,e.y1)})},t}();r.BBox=a},{}],\"core/util/callback\":[function(t,e,r){\"use strict\";function o(t,e){return setTimeout(t,e)}function i(t){return a(t)}function n(t,e,r){void 0===r&&(r={});var o,i,n,s=null,a=0,l=function(){a=r.leading===!1?0:Date.now(),s=null,n=t.apply(o,i),s||(o=i=null)};return function(){var u=Date.now();a||r.leading!==!1||(a=u);var c=e-(u-a);return o=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=u,n=t.apply(o,i),s||(o=i=null)):s||r.trailing===!1||(s=setTimeout(l,c)),n}}function s(t){var e,r=!1;return function(){return r||(r=!0,e=t()),e}}\n", " // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n", " // Underscore may be freely distributed under the MIT license.\n", " Object.defineProperty(r,\"__esModule\",{value:!0}),r.delay=o;var a=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;r.defer=i,r.throttle=n,r.once=s},{}],\"core/util/canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a;n=function(t){if(t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),!t.getLineDash)return t.getLineDash=function(){return t.mozDash}},s=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},i=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null==(e=t.imageSmoothingEnabled)||e}},a=function(t){if(t.measureText&&null==t.html5MeasureText)return t.html5MeasureText=t.measureText,t.measureText=function(e){var r;return r=t.html5MeasureText(e),r.ascent=1.6*t.html5MeasureText(\"m\").width,r}},o=function(t){var e;if(e=function(e,r,o,i,n,s,a,l){var u,c,_;null==l&&(l=!1),u=.551784,t.translate(e,r),t.rotate(n),c=o,_=i,l&&(c=-o,_=-i),t.moveTo(-c,0),t.bezierCurveTo(-c,_*u,-c*u,_,0,_),t.bezierCurveTo(c*u,_,c,_*u,c,0),t.bezierCurveTo(c,-_*u,c*u,-_,0,-_),t.bezierCurveTo(-c*u,-_,-c,-_*u,-c,0),t.rotate(-n),t.translate(-e,-r)},!t.ellipse)return t.ellipse=e},r.fixup_ctx=function(t){return n(t),s(t),i(t),a(t),o(t)},r.get_scale_ratio=function(t,e,r){var o,i;return\"svg\"===r?1:e?(i=window.devicePixelRatio||1,o=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,i/o):1}},{}],\"core/util/color\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=[].indexOf||function(t){for(var e=0,r=this.length;e=0)throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}},{\"./svg_colors\":\"core/util/svg_colors\"}],\"core/util/data_structures\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./array\"),i=t(\"./eq\"),n=t(\"./types\");r.MultiDict=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var r;if(null===e)throw new Error(\"Can't put null in this dict\");if(n.isArray(e))throw new Error(\"Can't put arrays in this dict\");return r=this._existing(t),null===r?this._dict[t]=e:n.isArray(r)?r.push(e):this._dict[t]=[r,e]},t.prototype.remove_value=function(t,e){var r,s;return r=this._existing(t),n.isArray(r)?(s=o.difference(r,[e]),s.length>0?this._dict[t]=s:delete this._dict[t]):i.isEqual(r,e)?delete this._dict[t]:void 0},t.prototype.get_one=function(t,e){var r;if(r=this._existing(t),n.isArray(r)){if(1===r.length)return r[0];throw new Error(e)}return r},t}(),r.Set=function(){function t(e){if(e){if(e.constructor===t)return new t(e.values);e.constructor===Array?this.values=t.compact(e):this.values=[e]}else this.values=[]}return t.compact=function(t){var e,r,o,i;for(i=[],r=0,o=t.length;r2*Math.PI;)t-=2*Math.PI;return t}function i(t,e){return Math.abs(o(t-e))}function n(t,e,r,n){var s=o(t),a=i(e,r),l=i(e,s)<=a&&i(s,r)<=a;return\"anticlock\"==n?l:!l}function s(){return Math.random()}function a(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}function l(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function u(t,e){for(var r,o;;)if(r=s(),o=s(),o=(2*o-1)*Math.sqrt(2*(1/Math.E)),-4*r*r*Math.log(r)>=o*o)break;var i=o/r;return i=t+e*i}function c(t,e,r){return t>r?r:tu;r=0<=u?++i:--i)c=o.proj4(o.mercator,[t[r],e[r]]),n=c[0],a=c[1],s[r]=n,l[r]=a;return[s,l]},r.project_xsys=function(t,e){var o,i,n,s,a,l,u,c;for(s=[],l=[],o=i=0,u=t.length;0<=u?iu;o=0<=u?++i:--i)c=r.project_xy(t[o],e[o]),n=c[0],a=c[1],s[o]=n,l[o]=a;return[s,l]}},{\"./proj4\":\"core/util/proj4\"}],\"core/util/refs\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"../has_props\"),i=t(\"./types\");r.create_ref=function(t){var e;if(!(t instanceof o.HasProps))throw new Error(\"can only create refs for HasProps subclasses\");return e={type:t.type,id:t.id},null!=t._subtype&&(e.subtype=t._subtype),e},r.is_ref=function(t){var e;if(i.isObject(t)){if(e=Object.keys(t).sort(),2===e.length)return\"id\"===e[0]&&\"type\"===e[1];if(3===e.length)return\"id\"===e[0]&&\"subtype\"===e[1]&&\"type\"===e[2]}return!1},r.convert_to_ref=function(t){return i.isArray(t)?t.map(r.convert_to_ref):t instanceof o.HasProps?t.ref():void 0}},{\"../has_props\":\"core/has_props\",\"./types\":\"core/util/types\"}],\"core/util/selection\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.get_indices=function(t){var e;return e=t.selected,e[\"0d\"].glyph?e[\"0d\"].indices:e[\"1d\"].indices.length>0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]}},{}],\"core/util/serialization\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u=t(\"./types\");o={float32:Float32Array,float64:Float64Array,uint8:Uint8Array,int8:Int8Array,uint16:Uint16Array,int16:Int16Array,uint32:Uint32Array,int32:Int32Array},i={};for(a in o)l=o[a],i[l.name]=a;n=function(t){var e,r,o;return o=new Uint8Array(t),r=function(){var t,r,i;for(i=[],t=0,r=o.length;ts;o=0<=s?++i:--i)r[o]=e.charCodeAt(o);return r.buffer},r.decode_base64=function(t){var e,r,i,n;return r=s(t.__ndarray__),i=t.dtype,i in o&&(e=new o[i](r)),n=t.shape,[e,n]},r.encode_base64=function(t,e){var r,o,s;return r=n(t.buffer),s=i[t.constructor.name],o={__ndarray__:r,shape:e,dtype:s}},r.decode_column_data=function(t){var e,o,i,n,s,c,_,p,h,d;c={},i={};for(a in t)if(l=t[a],u.isArray(l)){for(o=[],d=[],n=0,s=l.length;n0?(c[a]=o,i[a]=d):c[a]=l}else u.isObject(l)&&\"__ndarray__\"in l?(p=r.decode_base64(l),e=p[0],h=p[1],c[a]=e,i[a]=h):(c[a]=l,i[a]=[]);return[c,i]},r.encode_column_data=function(t,e){var o,i,n,s,c,_,p;s={};for(a in t){if(l=t[a],(null!=l?l.buffer:void 0)instanceof ArrayBuffer)l=r.encode_base64(l,null!=e?e[a]:void 0);else if(u.isArray(l)){for(n=[],o=i=0,c=l.length;0<=c?ic;o=0<=c?++i:--i)(null!=(_=l[o])?_.buffer:void 0)instanceof ArrayBuffer?n.push(r.encode_base64(l[o],null!=e&&null!=(p=e[a])?p[o]:void 0)):n.push(l[o]);l=n}s[a]=l}return s}},{\"./types\":\"core/util/types\"}],\"core/util/spatial\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"tslib\"),i=t(\"rbush\"),n=function(){function t(){}return t}();r.SpatialIndex=n;var s=function(t){function e(e){var r=t.call(this)||this;return r.index=i(),r.index.load(e),r}return o.__extends(e,t),Object.defineProperty(e.prototype,\"bbox\",{get:function(){var t=this.index.toJSON(),e=t.minX,r=t.minY,o=t.maxX,i=t.maxY;return{minX:e,minY:r,maxX:o,maxY:i}},enumerable:!0,configurable:!0}),e.prototype.search=function(t){return this.index.search(t)},e.prototype.indices=function(t){for(var e=this.search(t),r=e.length,o=new Array(r),i=0;i\"'`])/g,function(t){switch(t){case\"&\":return\"&\";case\"<\":return\"<\";case\">\":return\">\";case'\"':return\""\";case\"'\":return\"'\";case\"`\":return\"`\";default:return t}})}Object.defineProperty(r,\"__esModule\",{value:!0});var a=t(\"../settings\");r.startsWith=o,r.uuid4=i;var l=1e3;r.uniqueId=n,r.escape=s},{\"../settings\":\"core/settings\"}],\"core/util/svg_colors\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.indianred=\"#CD5C5C\",r.lightcoral=\"#F08080\",r.salmon=\"#FA8072\",r.darksalmon=\"#E9967A\",r.lightsalmon=\"#FFA07A\",r.crimson=\"#DC143C\",r.red=\"#FF0000\",r.firebrick=\"#B22222\",r.darkred=\"#8B0000\",r.pink=\"#FFC0CB\",r.lightpink=\"#FFB6C1\",r.hotpink=\"#FF69B4\",r.deeppink=\"#FF1493\",r.mediumvioletred=\"#C71585\",r.palevioletred=\"#DB7093\",r.coral=\"#FF7F50\",r.tomato=\"#FF6347\",r.orangered=\"#FF4500\",r.darkorange=\"#FF8C00\",r.orange=\"#FFA500\",r.gold=\"#FFD700\",r.yellow=\"#FFFF00\",r.lightyellow=\"#FFFFE0\",r.lemonchiffon=\"#FFFACD\",r.lightgoldenrodyellow=\"#FAFAD2\",r.papayawhip=\"#FFEFD5\",r.moccasin=\"#FFE4B5\",r.peachpuff=\"#FFDAB9\",r.palegoldenrod=\"#EEE8AA\",r.khaki=\"#F0E68C\",r.darkkhaki=\"#BDB76B\",r.lavender=\"#E6E6FA\",r.thistle=\"#D8BFD8\",r.plum=\"#DDA0DD\",r.violet=\"#EE82EE\",r.orchid=\"#DA70D6\",r.fuchsia=\"#FF00FF\",r.magenta=\"#FF00FF\",r.mediumorchid=\"#BA55D3\",r.mediumpurple=\"#9370DB\",r.blueviolet=\"#8A2BE2\",r.darkviolet=\"#9400D3\",r.darkorchid=\"#9932CC\",r.darkmagenta=\"#8B008B\",r.purple=\"#800080\",r.indigo=\"#4B0082\",r.slateblue=\"#6A5ACD\",r.darkslateblue=\"#483D8B\",r.mediumslateblue=\"#7B68EE\",r.greenyellow=\"#ADFF2F\",r.chartreuse=\"#7FFF00\",r.lawngreen=\"#7CFC00\",r.lime=\"#00FF00\",r.limegreen=\"#32CD32\",r.palegreen=\"#98FB98\",r.lightgreen=\"#90EE90\",r.mediumspringgreen=\"#00FA9A\",r.springgreen=\"#00FF7F\",r.mediumseagreen=\"#3CB371\",r.seagreen=\"#2E8B57\",r.forestgreen=\"#228B22\",r.green=\"#008000\",r.darkgreen=\"#006400\",r.yellowgreen=\"#9ACD32\",r.olivedrab=\"#6B8E23\",r.olive=\"#808000\",r.darkolivegreen=\"#556B2F\",r.mediumaquamarine=\"#66CDAA\",r.darkseagreen=\"#8FBC8F\",r.lightseagreen=\"#20B2AA\",r.darkcyan=\"#008B8B\",r.teal=\"#008080\",r.aqua=\"#00FFFF\",r.cyan=\"#00FFFF\",r.lightcyan=\"#E0FFFF\",r.paleturquoise=\"#AFEEEE\",r.aquamarine=\"#7FFFD4\",r.turquoise=\"#40E0D0\",r.mediumturquoise=\"#48D1CC\",r.darkturquoise=\"#00CED1\",r.cadetblue=\"#5F9EA0\",r.steelblue=\"#4682B4\",r.lightsteelblue=\"#B0C4DE\",r.powderblue=\"#B0E0E6\",r.lightblue=\"#ADD8E6\",r.skyblue=\"#87CEEB\",r.lightskyblue=\"#87CEFA\",r.deepskyblue=\"#00BFFF\",r.dodgerblue=\"#1E90FF\",r.cornflowerblue=\"#6495ED\",r.royalblue=\"#4169E1\",r.blue=\"#0000FF\",r.mediumblue=\"#0000CD\",r.darkblue=\"#00008B\",r.navy=\"#000080\",r.midnightblue=\"#191970\",r.cornsilk=\"#FFF8DC\",r.blanchedalmond=\"#FFEBCD\",r.bisque=\"#FFE4C4\",r.navajowhite=\"#FFDEAD\",r.wheat=\"#F5DEB3\",r.burlywood=\"#DEB887\",r.tan=\"#D2B48C\",r.rosybrown=\"#BC8F8F\",r.sandybrown=\"#F4A460\",r.goldenrod=\"#DAA520\",r.darkgoldenrod=\"#B8860B\",r.peru=\"#CD853F\",r.chocolate=\"#D2691E\",r.saddlebrown=\"#8B4513\",r.sienna=\"#A0522D\",r.brown=\"#A52A2A\",r.maroon=\"#800000\",r.white=\"#FFFFFF\",r.snow=\"#FFFAFA\",r.honeydew=\"#F0FFF0\",r.mintcream=\"#F5FFFA\",r.azure=\"#F0FFFF\",r.aliceblue=\"#F0F8FF\",r.ghostwhite=\"#F8F8FF\",r.whitesmoke=\"#F5F5F5\",r.seashell=\"#FFF5EE\",r.beige=\"#F5F5DC\",r.oldlace=\"#FDF5E6\",r.floralwhite=\"#FFFAF0\",r.ivory=\"#FFFFF0\",r.antiquewhite=\"#FAEBD7\",r.linen=\"#FAF0E6\",r.lavenderblush=\"#FFF0F5\",r.mistyrose=\"#FFE4E1\",r.gainsboro=\"#DCDCDC\",r.lightgray=\"#D3D3D3\",r.lightgrey=\"#D3D3D3\",r.silver=\"#C0C0C0\",r.darkgray=\"#A9A9A9\",r.darkgrey=\"#A9A9A9\",r.gray=\"#808080\",r.grey=\"#808080\",r.dimgray=\"#696969\",r.dimgrey=\"#696969\",r.lightslategray=\"#778899\",r.lightslategrey=\"#778899\",r.slategray=\"#708090\",r.slategrey=\"#708090\",r.darkslategray=\"#2F4F4F\",r.darkslategrey=\"#2F4F4F\",r.black=\"#000000\"},{}],\"core/util/templating\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=t(\"sprintf\"),n=t(\"numbro\"),s=t(\"timezone\"),a=t(\"./string\"),l=t(\"./types\");o=function(t){var e;return l.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return\"%d\";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),i.sprintf(e,t)):\"\"+t},r.replace_placeholders=function(t,e,r,l,u){return null==u&&(u={}),t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t){return function(t,e,r){return e+\"@$\"+r}}(this)),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,c,_,p,h){var d,f,m;if(_=null!=p?p:_,m=\"$\"===_[0]?u[_.substring(1)]:null!=(d=e.get_column(_))?d[r]:void 0,f=null,null==m)f=\"???\";else{if(\"safe\"===h)return\"\"+c+m;if(null!=h)if(null!=l&&_ in l)if(\"numeral\"===l[_])f=n.format(m,h);else if(\"datetime\"===l[_])f=s(m,h);else{if(\"printf\"!==l[_])throw new Error(\"Unknown tooltip field formatter type '\"+l[_]+\"'\");f=i(h,m)}else f=n.format(m,h);else f=o(m)}return f=\"\"+c+a.escape(f)}}(this))}},{\"./string\":\"core/util/string\",\"./types\":\"core/util/types\",numbro:\"numbro\",sprintf:\"sprintf\",timezone:\"timezone/index\"}],\"core/util/text\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=t(\"../dom\");o={},r.get_text_height=function(t){var e,r,n,s;if(null!=o[t])return o[t];s=i.span({style:{font:t}},\"Hg\"),e=i.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),r=i.div({},s,e),document.body.appendChild(r);try{n={},e.style.verticalAlign=\"baseline\",n.ascent=i.offset(e).top-i.offset(s).top,e.style.verticalAlign=\"bottom\",n.height=i.offset(e).top-i.offset(s).top,n.descent=n.height-n.ascent}finally{document.body.removeChild(r)}return o[t]=n,n}},{\"../dom\":\"core/dom\"}],\"core/util/throttle\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i;o=function(t){return t()},i=(\"undefined\"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||o,r.throttle=function(t,e){var r,o,n,s,a,l,u,c;return l=[null,null,null,null],o=l[0],r=l[1],c=l[2],u=l[3],a=0,s=!1,n=function(){return a=new Date,c=null,s=!1,u=t.apply(o,r)},function(){var t,l;return t=new Date,l=e-(t-a),o=this,r=arguments,l<=0&&!s?(clearTimeout(c),s=!0,i(n)):c||s||(c=setTimeout(function(){return i(n)},l)),u}}},{}],\"core/util/types\":[function(t,e,r){\"use strict\";function o(t){return t===!0||t===!1||\"[object Boolean]\"===c.call(t)}function i(t){return\"[object Number]\"===c.call(t)}function n(t){return\"[object String]\"===c.call(t)}function s(t){return i(t)&&t!==+t}function a(t){return\"[object Function]\"===c.call(t)}function l(t){return Array.isArray(t)}function u(t){var e=typeof t;return\"function\"===e||\"object\"===e&&!!t}\n", " // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n", " // Underscore may be freely distributed under the MIT license.\n", " Object.defineProperty(r,\"__esModule\",{value:!0});var c=Object.prototype.toString;r.isBoolean=o,r.isNumber=i,r.isString=n,r.isStrictNaN=s,r.isFunction=a,r.isArray=l,r.isObject=u},{}],\"core/util/wheel\":[function(t,e,r){\"use strict\";function o(t){var e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}function i(t){var e=t.offsetParent||document.body;return o(e)||o(t)||16}function n(t){return t.clientHeight}function s(t){var e=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:e*=i(t.target);break;case t.DOM_DELTA_PAGE:e*=n(t.target)}return e}/*!\n", " * jQuery Mousewheel 3.1.13\n", " *\n", " * Copyright jQuery Foundation and other contributors\n", " * Released under the MIT license\n", " * http://jquery.org/license\n", " */\n", " Object.defineProperty(r,\"__esModule\",{value:!0}),r.getDeltaY=s},{}],\"core/util/zoom\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./math\");r.scale_highlow=function(t,e,r){var o,i,n,s,a,l;return null==r&&(r=null),n=[t.start,t.end],i=n[0],o=n[1],s=null!=r?r:(o+i)/2,a=i-(i-s)*e,l=o-(o-s)*e,[a,l]},r.get_info=function(t,e){var r,o,i,n,s,a,l,u;l=e[0],u=e[1],o={};for(i in t)s=t[i],n=s.v_invert([l,u],!0),a=n[0],r=n[1],o[i]={start:a,end:r};return o},r.scale_range=function(t,e,i,n,s){var a,l,u,c,_,p,h,d,f,m;return null==i&&(i=!0),null==n&&(n=!0),null==s&&(s=null),e=o.clamp(e,-.9,.9),a=i?e:0,l=r.scale_highlow(t.h_range,a,null!=s?s.x:void 0),_=l[0],p=l[1],f=r.get_info(t.xscales,[_,p]),c=n?e:0,u=r.scale_highlow(t.v_range,c,null!=s?s.y:void 0),h=u[0],d=u[1],m=r.get_info(t.yscales,[h,d]),{xrs:f,yrs:m,factor:e}}},{\"./math\":\"core/util/math\"}],\"core/view\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./signaling\"),s=t(\"./util/string\");r.View=function(){function t(t){var e;if(null==t&&(t={}),this.removed=new n.Signal(this,\"removed\"),null==t.model)throw new Error(\"model of a view wasn't configured\");this.model=t.model,this._parent=t.parent,this.id=null!=(e=t.id)?e:s.uniqueId(),this.initialize(t)}return o(t.prototype,n.Signalable),t.getters=function(t){var e,r,o;o=[];for(r in t)e=t[r],o.push(Object.defineProperty(this.prototype,r,{get:e}));return o},t.prototype.initialize=function(t){},t.prototype.remove=function(){return this._parent=void 0,this.disconnect_signals(),this.removed.emit()},t.prototype.toString=function(){return this.model.type+\"View(\"+this.id+\")\"},t.getters({parent:function(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")},is_root:function(){return null===this.parent},root:function(){return this.is_root?this:this.parent.root}}),t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return n.Signal.disconnectReceiver(this)},t}()},{\"./signaling\":\"core/signaling\",\"./util/string\":\"core/util/string\"}],\"core/visuals\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./property_mixins\"),a=t(\"./util/color\");o=function(){function t(t,e){var r,o,i,n,s;for(null==e&&(e=\"\"),this.obj=t,this.prefix=e,this.cache={},o=t.properties[e+this.do_attr].spec,this.doit=null!==o.value,s=this.attrs,i=0,n=s.length;i0;)t.push(this.remove_root(this._roots[0]));return t}finally{this._pop_all_models_freeze()}},t.prototype.destructively_move=function(t){var e,r,o,i,n,s,a,l,u;if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");for(t.clear(),u=[],l=this._roots,e=0,o=l.length;e=0)){this._push_all_models_freeze();try{this._roots.push(t)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootAddedEvent(this,t,e))}},t.prototype.remove_root=function(t,e){var o;if(o=this._roots.indexOf(t),!(o<0)){this._push_all_models_freeze();try{this._roots.splice(o,1)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootRemovedEvent(this,t,e))}},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t,e){if(t!==this._title)return this._title=t,this._trigger_on_change(new r.TitleChangedEvent(this,t,e))},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){return this._all_models_by_name.get_one(t,\"Multiple models are named '\"+t+\"'\")},t.prototype.on_change=function(t){if(!(s.call(this._callbacks,t)>=0))return this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;if(e=this._callbacks.indexOf(t),e>=0)return this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){var e,r,o,i,n;for(i=this._callbacks,n=[],r=0,o=i.length;r0||f.difference(k,n).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");T={},o=[],v=r._all_models;for(a in v)h=v[a],a in i&&(j=t._events_to_sync_objects(i[a],x[a],r,T),o=o.concat(j));return{events:o,references:t._references_json(m.values(T),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var r,o,i,n,s,a;for(null==e&&(e=!0),s=[],n=this._roots,r=0,o=n.length;r0&&m.set_log_level(r.bokehLogLevel),null!=r.bokehDocId&&r.bokehDocId.length>0&&(e.docid=r.bokehDocId),null!=r.bokehModelId&&r.bokehModelId.length>0&&(e.modelid=r.bokehModelId),null!=r.bokehSessionId&&r.bokehSessionId.length>0&&(e.sessionid=r.bokehSessionId),m.logger.info(\"Will inject Bokeh script tag with params \"+JSON.stringify(e))},r.embed_items=function(t,e,o,i){var n,a,l,u,d,f,v,b,w,x,k,M,j,T,S;M=\"ws:\",\"https:\"===window.location.protocol&&(M=\"wss:\"),x=null!=i?new URL(i):window.location,null!=o?\"/\"===o&&(o=\"\"):o=x.pathname.replace(/\\/+$/,\"\"),S=M+\"//\"+x.host+o+\"/ws\",m.logger.debug(\"embed: computed ws url: \"+S),u={};for(l in t)u[l]=y.Document.from_json(t[l]);for(j=[],v=0,w=e.length;v\");if(\"SCRIPT\"===d.tagName&&(h(d,b),a=g.div({\"class\":r.BOKEH_ROOT}),g.replaceWith(d,a),n=g.div(),a.appendChild(n),d=n),T=null!=b.use_for_title&&b.use_for_title,k=null,null!=b.modelid)if(null!=b.docid)p(d,b.modelid,u[b.docid]);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh model \"+b.modelid+\" to element \"+f+\": no document ID or session ID specified\");k=_(d,S,b.modelid,b.sessionid)}else if(null!=b.docid)r.add_document_static(d,u[b.docid],T);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh document to element \"+f+\": no document ID or session ID specified\");k=c(d,S,b.sessionid,T)}null!==k?j.push(k.then(function(t){return console.log(\"Bokeh items were rendered successfully\")},function(t){return console.log(\"Error rendering Bokeh items \",t)})):j.push(void 0)}return j}},{\"./base\":\"base\",\"./client\":\"client\",\"./core/dom\":\"core/dom\",\"./core/logging\":\"core/logging\",\"./document\":\"document\"}],main:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),t(\"./polyfill\");var o=t(\"./version\");r.version=o.version;var i=t(\"./embed\");r.embed=i;var n=t(\"./core/logging\");r.logger=n.logger,r.set_log_level=n.set_log_level;var s=t(\"./core/settings\");r.settings=s.settings;var a=t(\"./base\");r.Models=a.Models,r.index=a.index;var l=t(\"./document\");r.documents=l.documents;var u=t(\"./safely\");r.safely=u.safely},{\"./base\":\"base\",\"./core/logging\":\"core/logging\",\"./core/settings\":\"core/settings\",\"./document\":\"document\",\"./embed\":\"embed\",\"./polyfill\":\"polyfill\",\"./safely\":\"safely\",\"./version\":\"version\"}],model:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./core/has_props\"),s=t(\"./core/properties\"),a=t(\"./core/util/types\"),l=t(\"./core/util/object\"),u=t(\"./core/logging\");r.Model=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Model\",e.define({tags:[s.Array,[]],name:[s.String],js_property_callbacks:[s.Any,{}],js_event_callbacks:[s.Any,{}],subscribed_events:[s.Array,[]]}),e.prototype.connect_signals=function(){var t,r,o,i,n,s,a,l,u;e.__super__.connect_signals.call(this),a=this.js_property_callbacks;for(i in a)for(r=a[i],l=i.split(\":\"),i=l[0],t=null!=(u=l[1])?u:null,n=0,s=r.length;no;e=0<=o?++r:--r)this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(this.start[0][e],this.start[1][e]),t.lineTo(this.end[0][e],this.end[1][e]),i.push(t.stroke());return i}},e.prototype._arrow_head=function(t,e,r,o,i){var n,s,a,l,c;for(c=[],s=a=0,l=this._x_start.length;0<=l?al;s=0<=l?++a:--a)n=Math.PI/2+u.atan2([o[0][s],o[1][s]],[i[0][s],i[1][s]]),t.save(),t.translate(i[0][s],i[1][s]),t.rotate(n),\"render\"===e?r.render(t):\"clip\"===e&&r.clip(t),c.push(t.restore());return c},e}(n.AnnotationView),r.Arrow=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ArrowView,e.prototype.type=\"Arrow\",e.mixins([\"line\"]),e.define({x_start:[l.NumberSpec],y_start:[l.NumberSpec],start_units:[l.String,\"data\"],start:[l.Instance,null],x_end:[l.NumberSpec],y_end:[l.NumberSpec],end_units:[l.String,\"data\"],end:[l.Instance,new s.OpenHead({})],source:[l.Instance],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"./arrow_head\":\"models/annotations/arrow_head\",\"core/properties\":\"core/properties\",\"core/util/math\":\"core/util/math\"}],\"models/annotations/arrow_head\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/visuals\"),a=t(\"core/properties\");r.ArrowHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ArrowHead\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.visuals=new s.Visuals(this)},e.prototype.render=function(t,e){return null},e.prototype.clip=function(t,e){return null},e}(n.Annotation),r.OpenHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"OpenHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,0),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead),r.NormalHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"NormalHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._normal(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._normal(t,e),t.stroke()},e.prototype._normal=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.VeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"VeeHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._vee(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._vee(t,e),t.stroke()},e.prototype._vee=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.TeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TeeHead\",e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,0),t.lineTo(-.5*this.size,0),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead)},{\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/visuals\":\"core/visuals\"}],\"models/annotations/band\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"../sources/column_data_source\"),a=t(\"core/properties\");r.BandView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,n=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?n.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],o=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(o[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(o[a])},e.prototype.render=function(){var t,e,r,o,i,n,s,a,l,u;if(this.model.visible){for(this._map_data(),t=this.plot_view.canvas_view.ctx,t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=r=0,s=this._lower_sx.length;0<=s?rs;e=0<=s?++r:--r)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(e=o=a=this._upper_sx.length-1;a<=0?o<=0:o>=0;e=a<=0?++o:--o)t.lineTo(this._upper_sx[e],this._upper_sy[e]);for(t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=i=0,l=this._lower_sx.length;0<=l?il;e=0<=l?++i:--i)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.beginPath(),t.moveTo(this._upper_sx[0],this._upper_sy[0]),e=n=0,u=this._upper_sx.length;0<=u?nu;e=0<=u?++n:--n)t.lineTo(this._upper_sx[e],this._upper_sy[e]);return this.visuals.line.doit?(this.visuals.line.set_value(t),t.stroke()):void 0}},e}(n.AnnotationView),r.Band=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.BandView,e.prototype.type=\"Band\",e.mixins([\"line\",\"fill\"]),e.define({lower:[a.DistanceSpec],upper:[a.DistanceSpec],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,function(){return new s.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype._normals=function(){var t,e,r,o;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(o=[0,1],t=o[0],e=o[1]),[t,e]},e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\"}],\"models/annotations/box_annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/signaling\"),a=t(\"core/dom\"),l=t(\"core/properties\"),u=t(\"core/util/types\");r.BoxAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.classList.add(\"bk-shading\"),a.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.data_update,function(){return this.render()})):(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this)))},e.prototype.render=function(){var t,e,r,o,i,n,s,l;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible)return null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom?(a.hide(this.el),null):(e=this.plot_model.frame,t=this.plot_model.canvas,s=this.plot_view.frame.xscales[this.model.x_range_name],l=this.plot_view.frame.yscales[this.model.y_range_name],o=t.vx_to_sx(this._calc_dim(this.model.left,this.model.left_units,s,e.h_range.start)),i=t.vx_to_sx(this._calc_dim(this.model.right,this.model.right_units,s,e.h_range.end)),r=t.vy_to_sy(this._calc_dim(this.model.bottom,this.model.bottom_units,l,e.v_range.start)),n=t.vy_to_sy(this._calc_dim(this.model.top,this.model.top_units,l,e.v_range.end)),\"css\"===this.model.render_mode?this._css_box(o,i,r,n):this._canvas_box(o,i,r,n))},e.prototype._css_box=function(t,e,r,o){var i,n,s;return s=Math.abs(e-t),n=Math.abs(r-o),this.el.style.left=t+\"px\",this.el.style.width=s+\"px\",this.el.style.top=o+\"px\",this.el.style.height=n+\"px\",this.el.style.borderWidth=this.model.line_width.value+\"px\",this.el.style.borderColor=this.model.line_color.value,this.el.style.backgroundColor=this.model.fill_color.value,this.el.style.opacity=this.model.fill_alpha.value,i=this.model.line_dash,u.isArray(i)&&(i=i.length<2?\"solid\":\"dashed\"),u.isString(i)&&(this.el.style.borderStyle=i),a.show(this.el)},e.prototype._canvas_box=function(t,e,r,o){var i;return i=this.plot_view.canvas_view.ctx,i.save(),i.beginPath(),i.rect(t,o,e-t,r-o),this.visuals.fill.set_value(i),i.fill(),this.visuals.line.set_value(i),i.stroke(),i.restore()},e.prototype._calc_dim=function(t,e,r,o){var i;return i=null!=t?\"data\"===e?r.compute(t):t:o},e}(n.AnnotationView),r.BoxAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.BoxAnnotationView,e.prototype.type=\"BoxAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({render_mode:[l.RenderMode,\"canvas\"],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],top:[l.Number,null],top_units:[l.SpatialUnits,\"data\"],bottom:[l.Number,null],bottom_units:[l.SpatialUnits,\"data\"],left:[l.Number,null],left_units:[l.SpatialUnits,\"data\"],right:[l.Number,null],right_units:[l.SpatialUnits,\"data\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r,o,i;return r=t.left,o=t.right,i=t.top,e=t.bottom,this.setv({left:r,right:o,top:i,bottom:e},{silent:!0}),this.data_update.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/color_bar\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"./annotation\"),u=t(\"../tickers/basic_ticker\"),c=t(\"../formatters/basic_tick_formatter\"),_=t(\"../mappers/linear_color_mapper\"),p=t(\"../scales/linear_scale\"),h=t(\"../scales/log_scale\"),d=t(\"../ranges/range1d\"),f=t(\"core/properties\"),m=t(\"core/util/text\"),y=t(\"core/util/array\"),g=t(\"core/util/object\"),v=t(\"core/util/types\");n=25,i=.3,o=.8,r.ColorBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._set_canvas_image()},e.prototype.connect_signals=function(){if(e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.ticker.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.formatter.change,function(t){return function(){return t.plot_view.request_render()}}(this)),null!=this.model.color_mapper)return this.connect(this.model.color_mapper.change,function(){return this._set_canvas_image(),this.plot_view.request_render()})},e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._top.value,{x:t,y:-e}},e.prototype._get_size=function(){var t,e;if(null!=this.model.color_mapper)return t=this.compute_legend_dimensions(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height:\"left\"===e||\"right\"===e?t.width:void 0},e.prototype._set_canvas_image=function(){var t,e,r,o,i,n,s,a,l,u,c,p,h;if(null!=this.model.color_mapper){switch(a=this.model.color_mapper.palette,\"vertical\"===this.model.orientation&&(a=a.slice(0).reverse()),this.model.orientation){case\"vertical\":l=[1,a.length],h=l[0],i=l[1];break;case\"horizontal\":u=[a.length,1],h=u[0],i=u[1]}return r=document.createElement(\"canvas\"),c=[h,i],r.width=c[0],r.height=c[1],n=r.getContext(\"2d\"),s=n.getImageData(0,0,h,i),o=new _.LinearColorMapper({palette:a}),t=o.v_map_screen(function(){p=[];for(var t=0,e=a.length;0<=e?te;0<=e?t++:t--)p.push(t);return p}.apply(this)),e=new Uint8Array(t),s.data.set(e),n.putImageData(s,0,0),this.image=r}},e.prototype.compute_legend_dimensions=function(){var t,e,r,o,i,n,s,a,l,u;switch(t=this.model._computed_image_dimensions(),a=[t.height,t.width],e=a[0],r=a[1],o=this._get_label_extent(),u=this.model._title_extent(),l=this.model._tick_extent(),s=this.model.padding,this.model.orientation){case\"vertical\":i=e+u+2*s,n=r+l+o+2*s;break;case\"horizontal\":i=e+u+l+o+2*s,n=r+2*s}return{height:i,width:n}},e.prototype.compute_legend_location=function(){var t,e,r,o,i,n,s,a,l,u,c,_;if(e=this.compute_legend_dimensions(),s=[e.height,e.width],r=s[0],i=s[1],o=this.model.margin,n=this.model.location,t=this.plot_view.frame.h_range,u=this.plot_view.frame.v_range,v.isString(n))switch(n){case\"top_left\":c=t.start+o,_=u.end-o;break;case\"top_center\":c=(t.end+t.start)/2-i/2,_=u.end-o;break;case\"top_right\":c=t.end-o-i,_=u.end-o;break;case\"center_right\":c=t.end-o-i,_=(u.end+u.start)/2+r/2;break;case\"bottom_right\":c=t.end-o-i,_=u.start+o+r;break;case\"bottom_center\":c=(t.end+t.start)/2-i/2,_=u.start+o+r;break;case\"bottom_left\":c=t.start+o,_=u.start+o+r;break;case\"center_left\":c=t.start+o,_=(u.end+u.start)/2+r/2;break;case\"center\":c=(t.end+t.start)/2-i/2,_=(u.end+u.start)/2+r/2}else v.isArray(n)&&2===n.length&&(c=n[0],_=n[1]);return a=this.plot_view.canvas.vx_to_sx(c),l=this.plot_view.canvas.vy_to_sy(_),{sx:a,sy:l}},e.prototype.render=function(){var t,e,r,o,i;if(this.model.visible&&null!=this.model.color_mapper)return t=this.plot_view.canvas_view.ctx,t.save(),null!=this.model.panel&&(i=this._get_panel_offset(),t.translate(i.x,i.y),e=this._get_frame_offset(),t.translate(e.x,e.y)),o=this.compute_legend_location(),t.translate(o.sx,o.sy),this._draw_bbox(t),r=this._get_image_offset(),t.translate(r.x,r.y),this._draw_image(t),null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high&&(this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t)),this.model.title&&this._draw_title(t),t.restore()},e.prototype._draw_bbox=function(t){var e;return e=this.compute_legend_dimensions(),t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(0,0,e.width,e.height)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_image=function(t){var e;return e=this.model._computed_image_dimensions(),t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this.image,0,0,e.width,e.height),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_major_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f;if(this.visuals.major_tick_line.doit){for(s=this.model._normals(),i=s[0],n=s[1],r=this.model._computed_image_dimensions(),a=[r.width*i,r.height*n],d=a[0],f=a[1],l=this.model._tick_coordinates().major,c=l[0],_=l[1],p=this.model.major_tick_in,h=this.model.major_tick_out,t.save(),t.translate(d,f),this.visuals.major_tick_line.set_value(t),e=o=0,u=c.length;0<=u?ou;e=0<=u?++o:--o)t.beginPath(),t.moveTo(Math.round(c[e]+i*h),Math.round(_[e]+n*h)),t.lineTo(Math.round(c[e]-i*p),Math.round(_[e]-n*p)),t.stroke();return t.restore()}},e.prototype._draw_minor_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f;if(this.visuals.minor_tick_line.doit){for(s=this.model._normals(),i=s[0],n=s[1],r=this.model._computed_image_dimensions(),a=[r.width*i,r.height*n],d=a[0],f=a[1],l=this.model._tick_coordinates().minor,c=l[0],_=l[1],p=this.model.minor_tick_in,h=this.model.minor_tick_out,t.save(),t.translate(d,f),this.visuals.minor_tick_line.set_value(t),e=o=0,u=c.length;0<=u?ou;e=0<=u?++o:--o)t.beginPath(),t.moveTo(Math.round(c[e]+i*h),Math.round(_[e]+n*h)),t.lineTo(Math.round(c[e]-i*p),Math.round(_[e]-n*p)),t.stroke();return t.restore()}},e.prototype._draw_major_labels=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.major_label_text.doit){for(l=this.model._normals(),s=l[0],a=l[1],o=this.model._computed_image_dimensions(),u=[o.width*s,o.height*a],m=u[0],g=u[1],h=this.model.label_standoff+this.model._tick_extent(),c=[h*s,h*a],y=c[0],v=c[1],_=this.model._tick_coordinates().major,d=_[0],f=_[1],n=this.model._tick_coordinates().major_labels,e=this.model.formatter.doFormat(n,null),this.visuals.major_label_text.set_value(t),t.save(),t.translate(m+y,g+v),r=i=0,p=d.length;0<=p?ip;r=0<=p?++i:--i)t.fillText(e[r],Math.round(d[r]+s*this.model.label_standoff),Math.round(f[r]+a*this.model.label_standoff));return t.restore()}},e.prototype._draw_title=function(t){if(this.visuals.title_text.doit)return t.save(),this.visuals.title_text.set_value(t),t.fillText(this.model.title,0,-this.model.title_standoff),t.restore()},e.prototype._get_label_extent=function(){var t,e,r,o,i;if(i=this.model._tick_coordinates().major_labels,null==this.model.color_mapper.low||null==this.model.color_mapper.high||g.isEmpty(i))o=0;else{switch(t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.major_label_text.set_value(t),this.model.orientation){case\"vertical\":e=this.model.formatter.doFormat(i),o=y.max(function(){var o,i,n;for(n=[],o=0,i=e.length;of;o=0<=f?++s:--s)c[o]e||(l[r].push(c[o]),l[n].push(0));for(o=a=0,m=p.length;0<=m?am;o=0<=m?++a:--a)p[o]e||(_[r].push(p[o]),_[n].push(0));return u=l[r].slice(0),l[r]=y.v_compute(l[r]),_[r]=y.v_compute(_[r]),\"vertical\"===this.orientation&&(l[r]=new Float64Array(function(){var e,o,i,n;for(i=l[r],n=[],o=0,e=i.length;oi;r=0<=i?++o:--o)this.title_div=a.div({\"class\":\"bk-annotation-child\",style:{display:\"none\"}}),n.push(this.el.appendChild(this.title_div));return n}},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.render()})):(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}))},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t)},e.prototype._map_data=function(){var t,e,r,o,i,n;return 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.v_compute(this._x):this._x.slice(0),t=this.canvas.v_vx_to_sx(r),o=\"data\"===this.model.y_units?n.v_compute(this._y):this._y.slice(0),e=this.canvas.v_vy_to_sy(o),[t,e]},e.prototype.render=function(){var t,e,r,o,i,n,s,l,u,c,_;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible){if(t=this.plot_view.canvas_view.ctx,i=this._map_data(),c=i[0],_=i[1],\"canvas\"===this.model.render_mode){for(l=[],e=r=0,n=this._text.length;0<=n?rn;e=0<=n?++r:--r)l.push(this._v_canvas_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return l}for(u=[],e=o=0,s=this._text.length;0<=s?os;e=0<=s?++o:--o)u.push(this._v_css_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return u}},e.prototype._get_size=function(){var t,e,r,o;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),r=this.model.panel.side,\"above\"===r||\"below\"===r?e=t.measureText(this._text[0]).ascent:\"left\"===r||\"right\"===r?o=t.measureText(this._text[0]).width:void 0},e.prototype._v_canvas_text=function(t,e,r,o,i,n){var s;return this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),t.save(),t.beginPath(),t.translate(o,i),t.rotate(n),t.rect(s[0],s[1],s[2],s[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_vectorize(t,e),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_vectorize(t,e),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_vectorize(t,e),t.fillText(r,0,0)),t.restore()},e.prototype._v_css_text=function(t,e,r,o,i,n){var s,l,c,_;return l=this.el.childNodes[e],l.textContent=r,this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),c=this.visuals.border_line.line_dash.value(),u.isArray(c)&&(_=c.length<2?\"solid\":\"dashed\"),u.isString(c)&&(_=c),this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),l.style.position=\"absolute\",l.style.left=o+s[0]+\"px\",l.style.top=i+s[1]+\"px\",l.style.color=\"\"+this.visuals.text.text_color.value(),l.style.opacity=\"\"+this.visuals.text.text_alpha.value(),l.style.font=\"\"+this.visuals.text.font_value(),l.style.lineHeight=\"normal\",n&&(l.style.transform=\"rotate(\"+n+\"rad)\"),this.visuals.background_fill.doit&&(l.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(l.style.borderStyle=\"\"+_,l.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",l.style.borderColor=\"\"+this.visuals.border_line.color_value()),a.show(l)},e}(n.TextAnnotationView),r.LabelSet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LabelSetView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[l.NumberSpec],y:[l.NumberSpec],x_units:[l.SpatialUnits,\"data\"],y_units:[l.SpatialUnits,\"data\"],text:[l.StringSpec,{field:\"text\"}],angle:[l.AngleSpec,0],x_offset:[l.NumberSpec,{value:0}],y_offset:[l.NumberSpec,{value:0}],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],render_mode:[l.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(n.TextAnnotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./text_annotation\":\"models/annotations/text_annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/legend\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/properties\"),a=t(\"core/util/text\"),l=t(\"core/util/bbox\"),u=t(\"core/util/array\"),c=t(\"core/util/object\"),_=t(\"core/util/types\");r.LegendView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype.compute_legend_bbox=function(){var t,e,r,o,i,n,s,l,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P;for(d=this.model.get_legend_names(),e=this.model.glyph_height,r=this.model.glyph_width,n=this.model.label_height,l=this.model.label_width,this.max_label_height=u.max([a.get_text_height(this.visuals.label_text.font_value()).height,n,e]),t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.label_text.set_value(t),this.text_widths={},i=0,g=d.length;ii;r=0<=i?++o:--o)\"screen\"===this.model.xs_units&&(a=u[r]),\"screen\"===this.model.ys_units&&(l=c[r]),n=e.vx_to_sx(a),s=e.vy_to_sy(l),0===r?(t.beginPath(),t.moveTo(n,s)):t.lineTo(n,s);return t.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),this.visuals.fill.doit?(this.visuals.fill.set_value(t),t.fill()):void 0}},e}(n.AnnotationView),r.PolyAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PolyAnnotationView,e.prototype.type=\"PolyAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({xs:[a.Array,[]],xs_units:[a.SpatialUnits,\"data\"],ys:[a.Array,[]],ys_units:[a.SpatialUnits,\"data\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r;return e=t.xs,r=t.ys,this.setv({xs:e,ys:r},{silent:!0}),this.data_update.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\"}],\"models/annotations/span\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\");r.SpanView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.position=\"absolute\",s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.model.for_hover?this.connect(this.model.properties.computed_location.change,function(){return this._draw_span()}):\"canvas\"===this.model.render_mode?(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.properties.location.change,function(t){return function(){return t.plot_view.request_render()}}(this))):(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.properties.location.change,function(){return this._draw_span()}))},e.prototype.render=function(){if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible)return this._draw_span()},e.prototype._draw_span=function(){var t,e,r,o,i,n,a,l,u,c;return i=this.model.for_hover?this.model.computed_location:this.model.location,null==i?void s.hide(this.el):(r=this.plot_model.frame,t=this.plot_model.canvas,u=this.plot_view.frame.xscales[this.model.x_range_name],c=this.plot_view.frame.yscales[this.model.y_range_name],\"width\"===this.model.dimension?(a=t.vy_to_sy(this._calc_dim(i,c)),n=t.vx_to_sx(r._left.value),l=r._width.value,o=this.model.properties.line_width.value()):(a=t.vy_to_sy(r._top.value),n=t.vx_to_sx(this._calc_dim(i,u)),l=this.model.properties.line_width.value(),o=r._height.value),\"css\"===this.model.render_mode?(this.el.style.top=a+\"px\",this.el.style.left=n+\"px\",this.el.style.width=l+\"px\",this.el.style.height=o+\"px\",this.el.style.zIndex=1e3,this.el.style.backgroundColor=this.model.properties.line_color.value(),this.el.style.opacity=this.model.properties.line_alpha.value(),s.show(this.el)):\"canvas\"===this.model.render_mode?(e=this.plot_view.canvas_view.ctx,e.save(),e.beginPath(),this.visuals.line.set_value(e),e.moveTo(n,a),\"width\"===this.model.dimension?e.lineTo(n+l,a):e.lineTo(n,a+o),e.stroke(),e.restore()):void 0)},e.prototype._calc_dim=function(t,e){var r;return r=\"data\"===this.model.location_units?e.compute(t):t},e}(n.AnnotationView),r.Span=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.SpanView,e.prototype.type=\"Span\",e.mixins([\"line\"]),e.define({render_mode:[a.RenderMode,\"canvas\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],location:[a.Number,null],location_units:[a.SpatialUnits,\"data\"],dimension:[a.Dimension,\"width\"]}),e.override({line_color:\"black\"}),e.internal({for_hover:[a.Boolean,!1],computed_location:[a.Number,null]}),e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\"}],\"models/annotations/text_annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/util/types\"),l=t(\"core/util/text\");r.TextAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.frame=this.plot_model.frame,\"css\"===this.model.render_mode)return this.el.classList.add(\"bk-annotation\"),this.plot_view.canvas_overlays.appendChild(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?this.connect(this.model.change,function(){return this.render()}):this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._calculate_text_dimensions=function(t,e){var r,o;return o=t.measureText(e).width,r=l.get_text_height(this.visuals.text.font_value()).height,[o,r]},e.prototype._calculate_bounding_box_dimensions=function(t,e){var r,o,i,n,s;switch(o=this._calculate_text_dimensions(t,e),i=o[0],r=o[1],t.textAlign){case\"left\":n=0;break;case\"center\":n=-i/2;break;case\"right\":n=-i}switch(t.textBaseline){case\"top\":s=0;break;case\"middle\":s=-.5*r;break;case\"bottom\":s=-1*r;break;case\"alphabetic\":s=-.8*r;break;case\"hanging\":s=-.17*r;break;case\"ideographic\":s=-.83*r}return[n,s,i,r]},e.prototype._get_size=function(){var t;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(this.model.text).ascent},e.prototype.render=function(){return null},e.prototype._canvas_text=function(t,e,r,o,i){var n;return this.visuals.text.set_value(t),n=this._calculate_bounding_box_dimensions(t,e),t.save(),t.beginPath(),t.translate(r,o),i&&t.rotate(i),t.rect(n[0],n[1],n[2],n[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(t),t.fillText(e,0,0)),t.restore()},e.prototype._css_text=function(t,e,r,o,i){var n,l,u;return s.hide(this.el),this.visuals.text.set_value(t),n=this._calculate_bounding_box_dimensions(t,e),l=this.visuals.border_line.line_dash.value(),a.isArray(l)&&(u=l.length<2?\"solid\":\"dashed\"),a.isString(l)&&(u=l),this.visuals.border_line.set_value(t),this.visuals.background_fill.set_value(t),this.el.style.position=\"absolute\",this.el.style.left=r+n[0]+\"px\",this.el.style.top=o+n[1]+\"px\",this.el.style.color=\"\"+this.visuals.text.text_color.value(),this.el.style.opacity=\"\"+this.visuals.text.text_alpha.value(),this.el.style.font=\"\"+this.visuals.text.font_value(),this.el.style.lineHeight=\"normal\",i&&(this.el.style.transform=\"rotate(\"+i+\"rad)\"),this.visuals.background_fill.doit&&(this.el.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(this.el.style.borderStyle=\"\"+u,this.el.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",this.el.style.borderColor=\"\"+this.visuals.border_line.color_value()),this.el.textContent=e,s.show(this.el)},e}(n.AnnotationView),r.TextAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TextAnnotation\",e.prototype.default_view=r.TextAnnotationView,e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/util/text\":\"core/util/text\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/title\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./text_annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\"),l=t(\"core/visuals\");r.TitleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.visuals.text=new l.Text(this.model),r=this.plot_view.canvas_view.ctx,r.save(),this.model.panel.apply_label_text_heuristics(r,\"justified\"),this.model.text_baseline=r.textBaseline,this.model.text_align=this.model.align,r.restore()},e.prototype._get_computed_location=function(){var t,e,r,o,i,n,s;switch(e=this._calculate_text_dimensions(this.plot_view.canvas_view.ctx,this.text),s=e[0],t=e[1],this.model.panel.side){case\"left\":i=0,n=this._get_text_location(this.model.align,this.frame.v_range)+this.model.offset;break;case\"right\":i=this.canvas._right.value-1,n=this.canvas._height.value-this._get_text_location(this.model.align,this.frame.v_range)-this.model.offset;break;case\"above\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,n=this.canvas._top.value-10;break;case\"below\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,n=0}return r=this.canvas.vx_to_sx(i),o=this.canvas.vy_to_sy(n),[r,o]},e.prototype._get_text_location=function(t,e){var r;switch(t){case\"left\":r=e.start;break;case\"center\":r=(e.end+e.start)/2;break;case\"right\":r=e.end}return r},e.prototype.render=function(){var t,e,r,o,i;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible&&(t=this.model.panel.get_label_angle_heuristic(\"parallel\"),r=this._get_computed_location(),o=r[0],i=r[1],e=this.plot_view.canvas_view.ctx,\"\"!==this.model.text&&null!==this.model.text))return\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,o,i,t):this._css_text(e,this.model.text,o,i,t)},e.prototype._get_size=function(){var t,e;return e=this.model.text,\"\"===e||null===e?0:(t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(e).ascent+10)},e}(n.TextAnnotationView),r.Title=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TitleView,e.prototype.type=\"Title\",e.mixins([\"line:border_\",\"fill:background_\"]),e.define({text:[a.String],text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"10pt\"],text_font_style:[a.FontStyle,\"bold\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],align:[a.TextAlign,\"left\"],offset:[a.Number,0],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e.internal({text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"]}),e}(n.TextAnnotation)},{\"./text_annotation\":\"models/annotations/text_annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/visuals\":\"core/visuals\"}],\"models/annotations/tooltip\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\");r.TooltipView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-tooltip\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.zIndex=1010,s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.data.change,function(){return this._draw_tips()})},e.prototype.render=function(){if(this.model.visible)return this._draw_tips()},e.prototype._draw_tips=function(){var t,e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g;if(i=this.model.data,s.empty(this.el),s.hide(this.el),this.model.custom?this.el.classList.add(\"bk-tooltip-custom\"):this.el.classList.remove(\"bk-tooltip-custom\"),0!==i.length){for(a=0,u=i.length;a0?(this.el.style.top=d+\"px\",this.el.style.left=l+\"px\"):s.hide(this.el)}},e}(n.AnnotationView),r.Tooltip=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TooltipView,e.prototype.type=\"Tooltip\",e.define({attachment:[a.String,\"horizontal\"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),e.override({level:\"overlay\"}),e.internal({data:[a.Any,[]],custom:[a.Any]}),e.prototype.clear=function(){return this.data=[]},e.prototype.add=function(t,e,r){var o;return o=this.data,o.push([t,e,r]),this.data=o,this.properties.data.change.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\"}],\"models/annotations/whisker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"../sources/column_data_source\"),a=t(\"./arrow_head\"),l=t(\"core/properties\");r.WhiskerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,n=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?n.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],o=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(o[s]),\n", " this._upper_sy=this.plot_model.canvas.v_vy_to_sy(o[a])},e.prototype.render=function(){var t,e,r,o,i,n,s,a,l,u;if(this.model.visible){if(this._map_data(),e=this.plot_view.canvas_view.ctx,this.visuals.line.doit)for(r=o=0,s=this._lower_sx.length;0<=s?os;r=0<=s?++o:--o)this.visuals.line.set_vectorize(e,r),e.beginPath(),e.moveTo(this._lower_sx[r],this._lower_sy[r]),e.lineTo(this._upper_sx[r],this._upper_sy[r]),e.stroke();if(t=\"height\"===this.model.dimension?0:Math.PI/2,null!=this.model.lower_head)for(r=i=0,a=this._lower_sx.length;0<=a?ia;r=0<=a?++i:--i)e.save(),e.translate(this._lower_sx[r],this._lower_sy[r]),e.rotate(t+Math.PI),this.model.lower_head.render(e,r),e.restore();if(null!=this.model.upper_head){for(u=[],r=n=0,l=this._upper_sx.length;0<=l?nl;r=0<=l?++n:--n)e.save(),e.translate(this._upper_sx[r],this._upper_sy[r]),e.rotate(t),this.model.upper_head.render(e,r),u.push(e.restore());return u}}},e}(n.AnnotationView),r.Whisker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.WhiskerView,e.prototype.type=\"Whisker\",e.mixins([\"line\"]),e.define({lower:[l.DistanceSpec],lower_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],upper:[l.DistanceSpec],upper_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],base:[l.DistanceSpec],dimension:[l.Dimension,\"height\"],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e.override({level:\"underlay\"}),e.prototype._normals=function(){var t,e,r,o;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(o=[0,1],t=o[0],e=o[1]),[t,e]},e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"./arrow_head\":\"models/annotations/arrow_head\",\"core/properties\":\"core/properties\"}],\"models/axes/axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/layout/side_panel\"),s=t(\"../renderers/guide_renderer\"),a=t(\"../renderers/renderer\"),l=t(\"core/logging\"),u=t(\"core/properties\"),c=t(\"core/util/types\");r.AxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_rule(t),this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t),this._draw_axis_label(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._get_size=function(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()},e.prototype._draw_rule=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m;if(this.visuals.axis_line.doit){for(s=e=this.model.rule_coords,h=s[0],f=s[1],a=this.plot_view.map_to_screen(h,f,this._x_range_name,this._y_range_name),_=a[0],p=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,d=u[0],m=u[1],this.visuals.axis_line.set_value(t),t.beginPath(),t.moveTo(Math.round(_[0]+i*d),Math.round(p[0]+n*m)),r=o=1,c=_.length;1<=c?oc;r=1<=c?++o:--o)t.lineTo(Math.round(_[r]+i*d),Math.round(p[r]+n*m));return t.stroke()}},e.prototype._draw_major_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.major_tick_line.doit){for(e=this.model.tick_coords,s=e.major,m=s[0],g=s[1],a=this.plot_view.map_to_screen(m,g,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,y=u[0],v=u[1],d=this.model.major_tick_in,f=this.model.major_tick_out,this.visuals.major_tick_line.set_value(t),_=[],r=o=0,c=p.length;0<=c?oc;r=0<=c?++o:--o)t.beginPath(),t.moveTo(Math.round(p[r]+i*f+i*y),Math.round(h[r]+n*f+n*v)),t.lineTo(Math.round(p[r]-i*d+i*y),Math.round(h[r]-n*d+n*v)),_.push(t.stroke());return _}},e.prototype._draw_minor_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.minor_tick_line.doit){for(e=this.model.tick_coords,s=e.minor,m=s[0],g=s[1],a=this.plot_view.map_to_screen(m,g,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,y=u[0],v=u[1],d=this.model.minor_tick_in,f=this.model.minor_tick_out,this.visuals.minor_tick_line.set_value(t),_=[],r=o=0,c=p.length;0<=c?oc;r=0<=c?++o:--o)t.beginPath(),t.moveTo(Math.round(p[r]+i*f+i*y),Math.round(h[r]+n*f+n*v)),t.lineTo(Math.round(p[r]-i*d+i*y),Math.round(h[r]-n*d+n*v)),_.push(t.stroke());return _}},e.prototype._draw_major_labels=function(t){var e,r,o,i,n,s,a,l,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M;for(r=this.model.tick_coords,_=r.major,w=_[0],k=_[1],p=this.plot_view.map_to_screen(w,k,this._x_range_name,this._y_range_name),v=p[0],b=p[1],h=this.model.normals,a=h[0],l=h[1],d=this.model.offsets,x=d[0],M=d[1],o=this.model.dimension,y=this.model.panel_side,u=this.model.major_label_orientation,e=c.isString(u)?this.model.panel.get_label_angle_heuristic(u):-u,g=this._tick_extent()+this.model.major_label_standoff,s=this.model.compute_labels(r.major[o]),this.visuals.major_label_text.set_value(t),this.model.panel.apply_label_text_heuristics(t,u),m=[],i=n=0,f=v.length;0<=f?nf;i=0<=f?++n:--n)e?(t.translate(v[i]+a*g+a*x,b[i]+l*g+l*M),t.rotate(e),t.fillText(s[i],0,0),t.rotate(-e),m.push(t.translate(-v[i]-a*g+a*x,-b[i]-l*g+l*M))):m.push(t.fillText(s[i],Math.round(v[i]+a*g+a*x),Math.round(b[i]+l*g+l*M)));return m},e.prototype._draw_axis_label=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y;if(r=this.model.axis_label,null!=r&&(s=this.model.rule_coords,d=s[0],m=s[1],a=this.plot_view.map_to_screen(d,m,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,o=l[0],i=l[1],u=this.model.offsets,f=u[0],y=u[1],c=this.model.panel_side,n=\"parallel\",e=this.model.panel.get_label_angle_heuristic(n),_=this._tick_extent()+this._tick_label_extent()+this.model.axis_label_standoff,p=(p[0]+p[p.length-1])/2,h=(h[0]+h[h.length-1])/2,this.visuals.axis_label_text.set_value(t),this.model.panel.apply_label_text_heuristics(t,n),d=p+o*_+o*f,m=h+i*_+i*y,!isNaN(d)&&!isNaN(m)))return e?(t.translate(d,m),t.rotate(e),t.fillText(r,0,0),t.rotate(-e),t.translate(-d,-m)):t.fillText(r,d,m)},e.prototype._tick_extent=function(){return this.model.major_tick_out},e.prototype._tick_label_extent=function(){var t,e,r,o,i,n,s,a,l,u,_,p,h,d,f,m,y,g,v;for(n=0,o=this.plot_view.canvas_view.ctx,i=this.model.dimension,r=this.model.tick_coords.major,m=this.model.panel_side,h=this.model.major_label_orientation,p=this.model.compute_labels(r[i]),this.visuals.major_label_text.set_value(o),c.isString(h)?(l=1,t=this.model.panel.get_label_angle_heuristic(h)):(l=2,t=-h),t=Math.abs(t),e=Math.cos(t),f=Math.sin(t),\"above\"===m||\"below\"===m?(v=f,a=e):(v=e,a=f),u=_=0,d=p.length;0<=d?_d;u=0<=d?++_:--_)null!=p[u]&&(g=1.1*o.measureText(p[u]).width,s=.9*o.measureText(p[u]).ascent,y=g*v+s/l*a,y>n&&(n=y));return n>0&&(n+=this.model.major_label_standoff),n},e.prototype._axis_label_extent=function(){var t,e,r,o,i,n,s,a,l,u;return i=0,l=this.model.panel_side,e=this.model.axis_label,s=\"parallel\",o=this.plot_view.canvas_view.ctx,this.visuals.axis_label_text.set_value(o),t=Math.abs(this.model.panel.get_label_angle_heuristic(s)),r=Math.cos(t),a=Math.sin(t),e&&(i+=this.model.axis_label_standoff,this.visuals.axis_label_text.set_value(o),u=1.1*o.measureText(e).width,n=.9*o.measureText(e).ascent,i+=\"above\"===l||\"below\"===l?u*a+n*r:u*r+n*a),i},e}(a.RendererView),r.Axis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.AxisView,e.prototype.type=\"Axis\",e.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),e.define({bounds:[u.Any,\"auto\"],ticker:[u.Instance,null],formatter:[u.Instance,null],x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],axis_label:[u.String,\"\"],axis_label_standoff:[u.Int,5],major_label_standoff:[u.Int,5],major_label_orientation:[u.Any,\"horizontal\"],major_label_overrides:[u.Any,{}],major_tick_in:[u.Number,2],major_tick_out:[u.Number,6],minor_tick_in:[u.Number,0],minor_tick_out:[u.Number,4]}),e.override({axis_line_color:\"black\",major_tick_line_color:\"black\",minor_tick_line_color:\"black\",major_label_text_font_size:\"8pt\",major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label_text_font_size:\"10pt\",axis_label_text_font_style:\"italic\"}),e.internal({panel_side:[u.Any]}),e.prototype.compute_labels=function(t){var e,r,o,i;for(o=this.formatter.doFormat(t,this),e=r=0,i=t.length;0<=i?ri;e=0<=i?++r:--r)t[e]in this.major_label_overrides&&(o[e]=this.major_label_overrides[t[e]]);return o},e.getters({computed_bounds:function(){return this._computed_bounds()},rule_coords:function(){return this._rule_coords()},tick_coords:function(){return this._tick_coords()},ranges:function(){return this._ranges()},normals:function(){return this.panel._normals},dimension:function(){return this.panel._dim},offsets:function(){return this._offsets()},loc:function(){return this._get_loc()}}),e.prototype.add_panel=function(t){return this.panel=new n.SidePanel({side:t}),this.panel.attach_document(this.document),this.panel_side=t},e.prototype._offsets=function(){var t,e,r,o,i;switch(r=this.panel_side,e=[0,0],o=e[0],i=e[1],t=this.plot.plot_canvas.frame,r){case\"below\":i=Math.abs(this.panel._top.value-t._bottom.value);break;case\"above\":i=Math.abs(this.panel._bottom.value-t._top.value);break;case\"right\":o=Math.abs(this.panel._left.value-t._right.value);break;case\"left\":o=Math.abs(this.panel._right.value-t._left.value)}return[o,i]},e.prototype._ranges=function(){var t,e,r,o;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,o=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[o[e],o[r]]},e.prototype._computed_bounds=function(){var t,e,r,o,i,n,s,a;return i=this.ranges,r=i[0],t=i[1],a=null!=(n=this.bounds)?n:\"auto\",o=[r.min,r.max],\"auto\"===a?o:c.isArray(a)?(Math.abs(a[0]-a[1])>Math.abs(o[0]-o[1])?(s=Math.max(Math.min(a[0],a[1]),o[0]),e=Math.min(Math.max(a[0],a[1]),o[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])),[s,e]):(l.logger.error(\"user bounds '\"+a+\"' not understood\"),null)},e.prototype._rule_coords=function(){var t,e,r,o,i,n,s,a,l,u,c;return o=this.dimension,i=(o+1)%2,s=this.ranges,n=s[0],e=s[1],a=this.computed_bounds,l=a[0],r=a[1],u=new Array(2),c=new Array(2),t=[u,c],t[o][0]=Math.max(l,n.min),t[o][1]=Math.min(r,n.max),t[o][0]>t[o][1]&&(t[o][0]=t[o][1]=NaN),t[i][0]=this.loc,t[i][1]=this.loc,t},e.prototype._tick_coords=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T;if(o=this.dimension,n=(o+1)%2,y=this.ranges,d=y[0],e=y[1],g=this.computed_bounds,k=g[0],r=g[1],M=this.ticker.get_ticks(k,r,d,this.loc,{}),u=M.major,h=M.minor,j=[],T=[],t=[j,T],_=[],p=[],c=[_,p],\"FactorRange\"===d.type)for(i=s=0,v=u.length;0<=v?sv;i=0<=v?++s:--s)t[o].push(u[i]),t[n].push(this.loc);else{for(b=[d.min,d.max],m=b[0],f=b[1],i=a=0,w=u.length;0<=w?aw;i=0<=w?++a:--a)u[i]f||(t[o].push(u[i]),t[n].push(this.loc));for(i=l=0,x=h.length;0<=x?lx;i=0<=x?++l:--l)h[i]f||(c[o].push(h[i]),c[n].push(this.loc))}return{major:t,minor:c}},e.prototype._get_loc=function(){var t,e,r,o,i,n;switch(i=this.ranges,o=i[0],e=i[1],r=e.start,t=e.end,n=this.panel_side){case\"left\":case\"below\":return e.start;case\"right\":case\"above\":return e.end}},e}(s.GuideRenderer)},{\"../renderers/guide_renderer\":\"models/renderers/guide_renderer\",\"../renderers/renderer\":\"models/renderers/renderer\",\"core/layout/side_panel\":\"core/layout/side_panel\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/axes/categorical_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"../formatters/categorical_tick_formatter\"),a=t(\"../tickers/categorical_ticker\"),l=t(\"core/logging\");r.CategoricalAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.CategoricalAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CategoricalAxisView,e.prototype.type=\"CategoricalAxis\",e.override({ticker:function(){return new a.CategoricalTicker},formatter:function(){return new s.CategoricalTickFormatter}}),e.prototype._computed_bounds=function(){var t,e,r,o,i,n;return o=this.ranges,e=o[0],t=o[1],n=null!=(i=this.bounds)?i:\"auto\",r=[e.min,e.max],\"auto\"!==n&&l.logger.warn(\"Categorical Axes only support user_bounds='auto', ignoring\"),r},e}(n.Axis)},{\"../formatters/categorical_tick_formatter\":\"models/formatters/categorical_tick_formatter\",\"../tickers/categorical_ticker\":\"models/tickers/categorical_ticker\",\"./axis\":\"models/axes/axis\",\"core/logging\":\"core/logging\"}],\"models/axes/continuous_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\");r.ContinuousAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ContinuousAxis\",e}(n.Axis)},{\"./axis\":\"models/axes/axis\"}],\"models/axes/datetime_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./linear_axis\"),s=t(\"../formatters/datetime_tick_formatter\"),a=t(\"../tickers/datetime_ticker\");r.DatetimeAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.LinearAxisView),r.DatetimeAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.DatetimeAxisView,e.prototype.type=\"DatetimeAxis\",e.override({ticker:function(){return new a.DatetimeTicker},formatter:function(){return new s.DatetimeTickFormatter}}),e}(n.LinearAxis)},{\"../formatters/datetime_tick_formatter\":\"models/formatters/datetime_tick_formatter\",\"../tickers/datetime_ticker\":\"models/tickers/datetime_ticker\",\"./linear_axis\":\"models/axes/linear_axis\"}],\"models/axes/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./axis\");r.Axis=o.Axis;var i=t(\"./categorical_axis\");r.CategoricalAxis=i.CategoricalAxis;var n=t(\"./continuous_axis\");r.ContinuousAxis=n.ContinuousAxis;var s=t(\"./datetime_axis\");r.DatetimeAxis=s.DatetimeAxis;var a=t(\"./linear_axis\");r.LinearAxis=a.LinearAxis;var l=t(\"./log_axis\");r.LogAxis=l.LogAxis},{\"./axis\":\"models/axes/axis\",\"./categorical_axis\":\"models/axes/categorical_axis\",\"./continuous_axis\":\"models/axes/continuous_axis\",\"./datetime_axis\":\"models/axes/datetime_axis\",\"./linear_axis\":\"models/axes/linear_axis\",\"./log_axis\":\"models/axes/log_axis\"}],\"models/axes/linear_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"./continuous_axis\"),a=t(\"../formatters/basic_tick_formatter\"),l=t(\"../tickers/basic_ticker\");r.LinearAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.LinearAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LinearAxisView,e.prototype.type=\"LinearAxis\",e.override({ticker:function(){return new l.BasicTicker},formatter:function(){return new a.BasicTickFormatter}}),e}(s.ContinuousAxis)},{\"../formatters/basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"../tickers/basic_ticker\":\"models/tickers/basic_ticker\",\"./axis\":\"models/axes/axis\",\"./continuous_axis\":\"models/axes/continuous_axis\"}],\"models/axes/log_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"./continuous_axis\"),a=t(\"../formatters/log_tick_formatter\"),l=t(\"../tickers/log_ticker\");r.LogAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.LogAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LogAxisView,e.prototype.type=\"LogAxis\",e.override({ticker:function(){return new l.LogTicker},formatter:function(){return new a.LogTickFormatter}}),e}(s.ContinuousAxis)},{\"../formatters/log_tick_formatter\":\"models/formatters/log_tick_formatter\",\"../tickers/log_ticker\":\"models/tickers/log_ticker\",\"./axis\":\"models/axes/axis\",\"./continuous_axis\":\"models/axes/continuous_axis\"}],\"models/callbacks/customjs\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"core/properties\"),a=t(\"core/util/object\"),l=t(\"../../model\");r.CustomJS=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return o(r,e),r.prototype.type=\"CustomJS\",r.define({args:[s.Any,{}],code:[s.String,\"\"]}),r.getters({values:function(){return this._make_values()},func:function(){return this._make_func()}}),r.prototype.execute=function(e,r){return this.func.apply(e,this.values.concat(e,r,t,{}))},r.prototype._make_values=function(){return a.values(this.args)},r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var o=new r,i=t.apply(o,e);return Object(i)===i?i:o}(Function,n.call(Object.keys(this.args)).concat([\"cb_obj\"],[\"cb_data\"],[\"require\"],[\"exports\"],[this.code]),function(){})},r}(l.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/callbacks/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./customjs\");r.CustomJS=o.CustomJS;var i=t(\"./open_url\");r.OpenURL=i.OpenURL},{\"./customjs\":\"models/callbacks/customjs\",\"./open_url\":\"models/callbacks/open_url\"}],\"models/callbacks/open_url\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\"),a=t(\"core/util/selection\"),l=t(\"core/util/templating\");r.OpenURL=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"OpenURL\",e.define({url:[s.String,\"http://\"]}),e.prototype.execute=function(t){var e,r,o,i,n;for(i=a.get_indices(t),r=0,o=i.length;ro;e=0<=o?++r:--r)i.push(this[e]=t[e]);return i}),r.CanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-canvas-wrapper\",e.prototype.initialize=function(t){switch(e.__super__.initialize.call(this,t),this.map_el=this.model.map?this.el.appendChild(c.div({\"class\":\"bk-canvas-map\"})):null,this.events_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-events\"})),this.overlays_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-overlays\"})),this.model.output_backend){case\"canvas\":case\"webgl\":this.canvas_el=this.el.appendChild(c.canvas({\"class\":\"bk-canvas\"})),this._ctx=this.canvas_el.getContext(\"2d\");break;case\"svg\":this._ctx=new p,this.canvas_el=this.el.appendChild(this._ctx.getSvg())}return this.ctx=this.get_ctx(),_.fixup_ctx(this.ctx),l.logger.debug(\"CanvasView initialized\")},e.prototype.get_ctx=function(){return this._ctx},e.prototype.get_canvas_element=function(){return this.canvas_el},e.prototype.prepare_canvas=function(){var t,e,r;return r=this.model._width.value,t=this.model._height.value,this.el.style.width=r+\"px\",this.el.style.height=t+\"px\",e=_.get_scale_ratio(this.ctx,this.model.use_hidpi,this.model.output_backend),this.model.pixel_ratio=e,this.canvas_el.style.width=r+\"px\",this.canvas_el.style.height=t+\"px\",this.canvas_el.setAttribute(\"width\",r*e),this.canvas_el.setAttribute(\"height\",t*e),l.logger.debug(\"Rendering CanvasView with width: \"+r+\", height: \"+t+\", pixel ratio: \"+e)},e.prototype.set_dims=function(t){var e,r;if(r=t[0],e=t[1],0!==r&&0!==e)return null!=this._width_constraint&&this.solver.has_constraint(this._width_constraint)&&this.solver.remove_constraint(this._width_constraint),null!=this._height_constraint&&this.solver.has_constraint(this._height_constraint)&&this.solver.remove_constraint(this._height_constraint),this._width_constraint=a.EQ(this.model._width,-r),this.solver.add_constraint(this._width_constraint),this._height_constraint=a.EQ(this.model._height,-e),this.solver.add_constraint(this._height_constraint),this.solver.update_variables()},e}(s.DOMView),r.Canvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Canvas\",e.prototype.default_view=r.CanvasView,e.internal({map:[u.Boolean,!1],initial_width:[u.Number],initial_height:[u.Number],use_hidpi:[u.Boolean,!0],pixel_ratio:[u.Number,1],output_backend:[u.OutputBackend,\"canvas\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this},e.prototype.vx_to_sx=function(t){return t},e.prototype.vy_to_sy=function(t){return this._height.value-(t+1)},e.prototype.v_vx_to_sx=function(t){return new Float64Array(t)},e.prototype.v_vy_to_sy=function(t){var e,r,o,i,n,s;for(e=new Float64Array(t.length),r=this._height.value,o=i=0,n=t.length;i=this._left.value&&t<=this._right.value&&e>=this._bottom.value&&e<=this._top.value},e.prototype.map_to_screen=function(t,e,r,o,i){var n,s,a,l;return null==o&&(o=\"default\"),null==i&&(i=\"default\"),a=this.xscales[o].v_compute(t),n=r.v_vx_to_sx(a),l=this.yscales[i].v_compute(e),s=r.v_vy_to_sy(l),[n,s]},e.prototype._get_ranges=function(t,e){var r,o,i;if(i={},i[\"default\"]=t,null!=e)for(o in e)r=e[o],i[o]=r;return i},e.prototype._get_scales=function(t,e,r){var o,i,_,p;p={};for(o in e){if(i=e[o],i instanceof u.DataRange1d||i instanceof l.Range1d){if(!(t instanceof a.LogScale||t instanceof s.LinearScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);if(t instanceof n.CategoricalScale)throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type)}if(i instanceof c.FactorRange&&!(t instanceof n.CategoricalScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);t instanceof a.LogScale&&i instanceof u.DataRange1d&&(i.scale_hint=\"log\"),_=t.clone(),_.setv({source_range:i,target_range:r}),p[o]=_}return p},e.prototype._configure_frame_ranges=function(){return this._h_range=new l.Range1d({start:this._left.value,end:this._left.value+this._width.value}),this._v_range=new l.Range1d({start:this._bottom.value,end:this._bottom.value+this._height.value})},e.prototype._configure_scales=function(){return this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._xscales=this._get_scales(this.x_scale,this._x_ranges,this._h_range),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_range)},e.prototype._update_scales=function(){var t,e,r,o;this._configure_frame_ranges(),e=this._xscales;for(t in e)o=e[t],o.target_range=this._h_range;r=this._yscales;for(t in r)o=r[t],o.target_range=this._v_range;return null},e.getters({h_range:function(){return this._h_range},v_range:function(){return this._v_range},x_ranges:function(){return this._x_ranges},y_ranges:function(){return this._y_ranges},xscales:function(){return this._xscales},yscales:function(){return this._yscales},x_mappers:function(){return h.logger.warn(\"x_mappers attr is deprecated, use xscales\"),this._xscales},y_mappers:function(){return h.logger.warn(\"y_mappers attr is deprecated, use yscales\"),this._yscales}}),e.internal({extra_x_ranges:[d.Any,{}],extra_y_ranges:[d.Any,{}],x_range:[d.Instance],y_range:[d.Instance],x_scale:[d.Instance],y_scale:[d.Instance]}),e.prototype.get_constraints=function(){return[_.GE(this._top),_.GE(this._bottom),_.GE(this._left),_.GE(this._right),_.GE(this._width),_.GE(this._height),_.EQ(this._left,this._width,[-1,this._right]),_.EQ(this._bottom,this._height,[-1,this._top])]},e}(p.LayoutCanvas)},{\"../ranges/data_range1d\":\"models/ranges/data_range1d\",\"../ranges/factor_range\":\"models/ranges/factor_range\",\"../ranges/range1d\":\"models/ranges/range1d\",\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"../scales/linear_scale\":\"models/scales/linear_scale\",\"../scales/log_scale\":\"models/scales/log_scale\",\"core/layout/layout_canvas\":\"core/layout/layout_canvas\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/canvas/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./canvas\");r.Canvas=o.Canvas;var i=t(\"./cartesian_frame\");r.CartesianFrame=i.CartesianFrame},{\"./canvas\":\"models/canvas/canvas\",\"./cartesian_frame\":\"models/canvas/cartesian_frame\"}],\"models/formatters/basic_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./tick_formatter\"),s=t(\"core/properties\"),a=t(\"core/util/types\");r.BasicTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"BasicTickFormatter\",e.define({precision:[s.Any,\"auto\"],use_scientific:[s.Bool,!0],power_limit_high:[s.Number,5],power_limit_low:[s.Number,-3]}),e.getters({scientific_limit_low:function(){return Math.pow(10,this.power_limit_low)},scientific_limit_high:function(){return Math.pow(10,this.power_limit_high)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.last_precision=3},e.prototype.doFormat=function(t,e){var r,o,i,n,s,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k;if(0===t.length)return[];if(k=0,t.length>=2&&(k=Math.abs(t[1]-t[0])/1e4),p=!1,this.use_scientific)for(i=0,u=t.length;ik&&(w>=this.scientific_limit_high||w<=this.scientific_limit_low)){p=!0;break}if(d=this.precision,null==d||a.isNumber(d)){if(l=new Array(t.length),p)for(r=n=0,f=t.length;0<=f?nf;r=0<=f?++n:--n)l[r]=t[r].toExponential(d||void 0);else for(r=s=0,m=t.length;0<=m?sm;r=0<=m?++s:--s)l[r]=t[r].toFixed(d||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return l}if(\"auto\"===d)for(l=new Array(t.length),x=c=y=this.last_precision;y<=15?c<=15:c>=15;x=y<=15?++c:--c){if(o=!0,p){for(r=_=0,g=t.length;0<=g?_g;r=0<=g?++_:--_)if(l[r]=t[r].toExponential(x),r>0&&l[r]===l[r-1]){o=!1;break}if(o)break}else{for(r=h=0,v=t.length;0<=v?hv;r=0<=v?++h:--h)if(l[r]=t[r].toFixed(x).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),r>0&&l[r]===l[r-1]){o=!1;break}if(o)break}if(o)return this.last_precision=x,l}return l},e}(n.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/formatters/categorical_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./tick_formatter\");r.CategoricalTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalTickFormatter\",e.prototype.doFormat=function(t,e){return t},e}(n.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\"}],\"models/formatters/datetime_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,\n", " t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"sprintf\"),u=t(\"timezone\"),c=t(\"./tick_formatter\"),_=t(\"core/logging\"),p=t(\"core/properties\"),h=t(\"core/util/array\"),d=t(\"core/util/types\");n=function(t){return Math.round(t/1e3%1*1e6)},o=function(t){return u(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})},i=function(t,e){var r;return d.isFunction(e)?e(t):(r=l.sprintf(\"$1%06d\",n(t)),e=e.replace(/((^|[^%])(%%)*)%f/,r),e.indexOf(\"%\")===-1?e:u(t,e))},r.DatetimeTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"DatetimeTickFormatter\",e.define({microseconds:[p.Array,[\"%fus\"]],milliseconds:[p.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[p.Array,[\"%Ss\"]],minsec:[p.Array,[\":%M:%S\"]],minutes:[p.Array,[\":%M\",\"%Mm\"]],hourmin:[p.Array,[\"%H:%M\"]],hours:[p.Array,[\"%Hh\",\"%H:%M\"]],days:[p.Array,[\"%m/%d\",\"%a%d\"]],months:[p.Array,[\"%m/%Y\",\"%b%y\"]],years:[p.Array,[\"%Y\"]]}),e.prototype.format_order=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],e.prototype.strip_leading_zeros=!0,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._update_width_formats()},e.prototype._update_width_formats=function(){var t,e;return e=u(new Date),t=function(t){var r,o,n;return o=function(){var o,n,s;for(s=[],o=0,n=t.length;o=60?\"minsec\":\"seconds\";case!(r<3600):return e>=3600?\"hourmin\":\"minutes\";case!(r<86400):return\"hours\";case!(r<2678400):return\"days\";case!(r<31536e3):return\"months\";default:return\"years\"}},e.prototype.doFormat=function(t,e,r,n,s,a){var l,u,c,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F;if(null==r&&(r=null),null==n&&(n=null),null==s&&(s=.3),null==a&&(a=null),0===t.length)return[];if(E=Math.abs(t[t.length-1]-t[0])/1e3,M=a?a.resolution:E/(t.length-1),O=this._get_resolution_str(M,E),j=this._width_formats[O],F=j[0],p=j[1],c=p[0],n){for(h=[],f=m=0,T=F.length;0<=T?mT;f=0<=T?++m:--m)F[f]*t.length0&&(c=h[h.length-1])}for(v=[],P=this.format_order.indexOf(O),N={},S=this.format_order,y=0,b=S.length;ys;o=0<=s?++i:--i)if(n[o]=r+\"^\"+Math.round(Math.log(t[o])/Math.log(r)),o>0&&n[o]===n[o-1]){a=!0;break}return a&&(n=this.basic_formatter.doFormat(t)),n},e}(s.TickFormatter)},{\"./basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/formatters/mercator_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./basic_tick_formatter\"),s=t(\"core/properties\"),a=t(\"core/util/proj4\");r.MercatorTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MercatorTickFormatter\",e.define({dimension:[s.LatLon]}),e.prototype.doFormat=function(t,r){var o,i,n,s,l,u,c,_,p,h;if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0===t.length)return[];if(u=new Array(t.length),\"lon\"===this.dimension)for(o=i=0,c=t.length;0<=c?ic;o=0<=c?++i:--i)_=a.proj4(a.mercator).inverse([t[o],r.loc]),l=_[0],s=_[1],u[o]=l;else for(o=n=0,p=t.length;0<=p?np;o=0<=p?++n:--n)h=a.proj4(a.mercator).inverse([r.loc,t[o]]),l=h[0],s=h[1],u[o]=s;return e.__super__.doFormat.call(this,u,r)},e}(n.BasicTickFormatter)},{\"./basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"core/properties\":\"core/properties\",\"core/util/proj4\":\"core/util/proj4\"}],\"models/formatters/numeral_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"numbro\"),s=t(\"./tick_formatter\"),a=t(\"core/properties\");r.NumeralTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"NumeralTickFormatter\",e.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),e.prototype.doFormat=function(t,e){var r,o,i,s,a;return r=this.format,i=this.language,s=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),o=function(){var e,o,l;for(l=[],e=0,o=t.length;er;t=0<=r?++e:--e)o.push(this._angle[t]=this._end_angle[t]-this._start_angle[t]);return o},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h;for(p=r.sx,h=r.sy,i=r._start_angle,o=r._angle,c=r.sinner_radius,_=r.souter_radius,n=this.model.properties.direction.value(),u=[],a=0,l=e.length;a=c&&o.push([u,n]);for(i=this.model.properties.direction.value(),a=[],p=0,d=o.length;p=0||navigator.userAgent.indexOf(\"Trident\")>0||navigator.userAgent.indexOf(\"Edge\")>0,this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(t,i),t.beginPath(),n)for(c=[!1,!0],a=0,u=c.length;a=n&&o.push([i,r]);return s.create_1d_hit_test_result(o)},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_,p;return a=[n],_={},_[n]=(e+r)/2,p={},p[n]=(o+i)/2,l=.5*Math.min(Math.abs(r-e),Math.abs(i-o)),u={},u[n]=.4*l,c={},c[n]=.8*l,s={sx:_,sy:p,sinner_radius:u,souter_radius:c},this._render(t,a,s)},e}(n.XYGlyphView),r.Annulus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.AnnulusView,e.prototype.type=\"Annulus\",e.mixins([\"line\",\"fill\"]),e.define({inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/glyphs/arc\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.ArcView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){return\"data\"===this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;if(_=r.sx,p=r.sy,c=r.sradius,i=r._start_angle,o=r._end_angle,this.visuals.line.doit){for(n=this.model.properties.direction.value(),u=[],a=0,l=e.length;ai;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx0[t]+this._cy0[t]+this._cx1[t]+this._cy1[t])||(n=o(this._x0[t],this._y0[t],this._x1[t],this._y1[t],this._cx0[t],this._cy0[t],this._cx1[t],this._cy1[t]),a=n[0],u=n[1],l=n[2],c=n[3],r.push({minX:a,minY:u,maxX:l,maxY:c,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f;if(p=r.sx0,d=r.sy0,h=r.sx1,f=r.sy1,a=r.scx,l=r.scx0,c=r.scy0,u=r.scx1,_=r.scy1,this.visuals.line.doit){for(s=[],i=0,n=e.length;ie;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],o=n=0,l=e.length;0<=l?nl;o=0<=l?++n:--n)i=e[o],s.point_in_poly(this.sx[o],this.sy[o],_,p)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c;return a=[n],u={},u[n]=(e+r)/2,c={},c[n]=(o+i)/2,l={},l[n]=.2*Math.min(Math.abs(r-e),Math.abs(i-o)),s={sx:u,sy:c,sradius:l},this._render(t,a,s)},e}(n.XYGlyphView),r.Circle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CircleView,e.prototype.type=\"Circle\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],size:[a.DistanceSpec,{units:\"screen\",value:4}],radius:[a.DistanceSpec,null],radius_dimension:[a.String,\"x\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.properties.radius.optional=!0},e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/glyphs/ellipse\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.EllipseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"data\"===this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"===this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,n=e.length;i1?(_[n]=s,c[n]=s/u):(_[n]=s*u,c[n]=s),a={sx:p,sy:h,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Ellipse=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.EllipseView,e.prototype.type=\"Ellipse\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/glyph\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/util/bbox\"),a=t(\"core/util/projections\"),l=t(\"core/view\"),u=t(\"../../model\"),c=t(\"core/visuals\"),_=t(\"core/logging\"),p=t(\"core/util/object\"),h=t(\"core/util/types\");r.GlyphView=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return o(r,e),r.prototype.initialize=function(e){var o,i,n,s;if(r.__super__.initialize.call(this,e),this._nohit_warned={},this.renderer=e.renderer,this.visuals=new c.Visuals(this.model),i=this.renderer.plot_view.canvas_view.ctx,null!=i.glcanvas){try{s=t(\"models/glyphs/webgl/index\")}catch(a){if(n=a,\"MODULE_NOT_FOUND\"!==n.code)throw n;_.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\"),s=null}if(null!=s&&(o=s[this.model.type+\"GLGlyph\"],null!=o))return this.glglyph=new o(i.glcanvas.gl,this)}},r.prototype.set_visuals=function(t){if(this.visuals.warm_cache(t),null!=this.glglyph)return this.glglyph.set_visuals_changed()},r.prototype.render=function(t,e,r){if(t.beginPath(),null==this.glglyph||!this.glglyph.render(t,e,r))return this._render(t,e,r)},r.prototype.has_finished=function(){return!0},r.prototype.notify_finished=function(){return this.renderer.notify_finished()},r.prototype.bounds=function(){return null==this.index?s.empty():this._bounds(this.index.bbox)},r.prototype.log_bounds=function(){var t,e,r,o,i,n,a,l,u;if(null==this.index)return s.empty();for(t=s.empty(),n=this.index.search(s.positive_x()),a=this.index.search(s.positive_y()),e=0,o=n.length;et.maxX&&(t.maxX=l.maxX);for(r=0,i=a.length;rt.maxY&&(t.maxY=u.maxY);return this._bounds(t)},r.prototype.max_wh2_bounds=function(t){return{minX:t.minX-this.max_w2,maxX:t.maxX+this.max_w2,minY:t.minY-this.max_h2,maxY:t.maxY+this.max_h2}},r.prototype.get_anchor_point=function(t,e,r){var o,i;switch(o=r[0],i=r[1],t){case\"center\":return{x:this.scx(e,o,i),y:this.scy(e,o,i)};default:return null}},r.prototype.scx=function(t){return this.sx[t]},r.prototype.scy=function(t){return this.sy[t]},r.prototype.sdist=function(t,e,r,o,i){var n,s,a,l,u,c,_;return null==o&&(o=\"edge\"),null==i&&(i=!1),h.isString(e[0])&&(e=t.v_compute(e)),\"center\"===o?(s=function(){var t,e,o;for(o=[],t=0,e=r.length;tr;a=0<=r?++t:--t)o.push(e[a]-s[a]);return o}(),u=function(){var t,r,o;for(o=[],a=t=0,r=e.length;0<=r?tr;a=0<=r?++t:--t)o.push(e[a]+s[a]);return o}()):(l=e,u=function(){var t,e,o;for(o=[],a=t=0,e=l.length;0<=e?te;a=0<=e?++t:--t)o.push(l[a]+r[a]);return o}()),c=t.v_compute(l),_=t.v_compute(u),i?function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?te;a=0<=e?++t:--t)r.push(Math.ceil(Math.abs(_[a]-c[a])));return r}():function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?te;a=0<=e?++t:--t)r.push(Math.abs(_[a]-c[a]));return r}()},r.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return null},r.prototype._generic_line_legend=function(t,e,r,o,i,n){return t.save(),t.beginPath(),t.moveTo(e,(o+i)/2),t.lineTo(r,(o+i)/2),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,n),t.stroke()),t.restore()},r.prototype._generic_area_legend=function(t,e,r,o,i,n){var s,a,l,u,c,_,p,h,d;if(u=[n],d=Math.abs(r-e),a=.1*d,l=Math.abs(i-o),s=.1*l,c=e+a,_=r-a,p=o+s,h=i-s,this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fillRect(c,p,_-c,h-p)),this.visuals.line.doit)return t.beginPath(),t.rect(c,p,_-c,h-p),this.visuals.line.set_vectorize(t,n),t.stroke()},r.prototype.hit_test=function(t){var e,r;return r=null,e=\"_hit_\"+t.type,null!=this[e]?r=this[e](t):null==this._nohit_warned[t.type]&&(_.logger.debug(\"'\"+t.type+\"' selection not available for \"+this.model.type),this._nohit_warned[t.type]=!0),r},r.prototype.set_data=function(t,e){var r,o,i;return r=this.model.materialize_dataspecs(t),p.extend(this,r),this.renderer.plot_view.model.use_map&&(null!=this._x&&(o=a.project_xy(this._x,this._y),this._x=o[0],this._y=o[1]),null!=this._xs&&(i=a.project_xsys(this._xs,this._ys),this._xs=i[0],this._ys=i[1])),null!=this.glglyph&&this.glglyph.set_data_changed(this._x.length),this._set_data(t,e),this.index=this._index_data()},r.prototype._set_data=function(){},r.prototype._index_data=function(){},r.prototype.mask_data=function(t){return null!=this.glglyph?t:this._mask_data(t)},r.prototype._mask_data=function(t){return t},r.prototype._bounds=function(t){return t},r.prototype.map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,d,f,m,y,g,v;for(i=this.model._coords,e=0,o=i.length;ec;t=0<=c?++r:--r)_=this.map_to_screen(this[g][t],this[v][t]),d=_[0],m=_[1],this[f].push(d),this[y].push(m);else p=this.map_to_screen(this[g],this[v]),this[f]=p[0],this[y]=p[1];return this._map_data()},r.prototype._map_data=function(){},r.prototype.map_to_screen=function(t,e){return this.renderer.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},r}(l.View),r.Glyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._coords=[],e.coords=function(t){var e,r,o,i,s,a,l;for(e=this.prototype._coords.concat(t),this.prototype._coords=e,s={},r=0,o=t.length;rr;t=0<=r?++e:--e)this.stop.push(this.sy[t]-this.sh[t]/2),this.sbottom.push(this.sy[t]+this.sh[t]/2);return null},e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(l=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},s=l(this.renderer.xscale,this._left),p=l(this.renderer.xscale,this._right),d=l(this.renderer.yscale,this._y),e=l(this.renderer.yscale,this._height),u=[],r=o=0,_=d.length;0<=_?o<_:o>_;r=0<=_?++o:--o)i=s[r],c=p[r],h=d[r]+.5*e[r],t=d[r]-.5*e[r],!isNaN(i+c+h+t)&&isFinite(i+c+h+t)&&u.push({minX:i,minY:t,maxX:c,maxY:h,i:r});return new n.RBush(u)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;ic;n=0<=c?++l:--l)p=[],null!=this._image_shape&&(p=this._image_shape[n]),p.length>0?(a=this._image[n],this._height[n]=p[0],this._width[n]=p[1]):(a=u.concat(this._image[n]),this._height[n]=this._image[n].length,this._width[n]=this._image[n][0].length),null!=this.image_data[n]&&this.image_data[n].width===this._width[n]&&this.image_data[n].height===this._height[n]?r=this.image_data[n]:(r=document.createElement(\"canvas\"),r.width=this._width[n],r.height=this._height[n]),i=r.getContext(\"2d\"),s=i.getImageData(0,0,this._width[n],this._height[n]),o=this.model.color_mapper,t=o.v_map_screen(a,!0),e=new Uint8Array(t),s.data.set(e),i.putImageData(s,0,0),this.image_data[n]=r,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=u.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?_.push(this.max_dh=u.max(this._dh)):_.push(void 0);return _},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),n=0,s=e.length;nf;u=0<=f?++p:--p)if(!(null!=e&&e.indexOf(u)<0)){if(v=[],null!=this._image_shape&&(v=this._image_shape[u]),null!=this._rows)if(this._height[u]=this._rows[u],this._width[u]=this._cols[u],v.length>0)r=this._image[u].buffer;else for(l=this._image[u],r=new ArrayBuffer(4*l.length),n=new Uint32Array(r),_=h=0,m=l.length;0<=m?hm;_=0<=m?++h:--h)n[_]=l[_];else if(v.length>0)r=this._image[u].buffer,this._height[u]=v[0],this._width[u]=v[1];else{for(l=a.concat(this._image[u]),r=new ArrayBuffer(4*l.length),n=new Uint32Array(r),_=d=0,y=l.length;0<=y?dy;_=0<=y?++d:--d)n[_]=l[_];this._height[u]=this._image[u].length,this._width[u]=this._image[u][0].length}null!=this.image_data[u]&&this.image_data[u].width===this._width[u]&&this.image_data[u].height===this._height[u]?i=this.image_data[u]:(i=document.createElement(\"canvas\"),i.width=this._width[u],i.height=this._height[u]),s=i.getContext(\"2d\"),c=s.getImageData(0,0,this._width[u],this._height[u]),o=new Uint8Array(r),c.data.set(o),s.putImageData(c,0,0),this.image_data[u]=i,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?g.push(this.max_dh=a.max(this._dh)):g.push(void 0)}return g},e.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),n=0,s=e.length;no;t=0<=o?++r:--r)null!=this._url[t]&&(e=new Image,e.onerror=function(t){return function(e,r){return function(){return t.retries[e]>0?(s.logger.trace(\"ImageURL failed to load \"+t._url[e]+\" image, retrying in \"+a+\" ms\"),setTimeout(function(){return r.src=t._url[e]},a)):s.logger.warn(\"ImageURL unable to load \"+t._url[e]+\" image after \"+n+\" retries\"),t.retries[e]-=1}}}(this)(t,e),e.onload=function(t){return function(e,r){return function(){return t.image[r]=e,t.renderer.request_render()}}}(this)(e,t),i.push(e.src=this._url[t]));return i},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._images_rendered===!0},e.prototype._map_data=function(){var t,e,r;switch(e=function(){var t,e,o,i;if(null!=this.model.w)return this._w;for(o=this._x,i=[],t=0,e=o.length;tl;r=0<=l?++o:--o)u=[{x:this.sx[r],y:this.sy[r]},{x:this.sx[r+1],y:this.sy[r+1]}],i=u[0],n=u[1],e=s.dist_to_segment(a,i,n),ei;e=0<=i?++r:--r)(l[e]<=a&&a<=l[e+1]||l[e+1]<=a&&a<=l[e])&&(n[\"0d\"].glyph=this.model,n[\"0d\"].get_view=function(){return this}.bind(this),n[\"0d\"].flag=!0,n[\"0d\"].indices.push(e));return n},e.prototype.get_interpolation_hit=function(t,e){var r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w;return r=[e.vx,e.vy],p=r[0],h=r[1],o=[this._x[t],this._y[t],this._x[t+1],this._y[t+1]],m=o[0],b=o[1],y=o[2],w=o[3],\"point\"===e.type?(i=this.renderer.yscale.v_invert([h-1,h+1]),g=i[0],v=i[1],n=this.renderer.xscale.v_invert([p-1,p+1]),d=n[0],f=n[1]):\"v\"===e.direction?(a=this.renderer.yscale.v_invert([h,h]),g=a[0],v=a[1],l=[m,y],d=l[0],f=l[1]):(u=this.renderer.xscale.v_invert([p,p]),d=u[0],f=u[1],c=[b,w],g=c[0],v=c[1]),_=s.check_2_segments_intersect(d,g,f,v,m,b,y,w),[_.x,_.y]},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LineView,e.prototype.type=\"Line\",e.mixins([\"line\"]),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\"}],\"models/glyphs/multi_line\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"core/hittest\"),a=t(\"core/util/array\"),l=t(\"core/util/types\"),u=t(\"./glyph\");r.MultiLineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o,i,s,u,c;for(r=[],t=e=0,o=this._xs.length;0<=o?eo;t=0<=o?++e:--e)s=function(){var e,r,o,n;for(o=this._xs[t],n=[],e=0,r=o.length;eu;i=0<=u?++s:--s)0!==i?isNaN(_[i])||isNaN(h[i])?(t.stroke(),t.beginPath()):t.lineTo(_[i],h[i]):(t.beginPath(),t.moveTo(_[i],h[i]));c.push(t.stroke())}return c},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y;for(f=s.create_hit_test_result(),c={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},m=9999,r={},o=n=0,p=this.sxs.length;0<=p?np;o=0<=p?++n:--n){for(y=Math.max(2,this.visuals.line.cache_select(\"line_width\",o)/2),_=null,i=a=0,h=this.sxs[o].length-1;0<=h?ah;i=0<=h?++a:--a)d=[{x:this.sxs[o][i],y:this.sys[o][i]},{x:this.sxs[o][i+1],y:this.sys[o][i+1]}],l=d[0],u=d[1],e=s.dist_to_segment(c,l,u),eu;r=0<=u?++i:--i){for(a=[],o=n=0,c=h[r].length-1;0<=c?nc;o=0<=c?++n:--n)h[r][o]<=p&&p<=h[r][o+1]&&a.push(o);a.length>0&&(e[r]=a)}return _[\"1d\"].indices=Object.keys(e),_[\"2d\"].indices=e,_},e.prototype.get_interpolation_hit=function(t,e,r){var o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x;return o=[r.vx,r.vy],h=o[0],d=o[1],i=[this._xs[t][e],this._ys[t][e],this._xs[t][e+1],this._ys[t][e+1]],y=i[0],w=i[1],g=i[2],x=i[3],\"point\"===r.type?(n=this.renderer.yscale.v_invert([d-1,d+1]),v=n[0],b=n[1],a=this.renderer.xscale.v_invert([h-1,h+1]),f=a[0],m=a[1]):\"v\"===r.direction?(l=this.renderer.yscale.v_invert([d,d]),v=l[0],b=l[1],u=[y,g],f=u[0],m=u[1]):(c=this.renderer.xscale.v_invert([h,h]),f=c[0],m=c[1],_=[w,x],v=_[0],b=_[1]),p=s.check_2_segments_intersect(f,v,m,b,y,w,g,x),[p.x,p.y]},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(u.GlyphView),r.MultiLine=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.MultiLineView,e.prototype.type=\"MultiLine\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\"]),e}(u.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/array\":\"core/util/array\",\"core/util/spatial\":\"core/util/spatial\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/oval\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.OvalView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(){if(this.max_w2=0,\"data\"===this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"===this.model.properties.height.units)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"data\"===this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"===this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,n=e.length;i1?(_[n]=s,c[n]=s/u):(_[n]=s*u,c[n]=s),a={sx:p,sy:h,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Oval=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.OvalView,e.prototype.type=\"Oval\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/patch\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\");r.PatchView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u;if(l=r.sx,u=r.sy,this.visuals.fill.doit){for(this.visuals.fill.set_value(t),i=0,s=e.length;i_;o=0<=_?++i:--i)for(r[o]=[],u=a.copy(t[o]);u.length>0;)n=a.findLastIndex(u,function(t){return l.isStrictNaN(t)}),n>=0?c=u.splice(n):(c=u,u=[]),e=function(){var t,e,r;for(r=[],t=0,e=c.length;ts;t=0<=s?++r:--r)for(e=o=0,l=c[t].length;0<=l?ol;e=0<=l?++o:--o)u=c[t][e],_=p[t][e],0!==u.length&&i.push({minX:a.min(u),minY:a.min(_),maxX:a.max(u),maxY:a.max(_),i:t});return new n.RBush(i)},e.prototype._mask_data=function(t){var e,r,o,i,n,s,a,l,c;return s=this.renderer.plot_view.frame.x_ranges[\"default\"],r=[s.min,s.max],i=r[0],n=r[1],c=this.renderer.plot_view.frame.y_ranges[\"default\"],o=[c.min,c.max],\n", " a=o[0],l=o[1],e=u.validate_bbox_coords([i,n],[a,l]),this.index.indices(e)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m;for(d=r.sxs,m=r.sys,this.renderer.sxss=this._build_discontinuous_object(d),this.renderer.syss=this._build_discontinuous_object(m),p=[],n=0,a=e.length;nc;i=0<=c?++s:--s)0!==i?isNaN(h[i]+f[i])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(h[i],f[i]):(t.beginPath(),t.moveTo(h[i],f[i]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_vectorize(t,o),i=l=0,_=h.length;0<=_?l<_:l>_;i=0<=_?++l:--l)0!==i?isNaN(h[i]+f[i])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(h[i],f[i]):(t.beginPath(),t.moveTo(h[i],f[i]));t.closePath(),p.push(t.stroke())}else p.push(void 0)}return p},e.prototype._hit_point=function(t){var e,r,o,i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,b;for(l=[t.vx,t.vy],y=l[0],g=l[1],h=this.renderer.plot_view.canvas.vx_to_sx(y),f=this.renderer.plot_view.canvas.vy_to_sy(g),v=this.renderer.xscale.invert(y,!0),b=this.renderer.yscale.invert(g,!0),e=this.index.indices({minX:v,minY:b,maxX:v,maxY:b}),r=[],o=s=0,c=e.length;0<=c?sc;o=0<=c?++s:--s)for(i=e[o],d=this.renderer.sxss[i],m=this.renderer.syss[i],n=a=0,_=d.length;0<=_?a<_:a>_;n=0<=_?++a:--a)u.point_in_poly(h,f,d[n],m[n])&&r.push(i);return p=u.create_hit_test_result(),p[\"1d\"].indices=r,p},e.prototype._get_snap_coord=function(t){var e,r,o,i;for(i=0,e=0,r=t.length;en;o=0<=n?++i:--i)if(u.point_in_poly(e,r,s[o],a[o]))return this._get_snap_coord(s[o]);return null},e.prototype.scy=function(t,e,r){var o,i,n,s,a;if(1===this.renderer.syss[t].length)return this._get_snap_coord(this.sys[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],o=i=0,n=s.length;0<=n?in;o=0<=n?++i:--i)if(u.point_in_poly(e,r,s[o],a[o]))return this._get_snap_coord(a[o])},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(s.GlyphView),r.Patches=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PatchesView,e.prototype.type=\"Patches\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/array\":\"core/util/array\",\"core/util/spatial\":\"core/util/spatial\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/quad\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"../scales/categorical_scale\"),l=t(\"core/hittest\");r.QuadView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(l=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},s=l(this.renderer.xscale,this._left),p=l(this.renderer.xscale,this._right),d=l(this.renderer.yscale,this._top),e=l(this.renderer.yscale,this._bottom),u=[],r=o=0,_=s.length;0<=_?o<_:o>_;r=0<=_?++o:--o)i=s[r],c=p[r],h=d[r],t=e[r],!isNaN(i+c+h+t)&&isFinite(i+c+h+t)&&u.push({minX:i,minY:t,maxX:c,maxY:h,i:r});return new n.RBush(u)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;ii;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx[t]+this._cy[t])||(n=o(this._x0[t],this._cx[t],this._x1[t]),l=n[0],u=n[1],a=o(this._y0[t],this._cy[t],this._y1[t]),c=a[0],_=a[1],r.push({minX:l,minY:c,maxX:u,maxY:_,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;if(u=r.sx0,_=r.sy0,c=r.sx1,p=r.sy1,a=r.scx,l=r.scy,this.visuals.line.doit){for(s=[],i=0,n=e.length;ic;n=0<=c?++a:--a)0===p[n]&&(p[n]=s);for(_=[],l=0,u=e.length;lr;e=0<=r?++t:--t)o.push(this.sx[e]-this.sw[e]/2);return o}.call(this)),\"data\"===this.model.properties.height.units?(o=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale,t,1),this.sh=o[0],this.sy1=o[1]):(this.sh=this._height,this.sy1=function(){var t,r,o;for(o=[],e=t=0,r=this.sy.length;0<=r?tr;e=0<=r?++t:--t)o.push(this.sy[e]-this.sh[e]/2);return o}.call(this)),this.ssemi_diag=function(){var t,r,o;for(o=[],e=t=0,r=this.sw.length;0<=r?tr;e=0<=r?++t:--t)o.push(Math.sqrt(this.sw[e]/2*this.sw[e]/2+this.sh[e]/2*this.sh[e]/2));return o}.call(this)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d;if(_=r.sx,h=r.sy,p=r.sx0,d=r.sy1,c=r.sw,u=r.sh,o=r._angle,this.visuals.fill.doit)for(n=0,a=e.length;ne;a=0<=e?++t:--t)r.push(this.sx0[a]+this.sw[a]/2);return r}.call(this),b=function(){var t,e,r;for(r=[],a=t=0,e=this.sy1.length;0<=e?te;a=0<=e?++t:--t)r.push(this.sy1[a]+this.sh[a]/2);return r}.call(this),_=l.max(this._ddist(0,v,this.ssemi_diag)),p=l.max(this._ddist(1,b,this.ssemi_diag)),S=T-_,O=T+_,A=P-p,E=P+p,n=[],e=s.validate_bbox_coords([S,O],[A,E]),m=this.index.indices(e),u=0,c=m.length;u=0,i=x-this.sy1[a]<=this.sh[a]&&x-this.sy1[a]>=0),i&&j&&n.push(a);return y=s.create_hit_test_result(),y[\"1d\"].indices=n,y},e.prototype._map_dist_corner_for_data_side_length=function(t,e,r,o,i){var n,s,a,l,_,p,h,d,f,m;return u.isString(t[0])&&r instanceof c.CategoricalScale?(l=!0,p=r.v_compute(t,l),0===i?h=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?ro;n=0<=o?++r:--r)i.push(p[n]-e[n]/2);return i}():1===i&&(h=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?ro;n=0<=o?++r:--r)i.push(p[n]+e[n]/2);return i}()),m=r.v_compute(h),_=this.sdist(r,t,e,\"center\",this.model.dilate)):(s=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?ro;n=0<=o?++r:--r)i.push(Number(t[n])-e[n]/2);return i}(),a=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?ro;n=0<=o?++r:--r)i.push(Number(t[n])+e[n]/2);return i}(),d=r.v_compute(s),f=r.v_compute(a),_=this.sdist(r,s,e,\"edge\",this.model.dilate),0===i?m=d[0]e;o=0<=e?++t:--t)i.push(a[o]+r[o]);return i}(),i=s.v_invert(a),n=s.v_invert(l),function(){var t,e,r;for(r=[],o=t=0,e=i.length;0<=e?te;o=0<=e?++t:--t)r.push(Math.abs(n[o]-i[o]));return r}()},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.RectView,e.prototype.type=\"Rect\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],width:[a.DistanceSpec],height:[a.DistanceSpec],dilate:[a.Bool,!1]}),e}(n.XYGlyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/segment\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/hittest\"),s=t(\"core/util/spatial\"),a=t(\"./glyph\");r.SegmentView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o;for(r=[],t=e=0,o=this._x0.length;0<=o?eo;t=0<=o?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t])||r.push({minX:Math.min(this._x0[t],this._x1[t]),minY:Math.min(this._y0[t],this._y1[t]),maxX:Math.max(this._x0[t],this._x1[t]),maxY:Math.max(this._y0[t],this._y1[t]),i:t});return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;if(a=r.sx0,u=r.sy0,l=r.sx1,c=r.sy1,this.visuals.line.doit){for(s=[],i=0,n=e.length;ir;t=0<=r?++e:--e)this.sleft.push(this.sx[t]-this.sw[t]/2),this.sright.push(this.sx[t]+this.sw[t]/2);return null},e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(s=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},d=s(this.renderer.xscale,this._x),h=s(this.renderer.xscale,this._width),p=s(this.renderer.yscale,this._top),e=s(this.renderer.yscale,this._bottom),l=[],r=o=0,c=d.length;0<=c?oc;r=0<=c?++o:--o)i=d[r]-h[r]/2,u=d[r]+h[r]/2,_=p[r],t=e[r],!isNaN(i+u+_+t)&&isFinite(i+u+_+t)&&l.push({minX:i,minY:t,maxX:u,maxY:_,i:r});return new n.RBush(l)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;io;t=0<=o?++e:--e)i=s[t],!isNaN(i)&&isFinite(i)&&(l=u[t],!isNaN(l)&&isFinite(l)&&r.push({minX:i,minY:l,maxX:i,maxY:l,i:t}));return new n.RBush(r)},e}(s.GlyphView),r.XYGlyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"XYGlyph\",e.prototype.default_view=r.XYGlyphView,e.coords([[\"x\",\"y\"]]),e}(s.Glyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./glyph\":\"models/glyphs/glyph\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/grids/grid\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../renderers/guide_renderer\"),s=t(\"../renderers/renderer\"),a=t(\"core/properties\"),l=t(\"core/util/types\");r.GridView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_regions(t),this._draw_minor_grids(t),this._draw_grids(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype._draw_regions=function(t){var e,r,o,i,n,s,a,l,u,c,_,p;if(this.visuals.band_fill.doit)for(o=this.model.grid_coords(\"major\",!1),_=o[0],p=o[1],this.visuals.band_fill.set_value(t),e=r=0,i=_.length-1;0<=i?ri;e=0<=i?++r:--r)e%2===1&&(n=this.plot_view.map_to_screen(_[e],p[e],this._x_range_name,this._y_range_name),a=n[0],u=n[1],s=this.plot_view.map_to_screen(_[e+1],p[e+1],this._x_range_name,this._y_range_name),l=s[0],c=s[1],t.fillRect(a[0],u[0],l[1]-a[0],c[1]-u[0]),t.fill())},e.prototype._draw_grids=function(t){var e,r,o;if(this.visuals.grid_line.doit)return e=this.model.grid_coords(\"major\"),r=e[0],o=e[1],this._draw_grid_helper(t,this.visuals.grid_line,r,o)},e.prototype._draw_minor_grids=function(t){var e,r,o;if(this.visuals.minor_grid_line.doit)return e=this.model.grid_coords(\"minor\"),r=e[0],o=e[1],this._draw_grid_helper(t,this.visuals.minor_grid_line,r,o)},e.prototype._draw_grid_helper=function(t,e,r,o){var i,n,s,a,l,u,c,_;for(e.set_value(t),i=n=0,a=r.length;0<=a?na;i=0<=a?++n:--n){for(l=this.plot_view.map_to_screen(r[i],o[i],this._x_range_name,this._y_range_name),c=l[0],_=l[1],t.beginPath(),t.moveTo(Math.round(c[0]),Math.round(_[0])),i=s=1,u=c.length;1<=u?su;i=1<=u?++s:--s)t.lineTo(Math.round(c[i]),Math.round(_[i]));t.stroke()}},e}(s.RendererView),r.Grid=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.GridView,e.prototype.type=\"Grid\",e.mixins([\"line:grid_\",\"line:minor_grid_\",\"fill:band_\"]),e.define({bounds:[a.Any,\"auto\"],dimension:[a.Number,0],ticker:[a.Instance],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null}),e.prototype.ranges=function(){var t,e,r,o;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,o=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[o[e],o[r]]},e.prototype.computed_bounds=function(){var t,e,r,o,i,n,s;return i=this.ranges(),r=i[0],t=i[1],s=this.bounds,o=[r.min,r.max],l.isArray(s)?(n=Math.min(s[0],s[1]),e=Math.max(s[0],s[1]),no[1]&&(n=null),e>o[1]?e=o[1]:ex;_=0<=x?++h:--h)if(j[_]!==y&&j[_]!==m||!e){for(a=[],l=[],r=2,g=d=0,k=r;0<=k?dk;g=0<=k?++d:--d)f=i+(o-i)/(r-1)*g,a.push(j[_]),l.push(f);n[c].push(a),n[p].push(l)}return n},e}(n.GuideRenderer)},{\"../renderers/guide_renderer\":\"models/renderers/guide_renderer\",\"../renderers/renderer\":\"models/renderers/renderer\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/grids/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./grid\");r.Grid=o.Grid},{\"./grid\":\"models/grids/grid\"}],\"models/index\":[function(t,e,r){\"use strict\";function o(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),o(t(\"./annotations\")),o(t(\"./axes\")),o(t(\"./callbacks\")),o(t(\"./canvas\")),o(t(\"./formatters\")),o(t(\"./glyphs\")),o(t(\"./grids\")),o(t(\"./layouts\")),o(t(\"./mappers\")),o(t(\"./transforms\")),o(t(\"./markers\")),o(t(\"./plots\")),o(t(\"./ranges\")),o(t(\"./renderers\")),o(t(\"./scales\")),o(t(\"./sources\")),o(t(\"./tickers\")),o(t(\"./tiles\")),o(t(\"./tools\"))},{\"./annotations\":\"models/annotations/index\",\"./axes\":\"models/axes/index\",\"./callbacks\":\"models/callbacks/index\",\"./canvas\":\"models/canvas/index\",\"./formatters\":\"models/formatters/index\",\"./glyphs\":\"models/glyphs/index\",\"./grids\":\"models/grids/index\",\"./layouts\":\"models/layouts/index\",\"./mappers\":\"models/mappers/index\",\"./markers\":\"models/markers/index\",\"./plots\":\"models/plots/index\",\"./ranges\":\"models/ranges/index\",\"./renderers\":\"models/renderers/index\",\"./scales\":\"models/scales/index\",\"./sources\":\"models/sources/index\",\"./tickers\":\"models/tickers/index\",\"./tiles\":\"models/tiles/index\",\"./tools\":\"models/tools/index\",\"./transforms\":\"models/transforms/index\"}],\"models/layouts/box\":[function(t,e,r){\n", " \"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e_;o=1<=_?++n:--n)u=this._info(e[o].get_constrained_variables()),a.span.size&&r.push(s.EQ(a.span.start,a.span.size,[-1,u.span.start])),r.push(s.WEAK_EQ(a.whitespace.after,u.whitespace.before,0-this.spacing)),r.push(s.GE(a.whitespace.after,u.whitespace.before,0-this.spacing)),a=u;return this._horizontal?null!=p.width&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._width])):null!=p.height&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._height])),r=r.concat(this._align_outer_edges_constraints(!0),this._align_outer_edges_constraints(!1),this._align_inner_cell_edges_constraints(),this._box_equal_size_bounds(!0),this._box_equal_size_bounds(!1),this._box_cell_align_bounds(!0),this._box_cell_align_bounds(!1),this._box_whitespace(!0),this._box_whitespace(!1))},e.prototype._child_rect=function(t){return{x:t.origin_x,y:t.origin_y,width:t.width,height:t.height}},e.prototype._span=function(t){return this._horizontal?{start:t.x,size:t.width}:{start:t.y,size:t.height}},e.prototype._info=function(t){var e,r;return r=this._horizontal?{before:t.whitespace_left,after:t.whitespace_right}:{before:t.whitespace_top,after:t.whitespace_bottom},e=this._span(this._child_rect(t)),{span:e,whitespace:r}},e.prototype._flatten_cell_edge_variables=function(t){var r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x;for(w=t?e._top_bottom_inner_cell_edge_variables:e._left_right_inner_cell_edge_variables,r=t!==this._horizontal,l=this.get_layoutable_children(),i=l.length,c={},n=0,_=0,f=l.length;_1?v[1]:\"\",u=this._horizontal?\"row\":\"col\",g=d+\" \"+u+\"-\"+i+\"-\"+n+\"-\"+b):g=h,g in c?c[g]=c[g].concat(x):c[g]=x;n+=1}return c},e.prototype._align_inner_cell_edges_constraints=function(){var t,e,r,o,i,a,l,u;if(t=[],null!=this.document&&n.call(this.document.roots(),this)>=0){e=this._flatten_cell_edge_variables(this._horizontal);for(i in e)if(u=e[i],u.length>1)for(a=u[0],r=o=1,l=u.length;1<=l?ol;r=1<=l?++o:--o)t.push(s.EQ(u[r],[-1,a]))}return t},e.prototype._find_edge_leaves=function(t){var r,o,i,n,s,a,l,u;if(i=this.get_layoutable_children(),a=[[],[]],i.length>0)if(this._horizontal===t)u=i[0],n=i[i.length-1],u instanceof e?a[0]=a[0].concat(u._find_edge_leaves(t)[0]):a[0].push(u),n instanceof e?a[1]=a[1].concat(n._find_edge_leaves(t)[1]):a[1].push(n);else for(s=0,l=i.length;s1){for(r=t[0],o=i=1,n=t.length;1<=n?in;o=1<=n?++i:--i)e=t[o],l.push(s.EQ([-1,r],e));return null}},e(u),e(o),l},e.prototype._box_insets_from_child_insets=function(t,e,r,o){var i,n,a,l,u,c,_,p,h;return c=this._find_edge_leaves(t),p=c[0],n=c[1],t?(h=e+\"_left\",a=e+\"_right\",u=this[r+\"_left\"],l=this[r+\"_right\"]):(h=e+\"_top\",a=e+\"_bottom\",u=this[r+\"_top\"],l=this[r+\"_bottom\"]),_=[],i=function(t,e,r){var i,n,a,l,u;for(i=[],n=0,l=e.length;n0?this.model._width.value-20+\"px\":\"100%\",this.el.style.width=t)},e.prototype.get_height=function(){var t,e,r,o;e=0,o=this.child_views;for(r in o)i.call(o,r)&&(t=o[r],e+=t.el.scrollHeight);return e+20},e.prototype.get_width=function(){var t,e,r,o,n;if(null!=this.model.width)return this.model.width;n=this.el.scrollWidth+20,o=this.child_views;for(r in o)i.call(o,r)&&(t=o[r],e=t.el.scrollWidth,e>n&&(n=e));return n},e}(l.LayoutDOMView),r.WidgetBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"WidgetBox\",e.prototype.default_view=r.WidgetBoxView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),\"fixed\"===this.sizing_mode&&null===this.width&&(this.width=300,n.logger.info(\"WidgetBox mode is fixed, but no width specified. Using default of 300.\")),\"scale_height\"===this.sizing_mode)return n.logger.warn(\"sizing_mode `scale_height` is not experimental for WidgetBox. Please report your results to the bokeh dev team so we can improve.\")},e.prototype.get_edit_variables=function(){var t,r,o,i,n;for(r=e.__super__.get_edit_variables.call(this),n=this.get_layoutable_children(),o=0,i=n.length;o=e.length?this.nan_color:e[n],a.push(r);return a},e}(s.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\"}],\"models/mappers/color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../transforms/transform\"),a=t(\"core/util/types\");r.ColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColorMapper\",e.define({palette:[n.Any],nan_color:[n.Color,\"gray\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._little_endian=this._is_little_endian(),this._palette=this._build_palette(this.palette),this.connect(this.change,function(){return this._palette=this._build_palette(this.palette)})},e.prototype.v_map_screen=function(t,e){var r,o,i,n,s,a,l,u,c;if(null==e&&(e=!1),c=this._get_values(t,this._palette,e),r=new ArrayBuffer(4*t.length),o=new Uint32Array(r),this._little_endian)for(i=n=0,a=t.length;0<=a?na;i=0<=a?++n:--n)u=c[i],o[i]=255<<24|(16711680&u)>>16|65280&u|(255&u)<<16;else for(i=s=0,l=t.length;0<=l?sl;i=0<=l?++s:--s)u=c[i],o[i]=u<<8|255;return r},e.prototype.compute=function(t){return null},e.prototype.v_compute=function(t){var e;return e=this._get_values(t,this.palette)},e.prototype._get_values=function(t,e,r){return null==r&&(r=!1),[]},e.prototype._is_little_endian=function(){var t,e,r,o;return t=new ArrayBuffer(4),r=new Uint8Array(t),e=new Uint32Array(t),e[1]=168496141,o=!0,10===r[4]&&11===r[5]&&12===r[6]&&13===r[7]&&(o=!1),o},e.prototype._build_palette=function(t){var e,r,o,i,n;for(i=new Uint32Array(t.length),e=function(t){return a.isNumber(t)?t:parseInt(t.slice(1),16)},r=o=0,n=t.length;0<=n?on;r=0<=n?++o:--o)i[r]=e(t[r]);return i},e}(s.Transform)},{\"../transforms/transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/mappers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./categorical_color_mapper\");r.CategoricalColorMapper=o.CategoricalColorMapper;var i=t(\"./color_mapper\");r.ColorMapper=i.ColorMapper;var n=t(\"./linear_color_mapper\");r.LinearColorMapper=n.LinearColorMapper;var s=t(\"./log_color_mapper\");r.LogColorMapper=s.LogColorMapper},{\"./categorical_color_mapper\":\"models/mappers/categorical_color_mapper\",\"./color_mapper\":\"models/mappers/color_mapper\",\"./linear_color_mapper\":\"models/mappers/linear_color_mapper\",\"./log_color_mapper\":\"models/mappers/log_color_mapper\"}],\"models/mappers/linear_color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/util/color\"),a=t(\"core/util/array\"),l=t(\"./color_mapper\");r.LinearColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LinearColorMapper\",e.define({high:[n.Number],low:[n.Number],high_color:[n.Color],low_color:[n.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([s.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([s.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([s.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var o,i,n,s,l,u,c,_,p,h,d,f,m,y,g,v;for(null==r&&(r=!1),c=null!=(y=this.low)?y:a.min(t),i=null!=(g=this.high)?g:a.max(t),p=e.length-1,v=[],h=r?this._nan_color:this.nan_color,_=r?this._low_color:this.low_color,n=r?this._high_color:this.high_color,d=1/(i-c),m=1/e.length,s=0,u=t.length;sp?null!=this.high_color?v.push(n):v.push(e[p]):v.push(e[l])):v.push(e[p]);return v},e}(l.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/color\":\"core/util/color\"}],\"models/mappers/log_color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){function r(){this.constructor=t}for(var o in e)s.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(\"core/properties\"),l=t(\"core/util/color\"),u=t(\"core/util/array\"),c=t(\"./color_mapper\");o=null!=(i=Math.log1p)?i:function(t){return Math.log(1+t)},r.LogColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LogColorMapper\",e.define({high:[a.Number],low:[a.Number],high_color:[a.Color],low_color:[a.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([l.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([l.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([l.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,b;for(null==r&&(r=!1),f=e.length,p=null!=(y=this.low)?y:u.min(t),n=null!=(g=this.high)?g:u.max(t),v=f/(o(n)-o(p)),d=e.length-1,b=[],m=r?this._nan_color:this.nan_color,s=r?this._high_color:this.high_color,h=r?this._low_color:this.low_color,a=0,c=t.length;an?null!=this.high_color?b.push(s):b.push(e[d]):i!==n?id&&(l=d),b.push(e[l])):b.push(e[d]);return b},e}(c.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/color\":\"core/util/color\"}],\"models/markers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w=function(t,e){function r(){this.constructor=t}for(var o in e)x.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},x={}.hasOwnProperty,k=t(\"./marker\");o=Math.sqrt(3),l=function(t,e){return t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)},n=function(t,e){return t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)},s=function(t,e){return t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()},a=function(t,e){var r,i;return i=e*o,r=i/3,t.moveTo(-e,r),t.lineTo(e,r),t.lineTo(0,r-i),t.closePath()},u=function(t,e,r,o,i,s,a){var u;u=.65*i,n(t,i),l(t,u),s.doit&&(s.set_vectorize(t,e),t.stroke())},c=function(t,e,r,o,i,s,a){t.arc(0,0,i,0,2*Math.PI,!1),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),n(t,i),t.stroke())},_=function(t,e,r,o,i,n,s){t.arc(0,0,i,0,2*Math.PI,!1),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),l(t,i),t.stroke())},p=function(t,e,r,o,i,s,a){n(t,i),s.doit&&(s.set_vectorize(t,e),t.stroke());\n", " },h=function(t,e,r,o,i,n,a){s(t,i),a.doit&&(a.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},d=function(t,e,r,o,i,a,l){s(t,i),l.doit&&(l.set_vectorize(t,e),t.fill()),a.doit&&(a.set_vectorize(t,e),n(t,i),t.stroke())},f=function(t,e,r,o,i,n,s){t.rotate(Math.PI),a(t,i),t.rotate(-Math.PI),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},m=function(t,e,r,o,i,n,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},y=function(t,e,r,o,i,s,a){var l;l=2*i,t.rect(-i,-i,l,l),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),n(t,i),t.stroke())},g=function(t,e,r,o,i,n,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),l(t,i),t.stroke())},v=function(t,e,r,o,i,n,s){a(t,i),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},b=function(t,e,r,o,i,n,s){l(t,i),n.doit&&(n.set_vectorize(t,e),t.stroke())},i=function(t,e){var r,o;return o=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,t),r.prototype._render_one=e,r}(k.MarkerView),r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,e),r.prototype.default_view=o,r.prototype.type=t,r}(k.Marker)},r.Asterisk=i(\"Asterisk\",u),r.CircleCross=i(\"CircleCross\",c),r.CircleX=i(\"CircleX\",_),r.Cross=i(\"Cross\",p),r.Diamond=i(\"Diamond\",h),r.DiamondCross=i(\"DiamondCross\",d),r.InvertedTriangle=i(\"InvertedTriangle\",f),r.Square=i(\"Square\",m),r.SquareCross=i(\"SquareCross\",y),r.SquareX=i(\"SquareX\",g),r.Triangle=i(\"Triangle\",v),r.X=i(\"X\",b)},{\"./marker\":\"models/markers/marker\"}],\"models/markers/marker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../glyphs/xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\");r.MarkerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_;return l=[n],c={},c[n]=(e+r)/2,_={},_[n]=(o+i)/2,u={},u[n]=.4*Math.min(Math.abs(r-e),Math.abs(i-o)),s={},s[n]=this._angle[n],a={sx:c,sy:_,_size:u,_angle:s},this._render(t,l,a)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_;for(c=r.sx,_=r.sy,i=r._size,o=r._angle,u=[],s=0,a=e.length;se;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],o=n=0,l=e.length;0<=l?nl;o=0<=l?++n:--n)i=e[o],s.point_in_poly(this.sx[o],this.sy[o],_,p)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e}(n.XYGlyphView),r.Marker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.mixins([\"line\",\"fill\"]),e.define({size:[a.DistanceSpec,{units:\"screen\",value:4}],angle:[a.AngleSpec,0]}),e}(n.XYGlyph)},{\"../glyphs/xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/plots/gmap_plot\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/logging\"),s=t(\"./gmap_plot_canvas\"),a=t(\"./plot\"),l=t(\"core/properties\"),u=t(\"../../model\");r.MapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MapOptions\",e.define({lat:[l.Number],lng:[l.Number],zoom:[l.Number,12]}),e}(u.Model),r.GMapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GMapOptions\",e.define({map_type:[l.String,\"roadmap\"],scale_control:[l.Bool,!1],styles:[l.String]}),e}(r.MapOptions),r.GMapPlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(a.PlotView),r.GMapPlot=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GMapPlot\",e.prototype.default_view=r.GMapPlotView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),!this.api_key)return n.logger.error(\"api_key is required. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.\")},e.prototype._init_plot_canvas=function(){return new s.GMapPlotCanvas({plot:this})},e.define({map_options:[l.Instance],api_key:[l.String]}),e}(a.Plot)},{\"../../model\":\"model\",\"./gmap_plot_canvas\":\"models/plots/gmap_plot_canvas\",\"./plot\":\"models/plots/plot\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/plots/gmap_plot_canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"core/util/proj4\"),u=t(\"./plot_canvas\"),c=t(\"core/signaling\");o=new c.Signal(this,\"gmaps_ready\"),i=function(t){var e;return window._bokeh_gmaps_callback=function(){return o.emit()},e=document.createElement(\"script\"),e.type=\"text/javascript\",e.src=\"https://maps.googleapis.com/maps/api/js?key=\"+t+\"&callback=_bokeh_gmaps_callback\",document.body.appendChild(e)},r.GMapPlotCanvasView=function(t){function e(){return this._set_bokeh_ranges=n(this._set_bokeh_ranges,this),this._get_projected_bounds=n(this._get_projected_bounds,this),this._get_latlon_bounds=n(this._get_latlon_bounds,this),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){var r,n;return this.pause(),e.__super__.initialize.call(this,t),this._tiles_loaded=!1,this.zoom_count=0,r=this.model.plot.map_options,this.initial_zoom=r.zoom,this.initial_lat=r.lat,this.initial_lng=r.lng,this.canvas_view.map_el.style.position=\"absolute\",null==(null!=(n=window.google)?n.maps:void 0)&&(null==window._bokeh_gmaps_callback&&i(this.model.plot.api_key),o.connect(function(t){return function(){return t.request_render()}}(this))),this.unpause()},e.prototype.update_range=function(t){var r,o,i,n,s,a,l,u,c;if(null==t)r=this.model.plot.map_options,this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),e.__super__.update_range.call(this,null);else if(null!=t.sdx||null!=t.sdy)this.map.panBy(t.sdx,t.sdy),e.__super__.update_range.call(this,t);else if(null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),e.__super__.update_range.call(this,t),c=t.factor<0?-1:1,i=this.map.getZoom(),o=i+c,o>=2&&(this.map.setZoom(o),u=this._get_projected_bounds(),s=u[0],n=u[1],l=u[2],a=u[3],n-s<0&&this.map.setZoom(i)),this.unpause()}return this._set_bokeh_ranges()},e.prototype._build_map=function(){var t,e,r;return e=window.google.maps,this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID},r=this.model.plot.map_options,t={center:new e.LatLng(r.lat,r.lng),zoom:r.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[r.map_type],scaleControl:r.scale_control},null!=r.styles&&(t.styles=JSON.parse(r.styles)),this.map=new e.Map(this.canvas_view.map_el,t),e.event.addListener(this.map,\"idle\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListener(this.map,\"bounds_changed\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListenerOnce(this.map,\"tilesloaded\",function(t){return function(){return t._render_finished()}}(this)),this.connect(this.model.plot.properties.map_options.change,function(t){return function(){return t._update_options()}}(this)),this.connect(this.model.plot.map_options.properties.styles.change,function(t){return function(){return t._update_styles()}}(this)),this.connect(this.model.plot.map_options.properties.lat.change,function(t){return function(){return t._update_center(\"lat\")}}(this)),this.connect(this.model.plot.map_options.properties.lng.change,function(t){return function(){return t._update_center(\"lng\")}}(this)),this.connect(this.model.plot.map_options.properties.zoom.change,function(t){return function(){return t._update_zoom()}}(this)),this.connect(this.model.plot.map_options.properties.map_type.change,function(t){return function(){return t._update_map_type()}}(this)),this.connect(this.model.plot.map_options.properties.scale_control.change,function(t){return function(){return t._update_scale_control()}}(this))},e.prototype._render_finished=function(){return this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._tiles_loaded===!0},e.prototype._get_latlon_bounds=function(){var t,e,r,o,i,n,s;return e=this.map.getBounds(),r=e.getNorthEast(),t=e.getSouthWest(),i=t.lng(),o=r.lng(),s=t.lat(),n=r.lat(),[i,o,s,n]},e.prototype._get_projected_bounds=function(){var t,e,r,o,i,n,s,a,u,c,_;return i=this._get_latlon_bounds(),u=i[0],a=i[1],_=i[2],c=i[3],n=l.proj4(l.mercator,[u,_]),e=n[0],o=n[1],s=l.proj4(l.mercator,[a,c]),t=s[0],r=s[1],[e,t,o,r]},e.prototype._set_bokeh_ranges=function(){var t,e,r,o,i;return i=this._get_projected_bounds(),e=i[0],t=i[1],o=i[2],r=i[3],this.frame.x_range.setv({start:e,end:t}),this.frame.y_range.setv({start:o,end:r})},e.prototype._update_center=function(t){var e;return e=this.map.getCenter().toJSON(),e[t]=this.model.plot.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){var t;return t=window.google.maps,this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){var t;return t=window.google.maps,this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){return this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){return this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){return this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var r,o,i,n,s;if(o=e[0],n=e[1],s=e[2],r=e[3],this.canvas_view.map_el.style.top=n+\"px\",this.canvas_view.map_el.style.left=o+\"px\",this.canvas_view.map_el.style.width=s+\"px\",this.canvas_view.map_el.style.height=r+\"px\",null==this.map&&null!=(null!=(i=window.google)?i.maps:void 0))return this._build_map()},e.prototype._paint_empty=function(t,e){var r,o,i,n,s,a;return s=this.canvas._width.value,n=this.canvas._height.value,i=e[0],a=e[1],o=e[2],r=e[3],t.clearRect(0,0,s,n),t.beginPath(),t.moveTo(0,0),t.lineTo(0,n),t.lineTo(s,n),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(i,a),t.lineTo(i+o,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r),t.lineTo(i,a),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(u.PlotCanvasView),r.GMapPlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"GMapPlotCanvas\",e.prototype.default_view=r.GMapPlotCanvasView,e.prototype.initialize=function(t,r){return this.use_map=!0,e.__super__.initialize.call(this,t,r)},e}(u.PlotCanvas)},{\"./plot_canvas\":\"models/plots/plot_canvas\",\"core/signaling\":\"core/signaling\",\"core/util/proj4\":\"core/util/proj4\"}],\"models/plots/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./gmap_plot\");r.MapOptions=o.MapOptions;var i=t(\"./gmap_plot\");r.GMapOptions=i.GMapOptions;var n=t(\"./gmap_plot\");r.GMapPlot=n.GMapPlot;var s=t(\"./gmap_plot_canvas\");r.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(\"./plot\");r.Plot=a.Plot;var l=t(\"./plot_canvas\");r.PlotCanvas=l.PlotCanvas},{\"./gmap_plot\":\"models/plots/gmap_plot\",\"./gmap_plot_canvas\":\"models/plots/gmap_plot_canvas\",\"./plot\":\"models/plots/plot\",\"./plot_canvas\":\"models/plots/plot_canvas\"}],\"models/plots/plot\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"core/layout/solver\"),a=t(\"core/logging\"),l=t(\"core/properties\"),u=t(\"core/util/object\"),c=t(\"core/util/types\"),_=t(\"../layouts/layout_dom\"),p=t(\"../annotations/title\"),h=t(\"../scales/linear_scale\"),d=t(\"../tools/toolbar\"),f=t(\"../tools/tool_events\"),m=t(\"./plot_canvas\"),y=t(\"../sources/column_data_source\"),g=t(\"../renderers/glyph_renderer\"),v=t(\"core/bokeh_events\");r.PlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-plot-layout\",e.prototype.connect_signals=function(){var t;return e.__super__.connect_signals.call(this),t=\"Title object cannot be replaced. Try changing properties on title to update it after initialization.\",this.connect(this.model.properties.title.change,function(e){return function(){return a.logger.warn(t)}}(this))},e.prototype.render=function(){var t,r,o;if(e.__super__.render.call(this),\"scale_both\"===this.model.sizing_mode)return r=this.get_width_height(),o=r[0],t=r[1],this.solver.suggest_value(this.model._width,o),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.get_width_height=function(){var t,e,r,o,i,n,s,a,l;return s=this.el.parentNode.clientHeight,a=this.el.parentNode.clientWidth,t=this.model.get_aspect_ratio(),i=a,r=a/t,n=s*t,o=s,i=0},e.prototype.can_redo=function(){return this.state.index=0?l.push(e.selected=t[a.id]):l.push(void 0)):l.push(e.selection_manager.clear()));return l},e.prototype.reset_selection=function(){return this.update_selection(null)},e.prototype._update_ranges_together=function(t){var e,r,o,i,n,s,a,l,u,c;for(c=1,e=0,o=t.length;em.end,r||(y=this._get_weight_to_constrain_interval(m,_),y<1&&(_.start=y*_.start+(1-y)*m.start,_.end=y*_.end+(1-y)*m.end)),null!=m.bounds&&(u=m.bounds[0],l=m.bounds[1],c=Math.abs(_.end-_.start),f?(null!=u&&u>=_.end&&(o=!0,_.end=u,null==e&&null==r||(_.start=u+c)),null!=l&&l<=_.start&&(o=!0,_.start=l,null==e&&null==r||(_.end=l-c))):(null!=u&&u>=_.start&&(o=!0,_.start=u,null==e&&null==r||(_.end=u+c)),null!=l&&l<=_.end&&(o=!0,_.end=l,null==e&&null==r||(_.start=l-c))));if(!r||!o){for(d=[],n=0,a=t.length;n0&&a0&&a>o&&(c=(o-l)/(a-l)),c=Math.max(0,Math.min(1,c))),c},e.prototype.update_range=function(t,e,r){var o,i,n,s,a,l,u;if(this.pause(),null==t){n=this.frame.x_ranges;for(o in n)u=n[o],u.reset();s=this.frame.y_ranges;for(o in s)u=s[o],u.reset();this.update_dataranges()}else{i=[],a=this.frame.x_ranges;for(o in a)u=a[o],i.push([u,t.xrs[o]]);l=this.frame.y_ranges;for(o in l)u=l[o],i.push([u,t.yrs[o]]);r&&this._update_ranges_together(i),this._update_ranges_individually(i,e,r)}return this.unpause()},e.prototype.reset_range=function(){return this.update_range(null)},e.prototype.build_levels=function(){var t,e,r,o,i,n,s,a,l,u,c;for(l=this.model.plot.all_renderers,a=Object.keys(this.renderer_views),s=h.build_views(this.renderer_views,l,this.view_options()),u=j.difference(a,function(){var t,e,r;for(r=[],t=0,e=l.length;to&&(t.interactive=!1),t.request_render()}}(this),o)):(this.interactive=!1,this.lod_started&&(this.model.plot.trigger_event(new f.LODEnd({})),this.lod_started=!1)),n=this.renderer_views;for(r in n)if(s=n[r],null==this.range_update_timestamp||s.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}return this.model.frame._update_scales(),t=this.canvas_view.ctx,t.pixel_ratio=i=this.canvas.pixel_ratio,t.save(),t.scale(i,i),t.translate(.5,.5),e=[this.canvas.vx_to_sx(this.frame._left.value),this.canvas.vy_to_sy(this.frame._top.value),this.frame._width.value,this.frame._height.value],this._map_hook(t,e),this._paint_empty(t,e),this.prepare_webgl(i,e),t.save(),this.visuals.outline_line.doit&&(this.visuals.outline_line.set_value(t),t.strokeRect.apply(t,e)),t.restore(),this._paint_levels(t,[\"image\",\"underlay\",\"glyph\"],e),this.blit_webgl(i),this._paint_levels(t,[\"annotation\"],e),this._paint_levels(t,[\"overlay\"]),null==this.initial_range_info&&this.set_initial_range(),t.restore(),this._has_finished?void 0:(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m;for(t.save(),null!=r&&\"canvas\"===this.model.plot.output_backend&&(t.beginPath(),t.rect.apply(t,r),t.clip()),i={},p=this.model.plot.renderers,o=n=0,a=p.length;n0&&(_=function(){var t,e,r;for(r=[],t=0,e=_.length;t=0&&r.push(u);return r}()),a.logger.debug(\"computed \"+_.length+\" renderers for DataRange1d \"+this.id),r=0,i=_.length;r0?\"log\"===this.scale_hint?((isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(e)||!isFinite(e)||e<=0?.1:e/100,a.logger.warn(\"could not determine minimum data value for log axis, DataRange1d using value \"+t)),(isNaN(e)||!isFinite(e)||e<=0)&&(e=isNaN(t)||!isFinite(t)||t<=0?10:100*t,a.logger.warn(\"could not determine maximum data value for log axis, DataRange1d using value \"+e)),e===t?(d=this.default_span+.001,r=Math.log(t)/Math.log(10)):(\"percent\"===this.range_padding_units?(l=Math.log(t)/Math.log(10),s=Math.log(e)/Math.log(10),d=(s-l)*(1+u)):(l=Math.log(t-u)/Math.log(10),s=Math.log(e+u)/Math.log(10),d=s-l),r=(l+s)/2),c=[Math.pow(10,r-d/2),Math.pow(10,r+d/2)],f=c[0],o=c[1]):(d=e===t?this.default_span:\"percent\"===this.range_padding_units?(e-t)*(1+u):e-t+2*u,r=(e+t)/2,_=[r-d/2,r+d/2],f=_[0],o=_[1]):(p=[t,e],f=p[0],o=p[1]),n=1,this.flipped&&(h=[o,f],f=h[0],o=h[1],n=-1),i=this.follow_interval,null!=i&&Math.abs(f-o)>i&&(\"start\"===this.follow?o=f+n*i:\"end\"===this.follow&&(f=o-n*i)),[f,o]},e.prototype.update=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h;if(!this.have_updated_interactively)return p=this.computed_renderers(),this.plot_bounds[r]=this._compute_plot_bounds(p,t),u=this._compute_min_max(this.plot_bounds,e),a=u[0],s=u[1],c=this._compute_range(a,s),h=c[0],n=c[1],null!=this._initial_start&&(\"log\"===this.scale_hint?this._initial_start>0&&(h=this._initial_start):h=this._initial_start),null!=this._initial_end&&(\"log\"===this.scale_hint?this._initial_end>0&&(n=this._initial_end):n=this._initial_end),_=[this.start,this.end],i=_[0],o=_[1],h===i&&n===o||(l={},h!==i&&(l.start=h),n!==o&&(l.end=n),this.setv(l)),\"auto\"===this.bounds&&this.setv({bounds:[h,n]},{silent:!0}),this.change.emit()},e.prototype.reset=function(){return this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()},e}(n.DataRange)},{\"../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"./data_range\":\"models/ranges/data_range\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/bbox\":\"core/util/bbox\"}],\"models/ranges/factor_range\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./range\"),s=t(\"core/properties\");r.FactorRange=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"FactorRange\",e.define({offset:[s.Number,0],factors:[s.Array,[]],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.internal({_bounds_as_factors:[s.Any],start:[s.Number],end:[s.Number]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),null!=this.bounds&&\"auto\"!==this.bounds?this.setv({_bounds_as_factors:this.bounds},{silent:!0}):this.setv({_bounds_as_factors:this.factors},{silent:!0}),this._init(),this.connect(this.properties.factors.change,function(){return this._update_factors()}),this.connect(this.properties.offset.change,function(){return this._init()})},e.getters({min:function(){return this.start},max:function(){return this.end}}),e.prototype.reset=function(){return this._init(),this.change.emit()},e.prototype._update_factors=function(){return this.setv(\"_bounds_as_factors\",this.factors,{silent:!0}),this._init()},e.prototype._init=function(){var t,e,r;if(e=this.factors,null!=this.bounds&&\"auto\"!==this.bounds&&(e=this._bounds_as_factors,this.setv({factors:e},{silent:!0})),r=.5+this.offset,t=e.length+r,this.setv({start:r,end:t},{silent:!0}),null!=this.bounds)return this.setv({bounds:[r,t]},{silent:!0})},e}(n.Range)},{\"./range\":\"models/ranges/range\",\"core/properties\":\"core/properties\"}],\"models/ranges/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./data_range\");r.DataRange=o.DataRange;var i=t(\"./data_range1d\");r.DataRange1d=i.DataRange1d;var n=t(\"./factor_range\");r.FactorRange=n.FactorRange;var s=t(\"./range\");r.Range=s.Range;var a=t(\"./range1d\");r.Range1d=a.Range1d},{\"./data_range\":\"models/ranges/data_range\",\"./data_range1d\":\"models/ranges/data_range1d\",\"./factor_range\":\"models/ranges/factor_range\",\"./range\":\"models/ranges/range\",\"./range1d\":\"models/ranges/range1d\"}],\"models/ranges/range\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\");r.Range=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Range\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.change,function(){var t;return null!=(t=this.callback)?t.execute(this):void 0})},e.define({callback:[s.Instance]}),e.internal({plots:[s.Array,[]]}),e.prototype.reset=function(){return this.change.emit()},e}(n.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/ranges/range1d\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./range\"),s=t(\"core/properties\");r.Range1d=function(t){function e(){var t,r;return this instanceof e?e.__super__.constructor.apply(this,arguments):(r=arguments[0],t=arguments[1],new e({start:r,end:t}))}return o(e,t),e.prototype.type=\"Range1d\",e.define({start:[s.Number,0],end:[s.Number,1],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.prototype._set_auto_bounds=function(){var t,e;if(\"auto\"===this.bounds)return e=Math.min(this._initial_start,this._initial_end),t=Math.max(this._initial_start,this._initial_end),this.setv({bounds:[e,t]},{silent:!0})},e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._initial_start=this.start,this._initial_end=this.end,this._set_auto_bounds()},e.getters({min:function(){return Math.min(this.start,this.end)},max:function(){return Math.max(this.start,this.end)}}),e.prototype.reset=function(){return this._set_auto_bounds(),this.start!==this._initial_start||this.end!==this._initial_end?this.setv({start:this._initial_start,end:this._initial_end}):this.change.emit()},e}(n.Range)},{\"./range\":\"models/ranges/range\",\"core/properties\":\"core/properties\"}],\"models/renderers/glyph_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e=0,l=n.call(r.mixins,\"line\")>=0,i=_.clone(r.attributes),delete i.id,c=function(t){var e;return e=_.clone(i),s&&_.extend(e,t.fill),l&&_.extend(e,t.line),new r.constructor(e)},this.glyph=this.build_glyph_view(r),d=this.model.selection_glyph,null==d?d=c({fill:{},line:{}}):\"auto\"===d&&(d=c(this.model.selection_defaults)),this.selection_glyph=this.build_glyph_view(d),h=this.model.nonselection_glyph,null==h?h=c({fill:{},line:{}}):\"auto\"===h&&(h=c(this.model.nonselection_defaults)),this.nonselection_glyph=this.build_glyph_view(h),u=this.model.hover_glyph,null!=u&&(this.hover_glyph=this.build_glyph_view(u)),p=this.model.muted_glyph,null!=p&&(this.muted_glyph=this.build_glyph_view(p)),o=c(this.model.decimated_defaults),this.decimated_glyph=this.build_glyph_view(o),this.xscale=this.plot_view.frame.xscales[this.model.x_range_name],this.yscale=this.plot_view.frame.yscales[this.model.y_range_name],this.set_data(!1),this.model.data_source instanceof a.RemoteDataSource)return this.model.data_source.setup(this.plot_view,this.glyph)},e.getters({xmapper:function(){return log.warning(\"xmapper attr is deprecated, use xscale\"),this.xscale},ymapper:function(){return log.warning(\"ymapper attr is deprecated, use yscale\"),this.yscale}}),e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this,plot_view:this.plot_view,parent:this})},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()}),this.connect(this.model.data_source.change,function(){return this.set_data()}),this.connect(this.model.data_source.streaming,function(){return this.set_data()}),this.connect(this.model.data_source.patching,function(t){return this.set_data(!0,t)}),this.connect(this.model.data_source.select,function(){return this.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return this.request_render()}),this.connect(this.model.glyph.transformchange,function(){return this.set_data()}),this.connect(this.model.glyph.propchange,function(){return this.glyph.set_visuals(this.model.data_source),this.request_render()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){var r,o,i,n,s,a,u,c,_;for(null==t&&(t=!0),_=Date.now(),c=this.model.data_source,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(c,e),this.glyph.set_visuals(c),this.decimated_glyph.set_visuals(c),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(c),this.nonselection_glyph.set_visuals(c)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(c),null!=this.muted_glyph&&this.muted_glyph.set_visuals(c),n=c.get_length(),null==n&&(n=1),this.all_indices=function(){u=[];for(var t=0;0<=n?tn;0<=n?t++:t--)u.push(t);return u}.apply(this),s=this.plot_model.plot.lod_factor,this.decimated=[],o=i=0,a=Math.floor(this.all_indices.length/s);0<=a?ia;o=0<=a?++i:--i)this.decimated.push(this.all_indices[o*s]);if(r=Date.now()-_,l.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): set_data finished in \"+r+\"ms\"),this.set_data_timestamp=Date.now(),t)return this.request_render()},e.prototype.render=function(){var t,e,r,o,i,n,s,a,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S;if(this.model.visible){if(k=Date.now(),s=this.glyph.glglyph,M=Date.now(),this.glyph.map_data(),e=Date.now()-k,j=Date.now(),_=this.glyph.mask_data(this.all_indices),r=Date.now()-j,t=this.plot_view.canvas_view.ctx,t.save(),b=this.model.data_source.selected,b=b&&0!==b.length?b[\"0d\"].glyph?_:b[\"1d\"].indices.length>0?b[\"1d\"].indices:[]:[],p=this.model.data_source.inspected,p=p&&0!==p.length?p[\"0d\"].glyph?_:p[\"1d\"].indices.length>0?p[\"1d\"].indices:[]:[],y=this.plot_model.plot.lod_threshold,this.plot_view.interactive&&!s&&null!=y&&this.all_indices.length>y?(_=this.decimated,a=this.decimated_glyph,v=this.decimated_glyph,x=this.selection_glyph):(a=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,v=this.nonselection_glyph,x=this.selection_glyph),null!=this.hover_glyph&&p.length&&(_=c.difference(_,p)),b.length&&this.have_selection_glyphs()){for(S=Date.now(),w={},h=0,f=b.length;h0&&(i=o))),i},e.prototype.hit_test_helper=function(t,e){return this.visible?e.hit_test(t):null},e.define({x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],data_source:[u.Instance],glyph:[u.Instance],hover_glyph:[u.Instance],nonselection_glyph:[u.Any,\"auto\"],selection_glyph:[u.Any,\"auto\"],muted_glyph:[u.Instance],muted:[u.Bool,!1]}),e.override({level:\"glyph\"}),e.prototype.selection_defaults={fill:{},line:{}},e.prototype.decimated_defaults={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},e.prototype.nonselection_defaults={\n", " fill:{fill_alpha:.2,line_alpha:.2},line:{}},e}(s.Renderer)},{\"../sources/remote_data_source\":\"models/sources/remote_data_source\",\"./renderer\":\"models/renderers/renderer\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\"}],\"models/renderers/guide_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./renderer\"),s=t(\"core/properties\");r.GuideRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GuideRenderer\",e.define({plot:[s.Instance]}),e.override({level:\"overlay\"}),e}(n.Renderer)},{\"./renderer\":\"models/renderers/renderer\",\"core/properties\":\"core/properties\"}],\"models/renderers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./glyph_renderer\");r.GlyphRenderer=o.GlyphRenderer;var i=t(\"./guide_renderer\");r.GuideRenderer=i.GuideRenderer;var n=t(\"./renderer\");r.Renderer=n.Renderer},{\"./glyph_renderer\":\"models/renderers/glyph_renderer\",\"./guide_renderer\":\"models/renderers/guide_renderer\",\"./renderer\":\"models/renderers/renderer\"}],\"models/renderers/renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/dom_view\"),s=t(\"core/visuals\"),a=t(\"core/properties\"),l=t(\"core/util/projections\"),u=t(\"core/util/object\"),c=t(\"../../model\");r.RendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view,this.visuals=new s.Visuals(this.model),this._has_finished=!0},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.request_render=function(){return this.plot_view.request_render()},e.prototype.set_data=function(t){var e,r,o;if(e=this.model.materialize_dataspecs(t),u.extend(this,e),this.plot_model.use_map&&(null!=this._x&&(r=l.project_xy(this._x,this._y),this._x=r[0],this._y=r[1]),null!=this._xs))return o=l.project_xsys(this._xs,this._ys),this._xs=o[0],this._ys=o[1],o},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e}(n.DOMView),r.Renderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Renderer\",e.define({level:[a.RenderLevel,null],visible:[a.Bool,!0]}),e}(c.Model)},{\"../../model\":\"model\",\"core/dom_view\":\"core/dom_view\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\",\"core/util/projections\":\"core/util/projections\",\"core/visuals\":\"core/visuals\"}],\"models/scales/categorical_scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./linear_scale\"),s=t(\"core/util/types\");r.CategoricalScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalScale\",e.prototype.compute=function(t,r){var o,i,n,a,l,u;return null==r&&(r=!1),s.isNumber(t)?r?t:e.__super__.compute.call(this,t):(a=this.source_range,i=a.factors,t.indexOf(\":\")>=0?(l=t.split(\":\"),o=l[0],n=l[1],n=parseFloat(n),u=i.indexOf(o)+.5+a.offset+n):u=i.indexOf(t)+1+a.offset,r?u:e.__super__.compute.call(this,u))},e.prototype.v_compute=function(t,r){var o,i,n,a,l,u,c,_,p,h;if(null==r&&(r=!1),s.isNumber(t[0]))return r?t:e.__super__.v_compute.call(this,t);for(u=this.source_range,i=u.factors,p=Array(t.length),n=a=0,c=t.length;0<=c?ac;n=0<=c?++a:--a)h=t[n],h.indexOf(\":\")>=0?(_=h.split(\":\"),o=_[0],l=_[1],l=parseFloat(l),p[n]=i.indexOf(o)+.5+u.offset+l):p[n]=i.indexOf(h)+1+u.offset;return r?p:e.__super__.v_compute.call(this,p)},e.prototype.invert=function(t,r){var o,i;return null==r&&(r=!1),t=e.__super__.invert.call(this,t),r?t:(i=this.source_range,o=i.factors,o[Math.floor(t-.5-i.offset)])},e.prototype.v_invert=function(t,r){var o,i,n,s,a,l,u,c,_;for(null==r&&(r=!1),_=e.__super__.v_invert.call(this,t),i=n=0,l=_.length;0<=l?nl;i=0<=l?++n:--n)_[i]=_[i];if(r)return _;for(c=Array(_),a=this.source_range,o=a.factors,i=s=0,u=t.length;0<=u?su;i=0<=u?++s:--s)c[i]=o[Math.floor(_[i]-.5-a.offset)];return c},e}(n.LinearScale)},{\"./linear_scale\":\"models/scales/linear_scale\",\"core/util/types\":\"core/util/types\"}],\"models/scales/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./categorical_scale\");r.CategoricalScale=o.CategoricalScale;var i=t(\"./linear_scale\");r.LinearScale=i.LinearScale;var n=t(\"./log_scale\");r.LogScale=n.LogScale;var s=t(\"./scale\");r.Scale=s.Scale},{\"./categorical_scale\":\"models/scales/categorical_scale\",\"./linear_scale\":\"models/scales/linear_scale\",\"./log_scale\":\"models/scales/log_scale\",\"./scale\":\"models/scales/scale\"}],\"models/scales/linear_scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./scale\"),s=t(\"core/properties\");r.LinearScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LinearScale\",e.prototype.compute=function(t){var e,r,o;return o=this._compute_state(),e=o[0],r=o[1],e*t+r},e.prototype.v_compute=function(t){var e,r,o,i,n,s,a,l;for(s=this._compute_state(),e=s[0],n=s[1],a=new Float64Array(t.length),o=r=0,i=t.length;rc;o=0<=c?++s:--s)p[o]=0;else for(o=a=0,_=t.length;0<=_?a<_:a>_;o=0<=_?++a:--a)e=(Math.log(t[o])-n)/i,h=isFinite(e)?e*r+l:NaN,p[o]=h;return p},e.prototype.invert=function(t){var e,r,o,i,n,s;return n=this._compute_state(),e=n[0],i=n[1],r=n[2],o=n[3],s=(t-i)/e,Math.exp(r*s+o)},e.prototype.v_invert=function(t){var e,r,o,i,n,s,a,l,u,c;for(a=this._compute_state(),e=a[0],s=a[1],o=a[2],i=a[3],u=new Float64Array(t.length),r=n=0,l=t.length;0<=l?nl;r=0<=l?++n:--n)c=(t[r]-s)/e,u[r]=Math.exp(o*c+i);return u},e.prototype._get_safe_factor=function(t,e){var r,o,i,n;return n=t<0?0:t,r=e<0?0:e,n===r&&(0===n?(i=[1,10],n=i[0],r=i[1]):(o=Math.log(n)/Math.log(10),n=Math.pow(10,Math.floor(o)),r=Math.ceil(o)!==Math.floor(o)?Math.pow(10,Math.ceil(o)):Math.pow(10,Math.ceil(o)+1))),[n,r]},e.prototype._compute_state=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return l=this.source_range.start,a=this.source_range.end,_=this.target_range.start,c=this.target_range.end,s=c-_,n=this._get_safe_factor(l,a),u=n[0],t=n[1],0===u?(r=Math.log(t),o=0):(r=Math.log(t)-Math.log(u),o=Math.log(u)),e=s,i=_,[e,i,r,o]},e.internal({source_range:[s.Any],target_range:[s.Any]}),e}(n.Scale)},{\"./scale\":\"models/scales/scale\",\"core/properties\":\"core/properties\"}],\"models/scales/scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"../transforms\");r.Scale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.map_to_target=function(){var t,e;return e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],this.compute.apply(this,[e].concat(n.call(t)))},e.prototype.v_map_to_target=function(){var t,e;return e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],this.v_compute.apply(this,[e].concat(n.call(t)))},e.prototype.map_from_target=function(t){return this.invert(t)},e.prototype.v_map_from_target=function(t){return this.v_invert(t)},e}(s.Transform)},{\"../transforms\":\"models/transforms/index\"}],\"models/sources/ajax_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./remote_data_source\"),a=t(\"core/logging\"),l=t(\"core/properties\");r.AjaxDataSource=function(t){function e(){return this.get_data=o(this.get_data,this),this.setup=o(this.setup,this),this.destroy=o(this.destroy,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"AjaxDataSource\",e.define({mode:[l.String,\"replace\"],content_type:[l.String,\"application/json\"],http_headers:[l.Any,{}],max_size:[l.Number],method:[l.String,\"POST\"],if_modified:[l.Bool,!1]}),e.prototype.destroy=function(){if(null!=this.interval)return clearInterval(this.interval)},e.prototype.setup=function(t,e){if(this.pv=t,this.get_data(this.mode),this.polling_interval)return this.interval=setInterval(this.get_data,this.polling_interval,this.mode,this.max_size,this.if_modified)},e.prototype.get_data=function(t,e,r){var o,i,n,s;null==e&&(e=0),null==r&&(r=!1),s=new XMLHttpRequest,s.open(this.method,this.data_url,!0),s.withCredentials=!1,s.setRequestHeader(\"Content-Type\",this.content_type),i=this.http_headers;for(o in i)n=i[o],s.setRequestHeader(o,n);return s.addEventListener(\"load\",function(r){return function(){var o,i,n,a,l,u;if(200===s.status)switch(i=JSON.parse(s.responseText),t){case\"replace\":return r.data=i;case\"append\":for(l=r.data,u=r.columns(),n=0,a=u.length;no&&(t=t.slice(-o)),t;if(h=t.length+e.length,null!=o&&h>o){for(_=h-o,i=t.length,t.lengthu;n=l<=u?++s:--s)t[n-_]=t[n];for(n=a=0,c=e.length;0<=c?ac;n=0<=c?++a:--a)t[n+(i-_)]=e[n];return t}return p=new t.constructor(e),r.concat_typed_arrays(t,p)},r.slice=function(t,e){var r,o,i,n,s,a,l;return c.isObject(t)?[null!=(r=t.start)?r:0,null!=(o=t.stop)?o:e,null!=(i=t.step)?i:1]:(n=[t,t+1,1],s=n[0],l=n[1],a=n[2],n)},r.patch_to_column=function(t,e,o){var i,n,s,a,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C;for(w=new l.Set,x=!1,y=0,g=e.length;y0?vS;n=v+=O)for(h=b=P=d,A=m,E=f;E>0?bA;h=b+=E)x&&w.push(h),p[n*z[1]+h]=C[i],i++;return w},r.ColumnDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColumnDataSource\",e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),r=u.decode_column_data(this.data),this.data=r[0],this._shapes=r[1],r},e.define({data:[a.Any,{}]}),e.prototype.attributes_as_json=function(t,r){var o,n,s,a;null==t&&(t=!0),null==r&&(r=e._value_to_json),o={},s=this.serializable_attributes();for(n in s)i.call(s,n)&&(a=s[n],\"data\"===n&&(a=u.encode_column_data(a,this._shapes)),t?o[n]=a:n in this._set_after_defaults&&(o[n]=a));return r(\"attributes\",o,this)},e._value_to_json=function(t,e,r){return c.isObject(e)&&\"data\"===t?u.encode_column_data(e,r._shapes):s.HasProps._value_to_json(t,e,r)},e.prototype.stream=function(t,e){var o,i,n;o=this.data;for(i in t)n=t[i],o[i]=r.stream_to_column(o[i],t[i],e);return this.setv(\"data\",o,{silent:!0}),this.streaming.emit()},e.prototype.patch=function(t){var e,o,i,n;e=this.data,n=new l.Set;for(o in t)i=t[o],n=n.union(r.patch_to_column(e[o],i,this._shapes[o]));return this.setv(\"data\",e,{silent:!0}),this.patching.emit(n.values)},e}(n.ColumnarDataSource)},{\"./columnar_data_source\":\"models/sources/columnar_data_source\",\"core/has_props\":\"core/has_props\",\"core/properties\":\"core/properties\",\"core/util/data_structures\":\"core/util/data_structures\",\"core/util/serialization\":\"core/util/serialization\",\"core/util/types\":\"core/util/types\"}],\"models/sources/columnar_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./data_source\"),s=t(\"core/signaling\"),a=t(\"core/logging\"),l=t(\"core/selection_manager\"),u=t(\"core/properties\"),c=t(\"core/util/array\");r.ColumnarDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColumnarDataSource\",e.define({column_names:[u.Array,[]]}),e.internal({selection_manager:[u.Instance,function(t){return new l.SelectionManager({source:t})}],inspected:[u.Any],_shapes:[u.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.select=new s.Signal(this,\"select\"),this.inspect=new s.Signal(this,\"inspect\"),this.streaming=new s.Signal(this,\"streaming\"),this.patching=new s.Signal(this,\"patching\")},e.prototype.get_column=function(t){var e;return null!=(e=this.data[t])?e:null},e.prototype.columns=function(){return Object.keys(this.data)},e.prototype.get_length=function(t){var e,r,o,i;switch(null==t&&(t=!0),r=c.uniq(function(){var t,r;t=this.data,r=[];for(e in t)i=t[e],r.push(i.length);return r}.call(this)),r.length){case 0:return null;case 1:return r[0];default:if(o=\"data source has columns of inconsistent lengths\",t)return a.logger.warn(o),r.sort()[0];throw new Error(o)}},e}(n.DataSource)},{\"./data_source\":\"models/sources/data_source\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/selection_manager\":\"core/selection_manager\",\"core/signaling\":\"core/signaling\",\"core/util/array\":\"core/util/array\"}],\"models/sources/data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/hittest\"),a=t(\"core/properties\"),l=t(\"core/util/types\");r.DataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"DataSource\",e.define({selected:[a.Any,s.create_hit_test_result()],callback:[a.Any]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.properties.selected.change,function(t){return function(){var e;if(e=t.callback,null!=e)return l.isFunction(e)?e(t):e.execute(t)}}(this))},e}(n.Model)},{\"../../model\":\"model\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/sources/geojson_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./columnar_data_source\"),s=t(\"core/logging\"),a=t(\"core/properties\");r.GeoJSONDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GeoJSONDataSource\",e.define({geojson:[a.Any]}),e.internal({data:[a.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._update_data(),this.connect(this.properties.geojson.change,function(t){return function(){return t._update_data()}}(this))},e.prototype._update_data=function(){return this.data=this.geojson_to_column_data()},e.prototype._get_new_list_array=function(t){var e,r,o,i;for(i=[],e=r=0,o=t;0<=o?ro;e=0<=o?++r:--r)i.push([]);return i},e.prototype._get_new_nan_array=function(t){var e,r,o,i;for(i=[],e=r=0,o=t;0<=o?ro;e=0<=o?++r:--r)i.push(NaN);return i},e.prototype._flatten_function=function(t,e){return t.concat([[NaN,NaN,NaN]]).concat(e)},e.prototype._add_properties=function(t,e,r,o){var i,n;n=[];for(i in t.properties)e.hasOwnProperty(i)||(e[i]=this._get_new_nan_array(o)),n.push(e[i][r]=t.properties[i]);return n},e.prototype._add_geometry=function(t,e,r){var o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A;switch(t.type){case\"Point\":return i=t.coordinates,e.x[r]=i[0],e.y[r]=i[1],e.z[r]=null!=(w=i[2])?w:NaN;case\"LineString\":for(o=t.coordinates,S=[],u=c=0,p=o.length;c1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),n=t.coordinates[0],O=[],u=_=0,h=n.length;_1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),a.push(b[0]);for(l=a.reduce(this._flatten_function),A=[],u=v=0,m=l.length;v_;a=0<=_?++u:--u)l=a+r.offset,l+1>t&&l+1n)break;return o},r.DaysTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"DaysTicker\",e.define({days:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,n;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,r),i=this.days,n=i.length>1?(i[1]-i[0])*o:31*o,this.interval=n},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var s,a,l,u,c,_,h,d,f;return d=n(t,e),c=this.days,_=function(t){return function(t,e){var r,o,n,s,a,l;for(r=[],a=0,l=c.length;a0&&D.length>0){for(j=_/P,T=function(){var t,e,r;for(r=[],c=t=0,e=P;0<=e?te;c=0<=e?++t:--t)r.push(c*j);return r}(),E=T.slice(1,+T.length+1||9e9),p=0,f=E.length;p0&&D.length>0){for(j=Math.pow(i,_)/P,T=function(){var t,e,r;for(r=[],c=t=1,e=P;1<=e?t<=e:t>=e;c=1<=e?++t:--t)r.push(c*j);return r}(),M=0,g=T.length;Mn)break;return o},r.MonthsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"MonthsTicker\",e.define({months:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,n;return e.__super__.initialize.call(this,t,r),n=this.months,i=n.length>1?(n[1]-n[0])*o:12*o,this.interval=i},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var s,a,l,u,c,_,h,d;return d=n(t,e),c=this.months,_=function(t){return c.map(function(e){var r;return r=i(t),r.setUTCMonth(e),r})},u=p.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t0&&M.length>0){for(y=c/b,g=function(){var t,e,r;for(r=[],u=t=0,e=b;0<=e?te;u=0<=e?++t:--t)r.push(u*y);return r}(),w=g.slice(1,+g.length+1||9e9),_=0,d=w.length;_50))return t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}()},{}],\"models/tiles/image_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../../model\");r.ImageSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return o(e,t),e.prototype.type=\"ImageSource\",e.define({url:[n.String,\"\"],extra_url_vars:[n.Any,{}]}),e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),t=t.replace(\"{height}\",\"{HEIGHT}\"),t=t.replace(\"{width}\",\"{WIDTH}\"),this.url=t},e.prototype.string_lookup_replace=function(t,e){var r,o,i;o=t;for(r in e)i=e[r],o=o.replace(\"{\"+r+\"}\",i.toString());return o},e.prototype.add_image=function(t){return this.images[t.cache_key]=t},e.prototype.remove_image=function(t){return delete this.images[t.cache_key]},e.prototype.get_image_url=function(t,e,r,o,i,n){var s;return s=this.string_lookup_replace(this.url,this.extra_url_vars),s.replace(\"{XMIN}\",t).replace(\"{YMIN}\",e).replace(\"{XMAX}\",r).replace(\"{YMAX}\",o).replace(\"{WIDTH}\",n).replace(\"{HEIGHT}\",i)},e}(s.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/tiles/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./bbox_tile_source\");r.BBoxTileSource=o.BBoxTileSource;var i=t(\"./dynamic_image_renderer\");r.DynamicImageRenderer=i.DynamicImageRenderer;var n=t(\"./image_source\");r.ImageSource=n.ImageSource;var s=t(\"./mercator_tile_source\");r.MercatorTileSource=s.MercatorTileSource;var a=t(\"./quadkey_tile_source\");r.QUADKEYTileSource=a.QUADKEYTileSource;var l=t(\"./tile_renderer\");r.TileRenderer=l.TileRenderer;var u=t(\"./tile_source\");r.TileSource=u.TileSource;var c=t(\"./tms_tile_source\");r.TMSTileSource=c.TMSTileSource;var _=t(\"./wmts_tile_source\");r.WMTSTileSource=_.WMTSTileSource},{\"./bbox_tile_source\":\"models/tiles/bbox_tile_source\",\"./dynamic_image_renderer\":\"models/tiles/dynamic_image_renderer\",\"./image_source\":\"models/tiles/image_source\",\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\",\"./quadkey_tile_source\":\"models/tiles/quadkey_tile_source\",\"./tile_renderer\":\"models/tiles/tile_renderer\",\"./tile_source\":\"models/tiles/tile_source\",\"./tms_tile_source\":\"models/tiles/tms_tile_source\",\"./wmts_tile_source\":\"models/tiles/wmts_tile_source\"}],\"models/tiles/mercator_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e=Math.pow(2,r)))&&!(e<0||e>=Math.pow(2,r))},e.prototype.retain_children=function(t){var e,r,o,i,n,s,a;i=t.quadkey,o=i.length,r=o+3,n=this.tiles,s=[];for(e in n)a=n[e],0===a.quadkey.indexOf(i)&&a.quadkey.length>o&&a.quadkey.length<=r?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,r,o,i,s,a,l,u,c,_,p,h,d,f,m;r=4,s=t.tile_coords,p=s[0],h=s[1],d=s[2],o=function(){var t,e,o,i;for(i=[],f=t=e=p-r,o=p+r;e<=o?t<=o:t>=o;f=e<=o?++t:--t)i.push(f);return i}(),i=function(){var t,e,o,i;for(i=[],m=t=e=h-r,o=h+r;e<=o?t<=o:t>=o;m=e<=o?++t:--t)i.push(m);return i}(),a=this.tiles,c=[];for(e in a)_=a[e],_.tile_coords[2]===d&&(l=_.tile_coords[0],n.call(o,l)>=0)&&(u=_.tile_coords[1],n.call(i,u)>=0)?c.push(_.retain=!0):c.push(void 0);return c},e.prototype.retain_parents=function(t){var e,r,o,i,n;r=t.quadkey,o=this.tiles,i=[];for(e in o)n=o[e],i.push(n.retain=0===r.indexOf(n.quadkey));return i},e.prototype.children_by_tile_xyz=function(t,e,r){var o,i,n,s,a,l,u,c,_;for(_=this.calculate_world_x_by_tile_xyz(t,e,r),0!==_&&(l=this.normalize_xyz(t,e,r),t=l[0],e=l[1],r=l[2]),a=this.tile_xyz_to_quadkey(t,e,r),i=[],n=s=0;s<=3;n=s+=1)u=this.quadkey_to_tile_xyz(a+n.toString()),t=u[0],e=u[1],r=u[2],0!==_&&(c=this.denormalize_xyz(t,e,r,_),t=c[0],e=c[1],r=c[2]),o=this.get_tile_meter_bounds(t,e,r),null!=o&&i.push([t,e,r,o]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var o,i;return i=this.tile_xyz_to_quadkey(t,e,r),o=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(o)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,r){var o,i;return o=(t[2]-t[0])/r,i=(t[3]-t[1])/e,[o,i]},e.prototype.get_level_by_extent=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=(t[2]-t[0])/r,c=(t[3]-t[1])/e,l=Math.max(u,c),o=0,a=this._resolutions,i=0,n=a.length;is){if(0===o)return 0;if(o>0)return o-1}o+=1}},e.prototype.get_closest_level_by_extent=function(t,e,r){var o,i,n,s,a;return s=(t[2]-t[0])/r,a=(t[3]-t[1])/e,i=Math.max(s,a),n=this._resolutions,o=this._resolutions.reduce(function(t,e){return Math.abs(e-i)=l;f=o+=-1)for(p=i=u=d,c=h;i<=c;p=i+=1)this.is_valid_tile(p,f,e)&&_.push([p,f,e,this.get_tile_meter_bounds(p,f,e)]);return _=this.sort_tiles_from_center(_,[d,y,h,m])},e.prototype.quadkey_to_tile_xyz=function(t){\"Computes tile x, y and z values based on quadKey.\";var e,r,o,i,n,s,a,l;for(n=0,s=0,a=t.length,e=r=i=a;r>0;e=r+=-1)switch(l=t.charAt(a-e),o=1<0;i=n+=-1)o=0,s=1<0;)if(o=o.substring(0,o.length-1),n=this.quadkey_to_tile_xyz(o),t=n[0],e=n[1],r=n[2],s=this.denormalize_xyz(t,e,r,a),t=s[0],e=s[1],r=s[2],this.tile_xyz_to_key(t,e,r)in this.tiles)return[t,e,r];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,r){var o;return this.wrap_around?(o=Math.pow(2,r),[(t%o+o)%o,e,r]):[t,e,r]},e.prototype.denormalize_xyz=function(t,e,r,o){return[t+o*Math.pow(2,r),e,r]},e.prototype.denormalize_meters=function(t,e,r,o){return[t+2*o*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,r){return Math.floor(t/Math.pow(2,r))},e}(s.TileSource)},{\"./tile_source\":\"models/tiles/tile_source\",\"core/properties\":\"core/properties\"}],\"models/tiles/quadkey_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./mercator_tile_source\");r.QUADKEYTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"QUADKEYTileSource\",e.prototype.get_image_url=function(t,e,r){var o,i,n;return o=this.string_lookup_replace(this.url,this.extra_url_vars),n=this.tms_to_wmts(t,e,r),t=n[0],e=n[1],r=n[2],i=this.tile_xyz_to_quadkey(t,e,r),o.replace(\"{Q}\",i)},e}(n.MercatorTileSource)},{\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\"}],\"models/tiles/tile_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e0)return null==this.attributionEl&&(e=this.map_plot.outline_line_width,r=this.map_plot.min_border_bottom+e,n=this.map_frame._right.value-this.map_frame._width.value,o=this.map_frame._width.value-e,this.attributionEl=c.div({\"class\":\"bk-tile-attribution\",style:{position:\"absolute\",bottom:r+\"px\",right:n+\"px\",\"max-width\":o+\"px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}}),i=this.plot_view.canvas_view.events_el,i.appendChild(this.attributionEl)),this.attributionEl.innerHTML=t},e.prototype._map_data=function(){var t,e;return this.initial_extent=this.get_extent(),e=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),t=this.model.tile_source.snap_to_zoom(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,e),this.x_range.start=t[0],this.y_range.start=t[1],this.x_range.end=t[2],this.y_range.end=t[3],this._add_attribution()},e.prototype._on_tile_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.current=!0,e.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.loaded=!0,e.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){var e;return e=t.target.tile_data,e.finished=!0},e.prototype._create_tile=function(t,e,r,o,i){var n,s,a;return null==i&&(i=!1),n=this.model.tile_source.normalize_xyz(t,e,r),a=this.pool.pop(),i?a.onload=this._on_tile_cache_load:a.onload=this._on_tile_load,a.onerror=this._on_tile_error,a.alt=\"\",a.tile_data={tile_coords:[t,e,r],normalized_coords:n,quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,r),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,r),bounds:o,loaded:!1,finished:!1,x_coord:o[0],y_coord:o[3]},this.model.tile_source.tiles[a.tile_data.cache_key]=a.tile_data,a.src=(s=this.model.tile_source).get_image_url.apply(s,n),this._tiles.push(a),a},e.prototype._enforce_aspect_ratio=function(){var t,e,r;return(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value)&&(t=this.get_extent(),\n", " r=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom(t,this.map_frame._height.value,this.map_frame._width.value,r),this.x_range.setv({start:e[0],end:e[2]}),this.y_range.setv({start:e[1],end:e[3]}),this.extent=e,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0)},e.prototype.has_finished=function(){var t,r,o,i;if(!e.__super__.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(o=this._tiles,t=0,r=o.length;tv&&(c=this.extent,B=v,P=!0),P&&(this.x_range.setv({x_range:{start:c[0],end:c[2]}}),this.y_range.setv({start:c[1],end:c[3]}),this.extent=c),this.extent=c,C=z.get_tiles_by_extent(c,B),M=[],w=[],r=[],n=[],p=0,m=C.length;p=o?(u=[1,h/o],v=u[0],b=u[1]):(c=[o/h,1],v=c[0],b=c[1]),t[0]<=e[0]?(l=t[0],_=t[0]+y*v,_>s&&(_=s)):(_=t[0],l=t[0]-y*v,ld&&(p=d)):(p=t[1],i=t[1]-y/o,io.end&&(a=o.end),as.end&&(l=s.end),lo.end)&&(this.v_axis_only=!0),(si.end)&&(this.h_axis_only=!0)),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan=function(t){return this._update(t.deltaX,-t.deltaY),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan_end=function(t){if(this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info)return this.plot_view.push_state(\"pan\",{range:this.pan_info})},e.prototype._update=function(t,e){var r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O;i=this.plot_view.frame,l=t-this.last_dx,u=e-this.last_dy,n=i.h_range,w=n.start-l,b=n.end-l,T=i.v_range,j=T.start-u,M=T.end-u,r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||this.v_axis_only?(g=n.start,v=n.end,f=0):(g=w,v=b,f=-l),\"height\"!==r&&\"both\"!==r||this.h_axis_only?(x=T.start,k=T.end,m=0):(x=j,k=M,m=u),this.last_dx=t,this.last_dy=e,S={},c=i.xscales;for(a in c)d=c[a],_=d.v_invert([g,v],!0),y=_[0],o=_[1],S[a]={start:y,end:o};O={},p=i.yscales;for(a in p)d=p[a],h=d.v_invert([x,k],!0),y=h[0],o=h[1],O[a]={start:y,end:o};return this.pan_info={xrs:S,yrs:O,sdx:f,sdy:m},this.plot_view.update_range(this.pan_info,s=!0),null},e}(n.GestureToolView),r.PanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PanToolView,e.prototype.type=\"PanTool\",e.prototype.tool_name=\"Pan\",e.prototype.event_type=\"pan\",e.prototype.default_order=10,e.define({dimensions:[s.Dimensions,\"both\"]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},icon:function(){var t;return t=function(){switch(this.dimensions){case\"both\":return\"pan\";case\"width\":return\"xpan\";case\"height\":return\"ypan\"}}.call(this),\"bk-tool-icon-\"+t}}),e}(n.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/poly_select_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./select_tool\"),a=t(\"../../annotations/poly_annotation\"),l=t(\"core/properties\"),u=t(\"core/util/array\");r.PolySelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data={vx:[],vy:[]}},e.prototype._active_change=function(){if(!this.model.active)return this._clear_data()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_data()},e.prototype._doubletap=function(t){var e,r;return e=null!=(r=t.srcEvent.shiftKey)&&r,this._select(this.data.vx,this.data.vy,!0,e),this._clear_data()},e.prototype._clear_data=function(){return this.data={vx:[],vy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e,r,o;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),o=e.sy_to_vy(t.bokeh.sy),this.data.vx.push(r),this.data.vy.push(o),this.model.overlay.update({xs:u.copy(this.data.vx),ys:u.copy(this.data.vy)})},e.prototype._select=function(t,e,r,o){var i,n,s,a,l,u;n={type:\"poly\",vx:t,vy:e},l=this.model._computed_renderers_by_data_source();for(i in l)a=l[i],u=a[0].data_source.selection_manager,u.select(this,function(){var t,e,r;for(r=[],t=0,e=a.length;tl;n=0<=l?++s:--s)o.x[n]=_.invert(o.vx[n]),o.y[n]=p.invert(o.vy[n]);break;default:a.logger.debug(\"Unrecognized selection geometry type: '\"+o.type+\"'\")}return e&&(c=this.plot_model.plot.tool_events,r?(i=c.geometries,i.push(o)):i=[o],c.geometries=i),null},e}(n.GestureToolView),r.SelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.define({renderers:[l.Array,[]],names:[l.Array,[]]}),e.internal({multi_select_modifier:[l.String,\"shift\"]}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.properties.renderers.change,function(){return this._computed_renderers=null}),this.connect(this.properties.names.change,function(){return this._computed_renderers=null}),this.connect(this.properties.plot.change,function(){return this._computed_renderers=null})},e.prototype._compute_renderers=function(){var t,e,r,o;return o=this.renderers,e=this.names,0===o.length&&(t=this.plot.renderers,o=function(){var e,o,i;for(i=[],e=0,o=t.length;e0&&(o=function(){var t,i,n;for(n=[],t=0,i=o.length;t=0&&n.push(r);return n}()),o},e.getters({computed_renderers:function(){return null==this._computed_renderers&&(this._computed_renderers=this._compute_renderers()),this._computed_renderers}}),e.prototype._computed_renderers_by_data_source=function(){var t,e,r,o,i;for(i={},o=this.computed_renderers,t=0,e=o.length;t.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T;switch(r=this.plot_model.frame,o=r.h_range,g=r.v_range,s=[o.start,o.end],b=s[0],v=s[1],a=[g.start,g.end],k=a[0],x=a[1],this.model.dimension){case\"height\":M=Math.abs(x-k),d=b,f=v,m=k+M*t,y=x+M*t;break;case\"width\":w=Math.abs(v-b),d=b-w*t,f=v-w*t,m=k,y=x}j={},l=r.xscales;for(i in l)p=l[i],u=p.v_invert([d,f],!0),h=u[0],e=u[1],j[i]={start:h,end:e};T={},c=r.yscales;for(i in c)p=c[i],_=p.v_invert([m,y],!0),h=_[0],e=_[1],T[i]={start:h,end:e};return n={xrs:j,yrs:T,factor:t},this.plot_view.push_state(\"wheel_pan\",{range:n}),this.plot_view.update_range(n,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(n.GestureToolView),r.WheelPanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"WheelPanTool\",e.prototype.default_view=r.WheelPanToolView,e.prototype.tool_name=\"Wheel Pan\",e.prototype.icon=\"bk-tool-icon-wheel-pan\",e.prototype.event_type=\"scroll\",e.prototype.default_order=12,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}),e.define({dimension:[s.Dimension,\"width\"]}),e.internal({speed:[s.Number,.001]}),e}(n.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/wheel_zoom_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./gesture_tool\"),a=t(\"core/util/zoom\"),l=t(\"core/properties\");\"undefined\"!=typeof o&&null!==o||(o={}),r.WheelZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pinch=function(t){var e;return e=t.scale>=1?20*(t.scale-1):-20/t.scale,t.bokeh.delta=e,this._scroll(t)},e.prototype._scroll=function(t){var e,r,o,i,n,s,l,u,c,_;return o=this.plot_model.frame,n=o.h_range,l=o.v_range,u=this.plot_view.canvas.sx_to_vx(t.bokeh.sx),c=this.plot_view.canvas.sy_to_vy(t.bokeh.sy),e=this.model.dimensions,i=(\"width\"===e||\"both\"===e)&&n.min0?\"pinch\":\"scroll\",e.prototype.default_order=10,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"]}),e.internal({speed:[l.Number,1/600]}),e}(s.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\",\"core/util/zoom\":\"core/util/zoom\"}],\"models/tools/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./actions/action_tool\");r.ActionTool=o.ActionTool;var i=t(\"./actions/help_tool\");r.HelpTool=i.HelpTool;var n=t(\"./actions/redo_tool\");r.RedoTool=n.RedoTool;var s=t(\"./actions/reset_tool\");r.ResetTool=s.ResetTool;var a=t(\"./actions/save_tool\");r.SaveTool=a.SaveTool;var l=t(\"./actions/undo_tool\");r.UndoTool=l.UndoTool;var u=t(\"./actions/zoom_in_tool\");r.ZoomInTool=u.ZoomInTool;var c=t(\"./actions/zoom_out_tool\");r.ZoomOutTool=c.ZoomOutTool;var _=t(\"./button_tool\");r.ButtonTool=_.ButtonTool;var p=t(\"./gestures/box_select_tool\");r.BoxSelectTool=p.BoxSelectTool;var h=t(\"./gestures/box_zoom_tool\");r.BoxZoomTool=h.BoxZoomTool;var d=t(\"./gestures/gesture_tool\");r.GestureTool=d.GestureTool;var f=t(\"./gestures/lasso_select_tool\");r.LassoSelectTool=f.LassoSelectTool;var m=t(\"./gestures/pan_tool\");r.PanTool=m.PanTool;var y=t(\"./gestures/poly_select_tool\");r.PolySelectTool=y.PolySelectTool;var g=t(\"./gestures/resize_tool\");r.ResizeTool=g.ResizeTool;var v=t(\"./gestures/select_tool\");r.SelectTool=v.SelectTool;var b=t(\"./gestures/tap_tool\");r.TapTool=b.TapTool;var w=t(\"./gestures/wheel_pan_tool\");r.WheelPanTool=w.WheelPanTool;var x=t(\"./gestures/wheel_zoom_tool\");r.WheelZoomTool=x.WheelZoomTool;var k=t(\"./inspectors/crosshair_tool\");r.CrosshairTool=k.CrosshairTool;var M=t(\"./inspectors/hover_tool\");r.HoverTool=M.HoverTool;var j=t(\"./inspectors/inspect_tool\");r.InspectTool=j.InspectTool;var T=t(\"./tool\");r.Tool=T.Tool;var S=t(\"./tool_events\");r.ToolEvents=S.ToolEvents;var O=t(\"./tool_proxy\");r.ToolProxy=O.ToolProxy;var P=t(\"./toolbar\");r.Toolbar=P.Toolbar;var A=t(\"./toolbar_base\");r.ToolbarBase=A.ToolbarBase;var E=t(\"./toolbar_box\");r.ToolbarBoxToolbar=E.ToolbarBoxToolbar;var z=t(\"./toolbar_box\");r.ToolbarBox=z.ToolbarBox},{\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./actions/help_tool\":\"models/tools/actions/help_tool\",\"./actions/redo_tool\":\"models/tools/actions/redo_tool\",\"./actions/reset_tool\":\"models/tools/actions/reset_tool\",\"./actions/save_tool\":\"models/tools/actions/save_tool\",\"./actions/undo_tool\":\"models/tools/actions/undo_tool\",\"./actions/zoom_in_tool\":\"models/tools/actions/zoom_in_tool\",\"./actions/zoom_out_tool\":\"models/tools/actions/zoom_out_tool\",\"./button_tool\":\"models/tools/button_tool\",\"./gestures/box_select_tool\":\"models/tools/gestures/box_select_tool\",\"./gestures/box_zoom_tool\":\"models/tools/gestures/box_zoom_tool\",\"./gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"./gestures/lasso_select_tool\":\"models/tools/gestures/lasso_select_tool\",\"./gestures/pan_tool\":\"models/tools/gestures/pan_tool\",\"./gestures/poly_select_tool\":\"models/tools/gestures/poly_select_tool\",\"./gestures/resize_tool\":\"models/tools/gestures/resize_tool\",\"./gestures/select_tool\":\"models/tools/gestures/select_tool\",\"./gestures/tap_tool\":\"models/tools/gestures/tap_tool\",\"./gestures/wheel_pan_tool\":\"models/tools/gestures/wheel_pan_tool\",\"./gestures/wheel_zoom_tool\":\"models/tools/gestures/wheel_zoom_tool\",\"./inspectors/crosshair_tool\":\"models/tools/inspectors/crosshair_tool\",\"./inspectors/hover_tool\":\"models/tools/inspectors/hover_tool\",\"./inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"./tool\":\"models/tools/tool\",\"./tool_events\":\"models/tools/tool_events\",\"./tool_proxy\":\"models/tools/tool_proxy\",\"./toolbar\":\"models/tools/toolbar\",\"./toolbar_base\":\"models/tools/toolbar_base\",\"./toolbar_box\":\"models/tools/toolbar_box\"}],\"models/tools/inspectors/crosshair_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./inspect_tool\"),s=t(\"../../annotations/span\"),a=t(\"core/properties\"),l=t(\"core/util/object\");r.CrosshairToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._move=function(t){var e,r,o,i;if(this.model.active)return r=this.plot_model.frame,e=this.plot_model.canvas,o=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),r.contains(o,i)||(o=i=null),this._update_spans(o,i)},e.prototype._move_exit=function(t){return this._update_spans(null,null)},e.prototype._update_spans=function(t,e){var r;if(r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||(this.model.spans.width.computed_location=e),\"height\"===r||\"both\"===r)return this.model.spans.height.computed_location=t},e}(n.InspectToolView),r.CrosshairTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CrosshairToolView,e.prototype.type=\"CrosshairTool\",e.prototype.tool_name=\"Crosshair\",e.prototype.icon=\"bk-tool-icon-crosshair\",e.define({dimensions:[a.Dimensions,\"both\"],line_color:[a.Color,\"black\"],line_width:[a.Number,1],line_alpha:[a.Number,1]}),e.internal({location_units:[a.SpatialUnits,\"screen\"],render_mode:[a.RenderMode,\"css\"],spans:[a.Any]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)},synthetic_renderers:function(){return l.values(this.spans)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.spans={width:new s.Span({for_hover:!0,dimension:\"width\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new s.Span({for_hover:!0,dimension:\"height\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}},e}(n.InspectTool)},{\"../../annotations/span\":\"models/annotations/span\",\"./inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/tools/inspectors/hover_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./inspect_tool\"),a=t(\"../../annotations/tooltip\"),l=t(\"../../renderers/glyph_renderer\"),u=t(\"core/hittest\"),c=t(\"core/util/templating\"),_=t(\"core/dom\"),p=t(\"core/properties\"),h=t(\"core/util/object\"),d=t(\"core/util/types\"),f=t(\"core/build_views\");o=function(t){var e,r,o,i,n;return\"#\"===t.substr(0,1)?t:(r=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),i=parseInt(r[2]),o=parseInt(r[3]),e=parseInt(r[4]),n=e|o<<8|i<<16,r[1]+\"#\"+n.toString(16))},r.HoverToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.ttviews={}},e.prototype.remove=function(){return f.remove_views(this.ttviews),e.__super__.remove.call(this)},e.prototype.connect_signals=function(){var t,r,o,i;for(e.__super__.connect_signals.call(this),i=this.computed_renderers,t=0,r=i.length;t0&&(o=function(){var t,i,n;for(n=[],t=0,i=o.length;t=0&&n.push(r);return n}()),o},e.prototype._compute_ttmodels=function(){var t,e,r,o,i,n,s,l,u,c,_;if(c={},u=this.model.tooltips,null!=u)for(s=this.computed_renderers,t=0,r=s.length;t=0){if(v=M.match(/\\$color(\\[.*\\])?:(\\w*)/),m=v[0],y=v[1],n=v[2],a=t.get_column(n),null==a){l=_.span({},n+\" unknown\"),i.appendChild(l);continue}if(u=(null!=y?y.indexOf(\"hex\"):void 0)>=0,x=(null!=y?y.indexOf(\"swatch\"):void 0)>=0,s=a[e],null==s){l=_.span({},\"(null)\"),i.appendChild(l);continue}u&&(s=o(s)),l=_.span({},s),i.appendChild(l),x&&(l=_.span({\"class\":\"bk-tooltip-color-block\",style:{backgroundColor:s}},\" \"),i.appendChild(l))}else M=M.replace(\"$~\",\"$data_\"),l=_.span(),l.innerHTML=c.replace_placeholders(M,t,e,this.model.formatters,r),i.appendChild(l);return w},e}(s.InspectToolView),r.HoverTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.HoverToolView,e.prototype.type=\"HoverTool\",e.prototype.tool_name=\"Hover\",e.prototype.icon=\"bk-tool-icon-hover\",e.define({tooltips:[p.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"canvas (x, y)\",\"($sx, $sy)\"]]],formatters:[p.Any,{}],renderers:[p.Array,[]],names:[p.Array,[]],mode:[p.String,\"mouse\"],point_policy:[p.String,\"snap_to_data\"],line_policy:[p.String,\"nearest\"],show_arrow:[p.Boolean,!0],anchor:[p.String,\"center\"],attachment:[p.String,\"horizontal\"],callback:[p.Any]}),e}(s.InspectTool)},{\"../../annotations/tooltip\":\"models/annotations/tooltip\",\"../../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"./inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"core/build_views\":\"core/build_views\",\"core/dom\":\"core/dom\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\",\"core/util/templating\":\"core/util/templating\",\"core/util/types\":\"core/util/types\"}],\"models/tools/inspectors/inspect_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../button_tool\");r.InspectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(s.ButtonToolView),r.InspectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.event_type=\"move\",e.define({toggleable:[n.Bool,!0]}),e.override({active:!0}),e}(s.ButtonTool)},{\"../button_tool\":\"models/tools/button_tool\",\n", " \"core/properties\":\"core/properties\"}],\"models/tools/on_off_button\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./button_tool\");r.OnOffButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.model.active?this.el.classList.add(\"bk-active\"):this.el.classList.remove(\"bk-active\")},e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(n.ButtonToolButtonView)},{\"./button_tool\":\"models/tools/button_tool\"}],\"models/tools/tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/view\"),a=t(\"core/util/array\"),l=t(\"../../model\");r.ToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.active.change,function(t){return function(){return t.model.active?t.activate():t.deactivate()}}(this))},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(s.View),r.Tool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.getters({synthetic_renderers:function(){return[]}}),e.define({plot:[n.Instance]}),e.internal({active:[n.Boolean,!1]}),e.prototype._get_dim_tooltip=function(t,e){switch(e){case\"width\":return t+\" (x-axis)\";case\"height\":return t+\" (y-axis)\";case\"both\":return t}},e.prototype._get_dim_limits=function(t,e,r,o){var i,n,s,l,u,c,_,p;return s=t[0],c=t[1],l=e[0],_=e[1],i=r.h_range,\"width\"===o||\"both\"===o?(u=[a.min([s,l]),a.max([s,l])],u=[a.max([u[0],i.min]),a.min([u[1],i.max])]):u=[i.min,i.max],n=r.v_range,\"height\"===o||\"both\"===o?(p=[a.min([c,_]),a.max([c,_])],p=[a.max([p[0],n.min]),a.min([p[1],n.max])]):p=[n.min,n.max],[u,p]},e}(l.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/view\":\"core/view\"}],\"models/tools/tool_events\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\");r.ToolEvents=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolEvents\",e.define({geometries:[s.Array,[]]}),e}(n.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/tools/tool_proxy\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/signaling\"),a=t(\"../../model\");r.ToolProxy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this[\"do\"]=new s.Signal(this,\"do\"),this.connect(this[\"do\"],function(){return this.doit()}),this.connect(this.properties.active.change,function(){return this.set_active()})},e.prototype.doit=function(){var t,e,r,o;for(r=this.tools,t=0,e=r.length;t0&&(x=v(C),this.gestures[o].tools.push(x),this.connect(x.properties.active.change,this._active_change.bind(null,x)))}this.actions=[];for(z in t)C=t[z],C.length>0&&this.actions.push(v(C));this.inspectors=[];for(z in c)C=c[z],C.length>0&&this.inspectors.push(v(C,e=!0));A=[];for(r in this.gestures)C=this.gestures[r].tools,0!==C.length&&(this.gestures[r].tools=a.sortBy(C,function(t){return t.default_order}),\"pinch\"!==r&&\"scroll\"!==r?A.push(this.gestures[r].tools[0].active=!0):A.push(void 0));return A},e}(p.ToolbarBase),r.ToolbarBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-toolbar-box\",e.prototype.get_width=function(){return this.model._horizontal===!0?30:null},e.prototype.get_height=function(){return 30},e}(d.BoxView),r.ToolbarBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolbarBox\",e.prototype.default_view=r.ToolbarBoxView,e.prototype.initialize=function(t){var o;return e.__super__.initialize.call(this,t),this._toolbar=new r.ToolbarBoxToolbar(t),this._horizontal=\"left\"===(o=this.toolbar_location)||\"right\"===o,this._sizeable=this._horizontal?this._width:this._height},e.prototype._doc_attached=function(){return this._toolbar.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.get_layoutable_children=function(){return[this._toolbar]},e.define({toolbar_location:[s.Location,\"right\"],merge_tools:[s.Bool,!0],tools:[s.Any,[]],logo:[s.String,\"normal\"]}),e}(d.Box)},{\"../layouts/box\":\"models/layouts/box\",\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./actions/help_tool\":\"models/tools/actions/help_tool\",\"./gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"./inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"./tool_proxy\":\"models/tools/tool_proxy\",\"./toolbar_base\":\"models/tools/toolbar_base\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tools/toolbar_template\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"core/dom\");r[\"default\"]=function(t){var e;if(null!=t.logo){var r=\"grey\"===t.logo?\"bk-grey\":null;e=o.createElement(\"a\",{href:\"http://bokeh.pydata.org/\",target:\"_blank\",\"class\":[\"bk-logo\",\"bk-logo-small\",r]})}return o.createElement(\"div\",{\"class\":[\"bk-toolbar-\"+t.location,\"bk-toolbar-\"+t.sticky]},e,o.createElement(\"div\",{\"class\":\"bk-button-bar\"},o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"pan\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"scroll\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"pinch\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"tap\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"press\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"rotate\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"actions\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"inspectors\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"help\"})))}},{\"core/dom\":\"core/dom\"}],\"models/transforms/customjs_transform\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"./transform\"),a=t(\"core/properties\"),l=t(\"core/util/object\");r.CustomJSTransform=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return o(i,e),i.prototype.type=\"CustomJSTransform\",i.define({args:[a.Any,{}],func:[a.String,\"\"],v_func:[a.String,\"\"]}),i.getters({values:function(){return this._make_values()},scalar_transform:function(){return this._make_transform(\"x\",this.func)},vector_transform:function(){return this._make_transform(\"xs\",this.v_func)}}),i.prototype.compute=function(e){return this.scalar_transform.apply(this,n.call(this.values).concat([e],[t],[r]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,n.call(this.values).concat([e],[t],[r]))},i.prototype._make_transform=function(t,e){return function(t,e,r){r.prototype=t.prototype;var o=new r,i=t.apply(o,e);return Object(i)===i?i:o}(Function,n.call(Object.keys(this.args)).concat([t],[\"require\"],[\"exports\"],[e]),function(){})},i.prototype._make_values=function(){return l.values(this.args)},i}(s.Transform)},{\"./transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/transforms/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./customjs_transform\");r.CustomJSTransform=o.CustomJSTransform;var i=t(\"./interpolator\");r.Interpolator=i.Interpolator;var n=t(\"./jitter\");r.Jitter=n.Jitter;var s=t(\"./linear_interpolator\");r.LinearInterpolator=s.LinearInterpolator;var a=t(\"./step_interpolator\");r.StepInterpolator=a.StepInterpolator;var l=t(\"./transform\");r.Transform=l.Transform},{\"./customjs_transform\":\"models/transforms/customjs_transform\",\"./interpolator\":\"models/transforms/interpolator\",\"./jitter\":\"models/transforms/jitter\",\"./linear_interpolator\":\"models/transforms/linear_interpolator\",\"./step_interpolator\":\"models/transforms/step_interpolator\",\"./transform\":\"models/transforms/transform\"}],\"models/transforms/interpolator\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;ee.x)?r:-{1:null!=(o=t.x===e.x)?o:{0:1}}}),s=o=0,c=a.length;0<=c?oc;s=0<=c?++o:--o)this._x_sorted[s]=a[s].x,this._y_sorted[s]=a[s].y;return this._sorted_dirty=!1}},e}(s.Transform)},{\"./transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\"}],\"models/transforms/jitter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./transform\"),s=t(\"core/properties\"),a=t(\"core/util/math\");r.Jitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.define({mean:[s.Number,0],width:[s.Number,1],distribution:[s.Distribution,\"uniform\"]}),e.prototype.compute=function(t){return\"uniform\"===this.distribution?t+this.mean+(a.random()-.5)*this.width:\"normal\"===this.distribution?t+a.rnorm(this.mean,this.width):void 0},e.prototype.v_compute=function(t){var e,r,o,i,n;for(i=new Float64Array(t.length),r=e=0,o=t.length;ethis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return t===this._x_sorted[0]?this._y_sorted[0]:(r=n.findLastIndex(this._x_sorted,function(e){return ethis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return o=-1,\"after\"===this.mode&&(o=a.findLastIndex(this._x_sorted,function(e){return t>=e})),\"before\"===this.mode&&(o=a.findIndex(this._x_sorted,function(e){return t<=e})),\"center\"===this.mode&&(r=function(){var e,r,o,i;for(o=this._x_sorted,i=[],e=0,r=o.length;e1?(e=r,e.width=arguments[0],e.height=arguments[1]):e=t?t:r,this instanceof a?(this.width=e.width||r.width,this.height=e.height||r.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:r.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement(\"canvas\"),this.__ctx=this.__canvas.getContext(\"2d\")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),this.__root.setAttribute(\"version\",1.1),this.__root.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\"),this.__root.setAttributeNS(\"http://www.w3.org/2000/xmlns/\",\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\"),this.__root.setAttribute(\"width\",this.width),this.__root.setAttribute(\"height\",this.height),this.__ids={},this.__defs=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"defs\"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"),void this.__root.appendChild(this.__currentElement)):new a(e)},a.prototype.__createElement=function(t,e,r){\"undefined\"==typeof e&&(e={});var o,i,n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(r&&(n.setAttribute(\"fill\",\"none\"),n.setAttribute(\"stroke\",\"none\")),o=0;o0){\"path\"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var r=this.__createElement(\"g\");e.appendChild(r),this.__currentElement=r}var o=this.__currentElement.getAttribute(\"transform\");o?o+=\" \":o=\"\",o+=t,this.__currentElement.setAttribute(\"transform\",o)},a.prototype.scale=function(e,r){void 0===r&&(r=e),this.__addTransform(t(\"scale({x},{y})\",{x:e,y:r}))},a.prototype.rotate=function(e){var r=180*e/Math.PI;this.__addTransform(t(\"rotate({angle},{cx},{cy})\",{angle:r,cx:0,cy:0}))},a.prototype.translate=function(e,r){this.__addTransform(t(\"translate({x},{y})\",{x:e,y:r}))},a.prototype.transform=function(e,r,o,i,n,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:r,c:o,d:i,e:n,f:s}))},a.prototype.beginPath=function(){var t,e;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),e=this.__closestGroupOrSvg(),e.appendChild(t),this.__currentElement=t},a.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;\"path\"===t.nodeName?t.setAttribute(\"d\",this.__currentDefaultPath):console.error(\"Attempted to apply path command to node\",t.nodeName)},a.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},a.prototype.moveTo=function(e,r){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:r},this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},a.prototype.lineTo=function(e,r){this.__currentPosition={x:e,y:r},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(t(\"L {x} {y}\",{x:e,y:r})):this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.bezierCurveTo=function(e,r,o,i,n,s){this.__currentPosition={x:n,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:r,cp2x:o,cp2y:i,x:n,y:s}))},a.prototype.quadraticCurveTo=function(e,r,o,i){this.__currentPosition={x:o,y:i},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:r,x:o,y:i}))};var _=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};a.prototype.arcTo=function(t,e,r,o,i){var n=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(\"undefined\"!=typeof n&&\"undefined\"!=typeof s){if(i<0)throw new Error(\"IndexSizeError: The radius provided (\"+i+\") is negative.\");if(n===t&&s===e||t===r&&e===o||0===i)return void this.lineTo(t,e);var a=_([n-t,s-e]),l=_([r-t,o-e]);if(a[0]*l[1]===a[1]*l[0])return void this.lineTo(t,e);var u=a[0]*l[0]+a[1]*l[1],c=Math.acos(Math.abs(u)),p=_([a[0]+l[0],a[1]+l[1]]),h=i/Math.sin(c/2),d=t+h*p[0],f=e+h*p[1],m=[-a[1],a[0]],y=[l[1],-l[0]],g=function(t){var e=t[0],r=t[1];return r>=0?Math.acos(e):-Math.acos(e)},v=g(m),b=g(y);this.lineTo(d+m[0]*i,f+m[1]*i),this.arc(d,f,i,v,b)}},a.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},a.prototype.rect=function(t,e,r,o){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+o),this.lineTo(t,e+o),this.lineTo(t,e),this.closePath()},a.prototype.fillRect=function(t,e,r,o){var i,n;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o},!0),n=this.__closestGroupOrSvg(),n.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"fill\")},a.prototype.strokeRect=function(t,e,r,o){var i,n;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o},!0),n=this.__closestGroupOrSvg(),n.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute(\"transform\"),r=this.__root.childNodes[1],o=r.childNodes,i=o.length-1;i>=0;i--)o[i]&&r.removeChild(o[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)},a.prototype.clearRect=function(t,e,r,o){if(0===t&&0===e&&r===this.width&&o===this.height)return void this.__clearCanvas();var i,n=this.__closestGroupOrSvg();i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o,fill:\"#FFFFFF\"},!0),n.appendChild(i)},a.prototype.createLinearGradient=function(t,e,o,i){var n=this.__createElement(\"linearGradient\",{id:r(this.__ids),x1:t+\"px\",x2:o+\"px\",y1:e+\"px\",y2:i+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(n),new l(n,this)},a.prototype.createRadialGradient=function(t,e,o,i,n,s){var a=this.__createElement(\"radialGradient\",{id:r(this.__ids),cx:i+\"px\",cy:n+\"px\",r:s+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(a),new l(a,this)},a.prototype.__parseFont=function(){var t=/^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\'\\\"\\sa-z0-9]+?)\\s*$/i,e=t.exec(this.font),r={style:e[1]||\"normal\",size:e[4]||\"10px\",family:e[6]||\"sans-serif\",weight:e[3]||\"normal\",decoration:e[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(r.decoration=\"underline\"),this.__fontHref&&(r.href=this.__fontHref),r},a.prototype.__wrapTextLink=function(t,e){if(t.href){var r=this.__createElement(\"a\");return r.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),r.appendChild(e),r}return e},a.prototype.__applyText=function(t,e,r,o){var s=this.__parseFont(),a=this.__closestGroupOrSvg(),l=this.__createElement(\"text\",{\"font-family\":s.family,\"font-size\":s.size,\"font-style\":s.style,\"font-weight\":s.weight,\"text-decoration\":s.decoration,x:e,y:r,\"text-anchor\":i(this.textAlign),\"dominant-baseline\":n(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(o),a.appendChild(this.__wrapTextLink(s,l))},a.prototype.fillText=function(t,e,r){this.__applyText(t,e,r,\"fill\")},a.prototype.strokeText=function(t,e,r){this.__applyText(t,e,r,\"stroke\")},a.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},a.prototype.arc=function(e,r,o,i,n,s){if(i!==n){i%=2*Math.PI,n%=2*Math.PI,i===n&&(n=(n+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+o*Math.cos(n),l=r+o*Math.sin(n),u=e+o*Math.cos(i),c=r+o*Math.sin(i),_=s?0:1,p=0,h=n-i;h<0&&(h+=2*Math.PI),p=s?h>Math.PI?0:1:h>Math.PI?1:0,this.lineTo(u,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:o,ry:o,xAxisRotation:0,largeArcFlag:p,sweepFlag:_,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},a.prototype.clip=function(){var e=this.__closestGroupOrSvg(),o=this.__createElement(\"clipPath\"),i=r(this.__ids),n=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),o.setAttribute(\"id\",i),o.appendChild(this.__currentElement),this.__defs.appendChild(o),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:i})),e.appendChild(n),this.__currentElement=n},a.prototype.drawImage=function(){var t,e,r,o,i,n,s,l,u,c,_,p,h,d,f,m=Array.prototype.slice.call(arguments),y=m[0],g=0,v=0;if(3===m.length)t=m[1],e=m[2],i=y.width,n=y.height,r=i,o=n;else if(5===m.length)t=m[1],e=m[2],r=m[3],o=m[4],i=y.width,n=y.height;else{if(9!==m.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);g=m[1],v=m[2],i=m[3],n=m[4],t=m[5],e=m[6],r=m[7],o=m[8]}s=this.__closestGroupOrSvg(),_=this.__currentElement;var b=\"translate(\"+t+\", \"+e+\")\";if(y instanceof a){if(l=y.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(u=l.childNodes[0];u.childNodes.length;)f=u.childNodes[0].getAttribute(\"id\"),this.__ids[f]=f,this.__defs.appendChild(u.childNodes[0]);if(c=l.childNodes[1]){var w,x=c.getAttribute(\"transform\");w=x?x+\" \"+b:b,c.setAttribute(\"transform\",w),s.appendChild(c)}}}else\"IMG\"===y.nodeName?(p=this.__createElement(\"image\"),p.setAttribute(\"width\",r),p.setAttribute(\"height\",o),p.setAttribute(\"preserveAspectRatio\",\"none\"),(g||v||i!==y.width||n!==y.height)&&(h=this.__document.createElement(\"canvas\"),h.width=r,h.height=o,d=h.getContext(\"2d\"),d.drawImage(y,g,v,i,n,0,0,r,o),y=h),p.setAttribute(\"transform\",b),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===y.nodeName?y.toDataURL():y.getAttribute(\"src\")),s.appendChild(p)):\"CANVAS\"===y.nodeName&&(p=this.__createElement(\"image\"),p.setAttribute(\"width\",r),p.setAttribute(\"height\",o),p.setAttribute(\"preserveAspectRatio\",\"none\"),h=this.__document.createElement(\"canvas\"),h.width=r,h.height=o,d=h.getContext(\"2d\"),d.imageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.oImageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.drawImage(y,g,v,i,n,0,0,r,o),y=h,p.setAttribute(\"transform\",b),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",y.toDataURL()),s.appendChild(p))},a.prototype.createPattern=function(t,e){var o,i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),n=r(this.__ids);return i.setAttribute(\"id\",n),i.setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?(o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),o.setAttribute(\"width\",t.width),o.setAttribute(\"height\",t.height),o.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),i.appendChild(o),this.__defs.appendChild(i)):t instanceof a&&(i.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(i)),new u(i,this)},a.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},a.prototype.drawFocusRing=function(){},a.prototype.createImageData=function(){},a.prototype.getImageData=function(){},a.prototype.putImageData=function(){},a.prototype.globalCompositeOperation=function(){},a.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=a),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=a)}()},{}],\"d/auto-bind\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/copy\"),n=t(\"es5-ext/object/normalize-options\"),s=t(\"es5-ext/object/valid-callable\"),a=t(\"es5-ext/object/map\"),l=t(\"es5-ext/object/valid-callable\"),u=t(\"es5-ext/object/valid-value\"),c=Function.prototype.bind,_=Object.defineProperty,p=Object.prototype.hasOwnProperty;o=function(t,e,r){var o,n=u(e)&&l(e.value);return o=i(e),delete o.writable,delete o.value,o.get=function(){return!r.overwriteDefinition&&p.call(this,t)?n:(e.value=c.call(n,r.resolveContext?r.resolveContext(this):this),_(this,t,e),this[t])},o},e.exports=function(t){var e=n(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,r){return o(r,t,e)})}},{\"es5-ext/object/copy\":\"es5-ext/object/copy\",\"es5-ext/object/map\":\"es5-ext/object/map\",\"es5-ext/object/normalize-options\":\"es5-ext/object/normalize-options\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/object/valid-value\":\"es5-ext/object/valid-value\"}],\"d/index\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/assign\"),n=t(\"es5-ext/object/normalize-options\"),s=t(\"es5-ext/object/is-callable\"),a=t(\"es5-ext/string/#/contains\");o=e.exports=function(t,e){var r,o,s,l,u;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,o=!1):(r=a.call(t,\"c\"),o=a.call(t,\"e\"),s=a.call(t,\"w\")),u={value:e,configurable:r,enumerable:o,writable:s},l?i(n(l),u):u},o.gs=function(t,e,r){var o,l,u,c;return\"string\"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(o=!0,l=!1):(o=a.call(t,\"c\"),l=a.call(t,\"e\")),c={get:e,set:r,configurable:o,enumerable:l},u?i(n(u),c):c}},{\"es5-ext/object/assign\":\"es5-ext/object/assign/index\",\"es5-ext/object/is-callable\":\"es5-ext/object/is-callable\",\"es5-ext/object/normalize-options\":\"es5-ext/object/normalize-options\",\"es5-ext/string/#/contains\":\"es5-ext/string/#/contains/index\"}],\"es5-ext/array/#/clear\":[function(t,e,r){\"use strict\";var o=t(\"../../object/valid-value\");e.exports=function(){return o(this).length=0,this}},{\"../../object/valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/array/#/e-index-of\":[function(t,e,r){\"use strict\";var o=t(\"../../number/to-pos-integer\"),i=t(\"../../object/valid-value\"),n=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,l=Math.floor;e.exports=function(t){var e,r,u,c;if(t===t)return n.apply(this,arguments);for(r=o(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?l(u):o(this.length)-l(a(u)),e=u;e=55296&&y<=56319&&(w+=t[++r])),w=x?_.call(x,k,w,d):w,e?(p.value=w,h(f,d,p)):f[d]=w,++d;m=d}if(void 0===m)for(m=s(t.length),e&&(f=new e(m)),r=0;r0?1:-1}},{}],\"es5-ext/number/to-integer\":[function(t,e,r){\"use strict\";var o=t(\"../math/sign\"),i=Math.abs,n=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?o(t)*n(i(t)):t)}},{\"../math/sign\":\"es5-ext/math/sign/index\"}],\"es5-ext/number/to-pos-integer\":[function(t,e,r){\"use strict\";var o=t(\"./to-integer\"),i=Math.max;e.exports=function(t){return i(0,o(t))}},{\"./to-integer\":\"es5-ext/number/to-integer\"}],\"es5-ext/object/_iterate\":[function(t,e,r){\"use strict\";var o=t(\"./valid-callable\"),i=t(\"./valid-value\"),n=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,u){var c,_=arguments[2],p=arguments[3];return r=Object(i(r)),o(u),c=a(r),p&&c.sort(\"function\"==typeof p?n.call(p,r):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,o){return l.call(r,t)?s.call(u,_,r[t],t,r,o):e})}}},{\"./valid-callable\":\"es5-ext/object/valid-callable\",\"./valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/object/assign/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/object/assign/is-implemented\",\"./shim\":\"es5-ext/object/assign/shim\"}],\"es5-ext/object/assign/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t,e=Object.assign;return\"function\"==typeof e&&(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}},{}],\"es5-ext/object/assign/shim\":[function(t,e,r){\"use strict\";var o=t(\"../keys\"),i=t(\"../valid-value\"),n=Math.max;e.exports=function(t,e){var r,s,a,l=n(arguments.length,2);for(t=Object(i(t)),a=function(o){try{t[o]=e[o]}catch(i){r||(r=i)}},s=1;s-1}},{}],\"es5-ext/string/is-string\":[function(t,e,r){\"use strict\";var o=Object.prototype.toString,i=o.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||o.call(t)===i)||!1}},{}],\"es5-ext/string/random-uniq\":[function(t,e,r){\"use strict\";var o=Object.create(null),i=Math.random;e.exports=function(){var t;do t=i().toString(36).slice(2);while(o[t]);return t}},{}],\"es6-iterator/array\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"es5-ext/string/#/contains\"),s=t(\"d\"),a=t(\"./\"),l=Object.defineProperty;o=e.exports=function(t,e){return this instanceof o?(a.call(this,t),e=e?n.call(e,\"key+value\")?\"key+value\":n.call(e,\"key\")?\"key\":\"value\":\"value\",void l(this,\"__kind__\",s(\"\",e))):new o(t,e)},i&&i(o,a),o.prototype=Object.create(a.prototype,{constructor:s(o),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t}),toString:s(function(){return\"[object Array Iterator]\"})})},{\"./\":\"es6-iterator/index\",d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\",\"es5-ext/string/#/contains\":\"es5-ext/string/#/contains/index\"}],\"es6-iterator/for-of\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/object/valid-callable\"),n=t(\"es5-ext/string/is-string\"),s=t(\"./get\"),a=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,_,p,h,d,f,m,y=arguments[2];if(a(t)||o(t)?r=\"array\":n(t)?r=\"string\":t=s(t),i(e),_=function(){p=!0},\"array\"===r)return void u.call(t,function(t){if(l.call(e,y,t,_),p)return!0});if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,y,c.value,_),p)return;c=t.next()}else for(d=t.length,h=0;h=55296&&m<=56319&&(f+=t[++h])),l.call(e,y,f,_),!p);++h);}},{\"./get\":\"es6-iterator/get\",\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\"}],\"es6-iterator/get\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/string/is-string\"),n=t(\"./array\"),s=t(\"./string\"),a=t(\"./valid-iterable\"),l=t(\"es6-symbol\").iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():o(t)?new n(t):i(t)?new s(t):new n(t)}},{\"./array\":\"es6-iterator/array\",\"./string\":\"es6-iterator/string\",\"./valid-iterable\":\"es6-iterator/valid-iterable\",\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/index\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/array/#/clear\"),n=t(\"es5-ext/object/assign\"),s=t(\"es5-ext/object/valid-callable\"),a=t(\"es5-ext/object/valid-value\"),l=t(\"d\"),u=t(\"d/auto-bind\"),c=t(\"es6-symbol\"),_=Object.defineProperty,p=Object.defineProperties;e.exports=o=function(t,e){return this instanceof o?(p(this,{__list__:l(\"w\",a(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),void(e&&(s(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear)))):new o(t,e)},p(o.prototype,n({constructor:l(o),_next:l(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void _(this,\"__redo__\",l(\"c\",[t]));this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)}}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),_(o.prototype,c.iterator,l(function(){return this})),_(o.prototype,c.toStringTag,l(\"\",\"Iterator\"))},{d:\"d/index\",\"d/auto-bind\":\"d/auto-bind\",\"es5-ext/array/#/clear\":\"es5-ext/array/#/clear\",\"es5-ext/object/assign\":\"es5-ext/object/assign/index\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/object/valid-value\":\"es5-ext/object/valid-value\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/is-iterable\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/string/is-string\"),n=t(\"es6-symbol\").iterator,s=Array.isArray;e.exports=function(t){return null!=t&&(!!s(t)||(!!i(t)||(!!o(t)||\"function\"==typeof t[n])))}},{\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/string\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"d\"),s=t(\"./\"),a=Object.defineProperty;o=e.exports=function(t){return this instanceof o?(t=String(t),s.call(this,t),void a(this,\"__length__\",n(\"\",t.length))):new o(t)},i&&i(o,s),o.prototype=Object.create(s.prototype,{constructor:n(o),_next:n(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)}),toString:n(function(){return\"[object String Iterator]\"})})},{\"./\":\"es6-iterator/index\",d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\"}],\"es6-iterator/valid-iterable\":[function(t,e,r){\"use strict\";var o=t(\"./is-iterable\");e.exports=function(t){if(!o(t))throw new TypeError(t+\" is not iterable\");return t}},{\"./is-iterable\":\"es6-iterator/is-iterable\"}],\"es6-promise\":[function(e,r,o){(function(o,i){/*!\n", " * @overview es6-promise - a tiny implementation of Promises/A+.\n", " * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n", " * @license Licensed under MIT license\n", " * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE\n", " * @version 3.0.2\n", " */\n", " (function(){\"use strict\";function n(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}function s(t){return\"function\"==typeof t}function a(t){return\"object\"==typeof t&&null!==t}function l(t){X=t}function u(t){J=t}function c(){return function(){o.nextTick(f)}}function _(){return function(){Y(f)}}function p(){var t=0,e=new K(f),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function h(){var t=new MessageChannel;return t.port1.onmessage=f,function(){t.port2.postMessage(0)}}function d(){return function(){setTimeout(f,1)}}function f(){for(var t=0;t\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",n=e.console&&(e.console.warn||e.console.log);return n&&n.call(e.console,i,o),t.apply(this,arguments)}}function c(t,e,r){var o,i=e.prototype;o=t.prototype=Object.create(i),o.constructor=t,o._super=i,r&&ht(o,r)}function _(t,e){return function(){return t.apply(e,arguments)}}function p(t,e){return typeof t==mt?t.apply(e?e[0]||n:n,e):t}function h(t,e){return t===n?e:t}function d(t,e,r){l(g(e),function(e){t.addEventListener(e,r,!1)})}function f(t,e,r){l(g(e),function(e){t.removeEventListener(e,r,!1)})}function m(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function y(t,e){return t.indexOf(e)>-1}function g(t){return t.trim().split(/\\s+/g)}function v(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var o=0;or[e]}):o.sort()),o}function x(t,e){for(var r,o,i=e[0].toUpperCase()+e.slice(1),s=0;s1&&!r.firstMultiple?r.firstMultiple=E(e):1===i&&(r.firstMultiple=!1);var n=r.firstInput,s=r.firstMultiple,a=s?s.center:n.center,l=e.center=z(o);e.timeStamp=vt(),e.deltaTime=e.timeStamp-n.timeStamp,e.angle=F(a,l),e.distance=D(a,l),P(r,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=C(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=gt(u.x)>gt(u.y)?u.x:u.y,e.scale=s?B(s.pointers,o):1,e.rotation=s?I(s.pointers,o):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,A(r,e);var c=t.element;m(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function P(t,e){var r=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},n=t.prevInput||{};e.eventType!==zt&&n.eventType!==Nt||(i=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-o.x),e.deltaY=i.y+(r.y-o.y)}function A(t,e){var r,o,i,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Dt&&(l>Et||a.velocity===n)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,_=C(l,u,c);o=_.x,i=_.y,r=gt(_.x)>gt(_.y)?_.x:_.y,s=N(u,c),t.lastInterval=e}else r=a.velocity,o=a.velocityX,i=a.velocityY,s=a.direction;e.velocity=r,e.velocityX=o,e.velocityY=i,e.direction=s}function E(t){for(var e=[],r=0;r=gt(e)?t<0?It:Bt:e<0?Lt:Rt}function D(t,e,r){r||(r=Ut);var o=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(o*o+i*i)}function F(t,e,r){r||(r=Ut);var o=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return 180*Math.atan2(i,o)/Math.PI}function I(t,e){return F(e[1],e[0],Yt)+F(t[1],t[0],Yt)}function B(t,e){return D(e[0],e[1],Yt)/D(t[0],t[1],Yt)}function L(){this.evEl=Wt,this.evWin=Ht,this.pressed=!1,j.apply(this,arguments)}function R(){this.evEl=$t,this.evWin=Zt,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=te,this.evWin=ee,this.started=!1,j.apply(this,arguments)}function G(t,e){var r=b(t.touches),o=b(t.changedTouches);return e&(Nt|Dt)&&(r=w(r.concat(o),\"identifier\",!0)),[r,o]}function q(){this.evTarget=oe,this.targetIds={},j.apply(this,arguments)}function U(t,e){var r=b(t.touches),o=this.targetIds;if(e&(zt|Ct)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var i,n,s=b(t.changedTouches),a=[],l=this.target;if(n=r.filter(function(t){return m(t.target,l)}),e===zt)for(i=0;i-1&&o.splice(t,1)};setTimeout(i,ie)}}function H(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){r.manager.emit(e,t)}var r=this,o=this.state;o=ge&&e(r.options.event+K(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=we)},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&me||!(this.state&me)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,rt,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&me)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(nt,Z,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!r||t.eventType&(Nt|Dt)&&!i)this.reset();else if(t.eventType&zt)this.reset(),this._timer=s(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&Nt)return ve;return we},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&Nt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=vt(),this.manager.emit(this.options.event,this._input)))}}),c(st,rt,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&me)}}),c(at,rt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Vt|Gt,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,r=this.options.direction;return r&(Vt|Gt)?e=t.overallVelocity:r&Vt?e=t.overallVelocityX:r&Gt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&>(e)>this.options.velocity&&t.eventType&Nt},emit:function(t){var e=tt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(lt,Z,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,o=t.distance0&&a.type()!==d.Dummy){var u=this._objective.coefficientFor(a),c=u/l;c0;)o=s>>1,i=n+o,r(t[i],e)<0?(n=i+1,s-=o+1):s=o;return n}function i(t,e,r){var i=o(t,e,r);if(i===t.length)return-1;var n=t[i];return 0!==r(n,e)?-1:i}function n(t,e,r){var i=o(t,e,r);if(i!==t.length){var n=t[i];if(0===r(n,e))return n}}function s(t,e){var r=h.asArray(t),o=r.length;if(o<=1)return r;r.sort(e);for(var i=[r[0]],n=1,s=0;n0))return!1;++i}}return!0}function l(t,e,r){var o=t.length,i=e.length;if(o>i)return!1;for(var n=0,s=0;n0?++s:(++n,++s)}return!(n0?(a.push(u),++i):(a.push(l),++o,++i)}for(;o0?++i:(a.push(l),++o,++i)}return a}function _(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o0?++i:(++o,++i)}for(;o0?(a.push(u),++i):(++o,++i)}for(;o0?(a.push(u.copy()),++i):(a.push(u.copy()),++o,++i)}for(;o=0},e.prototype.find=function(t){return l.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var r=this._array,o=l.lowerBound(r,t,this._wrapped);if(o===r.length){var i=new s.Pair(t,e());return r.push(i),i}var n=r[o];if(0!==this._compare(n.first,t)){var i=new s.Pair(t,e());return r.splice(o,0,i),i}return n},e.prototype.insert=function(t,e){var r=this._array,o=l.lowerBound(r,t,this._wrapped);if(o===r.length){var i=new s.Pair(t,e);return r.push(i),i}var n=r[o];if(0!==this._compare(n.first,t)){var i=new s.Pair(t,e);return r.splice(o,0,i),i}return n.second=e,n},e.prototype.update=function(t){var r=this;t instanceof e?this._array=i(this._array,t._array,this._compare):u.forEach(t,function(t){r.insert(t.first,t.second)})},e.prototype.erase=function(t){var e=this._array,r=l.binarySearch(e,t,this._wrapped);if(!(r<0))return e.splice(r,1)[0]},e.prototype.copy=function(){for(var t=new e(this._compare),r=t._array,o=this._array,i=0,n=o.length;i0&&(a+=\".\"+i(e)),a}function s(t,e,r,o){var i,s,a=Math.pow(10,e);return s=t.toFixed(0).search(\"e\")>-1?n(t,e):(r(t*a)/a).toFixed(e),o&&(i=new RegExp(\"0{1,\"+o+\"}$\"),s=s.replace(i,\"\")),s}function a(t,e,r){var o;return o=e.indexOf(\"$\")>-1?l(t,e,r):e.indexOf(\"%\")>-1?u(t,e,r):e.indexOf(\":\")>-1?c(t):_(t,e,r)}function l(t,e,r){var o,i,n=e,s=n.indexOf(\"$\"),a=n.indexOf(\"(\"),l=n.indexOf(\"+\"),u=n.indexOf(\"-\"),c=\"\",p=\"\";if(n.indexOf(\"$\")===-1?\"infix\"===y[v].currency.position?(p=y[v].currency.symbol,y[v].currency.spaceSeparated&&(p=\" \"+p+\" \")):y[v].currency.spaceSeparated&&(c=\" \"):n.indexOf(\" $\")>-1?(c=\" \",n=n.replace(\" $\",\"\")):n.indexOf(\"$ \")>-1?(c=\" \",n=n.replace(\"$ \",\"\")):n=n.replace(\"$\",\"\"),i=_(t,n,r,p),e.indexOf(\"$\")===-1)switch(y[v].currency.position){case\"postfix\":i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+y[v].currency.symbol),i=i.join(\"\")):i=i+c+y[v].currency.symbol;break;case\"infix\":break;case\"prefix\":i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),o=Math.max(a,u)+1,i.splice(o,0,y[v].currency.symbol+c),i=i.join(\"\")):i=y[v].currency.symbol+c+i;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else s<=1?i.indexOf(\"(\")>-1||i.indexOf(\"+\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),o=1,(s-1?(i=i.split(\"\"),i.splice(-1,0,c+y[v].currency.symbol),i=i.join(\"\")):i=i+c+y[v].currency.symbol;return i}function u(t,e,r){var o,i=\"\";return t=100*t,e.indexOf(\" %\")>-1?(i=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\"),o=_(t,e,r),o.indexOf(\")\")>-1?(o=o.split(\"\"),o.splice(-1,0,i+\"%\"),o=o.join(\"\")):o=o+i+\"%\",o}function c(t){var e=Math.floor(t/60/60),r=Math.floor((t-60*e*60)/60),o=Math.round(t-60*e*60-60*r);return e+\":\"+(r<10?\"0\"+r:r)+\":\"+(o<10?\"0\"+o:o)}function _(t,e,r,o){var i,n,a,l,u,c,_,p,h,d,f,m,g,w,x,k,M,j,T=!1,S=!1,O=!1,P=\"\",A=!1,E=!1,z=!1,C=!1,N=!1,D=\"\",F=\"\",I=Math.abs(t),B=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],L=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],R=\"\",V=!1,G=!1,q=\"\";if(0===t&&null!==b)return b;if(!isFinite(t))return\"\"+t;if(0===e.indexOf(\"{\")){var U=e.indexOf(\"}\");if(U===-1)throw Error('Format should also contain a \"}\"');m=e.slice(1,U),e=e.slice(U+1)}else m=\"\";if(e.indexOf(\"}\")===e.length-1){var Y=e.indexOf(\"{\");if(Y===-1)throw Error('Format should also contain a \"{\"');g=e.slice(Y+1,-1),e=e.slice(0,Y+1)}else g=\"\";var X;if(X=e.indexOf(\".\")===-1?e.match(/([0-9]+).*/):e.match(/([0-9]+)\\..*/),j=null===X?-1:X[1].length,e.indexOf(\"-\")!==-1&&(V=!0),e.indexOf(\"(\")>-1?(T=!0,e=e.slice(1,-1)):e.indexOf(\"+\")>-1&&(S=!0,e=e.replace(/\\+/g,\"\")),e.indexOf(\"a\")>-1){if(d=e.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],d=parseInt(d[0],10),A=e.indexOf(\"aK\")>=0,E=e.indexOf(\"aM\")>=0,z=e.indexOf(\"aB\")>=0,C=e.indexOf(\"aT\")>=0,N=A||E||z||C,e.indexOf(\" a\")>-1?(P=\" \",e=e.replace(\" a\",\"\")):e=e.replace(\"a\",\"\"),u=Math.floor(Math.log(I)/Math.LN10)+1,_=u%3,_=0===_?3:_,d&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-d,p=3*~~((Math.min(d,u)-_)/3),I/=Math.pow(10,p),e.indexOf(\".\")===-1&&d>3))for(e+=\"[.]\",k=0===c?0:3*~~(c/3)-c,k=k<0?k+3:k,i=0;i=Math.pow(10,12)&&!N||C?(P+=y[v].abbreviations.trillion,t/=Math.pow(10,12)):I=Math.pow(10,9)&&!N||z?(P+=y[v].abbreviations.billion,t/=Math.pow(10,9)):I=Math.pow(10,6)&&!N||E?(P+=y[v].abbreviations.million,t/=Math.pow(10,6)):(I=Math.pow(10,3)&&!N||A)&&(P+=y[v].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf(\"b\")>-1)for(e.indexOf(\" b\")>-1?(D=\" \",e=e.replace(\" b\",\"\")):e=e.replace(\"b\",\"\"),l=0;l<=B.length;l++)if(n=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=n&&t0&&(t/=n);break}if(e.indexOf(\"d\")>-1)for(e.indexOf(\" d\")>-1?(D=\" \",e=e.replace(\" d\",\"\")):e=e.replace(\"d\",\"\"),l=0;l<=L.length;l++)if(n=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=n&&t0&&(t/=n);break}if(e.indexOf(\"o\")>-1&&(e.indexOf(\" o\")>-1?(F=\" \",e=e.replace(\" o\",\"\")):e=e.replace(\"o\",\"\"),y[v].ordinal&&(F+=y[v].ordinal(t))),e.indexOf(\"[.]\")>-1&&(O=!0,e=e.replace(\"[.]\",\".\")),h=t.toString().split(\".\")[0],f=e.split(\".\")[1],w=e.indexOf(\",\"),f){if(f.indexOf(\"*\")!==-1?R=s(t,t.toString().split(\".\")[1].length,r):f.indexOf(\"[\")>-1?(f=f.replace(\"]\",\"\"),f=f.split(\"[\"),R=s(t,f[0].length+f[1].length,r,f[1].length)):R=s(t,f.length,r),h=R.split(\".\")[0],R.split(\".\")[1].length){var W=o?P+o:y[v].delimiters.decimal;R=W+R.split(\".\")[1]}else R=\"\";O&&0===Number(R.slice(1))&&(R=\"\")}else h=s(t,null,r);return h.indexOf(\"-\")>-1&&(h=h.slice(1),G=!0),h.length-1&&(h=h.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+y[v].delimiters.thousands)),0===e.indexOf(\".\")&&(h=\"\"),x=e.indexOf(\"(\"),M=e.indexOf(\"-\"),q=x2)&&(n.length<2?!!n[0].match(/^\\d+.*\\d$/)&&!n[0].match(a):1===n[0].length?!!n[0].match(/^\\d+$/)&&!n[0].match(a)&&!!n[1].match(/^\\d+$/):!!n[0].match(/^\\d+.*\\d$/)&&!n[0].match(a)&&!!n[1].match(/^\\d+$/)))))},e.exports={format:d}},{}],_process:[function(t,e,r){function o(){throw new Error(\"setTimeout has not been defined\")}function i(){throw new Error(\"clearTimeout has not been defined\")}function n(t){if(_===setTimeout)return setTimeout(t,0);if((_===o||!_)&&setTimeout)return _=setTimeout,setTimeout(t,0);try{return _(t,0)}catch(e){try{return _.call(null,t,0)}catch(e){return _.call(this,t,0)}}}function s(t){if(p===clearTimeout)return clearTimeout(t);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){m&&d&&(m=!1,d.length?f=d.concat(f):y=-1,f.length&&l())}function l(){if(!m){var t=n(a);m=!0;for(var e=f.length;e;){for(d=f,f=[];++y1)for(var r=1;r2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},{}],\"proj4/lib/common/tsfnz\":[function(t,e,r){var o=Math.PI/2;e.exports=function(t,e,r){var i=t*r,n=.5*t;return i=Math.pow((1-i)/(1+i),n),Math.tan(.5*(o-e))/i}},{}],\"proj4/lib/constants/Datum\":[function(t,e,r){r.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},r.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},r.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},r.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},r.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},r.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},r.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},r.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},r.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},r.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},r.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},r.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},r.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},r.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},r.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},r.rnb72={towgs84:\"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",ellipse:\"intl\",datumName:\"Reseau National Belge 1972\"}},{}],\"proj4/lib/constants/Ellipsoid\":[function(t,e,r){r.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},r.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},r.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},r.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},r.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},r.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},r.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},r.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},r.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},r.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},r.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},r.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},r.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},r.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},r.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},r.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},r.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},r.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},r.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},r.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},r.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},r.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},r.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},r.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},r.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},r.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},r.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},r.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},r.hough={a:6378270,rf:297,ellipseName:\"Hough\"},r.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},r.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},r.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},r.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},r.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},r.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},r.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},r.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},r.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},r.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},r.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},r.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},r.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},r.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},{}],\"proj4/lib/constants/PrimeMeridian\":[function(t,e,r){r.greenwich=0,r.lisbon=-9.131906111111,r.paris=2.337229166667,r.bogota=-74.080916666667,r.madrid=-3.687938888889,r.rome=12.452333333333,r.bern=7.439583333333,r.jakarta=106.807719444444,r.ferro=-17.666666666667,r.brussels=4.367975,r.stockholm=18.058277777778,r.athens=23.7163375,r.oslo=10.722916666667},{}],\"proj4/lib/constants/units\":[function(t,e,r){r.ft={to_meter:.3048},r[\"us-ft\"]={to_meter:1200/3937}},{}],\"proj4/lib/core\":[function(t,e,r){function o(t,e,r){var o;return Array.isArray(r)?(o=a(t,e,r),3===r.length?[o.x,o.y,o.z]:[o.x,o.y]):a(t,e,r)}function i(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function n(t,e,r){t=i(t);var n,s=!1;return\"undefined\"==typeof e?(e=t,t=l,s=!0):(\"undefined\"!=typeof e.x||Array.isArray(e))&&(r=e,e=t,t=l,s=!0),e=i(e),r?o(t,e,r):(n={forward:function(r){return o(t,e,r)},inverse:function(r){return o(e,t,r)}},s&&(n.oProj=e),n)}var s=t(\"./Proj\"),a=t(\"./transform\"),l=s(\"WGS84\");e.exports=n},{\"./Proj\":\"proj4/lib/Proj\",\"./transform\":\"proj4/lib/transform\"}],\"proj4/lib/datum\":[function(t,e,r){function o(t,e,r,o,u,c){var _={};return _.datum_type=s,t&&\"none\"===t&&(_.datum_type=a),e&&(_.datum_params=e.map(parseFloat),0===_.datum_params[0]&&0===_.datum_params[1]&&0===_.datum_params[2]||(_.datum_type=i),_.datum_params.length>3&&(0===_.datum_params[3]&&0===_.datum_params[4]&&0===_.datum_params[5]&&0===_.datum_params[6]||(_.datum_type=n,_.datum_params[3]*=l,_.datum_params[4]*=l,_.datum_params[5]*=l,_.datum_params[6]=_.datum_params[6]/1e6+1))),_.a=r,_.b=o,_.es=u,_.ep2=c,_}var i=1,n=2,s=4,a=5,l=484813681109536e-20;e.exports=o},{}],\"proj4/lib/datumUtils\":[function(t,e,r){\"use strict\";var o=1,i=2,n=Math.PI/2;r.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(t.datum_type===o?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))},r.geodeticToGeocentric=function(t,e,r){var o,i,s,a,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-n&&u>-1.001*n)u=-n;else if(u>n&&u<1.001*n)u=n;else if(u<-n||u>n)return null;return l>Math.PI&&(l-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),s=i*i,o=r/Math.sqrt(1-e*s),{x:(o+c)*a*Math.cos(l),y:(o+c)*a*Math.sin(l),z:(o*(1-e)+c)*i}},r.geocentricToGeodetic=function(t,e,r,o){var i,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w=1e-12,x=w*w,k=30,M=t.x,j=t.y,T=t.z?t.z:0;if(i=Math.sqrt(M*M+j*j),s=Math.sqrt(M*M+j*j+T*T),i/rx&&y-1})}function s(t){return\"+\"===t[0]}function a(t){return o(t)?i(t)?l[t]:n(t)?u(t):s(t)?c(t):void 0:t}var l=t(\"./defs\"),u=t(\"./wkt\"),c=t(\"./projString\"),_=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];e.exports=a},{\"./defs\":\"proj4/lib/defs\",\"./projString\":\"proj4/lib/projString\",\"./wkt\":\"proj4/lib/wkt\"}],\"proj4/lib/projString\":[function(t,e,r){var o=.017453292519943295,i=t(\"./constants/PrimeMeridian\"),n=t(\"./constants/units\");e.exports=function(t){var e,r,s,a={},l=t.split(\"+\").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var r=e.split(\"=\");return r.push(!0),t[r[0].toLowerCase()]=r[1],t},{}),u={proj:\"projName\",datum:\"datumCode\",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*o},lat_1:function(t){a.lat1=t*o},lat_2:function(t){a.lat2=t*o},lat_ts:function(t){a.lat_ts=t*o},lon_0:function(t){a.long0=t*o},lon_1:function(t){a.long1=t*o},lon_2:function(t){a.long2=t*o},alpha:function(t){a.alpha=parseFloat(t)*o},lonc:function(t){a.longc=t*o},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,n[t]&&(a.to_meter=n[t].to_meter)},from_greenwich:function(t){a.from_greenwich=t*o},pm:function(t){a.from_greenwich=(i[t]?i[t]:parseFloat(t))*o},nadgrids:function(t){\"@null\"===t?a.datumCode=\"none\":a.nadgrids=t},axis:function(t){var e=\"ewnsud\";3===t.length&&e.indexOf(t.substr(0,1))!==-1&&e.indexOf(t.substr(1,1))!==-1&&e.indexOf(t.substr(2,1))!==-1&&(a.axis=t)}};for(e in l)r=l[e],e in u?(s=u[e],\"function\"==typeof s?s(r):a[s]=r):a[e]=r;return\"string\"==typeof a.datumCode&&\"WGS84\"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},{\"./constants/PrimeMeridian\":\"proj4/lib/constants/PrimeMeridian\",\"./constants/units\":\"proj4/lib/constants/units\"}],\"proj4/lib/projections\":[function(t,e,r){function o(t,e){var r=s.length;return t.names?(s[r]=t,t.names.forEach(function(t){n[t.toLowerCase()]=r}),this):(console.log(e),!0)}var i=[t(\"./projections/merc\"),t(\"./projections/longlat\")],n={},s=[];r.add=o,r.get=function(t){if(!t)return!1;var e=t.toLowerCase();return\"undefined\"!=typeof n[e]&&s[n[e]]?s[n[e]]:void 0},r.start=function(){i.forEach(o)}},{\"./projections/longlat\":\"proj4/lib/projections/longlat\",\"./projections/merc\":\"proj4/lib/projections/merc\"}],\"proj4/lib/projections/longlat\":[function(t,e,r){function o(t){return t}r.init=function(){},r.forward=o,r.inverse=o,r.names=[\"longlat\",\"identity\"]},{}],\"proj4/lib/projections/merc\":[function(t,e,r){var o=t(\"../common/msfnz\"),i=Math.PI/2,n=1e-10,s=57.29577951308232,a=t(\"../common/adjust_lon\"),l=Math.PI/4,u=t(\"../common/tsfnz\"),c=t(\"../common/phi2z\");r.init=function(){var t=this.b/this.a;this.es=1-t*t,\"x0\"in this||(this.x0=0),\"y0\"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=o(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},r.forward=function(t){var e=t.x,r=t.y;if(r*s>90&&r*s<-90&&e*s>180&&e*s<-180)return null;var o,c;if(Math.abs(Math.abs(r)-i)<=n)return null;if(this.sphere)o=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*r));else{var _=Math.sin(r),p=u(this.e,r,_);o=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0-this.a*this.k0*Math.log(p)}return t.x=o,t.y=c,t},r.inverse=function(t){var e,r,o=t.x-this.x0,n=t.y-this.y0;if(this.sphere)r=i-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var s=Math.exp(-n/(this.a*this.k0));if(r=c(this.e,s),r===-9999)return null}return e=a(this.long0+o/(this.a*this.k0)),t.x=e,t.y=r,t},r.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},{\"../common/adjust_lon\":\"proj4/lib/common/adjust_lon\",\"../common/msfnz\":\"proj4/lib/common/msfnz\",\"../common/phi2z\":\"proj4/lib/common/phi2z\",\"../common/tsfnz\":\"proj4/lib/common/tsfnz\"}],\"proj4/lib/transform\":[function(t,e,r){function o(t,e){return(t.datum.datum_type===s||t.datum.datum_type===a)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===s||e.datum.datum_type===a)&&\"WGS84\"!==t.datumCode}var i=.017453292519943295,n=57.29577951308232,s=1,a=2,l=t(\"./datum_transform\"),u=t(\"./adjust_axis\"),c=t(\"./Proj\"),_=t(\"./common/toPoint\");e.exports=function p(t,e,r){var s;return Array.isArray(r)&&(r=_(r)),t.datum&&e.datum&&o(t,e)&&(s=new c(\"WGS84\"),r=p(t,s,r),t=s),\"enu\"!==t.axis&&(r=u(t,!1,r)),\"longlat\"===t.projName?r={x:r.x*i,y:r.y*i}:(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter}),r=t.inverse(r)),t.from_greenwich&&(r.x+=t.from_greenwich),r=l(t.datum,e.datum,r),e.from_greenwich&&(r={x:r.x-e.grom_greenwich,y:r.y}),\"longlat\"===e.projName?r={x:r.x*n,y:r.y*n}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter})),\"enu\"!==e.axis?u(e,!0,r):r}},{\"./Proj\":\"proj4/lib/Proj\",\"./adjust_axis\":\"proj4/lib/adjust_axis\",\"./common/toPoint\":\"proj4/lib/common/toPoint\",\"./datum_transform\":\"proj4/lib/datum_transform\"}],\"proj4/lib/wkt\":[function(t,e,r){function o(t,e,r){t[e]=r.map(function(t){var e={};return i(t,e),e}).reduce(function(t,e){return u(t,e)},{})}function i(t,e){var r;return Array.isArray(t)?(r=t.shift(),\"PARAMETER\"===r&&(r=t.shift()),1===t.length?Array.isArray(t[0])?(e[r]={},i(t[0],e[r])):e[r]=t[0]:t.length?\"TOWGS84\"===r?e[r]=t:(e[r]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(r)>-1?(e[r]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[r].auth=t[2])):\"SPHEROID\"===r?(e[r]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[r].auth=t[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(r)>-1?(t[0]=[\"name\",t[0]],o(e,r,t)):t.every(function(t){return Array.isArray(t)})?o(e,r,t):i(t,e[r])):e[r]=!0,void 0):void(e[t]=!0)}function n(t,e){var r=e[0],o=e[1];!(r in t)&&o in t&&(t[r]=t[o],3===e.length&&(t[r]=e[2](t[r])))}function s(t){return t*l}function a(t){function e(e){var r=t.to_meter||1;return parseFloat(e,10)*r}\"GEOGCS\"===t.type?t.projName=\"longlat\":\"LOCAL_CS\"===t.type?(t.projName=\"identity\",t.local=!0):\"object\"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),\"metre\"===t.units&&(t.units=\"meter\"),t.UNIT.convert&&(\"GEOGCS\"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),\"d_\"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==t.datumCode&&\"new_zealand_1949\"!==t.datumCode||(t.datumCode=\"nzgd49\"),\"wgs_1984\"===t.datumCode&&(\"Mercator_Auxiliary_Sphere\"===t.PROJECTION&&(t.sphere=!0),t.datumCode=\"wgs84\"),\"_ferro\"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),\"_jakarta\"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf(\"belge\")&&(t.datumCode=\"rnb72\"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps=\"intl\"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf(\"osgb_1936\")&&(t.datumCode=\"osgb36\")),t.b&&!isFinite(t.b)&&(t.b=t.a);var r=function(e){return n(t,e)},o=[[\"standard_parallel_1\",\"Standard_Parallel_1\"],[\"standard_parallel_2\",\"Standard_Parallel_2\"],[\"false_easting\",\"False_Easting\"],[\"false_northing\",\"False_Northing\"],[\"central_meridian\",\"Central_Meridian\"],[\"latitude_of_origin\",\"Latitude_Of_Origin\"],[\"latitude_of_origin\",\"Central_Parallel\"],[\"scale_factor\",\"Scale_Factor\"],[\"k0\",\"scale_factor\"],[\"latitude_of_center\",\"Latitude_of_center\"],[\"lat0\",\"latitude_of_center\",s],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",s],[\"x0\",\"false_easting\",e],[\"y0\",\"false_northing\",e],[\"long0\",\"central_meridian\",s],[\"lat0\",\"latitude_of_origin\",s],[\"lat0\",\"standard_parallel_1\",s],[\"lat1\",\"standard_parallel_1\",s],[\"lat2\",\"standard_parallel_2\",s],[\"alpha\",\"azimuth\",s],[\"srsCode\",\"name\"]];o.forEach(r),t.long0||!t.longc||\"Albers_Conic_Equal_Area\"!==t.projName&&\"Lambert_Azimuthal_Equal_Area\"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||\"Stereographic_South_Pole\"!==t.projName&&\"Polar Stereographic (variant B)\"!==t.projName||(t.lat0=s(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var l=.017453292519943295,u=t(\"./extend\");e.exports=function(t,e){var r=JSON.parse((\",\"+t).replace(/\\s*\\,\\s*([A-Z_0-9]+?)(\\[)/g,',[\"$1\",').slice(1).replace(/\\s*\\,\\s*([A-Z_0-9]+?)\\]/g,',\"$1\"]').replace(/,\\[\"VERTCS\".+/,\"\")),o=r.shift(),n=r.shift();r.unshift([\"name\",n]),r.unshift([\"type\",o]),r.unshift(\"output\");var s={};return i(r,s),a(s.output),u(e,s.output)}},{\"./extend\":\"proj4/lib/extend\"}],\"quickselect/index\":[function(t,e,r){\"use strict\";function o(t,e,r,s,a){for(r=r||0,s=s||t.length-1,a=a||n;s>r;){if(s-r>600){var l=s-r+1,u=e-r+1,c=Math.log(l),_=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*_*(l-_)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(e-u*_/l+p)),d=Math.min(s,Math.floor(e+(l-u)*_/l+p));o(t,e,h,d,a)}var f=t[e],m=r,y=s;for(i(t,r,e),a(t[s],f)>0&&i(t,r,s);m0;)y--}0===a(t[r],f)?i(t,r,y):(y++,i(t,y,s)),y<=e&&(r=y+1),e<=y&&(s=y-1)}}function i(t,e,r){var o=t[e];t[e]=t[r],t[r]=o}function n(t,e){return te?1:0}e.exports=o},{}],rbush:[function(t,e,r){\"use strict\";function o(t,e){return this instanceof o?(this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),void this.clear()):new o(t,e)}function i(t,e,r){if(!r)return e.indexOf(t);for(var o=0;o=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function y(t,e,r,o,i){for(var n,s=[e,r];s.length;)r=s.pop(),e=s.pop(),r-e<=o||(n=e+Math.ceil((r-e)/o/2)*o,g(t,n,e,r,i),s.push(e,n,n,r))}e.exports=o;var g=t(\"quickselect\");o.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],o=this.toBBox;if(!f(t,e))return r;for(var i,n,s,a,l=[];e;){for(i=0,n=e.children.length;i=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},_split:function(t,e){var r=t[e],o=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,o);var s=this._chooseSplitIndex(r,i,o),a=m(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,n(r,this.toBBox),n(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){\n", " var o,i,n,a,l,u,_,p;for(u=_=1/0,o=e;o<=r-e;o++)i=s(t,0,o,this.toBBox),n=s(t,o,r,this.toBBox),a=h(i,n),l=c(i)+c(n),a=e;i--)n=t.children[i],a(c,t.leaf?l(n):n),p+=_(c);return p},_adjustParentBBoxes:function(t,e,r){for(var o=r;o>=0;o--)a(e[o],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children,e.splice(e.indexOf(t[r]),1)):this.clear():n(t[r],this.toBBox)},_initFormat:function(t){var e=[\"return a\",\" - b\",\";\"];this.compareMinX=new Function(\"a\",\"b\",e.join(t[0])),this.compareMinY=new Function(\"a\",\"b\",e.join(t[1])),this.toBBox=new Function(\"a\",\"return {minX: a\"+t[0]+\", minY: a\"+t[1]+\", maxX: a\"+t[2]+\", maxY: a\"+t[3]+\"};\")}}},{quickselect:\"quickselect/index\"}],sprintf:[function(t,e,r){/**\n", " sprintf() for JavaScript 0.7-beta1\n", " http://www.diveintojavascript.com/projects/javascript-sprintf\n", " \n", " Copyright (c) Alexandru Marasteanu \n", " All rights reserved.\n", " \n", " Redistribution and use in source and binary forms, with or without\n", " modification, are permitted provided that the following conditions are met:\n", " * Redistributions of source code must retain the above copyright\n", " notice, this list of conditions and the following disclaimer.\n", " * Redistributions in binary form must reproduce the above copyright\n", " notice, this list of conditions and the following disclaimer in the\n", " documentation and/or other materials provided with the distribution.\n", " * Neither the name of sprintf() for JavaScript nor the\n", " names of its contributors may be used to endorse or promote products\n", " derived from this software without specific prior written permission.\n", " \n", " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n", " ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n", " WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n", " DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY\n", " DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n", " (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n", " LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n", " ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n", " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n", " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", " \n", " \n", " Changelog:\n", " 2010.11.07 - 0.7-beta1-node\n", " - converted it to a node.js compatible module\n", " \n", " 2010.09.06 - 0.7-beta1\n", " - features: vsprintf, support for named placeholders\n", " - enhancements: format cache, reduced global namespace pollution\n", " \n", " 2010.05.22 - 0.6:\n", " - reverted to 0.4 and fixed the bug regarding the sign of the number 0\n", " Note:\n", " Thanks to Raphael Pigulla (http://www.n3rd.org/)\n", " who warned me about a bug in 0.5, I discovered that the last update was\n", " a regress. I appologize for that.\n", " \n", " 2010.05.09 - 0.5:\n", " - bug fix: 0 is now preceeded with a + sign\n", " - bug fix: the sign was not at the right position on padded results (Kamal Abdali)\n", " - switched from GPL to BSD license\n", " \n", " 2007.10.21 - 0.4:\n", " - unit test and patch (David Baird)\n", " \n", " 2007.09.17 - 0.3:\n", " - bug fix: no longer throws exception on empty paramenters (Hans Pufal)\n", " \n", " 2007.09.11 - 0.2:\n", " - feature: added argument swapping\n", " \n", " 2007.04.03 - 0.1:\n", " - initial release\n", " **/\n", " var o=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function e(t,e){for(var r=[];e>0;r[--e]=t);return r.join(\"\")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.object_stringify=function(t,e,o,i){var n=\"\";if(null!=t)switch(typeof t){case\"function\":return\"[Function\"+(t.name?\": \"+t.name:\"\")+\"]\";case\"object\":if(t instanceof Error)return\"[\"+t.toString()+\"]\";if(e>=o)return\"[Object]\";if(i&&(i=i.slice(0),i.push(t)),null!=t.length){n+=\"[\";var s=[];for(var a in t)i&&i.indexOf(t[a])>=0?s.push(\"[Circular]\"):s.push(r.object_stringify(t[a],e+1,o,i));n+=s.join(\", \")+\"]\"}else{if(\"getMonth\"in t)return\"Date(\"+t+\")\";n+=\"{\";var s=[];for(var l in t)t.hasOwnProperty(l)&&(i&&i.indexOf(t[l])>=0?s.push(l+\": [Circular]\"):s.push(l+\": \"+r.object_stringify(t[l],e+1,o,i)));n+=s.join(\", \")+\"}\"}return n;case\"string\":return'\"'+t+'\"'}return\"\"+t},r.format=function(i,n){var s,a,l,u,c,_,p,h=1,d=i.length,f=\"\",m=[];for(a=0;a=0?\"+\"+s:s,_=u[4]?\"0\"==u[4]?\"0\":u[4].charAt(1):\" \",p=u[6]-String(s).length,c=u[6]?e(_,p):\"\",m.push(u[5]?s+c:c+s)}return m.join(\"\")},r.cache={},r.parse=function(t){for(var e=t,r=[],o=[],i=0;e;){if(null!==(r=/^[^\\x25]+/.exec(e)))o.push(r[0]);else if(null!==(r=/^\\x25{2}/.exec(e)))o.push(\"%\");else{if(null===(r=/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosOuxX])/.exec(e)))throw new Error(\"[sprintf] \"+e);if(r[2]){i|=1;var n=[],s=r[2],a=[];if(null===(a=/^([a-z_][a-z_\\d]*)/i.exec(s)))throw new Error(\"[sprintf] \"+s);for(n.push(a[1]);\"\"!==(s=s.substring(a[0].length));)if(null!==(a=/^\\.([a-z_][a-z_\\d]*)/i.exec(s)))n.push(a[1]);else{if(null===(a=/^\\[(\\d+)\\]/.exec(s)))throw new Error(\"[sprintf] \"+s);n.push(a[1])}r[2]=n}else i|=2;if(3===i)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");o.push(r)}e=e.substring(r[0].length)}return o},r}(),i=function(t,e){var r=e.slice();return r.unshift(t),o.apply(null,r)};e.exports=o,o.sprintf=o,o.vsprintf=i},{}],\"timezone/index\":[function(e,r,o){!function(e){\"object\"==typeof r&&r.exports?r.exports=e():\"function\"==typeof t?t(e):this.tz=e()}(function(){function t(t,e,r){var o,i=e.day[1];do o=new Date(Date.UTC(r,e.month,Math.abs(i++)));while(e.day[0]<7&&o.getUTCDay()!=e.day[0]);return o={clock:e.clock,sort:o.getTime(),rule:e,save:6e4*e.save,offset:t.offset},o[o.clock]=o.sort+6e4*e.time,o.posix?o.wallclock=o[o.clock]+(t.offset+e.saved):o.posix=o[o.clock]-(t.offset+e.saved),o}function e(e,r,o){var i,n,s,a,l,u,c,_=e[e.zone],p=[],h=new Date(o).getUTCFullYear(),d=1;for(i=1,n=_.length;i=h-d;--c)for(i=0,n=u.length;i=p[i][r]&&p[i][p[i].clock]>s[p[i].clock]&&(a=p[i])}return a&&((l=/^(.*)\\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function r(t,r){return\"UTC\"==t.zone?r:(t.entry=e(t,\"posix\",r),r+t.entry.offset+t.entry.save)}function o(t,r){if(\"UTC\"==t.zone)return r;var o,i;return t.entry=o=e(t,\"wallclock\",r),i=r-o.wallclock,09)e+=a*_[l-10];else{if(n=new Date(r(t,e)),l<7)for(;a;)n.setUTCDate(n.getUTCDate()+s),n.getUTCDay()==l&&(a-=s);else 7==l?n.setUTCFullYear(n.getUTCFullYear()+a):8==l?n.setUTCMonth(n.getUTCMonth()+a):n.setUTCDate(n.getUTCDate()+a);null==(e=o(t,n.getTime()))&&(e=o(t,n.getTime()+864e5*s)-864e5*s)}return e}function n(t){if(!t.length)return\"1.0.6\";var e,n,s,a,l,u=Object.create(this),_=[];for(e=0;e=i?Math.floor((r-i)/7)+1:0}function a(t){var e,r,o;return r=t.getUTCFullYear(),e=new Date(Date.UTC(r,0)).getUTCDay(),o=s(t,1)+(e>1&&e<=4?1:0),o?53!=o||4==e||3==e&&29==new Date(r,1,29).getDate()?[o,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(r=t.getUTCFullYear()-1,e=new Date(Date.UTC(r,0)).getUTCDay(),o=4==e||3==e&&29==new Date(r,1,29).getDate()?53:52,[o,t.getUTCFullYear()-1])}var l={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(t,e,r,o){var i,n,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],u=3600;for(i=0;i<3;i++)l.push((\"0\"+Math.floor(a/u)).slice(-2)),a%=u,u/=60;return\"^\"!=r||s?(\"^\"==r&&(o=3),3==o?(n=l.join(\":\"),n=n.replace(/:00$/,\"\"),\"^\"!=r&&(n=n.replace(/:00$/,\"\"))):o?(n=l.slice(0,o+1).join(\":\"),\"^\"==r&&(n=n.replace(/:00$/,\"\"))):n=l.slice(0,2).join(\"\"),n=(s<0?\"-\":\"+\")+n,n=n.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[r]||\"$1$2\")):\"Z\"},\"%\":function(t){return\"%\"},n:function(t){return\"\\n\"},t:function(t){return\"\\t\"},U:function(t){return s(t,0)},W:function(t){return s(t,1)},V:function(t){return a(t)[0]},G:function(t){return a(t)[1]},g:function(t){return a(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,\"%H:%M\"])},T:function(t,e){return this.convert([e,\"%H:%M:%S\"])},D:function(t,e){return this.convert([e,\"%m/%d/%y\"])},F:function(t,e){return this.convert([e,\"%Y-%m-%d\"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||\"%I:%M:%S\"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:n,locale:\"en_US\",en_US:{date:\"%m/%d/%Y\",time24:\"%I:%M:%S %p\",time12:\"%I:%M:%S %p\",dateTime:\"%a %d %b %Y %I:%M:%S %p %Z\",meridiem:[\"AM\",\"PM\"],month:{abbrev:\"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec\".split(\"|\"),full:\"January|February|March|April|May|June|July|August|September|October|November|December\".split(\"|\")},day:{abbrev:\"Sun|Mon|Tue|Wed|Thu|Fri|Sat\".split(\"|\"),full:\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday\".split(\"|\")}}},u=\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond\",c=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+u+\")s?\\\\s*$\",\"i\"),_=[36e5,6e4,1e3,1];return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,function(t){l[t].pad=2}),l.N.pad=9,l.j.pad=3,l.k.style=\"_\",l.l.style=\"_\",l.e.style=\"_\",function(){return l.convert(arguments)}})},{}],\"tslib/tslib\":[function(e,r,o){(function(e){/*! *****************************************************************************\n", " Copyright (c) Microsoft Corporation. All rights reserved.\n", " Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n", " this file except in compliance with the License. You may obtain a copy of the\n", " License at http://www.apache.org/licenses/LICENSE-2.0\n", " \n", " THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n", " KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\n", " WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n", " MERCHANTABLITY OR NON-INFRINGEMENT.\n", " \n", " See the Apache Version 2.0 License for specific language governing permissions\n", " and limitations under the License.\n", " ***************************************************************************** */\n", " var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g;!function(o){function i(t,e){return function(r,o){return t[r]=e?e(r,o):o}}var n=\"object\"==typeof e?e:\"object\"==typeof self?self:\"object\"==typeof this?this:{};\"function\"==typeof t&&t.amd?t(\"tslib\",[\"exports\"],function(t){o(i(n,i(t)))}):o(\"object\"==typeof r&&\"object\"==typeof r.exports?i(n,i(r.exports)):i(n))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};o=function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)},i=Object.assign||function(t){for(var e,r=1,o=arguments.length;r=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,r,s):i(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},a=function(t,e){return function(r,o){e(r,o,t)}},l=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},u=function(t,e,r,o){return new(r||(r=Promise))(function(i,n){function s(t){try{l(o.next(t))}catch(e){n(e)}}function a(t){try{l(o[\"throw\"](t))}catch(e){n(e)}}function l(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}l((o=o.apply(t,e||[])).next())})},c=function(t,e){function r(t){return function(e){return o([t,e])}}function o(r){if(i)throw new TypeError(\"Generator is already executing.\");for(;l;)try{if(i=1,n&&(s=n[2&r[0]?\"return\":r[0]?\"throw\":\"next\"])&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,n=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},h=function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,i,n=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n[\"return\"])&&r.call(n)}finally{if(i)throw i.error}}return s},d=function(){for(var t=[],e=0;e1||i(t,e)})})}function i(t,e){try{n(c[t](e))}catch(r){l(_[0][3],r)}}function n(t){t.value instanceof f?Promise.resolve(t.value.v).then(s,a):l(_[0][2],t)}function s(t){i(\"next\",t)}function a(t){i(\"throw\",t)}function l(t,e){t(e),_.shift(),_.length&&i(_[0][0],_[0][1])}if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var u,c=r.apply(t,e||[]),_=[];return u={},o(\"next\"),o(\"throw\"),o(\"return\"),u[Symbol.asyncIterator]=function(){return this},u},y=function(t){function e(e,i){t[e]&&(r[e]=function(r){return(o=!o)?{value:f(t[e](r)),done:\"return\"===e}:i?i(r):r})}var r,o;return r={},e(\"next\"),e(\"throw\",function(t){throw t}),e(\"return\"),r[Symbol.iterator]=function(){return this},r},g=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e=t[Symbol.asyncIterator];return e?e.call(t):\"function\"==typeof p?p(t):t[Symbol.iterator]()},t(\"__extends\",o),t(\"__assign\",i),t(\"__rest\",n),t(\"__decorate\",s),t(\"__param\",a),t(\"__metadata\",l),t(\"__awaiter\",u),t(\"__generator\",c),t(\"__exportStar\",_),t(\"__values\",p),t(\"__read\",h),t(\"__spread\",d),t(\"__await\",f),t(\"__asyncGenerator\",m),t(\"__asyncDelegator\",y),t(\"__asyncValues\",g)})}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[\"main\"])}();/*\n", " Copyright (c) 2012, Continuum Analytics, 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 Continuum Analytics 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", " /* END bokeh.min.js */\n", " },\n", " \n", " function(Bokeh) {\n", " /* BEGIN bokeh-widgets.min.js */\n", " !function(){var define=void 0;return function(e,t,i){if(null==Bokeh)throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");for(var n in e)Bokeh.require.modules[n]=e[n];for(var o=0;o',t.prototype.renderEditor=function(){var e;return e=this.model.completions,0!==e.length&&(this.$input.autocomplete({source:e}),this.$input.autocomplete(\"widget\").addClass(\"bk-cell-editor-completion\")),this.$input.focus().select()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t}(i.CellEditorView),i.StringEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"StringEditor\",t.prototype.default_view=i.StringEditorView,t.define({completions:[s.Array,[]]}),t}(i.CellEditor),i.TextEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TextEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TextEditor\",t.prototype.default_view=i.TextEditorView,t}(i.CellEditor),i.SelectEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input=\"',t.prototype.renderEditor=function(){return this.focus()},t.prototype.loadValue=function(e){return this.defaultValue=!!e[this.args.column.field],this.$input.prop(\"checked\",this.defaultValue)},t.prototype.serializeValue=function(){return this.$input.prop(\"checked\")},t}(i.CellEditorView),i.CheckboxEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"CheckboxEditor\",t.prototype.default_view=i.CheckboxEditorView,t}(i.CellEditor),i.IntEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner(\"destroy\"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid integer\"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.IntEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"IntEditor\",t.prototype.default_view=i.IntEditorView,t.define({step:[s.Number,1]}),t}(i.CellEditor),i.NumberEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner(\"destroy\"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid number\"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.NumberEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"NumberEditor\",t.prototype.default_view=i.NumberEditorView,t.define({step:[s.Number,.01]}),t}(i.CellEditor),i.TimeEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TimeEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TimeEditor\",t.prototype.default_view=i.TimeEditorView,t}(i.CellEditor),i.DateEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.emptyValue=new Date,t.prototype.input='',t.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:\"button\",buttonImageOnly:!0,beforeShow:function(e){return function(){return e.calendarOpen=!0}}(this),onClose:function(e){return function(){return e.calendarOpen=!1}}(this)}),this.$input.siblings(\".bk-ui-datepicker-trigger\").css({\"vertical-align\":\"middle\"}),this.$input.width(this.$input.width()-26),this.$input.focus().select()},t.prototype.destroy=function(){return r.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker(\"hide\"),this.$input.datepicker(\"destroy\"),t.__super__.destroy.call(this)},t.prototype.show=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).show(),t.__super__.show.call(this)},t.prototype.hide=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).hide(),t.__super__.hide.call(this)},t.prototype.position=function(e){return this.calendarOpen&&r.datepicker.dpDiv.css({top:e.top+30,left:e.left}),t.__super__.position.call(this)},t.prototype.getValue=function(){return this.$input.datepicker(\"getDate\").getTime()},t.prototype.setValue=function(e){return this.$input.datepicker(\"setDate\",new Date(e))},t}(i.CellEditorView),i.DateEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateEditor\",t.prototype.default_view=i.DateEditorView,t}(i.CellEditor)},{\"../../model\":\"model\",\"./data_table\":\"models/widgets/data_table\",\"./jqueryable\":\"models/widgets/jqueryable\",\"core/dom_view\":void 0,\"core/properties\":void 0,\"core/util/object\":void 0,jquery:\"jquery\",\"jquery-ui/autocomplete\":\"jquery-ui/autocomplete\",\"jquery-ui/spinner\":\"jquery-ui/spinner\"}],\"models/widgets/cell_formatters\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\"),s=e(\"numbro\"),a=e(\"underscore.template\"),l=e(\"core/properties\"),u=e(\"core/util/object\"),c=e(\"core/util/types\"),d=e(\"../../model\");i.CellFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.doFormat=function(e,t,i,n,o){return null===i?\"\":(i+\"\").replace(/&/g,\"&\").replace(//g,\">\")},t}(d.Model),i.StringFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"StringFormatter\",t.define({font_style:[l.FontStyle,\"normal\"],text_align:[l.TextAlign,\"left\"],text_color:[l.Color]}),t.prototype.doFormat=function(e,i,n,o,s){var a,l,u,c;if(l=t.__super__.doFormat.call(this,e,i,n,o,s),a=this.font_style,u=this.text_align,c=this.text_color,null!=a||null!=u||null!=c){switch(l=r(\"\"+l+\"\"),a){case\"bold\":l=l.css(\"font-weight\",\"bold\");break;case\"italic\":l=l.css(\"font-style\",\"italic\")}null!=u&&(l=l.css(\"text-align\",u)),null!=c&&(l=l.css(\"color\",c)),l=l.prop(\"outerHTML\")}return l},t}(i.CellFormatter),i.NumberFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"NumberFormatter\",t.define({format:[l.String,\"0,0\"],language:[l.String,\"en\"],rounding:[l.String,\"round\"]}),t.prototype.doFormat=function(e,i,n,o,r){var a,l,u;return a=this.format,l=this.language,u=function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}.call(this),n=s.format(n,a,l,u),t.__super__.doFormat.call(this,e,i,n,o,r)},t}(i.StringFormatter),i.BooleanFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"BooleanFormatter\",t.define({icon:[l.String,\"check\"]}),t.prototype.doFormat=function(e,t,i,n,o){return i?r(\"\").addClass(this.icon).html():\"\"},t}(i.CellFormatter),i.DateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateFormatter\",t.define({format:[l.String,\"yy M d\"]}),t.prototype.getFormat=function(){var e,t;return e=this.format,t=function(){switch(e){case\"ATOM\":case\"W3C\":case\"RFC-3339\":case\"ISO-8601\":return\"ISO-8601\";case\"COOKIE\":return\"COOKIE\";case\"RFC-850\":return\"RFC-850\";case\"RFC-1036\":return\"RFC-1036\";case\"RFC-1123\":return\"RFC-1123\";case\"RFC-2822\":return\"RFC-2822\";case\"RSS\":case\"RFC-822\":return\"RFC-822\";case\"TICKS\":return\"TICKS\";case\"TIMESTAMP\":return\"TIMESTAMP\";default:return null}}(),null!=t?r.datepicker[t]:e},t.prototype.doFormat=function(e,i,n,o,s){var a;return n=c.isString(n)?parseInt(n,10):n,a=r.datepicker.formatDate(this.getFormat(),new Date(n)),t.__super__.doFormat.call(this,e,i,a,o,s)},t}(i.CellFormatter),i.HTMLTemplateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"HTMLTemplateFormatter\",t.define({template:[l.String,\"<%= value %>\"]}),t.prototype.doFormat=function(e,t,i,n,o){var r,s;return s=this.template,null===i?\"\":(o=u.extend({},o,{value:i}),(r=a(s))(o))},t}(i.CellFormatter)},{\"../../model\":\"model\",\"core/properties\":void 0,\"core/util/object\":void 0,\"core/util/types\":void 0,jquery:\"jquery\",numbro:\"numbro\",\"underscore.template\":\"underscore.template\"}],\"models/widgets/checkbox_button_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=[].indexOf||function(e){for(var t=0,i=this.length;t').attr({value:\"\"+a}),r.call(n,a)>=0&&e.prop(\"checked\",!0),i=s(''),i.text(u).prepend(e),i.addClass(\"bk-bs-btn-\"+this.model.button_type),r.call(n,a)>=0&&i.addClass(\"bk-bs-active\"),this.$el.find(\".bk-bs-btn-group\").append(i);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],i=e=0,n=o.length;e').attr({value:\"\"+a}),this.model.disabled&&i.prop(\"disabled\",!0),r.call(o,a)>=0&&i.prop(\"checked\",!0),n=s(\"\").text(u).prepend(i),this.model.inline?(n.addClass(\"bk-bs-checkbox-inline\"),this.$el.append(n)):(e=s('
').append(n),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],i=e=0,n=o.length;ei;0<=i?e++:e--)t.push(e);return t}.apply(this)}return e.prototype.getLength=function(){return this.source.get_length()},e.prototype.getItem=function(e){var t,n,o,r,s;for(n={},s=Object.keys(this.source.data),o=0,r=s.length;oi;e=0<=i?++t:--t)n.push(this.getItem(e));return n}.call(this)},e.prototype.sort=function(e){var t,n,o,r;return t=function(){var t,i,o;for(o=[],t=0,i=e.length;th?c:-c,0!==u)return u;return 0})},e.prototype._update_source_inplace=function(){this.source.properties.data.change.emit(this,this.source.attributes.data)},e}(),i.DataTableView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.className=\"bk-data-table\",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.in_selection_update=!1},t.prototype.connect_signals=function(){return this.connect(this.model.change,function(e){return function(){return e.render()}}(this)),this.connect(this.model.source.properties.data.change,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.streaming,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.patching,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.properties.selected.change,function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.data.constructor(this.model.source),this.grid.invalidate(),this.grid.render()},t.prototype.updateSelection=function(){var e,t,i,n,o,r;if(!this.in_selection_update)return n=this.model.source.selected,o=n[\"1d\"].indices,i=function(){var e,t,i;for(i=[],e=0,t=o.length;e\").text(this.model.title),this.input=s(''),this.datepicker=this.input.datepicker({defaultDate:new Date(this.model.value),minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input]),this._prefix_ui(),this},t.prototype.onSelect=function(e,t){var i,n;return i=new Date(e),this.model.value=i.toString(),null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(u.InputWidgetView),i.DatePicker=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DatePicker\",t.prototype.default_view=i.DatePickerView,t.define({value:[l.Any,Date.now()],min_date:[l.Any],max_date:[l.Any]}),t}(u.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"core/dom\":void 0,\"core/properties\":void 0,jquery:\"jquery\",\"jquery-ui/datepicker\":\"jquery-ui/datepicker\"}],\"models/widgets/date_range_slider\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"jqrangeslider/jQDateRangeSlider\");var r=e(\"core/properties\"),s=e(\"core/util/types\"),a=e(\"./input_widget\");i.DateRangeSliderView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(e){return function(){return e.render}}(this))},t.prototype.render=function(){var e,i,n,o,r,a,l,u,c;return t.__super__.render.call(this),this.$el.empty(),r=this.model.value,c=r[0],u=r[1],a=this.model.range,o=a[0],n=a[1],l=this.model.bounds,i=l[0],e=l[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(e)},range:{min:!!s.isObject(o)&&o,max:!!s.isObject(n)&&n},step:this.model.step||{},enabled:this.model.enabled,arrows:this.model.arrows,valueLabels:this.model.value_labels,\n", " wheelMode:this.model.wheel_mode}),this.$el.on(\"userValuesChanged\",function(e){return function(t,i){var n;return e.model.value=[i.values.min,i.values.max],null!=(n=e.model.callback)?n.execute(e.model):void 0}}(this)),this},t}(a.InputWidgetView),i.DateRangeSlider=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateRangeSlider\",t.prototype.default_view=i.DateRangeSliderView,t.define({value:[r.Any],range:[r.Any],bounds:[r.Any],step:[r.Any,{}],enabled:[r.Bool,!0],arrows:[r.Bool,!0],value_labels:[r.String,\"show\"],wheel_mode:[r.Any]}),t}(a.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"core/properties\":void 0,\"core/util/types\":void 0,\"jqrangeslider/jQDateRangeSlider\":\"jqrangeslider/jQDateRangeSlider\"}],\"models/widgets/div\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\"),a=e(\"core/properties\");i.DivView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.div(),this.model.render_as_text?e.textContent=this.model.text:e.innerHTML=this.model.text,this.$el.find(\".bk-markup\").append(e),this},t}(r.MarkupView),i.Div=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Div\",t.prototype.default_view=i.DivView,t.define({render_as_text:[a.Bool,!1]}),t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0,\"core/properties\":void 0}],\"models/widgets/dropdown\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\");e(\"bootstrap/dropdown\");var s=e(\"core/dom\"),a=e(\"core/properties\"),l=e(\"./abstract_button\");i.DropdownView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=function(){var e;return e=s.button({type:\"button\",disabled:this.model.disabled,value:this.model.default_value,\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type,\"bk-bs-dropdown-toggle\"]},this.model.label,\" \",s.span({\"class\":\"bk-bs-caret\"})),e.dataset.bkBsToggle=\"dropdown\",e},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d,h;for(t.__super__.render.call(this),this.el.classList.add(\"bk-bs-dropdown\"),o=[],d=this.model.menu,e=0,l=d.length;e-1;return n.createElement(\"option\",{selected:s,value:i},r)})))}},{\"core/dom\":void 0,\"core/util/types\":void 0}],\"models/widgets/panel\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./widget\"),s=e(\"core/properties\");i.PanelView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.empty(),this},t}(r.WidgetView),i.Panel=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Panel\",t.prototype.default_view=i.PanelView,t.define({title:[s.String,\"\"],child:[s.Instance],closable:[s.Bool,!1]}),t}(r.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0}],\"models/widgets/paragraph\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\");i.ParagraphView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.p({style:{margin:0}},this.model.text),this.$el.find(\".bk-markup\").append(e)},t}(r.MarkupView),i.Paragraph=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Paragraph\",t.prototype.default_view=i.ParagraphView,t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0}],\"models/widgets/pretext\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\");i.PreTextView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.pre({style:{overflow:\"auto\"}},this.model.text),this.$el.find(\".bk-markup\").append(e)},t}(r.MarkupView),i.PreText=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"PreText\",t.prototype.default_view=i.PreTextView,t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0}],\"models/widgets/radio_button_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"bootstrap/button\");var r=e(\"core/dom\"),s=e(\"core/properties\"),a=e(\"core/util/string\"),l=e(\"./widget\"),u=e(\"./button_group_template\");i.RadioButtonGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={\"change input\":\"change_input\"},t.prototype.template=u[\"default\"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e,i,n,o,s,l,u,c,d,h;for(t.__super__.render.call(this),this.$el.empty(),i=this.template(),this.$el.append(i),c=a.uniqueId(\"RadioButtonGroup\"),e=this.model.active,d=this.model.labels,n=s=0,u=d.length;s').attr({name:d,value:\"\"+s}),this.model.disabled&&i.prop(\"disabled\",!0),s===o&&i.prop(\"checked\",!0),n=r(\"\").text(u).prepend(i),this.model.inline?(n.addClass(\"bk-bs-radio-inline\"),this.$el.append(n)):(e=r('
').append(n),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],t=e=0,n=o.length;e=1?\"floor\":\"ceil\"](u/r),d=Math[d>=1?\"floor\":\"ceil\"](d/r),h=Math[h>=1?\"floor\":\"ceil\"](h/r),c.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=t.clientX-_.left,m=t.clientY-_.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=r,t.offsetX=f,t.offsetY=m,t.deltaMode=0,a.unshift(t,u,d,h),o&&clearTimeout(o),o=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function i(){r=null}function n(e,t){return c.settings.adjustOldDeltas&&\"mousewheel\"===e.type&&t%120===0}var o,r,s=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],a=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],l=Array.prototype.slice;if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],t,!1);else this.onmousewheel=t;e.data(this,\"mousewheel-line-height\",c.getLineHeight(this)),e.data(this,\"mousewheel-page-height\",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],t,!1);else this.onmousewheel=null;e.removeData(this,\"mousewheel-line-height\"),e.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(t){var i=e(t),n=i[\"offsetParent\"in e.fn?\"offsetParent\":\"parent\"]();return n.length||(n=e(\"body\")),parseInt(n.css(\"fontSize\"),10)||parseInt(i.css(\"fontSize\"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind(\"mousewheel\",e):this.trigger(\"mousewheel\")},unmousewheel:function(e){return this.unbind(\"mousewheel\",e)}})})},{}],\"jquery-ui/autocomplete\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),e(\"./position\"),e(\"./menu\"),/*!\n", " * jQuery UI Autocomplete 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/autocomplete/\n", " *\n", " * Depends:\n", " *\tjquery.ui.core.js\n", " *\tjquery.ui.widget.js\n", " *\tjquery.ui.position.js\n", " *\tjquery.ui.menu.js\n", " */\n", " function(e,t){e.widget(\"ui.autocomplete\",{version:\"1.10.4\",defaultElement:\"\",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,o=this.element[0].nodeName.toLowerCase(),r=\"textarea\"===o,s=\"input\"===o;this.isMultiLine=!!r||!s&&this.element.prop(\"isContentEditable\"),this.valueMethod=this.element[r||s?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(o){if(this.element.prop(\"readOnly\"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var r=e.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:t=!0,this._move(\"previousPage\",o);break;case r.PAGE_DOWN:t=!0,this._move(\"nextPage\",o);break;case r.UP:t=!0,this._keyEvent(\"previous\",o);break;case r.DOWN:t=!0,this._keyEvent(\"next\",o);break;case r.ENTER:case r.NUMPAD_ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(\":visible\")||n.preventDefault());if(!i){var o=e.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move(\"previousPage\",n);break;case o.PAGE_DOWN:this._move(\"nextPage\",n);break;case o.UP:this._keyEvent(\"previous\",n);break;case o.DOWN:this._keyEvent(\"next\",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e(\"
    \").addClass(\"ui-autocomplete ui-front\").appendTo(this._appendTo()).menu({role:null}).hide().data(\"ui-menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});var n=i.item.data(\"ui-autocomplete-item\");!1!==this._trigger(\"focus\",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data(\"ui-autocomplete-item\"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger(\"select\",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e(\"\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),\"source\"===e&&this._initSource(),\"appendTo\"===e&&this.menu.element.appendTo(this._appendTo()),\"disabled\"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(\".ui-front\")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):\"string\"==typeof this.options.source?(i=this.options.source,this.source=function(t,o){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:\"json\",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length\").append(e(\"\").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(\":visible\")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(\":visible\")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),\"i\");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(n)},{\"./core\":\"jquery-ui/core\",\"./menu\":\"jquery-ui/menu\",\"./position\":\"jquery-ui/position\",\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/button\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),/*!\n", " * jQuery UI Button 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/button/\n", " *\n", " * Depends:\n", " *\tjquery.ui.core.js\n", " *\tjquery.ui.widget.js\n", " */\n", " function(e,t){var i,n=\"ui-button ui-widget ui-state-default ui-corner-all\",o=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",r=function(){var t=e(this);setTimeout(function(){t.find(\":ui-button\").button(\"refresh\")},1)},s=function(t){var i=t.name,n=t.form,o=e([]);return i&&(i=i.replace(/'/g,\"\\\\'\"),o=n?e(n).find(\"[name='\"+i+\"']\"):e(\"[name='\"+i+\"']\",t.ownerDocument).filter(function(){return!this.form})),o};e.widget(\"ui.button\",{version:\"1.10.4\",defaultElement:\"\").addClass(this._triggerClass).html(r?e(\"\").attr({src:r,alt:o,title:o}):o)),t[a?\"before\":\"after\"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,\"autoSize\")&&!e.inline){var t,i,n,o,r=new Date(2009,11,20),s=this._get(e,\"dateFormat\");s.match(/[DM]/)&&(t=function(e){for(i=0,n=0,o=0;oi&&(i=e[o].length,n=o);return n},r.setMonth(t(this._get(e,s.match(/MM/)?\"monthNames\":\"monthNamesShort\"))),r.setDate(t(this._get(e,s.match(/DD/)?\"dayNames\":\"dayNamesShort\"))+20-r.getDay())),e.input.attr(\"size\",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,s,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css(\"display\",\"block\"))},_dialogDatepicker:function(t,i,n,r,a){var l,u,c,d,h,p=this._dialogInst;return p||(this.uuid+=1,l=\"dp\"+this.uuid,this._dialogInput=e(\"\"),this._dialogInput.keydown(this._doKeyDown),e(\"body\").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],s,p)),o(p.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+d,c/2-150+h]),this._dialogInput.css(\"left\",this._pos[0]+20+\"px\").css(\"top\",this._pos[1]+\"px\"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],s,p),this},_destroyDatepicker:function(t){var i,n=e(t),o=e.data(t,s);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,s),\"input\"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).unbind(\"focus\",this._showDatepicker).unbind(\"keydown\",this._doKeyDown).unbind(\"keypress\",this._doKeyPress).unbind(\"keyup\",this._doKeyUp)):\"div\"!==i&&\"span\"!==i||n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!1,r.trigger.filter(\"button\").each(function(){this.disabled=!1}).end().filter(\"img\").css({opacity:\"1.0\",cursor:\"\"})):\"div\"!==i&&\"span\"!==i||(n=o.children(\".\"+this._inlineClass),n.children().removeClass(\"ui-state-disabled\"),n.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!0,r.trigger.filter(\"button\").each(function(){this.disabled=!0}).end().filter(\"img\").css({opacity:\"0.5\",cursor:\"default\"})):\"div\"!==i&&\"span\"!==i||(n=o.children(\".\"+this._inlineClass),n.children().addClass(\"ui-state-disabled\"),n.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t-1},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,\"dateFormat\"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(o){}return!0},_showDatepicker:function(t){if(t=t.target||t,\"input\"!==t.nodeName.toLowerCase()&&(t=e(\"input\",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,r,s,a,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,\"beforeShow\"),r=n?n.apply(t,[t,i]):{},r!==!1&&(o(i.settings,r),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=\"\"),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),s=!1,e(t).parents().each(function(){return s|=\"fixed\"===e(this).css(\"position\"),!s}),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:\"absolute\",display:\"block\",top:\"-1000px\"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,s),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?\"static\":s?\"fixed\":\"absolute\",display:\"none\",left:a.left+\"px\",top:a.top+\"px\"}),i.inline||(l=e.datepicker._get(i,\"showAnim\"),u=e.datepicker._get(i,\"duration\"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,\"showOptions\"),u):i.dpDiv[l||\"show\"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,r=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find(\".\"+this._dayOverClass+\" a\").mouseover();var i,n=this._getNumberOfMonths(t),o=n[1],s=17;t.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"),o>1&&t.dpDiv.addClass(\"ui-datepicker-multi-\"+o).css(\"width\",s*o+\"em\"),t.dpDiv[(1!==n[0]||1!==n[1]?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-multi\"),t.dpDiv[(this._get(t,\"isRTL\")?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-rtl\"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(\":visible\")&&!e.input.is(\":disabled\")&&!e.input.is(\":focus\")},_checkOffset:function(t,i,n){var o=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,\"isRTL\")?o-s:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+r>u&&u>r?Math.abs(r+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),o=this._get(n,\"isRTL\");t&&(\"hidden\"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[o?\"previousSibling\":\"nextSibling\"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,o,r,a=this._curInst;!a||t&&a!==e.data(t,s)||this._datepickerShowing&&(i=this._get(a,\"showAnim\"),n=this._get(a,\"duration\"),o=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,\"showOptions\"),n,o):a.dpDiv[\"slideDown\"===i?\"slideUp\":\"fadeIn\"===i?\"fadeOut\":\"hide\"](i?n:null,o),i||o(),this._datepickerShowing=!1,r=this._get(a,\"onClose\"),r&&r.apply(a.input?a.input[0]:null,[a.input?a.input.val():\"\",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:\"absolute\",left:\"0\",top:\"-100px\"}),e.blockUI&&(e.unblockUI(),e(\"body\").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id===e.datepicker._mainDivId||0!==i.parents(\"#\"+e.datepicker._mainDivId).length||i.hasClass(e.datepicker.markerClassName)||i.closest(\".\"+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!i.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===n)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var o=e(t),r=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(r,i+(\"M\"===n?this._get(r,\"showCurrentAtPos\"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var i,n=e(t),o=this._getInst(n[0]);this._get(o,\"gotoCurrent\")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var o=e(t),r=this._getInst(o[0]);r[\"selected\"+(\"M\"===n?\"Month\":\"Year\")]=r[\"draw\"+(\"M\"===n?\"Month\":\"Year\")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(o)},_selectDay:function(t,i,n,o){var r,s=e(t);e(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(r=this._getInst(s[0]),r.selectedDay=r.currentDay=e(\"a\",o).html(),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,\"\")},_selectDate:function(t,i){var n,o=e(t),r=this._getInst(o[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),n=this._get(r,\"onSelect\"),n?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger(\"change\"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],\"object\"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,o,r=this._get(t,\"altField\");r&&(i=this._get(t,\"altFormat\")||this._get(t,\"dateFormat\"),n=this._getDate(t),o=this.formatDate(i,n,this._getFormatConfig(t)),e(r).each(function(){e(this).val(o)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,\"\"]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw\"Invalid arguments\";if(i=\"object\"==typeof i?i.toString():i+\"\",\"\"===i)return null;var o,r,s,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c=\"string\"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,y=!1,b=function(e){var i=o+1-1)for(g=1,v=_;;){if(r=this._getDaysInMonth(m,g-1),v<=r)break;g++,v-=r}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw\"Invalid date\";return a},ATOM:\"yy-mm-dd\",COOKIE:\"D, dd M yy\",ISO_8601:\"yy-mm-dd\",RFC_822:\"D, d M y\",RFC_850:\"DD, dd-M-y\",RFC_1036:\"D, d M y\",RFC_1123:\"D, d M yy\",RFC_2822:\"D, d M yy\",RSS:\"D, d M y\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yy-mm-dd\",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return\"\";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+112?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,o=e.selectedMonth,r=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),o===e.selectedMonth&&r===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?\"\":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&\"\"===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,\"stepMonths\"),n=\"#\"+t.id.replace(/\\\\\\\\/g,\"\\\\\");t.dpDiv.find(\"[data-handler]\").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,\"M\")},next:function(){e.datepicker._adjustDate(n,+i,\"M\")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute(\"data-month\"),+this.getAttribute(\"data-year\"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,\"M\"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,\"Y\"),!1}};e(this).bind(this.getAttribute(\"data-event\"),t[this.getAttribute(\"data-handler\")])})},_generateHTML:function(e){var t,i,n,o,r,s,a,l,u,c,d,h,p,f,m,g,v,_,y,b,w,C,k,x,D,S,E,T,M,P,R,A,I,N,j,L,H,O,W,$=new Date,F=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth(),$.getDate())),q=this._get(e,\"isRTL\"),V=this._get(e,\"showButtonPanel\"),B=this._get(e,\"hideIfNoPrevNext\"),z=this._get(e,\"navigationAsDateFormat\"),Y=this._getNumberOfMonths(e),X=this._get(e,\"showCurrentAtPos\"),U=this._get(e,\"stepMonths\"),K=1!==Y[0]||1!==Y[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,\"min\"),J=this._getMinMaxDate(e,\"max\"),Z=e.drawMonth-X,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),J)for(t=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-Y[0]*Y[1]+1,J.getDate())),t=Q&&tt;)Z--,Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,i=this._get(e,\"prevText\"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z-U,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,Z)?\"\"+i+\"\":B?\"\":\"\"+i+\"\",o=this._get(e,\"nextText\"),o=z?this.formatDate(o,this._daylightSavingAdjust(new Date(ee,Z+U,1)),this._getFormatConfig(e)):o,r=this._canAdjustMonth(e,1,ee,Z)?\"\"+o+\"\":B?\"\":\"\"+o+\"\",s=this._get(e,\"currentText\"),a=this._get(e,\"gotoCurrent\")&&e.currentDay?G:F,s=z?this.formatDate(s,a,this._getFormatConfig(e)):s,l=e.inline?\"\":\"\",u=V?\"
    \"+(q?l:\"\")+(this._isInRange(e,a)?\"\":\"\")+(q?\"\":l)+\"
    \":\"\",c=parseInt(this._get(e,\"firstDay\"),10),c=isNaN(c)?0:c,d=this._get(e,\"showWeek\"),h=this._get(e,\"dayNames\"),p=this._get(e,\"dayNamesMin\"),f=this._get(e,\"monthNames\"),m=this._get(e,\"monthNamesShort\"),g=this._get(e,\"beforeShowDay\"),v=this._get(e,\"showOtherMonths\"),_=this._get(e,\"selectOtherMonths\"),y=this._getDefaultDate(e),b=\"\",C=0;C\"}for(E+=\"
    \"+(/all|left/.test(S)&&0===C?q?r:n:\"\")+(/all|right/.test(S)&&0===C?q?n:r:\"\")+this._generateMonthYearHeader(e,Z,ee,Q,J,C>0||x>0,f,m)+\"
    \",T=d?\"\":\"\",w=0;w<7;w++)M=(w+c)%7,T+=\"=5?\" class='ui-datepicker-week-end'\":\"\")+\">\"+p[M]+\"\";for(E+=T+\"\",P=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,P)),R=(this._getFirstDayOfMonth(ee,Z)-c+7)%7,A=Math.ceil((R+P)/7),I=K&&this.maxRows>A?this.maxRows:A,this.maxRows=I,N=this._daylightSavingAdjust(new Date(ee,Z,1-R)),j=0;j\",L=d?\"\":\"\",w=0;w<7;w++)H=g?g.apply(e.input?e.input[0]:null,[N]):[!0,\"\"],O=N.getMonth()!==Z,W=O&&!_||!H[0]||Q&&NJ,L+=\"\",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);E+=L+\"\"}Z++,Z>11&&(Z=0,ee++),E+=\"
    \"+this._get(e,\"weekHeader\")+\"
    \"+this._get(e,\"calculateWeek\")(N)+\"\"+(O&&!v?\" \":W?\"\"+N.getDate()+\"\":\"\"+N.getDate()+\"\")+\"
    \"+(K?\"\"+(Y[0]>0&&x===Y[1]-1?\"
    \":\"\"):\"\"),k+=E}b+=k}return b+=u,e._keyEvent=!1,b},_generateMonthYearHeader:function(e,t,i,n,o,r,s,a){var l,u,c,d,h,p,f,m,g=this._get(e,\"changeMonth\"),v=this._get(e,\"changeYear\"),_=this._get(e,\"showMonthAfterYear\"),y=\"
    \",b=\"\";if(r||!g)b+=\"\"+s[t]+\"\";else{for(l=n&&n.getFullYear()===i,u=o&&o.getFullYear()===i,b+=\"\"}if(_||(y+=b+(!r&&g&&v?\"\":\" \")),!e.yearshtml)if(e.yearshtml=\"\",r||!v)y+=\"\"+i+\"\";else{for(d=this._get(e,\"yearRange\").split(\":\"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\\-].*/)?h+parseInt(e,10):parseInt(e,10);\n", " return isNaN(t)?h:t},f=p(d[0]),m=Math.max(f,p(d[1]||\"\")),f=n?Math.max(f,n.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,e.yearshtml+=\"\",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,\"yearSuffix\"),_&&(y+=(!r&&g&&v?\"\":\" \")+b),y+=\"
    \"},_adjustInstDate:function(e,t,i){var n=e.drawYear+(\"Y\"===i?t:0),o=e.drawMonth+(\"M\"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,o))+(\"D\"===i?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,o,r)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),\"M\"!==i&&\"Y\"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,\"min\"),n=this._getMinMaxDate(e,\"max\"),o=i&&tn?n:o},_notifyChange:function(e){var t=this._get(e,\"onChangeMonthYear\");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,\"numberOfMonths\");return null==t?[1,1]:\"number\"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+\"Date\"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var o=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(i,n+(t<0?t:o[0]*o[1]),1));return t<0&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var i,n,o=this._getMinMaxDate(e,\"min\"),r=this._getMinMaxDate(e,\"max\"),s=null,a=null,l=this._get(e,\"yearRange\");return l&&(i=l.split(\":\"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\\-].*/)&&(s+=n),i[1].match(/[+\\-].*/)&&(a+=n)),(!o||t.getTime()>=o.getTime())&&(!r||t.getTime()<=r.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,\"shortYearCutoff\");return t=\"string\"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,\"dayNamesShort\"),dayNames:this._get(e,\"dayNames\"),monthNamesShort:this._get(e,\"monthNamesShort\"),monthNames:this._get(e,\"monthNames\")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var o=t?\"object\"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,\"dateFormat\"),o,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e(\"#\"+e.datepicker._mainDivId).length&&e(\"body\").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return\"string\"!=typeof t||\"isDisabled\"!==t&&\"getDate\"!==t&&\"widget\"!==t?\"option\"===t&&2===arguments.length&&\"string\"==typeof arguments[1]?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){\"string\"==typeof t?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version=\"1.10.4\"}(n)},{\"./core\":\"jquery-ui/core\",jquery:\"jquery\"}],\"jquery-ui/menu\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),e(\"./position\"),/*!\n", " * jQuery UI Menu 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/menu/\n", " *\n", " * Depends:\n", " *\tjquery.ui.core.js\n", " *\tjquery.ui.widget.js\n", " *\tjquery.ui.position.js\n", " */\n", " function(e,t){e.widget(\"ui.menu\",{version:\"1.10.4\",defaultElement:\"
      \",delay:300,options:{icons:{submenu:\"ui-icon-carat-1-e\"},menus:\"ul\",position:{my:\"left top\",at:\"right top\"},role:\"menu\",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length).attr({role:this.options.role,tabIndex:0}).bind(\"click\"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass(\"ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this._on({\"mousedown .ui-menu-item > a\":function(e){e.preventDefault()},\"click .ui-state-disabled > a\":function(e){e.preventDefault()},\"click .ui-menu-item:has(a)\":function(t){var i=e(t.target).closest(\".ui-menu-item\");!this.mouseHandled&&i.not(\".ui-state-disabled\").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(\".ui-menu\").length?this.expand(t):!this.element.is(\":focus\")&&e(this.document[0].activeElement).closest(\".ui-menu\").length&&(this.element.trigger(\"focus\",[!0]),this.active&&1===this.active.parents(\".ui-menu\").length&&clearTimeout(this.timer)))},\"mouseenter .ui-menu-item\":function(t){var i=e(t.currentTarget);i.siblings().children(\".ui-state-active\").removeClass(\"ui-state-active\"),this.focus(t,i)},mouseleave:\"collapseAll\",\"mouseleave .ui-menu\":\"collapseAll\",focus:function(e,t){var i=this.active||this.element.children(\".ui-menu-item\").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:\"_keydown\"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(\".ui-menu\").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr(\"aria-activedescendant\").find(\".ui-menu\").addBack().removeClass(\"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\").removeAttr(\"role\").removeAttr(\"tabIndex\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-expanded\").removeAttr(\"aria-hidden\").removeAttr(\"aria-disabled\").removeUniqueId().show(),this.element.find(\".ui-menu-item\").removeClass(\"ui-menu-item\").removeAttr(\"role\").removeAttr(\"aria-disabled\").children(\"a\").removeUniqueId().removeClass(\"ui-corner-all ui-state-hover\").removeAttr(\"tabIndex\").removeAttr(\"role\").removeAttr(\"aria-haspopup\").children().each(function(){var t=e(this);t.data(\"ui-menu-submenu-carat\")&&t.remove()}),this.element.find(\".ui-menu-divider\").removeClass(\"ui-menu-divider ui-widget-content\")},_keydown:function(t){function i(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}var n,o,r,s,a,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move(\"first\",\"first\",t);break;case e.ui.keyCode.END:this._move(\"last\",\"last\",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(\".ui-state-disabled\")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,o=this.previousFilter||\"\",r=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),r===o?s=!0:r=o+r,a=new RegExp(\"^\"+i(r),\"i\"),n=this.activeMenu.children(\".ui-menu-item\").filter(function(){return a.test(e(this).children(\"a\").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(\".ui-menu-item\"):n,n.length||(r=String.fromCharCode(t.keyCode),a=new RegExp(\"^\"+i(r),\"i\"),n=this.activeMenu.children(\".ui-menu-item\").filter(function(){return a.test(e(this).children(\"a\").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(\".ui-state-disabled\")||(this.active.children(\"a[aria-haspopup='true']\").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length),n.filter(\":not(.ui-menu)\").addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").hide().attr({role:this.options.role,\"aria-hidden\":\"true\",\"aria-expanded\":\"false\"}).each(function(){var t=e(this),n=t.prev(\"a\"),o=e(\"\").addClass(\"ui-menu-icon ui-icon \"+i).data(\"ui-menu-submenu-carat\",!0);n.attr(\"aria-haspopup\",\"true\").prepend(o),t.attr(\"aria-labelledby\",n.attr(\"id\"))}),t=n.add(this.element),t.children(\":not(.ui-menu-item):has(a)\").addClass(\"ui-menu-item\").attr(\"role\",\"presentation\").children(\"a\").uniqueId().addClass(\"ui-corner-all\").attr({tabIndex:-1,role:this._itemRole()}),t.children(\":not(.ui-menu-item)\").each(function(){var t=e(this);/[^\\-\\u2014\\u2013\\s]/.test(t.text())||t.addClass(\"ui-widget-content ui-menu-divider\")}),t.children(\".ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:\"menuitem\",listbox:\"option\"}[this.options.role]},_setOption:function(e,t){\"icons\"===e&&this.element.find(\".ui-menu-icon\").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&\"focus\"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children(\"a\").addClass(\"ui-state-focus\"),this.options.role&&this.element.attr(\"aria-activedescendant\",n.attr(\"id\")),this.active.parent().closest(\".ui-menu-item\").children(\"a:first\").addClass(\"ui-state-active\"),e&&\"keydown\"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(\".ui-menu\"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger(\"focus\",e,{item:t})},_scrollIntoView:function(t){var i,n,o,r,s,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],\"borderTopWidth\"))||0,n=parseFloat(e.css(this.activeMenu[0],\"paddingTop\"))||0,o=t.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=t.height(),o<0?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children(\"a\").removeClass(\"ui-state-focus\"),this.active=null,this._trigger(\"blur\",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),\"true\"===e.attr(\"aria-hidden\")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(\".ui-menu\").not(t.parents(\".ui-menu\")).hide().attr(\"aria-hidden\",\"true\"),t.show().removeAttr(\"aria-hidden\").attr(\"aria-expanded\",\"true\").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(\".ui-menu\"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(\".ui-menu\").hide().attr(\"aria-hidden\",\"true\").attr(\"aria-expanded\",\"false\").end().find(\"a.ui-state-active\").removeClass(\"ui-state-active\")},collapse:function(e){var t=this.active&&this.active.parent().closest(\".ui-menu-item\",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(\".ui-menu \").children(\".ui-menu-item\").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move(\"next\",\"first\",e)},previous:function(e){this._move(\"prev\",\"last\",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(\".ui-menu-item\").length},isLastItem:function(){return this.active&&!this.active.nextAll(\".ui-menu-item\").length},_move:function(e,t,i){var n;this.active&&(n=\"first\"===e||\"last\"===e?this.active[\"first\"===e?\"prevAll\":\"nextAll\"](\".ui-menu-item\").eq(-1):this.active[e+\"All\"](\".ui-menu-item\").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(\".ui-menu-item\")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(\".ui-menu-item\").each(function(){return i=e(this),i.offset().top-n-o<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(\".ui-menu-item\")[this.active?\"last\":\"first\"]()))):void this.next(t)},previousPage:function(t){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(\".ui-menu-item\").each(function(){return i=e(this),i.offset().top-n+o>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(\".ui-menu-item\").first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(n)},{\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/position\":[function(e,t,i){var n=e(\"jquery\");/*!\n", " * jQuery UI Position 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/position/\n", " */\n", " !function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function o(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var r,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,d=/[\\+\\-]\\d+(\\.[\\d]+)?%?/,h=/^\\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(r!==t)return r;var i,n,o=e(\"
      \"),s=o.children()[0];return e(\"body\").append(o),i=s.offsetWidth,o.css(\"overflow\",\"scroll\"),n=s.offsetWidth,i===n&&(n=o[0].clientWidth),o.remove(),r=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-x\"),n=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-y\"),o=\"scroll\"===i||\"auto\"===i&&t.width0?\"right\":\"center\",vertical:r<0?\"top\":o>0?\"bottom\":\"middle\"};ps(a(o),a(r))?l.important=\"horizontal\":l.important=\"vertical\",t.using.call(this,e,l)}),c.offset(e.extend(S,{using:u}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,u=a+t.collisionWidth-r-o;t.collisionWidth>r?l>0&&u<=0?(i=e.left+l+t.collisionWidth-r-o,e.left+=l-i):u>0&&l<=0?e.left=o:l>u?e.left=o+r-t.collisionWidth:e.left=o:l>0?e.left+=l:u>0?e.left-=u:e.left=s(e.left-a,e.left)},top:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,u=a+t.collisionHeight-r-o;t.collisionHeight>r?l>0&&u<=0?(i=e.top+l+t.collisionHeight-r-o,e.top+=l-i):u>0&&l<=0?e.top=o:l>u?e.top=o+r-t.collisionHeight:e.top=o:l>0?e.top+=l:u>0?e.top-=u:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,o=t.within,r=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,d=u+t.collisionWidth-s-l,h=\"left\"===t.my[0]?-t.elemWidth:\"right\"===t.my[0]?t.elemWidth:0,p=\"left\"===t.at[0]?t.targetWidth:\"right\"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?(i=e.left+h+p+f+t.collisionWidth-s-r,(i<0||i0&&(n=e.left-t.collisionPosition.marginLeft+h+p+f-l,(n>0||a(n)c&&(n<0||n0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>d&&(i>0||a(i)10&&o<11,t.innerHTML=\"\",i.removeChild(t)}()}(n)},{jquery:\"jquery\"}],\"jquery-ui/slider\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./mouse\"),e(\"./widget\"),/*!\n", " * jQuery UI Slider 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/slider/\n", " *\n", " * Depends:\n", " *\tjquery.ui.core.js\n", " *\tjquery.ui.mouse.js\n", " *\tjquery.ui.widget.js\n", " */\n", " function(e,t){var i=5;e.widget(\"ui.slider\",e.ui.mouse,{version:\"1.10.4\",widgetEventPrefix:\"slide\",options:{animate:!1,distance:0,max:100,min:0,orientation:\"horizontal\",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass(\"ui-slider ui-slider-\"+this.orientation+\" ui-widget ui-widget-content ui-corner-all\"),this._refresh(),this._setOption(\"disabled\",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,o=this.element.find(\".ui-slider-handle\").addClass(\"ui-state-default ui-corner-all\"),r=\"\",s=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),t=o.length;t\").appendTo(this.element),i=\"ui-slider-range ui-widget-header ui-corner-all\"),this.range.addClass(i+(\"min\"===t.range||\"max\"===t.range?\" ui-slider-range-\"+t.range:\"\"))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var e=this.handles.add(this.range).filter(\"a\");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass(\"ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all\"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,o,r,s,a,l,u,c=this,d=this.options;return!d.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-c.values(t));(o>i||o===i&&(t===c._lastChangedValue||c.values(t)===d.min))&&(o=i,r=e(this),s=t)}),a=this._start(t,s),a!==!1&&(this._mouseSliding=!0,this._handleIndex=s,r.addClass(\"ui-state-active\").focus(),l=r.offset(),u=!e(t.target).parents().addBack().is(\".ui-slider-handle\"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-l.left-r.width()/2,top:t.pageY-l.top-r.height()/2-(parseInt(r.css(\"borderTopWidth\"),10)||0)-(parseInt(r.css(\"borderBottomWidth\"),10)||0)+(parseInt(r.css(\"marginTop\"),10)||0)},this.handles.hasClass(\"ui-state-hover\")||this._slide(t,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass(\"ui-state-active\"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=\"vertical\"===this.options.orientation?\"vertical\":\"horizontal\"},_normValueFromMouse:function(e){var t,i,n,o,r;return\"horizontal\"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),n<0&&(n=0),\"vertical\"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),r=this._valueMin()+n*o,this._trimAlignValue(r)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger(\"start\",e,i)},_slide:function(e,t,i){var n,o,r;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&i1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,o=arguments[0],r=0;r=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,n,o,r,s=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c[\"horizontal\"===l.orientation?\"left\":\"bottom\"]=i+\"%\",e(this).stop(1,1)[u?\"animate\":\"css\"](c,a.animate),l.options.range===!0&&(\"horizontal\"===l.orientation?(0===n&&l.range.stop(1,1)[u?\"animate\":\"css\"]({left:i+\"%\"},a.animate),1===n&&l.range[u?\"animate\":\"css\"]({width:i-t+\"%\"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?\"animate\":\"css\"]({bottom:i+\"%\"},a.animate),1===n&&l.range[u?\"animate\":\"css\"]({height:i-t+\"%\"},{queue:!1,duration:a.animate}))),t=i}):(n=this.value(),o=this._valueMin(),r=this._valueMax(),i=r!==o?(n-o)/(r-o)*100:0,c[\"horizontal\"===this.orientation?\"left\":\"bottom\"]=i+\"%\",this.handle.stop(1,1)[u?\"animate\":\"css\"](c,a.animate),\"min\"===s&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[u?\"animate\":\"css\"]({width:i+\"%\"},a.animate),\"max\"===s&&\"horizontal\"===this.orientation&&this.range[u?\"animate\":\"css\"]({width:100-i+\"%\"},{queue:!1,duration:a.animate}),\"min\"===s&&\"vertical\"===this.orientation&&this.range.stop(1,1)[u?\"animate\":\"css\"]({height:i+\"%\"},a.animate),\"max\"===s&&\"vertical\"===this.orientation&&this.range[u?\"animate\":\"css\"]({height:100-i+\"%\"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(t){var n,o,r,s,a=e(t.target).data(\"ui-slider-handle-index\");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass(\"ui-state-active\"),n=this._start(t,a),n===!1))return}switch(s=this.options.step,o=r=this.options.values&&this.options.values.length?this.values(a):this.value(),t.keyCode){case e.ui.keyCode.HOME:r=this._valueMin();break;case e.ui.keyCode.END:r=this._valueMax();break;case e.ui.keyCode.PAGE_UP:r=this._trimAlignValue(o+(this._valueMax()-this._valueMin())/i);break;case e.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(o-(this._valueMax()-this._valueMin())/i);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(o===this._valueMax())return;r=this._trimAlignValue(o+s);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(o===this._valueMin())return;r=this._trimAlignValue(o-s)}this._slide(t,a,r)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data(\"ui-slider-handle-index\");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass(\"ui-state-active\"))}}})}(n)},{\"./core\":\"jquery-ui/core\",\"./mouse\":\"jquery-ui/mouse\",\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/sortable\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./mouse\"),e(\"./widget\"),/*!\n", " * jQuery UI Sortable 1.10.4\n", " * http://jqueryui.com\n", " *\n", " * Copyright 2014 jQuery Foundation and other contributors\n", " * Released under the MIT license.\n", " * http://jquery.org/license\n", " *\n", " * http://api.jqueryui.com/sortable/\n", " *\n", " * Depends:\n", " *\tjquery.ui.core.js\n", " *\tjquery.ui.mouse.js\n", " *\tjquery.ui.widget.js\n", " */\n", " function(e,t){function i(e,t,i){return e>t&&e *\",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:\"default\",tolerance:\"intersect\",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass(\"ui-sortable\"),this.refresh(),this.floating=!!this.items.length&&(\"x\"===e.axis||n(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass(\"ui-sortable ui-sortable-disabled\"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+\"-item\");return this},_setOption:function(t,i){\"disabled\"===t?(this.options[t]=i,this.widget().toggleClass(\"ui-sortable-disabled\",!!i)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var n=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&\"static\"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,r.widgetName+\"-item\")===r)return n=e(this),!1}),e.data(t.target,r.widgetName+\"-item\")===r&&(n=e(t.target)),!!n&&(!(this.options.handle&&!i&&(e(this.options.handle,n).find(\"*\").addBack().each(function(){this===t.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,i,n){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css(\"position\",\"absolute\"),this.cssPosition=this.helper.css(\"position\"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&\"auto\"!==s.cursor&&(r=this.document.find(\"body\"),this.storedCursor=r.css(\"cursor\"),r.css(\"cursor\",s.cursor),this.storedStylesheet=e(\"\").appendTo(r)),s.opacity&&(this.helper.css(\"opacity\")&&(this._storedOpacity=this.helper.css(\"opacity\")),this.helper.css(\"opacity\",s.opacity)),s.zIndex&&(this.helper.css(\"zIndex\")&&(this._storedZIndex=this.helper.css(\"zIndex\")),this.helper.css(\"zIndex\",s.zIndex)),this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger(\"start\",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger(\"activate\",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass(\"ui-sortable-helper\"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,o,r,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo(\"absolute\"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--)if(n=this.items[i],o=n.item[0],r=this._intersectsWithPointer(n),r&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===r?\"next\":\"prev\"]()[0]===o||e.contains(this.placeholder[0],o)||\"semi-dynamic\"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===r?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger(\"change\",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger(\"sort\",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&\"x\"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),r&&\"y\"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),\"original\"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger(\"out\",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),\"original\"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||\"id\")||\"\").match(t.expression||/(.+)[\\-=_](.+)/);i&&n.push((t.key||i[1]+\"[]\")+\"=\"+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+\"=\"),n.join(\"&\")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||\"id\")||\"\")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,r=e.left,s=r+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,d=\"x\"===this.options.axis||n+u>a&&n+ur&&t+ce[this.floating?\"width\":\"height\"]?p:r0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?\"right\":\"left\")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var n,o,r,s,a=[],l=[],u=this._connectWith();if(u&&t)for(n=u.length-1;n>=0;n--)for(r=e(u[n]),o=r.length-1;o>=0;o--)s=e.data(r[o],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),s]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=e.grep(this.items,function(e){for(var i=0;i=0;i--)for(o=e(h[i]),n=o.length-1;n>=0;n--)r=e.data(o[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&(d.push([e.isFunction(r.options.items)?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(i=d.length-1;i>=0;i--)for(s=d[i][1],a=d[i][0],n=0,u=a.length;n=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=o.outerWidth(),n.height=o.outerHeight()),r=o.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=e(\"<\"+n+\">\",t.document[0]).addClass(i||t.currentItem[0].className+\" ui-sortable-placeholder\").removeClass(\"ui-sortable-helper\");return\"tr\"===n?t.currentItem.children().each(function(){e(\" \",t.document[0]).attr(\"colspan\",e(this).attr(\"colspan\")||1).appendTo(o)}):\"img\"===n&&o.attr(\"src\",t.currentItem.attr(\"src\")),i||o.css(\"visibility\",\"hidden\"),o},update:function(e,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css(\"paddingTop\")||0,10)-parseInt(t.currentItem.css(\"paddingBottom\")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css(\"paddingLeft\")||0,10)-parseInt(t.currentItem.css(\"paddingRight\")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var o,r,s,a,l,u,c,d,h,p,f=null,m=null;for(o=this.containers.length-1;o>=0;o--)if(!e.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&e.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],m=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger(\"out\",t,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger(\"over\",t,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(s=1e4,a=null,p=f.floating||n(this.currentItem),l=p?\"left\":\"top\",u=p?\"width\":\"height\",c=this.positionAbs[l]+this.offset.click[l],r=this.items.length-1;r>=0;r--)e.contains(this.containers[m].element[0],this.items[r].item[0])&&this.items[r].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[r].top,this.items[r].height)||(d=this.items[r].item.offset()[l],h=!1,Math.abs(d-c)>Math.abs(d+this.items[r][u]-c)&&(h=!0,d+=this.items[r][u]),Math.abs(d-c)this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)\"auto\"!==this._storedCSS[n]&&\"static\"!==this._storedCSS[n]||(this._storedCSS[n]=\"\");this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push(function(e){this._trigger(\"receive\",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push(function(e){this._trigger(\"update\",e,this._uiHash())}),this!==this.currentContainer&&(t||(o.push(function(e){this._trigger(\"remove\",e,this._uiHash())}),o.push(function(e){return function(t){e._trigger(\"receive\",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger(\"update\",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||o.push(i(\"deactivate\",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i(\"out\",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find(\"body\").css(\"cursor\",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css(\"opacity\",this._storedOpacity),this._storedZIndex&&this.helper.css(\"zIndex\",\"auto\"===this._storedZIndex?\"\":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger(\"beforeStop\",e,this._uiHash()),n=0;n\",widgetEventPrefix:\"spin\",options:{culture:null,icons:{down:\"ui-icon-triangle-1-s\",up:\"ui-icon-triangle-1-n\"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption(\"max\",this.options.max),this._setOption(\"min\",this.options.min),this._setOption(\"step\",this.options.step),\"\"!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each([\"min\",\"max\",\"step\"],function(e,n){var o=i.attr(n);void 0!==o&&o.length&&(t[n]=o)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:\"_stop\",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger(\"change\",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},\"mousedown .ui-spinner-button\":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t)},\"mouseup .ui-spinner-button\":\"_stop\",\"mouseenter .ui-spinner-button\":function(t){if(e(t.currentTarget).hasClass(\"ui-state-active\"))return this._start(t)!==!1&&void this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t)},\"mouseleave .ui-spinner-button\":\"_stop\"},_draw:function(){var e=this.uiSpinner=this.element.addClass(\"ui-spinner-input\").attr(\"autocomplete\",\"off\").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr(\"role\",\"spinbutton\"),this.buttons=e.find(\".ui-spinner-button\").attr(\"tabIndex\",-1).button().removeClass(\"ui-corner-all\"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return\"\"},_buttonHtml:function(){return\"\"},_start:function(e){return!(!this.spinning&&this._trigger(\"start\",e)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger(\"spin\",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(\".\");return i===-1?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e\",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var o,r,s,a=i;if(0===arguments.length)return e.widget.extend({},this.options);if(\"string\"==typeof i)if(a={},o=i.split(\".\"),i=o.shift(),o.length){for(r=a[i]=e.widget.extend({},this.options[i]),s=0;s0&&t-1 in e)}function n(e,t,i){if(re.isFunction(t))return re.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return re.grep(e,function(e){return e===t!==i});if(\"string\"==typeof t){if(me.test(t))return re.filter(t,e,i);t=re.filter(t,e)}return re.grep(e,function(e){return Z.call(t,e)>-1!==i})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function r(e){var t={};return re.each(e.match(we)||[],function(e,i){t[i]=!0}),t}function s(){K.removeEventListener(\"DOMContentLoaded\",s),e.removeEventListener(\"load\",s),re.ready()}function a(){this.expando=re.expando+a.uid++}function l(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n=\"data-\"+t.replace(Te,\"-$&\").toLowerCase(),i=e.getAttribute(n),\"string\"==typeof i){try{i=\"true\"===i||\"false\"!==i&&(\"null\"===i?null:+i+\"\"===i?+i:Ee.test(i)?re.parseJSON(i):i)}catch(o){}Se.set(e,t,i)}else i=void 0;return i}function u(e,t,i,n){var o,r=1,s=20,a=n?function(){return n.cur()}:function(){return re.css(e,t,\"\")},l=a(),u=i&&i[3]||(re.cssNumber[t]?\"\":\"px\"),c=(re.cssNumber[t]||\"px\"!==u&&+l)&&Pe.exec(re.css(e,t));if(c&&c[3]!==u){u=u||c[3],i=i||[],c=+l||1;do r=r||\".5\",c/=r,re.style(e,t,c+u);while(r!==(r=a()/l)&&1!==r&&--s)}return i&&(c=+c||+l||0,o=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=u,n.start=c,n.end=o)),o}function c(e,t){var i=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],i):i}function d(e,t){for(var i=0,n=e.length;i-1)o&&o.push(r);else if(u=re.contains(r.ownerDocument,r),s=c(p.appendChild(r),\"script\"),u&&d(s),i)for(h=0;r=s[h++];)je.test(r.type||\"\")&&i.push(r);return p}function p(){return!0}function f(){return!1}function m(){try{return K.activeElement}catch(e){}}function g(e,t,i,n,o,r){var s,a;if(\"object\"==typeof t){\"string\"!=typeof i&&(n=n||i,i=void 0);for(a in t)g(e,a,i,n,t[a],r);return e}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&(\"string\"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),o===!1)o=f;else if(!o)return e;return 1===r&&(s=o,o=function(e){return re().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=re.guid++)),e.each(function(){re.event.add(this,t,o,n,i)})}function v(e,t){return re.nodeName(e,\"table\")&&re.nodeName(11!==t.nodeType?t:t.firstChild,\"tr\")?e.getElementsByTagName(\"tbody\")[0]||e.appendChild(e.ownerDocument.createElement(\"tbody\")):e}function _(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function y(e){var t=Be.exec(e.type);return t?e.type=t[1]:e.removeAttribute(\"type\"),e}function b(e,t){var i,n,o,r,s,a,l,u;if(1===t.nodeType){if(De.hasData(e)&&(r=De.access(e),s=De.set(t,r),u=r.events)){delete s.handle,s.events={};for(o in u)for(i=0,n=u[o].length;i1&&\"string\"==typeof m&&!ne.checkClone&&Ve.test(m))return e.each(function(o){var r=e.eq(o);g&&(t[0]=m.call(this,o,r.html())),C(r,t,i,n)});if(p&&(o=h(t,e[0].ownerDocument,!1,e,n),r=o.firstChild,1===o.childNodes.length&&(o=r),r||n)){for(s=re.map(c(o,\"script\"),_),a=s.length;d\")).appendTo(t.documentElement),t=Ye[0].contentDocument,t.write(),t.close(),i=x(e,t),Ye.detach()),Xe[e]=i),i}function S(e,t,i){var n,o,r,s,a=e.style;return i=i||Ge(e),s=i?i.getPropertyValue(t)||i[t]:void 0,\"\"!==s&&void 0!==s||re.contains(e.ownerDocument,e)||(s=re.style(e,t)),i&&!ne.pixelMarginRight()&&Ke.test(s)&&Ue.test(t)&&(n=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=o,a.maxWidth=r),void 0!==s?s+\"\":s}function E(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function T(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),i=it.length;i--;)if(e=it[i]+t,e in nt)return e}function M(e,t,i){var n=Pe.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||\"px\"):t}function P(e,t,i,n,o){for(var r=i===(n?\"border\":\"content\")?4:\"width\"===t?1:0,s=0;r<4;r+=2)\"margin\"===i&&(s+=re.css(e,i+Re[r],!0,o)),n?(\"content\"===i&&(s-=re.css(e,\"padding\"+Re[r],!0,o)),\"margin\"!==i&&(s-=re.css(e,\"border\"+Re[r]+\"Width\",!0,o))):(s+=re.css(e,\"padding\"+Re[r],!0,o),\"padding\"!==i&&(s+=re.css(e,\"border\"+Re[r]+\"Width\",!0,o)));return s}function R(e,t,i){var n=!0,o=\"width\"===t?e.offsetWidth:e.offsetHeight,r=Ge(e),s=\"border-box\"===re.css(e,\"boxSizing\",!1,r);if(o<=0||null==o){if(o=S(e,t,r),(o<0||null==o)&&(o=e.style[t]),Ke.test(o))return o;n=s&&(ne.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+P(e,t,i||(s?\"border\":\"content\"),n,r)+\"px\"}function A(e,t){for(var i,n,o,r=[],s=0,a=e.length;s=0&&i=0},isPlainObject:function(e){var t;if(\"object\"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;if(e.constructor&&!ie.call(e,\"constructor\")&&!ie.call(e.constructor.prototype||{},\"isPrototypeOf\"))return!1;for(t in e);return void 0===t||ie.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?ee[te.call(e)]||\"object\":typeof e},globalEval:function(e){var t,i=eval;e=re.trim(e),e&&(1===e.indexOf(\"use strict\")?(t=K.createElement(\"script\"),t.text=e,K.head.appendChild(t).parentNode.removeChild(t)):i(e))},camelCase:function(e){return e.replace(ae,\"ms-\").replace(le,ue)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,o=0;if(i(e))for(n=e.length;oC.cacheLength&&delete e[t.shift()],e[i+\" \"]=n}var t=[];return e}function n(e){return e[W]=!0,e}function o(e){var t=A.createElement(\"div\");try{return!!e(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var i=e.split(\"|\"),n=i.length;n--;)C.attrHandle[i[n]]=t}function s(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function a(e){return function(t){var i=t.nodeName.toLowerCase();return\"input\"===i&&t.type===e}}function l(e){return function(t){var i=t.nodeName.toLowerCase();return(\"input\"===i||\"button\"===i)&&t.type===e}}function u(e){return n(function(t){return t=+t,n(function(i,n){for(var o,r=e([],i.length,t),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))})})}function c(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}function d(){}function h(e){for(var t=0,i=e.length,n=\"\";t1?function(t,i,n){for(var o=e.length;o--;)if(!e[o](t,i,n))return!1;return!0}:e[0]}function m(e,i,n){for(var o=0,r=i.length;o-1&&(n[u]=!(s[u]=d))}}else y=g(y===s?y.splice(f,y.length):y),r?r(null,s,y,l):J.apply(s,y)})}function _(e){for(var t,i,n,o=e.length,r=C.relative[e[0].type],s=r||C.relative[\" \"],a=r?1:0,l=p(function(e){return e===t},s,!0),u=p(function(e){return ee(t,e)>-1},s,!0),c=[function(e,i,n){var o=!r&&(n||i!==T)||((t=i).nodeType?l(e,i,n):u(e,i,n));return t=null,o}];a1&&f(c),a>1&&h(e.slice(0,a-1).concat({value:\" \"===e[a-2].type?\"*\":\"\"})).replace(ae,\"$1\"),i,a0,r=e.length>0,s=function(n,s,a,l,u){var c,d,h,p=0,f=\"0\",m=n&&[],v=[],_=T,y=n||r&&C.find.TAG(\"*\",u),b=F+=null==_?1:Math.random()||.1,w=y.length;for(u&&(T=s===A||s||u);f!==w&&null!=(c=y[f]);f++){if(r&&c){for(d=0,s||c.ownerDocument===A||(R(c),a=!N);h=e[d++];)if(h(c,s||A,a)){l.push(c);break}u&&(F=b)}o&&((c=!h&&c)&&p--,n&&m.push(c))}if(p+=f,o&&f!==p){for(d=0;h=i[d++];)h(m,v,s,a);if(n){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=G.call(l));v=g(v)}J.apply(l,v),u&&!n&&v.length>0&&p+i.length>1&&t.uniqueSort(l)}return u&&(F=b,T=_),m};return o?n(s):s}var b,w,C,k,x,D,S,E,T,M,P,R,A,I,N,j,L,H,O,W=\"sizzle\"+1*new Date,$=e.document,F=0,q=0,V=i(),B=i(),z=i(),Y=function(e,t){return e===t&&(P=!0),0},X=1<<31,U={}.hasOwnProperty,K=[],G=K.pop,Q=K.push,J=K.push,Z=K.slice,ee=function(e,t){for(var i=0,n=e.length;i+~]|\"+ie+\")\"+ie+\"*\"),ce=new RegExp(\"=\"+ie+\"*([^\\\\]'\\\"]*?)\"+ie+\"*\\\\]\",\"g\"),de=new RegExp(re),he=new RegExp(\"^\"+ne+\"$\"),pe={ID:new RegExp(\"^#(\"+ne+\")\"),CLASS:new RegExp(\"^\\\\.(\"+ne+\")\"),TAG:new RegExp(\"^(\"+ne+\"|[*])\"),ATTR:new RegExp(\"^\"+oe),PSEUDO:new RegExp(\"^\"+re),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+ie+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+ie+\"*(?:([+-]|)\"+ie+\"*(\\\\d+)|))\"+ie+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+te+\")$\",\"i\"),needsContext:new RegExp(\"^\"+ie+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+ie+\"*((?:-\\\\d)?\\\\d*)\"+ie+\"*\\\\)|)(?=[^-]|$)\",\"i\")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\\d$/i,ge=/^[^{]+\\{\\s*\\[native \\w/,ve=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,_e=/[+~]/,ye=/'|\\\\/g,be=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+ie+\"?|(\"+ie+\")|.)\",\"ig\"),we=function(e,t,i){var n=\"0x\"+t-65536;return n!==n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},Ce=function(){R()};try{J.apply(K=Z.call($.childNodes),$.childNodes),K[$.childNodes.length].nodeType}catch(ke){J={apply:K.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}w=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&\"HTML\"!==t.nodeName},R=t.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:$;return n!==A&&9===n.nodeType&&n.documentElement?(A=n,I=A.documentElement,N=!x(A),(i=A.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener(\"unload\",Ce,!1):i.attachEvent&&i.attachEvent(\"onunload\",Ce)),w.attributes=o(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),w.getElementsByTagName=o(function(e){return e.appendChild(A.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),w.getElementsByClassName=ge.test(A.getElementsByClassName),w.getById=o(function(e){return I.appendChild(e).id=W,!A.getElementsByName||!A.getElementsByName(W).length}),w.getById?(C.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&N){var i=t.getElementById(e);return i?[i]:[]}},C.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute(\"id\")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(be,we);return function(e){var i=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return i&&i.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],o=0,r=t.getElementsByTagName(e);if(\"*\"===e){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},C.find.CLASS=w.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&N)return t.getElementsByClassName(e)},L=[],j=[],(w.qsa=ge.test(A.querySelectorAll))&&(o(function(e){I.appendChild(e).innerHTML=\"\",e.querySelectorAll(\"[msallowcapture^='']\").length&&j.push(\"[*^$]=\"+ie+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||j.push(\"\\\\[\"+ie+\"*(?:value|\"+te+\")\"),e.querySelectorAll(\"[id~=\"+W+\"-]\").length||j.push(\"~=\"),e.querySelectorAll(\":checked\").length||j.push(\":checked\"),e.querySelectorAll(\"a#\"+W+\"+*\").length||j.push(\".#.+[+~]\")}),o(function(e){var t=A.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&j.push(\"name\"+ie+\"*[*^$|!~]?=\"),e.querySelectorAll(\":enabled\").length||j.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),j.push(\",.*:\")})),(w.matchesSelector=ge.test(H=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&o(function(e){w.disconnectedMatch=H.call(e,\"div\"),H.call(e,\"[s!='']:x\"),L.push(\"!=\",re)}),j=j.length&&new RegExp(j.join(\"|\")),L=L.length&&new RegExp(L.join(\"|\")),t=ge.test(I.compareDocumentPosition),O=t||ge.test(I.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return P=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!w.sortDetached&&t.compareDocumentPosition(e)===i?e===A||e.ownerDocument===$&&O($,e)?-1:t===A||t.ownerDocument===$&&O($,t)?1:M?ee(M,e)-ee(M,t):0:4&i?-1:1)}:function(e,t){if(e===t)return P=!0,0;var i,n=0,o=e.parentNode,r=t.parentNode,a=[e],l=[t];if(!o||!r)return e===A?-1:t===A?1:o?-1:r?1:M?ee(M,e)-ee(M,t):0;if(o===r)return s(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===$?-1:l[n]===$?1:0},A):A},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==A&&R(e),i=i.replace(ce,\"='$1']\"),w.matchesSelector&&N&&!z[i+\" \"]&&(!L||!L.test(i))&&(!j||!j.test(i)))try{var n=H.call(e,i);if(n||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(o){}return t(i,A,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==A&&R(e),O(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==A&&R(e);var i=C.attrHandle[t.toLowerCase()],n=i&&U.call(C.attrHandle,t.toLowerCase())?i(e,t,!N):void 0;return void 0!==n?n:w.attributes||!N?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},t.uniqueSort=function(e){var t,i=[],n=0,o=0;if(P=!w.detectDuplicates,M=!w.sortStable&&e.slice(0),e.sort(Y),P){for(;t=e[o++];)t===e[o]&&(n=i.push(o));for(;n--;)e.splice(i[n],1)}return M=null,e},k=t.getText=function(e){var t,i=\"\",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=k(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=k(t);return i},C=t.selectors={cacheLength:50,createPseudo:n,match:pe,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(be,we),e[3]=(e[3]||e[4]||e[5]||\"\").replace(be,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,i=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":i&&de.test(i)&&(t=D(i,!0))&&(t=i.indexOf(\")\",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+\" \"];return t||(t=new RegExp(\"(^|\"+ie+\")\"+e+\"(\"+ie+\"|$)\"))&&V(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,i,n){return function(o){var r=t.attr(o,e);return null==r?\"!=\"===i:!i||(r+=\"\",\"=\"===i?r===n:\"!=\"===i?r!==n:\"^=\"===i?n&&0===r.indexOf(n):\"*=\"===i?n&&r.indexOf(n)>-1:\"$=\"===i?n&&r.slice(-n.length)===n:\"~=\"===i?(\" \"+r.replace(se,\" \")+\" \").indexOf(n)>-1:\"|=\"===i&&(r===n||r.slice(0,n.length+1)===n+\"-\"))}},CHILD:function(e,t,i,n,o){var r=\"nth\"!==e.slice(0,3),s=\"last\"!==e.slice(-4),a=\"of-type\"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,i,l){var u,c,d,h,p,f,m=r!==s?\"nextSibling\":\"previousSibling\",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),_=!l&&!a,y=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m=\"only\"===e&&!f&&\"nextSibling\"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&_){for(h=g,d=h[W]||(h[W]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[e]||[],p=u[0]===F&&u[1],y=p&&u[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(y=p=0)||f.pop();)if(1===h.nodeType&&++y&&h===t){c[e]=[F,p,y];break}}else if(_&&(h=t,d=h[W]||(h[W]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[e]||[],p=u[0]===F&&u[1],y=p),y===!1)for(;(h=++p&&h&&h[m]||(y=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++y||(_&&(d=h[W]||(h[W]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),c[e]=[F,y]),h!==t)););return y-=o,y===n||y%n===0&&y/n>=0}}},PSEUDO:function(e,i){var o,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error(\"unsupported pseudo: \"+e);return r[W]?r(i):r.length>1?(o=[e,e,\"\",i],C.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,o=r(e,i),s=o.length;s--;)n=ee(e,o[s]),e[n]=!(t[n]=o[s])}):function(e){return r(e,0,o)}):r}},pseudos:{not:n(function(e){var t=[],i=[],o=S(e.replace(ae,\"$1\"));return o[W]?n(function(e,t,i,n){for(var r,s=o(e,null,n,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,n,r){return t[0]=e,o(t,null,r,i),t[0]=null,!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:n(function(e){return he.test(e||\"\")||t.error(\"unsupported lang: \"+e),e=e.replace(be,we).toLowerCase(),function(t){var i;do if(i=N?t.lang:t.getAttribute(\"xml:lang\")||t.getAttribute(\"lang\"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+\"-\");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.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,i){return[i<0?i+t:i]}),even:u(function(e,t){for(var i=0;i=0;)e.push(n);return e}),gt:u(function(e,t,i){for(var n=i<0?i+t:i;++n2&&\"ID\"===(s=r[0]).type&&w.getById&&9===t.nodeType&&N&&C.relative[r[1].type]){if(t=(C.find.ID(s.matches[0].replace(be,we),t)||[])[0],!t)return i;u&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=pe.needsContext.test(e)?0:r.length;o--&&(s=r[o],!C.relative[a=s.type]);)if((l=C.find[a])&&(n=l(s.matches[0].replace(be,we),_e.test(r[0].type)&&c(t.parentNode)||t))){if(r.splice(o,1),e=n.length&&h(r),!e)return J.apply(i,n),i;break}}return(u||S(e,d))(n,t,!N,i,!t||_e.test(e)&&c(t.parentNode)||t),i},w.sortStable=W.split(\"\").sort(Y).join(\"\")===W,w.detectDuplicates=!!P,R(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(A.createElement(\"div\"))}),o(function(e){return e.innerHTML=\"\",\"#\"===e.firstChild.getAttribute(\"href\")})||r(\"type|href|height|width\",function(e,t,i){if(!i)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML=\"\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||r(\"value\",function(e,t,i){if(!i&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute(\"disabled\")})||r(te,function(e,t,i){var n;if(!i)return e[t]===!0?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);re.find=ce,re.expr=ce.selectors,re.expr[\":\"]=re.expr.pseudos,re.uniqueSort=re.unique=ce.uniqueSort,re.text=ce.getText,re.isXMLDoc=ce.isXML,re.contains=ce.contains;var de=function(e,t,i){for(var n=[],o=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&re(e).is(i))break;n.push(e)}return n},he=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},pe=re.expr.match.needsContext,fe=/^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/,me=/^.[^:#\\[\\.,]*$/;re.filter=function(e,t,i){var n=t[0];return i&&(e=\":not(\"+e+\")\"),1===t.length&&1===n.nodeType?re.find.matchesSelector(n,e)?[n]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,i=this.length,n=[],o=this;if(\"string\"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;t1?re.unique(n):n),n.selector=this.selector?this.selector+\" \"+e:e,n},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,\"string\"==typeof e&&pe.test(e)?re(e):e||[],!1).length}});var ge,ve=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,_e=re.fn.init=function(e,t,i){var n,o;if(!e)return this;if(i=i||ge,\"string\"==typeof e){if(n=\"<\"===e[0]&&\">\"===e[e.length-1]&&e.length>=3?[null,e,null]:ve.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),fe.test(n[1])&&re.isPlainObject(t))for(n in t)re.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return o=K.getElementById(n[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=K,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==i.ready?i.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))};_e.prototype=re.fn,ge=re(K);var ye=/^(?:parents|prev(?:Until|All))/,be={children:!0,contents:!0,next:!0,prev:!0};re.fn.extend({has:function(e){var t=re(e,this),i=t.length;return this.filter(function(){for(var e=0;e-1:1===i.nodeType&&re.find.matchesSelector(i,e))){r.push(i);break}return this.pushStack(r.length>1?re.uniqueSort(r):r)},index:function(e){return e?\"string\"==typeof e?Z.call(re(e),this[0]):Z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.uniqueSort(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return de(e,\"parentNode\")},parentsUntil:function(e,t,i){return de(e,\"parentNode\",i)},next:function(e){return o(e,\"nextSibling\")},prev:function(e){return o(e,\"previousSibling\")},nextAll:function(e){return de(e,\"nextSibling\")},prevAll:function(e){return de(e,\"previousSibling\")},nextUntil:function(e,t,i){return de(e,\"nextSibling\",i)},prevUntil:function(e,t,i){return de(e,\"previousSibling\",i)},siblings:function(e){return he((e.parentNode||{}).firstChild,e)},children:function(e){return he(e.firstChild)},contents:function(e){return e.contentDocument||re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(i,n){var o=re.map(this,t,i);return\"Until\"!==e.slice(-5)&&(n=i),n&&\"string\"==typeof n&&(o=re.filter(n,o)),this.length>1&&(be[e]||re.uniqueSort(o),ye.test(e)&&o.reverse()),this.pushStack(o)}});var we=/\\S+/g;re.Callbacks=function(e){e=\"string\"==typeof e?r(e):re.extend({},e);var t,i,n,o,s=[],a=[],l=-1,u=function(){for(o=e.once,n=t=!0;a.length;l=-1)for(i=a.shift();++l-1;)s.splice(i,1),i<=l&&l--}),this},has:function(e){return e?re.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i=\"\",this},disabled:function(){return!s},lock:function(){return o=a=[],i||(s=i=\"\"),this},locked:function(){return!!o},fireWith:function(e,i){return o||(i=i||[],i=[e,i.slice?i.slice():i],a.push(i),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},re.extend({Deferred:function(e){var t=[[\"resolve\",\"done\",re.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",re.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",re.Callbacks(\"memory\")]],i=\"pending\",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(i){re.each(t,function(t,r){var s=re.isFunction(e[t])&&e[t];o[r[1]](function(){var e=s&&s.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+\"With\"](this===n?i.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,n):n}},o={};return n.pipe=n.then,re.each(t,function(e,r){var s=r[2],a=r[3];n[r[1]]=s.add,a&&s.add(function(){i=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+\"With\"](this===o?n:this,arguments),this},o[r[0]+\"With\"]=s.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(e){var t,i,n,o=0,r=G.call(arguments),s=r.length,a=1!==s||e&&re.isFunction(e.promise)?s:0,l=1===a?e:re.Deferred(),u=function(e,i,n){return function(o){i[e]=this,n[e]=arguments.length>1?G.call(arguments):o,n===t?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(t=new Array(s),i=new Array(s),n=new Array(s);o0||(Ce.resolveWith(K,[re]),re.fn.triggerHandler&&(re(K).triggerHandler(\"ready\"),re(K).off(\"ready\"))))}}),re.ready.promise=function(t){return Ce||(Ce=re.Deferred(),\"complete\"===K.readyState||\"loading\"!==K.readyState&&!K.documentElement.doScroll?e.setTimeout(re.ready):(K.addEventListener(\"DOMContentLoaded\",s),e.addEventListener(\"load\",s))),Ce.promise(t)},re.ready.promise();var ke=function(e,t,i,n,o,r,s){var a=0,l=e.length,u=null==i;if(\"object\"===re.type(i)){o=!0;for(a in i)ke(e,t,a,i[a],!0,r,s)}else if(void 0!==n&&(o=!0,re.isFunction(n)||(s=!0),u&&(s?(t.call(e,n),t=null):(u=t,t=function(e,t,i){return u.call(re(e),i)})),t))for(;a-1&&void 0!==i&&Se.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Se.remove(this,e)})}}),re.extend({queue:function(e,t,i){var n;if(e)return t=(t||\"fx\")+\"queue\",n=De.get(e,t),i&&(!n||re.isArray(i)?n=De.access(e,t,re.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||\"fx\";var i=re.queue(e,t),n=i.length,o=i.shift(),r=re._queueHooks(e,t),s=function(){re.dequeue(e,t)};\"inprogress\"===o&&(o=i.shift(),n--),o&&(\"fx\"===t&&i.unshift(\"inprogress\"),delete r.stop,o.call(e,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var i=t+\"queueHooks\";return De.get(e,i)||De.access(e,i,{empty:re.Callbacks(\"once memory\").add(function(){De.remove(e,[t+\"queue\",i])})})}}),re.fn.extend({queue:function(e,t){var i=2;return\"string\"!=typeof e&&(t=e,e=\"fx\",i--),arguments.length\",\"\"],thead:[1,\"\",\"
      \"],col:[2,\"\",\"
      \"],tr:[2,\"\",\"
      \"],td:[3,\"\",\"
      \"],_default:[0,\"\",\"\"]};Le.optgroup=Le.option,Le.tbody=Le.tfoot=Le.colgroup=Le.caption=Le.thead,Le.th=Le.td;var He=/<|&#?\\w+;/;!function(){var e=K.createDocumentFragment(),t=e.appendChild(K.createElement(\"div\")),i=K.createElement(\"input\");i.setAttribute(\"type\",\"radio\"),i.setAttribute(\"checked\",\"checked\"),i.setAttribute(\"name\",\"t\"),t.appendChild(i),ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML=\"\",ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Oe=/^key/,We=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$e=/^([^.]*)(?:\\.(.+)|)/;re.event={global:{},add:function(e,t,i,n,o){var r,s,a,l,u,c,d,h,p,f,m,g=De.get(e);if(g)for(i.handler&&(r=i,i=r.handler,o=r.selector),i.guid||(i.guid=re.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return\"undefined\"!=typeof re&&re.event.triggered!==t.type?re.event.dispatch.apply(e,arguments):void 0}),t=(t||\"\").match(we)||[\"\"],u=t.length;u--;)a=$e.exec(t[u])||[],p=m=a[1],f=(a[2]||\"\").split(\".\").sort(),p&&(d=re.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=re.event.special[p]||{},c=re.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&re.expr.match.needsContext.test(o),namespace:f.join(\".\")},r),(h=l[p])||(h=l[p]=[],h.delegateCount=0,d.setup&&d.setup.call(e,n,f,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),o?h.splice(h.delegateCount++,0,c):h.push(c),re.event.global[p]=!0)},remove:function(e,t,i,n,o){var r,s,a,l,u,c,d,h,p,f,m,g=De.hasData(e)&&De.get(e);if(g&&(l=g.events)){for(t=(t||\"\").match(we)||[\"\"],u=t.length;u--;)if(a=$e.exec(t[u])||[],p=m=a[1],f=(a[2]||\"\").split(\".\").sort(),p){for(d=re.event.special[p]||{},p=(n?d.delegateType:d.bindType)||p,h=l[p]||[],a=a[2]&&new RegExp(\"(^|\\\\.)\"+f.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),s=r=h.length;r--;)c=h[r],!o&&m!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&(\"**\"!==n||!c.selector)||(h.splice(r,1),\n", " c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));s&&!h.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||re.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)re.event.remove(e,p+t[u],i,n,!0);re.isEmptyObject(l)&&De.remove(e,\"handle events\")}},dispatch:function(e){e=re.event.fix(e);var t,i,n,o,r,s=[],a=G.call(arguments),l=(De.get(this,\"events\")||{})[e.type]||[],u=re.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(s=re.event.handlers.call(this,e,l),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(r.namespace)||(e.handleObj=r,e.data=r.data,n=((re.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,o,r,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(\"click\"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||\"click\"!==e.type)){for(n=[],i=0;i-1:re.find(o,this,null,[l]).length),n[o]&&n.push(r);n.length&&s.push({elem:l,handlers:n})}return a]*)\\/>/gi,qe=/\\s*$/g;re.extend({htmlPrefilter:function(e){return e.replace(Fe,\"<$1>\")},clone:function(e,t,i){var n,o,r,s,a=e.cloneNode(!0),l=re.contains(e.ownerDocument,e);if(!(ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(s=c(a),r=c(e),n=0,o=r.length;n0&&d(s,!l&&c(e,\"script\")),a},cleanData:function(e){for(var t,i,n,o=re.event.special,r=0;void 0!==(i=e[r]);r++)if(xe(i)){if(t=i[De.expando]){if(t.events)for(n in t.events)o[n]?re.event.remove(i,n):re.removeEvent(i,n,t.handle);i[De.expando]=void 0}i[Se.expando]&&(i[Se.expando]=void 0)}}}),re.fn.extend({domManip:C,detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(e){return ke(this,function(e){return void 0===e?re.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 C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.appendChild(e)}})},prepend:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return C(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&&(re.cleanData(c(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return ke(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!qe.test(e)&&!Le[(Ne.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=re.htmlPrefilter(e);try{for(;i1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){Ae(this)?re(this).show():re(this).hide()})}}),re.Tween=I,I.prototype={constructor:I,init:function(e,t,i,n,o,r){this.elem=e,this.prop=i,this.easing=o||re.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(re.cssNumber[i]?\"\":\"px\")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,i=I.propHooks[this.prop];return this.options.duration?this.pos=t=re.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),i&&i.set?i.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.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=re.css(e.elem,e.prop,\"\"),t&&\"auto\"!==t?t:0)},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[re.cssProps[e.prop]]&&!re.cssHooks[e.prop]?e.elem[e.prop]=e.now:re.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},re.fx=I.prototype.init,re.fx.step={};var ot,rt,st=/^(?:toggle|show|hide)$/,at=/queueHooks$/;re.Animation=re.extend(W,{tweeners:{\"*\":[function(e,t){var i=this.createTween(e,t);return u(i.elem,e,Pe.exec(t),i),i}]},tweener:function(e,t){re.isFunction(e)?(t=e,e=[\"*\"]):e=e.match(we);for(var i,n=0,o=e.length;n1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return\"undefined\"==typeof e.getAttribute?re.prop(e,t,i):(1===r&&re.isXMLDoc(e)||(t=t.toLowerCase(),o=re.attrHooks[t]||(re.expr.match.bool.test(t)?lt:void 0)),void 0!==i?null===i?void re.removeAttr(e,t):o&&\"set\"in o&&void 0!==(n=o.set(e,i,t))?n:(e.setAttribute(t,i+\"\"),i):o&&\"get\"in o&&null!==(n=o.get(e,t))?n:(n=re.find.attr(e,t),null==n?void 0:n))},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&\"radio\"===t&&re.nodeName(e,\"input\")){var i=e.value;return e.setAttribute(\"type\",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n,o=0,r=t&&t.match(we);if(r&&1===e.nodeType)for(;i=r[o++];)n=re.propFix[i]||i,re.expr.match.bool.test(i)&&(e[n]=!1),e.removeAttribute(i)}}),lt={set:function(e,t,i){return t===!1?re.removeAttr(e,i):e.setAttribute(i,i),i}},re.each(re.expr.match.bool.source.match(/\\w+/g),function(e,t){var i=ut[t]||re.find.attr;ut[t]=function(e,t,n){var o,r;return n||(r=ut[t],ut[t]=o,o=null!=i(e,t,n)?t.toLowerCase():null,ut[t]=r),o}});var ct=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return ke(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[re.propFix[e]||e]})}}),re.extend({prop:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&re.isXMLDoc(e)||(t=re.propFix[t]||t,o=re.propHooks[t]),void 0!==i?o&&\"set\"in o&&void 0!==(n=o.set(e,i,t))?n:e[t]=i:o&&\"get\"in o&&null!==(n=o.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,\"tabindex\");return t?parseInt(t,10):ct.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),ne.optSelected||(re.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)}}),re.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){re.propFix[this.toLowerCase()]=this});var ht=/[\\t\\r\\n\\f]/g;re.fn.extend({addClass:function(e){var t,i,n,o,r,s,a,l=0;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,$(this)))});if(\"string\"==typeof e&&e)for(t=e.match(we)||[];i=this[l++];)if(o=$(i),n=1===i.nodeType&&(\" \"+o+\" \").replace(ht,\" \")){for(s=0;r=t[s++];)n.indexOf(\" \"+r+\" \")<0&&(n+=r+\" \");a=re.trim(n),o!==a&&i.setAttribute(\"class\",a)}return this},removeClass:function(e){var t,i,n,o,r,s,a,l=0;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,$(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if(\"string\"==typeof e&&e)for(t=e.match(we)||[];i=this[l++];)if(o=$(i),n=1===i.nodeType&&(\" \"+o+\" \").replace(ht,\" \")){for(s=0;r=t[s++];)for(;n.indexOf(\" \"+r+\" \")>-1;)n=n.replace(\" \"+r+\" \",\" \");a=re.trim(n),o!==a&&i.setAttribute(\"class\",a)}return this},toggleClass:function(e,t){var i=typeof e;return\"boolean\"==typeof t&&\"string\"===i?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(i){re(this).toggleClass(e.call(this,i,$(this),t),t)}):this.each(function(){var t,n,o,r;if(\"string\"===i)for(n=0,o=re(this),r=e.match(we)||[];t=r[n++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&\"boolean\"!==i||(t=$(this),t&&De.set(this,\"__className__\",t),this.setAttribute&&this.setAttribute(\"class\",t||e===!1?\"\":De.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,i,n=0;for(t=\" \"+e+\" \";i=this[n++];)if(1===i.nodeType&&(\" \"+$(i)+\" \").replace(ht,\" \").indexOf(t)>-1)return!0;return!1}});var pt=/\\r/g,ft=/[\\x20\\t\\r\\n\\f]+/g;re.fn.extend({val:function(e){var t,i,n,o=this[0];{if(arguments.length)return n=re.isFunction(e),this.each(function(i){var o;1===this.nodeType&&(o=n?e.call(this,i,re(this).val()):e,null==o?o=\"\":\"number\"==typeof o?o+=\"\":re.isArray(o)&&(o=re.map(o,function(e){return null==e?\"\":e+\"\"})),t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()],t&&\"set\"in t&&void 0!==t.set(this,o,\"value\")||(this.value=o))});if(o)return t=re.valHooks[o.type]||re.valHooks[o.nodeName.toLowerCase()],t&&\"get\"in t&&void 0!==(i=t.get(o,\"value\"))?i:(i=o.value,\"string\"==typeof i?i.replace(pt,\"\"):null==i?\"\":i)}}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,\"value\");return null!=t?t:re.trim(re.text(e)).replace(ft,\" \")}},select:{get:function(e){for(var t,i,n=e.options,o=e.selectedIndex,r=\"select-one\"===e.type||o<0,s=r?null:[],a=r?o+1:n.length,l=o<0?a:r?o:0;l-1)&&(i=!0);return i||(e.selectedIndex=-1),r}}}}),re.each([\"radio\",\"checkbox\"],function(){re.valHooks[this]={set:function(e,t){if(re.isArray(t))return e.checked=re.inArray(re(e).val(),t)>-1}},ne.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})});var mt=/^(?:focusinfocus|focusoutblur)$/;re.extend(re.event,{trigger:function(t,i,n,o){var r,s,a,l,u,c,d,h=[n||K],p=ie.call(t,\"type\")?t.type:t,f=ie.call(t,\"namespace\")?t.namespace.split(\".\"):[];if(s=a=n=n||K,3!==n.nodeType&&8!==n.nodeType&&!mt.test(p+re.event.triggered)&&(p.indexOf(\".\")>-1&&(f=p.split(\".\"),p=f.shift(),f.sort()),u=p.indexOf(\":\")<0&&\"on\"+p,t=t[re.expando]?t:new re.Event(p,\"object\"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=f.join(\".\"),t.rnamespace=t.namespace?new RegExp(\"(^|\\\\.)\"+f.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:re.makeArray(i,[t]),d=re.event.special[p]||{},o||!d.trigger||d.trigger.apply(n,i)!==!1)){if(!o&&!d.noBubble&&!re.isWindow(n)){for(l=d.delegateType||p,mt.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(n.ownerDocument||K)&&h.push(a.defaultView||a.parentWindow||e)}for(r=0;(s=h[r++])&&!t.isPropagationStopped();)t.type=r>1?l:d.bindType||p,c=(De.get(s,\"events\")||{})[t.type]&&De.get(s,\"handle\"),c&&c.apply(s,i),c=u&&s[u],c&&c.apply&&xe(s)&&(t.result=c.apply(s,i),t.result===!1&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),i)!==!1||!xe(n)||u&&re.isFunction(n[p])&&!re.isWindow(n)&&(a=n[u],a&&(n[u]=null),re.event.triggered=p,n[p](),re.event.triggered=void 0,a&&(n[u]=a)),t.result}},simulate:function(e,t,i){var n=re.extend(new re.Event,i,{type:e,isSimulated:!0});re.event.trigger(n,null,t)}}),re.fn.extend({trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return re.event.trigger(e,t,i,!0)}}),re.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(e,t){re.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ne.focusin=\"onfocusin\"in e,ne.focusin||re.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var i=function(e){re.event.simulate(t,e.target,re.event.fix(e))};re.event.special[t]={setup:function(){var n=this.ownerDocument||this,o=De.access(n,t);o||n.addEventListener(e,i,!0),De.access(n,t,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=De.access(n,t)-1;o?De.access(n,t,o):(n.removeEventListener(e,i,!0),De.remove(n,t))}}});var gt=e.location,vt=re.now(),_t=/\\?/;re.parseJSON=function(e){return JSON.parse(e+\"\")},re.parseXML=function(t){var i;if(!t||\"string\"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,\"text/xml\")}catch(n){i=void 0}return i&&!i.getElementsByTagName(\"parsererror\").length||re.error(\"Invalid XML: \"+t),i};var yt=/#.*$/,bt=/([?&])_=[^&]*/,wt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ct=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kt=/^(?:GET|HEAD)$/,xt=/^\\/\\//,Dt={},St={},Et=\"*/\".concat(\"*\"),Tt=K.createElement(\"a\");Tt.href=gt.href,re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gt.href,type:\"GET\",isLocal:Ct.test(gt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Et,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\":re.parseJSON,\"text xml\":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,re.ajaxSettings),t):V(re.ajaxSettings,e)},ajaxPrefilter:F(Dt),ajaxTransport:F(St),ajax:function(t,i){function n(t,i,n,a){var u,d,_,y,w,k=i;2!==b&&(b=2,l&&e.clearTimeout(l),o=void 0,s=a||\"\",C.readyState=t>0?4:0,u=t>=200&&t<300||304===t,n&&(y=B(h,C,n)),y=z(h,y,C,u),u?(h.ifModified&&(w=C.getResponseHeader(\"Last-Modified\"),w&&(re.lastModified[r]=w),w=C.getResponseHeader(\"etag\"),w&&(re.etag[r]=w)),204===t||\"HEAD\"===h.type?k=\"nocontent\":304===t?k=\"notmodified\":(k=y.state,d=y.data,_=y.error,u=!_)):(_=k,!t&&k||(k=\"error\",t<0&&(t=0))),C.status=t,C.statusText=(i||k)+\"\",u?m.resolveWith(p,[d,k,C]):m.rejectWith(p,[C,k,_]),C.statusCode(v),v=void 0,c&&f.trigger(u?\"ajaxSuccess\":\"ajaxError\",[C,h,u?d:_]),g.fireWith(p,[C,k]),c&&(f.trigger(\"ajaxComplete\",[C,h]),--re.active||re.event.trigger(\"ajaxStop\")))}\"object\"==typeof t&&(i=t,t=void 0),i=i||{};var o,r,s,a,l,u,c,d,h=re.ajaxSetup({},i),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?re(p):re.event,m=re.Deferred(),g=re.Callbacks(\"once memory\"),v=h.statusCode||{},_={},y={},b=0,w=\"canceled\",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=wt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return b||(e=y[i]=y[i]||e,_[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),n(0,t),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,h.url=((t||h.url||gt.href)+\"\").replace(yt,\"\").replace(xt,gt.protocol+\"//\"),h.type=i.method||i.type||h.method||h.type,h.dataTypes=re.trim(h.dataType||\"*\").toLowerCase().match(we)||[\"\"],null==h.crossDomain){u=K.createElement(\"a\");try{u.href=h.url,u.href=u.href,h.crossDomain=Tt.protocol+\"//\"+Tt.host!=u.protocol+\"//\"+u.host}catch(k){h.crossDomain=!0}}if(h.data&&h.processData&&\"string\"!=typeof h.data&&(h.data=re.param(h.data,h.traditional)),q(Dt,h,i,C),2===b)return C;c=re.event&&h.global,c&&0===re.active++&&re.event.trigger(\"ajaxStart\"),h.type=h.type.toUpperCase(),h.hasContent=!kt.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(_t.test(r)?\"&\":\"?\")+h.data,delete h.data),h.cache===!1&&(h.url=bt.test(r)?r.replace(bt,\"$1_=\"+vt++):r+(_t.test(r)?\"&\":\"?\")+\"_=\"+vt++)),h.ifModified&&(re.lastModified[r]&&C.setRequestHeader(\"If-Modified-Since\",re.lastModified[r]),re.etag[r]&&C.setRequestHeader(\"If-None-Match\",re.etag[r])),(h.data&&h.hasContent&&h.contentType!==!1||i.contentType)&&C.setRequestHeader(\"Content-Type\",h.contentType),C.setRequestHeader(\"Accept\",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(\"*\"!==h.dataTypes[0]?\", \"+Et+\"; q=0.01\":\"\"):h.accepts[\"*\"]);for(d in h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(p,C,h)===!1||2===b))return C.abort();w=\"abort\";for(d in{success:1,error:1,complete:1})C[d](h[d]);if(o=q(St,h,i,C)){if(C.readyState=1,c&&f.trigger(\"ajaxSend\",[C,h]),2===b)return C;h.async&&h.timeout>0&&(l=e.setTimeout(function(){C.abort(\"timeout\")},h.timeout));try{b=1,o.send(_,n)}catch(k){if(!(b<2))throw k;n(-1,k)}}else n(-1,\"No Transport\");return C},getJSON:function(e,t,i){return re.get(e,t,i,\"json\")},getScript:function(e,t){return re.get(e,void 0,t,\"script\")}}),re.each([\"get\",\"post\"],function(e,t){re[t]=function(e,i,n,o){return re.isFunction(i)&&(o=o||n,n=i,i=void 0),re.ajax(re.extend({url:e,type:t,dataType:o,data:i,success:n},re.isPlainObject(e)&&e))}}),re._evalUrl=function(e){return re.ajax({url:e,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0})},re.fn.extend({wrapAll:function(e){var t;return re.isFunction(e)?this.each(function(t){re(this).wrapAll(e.call(this,t))}):(this[0]&&(t=re(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 re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(i){re(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,\"body\")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return!re.expr.filters.visible(e)},re.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Mt=/%20/g,Pt=/\\[\\]$/,Rt=/\\r?\\n/g,At=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var i,n=[],o=function(e,t){t=re.isFunction(t)?t():null==t?\"\":t,n[n.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquery&&!re.isPlainObject(e))re.each(e,function(){o(this.name,this.value)});else for(i in e)Y(i,e[i],t,o);return n.join(\"&\").replace(Mt,\"+\")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,\"elements\");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(\":disabled\")&&It.test(this.nodeName)&&!At.test(e)&&(this.checked||!Ie.test(e))}).map(function(e,t){var i=re(this).val();return null==i?null:re.isArray(i)?re.map(i,function(e){return{name:t.name,value:e.replace(Rt,\"\\r\\n\")}}):{name:t.name,value:i.replace(Rt,\"\\r\\n\")}}).get()}}),re.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Nt={0:200,1223:204},jt=re.ajaxSettings.xhr();ne.cors=!!jt&&\"withCredentials\"in jt,ne.ajax=jt=!!jt,re.ajaxTransport(function(t){var i,n;if(ne.cors||jt&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o[\"X-Requested-With\"]||(o[\"X-Requested-With\"]=\"XMLHttpRequest\");\n", " for(s in o)a.setRequestHeader(s,o[s]);i=function(e){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,\"abort\"===e?a.abort():\"error\"===e?\"number\"!=typeof a.status?r(0,\"error\"):r(a.status,a.statusText):r(Nt[a.status]||a.status,a.statusText,\"text\"!==(a.responseType||\"text\")||\"string\"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=i(\"error\"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){i&&n()})},i=i(\"abort\");try{a.send(t.hasContent&&t.data||null)}catch(l){if(i)throw l}},abort:function(){i&&i()}}}),re.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 re.globalEval(e),e}}}),re.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),re.ajaxTransport(\"script\",function(e){if(e.crossDomain){var t,i;return{send:function(n,o){t=re(\"" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# import freud box class\n", "from freud import box\n", "# create data\n", "fbox = box.Box(Lx=10, Ly=10, is2D=True)\n", "pos = np.array([[-1, 0, 0], [0, 0, 0], [1, 0, 0]], dtype=np.float32)\n", "ang = np.array([0.0, 0.0, 0.0], dtype=np.float32)\n", "\n", "side_length = max(fbox.Lx, fbox.Ly)\n", "l_min = -side_length / 2.0\n", "l_min *= 1.1\n", "l_max = -l_min\n", "\n", "p = figure(title=\"System Visualization\", x_range=(l_min, l_max), y_range=(l_min, l_max))\n", "patches = local_to_global(verts, pos[:,0:2], ang)\n", "for i in range(3):\n", " fill_color = np.array([c_list[i] for _ in range(1)])\n", " l_patches = np.zeros(shape=(1,patches.shape[1],patches.shape[2]), dtype=patches.dtype)\n", " l_patches[0] = patches[i]\n", " p.patches(xs=l_patches[:,:,0].tolist(),\n", " ys=l_patches[:,:,1].tolist(),\n", " fill_color=fill_color.tolist(),\n", " line_color=\"black\",\n", " line_width=1.5,\n", " legend=\"{}\".format(i))\n", "p.patches(xs=[[-fbox.Lx/2, fbox.Lx/2, fbox.Lx/2, -fbox.Lx/2]],\n", " ys=[[-fbox.Ly/2, -fbox.Ly/2, fbox.Ly/2, fbox.Ly/2]],\n", " fill_color=(0,0,0,0), line_color=\"black\", line_width=2)\n", "p.legend.location='bottom_center'\n", "p.legend.orientation='horizontal'\n", "default_bokeh(p)\n", "show(p)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Compute Pairing\n", "\n", "The 2D pairing module is found in the order module. Set the max distance to search for neighbors, the number of neighbors to search, and the tolerance for the dot product used in the computation" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# pair stuff\n", "from freud import order\n", "myPair = order.Pairing2D(rmax=1.1, k=2, compDotTol=0.1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create array of angles to search for pairs\n", "\n", "Not all shapes have one orientation where a pair could form. In this system a paired rectangle could be either to the left or right i.e. $\\theta=0$ or $\\theta=\\pi$. To account for this, we create an array that gives every particle a set of local orientations to search for a pair, in this case $\\theta=0$ or $\\theta=\\pi$." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "c_ang = np.zeros(shape=(pos.shape[0],2), dtype=np.float32)\n", "c_ang[:,1] = np.pi\n", "myPair.compute(fbox, pos, ang, c_ang)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Investigate output\n", "\n", "Two arrays are provided as output: the match array and the pair array.\n", "\n", "## Match array ##\n", "\n", "The match array is a boolean array that is $1$ if a particle is matched and $0$ if not.\n", "\n", "## Pair array ##\n", "\n", "The pair array gives the index of the paired particle. Note that if a particle could be paired to multiple particles, only one pair is returned, the lower of the two index values.\n", "\n", "In this example, particle 0 is paired with particle 1, particle 1 is paired with particle 0 (and technically 2), and particle 2 is paired with particle 1." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1 1 1]\n", "[1 0 1]\n" ] } ], "source": [ "x = myPair.getMatch()\n", "print(x)\n", "y = myPair.getPair()\n", "print(y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Other examples" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
      \n", "
      \n", "
      \n", "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[0 1 1]\n", "[0 2 1]\n" ] } ], "source": [ "pos = np.array([[-1.5, 0, 0], [0, 0, 0], [1, 0, 0]], dtype=np.float32)\n", "ang = np.array([0.0, 0.0, 0.0], dtype=np.float32)\n", "\n", "side_length = max(fbox.Lx, fbox.Ly)\n", "l_min = -side_length / 2.0\n", "l_min *= 1.1\n", "l_max = -l_min\n", "\n", "p = figure(title=\"System Visualization\", x_range=(l_min, l_max), y_range=(l_min, l_max))\n", "patches = local_to_global(verts, pos[:,0:2], ang)\n", "for i in range(3):\n", " fill_color = np.array([c_list[i] for _ in range(1)])\n", " l_patches = np.zeros(shape=(1,patches.shape[1],patches.shape[2]), dtype=patches.dtype)\n", " l_patches[0] = patches[i]\n", " p.patches(xs=l_patches[:,:,0].tolist(),\n", " ys=l_patches[:,:,1].tolist(),\n", " fill_color=fill_color.tolist(),\n", " line_color=\"black\",\n", " line_width=1.5,\n", " legend=\"{}\".format(i))\n", "p.patches(xs=[[-fbox.Lx/2, fbox.Lx/2, fbox.Lx/2, -fbox.Lx/2]],\n", " ys=[[-fbox.Ly/2, -fbox.Ly/2, fbox.Ly/2, fbox.Ly/2]],\n", " fill_color=(0,0,0,0), line_color=\"black\", line_width=2)\n", "p.legend.location='bottom_center'\n", "p.legend.orientation='horizontal'\n", "default_bokeh(p)\n", "show(p)\n", "\n", "myPair.compute(fbox, pos, ang, c_ang)\n", "x = myPair.getMatch()\n", "print(x)\n", "y = myPair.getPair()\n", "print(y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now that we move particle 0 farther away, it is no longer paired, and particles 1 and 2 are paired." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
      \n", "
      \n", "
      \n", "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[0 1 1]\n", "[0 2 1]\n" ] } ], "source": [ "pos = np.array([[-1.0, 0, 0], [0, 0, 0], [1, 0, 0]], dtype=np.float32)\n", "ang = np.array([0.1, 0.0, 0.0], dtype=np.float32)\n", "\n", "side_length = max(fbox.Lx, fbox.Ly)\n", "l_min = -side_length / 2.0\n", "l_min *= 1.1\n", "l_max = -l_min\n", "\n", "p = figure(title=\"System Visualization\", x_range=(l_min, l_max), y_range=(l_min, l_max))\n", "patches = local_to_global(verts, pos[:,0:2], ang)\n", "for i in range(3):\n", " fill_color = np.array([c_list[i] for _ in range(1)])\n", " l_patches = np.zeros(shape=(1,patches.shape[1],patches.shape[2]), dtype=patches.dtype)\n", " l_patches[0] = patches[i]\n", " p.patches(xs=l_patches[:,:,0].tolist(),\n", " ys=l_patches[:,:,1].tolist(),\n", " fill_color=fill_color.tolist(),\n", " line_color=\"black\",\n", " line_width=1.5,\n", " legend=\"{}\".format(i))\n", "p.patches(xs=[[-fbox.Lx/2, fbox.Lx/2, fbox.Lx/2, -fbox.Lx/2]],\n", " ys=[[-fbox.Ly/2, -fbox.Ly/2, fbox.Ly/2, fbox.Ly/2]],\n", " fill_color=(0,0,0,0), line_color=\"black\", line_width=2)\n", "p.legend.location='bottom_center'\n", "p.legend.orientation='horizontal'\n", "default_bokeh(p)\n", "show(p)\n", "\n", "myPair.compute(fbox, pos, ang, c_ang)\n", "x = myPair.getMatch()\n", "print(x)\n", "y = myPair.getPair()\n", "print(y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we rotate particle 0 so that it's no longer within the dot product tolerance for being bound" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
      \n", "
      \n", "
      \n", "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[1 1 1]\n", "[1 0 1]\n" ] } ], "source": [ "# set a higher tolerance\n", "myPair = order.Pairing2D(rmax=1.1, k=2, compDotTol=0.5)\n", "pos = np.array([[-1.0, 0, 0], [0, 0, 0], [1, 0, 0]], dtype=np.float32)\n", "ang = np.array([0.1, 0.0, 0.0], dtype=np.float32)\n", "\n", "side_length = max(fbox.Lx, fbox.Ly)\n", "l_min = -side_length / 2.0\n", "l_min *= 1.1\n", "l_max = -l_min\n", "\n", "p = figure(title=\"System Visualization\", x_range=(l_min, l_max), y_range=(l_min, l_max))\n", "patches = local_to_global(verts, pos[:,0:2], ang)\n", "for i in range(3):\n", " fill_color = np.array([c_list[i] for _ in range(1)])\n", " l_patches = np.zeros(shape=(1,patches.shape[1],patches.shape[2]), dtype=patches.dtype)\n", " l_patches[0] = patches[i]\n", " p.patches(xs=l_patches[:,:,0].tolist(),\n", " ys=l_patches[:,:,1].tolist(),\n", " fill_color=fill_color.tolist(),\n", " line_color=\"black\",\n", " line_width=1.5,\n", " legend=\"{}\".format(i))\n", "p.patches(xs=[[-fbox.Lx/2, fbox.Lx/2, fbox.Lx/2, -fbox.Lx/2]],\n", " ys=[[-fbox.Ly/2, -fbox.Ly/2, fbox.Ly/2, fbox.Ly/2]],\n", " fill_color=(0,0,0,0), line_color=\"black\", line_width=2)\n", "p.legend.location='bottom_center'\n", "p.legend.orientation='horizontal'\n", "default_bokeh(p)\n", "show(p)\n", "\n", "myPair.compute(fbox, pos, ang, c_ang)\n", "x = myPair.getMatch()\n", "print(x)\n", "y = myPair.getPair()\n", "print(y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When we increase the dot product tolerance, particle 0 and particle 1 are paired once again" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.3" } }, "nbformat": 4, "nbformat_minor": 2 }