" Object.defineProperty(n,\"__esModule\",{value:!0});var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}function a(t,e){var n=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function i(t){return this instanceof i?(this.v=t,this):new i(t)}n.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.__assign=function(){return n.__assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.__assign.apply(this,arguments)},n.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},n.__decorate=function(t,e,n,r){var o,a=arguments.length,i=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(i=(a<3?o(i):a>3?o(e,n,i):o(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},n.__param=function(t,e){return function(n,r){e(n,r,t)}},n.__metadata=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},n.__awaiter=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{c(r.next(t))}catch(t){a(t)}}function u(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,u)}c((r=r.apply(t,e||[])).next())}))},n.__generator=function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError(\"Generator is already executing.\");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},n.__exportStar=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},n.__values=o,n.__read=a,n.__spread=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t},n.__spreadArrays=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var a=arguments[e],i=0,u=a.length;i<u;i++,o++)r[o]=a[i];return r},n.__await=i,n.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var r,o=n.apply(t,e||[]),a=[];return r=
" function _(e,r,t){var l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(t,\"__esModule\",{value:!0});var o=e(3);t.version=o.version;var s=e(4);t.index=s.index,t.embed=l(e(4)),t.protocol=l(e(367)),t._testing=l(e(368));var n=e(72);t.logger=n.logger,t.set_log_level=n.set_log_level;var a=e(22);t.settings=a.settings;var i=e(7);t.Models=i.Models;var v=e(5);t.documents=v.documents;var _=e(369);t.safely=_.safely},\n",
" function _(e,n,o){Object.defineProperty(o,\"__esModule\",{value:!0}),o.version=\"2.1.0\"},\n",
" function _(e,o,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(5),s=e(72),d=e(24),r=e(8),_=e(15),c=e(358),i=e(360),a=e(359);var u=e(358);n.add_document_standalone=u.add_document_standalone,n.index=u.index;var l=e(360);n.add_document_from_session=l.add_document_from_session;var m=e(365);n.embed_items_notebook=m.embed_items_notebook,n.kernels=m.kernels;var f=e(359);async function g(e,o,n,_){r.isString(e)&&(e=JSON.parse(d.unescape(e)));const u={};for(const o in e){const n=e[o];u[o]=t.Document.from_json(n)}const l=[];for(const e of o){const o=a._resolve_element(e),t=a._resolve_root_elements(e);if(null!=e.docid)l.push(await c.add_document_standalone(u[e.docid],o,t,e.use_for_title));else{if(null==e.token)throw new Error(\"Error rendering Bokeh items: either 'docid' or 'token' was expected.\");{const d=i._get_ws_url(n,_);s.logger.debug(\"embed: computed ws url: \"+d);try{l.push(await i.add_document_from_session(d,e.token,o,t,e.use_for_title)),console.log(\"Bokeh items were rendered successfully\")}catch(e){console.log(\"Error rendering Bokeh items:\",e)}}}}return l}n.BOKEH_ROOT=f.BOKEH_ROOT,n.embed_item=async function(e,o){const n={},t=d.uuid4();n[t]=e.doc,null==o&&(o=e.target_id);const s=document.getElementById(o);null!=s&&s.classList.add(a.BOKEH_ROOT);const r={roots:{[e.root_id]:o},root_ids:[e.root_id],docid:t},[c]=await _.defer(()=>g(n,[r]));return c},n.embed_items=async function(e,o,n,t){return await _.defer(()=>g(e,o,n,t))}},\n",
" function _(e,t,_){Object.defineProperty(_,\"__esModule\",{value:!0});const o=e(1);o.__exportStar(e(6),_),o.__exportStar(e(105),_)},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const o=e(1),n=e(7),r=e(3),i=e(72),_=e(291),a=e(13),l=e(14),c=e(16),h=e(27),d=e(9),f=o.__importStar(e(104)),u=e(25),m=e(8),g=e(245),p=e(76),w=e(71),v=e(105);class b{constructor(e){this.document=e,this.session=null,this.subscribed_models=new Set}send_event(e){const t=new v.MessageSentEvent(this.document,\"bokeh_event\",e.to_json());this.document._trigger_on_change(t)}trigger(e){for(const t of this.subscribed_models)null!=e.origin&&e.origin!=t||t._process_event(e)}}s.EventManager=b,b.__name__=\"EventManager\",s.documents=[],s.DEFAULT_TITLE=\"Bokeh Application\";class y{constructor(){s.documents.push(this),this._init_timestamp=Date.now(),this._title=s.DEFAULT_TITLE,this._roots=[],this._all_models=new Map,this._all_models_freeze_count=0,this._callbacks=new Map,this._message_callbacks=new Map,this.event_manager=new b(this),this.idle=new l.Signal0(this,\"idle\"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}get layoutables(){return this._roots.filter(e=>e instanceof g.LayoutDOM)}get is_idle(){for(const e of this.layoutables)if(!this._idle_roots.has(e))return!1;return!0}notify_idle(e){this._idle_roots.set(e,!0),this.is_idle&&(i.logger.info(`document idle at ${Date.now()-this._init_timestamp} ms`),this.idle.emit())}clear(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}}interactive_start(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new _.LODStart)),this._interactive_timestamp=Date.now()}interactive_stop(e){null!=this._interactive_plot&&this._interactive_plot.id===e.id&&this._interactive_plot.trigger_event(new _.LODEnd),this._interactive_plot=null,this._interactive_timestamp=null}interactive_duration(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp}destructively_move(e){if(e===this)throw new Error(\"Attempted to overwrite a document with itself\");e.clear();const t=d.copy(this._roots);this.clear();for(const e of t)if(null!=e.document)throw new Error(\"Somehow we didn't detach \"+e);if(0!=this._all_models.size)throw new Error(\"this._all_models still had stuff in it: \"+this._all_models);for(const s of t)e.add_root(s);e.set_title(this._title)}_push_all_models_freeze(){this._all_models_freeze_count+=1}_pop_all_models_freeze(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()}_invalidate_all_models(){i.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count&&this._recompute_all_models()}_recompute_all_models(){let e=new Set;for(const t of this._roots)e=f.union(e,t.references());const t=new Set(this._all_models.values()),s=f.difference(t,e),o=f.difference(e,t),n=new Map;for(const t of e)n.set(t.id,t);for(const e of s)e.detach_document();for(const e of o)e.attach_document(this);this._all_models=n}roots(){return this._roots}add_root(e,t){if(i.logger.debug(\"Adding root: \"+e),!d.includes(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new v.RootAddedEvent(this,e,t))}}remove_root(e,t){const s=this._roots.indexOf(e);if(!(s<0)){this._push_all_models_freeze();try{this._roots.splice(s,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new v.RootRemovedEvent(this,e,t))}}title(){return this._title}set_title(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new v.TitleChangedEvent(this,e,t)))}get_model_by_id(e){var t;return null!==(t=this._all_models.get(e))&&void 0!==t?t:null}get_model_by_name(e){const t=[];for(const s of this._all_models.values())s instanceof w.Model&&s.name==e&&t.push(s);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(`Multiple models are named '${e}'`)}}on_message(e,t){const s=this._message_callbacks.get(e);null==s?this._message_callbacks.set(e,new Set([t])):s.add(t)}remove_on_message(e,t){var s;null===(s=this._message
" function _(e,r,s){Object.defineProperty(s,\"__esModule\",{value:!0});const o=e(1),t=e(8),d=e(13);s.overrides={};const i=new Map;s.Models=e=>{const r=s.overrides[e]||i.get(e);if(null==r)throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`);return r},s.Models.register=(e,r)=>{s.overrides[e]=r},s.Models.unregister=e=>{delete s.overrides[e]},s.Models.register_models=(e,r=!1,s)=>{var o;if(null!=e)for(const l in e){const n=e[l];if(o=n,t.isObject(o)&&o.prototype instanceof d.HasProps){const e=n.__qualified__;r||!i.has(e)?i.set(e,n):null!=s?s(e):console.warn(`Model '${e}' was already registered`)}}},s.register_models=s.Models.register_models,s.Models.registered_names=()=>Array.from(i.keys());const l=o.__importStar(e(29));s.register_models(l)},\n",
" function _(n,r,t){Object.defineProperty(t,\"__esModule\",{value:!0});\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" function _(e,r,n){Object.defineProperty(n,\"__esModule\",{value:!0});class o extends Error{}n.AssertionError=o,o.__name__=\"AssertionError\",n.assert=function(e,r){if(!(!0===e||!1!==e&&e()))throw new o(null!=r?r:\"Assertion failed\")},n.unreachable=function(){throw new Error(\"unreachable code\")}},\n",
" function _(n,t,e){function r(n,t,e,...r){const o=n.length;t<0&&(t+=o),t<0?t=0:t>o&&(t=o),null==e||e>o-t?e=o-t:e<0&&(e=0);const u=o-e+r.length,i=new n.constructor(u);let f=0;for(;f<t;f++)i[f]=n[f];for(const n of r)i[f++]=n;for(let r=t+e;r<o;r++)i[f++]=n[r];return i}function o(n,t){return r(n,t,n.length-t)}function u(n,t,e){const r=n.length;if(void 0===e&&0==r)throw new Error(\"can't reduce an empty array without an initial value\");let o,u;for(void 0===e?(o=n[0],u=1):(o=e,u=0);u<r;u++)o=t(o,n[u],u,n);return o}function i(n){return function(t,e){const r=t.length;let o=n>0?0:r-1;for(;o>=0&&o<r;o+=n)if(e(t[o]))return o;return-1}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.is_empty=function(n){return 0==n.length},e.splice=r,e.head=o,e.insert=function(n,t,e){return r(n,e,0,t)},e.append=function(n,t){return r(n,n.length,0,t)},e.prepend=function(n,t){return r(n,0,0,t)},e.indexOf=function(n,t){for(let e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1},e.map=function(n,t){const e=n.length,r=new n.constructor(e);for(let o=0;o<e;o++)r[o]=t(n[o],o,n);return r},e.filter=function(n,t){const e=n.length,r=new n.constructor(e);let u=0;for(let o=0;o<e;o++){const e=n[o];t(e,o,n)&&(r[u++]=e)}return o(r,u)},e.reduce=u,e.min=function(n){let t,e=1/0;for(let r=0,o=n.length;r<o;r++)t=n[r],t<e&&(e=t);return e},e.min_by=function(n,t){if(0==n.length)throw new Error(\"min_by() called with an empty array\");let e=n[0],r=t(e);for(let o=1,u=n.length;o<u;o++){const u=n[o],i=t(u);i<r&&(e=u,r=i)}return e},e.max=function(n){let t,e=-1/0;for(let r=0,o=n.length;r<o;r++)t=n[r],t>e&&(e=t);return e},e.max_by=function(n,t){if(0==n.length)throw new Error(\"max_by() called with an empty array\");let e=n[0],r=t(e);for(let o=1,u=n.length;o<u;o++){const u=n[o],i=t(u);i>r&&(e=u,r=i)}return e},e.sum=function(n){let t=0;for(let e=0,r=n.length;e<r;e++)t+=n[e];return t},e.cumsum=function(n){const t=new n.constructor(n.length);return u(n,(n,e,r)=>t[r]=n+e,0),t},e.every=function(n,t){for(let e=0,r=n.length;e<r;e++)if(!t(n[e]))return!1;return!0},e.some=function(n,t){for(let e=0,r=n.length;e<r;e++)if(t(n[e]))return!0;return!1},e.index_of=function(n,t){for(let e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1},e.find_index=i(1),e.find_last_index=i(-1),e.find=function(n,t){const r=e.find_index(n,t);return-1==r?void 0:n[r]},e.find_last=function(n,t){const r=e.find_last_index(n,t);return-1==r?void 0:n[r]},e.sorted_index=function(n,t){let e=0,r=n.length;for(;e<r;){const o=Math.floor((e+r)/2);n[o]<t?e=o+1:r=o}return e}},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const r=e(1),n=e(14),i=e(16),o=r.__importStar(e(18)),c=r.__importStar(e(23)),a=e(24),_=e(9),u=e(17),h=e(8),f=e(25),l=e(5),p=e(26),d=e(27);class y extends(n.Signalable()){constructor(e={}){var t;super(),this._subtype=void 0,this.document=null,this.destroyed=new n.Signal0(this,\"destroyed\"),this.change=new n.Signal0(this,\"change\"),this.transformchange=new n.Signal0(this,\"transformchange\"),this.properties={},this._pending=!1,this._changing=!1;const s=e instanceof Map?e.get:t=>e[t];for(const[e,{type:t,default_value:r,options:n}]of u.entries(this._props)){if(null==t)throw new Error(`undefined property type for ${this.type}.${e}`);this.properties[e]=new t(this,e,r,s(e),n)}null!==(t=s(\"__deferred__\"))&&void 0!==t&&t||(this.finalize(),this.connect_signals())}set type(e){console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\"),this.constructor.__name__=e}get type(){return this.constructor.__qualified__}static get __qualified__(){const{__module__:e,__name__:t}=this;return null!=e?`${e}.${t}`:t}static init_HasProps(){this.prototype._props={},this.prototype._mixins=[],this.define({id:[o.String,()=>a.uniqueId()]})}static _fix_default(e,t){return void 0===e?void 0:h.isFunction(e)?e:h.isObject(e)?h.isArray(e)?()=>_.copy(e):()=>u.clone(e):()=>e}static define(e){for(const[t,s]of u.entries(e)){if(null!=this.prototype._props[t])throw new Error(`attempted to redefine property '${this.prototype.type}.${t}'`);if(null!=this.prototype[t])throw new Error(`attempted to redefine attribute '${this.prototype.type}.${t}'`);Object.defineProperty(this.prototype,t,{get(){return this.properties[t].get_value()},set(e){return this.setv({[t]:e}),this},configurable:!1,enumerable:!0});const[e,r,n]=s,i={type:e,default_value:this._fix_default(r,t),options:n},o=u.clone(this.prototype._props);o[t]=i,this.prototype._props=o}}static internal(e){const t={};for(const[s,r]of u.entries(e)){const[e,n,i={}]=r;t[s]=[e,n,Object.assign(Object.assign({},i),{internal:!0})]}this.define(t)}static mixins(e){function t(e){switch(e){case\"line\":return c.LineVector;case\"fill\":return c.FillVector;case\"hatch\":return c.HatchVector;case\"text\":return c.TextVector;default:throw new Error(`Unknown property mixin kind '${e}'`)}}function s(e,t){const s={};for(const[r,n]of u.entries(t))s[e+r]=n;return s}function r(e){const[t]=Object.keys(e),[s]=t.split(\"_\",1);return s}h.isArray(e)||(e=[e]);const n={},i=[];for(const o of e)if(h.isString(o)){const[e,r=\"\"]=o.split(\":\"),c=t(e);i.push(o),u.extend(n,s(r,c))}else if(h.isArray(o)){const[e,t]=o;i.push(`${r(t)}:${e}`),u.extend(n,s(e,t))}else{const e=o;i.push(r(e)),u.extend(n,e)}this.define(n),this.prototype._mixins=[...this.prototype._mixins,...i]}static override(e){for(const[t,s]of u.entries(e)){const e=this._fix_default(s,t),r=this.prototype._props[t];if(null==r)throw new Error(`attempted to override nonexistent '${this.prototype.type}.${t}'`);const n=u.clone(this.prototype._props);n[t]=Object.assign(Object.assign({},r),{default_value:e}),this.prototype._props=n}}toString(){return`${this.type}(${this.id})`}property(e){const t=this.properties[e];if(null!=t)return t;throw new Error(`unknown property ${this.type}.${e}`)}get attributes(){const e={};for(const t of this)e[t.attr]=t.get_value();return e}finalize(){for(const e of this)null!=e.spec.transform&&this.connect(e.spec.transform.change,()=>this.transformchange.emit());this.initialize()}initialize(){}connect_signals(){}disconnect_signals(){n.Signal.disconnectReceiver(this)}destroy(){this.disconnect_signals(),this.destroyed.emit()}clone(){return new this.constructor(this.attributes)}_setv(e,t){const s=t.check_eq,r=t.silent,n=[],i=this._changing;this._changing=!0;for(const[t,r]of e)!1!==s&&f.isEqual(t.get_value(),r)||(t.set_value(r),n.push(t));if(!r){n.length>0&&(this._pending=!0);for(const e of n)e.change.emit()}if(!i){if(!r&&!t.no_change)for(;this._pending;)this._pending=!1,this.change.emit();this._pending=!1,this._changing=!1}}setv(e,t={}){if(u.isEmpty(e))return;c
" function _(n,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=n(15),l=n(9);class o{constructor(n,t){this.sender=n,this.name=t}connect(n,t=null){c.has(this.sender)||c.set(this.sender,[]);const e=c.get(this.sender);if(null!=u(e,this,n,t))return!1;const s=t||n;r.has(s)||r.set(s,[]);const l=r.get(s),o={signal:this,slot:n,context:t};return e.push(o),l.push(o),!0}disconnect(n,t=null){const e=c.get(this.sender);if(null==e||0===e.length)return!1;const s=u(e,this,n,t);if(null==s)return!1;const l=t||n,o=r.get(l);return s.signal=null,f(e),f(o),!0}emit(n){const t=c.get(this.sender)||[];for(const{signal:e,slot:s,context:l}of t)e===this&&s.call(l,n,this.sender)}}e.Signal=o,o.__name__=\"Signal\";class i extends o{emit(){super.emit(void 0)}}e.Signal0=i,i.__name__=\"Signal0\",function(n){n.disconnectBetween=function(n,t){const e=c.get(n);if(null==e||0===e.length)return;const s=r.get(t);if(null!=s&&0!==s.length){for(const t of s){if(null==t.signal)return;t.signal.sender===n&&(t.signal=null)}f(e),f(s)}},n.disconnectSender=function(n){const t=c.get(n);if(null!=t&&0!==t.length){for(const n of t){if(null==n.signal)return;const t=n.context||n.slot;n.signal=null,f(r.get(t))}f(t)}},n.disconnectReceiver=function(n){const t=r.get(n);if(null!=t&&0!==t.length){for(const n of t){if(null==n.signal)return;const t=n.signal.sender;n.signal=null,f(c.get(t))}f(t)}},n.disconnectAll=function(n){const t=c.get(n);if(null!=t&&0!==t.length){for(const n of t)n.signal=null;f(t)}const e=r.get(n);if(null!=e&&0!==e.length){for(const n of e)n.signal=null;f(e)}}}(o||(e.Signal=o={})),e.Signalable=function(){return class{connect(n,t){return n.connect(t,this)}disconnect(n,t){return n.disconnect(t,this)}}};const c=new WeakMap,r=new WeakMap;function u(n,t,e,s){return l.find(n,n=>n.signal===t&&n.slot===e&&n.context===s)}const g=new Set;function f(n){0===g.size&&s.defer(a),g.add(n)}function a(){for(const n of g)l.remove_by(n,n=>null==n.signal);g.clear()}},\n",
" function _(n,e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.delay=\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(8),r=e(17);t.is_ref=function(e){if(i.isPlainObject(e)){const n=r.keys(e);return 1==n.length&&\"id\"==n[0]}return!1}},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const c=e(9);function o(e){return Object.keys(e).length}n.keys=Object.keys,n.values=Object.values,n.entries=Object.entries,n.extend=Object.assign,n.clone=function(e){return Object.assign({},e)},n.merge=function(e,t){const n=Object.create(Object.prototype),o=c.concat([Object.keys(e),Object.keys(t)]);for(const s of o){const o=e.hasOwnProperty(s)?e[s]:[],r=t.hasOwnProperty(s)?t[s]:[];n[s]=c.union(o,r)}return n},n.size=o,n.isEmpty=function(e){return 0==o(e)},n.to_object=function(e){const t={};for(const[n,c]of e)t[n]=c;return t}},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=e(1),a=e(14),s=i.__importStar(e(19)),r=e(9),l=e(12),o=e(20),_=e(8),c=e(22);function u(e){try{return JSON.stringify(e)}catch(t){return e.toString()}}function d(e){return _.isPlainObject(e)&&(void 0===e.value?0:1)+(void 0===e.field?0:1)+(void 0===e.expr?0:1)==1}n.isSpec=d;class p{constructor(e,t,n,i,s={}){var r,l;let o;if(this.obj=e,this.attr=t,this.default_value=n,this._dirty=!1,this.change=new a.Signal0(this.obj,\"change\"),this.internal=null!==(r=s.internal)&&void 0!==r&&r,this.optional=null!==(l=s.optional)&&void 0!==l&&l,void 0!==i)o=i,this._dirty=!0;else{const t=this._default_override();o=void 0!==t?t:void 0!==n?n(e):null}this._update(o)}get syncable(){return!this.internal}get_value(){return this.spec.value}set_value(e){this._update(e),this._dirty=!0}_default_override(){}get dirty(){return this._dirty}_update(e){null!=e&&this.validate(e),this.spec={value:e}}toString(){return`Prop(${this.obj}.${this.attr}, spec: ${u(this.spec)})`}normalize(e){return e}validate(e){if(!this.valid(e))throw new Error(`${this.obj.type}.${this.attr} given invalid value: ${u(e)}`)}valid(e){return!0}value(e=!0){if(void 0===this.spec.value)throw new Error(\"attempted to retrieve property value for property without value specification\");let t=this.normalize([this.spec.value])[0];return null!=this.spec.transform&&e&&(t=this.spec.transform.compute(t)),t}}n.Property=p,p.__name__=\"Property\";class S extends p{}n.Any=S,S.__name__=\"Any\";class h extends p{valid(e){return _.isArray(e)||e instanceof Float64Array}}n.Array=h,h.__name__=\"Array\";class m extends p{valid(e){return _.isBoolean(e)}}n.Boolean=m,m.__name__=\"Boolean\";class v extends p{valid(e){return _.isString(e)&&o.is_color(e)}}n.Color=v,v.__name__=\"Color\";class g extends p{}n.Instance=g,g.__name__=\"Instance\";class x extends p{valid(e){return _.isNumber(e)}}n.Number=x,x.__name__=\"Number\";class y extends x{valid(e){return _.isNumber(e)&&(0|e)==e}}n.Int=y,y.__name__=\"Int\";class f extends x{}n.Angle=f,f.__name__=\"Angle\";class P extends x{valid(e){return _.isNumber(e)&&0<=e&&e<=1}}n.Percent=P,P.__name__=\"Percent\";class A extends p{valid(e){return _.isString(e)}}n.String=A,A.__name__=\"String\";class L extends p{valid(e){return null===e||_.isString(e)}}n.NullString=L,L.__name__=\"NullString\";class T extends A{}n.FontSize=T,T.__name__=\"FontSize\";class b extends A{_default_override(){return c.settings.dev?\"Bokeh\":void 0}}n.Font=b,b.__name__=\"Font\";class M extends p{valid(e){return _.isString(e)&&r.includes(this.enum_values,e)}}function B(e){return class extends M{get enum_values(){return e}}}n.EnumProperty=M,M.__name__=\"EnumProperty\",n.Enum=B;class C extends M{get enum_values(){return s.Direction}normalize(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)switch(e[n]){case\"clock\":t[n]=0;break;case\"anticlock\":t[n]=1}return t}}n.Direction=C,C.__name__=\"Direction\",n.Anchor=B(s.Anchor),n.AngleUnits=B(s.AngleUnits),n.BoxOrigin=B(s.BoxOrigin),n.ButtonType=B(s.ButtonType),n.CalendarPosition=B(s.CalendarPosition),n.Dimension=B(s.Dimension),n.Dimensions=B(s.Dimensions),n.Distribution=B(s.Distribution),n.FontStyle=B(s.FontStyle),n.HatchPatternType=B(s.HatchPatternType),n.HTTPMethod=B(s.HTTPMethod),n.HexTileOrientation=B(s.HexTileOrientation),n.HoverMode=B(s.HoverMode),n.LatLon=B(s.LatLon),n.LegendClickPolicy=B(s.LegendClickPolicy),n.LegendLocation=B(s.LegendLocation),n.LineCap=B(s.LineCap),n.LineJoin=B(s.LineJoin),n.LinePolicy=B(s.LinePolicy),n.Location=B(s.Location),n.Logo=B(s.Logo),n.MarkerType=B(s.MarkerType),n.MutedPolicy=B(s.MutedPolicy),n.Orientation=B(s.Orientation),n.OutputBackend=B(s.OutputBackend),n.PaddingUnits=B(s.PaddingUnits),n.Place=B(s.Place),n.PointPolicy=B(s.PointPolicy),n.RadiusDimension=B(s.RadiusDimension),n.RenderLevel=B(s.RenderLevel),n.RenderMode=B(s.RenderMode),n.ResetPolicy=B(s.ResetPolicy),n.RoundingFunction=B(s.RoundingFunction),n.Side=B(s.Side),n.SizingMode=B(s.SizingMode),n.Sort=B(s.Sort),n.SpatialUnits=B(s.SpatialUnits),n.StartEnd=B(s.StartEnd)
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0}),o.Align=[\"start\",\"center\",\"end\"],o.Anchor=[\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"],o.AngleUnits=[\"deg\",\"rad\"],o.BoxOrigin=[\"corner\",\"center\"],o.ButtonType=[\"default\",\"primary\",\"success\",\"warning\",\"danger\"],o.CalendarPosition=[\"auto\",\"above\",\"below\"],o.Dimension=[\"width\",\"height\"],o.Dimensions=[\"width\",\"height\",\"both\"],o.Direction=[\"clock\",\"anticlock\"],o.Distribution=[\"uniform\",\"normal\"],o.FontStyle=[\"normal\",\"italic\",\"bold\",\"bold italic\"],o.HatchPatternType=[\"blank\",\"dot\",\"ring\",\"horizontal_line\",\"vertical_line\",\"cross\",\"horizontal_dash\",\"vertical_dash\",\"spiral\",\"right_diagonal_line\",\"left_diagonal_line\",\"diagonal_cross\",\"right_diagonal_dash\",\"left_diagonal_dash\",\"horizontal_wave\",\"vertical_wave\",\"criss_cross\",\" \",\".\",\"o\",\"-\",\"|\",\"+\",'\"',\":\",\"@\",\"/\",\"\\\\\",\"x\",\",\",\"`\",\"v\",\">\",\"*\"],o.HTTPMethod=[\"POST\",\"GET\"],o.HexTileOrientation=[\"pointytop\",\"flattop\"],o.HoverMode=[\"mouse\",\"hline\",\"vline\"],o.LatLon=[\"lat\",\"lon\"],o.LegendClickPolicy=[\"none\",\"hide\",\"mute\"],o.LegendLocation=o.Anchor,o.LineCap=[\"butt\",\"round\",\"square\"],o.LineJoin=[\"miter\",\"round\",\"bevel\"],o.LinePolicy=[\"prev\",\"next\",\"nearest\",\"interp\",\"none\"],o.Location=[\"above\",\"below\",\"left\",\"right\"],o.Logo=[\"normal\",\"grey\"],o.MarkerType=[\"asterisk\",\"circle\",\"circle_cross\",\"circle_dot\",\"circle_x\",\"circle_y\",\"cross\",\"dash\",\"diamond\",\"diamond_cross\",\"diamond_dot\",\"dot\",\"hex\",\"hex_dot\",\"inverted_triangle\",\"plus\",\"square\",\"square_cross\",\"square_dot\",\"square_pin\",\"square_x\",\"triangle\",\"triangle_dot\",\"triangle_pin\",\"x\",\"y\"],o.MutedPolicy=[\"show\",\"ignore\"],o.Orientation=[\"vertical\",\"horizontal\"],o.OutputBackend=[\"canvas\",\"svg\",\"webgl\"],o.PaddingUnits=[\"percent\",\"absolute\"],o.Place=[\"above\",\"below\",\"left\",\"right\",\"center\"],o.PointPolicy=[\"snap_to_data\",\"follow_mouse\",\"none\"],o.RadiusDimension=[\"x\",\"y\",\"max\",\"min\"],o.RenderLevel=[\"image\",\"underlay\",\"glyph\",\"guide\",\"annotation\",\"overlay\"],o.RenderMode=[\"canvas\",\"css\"],o.ResetPolicy=[\"standard\",\"event_only\"],o.RoundingFunction=[\"round\",\"nearest\",\"floor\",\"rounddown\",\"ceil\",\"roundup\"],o.SelectionMode=[\"replace\",\"append\",\"intersect\",\"subtract\"],o.Side=[\"above\",\"below\",\"left\",\"right\"],o.SizingMode=[\"stretch_width\",\"stretch_height\",\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"],o.Sort=[\"ascending\",\"descending\"],o.SpatialUnits=[\"screen\",\"data\"],o.StartEnd=[\"start\",\"end\"],o.StepMode=[\"after\",\"before\",\"center\"],o.TapBehavior=[\"select\",\"inspect\"],o.TextAlign=[\"left\",\"right\",\"center\"],o.TextBaseline=[\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"],o.TextureRepetition=[\"repeat\",\"repeat_x\",\"repeat_y\",\"no_repeat\"],o.TickLabelOrientation=[\"vertical\",\"horizontal\",\"parallel\",\"normal\"],o.TooltipAttachment=[\"horizontal\",\"vertical\",\"left\",\"right\",\"above\",\"below\"],o.UpdateMode=[\"replace\",\"append\"],o.VerticalAlign=[\"top\",\"middle\",\"bottom\"]},\n",
" function _(e,F,r){Object.defineProperty(r,\"__esModule\",{value:!0}),r.svg_colors={indianred:\"#CD5C5C\",lightcoral:\"#F08080\",salmon:\"#FA8072\",darksalmon:\"#E9967A\",lightsalmon:\"#FFA07A\",crimson:\"#DC143C\",red:\"#FF0000\",firebrick:\"#B22222\",darkred:\"#8B0000\",pink:\"#FFC0CB\",lightpink:\"#FFB6C1\",hotpink:\"#FF69B4\",deeppink:\"#FF1493\",mediumvioletred:\"#C71585\",palevioletred:\"#DB7093\",coral:\"#FF7F50\",tomato:\"#FF6347\",orangered:\"#FF4500\",darkorange:\"#FF8C00\",orange:\"#FFA500\",gold:\"#FFD700\",yellow:\"#FFFF00\",lightyellow:\"#FFFFE0\",lemonchiffon:\"#FFFACD\",lightgoldenrodyellow:\"#FAFAD2\",papayawhip:\"#FFEFD5\",moccasin:\"#FFE4B5\",peachpuff:\"#FFDAB9\",palegoldenrod:\"#EEE8AA\",khaki:\"#F0E68C\",darkkhaki:\"#BDB76B\",lavender:\"#E6E6FA\",thistle:\"#D8BFD8\",plum:\"#DDA0DD\",violet:\"#EE82EE\",orchid:\"#DA70D6\",fuchsia:\"#FF00FF\",magenta:\"#FF00FF\",mediumorchid:\"#BA55D3\",mediumpurple:\"#9370DB\",blueviolet:\"#8A2BE2\",darkviolet:\"#9400D3\",darkorchid:\"#9932CC\",darkmagenta:\"#8B008B\",purple:\"#800080\",indigo:\"#4B0082\",slateblue:\"#6A5ACD\",darkslateblue:\"#483D8B\",mediumslateblue:\"#7B68EE\",greenyellow:\"#ADFF2F\",chartreuse:\"#7FFF00\",lawngreen:\"#7CFC00\",lime:\"#00FF00\",limegreen:\"#32CD32\",palegreen:\"#98FB98\",lightgreen:\"#90EE90\",mediumspringgreen:\"#00FA9A\",springgreen:\"#00FF7F\",mediumseagreen:\"#3CB371\",seagreen:\"#2E8B57\",forestgreen:\"#228B22\",green:\"#008000\",darkgreen:\"#006400\",yellowgreen:\"#9ACD32\",olivedrab:\"#6B8E23\",olive:\"#808000\",darkolivegreen:\"#556B2F\",mediumaquamarine:\"#66CDAA\",darkseagreen:\"#8FBC8F\",lightseagreen:\"#20B2AA\",darkcyan:\"#008B8B\",teal:\"#008080\",aqua:\"#00FFFF\",cyan:\"#00FFFF\",lightcyan:\"#E0FFFF\",paleturquoise:\"#AFEEEE\",aquamarine:\"#7FFFD4\",turquoise:\"#40E0D0\",mediumturquoise:\"#48D1CC\",darkturquoise:\"#00CED1\",cadetblue:\"#5F9EA0\",steelblue:\"#4682B4\",lightsteelblue:\"#B0C4DE\",powderblue:\"#B0E0E6\",lightblue:\"#ADD8E6\",skyblue:\"#87CEEB\",lightskyblue:\"#87CEFA\",deepskyblue:\"#00BFFF\",dodgerblue:\"#1E90FF\",cornflowerblue:\"#6495ED\",royalblue:\"#4169E1\",blue:\"#0000FF\",mediumblue:\"#0000CD\",darkblue:\"#00008B\",navy:\"#000080\",midnightblue:\"#191970\",cornsilk:\"#FFF8DC\",blanchedalmond:\"#FFEBCD\",bisque:\"#FFE4C4\",navajowhite:\"#FFDEAD\",wheat:\"#F5DEB3\",burlywood:\"#DEB887\",tan:\"#D2B48C\",rosybrown:\"#BC8F8F\",sandybrown:\"#F4A460\",goldenrod:\"#DAA520\",darkgoldenrod:\"#B8860B\",peru:\"#CD853F\",chocolate:\"#D2691E\",saddlebrown:\"#8B4513\",sienna:\"#A0522D\",brown:\"#A52A2A\",maroon:\"#800000\",white:\"#FFFFFF\",snow:\"#FFFAFA\",honeydew:\"#F0FFF0\",mintcream:\"#F5FFFA\",azure:\"#F0FFFF\",aliceblue:\"#F0F8FF\",ghostwhite:\"#F8F8FF\",whitesmoke:\"#F5F5F5\",seashell:\"#FFF5EE\",beige:\"#F5F5DC\",oldlace:\"#FDF5E6\",floralwhite:\"#FFFAF0\",ivory:\"#FFFFF0\",antiquewhite:\"#FAEBD7\",linen:\"#FAF0E6\",lavenderblush:\"#FFF0F5\",mistyrose:\"#FFE4E1\",gainsboro:\"#DCDCDC\",lightgray:\"#D3D3D3\",lightgrey:\"#D3D3D3\",silver:\"#C0C0C0\",darkgray:\"#A9A9A9\",darkgrey:\"#A9A9A9\",gray:\"#808080\",grey:\"#808080\",dimgray:\"#696969\",dimgrey:\"#696969\",lightslategray:\"#778899\",lightslategrey:\"#778899\",slategray:\"#708090\",slategrey:\"#708090\",darkslategray:\"#2F4F4F\",darkslategrey:\"#2F4F4F\",black:\"#000000\"},r.is_svg_color=function(e){return e in r.svg_colors}},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});class n{constructor(){this._dev=!1}set dev(e){this._dev=e}get dev(){return this._dev}}s.Settings=n,n.__name__=\"Settings\",s.settings=new n},\n",
" function _(e,l,a){Object.defineProperty(a,\"__esModule\",{value:!0});const t=e(1).__importStar(e(18));a.Line={line_color:[t.Color,\"black\"],line_alpha:[t.Number,1],line_width:[t.Number,1],line_join:[t.LineJoin,\"bevel\"],line_cap:[t.LineCap,\"butt\"],line_dash:[t.Array,[]],line_dash_offset:[t.Number,0]},a.Fill={fill_color:[t.Color,\"gray\"],fill_alpha:[t.Number,1]},a.Hatch={hatch_color:[t.Color,\"black\"],hatch_alpha:[t.Number,1],hatch_scale:[t.Number,12],hatch_pattern:[t.NullString,null],hatch_weight:[t.Number,1],hatch_extra:[t.Any,{}]},a.Text={text_color:[t.Color,\"#444444\"],text_alpha:[t.Number,1],text_font:[t.Font,\"helvetica\"],text_font_size:[t.FontSize,\"16px\"],text_font_style:[t.FontStyle,\"normal\"],text_align:[t.TextAlign,\"left\"],text_baseline:[t.TextBaseline,\"bottom\"],text_line_height:[t.Number,1.2]},a.LineScalar={line_color:[t.ColorScalar,\"black\"],line_alpha:[t.NumberScalar,1],line_width:[t.NumberScalar,1],line_join:[t.LineJoinScalar,\"bevel\"],line_cap:[t.LineCapScalar,\"butt\"],line_dash:[t.ArrayScalar,[]],line_dash_offset:[t.NumberScalar,0]},a.FillScalar={fill_color:[t.ColorScalar,\"gray\"],fill_alpha:[t.NumberScalar,1]},a.HatchScalar={hatch_color:[t.ColorScalar,\"black\"],hatch_alpha:[t.NumberScalar,1],hatch_scale:[t.NumberScalar,12],hatch_pattern:[t.NullStringScalar,null],hatch_weight:[t.NumberScalar,1],hatch_extra:[t.AnyScalar,{}]},a.TextScalar={text_color:[t.ColorScalar,\"#444444\"],text_alpha:[t.NumberScalar,1],text_font:[t.Font,\"helvetica\"],text_font_size:[t.FontSizeScalar,\"16px\"],text_font_style:[t.FontStyleScalar,\"normal\"],text_align:[t.TextAlignScalar,\"left\"],text_baseline:[t.TextBaselineScalar,\"bottom\"],text_line_height:[t.NumberScalar,1.2]},a.LineVector={line_color:[t.ColorSpec,\"black\"],line_alpha:[t.NumberSpec,1],line_width:[t.NumberSpec,1],line_join:[t.LineJoinScalar,\"bevel\"],line_cap:[t.LineCapScalar,\"butt\"],line_dash:[t.ArrayScalar,[]],line_dash_offset:[t.NumberScalar,0]},a.FillVector={fill_color:[t.ColorSpec,\"gray\"],fill_alpha:[t.NumberSpec,1]},a.HatchVector={hatch_color:[t.ColorSpec,\"black\"],hatch_alpha:[t.NumberSpec,1],hatch_scale:[t.NumberSpec,12],hatch_pattern:[t.NullStringSpec,null],hatch_weight:[t.NumberSpec,1],hatch_extra:[t.AnyScalar,{}]},a.TextVector={text_color:[t.ColorSpec,\"#444444\"],text_alpha:[t.NumberSpec,1],text_font:[t.Font,\"helvetica\"],text_font_size:[t.FontSizeSpec,\"16px\"],text_font_style:[t.FontStyleScalar,\"normal\"],text_align:[t.TextAlignScalar,\"left\"],text_baseline:[t.TextBaselineScalar,\"bottom\"],text_line_height:[t.NumberScalar,1.2]}},\n",
" function _(t,r,n){Object.defineProperty(n,\"__esModule\",{value:!0});const a=t(8),e=t(11),s=Symbol(\"__ndarray__\");class i extends Uint8Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"uint8\",this.shape=null!=r?r:[this.length]}}n.Uint8NDArray=i,i.__name__=\"Uint8NDArray\";class _ extends Int8Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"int8\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Int8NDArray=_,_.__name__=\"Int8NDArray\";class c extends Uint16Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"uint16\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Uint16NDArray=c,c.__name__=\"Uint16NDArray\";class h extends Int16Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"int16\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Int16NDArray=h,h.__name__=\"Int16NDArray\";class u extends Uint32Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"uint32\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Uint32NDArray=u,u.__name__=\"Uint32NDArray\";class y extends Int32Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"int32\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Int32NDArray=y,y.__name__=\"Int32NDArray\";class l extends Float32Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"float32\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}n.Float32NDArray=l,l.__name__=\"Float32NDArray\";class o extends Float64Array{constructor(t,r){super(t),this.__ndarray__=s,this.dtype=\"float64\",this.shape=null!=r?r:A(t)?t.shape:[this.length]}}function A(t){return a.isObject(t)&&t.__ndarray__==s}n.Float64NDArray=o,o.__name__=\"Float64NDArray\",n.is_NDArray=A,n.ndarray=function(t,r={}){let{dtype:n}=r;null==n&&(n=t instanceof ArrayBuffer||a.isArray(t)?\"float64\":(()=>{switch(!0){case t instanceof Uint8Array:return\"uint8\";case t instanceof Int8Array:return\"int8\";case t instanceof Uint16Array:return\"uint16\";case t instanceof Int16Array:return\"int16\";case t instanceof Uint32Array:return\"uint32\";case t instanceof Int32Array:return\"int32\";case t instanceof Float32Array:return\"float32\";case t instanceof Float64Array:return\"float64\";default:e.unreachable()}})());const{shape:s}=r;switch(n){case\"uint8\":return new i(t,s);case\"int8\":return new _(t,s);case\"uint16\":return new c(t,s);case\"int16\":return new h(t,s);case\"uint32\":return new u(t,s);case\"int32\":return new y(t,s);case\"float32\":return new l(t,s);case\"float64\":return new o(t,s)}}},\n",
" function _(e,r,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1),a=e(8),f=e(28),_=n.__importStar(e(26));function o(e){const r=new Uint8Array(e),t=Array.from(r).map(e=>String.fromCharCode(e));return btoa(t.join(\"\"))}function s(e){const r=atob(e),t=r.length,n=new Uint8Array(t);for(let e=0,a=t;e<a;e++)n[e]=r.charCodeAt(e);return n.buffer}function i(e){const r=new Uint8Array(e.buffer,e.byteOffset,2*e.length);for(let e=0,t=r.length;e<t;e+=2){const t=r[e];r[e]=r[e+1],r[e+1]=t}}function u(e){const r=new Uint8Array(e.buffer,e.byteOffset,4*e.length);for(let e=0,t=r.length;e<t;e+=4){let t=r[e];r[e]=r[e+3],r[e+3]=t,t=r[e+1],r[e+1]=r[e+2],r[e+2]=t}}function c(e){const r=new Uint8Array(e.buffer,e.byteOffset,8*e.length);for(let e=0,t=r.length;e<t;e+=8){let t=r[e];r[e]=r[e+7],r[e+7]=t,t=r[e+1],r[e+1]=r[e+6],r[e+6]=t,t=r[e+2],r[e+2]=r[e+5],r[e+5]=t,t=r[e+3],r[e+3]=r[e+4],r[e+4]=t}}t.buffer_to_base64=o,t.base64_to_buffer=s,t.BYTE_ORDER=f.is_little_endian?\"little\":\"big\",t.swap16=i,t.swap32=u,t.swap64=c,t.is_NDArray_ref=function(e){return a.isPlainObject(e)&&(\"__buffer__\"in e||\"__ndarray__\"in e)},t.decode_NDArray=function(e,r){const{shape:n,dtype:a,order:f}=e;let o;if(\"__buffer__\"in e){const t=r.get(e.__buffer__);if(null==t)throw new Error(`buffer for ${e.__buffer__} not found`);o=t}else o=s(e.__ndarray__);const l=(()=>{switch(a){case\"uint8\":return new _.Uint8NDArray(o,n);case\"int8\":return new _.Int8NDArray(o,n);case\"uint16\":return new _.Uint16NDArray(o,n);case\"int16\":return new _.Int16NDArray(o,n);case\"uint32\":return new _.Uint32NDArray(o,n);case\"int32\":return new _.Int32NDArray(o,n);case\"float32\":return new _.Float32NDArray(o,n);case\"float64\":return new _.Float64NDArray(o,n)}})();if(f!==t.BYTE_ORDER)switch(l.BYTES_PER_ELEMENT){case 2:i(l);break;case 4:u(l);break;case 8:c(l)}return l},t.encode_NDArray=function(e,r){const n={order:t.BYTE_ORDER,dtype:e.dtype,shape:e.shape};if(null!=r){const t=\"\"+r.size;return r.set(t,e.buffer),Object.assign({__buffer__:t},n)}{const r=o(e.buffer);return Object.assign({__ndarray__:r},n)}}},\n",
" function _(t,_,r){Object.defineProperty(r,\"__esModule\",{value:!0});const e=t(1);e.__exportStar(t(30),r),e.__exportStar(t(149),r),e.__exportStar(t(176),r),e.__exportStar(t(180),r),e.__exportStar(t(194),r),e.__exportStar(t(198),r),e.__exportStar(t(204),r),e.__exportStar(t(208),r),e.__exportStar(t(238),r),e.__exportStar(t(241),r),e.__exportStar(t(243),r),e.__exportStar(t(260),r),e.__exportStar(t(123),r),e.__exportStar(t(266),r),e.__exportStar(t(270),r),e.__exportStar(t(297),r),e.__exportStar(t(298),r),e.__exportStar(t(299),r),e.__exportStar(t(300),r),e.__exportStar(t(301),r),e.__exportStar(t(306),r),e.__exportStar(t(308),r),e.__exportStar(t(319),r),e.__exportStar(t(323),r)},\n",
" function _(t,n,o){Object.defineProperty(o,\"__esModule\",{value:!0});const e=t(1),a=t(39),u=e.__importDefault(t(40)),r=e.__importDefault(t(41)),i=e.__importDefault(t(42));o.default=function(t){var n,o,e,f={},l=t.split(\"+\").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,n){var o=n.split(\"=\");return o.push(!0),t[o[0].toLowerCase()]=o[1],t}),{}),c={proj:\"projName\",datum:\"datumCode\",rf:function(t){f.rf=parseFloat(t)},lat_0:function(t){f.lat0=t*a.D2R},lat_1:function(t){f.lat1=t*a.D2R},lat_2:function(t){f.lat2=t*a.D2R},lat_ts:function(t){f.lat_ts=t*a.D2R},lon_0:function(t){f.long0=t*a.D2R},lon_1:function(t){f.long1=t*a.D2R},lon_2:function(t){f.long2=t*a.D2R},alpha:function(t){f.alpha=parseFloat(t)*a.D2R},lonc:function(t){f.longc=t*a.D2R},x_0:function(t){f.x0=parseFloat(t)},y_0:function(t){f.y0=parseFloat(t)},k_0:function(t){f.k0=parseFloat(t)},k:function(t){f.k0=parseFloat(t)},a:function(t){f.a=parseFloat(t)},b:function(t){f.b=parseFloat(t)},r_a:function(){f.R_A=!0},zone:function(t){f.zone=parseInt(t,10)},south:function(){f.utmSouth=!0},towgs84:function(t){f.datum_params=t.split(\",\").map((function(t){return parseFloat(t)}))},to_meter:function(t){f.to_meter=parseFloat(t)},units:function(t){f.units=t;var n=i.default(r.default,t);n&&(f.to_meter=n.to_meter)},from_greenwich:function(t){f.from_greenwich=t*a.D2R},pm:function(t){var n=i.default(u.default,t);f.from_greenwich=(n||parseFloat(t))*a.D2R},nadgrids:function(t){\"@null\"===t?f.datumCode=\"none\":f.nadgrids=t},axis:function(t){3===t.length&&-1!==\"ewnsud\".indexOf(t.substr(0,1))&&-1!==\"ewnsud\".indexOf(t.substr(1,1))&&-1!==\"ewnsud\".indexOf(t.substr(2,1))&&(f.axis=t)}};for(n in l)o=l[n],n in c?\"function\"==typeof(e=c[n])?e(o):f[e]=o:f[n]=o;return\"string\"==typeof f.datumCode&&\"WGS84\"!==f.datumCode&&(f.datumCode=f.datumCode.toLowerCase()),f}},\n",
" function _(P,_,e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.PJD_3PARAM=1,e.PJD_7PARAM=2,e.PJD_WGS84=4,e.PJD_NODATUM=5,e.SEC_TO_RAD=484813681109536e-20,e.HALF_PI=Math.PI/2,e.SIXTH=.16666666666666666,e.RA4=.04722222222222222,e.RA6=.022156084656084655,e.EPSLN=1e-10,e.D2R=.017453292519943295,e.R2D=57.29577951308232,e.FORTPI=Math.PI/4,e.TWO_PI=2*Math.PI,e.SPI=3.14159265359},\n",
" function _(e,o,r){Object.defineProperty(r,\"__esModule\",{value:!0});var a={};r.default=a,a.greenwich=0,a.lisbon=-9.131906111111,a.paris=2.337229166667,a.bogota=-74.080916666667,a.madrid=-3.687938888889,a.rome=12.452333333333,a.bern=7.439583333333,a.jakarta=106.807719444444,a.ferro=-17.666666666667,a.brussels=4.367975,a.stockholm=18.058277777778,a.athens=23.7163375,a.oslo=10.722916666667},\n",
" function _(e,t,f){Object.defineProperty(f,\"__esModule\",{value:!0}),f.default={ft:{to_meter:.3048},\"us-ft\":{to_meter:1200/3937}}},\n",
" function _(e,r,t){Object.defineProperty(t,\"__esModule\",{value:!0});var o=/[\\s_\\-\\/\\(\\)]/g;t.default=function(e,r){if(e[r])return e[r];for(var t,a=Object.keys(e),n=r.toLowerCase().replace(o,\"\"),f=-1;++f<a.length;)if((t=a[f]).toLowerCase().replace(o,\"\")===n)return e[t]}},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const o=e(1);const d=o.__importDefault(e(44)),r=e(45);function n(e){return.017453292519943295*e}a.default=function(e){var t=d.default(e),a=t.shift(),o=t.shift();t.unshift([\"name\",o]),t.unshift([\"type\",a]);var l={};return r.sExpr(t,l),function(e){if(\"GEOGCS\"===e.type?e.projName=\"longlat\":\"LOCAL_CS\"===e.type?(e.projName=\"identity\",e.local=!0):\"object\"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t=\"\",a=0,o=e.AXIS.length;a<o;++a){var d=e.AXIS[a][0].toLowerCase();-1!==d.indexOf(\"north\")?t+=\"n\":-1!==d.indexOf(\"south\")?t+=\"s\":-1!==d.indexOf(\"east\")?t+=\"e\":-1!==d.indexOf(\"west\")&&(t+=\"w\")}2===t.length&&(t+=\"u\"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),\"metre\"===e.units&&(e.units=\"meter\"),e.UNIT.convert&&(\"GEOGCS\"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var r=e.GEOGCS;function l(t){return t*(e.to_meter||1)}\"GEOGCS\"===e.type&&(r=e),r&&(r.DATUM?e.datumCode=r.DATUM.name.toLowerCase():e.datumCode=r.name.toLowerCase(),\"d_\"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==e.datumCode&&\"new_zealand_1949\"!==e.datumCode||(e.datumCode=\"nzgd49\"),\"wgs_1984\"!==e.datumCode&&\"world_geodetic_system_1984\"!==e.datumCode||(\"Mercator_Auxiliary_Sphere\"===e.PROJECTION&&(e.sphere=!0),e.datumCode=\"wgs84\"),\"_ferro\"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),\"_jakarta\"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf(\"belge\")&&(e.datumCode=\"rnb72\"),r.DATUM&&r.DATUM.SPHEROID&&(e.ellps=r.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps=\"intl\"),e.a=r.DATUM.SPHEROID.a,e.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(e.datum_params=r.DATUM.TOWGS84),~e.datumCode.indexOf(\"osgb_1936\")&&(e.datumCode=\"osgb36\"),~e.datumCode.indexOf(\"osni_1952\")&&(e.datumCode=\"osni52\"),(~e.datumCode.indexOf(\"tm65\")||~e.datumCode.indexOf(\"geodetic_datum_of_1965\"))&&(e.datumCode=\"ire65\"),\"ch1903+\"===e.datumCode&&(e.datumCode=\"ch1903\"),~e.datumCode.indexOf(\"israel\")&&(e.datumCode=\"isr93\")),e.b&&!isFinite(e.b)&&(e.b=e.a),[[\"standard_parallel_1\",\"Standard_Parallel_1\"],[\"standard_parallel_2\",\"Standard_Parallel_2\"],[\"false_easting\",\"False_Easting\"],[\"false_northing\",\"False_Northing\"],[\"central_meridian\",\"Central_Meridian\"],[\"latitude_of_origin\",\"Latitude_Of_Origin\"],[\"latitude_of_origin\",\"Central_Parallel\"],[\"scale_factor\",\"Scale_Factor\"],[\"k0\",\"scale_factor\"],[\"latitude_of_center\",\"Latitude_Of_Center\"],[\"latitude_of_center\",\"Latitude_of_center\"],[\"lat0\",\"latitude_of_center\",n],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longitude_of_center\",\"Longitude_of_center\"],[\"longc\",\"longitude_of_center\",n],[\"x0\",\"false_easting\",l],[\"y0\",\"false_northing\",l],[\"long0\",\"central_meridian\",n],[\"lat0\",\"latitude_of_origin\",n],[\"lat0\",\"standard_parallel_1\",n],[\"lat1\",\"standard_parallel_1\",n],[\"lat2\",\"standard_parallel_2\",n],[\"azimuth\",\"Azimuth\"],[\"alpha\",\"azimuth\",n],[\"srsCode\",\"name\"]].forEach((function(t){return a=e,d=(o=t)[0],r=o[1],void(!(d in a)&&r in a&&(a[d]=a[r],3===o.length&&(a[d]=o[2](a[d]))));var a,o,d,r})),e.long0||!e.longc||\"Albers_Conic_Equal_Area\"!==e.projName&&\"Lambert_Azimuthal_Equal_Area\"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||\"Stereographic_South_Pole\"!==e.projName&&\"Polar Stereographic (variant B)\"!==e.projName||(e.lat0=n(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(l),l}},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=function(t){return new a(t).output()};var i=/\\s/,s=/[A-Za-z]/,h=/[A-Za-z84]/,o=/[,\\]]/,n=/[\\d\\.E\\-\\+]/;function a(t){if(\"string\"!=typeof t)throw new Error(\"not a string\");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}a.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;i.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},a.prototype.afterquote=function(t){if('\"'===t)return this.word+='\"',void(this.state=4);if(o.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error(\"havn't handled \\\"\"+t+'\" in afterquote yet, index '+this.place)},a.prototype.afterItem=function(t){return\",\"===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):\"]\"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},a.prototype.number=function(t){if(!n.test(t)){if(o.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error(\"havn't handled \\\"\"+t+'\" in number yet, index '+this.place)}this.word+=t},a.prototype.quoted=function(t){'\"'!==t?this.word+=t:this.state=5},a.prototype.keyword=function(t){if(h.test(t))this.word+=t;else{if(\"[\"===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!o.test(t))throw new Error(\"havn't handled \\\"\"+t+'\" in keyword yet, index '+this.place);this.afterItem(t)}},a.prototype.neutral=function(t){if(s.test(t))return this.word=t,void(this.state=2);if('\"'===t)return this.word=\"\",void(this.state=4);if(n.test(t))return this.word=t,void(this.state=3);if(!o.test(t))throw new Error(\"havn't handled \\\"\"+t+'\" in neutral yet, index '+this.place);this.afterItem(t)},a.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string \"'+this.text+'\". State is '+this.state)}},\n",
" function _(e,r,a){function s(e,r,a){Array.isArray(r)&&(a.unshift(r),r=null);var s=r?{}:e,n=a.reduce((function(e,r){return c(r,e),e}),s);r&&(e[r]=n)}function c(e,r){if(Array.isArray(e)){var a=e.shift();if(\"PARAMETER\"===a&&(a=e.shift()),1===e.length)return Array.isArray(e[0])?(r[a]={},void c(e[0],r[a])):void(r[a]=e[0]);if(e.length)if(\"TOWGS84\"!==a){if(\"AXIS\"===a)return a in r||(r[a]=[]),void r[a].push(e);var n;switch(Array.isArray(a)||(r[a]={}),a){case\"UNIT\":case\"PRIMEM\":case\"VERT_DATUM\":return r[a]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&c(e[2],r[a]));case\"SPHEROID\":case\"ELLIPSOID\":return r[a]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&c(e[3],r[a]));case\"PROJECTEDCRS\":case\"PROJCRS\":case\"GEOGCS\":case\"GEOCCS\":case\"PROJCS\":case\"LOCAL_CS\":case\"GEODCRS\":case\"GEODETICCRS\":case\"GEODETICDATUM\":case\"EDATUM\":case\"ENGINEERINGDATUM\":case\"VERT_CS\":case\"VERTCRS\":case\"VERTICALCRS\":case\"COMPD_CS\":case\"COMPOUNDCRS\":case\"ENGINEERINGCRS\":case\"ENGCRS\":case\"FITTED_CS\":case\"LOCAL_DATUM\":case\"DATUM\":return e[0]=[\"name\",e[0]],void s(r,a,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return c(e,r[a]);return s(r,a,e)}}else r[a]=e;else r[a]=!0}else r[e]=!0}Object.defineProperty(a,\"__esModule\",{value:!0}),a.sExpr=c},\n",
" function _(e,n,r){Object.defineProperty(r,\"__esModule\",{value:!0}),r.default=function(e,n){var r,t;if(e=e||{},!n)return e;for(t in n)void 0!==(r=n[t])&&(e[t]=r);return e}},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.default=function(e,t,n){var r=e*t;return n/Math.sqrt(1-r*r)}},\n",
" function _(e,t,u){Object.defineProperty(u,\"__esModule\",{value:!0});const n=e(1),a=e(39),f=n.__importDefault(e(51));u.default=function(e){return Math.abs(e)<=a.SPI?e:e-f.default(e)*a.TWO_PI}},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return e<0?-1:1}},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const a=t(39);n.default=function(t,e,n){var o=t*n,u=.5*t;return o=Math.pow((1-o)/(1+o),u),Math.tan(.5*(a.HALF_PI-e))/o}},\n",
" function _(t,a,e){Object.defineProperty(e,\"__esModule\",{value:!0});const n=t(39);e.default=function(t,a){for(var e,r,o=.5*t,u=n.HALF_PI-2*Math.atan(a),f=0;f<=15;f++)if(e=t*Math.sin(u),u+=r=n.HALF_PI-2*Math.atan(a*Math.pow((1-e)/(1+e),o))-u,Math.abs(r)<=1e-10)return u;return-9999}},\n",
" function _(e,n,i){function t(){}function r(e){return e}Object.defineProperty(i,\"__esModule\",{value:!0}),i.init=t,i.forward=r,i.inverse=r,i.names=[\"longlat\",\"identity\"],i.default={init:t,forward:r,inverse:r,names:i.names}},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const a=e(1),n=e(39),f=a.__importStar(e(56)),u=a.__importDefault(e(42));r.eccentricity=function(e,t,r,a){var f=e*e,u=t*t,i=(f-u)/f,c=0;return a?(f=(e*=1-i*(n.SIXTH+i*(n.RA4+i*n.RA6)))*e,i=0):c=Math.sqrt(i),{es:i,e:c,ep2:(f-u)/u}},r.sphere=function(e,t,r,a,i){if(!e){var c=u.default(f.default,a);c||(c=f.WGS84),e=c.a,t=c.b,r=c.rf}return r&&!t&&(t=(1-1/r)*e),(0===r||Math.abs(e-t)<n.EPSLN)&&(i=!0,t=e),{a:e,b:t,rf:r,sphere:i}}},\n",
" function _(e,a,i){Object.defineProperty(i,\"__esModule\",{value:!0}),i.default=function(e,a,i){var s,n,r,c=i.x,d=i.y,u=i.z||0,f={};for(r=0;r<3;r++)if(!a||2!==r||void 0!==i.z)switch(0===r?(s=c,n=-1!==\"ew\".indexOf(e.axis[r])?\"x\":\"y\"):1===r?(s=d,n=-1!==\"ns\".indexOf(e.axis[r])?\"y\":\"x\"):(s=u,n=\"z\"),e.axis[r]){case\"e\":case\"w\":case\"n\":case\"s\":f[n]=s;break;case\"u\":void 0!==i[n]&&(f.z=s);break;case\"d\":void 0!==i[n]&&(f.z=-s);break;default:return null}return f}},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var n={x:e[0],y:e[1]};return e.length>2&&(n.z=e[2]),e.length>3&&(n.m=e[3]),n}},\n",
" function _(e,i,n){function t(e){if(\"function\"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError(\"coordinates must be finite numbers\")}if(\"number\"!=typeof e||e!=e||!isFinite(e))throw new TypeError(\"coordinates must be finite numbers\")}Object.defineProperty(n,\"__esModule\",{value:!0}),n.default=function(e){t(e.x),t(e.y)}},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=e(1),n=e(66),s=r.__importStar(e(70)),_=r.__importStar(e(18)),l=e(71);class o extends n.DOMView{initialize(){super.initialize(),this.visuals=new s.Visuals(this.model),this._has_finished=!0}get plot_view(){return this.parent}get plot_model(){return this.parent.model}get layer(){const{canvas_view:e}=this.plot_view;return\"overlay\"==this.model.level?e.overlays:e.primary}request_render(){this.plot_view.request_render()}map_to_screen(e,t){return this.plot_view.map_to_screen(e,t,this.model.x_range_name,this.model.y_range_name)}get needs_clip(){return!1}notify_finished(){this.plot_view.notify_finished()}get has_webgl(){return!1}}i.RendererView=o,o.__name__=\"RendererView\";class a extends l.Model{constructor(e){super(e)}static init_Renderer(){this.define({level:[_.RenderLevel],visible:[_.Boolean,!0]})}}i.Renderer=a,a.__name__=\"Renderer\",a.init_Renderer()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(67),h=e(68),n=i.__importStar(e(68)),l=i.__importDefault(e(69));class _ extends r.View{initialize(){super.initialize(),this._has_finished=!1,this.is_root&&(this._stylesheet=h.stylesheet),this._inject_styles(),this.el=this._createElement()}remove(){n.removeElement(this.el),super.remove()}css_classes(){return[]}styles(){return[l.default]}cursor(e,t){return null}render(){}renderTo(e){e.appendChild(this.el),this.render()}has_finished(){return this._has_finished}get is_idle(){return this.has_finished()}get stylesheet(){return this.is_root?this._stylesheet:this.root.stylesheet}_inject_styles(){const{stylesheet:e}=this;for(const t of this.styles())e.append(t)}_createElement(){return n.createElement(this.tagName,{class:this.css_classes()})}}s.DOMView=_,_.__name__=\"DOMView\",_.prototype.tagName=\"div\"},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=t(14),n=t(8);class o{constructor(t){if(this.removed=new r.Signal0(this,\"removed\"),this._ready=Promise.resolve(void 0),null==t.model)throw new Error(\"model of a view wasn't configured\");this.model=t.model,this._parent=t.parent}get ready(){return this._ready}connect(t,e){return t.connect((t,i)=>{const r=Promise.resolve(e.call(this,t,i));this._ready=this._ready.then(()=>r)},this)}disconnect(t,e){return t.disconnect(e,this)}initialize(){}async lazy_initialize(){}remove(){this._parent=void 0,this.disconnect_signals(),this.removed.emit()}toString(){return`${this.model.type}View(${this.model.id})`}serializable_state(){return{type:this.model.type}}get parent(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")}get is_root(){return null===this.parent}get root(){return this.is_root?this:this.parent.root}assert_root(){if(!this.is_root)throw new Error(this.toString()+\" is not a root layout\")}connect_signals(){}disconnect_signals(){r.Signal.disconnectReceiver(this)}on_change(t,e){for(const i of n.isArray(t)?t:[t])this.connect(i.change,e)}}i.View=o,o.__name__=\"View\"},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=t(8),o=t=>(e={},...n)=>{const o=document.createElement(t);o.classList.add(\"bk\");for(const t in e){let n=e[t];if(null!=n&&(!i.isBoolean(n)||n))if(\"class\"===t&&(i.isString(n)&&(n=n.split(/\\s+/)),i.isArray(n)))for(const t of n)null!=t&&o.classList.add(t);else if(\"style\"===t&&i.isPlainObject(n))for(const t in n)o.style[t]=n[t];else if(\"data\"===t&&i.isPlainObject(n))for(const t in n)o.dataset[t]=n[t];else o.setAttribute(t,n)}function s(t){if(t instanceof Element)o.appendChild(t);else if(i.isString(t))o.appendChild(document.createTextNode(t));else if(null!=t&&!1!==t)throw new Error(\"expected a DOM element, string, false or null, got \"+JSON.stringify(t))}for(const t of n)if(i.isArray(t))for(const e of t)s(e);else s(t);return o};function s(t){const e=t.parentNode;null!=e&&e.removeChild(t)}function l(t,...e){const n=t.firstChild;for(const i of e)t.insertBefore(i,n)}function r(t,e){const n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector).call(t,e)}function a(t){return parseFloat(t)||0}function c(t){const e=getComputedStyle(t);return{border:{top:a(e.borderTopWidth),bottom:a(e.borderBottomWidth),left:a(e.borderLeftWidth),right:a(e.borderRightWidth)},margin:{top:a(e.marginTop),bottom:a(e.marginBottom),left:a(e.marginLeft),right:a(e.marginRight)},padding:{top:a(e.paddingTop),bottom:a(e.paddingBottom),left:a(e.paddingLeft),right:a(e.paddingRight)}}}function h(t){const e=t.getBoundingClientRect();return{width:Math.ceil(e.width),height:Math.ceil(e.height)}}n.createElement=function(t,e,...n){return o(t)(e,...n)},n.div=o(\"div\"),n.span=o(\"span\"),n.canvas=o(\"canvas\"),n.link=o(\"link\"),n.style=o(\"style\"),n.a=o(\"a\"),n.p=o(\"p\"),n.i=o(\"i\"),n.pre=o(\"pre\"),n.button=o(\"button\"),n.label=o(\"label\"),n.input=o(\"input\"),n.select=o(\"select\"),n.option=o(\"option\"),n.optgroup=o(\"optgroup\"),n.textarea=o(\"textarea\"),n.nbsp=function(){return document.createTextNode(\"\")},n.append=function(t,...e){for(const n of e)t.appendChild(n)},n.remove=s,n.removeElement=s,n.replaceWith=function(t,e){const n=t.parentNode;null!=n&&n.replaceChild(e,t)},n.prepend=l,n.empty=function(t,e=!1){let n;for(;n=t.firstChild;)t.removeChild(n);if(e)for(const e of t.attributes)t.removeAttributeNode(e)},n.display=function(t){t.style.display=\"\"},n.undisplay=function(t){t.style.display=\"none\"},n.show=function(t){t.style.visibility=\"\"},n.hide=function(t){t.style.visibility=\"hidden\"},n.offset=function(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},n.matches=r,n.parent=function(t,e){let n=t;for(;n=n.parentElement;)if(r(n,e))return n;return null},n.extents=c,n.size=h,n.scroll_size=function(t){return{width:Math.ceil(t.scrollWidth),height:Math.ceil(t.scrollHeight)}},n.outer_size=function(t){const{margin:{left:e,right:n,top:i,bottom:o}}=c(t),{width:s,height:l}=h(t);return{width:Math.ceil(s+e+n),height:Math.ceil(l+i+o)}},n.content_size=function(t){const{left:e,top:n}=t.getBoundingClientRect(),{padding:i}=c(t);let o=0,s=0;for(const l of t.children){const t=l.getBoundingClientRect();o=Math.max(o,Math.ceil(t.left-e-i.left+t.width)),s=Math.max(s,Math.ceil(t.top-n-i.top+t.height))}return{width:o,height:s}},n.position=function(t,e,n){const{style:i}=t;if(i.left=e.x+\"px\",i.top=e.y+\"px\",i.width=e.width+\"px\",i.height=e.height+\"px\",null==n)i.margin=\"\";else{const{top:t,right:e,bottom:o,left:s}=n;i.margin=`${t}px ${e}px ${o}px ${s}px`}},n.children=function(t){return Array.from(t.children)};class d{constructor(t){this.el=t,this.classList=t.classList}get values(){const t=[];for(let e=0;e<this.classList.length;e++){const n=this.classList.item(e);null!=n&&t.push(n)}return t}has(t){return this.classList.contains(t)}add(...t){for(const e of t)this.classList.add(e);return this}remove(...t){for(const e of t)this.classList.remove(e);return this}clear(){for(const t of this.values)\"bk\"!=
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const s=e(1),c=s.__importStar(e(23)),l=s.__importStar(e(18)),i=e(20),h=e(12);function o(e,t,a){e.moveTo(0,a+.5),e.lineTo(t,a+.5),e.stroke()}function r(e,t,a){e.moveTo(a+.5,0),e.lineTo(a+.5,t),e.stroke()}function n(e,t){e.moveTo(0,t),e.lineTo(t,0),e.stroke(),e.moveTo(0,0),e.lineTo(t,t),e.stroke()}function _(e,t,a,s){const c=a,l=c/2,i=l/2,h=function(e){const t=document.createElement(\"canvas\");return t.width=e,t.height=e,t}(a),_=h.getContext(\"2d\");switch(_.strokeStyle=t,_.lineCap=\"square\",_.fillStyle=t,_.lineWidth=s,e){case\" \":case\"blank\":break;case\".\":case\"dot\":_.arc(l,l,l/2,0,2*Math.PI,!0),_.fill();break;case\"o\":case\"ring\":_.arc(l,l,l/2,0,2*Math.PI,!0),_.stroke();break;case\"-\":case\"horizontal_line\":o(_,c,l);break;case\"|\":case\"vertical_line\":r(_,c,l);break;case\"+\":case\"cross\":o(_,c,l),r(_,c,l);break;case'\"':case\"horizontal_dash\":o(_,l,l);break;case\":\":case\"vertical_dash\":r(_,l,l);break;case\"@\":case\"spiral\":const e=c/30;_.moveTo(l,l);for(let t=0;t<360;t++){const a=.1*t,s=l+e*a*Math.cos(a),c=l+e*a*Math.sin(a);_.lineTo(s,c)}_.stroke();break;case\"/\":case\"right_diagonal_line\":_.moveTo(.5-i,c),_.lineTo(i+.5,0),_.stroke(),_.moveTo(i+.5,c),_.lineTo(3*i+.5,0),_.stroke(),_.moveTo(3*i+.5,c),_.lineTo(5*i+.5,0),_.stroke(),_.stroke();break;case\"\\\\\":case\"left_diagonal_line\":_.moveTo(i+.5,c),_.lineTo(.5-i,0),_.stroke(),_.moveTo(3*i+.5,c),_.lineTo(i+.5,0),_.stroke(),_.moveTo(5*i+.5,c),_.lineTo(3*i+.5,0),_.stroke(),_.stroke();break;case\"x\":case\"diagonal_cross\":n(_,c);break;case\",\":case\"right_diagonal_dash\":_.moveTo(i+.5,3*i+.5),_.lineTo(3*i+.5,i+.5),_.stroke();break;case\"`\":case\"left_diagonal_dash\":_.moveTo(i+.5,i+.5),_.lineTo(3*i+.5,3*i+.5),_.stroke();break;case\"v\":case\"horizontal_wave\":_.moveTo(0,i),_.lineTo(l,3*i),_.lineTo(c,i),_.stroke();break;case\">\":case\"vertical_wave\":_.moveTo(i,0),_.lineTo(3*i,l),_.lineTo(i,c),_.stroke();break;case\"*\":case\"criss_cross\":n(_,c),o(_,c,l),r(_,c,l)}return h}class u{constructor(e,t=\"\"){this.obj=e,this.prefix=t,this.cache={};for(const a of this.attrs)this[a]=e.properties[t+a]}warm_cache(e){for(const t of this.attrs){const a=this.obj.properties[this.prefix+t];if(void 0!==a.spec.value)this.cache[t]=a.spec.value;else{if(!(null!=e&&a instanceof l.VectorSpec))throw new Error(\"source is required with a vectorized visual property\");this.cache[t+\"_array\"]=a.array(e)}}}cache_select(e,t){const a=this.obj.properties[this.prefix+e];let s;return void 0!==a.spec.value?this.cache[e]=s=a.spec.value:this.cache[e]=s=this.cache[e+\"_array\"][t],s}get_array(e){const t=this.cache[e+\"_array\"];return null!=this.all_indices?h.map(this.all_indices,e=>t[e]):t}set_vectorize(e,t){null!=this.all_indices?this._set_vectorize(e,this.all_indices[t]):this._set_vectorize(e,t)}}a.ContextProperties=u,u.__name__=\"ContextProperties\";class p extends u{set_value(e){e.strokeStyle=this.line_color.value(),e.globalAlpha=this.line_alpha.value(),e.lineWidth=this.line_width.value(),e.lineJoin=this.line_join.value(),e.lineCap=this.line_cap.value(),e.setLineDash(this.line_dash.value()),e.setLineDashOffset(this.line_dash_offset.value())}get doit(){return!(null===this.line_color.spec.value||0==this.line_alpha.spec.value||0==this.line_width.spec.value)}_set_vectorize(e,t){this.cache_select(\"line_color\",t),e.strokeStyle=this.cache.line_color,this.cache_select(\"line_alpha\",t),e.globalAlpha=this.cache.line_alpha,this.cache_select(\"line_width\",t),e.lineWidth=this.cache.line_width,this.cache_select(\"line_join\",t),e.lineJoin=this.cache.line_join,this.cache_select(\"line_cap\",t),e.lineCap=this.cache.line_cap,this.cache_select(\"line_dash\",t),e.setLineDash(this.cache.line_dash),this.cache_select(\"line_dash_offset\",t),e.setLineDashOffset(this.cache.line_dash_offset)}color_value(){return i.color2css(this.line_color.value(),this.line_alpha.value())}}a.Line=p,p.__name__=\"Line\",p.prototype.attrs=Object.keys(c.LineVector);class v extends u{set_value(e){e.fillStyle=this.fill_color.value(),e.gl
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(1),c=e(13),i=n.__importStar(e(18)),a=e(8),r=e(17),o=e(72);class l extends c.HasProps{constructor(e){super(e)}static init_Model(){this.define({tags:[i.Array,[]],name:[i.String],js_property_callbacks:[i.Any,{}],js_event_callbacks:[i.Any,{}],subscribed_events:[i.Array,[]]})}initialize(){super.initialize(),this._js_callbacks=new Map}connect_signals(){super.connect_signals(),this._update_property_callbacks(),this.connect(this.properties.js_property_callbacks.change,()=>this._update_property_callbacks()),this.connect(this.properties.js_event_callbacks.change,()=>this._update_event_callbacks()),this.connect(this.properties.subscribed_events.change,()=>this._update_event_callbacks())}_process_event(e){for(const t of this.js_event_callbacks[e.event_name]||[])t.execute(e);null!=this.document&&this.subscribed_events.some(t=>t==e.event_name)&&this.document.event_manager.send_event(e)}trigger_event(e){null!=this.document&&(e.origin=this,this.document.event_manager.trigger(e))}_update_event_callbacks(){null!=this.document?this.document.event_manager.subscribed_models.add(this):o.logger.warn(\"WARNING: Document not defined for updating event callbacks\")}_update_property_callbacks(){const e=e=>{const[t,s=null]=e.split(\":\");return null!=s?this.properties[s][t]:this[t]};for(const[t,s]of this._js_callbacks){const n=e(t);for(const e of s)this.disconnect(n,e)}this._js_callbacks.clear();for(const[t,s]of r.entries(this.js_property_callbacks)){const n=s.map(e=>()=>e.execute(this));this._js_callbacks.set(t,n);const c=e(t);for(const e of n)this.connect(c,e)}}_doc_attached(){r.isEmpty(this.js_event_callbacks)&&0==this.subscribed_events.length||this._update_event_callbacks()}_doc_detached(){this.document.event_manager.subscribed_models.delete(this)}select(e){if(a.isString(e))return[...this.references()].filter(t=>t instanceof l&&t.name===e);if(e.prototype instanceof c.HasProps)return[...this.references()].filter(t=>t instanceof e);throw new Error(\"invalid selector\")}select_one(e){const t=this.select(e);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(\"found more than one object matching given selector\")}}}s.Model=l,l.__name__=\"Model\",l.init_Model()},\n",
" function _(e,l,o){Object.defineProperty(o,\"__esModule\",{value:!0});const n=e(8),t={};class s{constructor(e,l){this.name=e,this.level=l}}o.LogLevel=s,s.__name__=\"LogLevel\";class g{constructor(e,l=g.INFO){this._name=e,this.set_level(l)}static get levels(){return Object.keys(g.log_levels)}static get(e,l=g.INFO){if(e.length>0){let o=t[e];return null==o&&(t[e]=o=new g(e,l)),o}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")}get level(){return this.get_level()}get_level(){return this._log_level}set_level(e){if(e instanceof s)this._log_level=e;else{if(!n.isString(e)||null==g.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=g.log_levels[e]}const l=`[${this._name}]`;for(const e in g.log_levels){g.log_levels[e].level<this._log_level.level||this._log_level.level===g.OFF.level?this[e]=function(){}:this[e]=r(e,l)}}trace(...e){}debug(...e){}info(...e){}warn(...e){}error(...e){}}function r(e,l){return null!=console[e]?console[e].bind(console,l):null!=console.log?console.log.bind(console,l):function(){}}function i(e){const l=o.logger.level;return n.isString(e)&&null==g.log_levels[e]?(console.log(`[bokeh] unrecognized logging level '${e}' passed to Bokeh.set_log_level(), ignoring`),console.log(\"[bokeh] valid log levels are: \"+g.levels.join(\", \"))):(console.log(`[bokeh] setting log level to: '${n.isString(e)?e:e.level}'`),o.logger.set_level(e)),l}o.Logger=g,g.__name__=\"Logger\",g.TRACE=new s(\"trace\",0),g.DEBUG=new s(\"debug\",1),g.INFO=new s(\"info\",2),g.WARN=new s(\"warn\",6),g.ERROR=new s(\"error\",7),g.FATAL=new s(\"fatal\",8),g.OFF=new s(\"off\",9),g.log_levels={trace:g.TRACE,debug:g.DEBUG,info:g.INFO,warn:g.WARN,error:g.ERROR,fatal:g.FATAL,off:g.OFF},o.logger=g.get(\"bokeh\"),o.set_log_level=i,o.with_log_level=function(e,l){const o=i(e);try{l()}finally{i(o)}}},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),a=t(31),n=t(75),r=t(76),o=t(23),_=i.__importStar(t(18)),l=t(10);class h extends a.AnnotationView{initialize(){super.initialize(),null==this.model.source&&(this.model.source=new r.ColumnDataSource),this.set_data(this.model.source)}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.set_data(this.model.source)),this.connect(this.model.source.streaming,()=>this.set_data(this.model.source)),this.connect(this.model.source.patching,()=>this.set_data(this.model.source))}set_data(t){super.set_data(t),this.visuals.warm_cache(t),this.plot_view.request_render()}_map_data(){const{frame:t}=this.plot_view;let e,s,i,a;return\"data\"==this.model.start_units?(e=t.xscales[this.model.x_range_name].v_compute(this._x_start),s=t.yscales[this.model.y_range_name].v_compute(this._y_start)):(e=t.xview.v_compute(this._x_start),s=t.yview.v_compute(this._y_start)),\"data\"==this.model.end_units?(i=t.xscales[this.model.x_range_name].v_compute(this._x_end),a=t.yscales[this.model.y_range_name].v_compute(this._y_end)):(i=t.xview.v_compute(this._x_end),a=t.yview.v_compute(this._y_end)),[[e,s],[i,a]]}render(){if(!this.model.visible)return;const{ctx:t}=this.layer;t.save();const[e,s]=this._map_data();null!=this.model.end&&this._arrow_head(t,\"render\",this.model.end,e,s),null!=this.model.start&&this._arrow_head(t,\"render\",this.model.start,s,e),t.beginPath();const{x:i,y:a,width:n,height:r}=this.plot_view.frame.bbox;t.rect(i,a,n,r),null!=this.model.end&&this._arrow_head(t,\"clip\",this.model.end,e,s),null!=this.model.start&&this._arrow_head(t,\"clip\",this.model.start,s,e),t.closePath(),t.clip(),this._arrow_body(t,e,s),t.restore()}_arrow_head(t,e,s,i,a){for(let n=0,r=this._x_start.length;n<r;n++){const r=Math.PI/2+l.atan2([i[0][n],i[1][n]],[a[0][n],a[1][n]]);t.save(),t.translate(a[0][n],a[1][n]),t.rotate(r),\"render\"==e?s.render(t,n):\"clip\"==e&&s.clip(t,n),t.restore()}}_arrow_body(t,e,s){if(this.visuals.line.doit)for(let i=0,a=this._x_start.length;i<a;i++)this.visuals.line.set_vectorize(t,i),t.beginPath(),t.moveTo(e[0][i],e[1][i]),t.lineTo(s[0][i],s[1][i]),t.stroke()}}s.ArrowView=h,h.__name__=\"ArrowView\";class d extends a.Annotation{constructor(t){super(t)}static init_Arrow(){this.prototype.default_view=h,this.mixins(o.LineVector),this.define({x_start:[_.NumberSpec],y_start:[_.NumberSpec],start_units:[_.SpatialUnits,\"data\"],start:[_.Instance,null],x_end:[_.NumberSpec],y_end:[_.NumberSpec],end_units:[_.SpatialUnits,\"data\"],end:[_.Instance,()=>new n.OpenHead({})],source:[_.Instance],x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"]})}}s.Arrow=d,d.__name__=\"Arrow\",d.init_Arrow()},\n",
" function _(i,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const t=i(1),o=i(31),l=i(70),n=i(23),h=t.__importStar(i(18));class a extends o.Annotation{constructor(i){super(i)}static init_ArrowHead(){this.define({size:[h.Number,25]})}initialize(){super.initialize(),this.visuals=new l.Visuals(this)}}s.ArrowHead=a,a.__name__=\"ArrowHead\",a.init_ArrowHead();class r extends a{constructor(i){super(i)}static init_OpenHead(){this.mixins(n.LineVector)}clip(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(0,0),i.lineTo(.5*this.size,this.size)}render(i,e){this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.stroke())}}s.OpenHead=r,r.__name__=\"OpenHead\",r.init_OpenHead();class z extends a{constructor(i){super(i)}static init_NormalHead(){this.mixins([n.LineVector,n.FillVector]),this.override({fill_color:\"black\"})}clip(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(.5*this.size,this.size)}render(i,e){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(i,e),this._normal(i,e),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),this._normal(i,e),i.stroke())}_normal(i,e){i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.closePath()}}s.NormalHead=z,z.__name__=\"NormalHead\",z.init_NormalHead();class _ extends a{constructor(i){super(i)}static init_VeeHead(){this.mixins([n.LineVector,n.FillVector]),this.override({fill_color:\"black\"})}clip(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(0,.5*this.size),i.lineTo(.5*this.size,this.size)}render(i,e){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(i,e),this._vee(i,e),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),this._vee(i,e),i.stroke())}_vee(i,e){i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.lineTo(0,.5*this.size),i.closePath()}}s.VeeHead=_,_.__name__=\"VeeHead\",_.init_VeeHead();class c extends a{constructor(i){super(i)}static init_TeeHead(){this.mixins(n.LineVector)}render(i,e){this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),i.beginPath(),i.moveTo(.5*this.size,0),i.lineTo(-.5*this.size,0),i.stroke())}clip(i,e){}}s.TeeHead=c,c.__name__=\"TeeHead\",c.init_TeeHead()},\n",
" function _(t,n,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=t(1),o=t(77),r=s.__importStar(t(18)),i=t(8),l=t(17),a=s.__importStar(t(103)),c=t(104),u=t(105);function h(t,n,e){if(i.isArray(t)){const s=t.concat(n);return null!=e&&s.length>e?s.slice(-e):s}if(i.isTypedArray(t)){const s=t.length+n.length;if(null!=e&&s>e){const o=s-e,r=t.length;let i;t.length<e?(i=new t.constructor(e),i.set(t,0)):i=t;for(let t=o,n=r;t<n;t++)i[t-o]=i[t];for(let t=0,e=n.length;t<e;t++)i[t+(r-o)]=n[t];return i}{const e=new t.constructor(n);return a.concat(t,e)}}throw new Error(\"unsupported array types\")}function d(t,n){let e,s,o;return i.isNumber(t)?(e=t,o=t+1,s=1):(e=null!=t.start?t.start:0,o=null!=t.stop?t.stop:n,s=null!=t.step?t.step:1),[e,o,s]}function m(t,n){const e=new Set;let s=!1;for(const[o,r]of n){let n,l,a,c;if(i.isArray(o)){const[s]=o;e.add(s),n=t[s].shape,l=t[s],c=r,2===o.length?(n=[1,n[0]],a=[o[0],0,o[1]]):a=o}else i.isNumber(o)?(c=[r],e.add(o)):(c=r,s=!0),a=[0,0,o],n=[1,t.length],l=t;let u=0;const[h,m,f]=d(a[1],n[0]),[_,p,g]=d(a[2],n[1]);for(let t=h;t<m;t+=f)for(let o=_;o<p;o+=g)s&&e.add(o),l[t*n[1]+o]=c[u],u++}return e}e.stream_to_column=h,e.slice=d,e.patch_to_column=m;class f extends o.ColumnarDataSource{constructor(t){super(t)}static init_ColumnDataSource(){this.define({data:[r.Any,{}]})}stream(t,n,e){const{data:s}=this;for(const e in t)s[e]=h(s[e],t[e],n);if(this.setv({data:s},{silent:!0}),this.streaming.emit(),null!=this.document){const s=new u.ColumnsStreamedEvent(this.document,this.ref(),t,n);this.document._notify_change(this,\"data\",null,null,{setter_id:e,hint:s})}}patch(t,n){const{data:e}=this;let s=new Set;for(const[n,o]of l.entries(t))s=c.union(s,m(e[n],o));if(this.setv({data:e},{silent:!0}),this.patching.emit([...s]),null!=this.document){const e=new u.ColumnsPatchedEvent(this.document,this.ref(),t);this.document._notify_change(this,\"data\",null,null,{setter_id:n,hint:e})}}}e.ColumnDataSource=f,f.__name__=\"ColumnDataSource\",f.init_ColumnDataSource()},\n",
" function _(t,n,e){Object.defineProperty(e,\"__esModule\",{value:!0});const a=t(1),s=t(78),i=t(14),r=t(72),c=t(80),l=a.__importStar(t(18)),o=t(8),u=t(9),h=t(17),g=t(79),_=t(102);class d extends s.DataSource{constructor(t){super(t)}get_array(t){let n=this.data[t];return null==n?this.data[t]=n=[]:o.isArray(n)||(this.data[t]=n=Array.from(n)),n}static init_ColumnarDataSource(){this.define({selection_policy:[l.Instance,()=>new _.UnionRenderers]}),this.internal({selection_manager:[l.Instance,t=>new c.SelectionManager({source:t})],inspected:[l.Instance,()=>new g.Selection]})}initialize(){super.initialize(),this._select=new i.Signal0(this,\"select\"),this.inspect=new i.Signal(this,\"inspect\"),this.streaming=new i.Signal0(this,\"streaming\"),this.patching=new i.Signal(this,\"patching\")}get_column(t){const n=this.data[t];return null!=n?n:null}columns(){return h.keys(this.data)}get_length(t=!0){const n=u.uniq(h.values(this.data).map(t=>t.length));switch(n.length){case 0:return null;case 1:return n[0];default:{const e=\"data source has columns of inconsistent lengths\";if(t)return r.logger.warn(e),n.sort()[0];throw new Error(e)}}}get_indices(){const t=this.get_length();return u.range(0,null!=t?t:1)}clear(){const t={};for(const n of this.columns())t[n]=new this.data[n].constructor(0);this.data=t}}e.ColumnarDataSource=d,d.__name__=\"ColumnarDataSource\",d.init_ColumnarDataSource()},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const c=e(1),n=e(71),o=e(79),i=c.__importStar(e(18));class r extends n.Model{constructor(e){super(e)}static init_DataSource(){this.define({selected:[i.Instance,()=>new o.Selection]})}}a.DataSource=r,r.__name__=\"DataSource\",r.init_DataSource()},\n",
" function _(i,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const t=i(1),n=i(71),l=t.__importStar(i(18)),c=i(9),_=i(17);class h extends n.Model{constructor(i){super(i)}static init_Selection(){this.define({indices:[l.Array,[]],line_indices:[l.Array,[]],multiline_indices:[l.Any,{}]}),this.internal({selected_glyphs:[l.Array,[]],get_view:[l.Any],image_indices:[l.Array,[]]})}initialize(){super.initialize(),this.get_view=()=>null}static from_hits(i){const e=c.sort_by(i,([,i])=>i).map(([i])=>i);return new h({indices:e})}get selected_glyph(){return this.selected_glyphs.length>0?this.selected_glyphs[0]:null}add_to_selected_glyphs(i){this.selected_glyphs.push(i)}update(i,e=!0,s=\"replace\"){switch(s){case\"replace\":this.indices=i.indices,this.line_indices=i.line_indices,this.selected_glyphs=i.selected_glyphs,this.get_view=i.get_view,this.multiline_indices=i.multiline_indices,this.image_indices=i.image_indices;break;case\"append\":this.update_through_union(i);break;case\"intersect\":this.update_through_intersection(i);break;case\"subtract\":this.update_through_subtraction(i)}}clear(){this.indices=[],this.line_indices=[],this.multiline_indices={},this.get_view=()=>null,this.selected_glyphs=[]}is_empty(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length}update_through_union(i){this.indices=c.union(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.get_view()||(this.get_view=i.get_view),this.multiline_indices=_.merge(i.multiline_indices,this.multiline_indices)}update_through_intersection(i){this.indices=c.intersection(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.get_view()||(this.get_view=i.get_view),this.multiline_indices=_.merge(i.multiline_indices,this.multiline_indices)}update_through_subtraction(i){this.indices=c.difference(this.indices,i.indices),this.selected_glyphs=c.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=c.union(i.line_indices,this.line_indices),this.get_view()||(this.get_view=i.get_view),this.multiline_indices=_.merge(i.multiline_indices,this.multiline_indices)}}s.Selection=h,h.__name__=\"Selection\",h.init_Selection()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),n=e(13),o=e(79),c=e(81),r=e(100),l=i.__importStar(e(18));class p extends n.HasProps{constructor(e){super(e),this.inspectors=new Map}static init_SelectionManager(){this.internal({source:[l.Any]})}select(e,t,s,i=\"replace\"){const n=[],o=[];for(const t of e)t instanceof c.GlyphRendererView?n.push(t):t instanceof r.GraphRendererView&&o.push(t);let l=!1;for(const e of o){const n=e.model.selection_policy.hit_test(t,e);l=l||e.model.selection_policy.do_selection(n,e.model,s,i)}if(n.length>0){const e=this.source.selection_policy.hit_test(t,n);l=l||this.source.selection_policy.do_selection(e,this.source,s,i)}return l}inspect(e,t){let s=!1;if(e instanceof c.GlyphRendererView){const i=e.hit_test(t);if(null!=i){s=!i.is_empty();const n=this.get_or_create_inspector(e.model);n.update(i,!0,\"replace\"),this.source.setv({inspected:n},{silent:!0}),this.source.inspect.emit([e,{geometry:t}])}}else if(e instanceof r.GraphRendererView){const i=e.model.inspection_policy.hit_test(t,e);s=s||e.model.inspection_policy.do_inspection(i,t,e,!1,\"replace\")}return s}clear(e){this.source.selected.clear(),null!=e&&this.get_or_create_inspector(e.model).clear()}get_or_create_inspector(e){let t=this.inspectors.get(e);return null==t&&(t=new o.Selection,this.inspectors.set(e,t)),t}}s.SelectionManager=p,p.__name__=\"SelectionManager\",p.init_SelectionManager()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),l=e(82),n=e(83),h=e(94),o=e(95),a=e(97),_=e(98),c=e(72),r=s.__importStar(e(18)),d=e(12),g=e(9),p=e(17),y=e(99),u=e(90),m={fill:{},line:{}},v={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},f={fill:{fill_alpha:.2},line:{}};class w extends l.DataRendererView{async lazy_initialize(){await super.lazy_initialize();const e=this.model.glyph,t=g.includes(e._mixins,\"fill\"),i=g.includes(e._mixins,\"line\"),s=p.clone(e.attributes);function l(l){const n=p.clone(s);return t&&p.extend(n,l.fill),i&&p.extend(n,l.line),new e.constructor(n)}delete s.id,this.glyph=await this.build_glyph_view(e);let{selection_glyph:n}=this.model;null==n?n=l({fill:{},line:{}}):\"auto\"===n&&(n=l(m)),this.selection_glyph=await this.build_glyph_view(n);let{nonselection_glyph:h}=this.model;null==h?h=l({fill:{},line:{}}):\"auto\"===h&&(h=l(f)),this.nonselection_glyph=await this.build_glyph_view(h);const{hover_glyph:o}=this.model;null!=o&&(this.hover_glyph=await this.build_glyph_view(o));const{muted_glyph:a}=this.model;null!=a&&(this.muted_glyph=await this.build_glyph_view(a));const _=l(v);this.decimated_glyph=await this.build_glyph_view(_),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)}async build_glyph_view(e){return y.build_view(e,{parent:this})}remove(){var e,t;this.glyph.remove(),this.selection_glyph.remove(),this.nonselection_glyph.remove(),null===(e=this.hover_glyph)||void 0===e||e.remove(),null===(t=this.muted_glyph)||void 0===t||t.remove(),this.decimated_glyph.remove(),super.remove()}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.request_render()),this.connect(this.model.glyph.change,()=>this.set_data()),this.connect(this.model.data_source.change,()=>this.set_data()),this.connect(this.model.data_source.streaming,()=>this.set_data()),this.connect(this.model.data_source.patching,e=>this.set_data(!0,e)),this.connect(this.model.data_source.selected.change,()=>this.request_render()),this.connect(this.model.data_source._select,()=>this.request_render()),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,()=>this.request_render()),this.connect(this.model.properties.view.change,()=>this.set_data()),this.connect(this.model.view.change,()=>this.set_data()),this.connect(this.model.properties.visible.change,()=>this.plot_view.update_dataranges());const{x_ranges:e,y_ranges:t}=this.plot_view.frame;for(const t in e){const i=e[t];i instanceof u.FactorRange&&this.connect(i.change,()=>this.set_data())}for(const e in t){const i=t[e];i instanceof u.FactorRange&&this.connect(i.change,()=>this.set_data())}this.connect(this.model.glyph.transformchange,()=>this.set_data())}have_selection_glyphs(){return null!=this.selection_glyph&&null!=this.nonselection_glyph}set_data(e=!0,t=null){const i=Date.now(),s=this.model.data_source;this.all_indices=this.model.view.indices,this.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.glyph.set_data(s,this.all_indices,t),this.glyph.set_visuals(s,this.all_indices),this.decimated_glyph.set_visuals(s,this.all_indices),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(s,this.all_indices),this.nonselection_glyph.set_visuals(s,this.all_indices)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(s,this.all_indices),null!=this.muted_glyph&&this.muted_glyph.set_visuals(s,this.all_indices);const{lod_factor:l}=this.plot_model;this.decimated=[];for(let e=0,t=Math.floor(this.all_indices.length/l);e<t;e++)this.decimated.push(e*l);const n=Date.now()-i;c.logger.debug(`${this.glyph.model.type} ${this.model}): set_data finished in ${n}ms`),this.set_data_timestamp=Date.now(),e&&this.request_render()}get has_webgl(){return this.glyph.has_webgl}render(){if(!this.model.visible)return;const e=Date.now(),t=this.has_webgl;this.glyph.map_data();const i=Date.now()-e,s=Date.now();let l=this.glyph.mask_data(thi
" function _(e,r,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(1),a=e(65),_=t.__importStar(e(18));class i extends a.RendererView{}n.DataRendererView=i,i.__name__=\"DataRendererView\";class d extends a.Renderer{constructor(e){super(e)}static init_DataRenderer(){this.define({x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"]}),this.override({level:\"glyph\"})}}n.DataRenderer=d,d.__name__=\"DataRenderer\",d.init_DataRenderer()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),n=e(84),_=e(92),l=s.__importStar(e(23)),o=s.__importStar(e(93)),r=e(79);class h extends n.XYGlyphView{_render(e,t,{sx:i,sy:s}){let n=!1,_=null;this.visuals.line.set_value(e);for(const l of t){if(n){if(!isFinite(i[l]+s[l])){e.stroke(),e.beginPath(),n=!1,_=l;continue}null!=_&&l-_>1&&(e.stroke(),n=!1)}n?e.lineTo(i[l],s[l]):(e.beginPath(),e.moveTo(i[l],s[l]),n=!0),_=l}n&&e.stroke()}_hit_point(e){const t=new r.Selection,i={x:e.sx,y:e.sy};let s=9999;const n=Math.max(2,this.visuals.line.line_width.value()/2);for(let e=0,_=this.sx.length-1;e<_;e++){const _={x:this.sx[e],y:this.sy[e]},l={x:this.sx[e+1],y:this.sy[e+1]},r=o.dist_to_segment(i,_,l);r<n&&r<s&&(s=r,t.add_to_selected_glyphs(this.model),t.get_view=()=>this,t.line_indices=[e])}return t}_hit_span(e){const{sx:t,sy:i}=e,s=new r.Selection;let n,_;\"v\"==e.direction?(n=this.renderer.yscale.invert(i),_=this._y):(n=this.renderer.xscale.invert(t),_=this._x);for(let e=0,t=_.length-1;e<t;e++)(_[e]<=n&&n<=_[e+1]||_[e+1]<=n&&n<=_[e])&&(s.add_to_selected_glyphs(this.model),s.get_view=()=>this,s.line_indices.push(e));return s}get_interpolation_hit(e,t){const[i,s,n,l]=[this._x[e],this._y[e],this._x[e+1],this._y[e+1]];return _.line_interpolation(this.renderer,t,i,s,n,l)}draw_legend_for_index(e,t,i){_.generic_line_legend(this.visuals,e,t,i)}}i.LineView=h,h.__name__=\"LineView\";class a extends n.XYGlyph{constructor(e){super(e)}static init_Line(){this.prototype.default_view=h,this.mixins(l.Line)}}i.Line=a,a.__name__=\"Line\",a.init_Line()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(85),n=e(89);class _ extends n.GlyphView{_index_data(){const e=[];for(let t=0,s=this._x.length;t<s;t++){const s=this._x[t],i=this._y[t];!isNaN(s+i)&&isFinite(s+i)&&e.push({x0:s,y0:i,x1:s,y1:i,i:t})}return new i.SpatialIndex(e)}scenterx(e){return this.sx[e]}scentery(e){return this.sy[e]}}s.XYGlyphView=_,_.__name__=\"XYGlyphView\";class h extends n.Glyph{constructor(e){super(e)}static init_XYGlyph(){this.coords([[\"x\",\"y\"]])}}s.XYGlyph=h,h.__name__=\"XYGlyph\",h.init_XYGlyph()},\n",
" function _(n,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=n(1).__importDefault(n(86)),s=n(88);class r{constructor(n){if(this.points=n,this.index=null,n.length>0){this.index=new e.default(n.length);for(const t of n){const{x0:n,y0:i,x1:e,y1:s}=t;this.index.add(n,i,e,s)}this.index.finish()}}_normalize(n){let{x0:t,y0:i,x1:e,y1:s}=n;return t>e&&([t,e]=[e,t]),i>s&&([i,s]=[s,i]),{x0:t,y0:i,x1:e,y1:s}}get bbox(){if(null==this.index)return s.empty();{const{minX:n,minY:t,maxX:i,maxY:e}=this.index;return{x0:n,y0:t,x1:i,y1:e}}}search(n){if(null==this.index)return[];{const{x0:t,y0:i,x1:e,y1:s}=this._normalize(n);return this.index.search(t,i,e,s).map(n=>this.points[n])}}indices(n){return this.search(n).map(({i:n})=>n)}}i.SpatialIndex=r,r.__name__=\"SpatialIndex\"},\n",
" function _(t,s,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=t(1).__importDefault(t(87)),h=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class n{static from(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");const[s,i]=new Uint8Array(t,0,2);if(251!==s)throw new Error(\"Data does not appear to be in a Flatbush format.\");if(i>>4!=3)throw new Error(`Got v${i>>4} data when expected v3.`);const[e]=new Uint16Array(t,2,1),[o]=new Uint32Array(t,4,1);return new n(o,e,h[15&i],t)}constructor(t,s=16,i=Float64Array,n){if(void 0===t)throw new Error(\"Missing required argument: numItems.\");if(isNaN(t)||t<=0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+s,2),65535);let o=t,r=o;this._levelBounds=[4*o];do{o=Math.ceil(o/this.nodeSize),r+=o,this._levelBounds.push(4*r)}while(1!==o);this.ArrayType=i||Float64Array,this.IndexArrayType=r<16384?Uint16Array:Uint32Array;const a=h.indexOf(this.ArrayType),_=4*r*this.ArrayType.BYTES_PER_ELEMENT;if(a<0)throw new Error(`Unexpected typed array class: ${i}.`);n&&n instanceof ArrayBuffer?(this.data=n,this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=4*r,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+_+r*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+_,r),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+a]),new Uint16Array(this.data,2,1)[0]=s,new Uint32Array(this.data,4,1)[0]=t),this._queue=new e.default}add(t,s,i,e){const h=this._pos>>2;return this._indices[h]=h,this._boxes[this._pos++]=t,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,t<this.minX&&(this.minX=t),s<this.minY&&(this.minY=s),i>this.maxX&&(this.maxX=i),e>this.maxY&&(this.maxY=e),h}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);if(this.numItems<=this.nodeSize)return this._boxes[this._pos++]=this.minX,this._boxes[this._pos++]=this.minY,this._boxes[this._pos++]=this.maxX,void(this._boxes[this._pos++]=this.maxY);const t=this.maxX-this.minX,s=this.maxY-this.minY,i=new Uint32Array(this.numItems);for(let e=0;e<this.numItems;e++){let h=4*e;const n=this._boxes[h++],o=this._boxes[h++],r=this._boxes[h++],a=this._boxes[h++],d=Math.floor(65535*((n+r)/2-this.minX)/t),x=Math.floor(65535*((o+a)/2-this.minY)/s);i[e]=_(d,x)}!function t(s,i,e,h,n,o){if(Math.floor(h/o)>=Math.floor(n/o))return;const r=s[h+n>>1];let _=h-1,d=n+1;for(;;){do{_++}while(s[_]<r);do{d--}while(s[d]>r);if(_>=d)break;a(s,i,e,_,d)}t(s,i,e,h,d,o),t(s,i,e,d+1,n,o)}(i,this._boxes,this._indices,0,this.numItems-1,this.nodeSize);for(let t=0,s=0;t<this._levelBounds.length-1;t++){const i=this._levelBounds[t];for(;s<i;){const t=s;let e=1/0,h=1/0,n=-1/0,o=-1/0;for(let t=0;t<this.nodeSize&&s<i;t++)e=Math.min(e,this._boxes[s++]),h=Math.min(h,this._boxes[s++]),n=Math.max(n,this._boxes[s++]),o=Math.max(o,this._boxes[s++]);this._indices[this._pos>>2]=t,this._boxes[this._pos++]=e,this._boxes[this._pos++]=h,this._boxes[this._pos++]=n,this._boxes[this._pos++]=o}}}search(t,s,i,e,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const o=[],a=[];for(;void 0!==n;){const _=Math.min(n+4*this.nodeSize,r(n,this._levelBounds));for(let r=n;r<_;r+=4){const _=0|this._indices[r>>2];i<this._boxes[r]||(e<this._boxes[r+1]||t>this._boxes[r+2]||s>this._boxes[r+3]||(n<4*this.numItems?(void 0===h||h(_))&&a.push(_):o.push(_)))}n=o.pop()}return a}neighbors(t,s,i=1/0,e=1/0,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");let n=this._boxes.length-4;const a=this._queue,_
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),n=i.__importStar(t(18)),r=i.__importStar(t(88)),a=i.__importStar(t(32)),_=i.__importStar(t(70)),l=t(67),o=t(71),h=t(72),c=t(12),d=t(17),p=t(8),y=t(83),u=t(90),g=t(79);class x extends l.View{constructor(){super(...arguments),this._nohit_warned=new Set}get renderer(){return this.parent}get has_webgl(){return null!=this.glglyph}initialize(){super.initialize(),this.visuals=new _.Visuals(this.model)}async lazy_initialize(){await super.lazy_initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;if(null!=e){let s=null;try{s=await Promise.resolve().then(()=>i.__importStar(t(371)))}catch(t){if(\"MODULE_NOT_FOUND\"!==t.code)throw t;h.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\")}if(null!=s){const t=s[this.model.type+\"GLGlyph\"];null!=t&&(this.glglyph=new t(e.gl,this))}}}set_visuals(t,e){this.visuals.set_all_indices(e),this.visuals.warm_cache(t),null!=this.glglyph&&this.glglyph.set_visuals_changed()}render(t,e,s){t.beginPath(),null!=this.glglyph&&this.glglyph.render(t,e,s)||this._render(t,e,s)}has_finished(){return!0}notify_finished(){this.renderer.notify_finished()}_bounds(t){return t}bounds(){return this._bounds(this.index.bbox)}log_bounds(){const t=r.empty(),e=this.index.search(r.positive_x());for(const s of e)s.x0<t.x0&&(t.x0=s.x0),s.x1>t.x1&&(t.x1=s.x1);const s=this.index.search(r.positive_y());for(const e of s)e.y0<t.y0&&(t.y0=e.y0),e.y1>t.y1&&(t.y1=e.y1);return this._bounds(t)}get_anchor_point(t,e,[s,i]){switch(t){case\"center\":return{x:this.scenterx(e,s,i),y:this.scentery(e,s,i)};default:return null}}sdist(t,e,s,i=\"edge\",n=!1){let r,a;const _=e.length;if(\"center\"==i){const t=c.map(s,t=>t/2);r=new Float64Array(_);for(let s=0;s<_;s++)r[s]=e[s]-t[s];a=new Float64Array(_);for(let s=0;s<_;s++)a[s]=e[s]+t[s]}else{r=e,a=new Float64Array(_);for(let t=0;t<_;t++)a[t]=r[t]+s[t]}const l=t.v_compute(r),o=t.v_compute(a);return n?c.map(l,(t,e)=>Math.ceil(Math.abs(o[e]-l[e]))):c.map(l,(t,e)=>Math.abs(o[e]-l[e]))}draw_legend_for_index(t,e,s){}hit_test(t){switch(t.type){case\"point\":if(null!=this._hit_point)return this._hit_point(t);break;case\"span\":if(null!=this._hit_span)return this._hit_span(t);break;case\"rect\":if(null!=this._hit_rect)return this._hit_rect(t);break;case\"poly\":if(null!=this._hit_poly)return this._hit_poly(t)}return this._nohit_warned.has(t.type)||(h.logger.debug(`'${t.type}' selection not available for ${this.model.type}`),this._nohit_warned.add(t.type)),null}_hit_rect_against_index(t){const{sx0:e,sx1:s,sy0:i,sy1:n}=t,[r,a]=this.renderer.xscale.r_invert(e,s),[_,l]=this.renderer.yscale.r_invert(i,n),o=this.index.indices({x0:r,x1:a,y0:_,y1:l});return new g.Selection({indices:o})}set_data(t,e,s){let i=this.model.materialize_dataspecs(t);if(e&&!(this instanceof y.LineView)){const t={};for(const s in i){const n=i[s];\"_\"===s.charAt(0)?t[s]=e.map(t=>n[t]):t[s]=n}i=t}const n=this;if(d.extend(n,i),this.renderer.plot_view.model.use_map&&(null!=n._x&&([n._x,n._y]=a.project_xy(n._x,n._y)),null!=n._xs&&([n._xs,n._ys]=a.project_xsys(n._xs,n._ys)),null!=n._x0&&([n._x0,n._y0]=a.project_xy(n._x0,n._y0)),null!=n._x1&&([n._x1,n._y1]=a.project_xy(n._x1,n._y1))),null!=this.renderer.plot_view.frame.x_ranges){const t=this.renderer.plot_view.frame.x_ranges[this.model.x_range_name],e=this.renderer.plot_view.frame.y_ranges[this.model.y_range_name];for(let[s,i]of this.model._coords)s=\"_\"+s,i=\"_\"+i,null!=n._xs?(t instanceof u.FactorRange&&(n[s]=c.map(n[s],e=>t.v_synthetic(e))),e instanceof u.FactorRange&&(n[i]=c.map(n[i],t=>e.v_synthetic(t)))):(t instanceof u.FactorRange&&(n[s]=t.v_synthetic(n[s])),e instanceof u.FactorRange&&(n[i]=e.v_synthetic(n[i])))}null!=this.glglyph&&this.glglyph.set_data_changed(n._x.length),this._set_data(s),this.index_data()}_set_data(t){}index_data(){this.index=this._index_data()}mask_data(t){return null!=this.glglyph||null==this._mask_data?t:this._mask_data()}map_data(){const t=this;for(let[e,s]of this.model._coords){const
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=e(1),a=e(71),r=i.__importStar(e(18));class s extends a.Model{constructor(e){super(e),this.have_updated_interactively=!1}static init_Range(){this.define({bounds:[r.Any],min_interval:[r.Any],max_interval:[r.Any]}),this.internal({plots:[r.Array,[]]})}get is_reversed(){return this.start>this.end}}n.Range=s,s.__name__=\"Range\",s.init_Range()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1).__importStar(e(93));i.generic_line_legend=function(e,t,{x0:i,x1:n,y0:c,y1:o},r){t.save(),t.beginPath(),t.moveTo(i,(c+o)/2),t.lineTo(n,(c+o)/2),e.line.doit&&(e.line.set_vectorize(t,r),t.stroke()),t.restore()},i.generic_area_legend=function(e,t,{x0:i,x1:n,y0:c,y1:o},r){const l=.1*Math.abs(n-i),a=.1*Math.abs(o-c),s=i+l,_=n-l,h=c+a,v=o-a;e.fill.doit&&(e.fill.set_vectorize(t,r),t.fillRect(s,h,_-s,v-h)),null!=e.hatch&&e.hatch.doit&&(e.hatch.set_vectorize(t,r),t.fillRect(s,h,_-s,v-h)),e.line&&e.line.doit&&(t.beginPath(),t.rect(s,h,_-s,v-h),e.line.set_vectorize(t,r),t.stroke())},i.line_interpolation=function(e,t,i,c,o,r){const{sx:l,sy:a}=t;let s,_,h,v;\"point\"==t.type?([h,v]=e.yscale.r_invert(a-1,a+1),[s,_]=e.xscale.r_invert(l-1,l+1)):\"v\"==t.direction?([h,v]=e.yscale.r_invert(a,a),[s,_]=[Math.min(i-1,o-1),Math.max(i+1,o+1)]):([s,_]=e.xscale.r_invert(l,l),[h,v]=[Math.min(c-1,r-1),Math.max(c+1,r+1)]);const{x,y}=n.check_2_segments_intersect(s,h,_,v,i,c,o,r);return[x,y]}},\n",
" function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(1),l=e(84),_=e(92),n=s.__importStar(e(93)),o=s.__importStar(e(23)),a=e(79);class h extends l.XYGlyphView{_inner_loop(e,i,t,s,l){for(const _ of i)0!=_?isNaN(t[_]+s[_])?(e.closePath(),l.apply(e),e.beginPath()):e.lineTo(t[_],s[_]):(e.beginPath(),e.moveTo(t[_],s[_]));e.closePath(),l.call(e)}_render(e,i,{sx:t,sy:s}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner_loop(e,i,t,s,e.fill)),this.visuals.hatch.doit2(e,0,()=>this._inner_loop(e,i,t,s,e.fill),()=>this.renderer.request_render()),this.visuals.line.doit&&(this.visuals.line.set_value(e),this._inner_loop(e,i,t,s,e.stroke))}draw_legend_for_index(e,i,t){_.generic_area_legend(this.visuals,e,i,t)}_hit_point(e){const i=new a.Selection;return n.point_in_poly(e.sx,e.sy,this.sx,this.sy)&&(i.add_to_selected_glyphs(this.model),i.get_view=()=>this),i}}t.PatchView=h,h.__name__=\"PatchView\";class r extends l.XYGlyph{constructor(e){super(e)}static init_Patch(){this.prototype.default_view=h,this.mixins([o.Line,o.Fill,o.Hatch])}}t.Patch=r,r.__name__=\"Patch\",r.init_Patch()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(96),n=e(85),a=i.__importStar(e(93)),_=i.__importStar(e(18)),h=e(79);class l extends r.AreaView{_index_data(){const e=[];for(let t=0,s=this._x1.length;t<s;t++){const s=this._x1[t],i=this._x2[t],r=this._y[t];!isNaN(s+i+r)&&isFinite(s+i+r)&&e.push({x0:Math.min(s,i),y0:r,x1:Math.max(s,i),y1:r,i:t})}return new n.SpatialIndex(e)}_inner(e,t,s,i,r){e.beginPath();for(let s=0,r=t.length;s<r;s++)e.lineTo(t[s],i[s]);for(let t=s.length-1;t>=0;t--)e.lineTo(s[t],i[t]);e.closePath(),r.call(e)}_render(e,t,{sx1:s,sx2:i,sy:r}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner(e,s,i,r,e.fill)),this.visuals.hatch.doit2(e,0,()=>this._inner(e,s,i,r,e.fill),()=>this.renderer.request_render())}_hit_point(e){const t=this.sy.length,s=new Float64Array(2*t),i=new Float64Array(2*t);for(let e=0,r=t;e<r;e++)s[e]=this.sx1[e],i[e]=this.sy[e],s[t+e]=this.sx2[t-e-1],i[t+e]=this.sy[t-e-1];const r=new h.Selection;return a.point_in_poly(e.sx,e.sy,s,i)&&(r.add_to_selected_glyphs(this.model),r.get_view=()=>this),r}scenterx(e){return(this.sx1[e]+this.sx2[e])/2}scentery(e){return this.sy[e]}_map_data(){this.sx1=this.renderer.xscale.v_compute(this._x1),this.sx2=this.renderer.xscale.v_compute(this._x2),this.sy=this.renderer.yscale.v_compute(this._y)}}s.HAreaView=l,l.__name__=\"HAreaView\";class o extends r.Area{constructor(e){super(e)}static init_HArea(){this.prototype.default_view=l,this.define({x1:[_.CoordinateSpec],x2:[_.CoordinateSpec],y:[_.CoordinateSpec]})}}s.HArea=o,o.__name__=\"HArea\",o.init_HArea()},\n",
" function _(e,_,i){Object.defineProperty(i,\"__esModule\",{value:!0});const a=e(1),r=e(89),t=e(92),n=a.__importStar(e(23));class s extends r.GlyphView{draw_legend_for_index(e,_,i){t.generic_area_legend(this.visuals,e,_,i)}}i.AreaView=s,s.__name__=\"AreaView\";class c extends r.Glyph{constructor(e){super(e)}static init_Area(){this.mixins([n.Fill,n.HatchVector])}}i.Area=c,c.__name__=\"Area\",c.init_Area()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(96),n=e(85),a=i.__importStar(e(93)),_=i.__importStar(e(18)),h=e(79);class l extends r.AreaView{_index_data(){const e=[];for(let t=0,s=this._x.length;t<s;t++){const s=this._x[t],i=this._y1[t],r=this._y2[t];!isNaN(s+i+r)&&isFinite(s+i+r)&&e.push({x0:s,y0:Math.min(i,r),x1:s,y1:Math.max(i,r),i:t})}return new n.SpatialIndex(e)}_inner(e,t,s,i,r){e.beginPath();for(let i=0,r=s.length;i<r;i++)e.lineTo(t[i],s[i]);for(let s=i.length-1;s>=0;s--)e.lineTo(t[s],i[s]);e.closePath(),r.call(e)}_render(e,t,{sx:s,sy1:i,sy2:r}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner(e,s,i,r,e.fill)),this.visuals.hatch.doit2(e,0,()=>this._inner(e,s,i,r,e.fill),()=>this.renderer.request_render())}scenterx(e){return this.sx[e]}scentery(e){return(this.sy1[e]+this.sy2[e])/2}_hit_point(e){const t=this.sx.length,s=new Float64Array(2*t),i=new Float64Array(2*t);for(let e=0,r=t;e<r;e++)s[e]=this.sx[e],i[e]=this.sy1[e],s[t+e]=this.sx[t-e-1],i[t+e]=this.sy2[t-e-1];const r=new h.Selection;return a.point_in_poly(e.sx,e.sy,s,i)&&(r.add_to_selected_glyphs(this.model),r.get_view=()=>this),r}_map_data(){this.sx=this.renderer.xscale.v_compute(this._x),this.sy1=this.renderer.yscale.v_compute(this._y1),this.sy2=this.renderer.yscale.v_compute(this._y2)}}s.VAreaView=l,l.__name__=\"VAreaView\";class o extends r.Area{constructor(e){super(e)}static init_VArea(){this.prototype.default_view=l,this.define({x:[_.CoordinateSpec],y1:[_.CoordinateSpec],y2:[_.CoordinateSpec]})}}s.VArea=o,o.__name__=\"VArea\",o.init_VArea()},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(9);async function i(e,n,t){const o=new e(Object.assign(Object.assign({},t),{model:n}));return o.initialize(),await o.lazy_initialize(),o}t.build_view=async function(e,n={parent:null},t=(e=>e.default_view)){const o=await i(t(e),e,n);return o.connect_signals(),o},t.build_views=async function(e,n,t={parent:null},s=(e=>e.default_view)){const c=o.difference([...e.keys()],n);for(const n of c)e.get(n).remove(),e.delete(n);const a=[],f=n.filter(n=>!e.has(n));for(const n of f){const o=await i(s(n),n,t);e.set(n,o),a.push(o)}for(const e of a)e.connect_signals();return a},t.remove_views=function(e){for(const[n,t]of e)t.remove(),e.delete(n)}},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const s=e(1),r=e(82),i=e(101),a=s.__importStar(e(18)),d=e(99);class _ extends r.DataRendererView{initialize(){super.initialize(),this.xscale=this.plot_view.frame.xscales.default,this.yscale=this.plot_view.frame.yscales.default,this._renderer_views=new Map}async lazy_initialize(){[this.node_view,this.edge_view]=await d.build_views(this._renderer_views,[this.model.node_renderer,this.model.edge_renderer],{parent:this.parent}),this.set_data()}remove(){d.remove_views(this._renderer_views),super.remove()}connect_signals(){super.connect_signals(),this.connect(this.model.layout_provider.change,()=>this.set_data()),this.connect(this.model.node_renderer.data_source._select,()=>this.set_data()),this.connect(this.model.node_renderer.data_source.inspect,()=>this.set_data()),this.connect(this.model.node_renderer.data_source.change,()=>this.set_data()),this.connect(this.model.edge_renderer.data_source._select,()=>this.set_data()),this.connect(this.model.edge_renderer.data_source.inspect,()=>this.set_data()),this.connect(this.model.edge_renderer.data_source.change,()=>this.set_data());const{x_ranges:e,y_ranges:t}=this.plot_view.frame;for(const t in e){const n=e[t];this.connect(n.change,()=>this.set_data())}for(const e in t){const n=t[e];this.connect(n.change,()=>this.set_data())}}set_data(e=!0){this.node_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.edge_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0});const t=this.node_view.glyph;[t._x,t._y]=this.model.layout_provider.get_node_coordinates(this.model.node_renderer.data_source);const n=this.edge_view.glyph;[n._xs,n._ys]=this.model.layout_provider.get_edge_coordinates(this.model.edge_renderer.data_source),t.index_data(),n.index_data(),e&&this.request_render()}render(){this.edge_view.render(),this.node_view.render()}}n.GraphRendererView=_,_.__name__=\"GraphRendererView\";class o extends r.DataRenderer{constructor(e){super(e)}static init_GraphRenderer(){this.prototype.default_view=_,this.define({layout_provider:[a.Instance],node_renderer:[a.Instance],edge_renderer:[a.Instance],selection_policy:[a.Instance,()=>new i.NodesOnly],inspection_policy:[a.Instance,()=>new i.NodesOnly]})}get_selection_manager(){return this.node_renderer.data_source.selection_manager}}n.GraphRenderer=o,o.__name__=\"GraphRenderer\",o.init_GraphRenderer()},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const d=e(71),s=e(12),o=e(9),_=e(79);class i extends d.Model{constructor(e){super(e)}_hit_test_nodes(e,t){if(!t.model.visible)return null;const n=t.node_view.glyph.hit_test(e);return null==n?null:t.node_view.model.view.convert_selection_from_subset(n)}_hit_test_edges(e,t){if(!t.model.visible)return null;const n=t.edge_view.glyph.hit_test(e);return null==n?null:t.edge_view.model.view.convert_selection_from_subset(n)}}n.GraphHitTestPolicy=i,i.__name__=\"GraphHitTestPolicy\";class r extends i{constructor(e){super(e)}hit_test(e,t){return this._hit_test_nodes(e,t)}do_selection(e,t,n,d){if(null==e)return!1;const s=t.node_renderer.data_source.selected;return s.update(e,n,d),t.node_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,n,d,s){if(null==e)return!1;const o=n.model.get_selection_manager().get_or_create_inspector(n.node_view.model);return o.update(e,d,s),n.node_view.model.data_source.setv({inspected:o},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()}}n.NodesOnly=r,r.__name__=\"NodesOnly\";class c extends i{constructor(e){super(e)}hit_test(e,t){return this._hit_test_nodes(e,t)}get_linked_edges(e,t,n){let d=[];\"selection\"==n?d=e.selected.indices.map(t=>e.data.index[t]):\"inspection\"==n&&(d=e.inspected.indices.map(t=>e.data.index[t]));const s=[];for(let e=0;e<t.data.start.length;e++)(o.contains(d,t.data.start[e])||o.contains(d,t.data.end[e]))&&s.push(e);const i=new _.Selection;for(const e of s)i.multiline_indices[e]=[0];return i.indices=s,i}do_selection(e,t,n,d){if(null==e)return!1;const s=t.node_renderer.data_source.selected;s.update(e,n,d);const o=t.edge_renderer.data_source.selected,_=this.get_linked_edges(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(_,n,d),t.node_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,n,d,s){if(null==e)return!1;const o=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model);o.update(e,d,s),n.node_view.model.data_source.setv({inspected:o},{silent:!0});const _=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model),i=this.get_linked_edges(n.node_view.model.data_source,n.edge_view.model.data_source,\"inspection\");return _.update(i,d,s),n.edge_view.model.data_source.setv({inspected:_},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()}}n.NodesAndLinkedEdges=c,c.__name__=\"NodesAndLinkedEdges\";class a extends i{constructor(e){super(e)}hit_test(e,t){return this._hit_test_edges(e,t)}get_linked_nodes(e,t,n){let d=[];\"selection\"==n?d=t.selected.indices:\"inspection\"==n&&(d=t.inspected.indices);const i=[];for(const e of d)i.push(t.data.start[e]),i.push(t.data.end[e]);const r=o.uniq(i).map(t=>s.indexOf(e.data.index,t));return new _.Selection({indices:r})}do_selection(e,t,n,d){if(null==e)return!1;const s=t.edge_renderer.data_source.selected;s.update(e,n,d);const o=t.node_renderer.data_source.selected,_=this.get_linked_nodes(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(_,n,d),t.edge_renderer.data_source._select.emit(),!s.is_empty()}do_inspection(e,t,n,d,s){if(null==e)return!1;const o=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model);o.update(e,d,s),n.edge_view.model.data_source.setv({inspected:o},{silent:!0});const _=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model),i=this.get_linked_nodes(n.node_view.model.data_source,n.edge_view.model.data_source,\"inspection\");return _.update(i,d,s),n.node_view.model.data_source.setv({inspected:_},{silent:!0}),n.edge_view.model.data_source.inspect.emit([n.edge_view,{geometry:t}]),!o.is_empty()}}n.EdgesAndLinkedNodes=a,a.__name__=\"EdgesAndLinkedNodes\"},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const s=e(71);class o extends s.Model{do_selection(e,t,n,s){return null!==e&&(t.selected.update(e,n,s),t._select.emit(),!t.selected.is_empty())}}n.SelectionPolicy=o,o.__name__=\"SelectionPolicy\";class r extends o{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!==t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_intersection(t);return e}return null}}n.IntersectRenderers=r,r.__name__=\"IntersectRenderers\";class c extends o{hit_test(e,t){const n=[];for(const s of t){const t=s.hit_test(e);null!==t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_union(t);return e}return null}}n.UnionRenderers=c,c.__name__=\"UnionRenderers\"},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.concat=function(t,...e){let n=t.length;for(const t of e)n+=t.length;const o=new t.constructor(n);o.set(t,0);let c=t.length;for(const t of e)o.set(t,c),c+=t.length;return o}},\n",
" function _(n,o,e){function t(...n){const o=new Set;for(const e of n)for(const n of e)o.add(n);return o}Object.defineProperty(e,\"__esModule\",{value:!0}),e.union=t,e.intersection=function(n,...o){const e=new Set;n:for(const t of n){for(const n of o)if(!n.has(t))continue n;e.add(t)}return e},e.difference=function(n,...o){const e=new Set(n);for(const n of t(...o))e.delete(n);return e}},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(13);class o{constructor(e){this.document=e}}s.DocumentEvent=o,o.__name__=\"DocumentEvent\";class r extends o{constructor(e,t,s){super(e),this.events=t,this.setter_id=s}}s.DocumentEventBatch=r,r.__name__=\"DocumentEventBatch\";class d extends o{}s.DocumentChangedEvent=d,d.__name__=\"DocumentChangedEvent\";class _ extends d{constructor(e,t,s){super(e),this.msg_type=t,this.msg_data=s}json(e){const t=this.msg_data,s=n.HasProps._value_to_json(t),o=new Set;return n.HasProps._value_record_references(t,o,{recursive:!0}),{kind:\"MessageSent\",msg_type:this.msg_type,msg_data:s}}}s.MessageSentEvent=_,_.__name__=\"MessageSentEvent\";class i extends d{constructor(e,t,s,n,o,r,d){super(e),this.model=t,this.attr=s,this.old=n,this.new_=o,this.setter_id=r,this.hint=d}json(e){if(\"id\"===this.attr)throw new Error(\"'id' field should never change, whatever code just set it is wrong\");if(null!=this.hint)return this.hint.json(e);const t=this.new_,s=n.HasProps._value_to_json(t),o=new Set;n.HasProps._value_record_references(t,o,{recursive:!0}),o.has(this.model)&&this.model!==t&&o.delete(this.model);for(const t of o)e.add(t);return{kind:\"ModelChanged\",model:this.model.ref(),attr:this.attr,new:s}}}s.ModelChangedEvent=i,i.__name__=\"ModelChangedEvent\";class a extends d{constructor(e,t,s){super(e),this.column_source=t,this.patches=s}json(e){return{kind:\"ColumnsPatched\",column_source:this.column_source,patches:this.patches}}}s.ColumnsPatchedEvent=a,a.__name__=\"ColumnsPatchedEvent\";class c extends d{constructor(e,t,s,n){super(e),this.column_source=t,this.data=s,this.rollover=n}json(e){return{kind:\"ColumnsStreamed\",column_source:this.column_source,data:this.data,rollover:this.rollover}}}s.ColumnsStreamedEvent=c,c.__name__=\"ColumnsStreamedEvent\";class h extends d{constructor(e,t,s){super(e),this.title=t,this.setter_id=s}json(e){return{kind:\"TitleChanged\",title:this.title}}}s.TitleChangedEvent=h,h.__name__=\"TitleChangedEvent\";class u extends d{constructor(e,t,s){super(e),this.model=t,this.setter_id=s}json(e){return n.HasProps._value_record_references(this.model,e,{recursive:!0}),{kind:\"RootAdded\",model:this.model.ref()}}}s.RootAddedEvent=u,u.__name__=\"RootAddedEvent\";class l extends d{constructor(e,t,s){super(e),this.model=t,this.setter_id=s}json(e){return{kind:\"RootRemoved\",model:this.model.ref()}}}s.RootRemovedEvent=l,l.__name__=\"RootRemovedEvent\"},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),_=e(31),o=e(76),l=i.__importStar(e(23)),a=i.__importStar(e(18));class n extends _.AnnotationView{initialize(){super.initialize(),this.set_data(this.model.source)}connect_signals(){super.connect_signals(),this.connect(this.model.source.streaming,()=>this.set_data(this.model.source)),this.connect(this.model.source.patching,()=>this.set_data(this.model.source)),this.connect(this.model.source.change,()=>this.set_data(this.model.source))}set_data(e){super.set_data(e),this.visuals.warm_cache(e),this.plot_view.request_render()}_map_data(){const{frame:e}=this.plot_view,t=this.model.dimension,s=e.xscales[this.model.x_range_name],i=e.yscales[this.model.y_range_name],_=\"height\"==t?i:s,o=\"height\"==t?s:i,l=\"height\"==t?e.yview:e.xview,a=\"height\"==t?e.xview:e.yview;let n,h,r;n=\"data\"==this.model.properties.lower.units?_.v_compute(this._lower):l.v_compute(this._lower),h=\"data\"==this.model.properties.upper.units?_.v_compute(this._upper):l.v_compute(this._upper),r=\"data\"==this.model.properties.base.units?o.v_compute(this._base):a.v_compute(this._base);const[c,p]=\"height\"==t?[1,0]:[0,1],u=[n,r],d=[h,r];this._lower_sx=u[c],this._lower_sy=u[p],this._upper_sx=d[c],this._upper_sy=d[p]}render(){if(!this.model.visible)return;this._map_data();const{ctx:e}=this.layer;e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let t=0,s=this._lower_sx.length;t<s;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);for(let t=this._upper_sx.length-1;t>=0;t--)e.lineTo(this._upper_sx[t],this._upper_sy[t]);e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(e),e.fill()),e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let t=0,s=this._lower_sx.length;t<s;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke()),e.beginPath(),e.moveTo(this._upper_sx[0],this._upper_sy[0]);for(let t=0,s=this._upper_sx.length;t<s;t++)e.lineTo(this._upper_sx[t],this._upper_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke())}}s.BandView=n,n.__name__=\"BandView\";class h extends _.Annotation{constructor(e){super(e)}static init_Band(){this.prototype.default_view=n,this.mixins([l.Line,l.Fill]),this.define({lower:[a.DistanceSpec],upper:[a.DistanceSpec],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,()=>new o.ColumnDataSource],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}}s.Band=h,h.__name__=\"Band\",h.init_Band()},\n",
" function _(t,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=t(1),n=t(31),o=t(14),l=s.__importStar(t(23)),a=s.__importStar(t(18)),r=t(88);e.EDGE_TOLERANCE=2.5;class h extends n.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.plot_view.request_paint(this)),this.connect(this.model.data_update,()=>this.plot_view.request_paint(this))}render(){if(!this.model.visible)return;if(null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom)return;const{frame:t}=this.plot_view,i=t.xscales[this.model.x_range_name],e=t.yscales[this.model.y_range_name],s=(t,i,e,s,n)=>{let o;return o=null!=t?this.model.screen?t:\"data\"==i?e.compute(t):s.compute(t):n,o};this.sleft=s(this.model.left,this.model.left_units,i,t.xview,t._left.value),this.sright=s(this.model.right,this.model.right_units,i,t.xview,t._right.value),this.stop=s(this.model.top,this.model.top_units,e,t.yview,t._top.value),this.sbottom=s(this.model.bottom,this.model.bottom_units,e,t.yview,t._bottom.value),this._paint_box(this.sleft,this.sright,this.sbottom,this.stop)}_paint_box(t,i,e,s){const{ctx:n}=this.layer;n.save(),n.beginPath(),n.rect(t,s,i-t,e-s),this.visuals.fill.doit&&(this.visuals.fill.set_value(n),n.fill()),this.visuals.line.doit&&(this.visuals.line.set_value(n),n.stroke()),n.restore()}interactive_bbox(){const t=this.model.properties.line_width.value()+e.EDGE_TOLERANCE;return new r.BBox({x0:this.sleft-t,y0:this.stop-t,x1:this.sright+t,y1:this.sbottom+t})}interactive_hit(t,i){if(null==this.model.in_cursor)return!1;return this.interactive_bbox().contains(t,i)}cursor(t,i){return Math.abs(t-this.sleft)<3||Math.abs(t-this.sright)<3?this.model.ew_cursor:Math.abs(i-this.sbottom)<3||Math.abs(i-this.stop)<3?this.model.ns_cursor:t>this.sleft&&t<this.sright&&i>this.stop&&i<this.sbottom?this.model.in_cursor:null}}e.BoxAnnotationView=h,h.__name__=\"BoxAnnotationView\";class _ extends n.Annotation{constructor(t){super(t)}static init_BoxAnnotation(){this.prototype.default_view=h,this.mixins([l.Line,l.Fill]),this.define({render_mode:[a.RenderMode,\"canvas\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],top:[a.Number,null],top_units:[a.SpatialUnits,\"data\"],bottom:[a.Number,null],bottom_units:[a.SpatialUnits,\"data\"],left:[a.Number,null],left_units:[a.SpatialUnits,\"data\"],right:[a.Number,null],right_units:[a.SpatialUnits,\"data\"]}),this.internal({screen:[a.Boolean,!1],ew_cursor:[a.String,null],ns_cursor:[a.String,null],in_cursor:[a.String,null]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}initialize(){super.initialize(),this.data_update=new o.Signal0(this,\"data_update\")}update({left:t,right:i,top:e,bottom:s}){this.setv({left:t,right:i,top:e,bottom:s,screen:!0},{silent:!0}),this.data_update.emit()}}e.BoxAnnotation=_,_.__name__=\"BoxAnnotation\",_.init_BoxAnnotation()},\n",
" function _(e,c,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(110);class r extends i.AdaptiveTicker{constructor(e){super(e)}}s.BasicTicker=r,r.__name__=\"BasicTicker\"},\n",
" function _(t,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const n=t(1),r=t(112),s=n.__importStar(t(18)),o=t(9);class _ extends r.Ticker{constructor(t){super(t)}static init_ContinuousTicker(){this.define({num_minor_ticks:[s.Number,5],desired_num_ticks:[s.Number,6]})}get_ticks(t,i,e,n,r){return this.get_ticks_no_defaults(t,i,n,this.desired_num_ticks)}get_ticks_no_defaults(t,i,e,n){const r=this.get_interval(t,i,n),s=Math.floor(t/r),_=Math.ceil(i/r);let c;c=isNaN(s)||isNaN(_)?[]:o.range(s,_+1);const u=c.map(t=>t*r).filter(e=>t<=e&&e<=i),a=this.num_minor_ticks,l=[];if(a>0&&u.length>0){const e=r/a,n=o.range(0,a).map(t=>t*e);for(const e of n.slice(1)){const n=u[0]-e;t<=n&&n<=i&&l.push(n)}for(const e of u)for(const r of n){const n=e+r;t<=n&&n<=i&&l.push(n)}}return{major:u,minor:l}}get_min_interval(){return this.min_interval}get_max_interval(){return null!=this.max_interval?this.max_interval:1/0}get_ideal_interval(t,i,e){return(i-t)/e}}e.ContinuousTicker=_,_.__name__=\"ContinuousTicker\",_.init_ContinuousTicker()},\n",
" function _(e,c,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(71);class r extends o.Model{constructor(e){super(e)}}n.Ticker=r,r.__name__=\"Ticker\"},\n",
" function _(i,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const r=i(1),s=i(114),n=r.__importStar(i(18));class o extends s.TickFormatter{constructor(i){super(i),this.last_precision=3}static init_BasicTickFormatter(){this.define({precision:[n.Any,\"auto\"],use_scientific:[n.Boolean,!0],power_limit_high:[n.Number,5],power_limit_low:[n.Number,-3]})}get scientific_limit_low(){return 10**this.power_limit_low}get scientific_limit_high(){return 10**this.power_limit_high}_need_sci(i){if(!this.use_scientific)return!1;const{scientific_limit_high:t}=this,{scientific_limit_low:e}=this,r=i.length<2?0:Math.abs(i[1]-i[0])/1e4;for(const s of i){const i=Math.abs(s);if(!(i<=r)&&(i>=t||i<=e))return!0}return!1}_format_with_precision(i,t,e){const r=new Array(i.length);if(t)for(let t=0,s=i.length;t<s;t++)r[t]=i[t].toExponential(e);else for(let t=0,s=i.length;t<s;t++)r[t]=i[t].toFixed(e).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return r}_auto_precision(i,t){const e=new Array(i.length),r=this.last_precision<=15;i:for(let s=this.last_precision;r?s<=15:s>=1;r?s++:s--){if(t){e[0]=i[0].toExponential(s);for(let t=1;t<i.length;t++)if(e[t]==e[t-1])continue i;this.last_precision=s;break}e[0]=i[0].toFixed(s).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");for(let t=1;t<i.length;t++)if(e[t]=i[t].toFixed(s).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),e[t]==e[t-1])continue i;this.last_precision=s;break}return this.last_precision}doFormat(i,t){if(0==i.length)return[];const e=this._need_sci(i),r=\"auto\"==this.precision?this._auto_precision(i,e):this.precision;return this._format_with_precision(i,e,r)}}e.BasicTickFormatter=o,o.__name__=\"BasicTickFormatter\",o.init_BasicTickFormatter()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const r=e(71);class c extends r.Model{constructor(e){super(e)}}o.TickFormatter=c,c.__name__=\"TickFormatter\"},\n",
" function _(o,n,l){Object.defineProperty(l,\"__esModule\",{value:!0});const e=o(116),t=o(12);class i extends e.ContinuousColorMapper{constructor(o){super(o)}_v_compute(o,n,l,e){const{nan_color:i,low_color:r,high_color:s}=e,c=null!=this.low?this.low:t.min(o),h=null!=this.high?this.high:t.max(o),u=l.length-1,a=1/(h-c),_=1/l.length;for(let e=0,t=o.length;e<t;e++){const t=o[e];if(isNaN(t)){n[e]=i;continue}if(t==h){n[e]=l[u];continue}const p=(t-c)*a,f=Math.floor(p/_);n[e]=f<0?null!=r?r:l[0]:f>u?null!=s?s:l[u]:l[f]}}}l.LinearColorMapper=i,i.__name__=\"LinearColorMapper\"},\n",
" function _(o,r,l){Object.defineProperty(l,\"__esModule\",{value:!0});const i=o(1),t=o(117),e=i.__importStar(o(18));class s extends t.ColorMapper{constructor(o){super(o)}static init_ContinuousColorMapper(){this.define({high:[e.Number],low:[e.Number],high_color:[e.Color],low_color:[e.Color]})}_colors(o){return Object.assign(Object.assign({},super._colors(o)),{low_color:null!=this.low_color?o(this.low_color):void 0,high_color:null!=this.high_color?o(this.high_color):void 0})}}l.ContinuousColorMapper=s,s.__name__=\"ContinuousColorMapper\",s.init_ContinuousColorMapper()},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const n=t(1),o=t(118),_=n.__importStar(t(18)),i=t(8),l=t(20),c=t(28);function a(t){return i.isNumber(t)?t:(\"#\"!=t[0]&&(t=l.color2hex(t)),9!=t.length&&(t+=\"ff\"),parseInt(t.slice(1),16))}function s(t){const e=new Uint32Array(t.length);for(let r=0,n=t.length;r<n;r++)e[r]=a(t[r]);return e}function p(t){if(c.is_little_endian){const e=new DataView(t.buffer);for(let r=0,n=t.length;r<n;r++)e.setUint32(4*r,t[r])}return new Uint8Array(t.buffer)}r._convert_color=a,r._convert_palette=s,r._uint32_to_rgba=p;class u extends o.Mapper{constructor(t){super(t)}static init_ColorMapper(){this.define({palette:[_.Any],nan_color:[_.Color,\"gray\"]})}v_compute(t){const e=new Array(t.length);return this._v_compute(t,e,this.palette,this._colors(t=>t)),e}get rgba_mapper(){const t=this,e=s(this.palette),r=this._colors(a);return{v_compute(n){const o=new Uint32Array(n.length);return t._v_compute(n,o,e,r),p(o)}}}_colors(t){return{nan_color:t(this.nan_color)}}}r.ColorMapper=u,u.__name__=\"ColorMapper\",u.init_ColorMapper()},\n",
" function _(e,r,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(119);class s extends o.Transform{constructor(e){super(e)}compute(e){throw new Error(\"mapping single values is not supported\")}}n.Mapper=s,s.__name__=\"Mapper\"},\n",
" function _(e,n,o){Object.defineProperty(o,\"__esModule\",{value:!0});const r=e(71);class s extends r.Model{constructor(e){super(e)}}o.Transform=s,s.__name__=\"Transform\"},\n",
" function _(e,n,o){Object.defineProperty(o,\"__esModule\",{value:!0});const c=e(122);class s extends c.Scale{constructor(e){super(e)}}o.ContinuousScale=s,s.__name__=\"ContinuousScale\"},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const n=t(1),_=t(123),s=n.__importStar(t(18));class i extends _.Transform{constructor(t){super(t)}static init_Scale(){this.internal({source_range:[s.Any],target_range:[s.Any]})}r_compute(t,e){return this.target_range.is_reversed?[this.compute(e),this.compute(t)]:[this.compute(t),this.compute(e)]}r_invert(t,e){return this.target_range.is_reversed?[this.invert(e),this.invert(t)]:[this.invert(t),this.invert(e)]}_linear_compute(t){const[e,r]=this._linear_compute_state();return e*t+r}_linear_v_compute(t){const[e,r]=this._linear_compute_state(),n=new Float64Array(t.length);for(let _=0;_<t.length;_++)n[_]=e*t[_]+r;return n}_linear_invert(t){const[e,r]=this._linear_compute_state();return(t-r)/e}_linear_v_invert(t){const[e,r]=this._linear_compute_state(),n=new Float64Array(t.length);for(let _=0;_<t.length;_++)n[_]=(t[_]-r)/e;return n}_linear_compute_state(){const t=this.source_range.start,e=this.source_range.end,r=this.target_range.start,n=(this.target_range.end-r)/(e-t);return[n,-n*t+r]}}r.Scale=i,i.__name__=\"Scale\",i.init_Scale()},\n",
" function _(r,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});var e=r(124);t.CustomJSTransform=e.CustomJSTransform;var a=r(125);t.Dodge=a.Dodge;var n=r(126);t.Interpolator=n.Interpolator;var p=r(127);t.Jitter=p.Jitter;var l=r(128);t.LinearInterpolator=l.LinearInterpolator;var v=r(129);t.StepInterpolator=v.StepInterpolator;var s=r(119);t.Transform=s.Transform},\n",
" function _(t,r,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=t(1),e=t(119),a=n.__importStar(t(18)),o=t(17),u=t(24);class i extends e.Transform{constructor(t){super(t)}static init_CustomJSTransform(){this.define({args:[a.Any,{}],func:[a.String,\"\"],v_func:[a.String,\"\"]})}get names(){return o.keys(this.args)}get values(){return o.values(this.args)}_make_transform(t,r){return new Function(...this.names,t,u.use_strict(r))}get scalar_transform(){return this._make_transform(\"x\",this.func)}get vector_transform(){return this._make_transform(\"xs\",this.v_func)}compute(t){return this.scalar_transform(...this.values,t)}v_compute(t){return this.vector_transform(...this.values,t)}}s.CustomJSTransform=i,i.__name__=\"CustomJSTransform\",i.init_CustomJSTransform()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const n=e(1),o=e(119),i=e(90),s=n.__importStar(e(18)),a=e(8);class c extends o.Transform{constructor(e){super(e)}static init_Dodge(){this.define({value:[s.Number,0],range:[s.Instance]})}v_compute(e){let t;if(this.range instanceof i.FactorRange)t=this.range.v_synthetic(e);else{if(!a.isArrayableOf(e,a.isNumber))throw new Error(\"unexpected\");t=e}const r=new Float64Array(t.length);for(let e=0;e<t.length;e++){const n=t[e];r[e]=this._compute(n)}return r}compute(e){if(this.range instanceof i.FactorRange)return this._compute(this.range.synthetic(e));if(a.isNumber(e))return this._compute(e);throw new Error(\"unexpected\")}_compute(e){return e+this.value}}r.Dodge=c,c.__name__=\"Dodge\",c.init_Dodge()},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const s=t(1),o=t(119),n=s.__importStar(t(18)),i=t(9),a=t(8);class h extends o.Transform{constructor(t){super(t),this._sorted_dirty=!0}static init_Interpolator(){this.define({x:[n.Any],y:[n.Any],data:[n.Any],clip:[n.Boolean,!0]})}connect_signals(){super.connect_signals(),this.connect(this.change,()=>this._sorted_dirty=!0)}v_compute(t){const e=new Float64Array(t.length);for(let r=0;r<t.length;r++){const s=t[r];e[r]=this.compute(s)}return e}sort(t=!1){if(!this._sorted_dirty)return;let e,r;if(a.isString(this.x)&&a.isString(this.y)&&null!=this.data){const t=this.data.columns();if(!i.includes(t,this.x))throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");if(!i.includes(t,this.y))throw new Error(\"The y parameter does not correspond to a valid column name defined in the data parameter\");e=this.data.get_column(this.x),r=this.data.get_column(this.y)}else{if(!a.isArray(this.x)||!a.isArray(this.y))throw new Error(\"parameters 'x' and 'y' must be both either string fields or arrays\");e=this.x,r=this.y}if(e.length!==r.length)throw new Error(\"The length for x and y do not match\");if(e.length<2)throw new Error(\"x and y must have at least two elements to support interpolation\");const s=[];for(const t in e)s.push({x:e[t],y:r[t]});t?s.sort((t,e)=>t.x>e.x?-1:t.x==e.x?0:1):s.sort((t,e)=>t.x<e.x?-1:t.x==e.x?0:1),this._x_sorted=[],this._y_sorted=[];for(const{x:t,y:e}of s)this._x_sorted.push(t),this._y_sorted.push(e);this._sorted_dirty=!1}}r.Interpolator=h,h.__name__=\"Interpolator\",h.init_Interpolator()},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=t(1),n=t(119),s=t(90),o=t(8),u=i.__importStar(t(18)),a=i.__importStar(t(10));class h extends n.Transform{constructor(t){super(t)}static init_Jitter(){this.define({mean:[u.Number,0],width:[u.Number,1],distribution:[u.Distribution,\"uniform\"],range:[u.Instance]}),this.internal({previous_values:[u.Array]})}v_compute(t){if(null!=this.previous_values&&this.previous_values.length==t.length)return this.previous_values;let e;if(this.range instanceof s.FactorRange)e=this.range.v_synthetic(t);else{if(!o.isArrayableOf(t,o.isNumber))throw new Error(\"unexpected\");e=t}const r=new Float64Array(e.length);for(let t=0;t<e.length;t++){const i=e[t];r[t]=this._compute(i)}return this.previous_values=r,r}compute(t){if(this.range instanceof s.FactorRange)return this._compute(this.range.synthetic(t));if(o.isNumber(t))return this._compute(t);throw new Error(\"unexpected\")}_compute(t){switch(this.distribution){case\"uniform\":return t+this.mean+(a.random()-.5)*this.width;case\"normal\":return t+a.rnorm(this.mean,this.width)}}}r.Jitter=h,h.__name__=\"Jitter\",h.init_Jitter()},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const _=t(9),r=t(126);class o extends r.Interpolator{constructor(t){super(t)}compute(t){if(this.sort(!1),this.clip){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(t==this._x_sorted[0])return this._y_sorted[0];const s=_.find_last_index(this._x_sorted,s=>s<t),e=this._x_sorted[s],r=this._x_sorted[s+1],o=this._y_sorted[s],i=this._y_sorted[s+1];return o+(t-e)/(r-e)*(i-o)}}e.LinearInterpolator=o,o.__name__=\"LinearInterpolator\"},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const s=t(1),o=t(126),_=s.__importStar(t(18)),i=t(9);class n extends o.Interpolator{constructor(t){super(t)}static init_StepInterpolator(){this.define({mode:[_.StepMode,\"after\"]})}compute(t){if(this.sort(!1),this.clip){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}let e;switch(this.mode){case\"after\":e=i.find_last_index(this._x_sorted,e=>t>=e);break;case\"before\":e=i.find_index(this._x_sorted,e=>t<=e);break;case\"center\":{const r=this._x_sorted.map(e=>Math.abs(e-t)),s=i.min(r);e=i.find_index(r,t=>s===t);break}default:throw new Error(\"unknown mode: \"+this.mode)}return-1!=e?this._y_sorted[e]:NaN}}r.StepInterpolator=n,n.__name__=\"StepInterpolator\",n.init_StepInterpolator()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),a=e(134),l=e(68),n=s.__importStar(e(23)),o=s.__importStar(e(18));class _ extends a.TextAnnotationView{initialize(){super.initialize(),this.visuals.warm_cache()}_get_size(){const{ctx:e}=this.layer;this.visuals.text.set_value(e);const{width:t,ascent:i}=e.measureText(this.model.text);return{width:t,height:i}}render(){if(this.model.visible||\"css\"!=this.model.render_mode||l.undisplay(this.el),!this.model.visible)return;let e;switch(this.model.angle_units){case\"rad\":e=-this.model.angle;break;case\"deg\":e=-this.model.angle*Math.PI/180}const t=null!=this.panel?this.panel:this.plot_view.frame,i=this.plot_view.frame.xscales[this.model.x_range_name],s=this.plot_view.frame.yscales[this.model.y_range_name];let a=\"data\"==this.model.x_units?i.compute(this.model.x):t.xview.compute(this.model.x),n=\"data\"==this.model.y_units?s.compute(this.model.y):t.yview.compute(this.model.y);a+=this.model.x_offset,n-=this.model.y_offset,(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,this.model.text,a,n,e)}}i.LabelView=_,_.__name__=\"LabelView\";class r extends a.TextAnnotation{constructor(e){super(e)}static init_Label(){this.prototype.default_view=_,this.mixins([n.Text,[\"border_\",n.Line],[\"background_\",n.Fill]]),this.define({x:[o.Number],x_units:[o.SpatialUnits,\"data\"],y:[o.Number],y_units:[o.SpatialUnits,\"data\"],text:[o.String],angle:[o.Angle,0],angle_units:[o.AngleUnits,\"rad\"],x_offset:[o.Number,0],y_offset:[o.Number,0],x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"]}),this.override({background_fill_color:null,border_line_color:null})}}i.Label=r,r.__name__=\"Label\",r.init_Label()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),l=e(31),a=e(68),n=i.__importStar(e(18)),o=e(132),r=e(11);class _ extends l.AnnotationView{constructor(){super(...arguments),this.rotate=!0}initialize(){super.initialize(),\"css\"==this.model.render_mode&&this.plot_view.canvas_view.add_overlay(this.el)}connect_signals(){super.connect_signals(),\"css\"==this.model.render_mode?this.connect(this.model.change,()=>this.render()):this.connect(this.model.change,()=>this.plot_view.request_render())}_calculate_text_dimensions(e,t){const{width:s}=e.measureText(t),{height:i}=o.measure_font(this.visuals.text.font_value());return[s,i]}_calculate_bounding_box_dimensions(e,t){const[s,i]=this._calculate_text_dimensions(e,t);let l,a;switch(e.textAlign){case\"left\":l=0;break;case\"center\":l=-s/2;break;case\"right\":l=-s;break;default:r.unreachable()}switch(e.textBaseline){case\"top\":a=0;break;case\"middle\":a=-.5*i;break;case\"bottom\":a=-1*i;break;case\"alphabetic\":a=-.8*i;break;case\"hanging\":a=-.17*i;break;case\"ideographic\":a=-.83*i;break;default:r.unreachable()}return[l,a,s,i]}_canvas_text(e,t,s,i,l){this.visuals.text.set_value(e);const a=this._calculate_bounding_box_dimensions(e,t);e.save(),e.beginPath(),e.translate(s,i),l&&e.rotate(l),e.rect(a[0],a[1],a[2],a[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(e),e.fillText(t,0,0)),e.restore()}_css_text(e,t,s,i,l){a.undisplay(this.el),this.visuals.text.set_value(e);const n=this._calculate_bounding_box_dimensions(e,t),o=this.visuals.border_line.line_dash.value().length<2?\"solid\":\"dashed\";this.visuals.border_line.set_value(e),this.visuals.background_fill.set_value(e),this.el.style.position=\"absolute\",this.el.style.left=s+n[0]+\"px\",this.el.style.top=i+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\",l&&(this.el.style.transform=`rotate(${l}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=\"\"+o,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=t,a.display(this.el)}}s.TextAnnotationView=_,_.__name__=\"TextAnnotationView\";class h extends l.Annotation{constructor(e){super(e)}static init_TextAnnotation(){this.define({render_mode:[n.RenderMode,\"canvas\"]})}}s.TextAnnotation=h,h.__name__=\"TextAnnotation\",h.init_TextAnnotation()},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),l=t(134),o=t(76),a=i.__importStar(t(23)),n=t(68),r=i.__importStar(t(18));class _ extends l.TextAnnotationView{initialize(){if(super.initialize(),this.set_data(this.model.source),\"css\"==this.model.render_mode)for(let t=0,e=this._text.length;t<e;t++){const t=n.div({style:{display:\"none\"}});this.el.appendChild(t)}}connect_signals(){super.connect_signals(),\"css\"==this.model.render_mode?(this.connect(this.model.change,()=>{this.set_data(this.model.source),this.render()}),this.connect(this.model.source.streaming,()=>{this.set_data(this.model.source),this.render()}),this.connect(this.model.source.patching,()=>{this.set_data(this.model.source),this.render()}),this.connect(this.model.source.change,()=>{this.set_data(this.model.source),this.render()})):(this.connect(this.model.change,()=>{this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.streaming,()=>{this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.patching,()=>{this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.change,()=>{this.set_data(this.model.source),this.plot_view.request_render()}))}set_data(t){super.set_data(t),this.visuals.warm_cache(t)}_map_data(){const t=this.plot_view.frame.xscales[this.model.x_range_name],e=this.plot_view.frame.yscales[this.model.y_range_name],s=null!=this.panel?this.panel:this.plot_view.frame;return[\"data\"==this.model.x_units?t.v_compute(this._x):s.xview.v_compute(this._x),\"data\"==this.model.y_units?e.v_compute(this._y):s.yview.v_compute(this._y)]}render(){if(this.model.visible||\"css\"!=this.model.render_mode||n.undisplay(this.el),!this.model.visible)return;const t=\"canvas\"==this.model.render_mode?this._v_canvas_text.bind(this):this._v_css_text.bind(this),{ctx:e}=this.layer,[s,i]=this._map_data();for(let l=0,o=this._text.length;l<o;l++)t(e,l,this._text[l],s[l]+this._x_offset[l],i[l]-this._y_offset[l],this._angle[l])}_get_size(){const{ctx:t}=this.layer;this.visuals.text.set_value(t);const{width:e,ascent:s}=t.measureText(this._text[0]);return{width:e,height:s}}_v_canvas_text(t,e,s,i,l,o){this.visuals.text.set_vectorize(t,e);const a=this._calculate_bounding_box_dimensions(t,s);t.save(),t.beginPath(),t.translate(i,l),t.rotate(o),t.rect(a[0],a[1],a[2],a[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(s,0,0)),t.restore()}_v_css_text(t,e,s,i,l,o){const a=this.el.children[e];a.textContent=s,this.visuals.text.set_vectorize(t,e);const r=this._calculate_bounding_box_dimensions(t,s),_=this.visuals.border_line.line_dash.value().length<2?\"solid\":\"dashed\";this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),a.style.position=\"absolute\",a.style.left=i+r[0]+\"px\",a.style.top=l+r[1]+\"px\",a.style.color=\"\"+this.visuals.text.text_color.value(),a.style.opacity=\"\"+this.visuals.text.text_alpha.value(),a.style.font=\"\"+this.visuals.text.font_value(),a.style.lineHeight=\"normal\",o&&(a.style.transform=`rotate(${o}rad)`),this.visuals.background_fill.doit&&(a.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(a.style.borderStyle=\"\"+_,a.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",a.style.borderColor=\"\"+this.visuals.border_line.color_value()),n.display(a)}}s.LabelSetView=_,_.__name__=\"LabelSetView\";class h extends l.TextAnnotation{constructor(t){super(t)}static init_LabelSet(){this.prototype.default_view=_,this.mixins([a.TextVector,[\"border_\",a.LineVector],[\"background_\",a.FillVector]]),this.define({x:[r.NumberSpec],y:[r.NumberSpec],x_units:[r.SpatialUnits,\"data\"],y_units:[r.SpatialUnits,\"data\"],text:[r.StringSpec,{field:\"text\"}],angle:[r.AngleSpec,0],x_offset:[r.NumberSpec,{val
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(1),l=t(31),n=s.__importStar(t(23)),h=s.__importStar(t(18)),a=t(14),o=t(132),_=t(88),r=t(9),d=t(8),c=t(11);class g extends l.AnnotationView{cursor(t,e){return\"none\"==this.model.click_policy?null:\"pointer\"}get legend_padding(){return null!=this.visuals.border_line.line_color.value()?this.model.padding:0}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.plot_view.request_render()),this.connect(this.model.item_change,()=>this.plot_view.request_render())}compute_legend_bbox(){const t=this.model.get_legend_names(),{glyph_height:e,glyph_width:i}=this.model,{label_height:s,label_width:l}=this.model;this.max_label_height=r.max([o.measure_font(this.visuals.label_text.font_value()).height,s,e]);const{ctx:n}=this.layer;n.save(),this.visuals.label_text.set_value(n),this.text_widths=new Map;for(const e of t)this.text_widths.set(e,r.max([n.measureText(e).width,l]));this.visuals.title_text.set_value(n),this.title_height=this.model.title?o.measure_font(this.visuals.title_text.font_value()).height+this.model.title_standoff:0,this.title_width=this.model.title?n.measureText(this.model.title).width:0,n.restore();const h=Math.max(r.max([...this.text_widths.values()]),0),a=this.model.margin,{legend_padding:g}=this,m=this.model.spacing,{label_standoff:b}=this.model;let u,f;if(\"vertical\"==this.model.orientation)u=t.length*this.max_label_height+Math.max(t.length-1,0)*m+2*g+this.title_height,f=r.max([h+i+b+2*g,this.title_width+2*g]);else{let e=2*g+Math.max(t.length-1,0)*m;for(const[,t]of this.text_widths)e+=r.max([t,l])+i+b;f=r.max([this.title_width+2*g,e]),u=this.max_label_height+this.title_height+2*g}const x=null!=this.panel?this.panel:this.plot_view.frame,[p,v]=x.bbox.ranges,{location:w}=this.model;let y,k;if(d.isString(w))switch(w){case\"top_left\":y=p.start+a,k=v.start+a;break;case\"top_center\":y=(p.end+p.start)/2-f/2,k=v.start+a;break;case\"top_right\":y=p.end-a-f,k=v.start+a;break;case\"bottom_right\":y=p.end-a-f,k=v.end-a-u;break;case\"bottom_center\":y=(p.end+p.start)/2-f/2,k=v.end-a-u;break;case\"bottom_left\":y=p.start+a,k=v.end-a-u;break;case\"center_left\":y=p.start+a,k=(v.end+v.start)/2-u/2;break;case\"center\":y=(p.end+p.start)/2-f/2,k=(v.end+v.start)/2-u/2;break;case\"center_right\":y=p.end-a-f,k=(v.end+v.start)/2-u/2}else if(d.isArray(w)&&2==w.length){const[t,e]=w;y=x.xview.compute(t),k=x.yview.compute(e)-u}else c.unreachable();return new _.BBox({left:y,top:k,width:f,height:u})}interactive_bbox(){return this.compute_legend_bbox()}interactive_hit(t,e){return this.interactive_bbox().contains(t,e)}on_hit(t,e){let i;const{glyph_width:s}=this.model,{legend_padding:l}=this,n=this.model.spacing,{label_standoff:h}=this.model;let a=i=l;const o=this.compute_legend_bbox(),r=\"vertical\"==this.model.orientation;for(const d of this.model.items){const c=d.get_labels_list_from_label_prop();for(const g of c){const c=o.x+a,m=o.y+i+this.title_height;let b,u;if([b,u]=r?[o.width-2*l,this.max_label_height]:[this.text_widths.get(g)+s+h,this.max_label_height],new _.BBox({left:c,top:m,width:b,height:u}).contains(t,e)){switch(this.model.click_policy){case\"hide\":for(const t of d.renderers)t.visible=!t.visible;break;case\"mute\":for(const t of d.renderers)t.muted=!t.muted}return!0}r?i+=this.max_label_height+n:a+=this.text_widths.get(g)+s+h+n}}return!1}render(){if(!this.model.visible)return;if(0==this.model.items.length)return;for(const t of this.model.items)t.legend=this.model;const{ctx:t}=this.layer,e=this.compute_legend_bbox();t.save(),this._draw_legend_box(t,e),this._draw_legend_items(t,e),this.model.title&&this._draw_title(t,e),t.restore()}_draw_legend_box(t,e){t.beginPath(),t.rect(e.x,e.y,e.width,e.height),this.visuals.background_fill.set_value(t),t.fill(),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke())}_draw_legend_items(t,e){const{glyph_width:i,glyph_height:s}=this.model,{legend_padding:l}=this,n=this.model.spacing,{label_standoff:h}=this.model;let a=l,o=l;const _=\"vertical\"==this.m
" function _(e,r,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(1),l=e(71),i=e(77),s=e(138),_=t.__importStar(e(18)),o=e(72),a=e(9);class u extends l.Model{constructor(e){super(e)}static init_LegendItem(){this.define({label:[_.StringSpec,null],renderers:[_.Array,[]],index:[_.Number,null]})}_check_data_sources_on_renderers(){if(null!=this.get_field_from_label_prop()){if(this.renderers.length<1)return!1;const e=this.renderers[0].data_source;if(null!=e)for(const r of this.renderers)if(r.data_source!=e)return!1}return!0}_check_field_label_on_data_source(){const e=this.get_field_from_label_prop();if(null!=e){if(this.renderers.length<1)return!1;const r=this.renderers[0].data_source;if(null!=r&&!a.includes(r.columns(),e))return!1}return!0}initialize(){super.initialize(),this.legend=null,this.connect(this.change,()=>{null!=this.legend&&this.legend.item_change.emit()}),this._check_data_sources_on_renderers()||o.logger.error(\"Non matching data sources on legend item renderers\"),this._check_field_label_on_data_source()||o.logger.error(\"Bad column name on label: \"+this.label)}get_field_from_label_prop(){const{label:e}=this;return s.isField(e)?e.field:null}get_labels_list_from_label_prop(){if(s.isValue(this.label)){const{value:e}=this.label;return null!=e?[e]:[]}const e=this.get_field_from_label_prop();if(null!=e){let r;if(!this.renderers[0]||null==this.renderers[0].data_source)return[\"No source found\"];if(r=this.renderers[0].data_source,r instanceof i.ColumnarDataSource){const n=r.get_column(e);return null!=n?a.uniq(Array.from(n)):[\"Invalid field\"]}}return[]}}n.LegendItem=u,u.__name__=\"LegendItem\",u.init_LegendItem()},\n",
" function _(e,i,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(8);n.isValue=function(e){return t.isPlainObject(e)&&\"value\"in e},n.isField=function(e){return t.isPlainObject(e)&&\"field\"in e}},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=t(1),s=t(31),l=n.__importStar(t(23)),o=t(14),a=n.__importStar(t(18));class r extends s.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.plot_view.request_render()),this.connect(this.model.data_update,()=>this.plot_view.request_render())}render(){if(!this.model.visible)return;const{xs:t,ys:e}=this.model;if(t.length!=e.length)return;if(t.length<3||e.length<3)return;const{frame:i}=this.plot_view,{ctx:n}=this.layer;for(let s=0,l=t.length;s<l;s++){let l,o;if(\"screen\"!=this.model.xs_units)throw new Error(\"not implemented\");if(l=this.model.screen?t[s]:i.xview.compute(t[s]),\"screen\"!=this.model.ys_units)throw new Error(\"not implemented\");o=this.model.screen?e[s]:i.yview.compute(e[s]),0==s?(n.beginPath(),n.moveTo(l,o)):n.lineTo(l,o)}n.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(n),n.stroke()),this.visuals.fill.doit&&(this.visuals.fill.set_value(n),n.fill())}}i.PolyAnnotationView=r,r.__name__=\"PolyAnnotationView\";class _ extends s.Annotation{constructor(t){super(t)}static init_PolyAnnotation(){this.prototype.default_view=r,this.mixins([l.Line,l.Fill]),this.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\"]}),this.internal({screen:[a.Boolean,!1]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})}initialize(){super.initialize(),this.data_update=new o.Signal0(this,\"data_update\")}update({xs:t,ys:e}){this.setv({xs:t,ys:e,screen:!0},{silent:!0}),this.data_update.emit()}}i.PolyAnnotation=_,_.__name__=\"PolyAnnotation\",_.init_PolyAnnotation()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(31),l=n.__importStar(e(23)),o=n.__importStar(e(18));class r extends s.AnnotationView{initialize(){super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.plot_view.request_render())}render(){this.model.visible&&this._draw_slope()}_draw_slope(){const e=this.model.gradient,t=this.model.y_intercept;if(null==e||null==t)return;const{frame:i}=this.plot_view,n=i.xscales[this.model.x_range_name],s=i.yscales[this.model.y_range_name],l=i._top.value,o=l+i._height.value,r=(s.invert(l)-t)/e,a=(s.invert(o)-t)/e,_=n.compute(r),c=n.compute(a),{ctx:u}=this.layer;u.save(),u.beginPath(),this.visuals.line.set_value(u),u.moveTo(_,l),u.lineTo(c,o),u.stroke(),u.restore()}}i.SlopeView=r,r.__name__=\"SlopeView\";class a extends s.Annotation{constructor(e){super(e)}static init_Slope(){this.prototype.default_view=r,this.mixins(l.Line),this.define({gradient:[o.Number,null],y_intercept:[o.Number,null],x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"]}),this.override({line_color:\"black\"})}}i.Slope=a,a.__name__=\"Slope\",a.init_Slope()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),o=e(31),s=n.__importStar(e(23)),a=n.__importStar(e(18));class l extends o.AnnotationView{connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.plot_view.request_paint(this))}render(){if(!this.model.visible)return;const{location:e}=this.model;if(null==e)return;const{frame:t}=this.plot_view,i=t.xscales[this.model.x_range_name],n=t.yscales[this.model.y_range_name],o=(t,i)=>\"data\"==this.model.location_units?t.compute(e):this.model.for_hover?e:i.compute(e);let s,a,l,r;\"width\"==this.model.dimension?(l=o(n,t.yview),a=t._left.value,r=t._width.value,s=this.model.properties.line_width.value()):(l=t._top.value,a=o(i,t.xview),r=this.model.properties.line_width.value(),s=t._height.value);const{ctx:_}=this.layer;_.save(),_.beginPath(),this.visuals.line.set_value(_),_.moveTo(a,l),\"width\"==this.model.dimension?_.lineTo(a+r,l):_.lineTo(a,l+s),_.stroke(),_.restore()}}i.SpanView=l,l.__name__=\"SpanView\";class r extends o.Annotation{constructor(e){super(e)}static init_Span(){this.prototype.default_view=l,this.mixins(s.Line),this.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\"]}),this.override({line_color:\"black\"}),this.internal({for_hover:[a.Boolean,!1]})}}i.Span=r,r.__name__=\"Span\",r.init_Span()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const l=e(1),a=e(134),s=e(68),n=e(70),o=l.__importStar(e(23)),r=l.__importStar(e(18));class _ extends a.TextAnnotationView{initialize(){super.initialize(),this.visuals.text=new n.Text(this.model)}_get_location(){const e=this.panel,t=this.model.offset;let i,l;switch(e.side){case\"above\":case\"below\":switch(this.model.vertical_align){case\"top\":l=e._top.value+5;break;case\"middle\":l=e._vcenter.value;break;case\"bottom\":l=e._bottom.value-5}switch(this.model.align){case\"left\":i=e._left.value+t;break;case\"center\":i=e._hcenter.value;break;case\"right\":i=e._right.value-t}break;case\"left\":switch(this.model.vertical_align){case\"top\":i=e._left.value-5;break;case\"middle\":i=e._hcenter.value;break;case\"bottom\":i=e._right.value+5}switch(this.model.align){case\"left\":l=e._bottom.value-t;break;case\"center\":l=e._vcenter.value;break;case\"right\":l=e._top.value+t}break;case\"right\":switch(this.model.vertical_align){case\"top\":i=e._right.value-5;break;case\"middle\":i=e._hcenter.value;break;case\"bottom\":i=e._left.value+5}switch(this.model.align){case\"left\":l=e._top.value+t;break;case\"center\":l=e._vcenter.value;break;case\"right\":l=e._bottom.value-t}}return[i,l]}render(){if(!this.model.visible)return void(\"css\"==this.model.render_mode&&s.undisplay(this.el));const{text:e}=this.model;if(null==e||0==e.length)return;this.model.text_baseline=this.model.vertical_align,this.model.text_align=this.model.align;const[t,i]=this._get_location(),l=this.panel.get_label_angle_heuristic(\"parallel\");(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,e,t,i,l)}_get_size(){const{text:e}=this.model;if(null==e||0==e.length)return{width:0,height:0};{this.visuals.text.set_value(this.layer.ctx);const{width:t,ascent:i}=this.layer.ctx.measureText(e);return{width:t,height:i*this.visuals.text.text_line_height.value()+10}}}}i.TitleView=_,_.__name__=\"TitleView\";class c extends a.TextAnnotation{constructor(e){super(e)}static init_Title(){this.prototype.default_view=_,this.mixins([[\"border_\",o.Line],[\"background_\",o.Fill]]),this.define({text:[r.String],text_font:[r.Font,\"helvetica\"],text_font_size:[r.StringSpec,\"13px\"],text_font_style:[r.FontStyle,\"bold\"],text_color:[r.ColorSpec,\"#444444\"],text_alpha:[r.NumberSpec,1],text_line_height:[r.Number,1],vertical_align:[r.VerticalAlign,\"bottom\"],align:[r.TextAlign,\"left\"],offset:[r.Number,0]}),this.override({background_fill_color:null,border_line_color:null}),this.internal({text_align:[r.TextAlign,\"left\"],text_baseline:[r.TextBaseline,\"bottom\"]})}}i.Title=c,c.__name__=\"Title\",c.init_Title()},\n",
" function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(1),l=e(31),s=e(99),a=e(68),n=o.__importStar(e(18));class r extends l.AnnotationView{constructor(){super(...arguments),this.rotate=!0}initialize(){super.initialize(),this.plot_view.canvas_view.add_event(this.el)}async lazy_initialize(){this._toolbar_view=await s.build_view(this.model.toolbar,{parent:this}),this.plot_view.visibility_callbacks.push(e=>this._toolbar_view.set_visibility(e))}remove(){this._toolbar_view.remove(),super.remove()}render(){super.render(),this.model.visible?(this.el.style.position=\"absolute\",this.el.style.overflow=\"hidden\",a.position(this.el,this.panel.bbox),this._toolbar_view.render(),a.empty(this.el),this.el.appendChild(this._toolbar_view.el),a.display(this.el)):a.undisplay(this.el)}_get_size(){const{tools:e,logo:i}=this.model.toolbar;return{width:30*e.length+(null!=i?25:0),height:30}}}t.ToolbarPanelView=r,r.__name__=\"ToolbarPanelView\";class _ extends l.Annotation{constructor(e){super(e)}static init_ToolbarPanel(){this.prototype.default_view=r,this.define({toolbar:[n.Instance]})}}t.ToolbarPanel=_,_.__name__=\"ToolbarPanel\",_.init_ToolbarPanel()},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),l=t(31),o=t(68),a=i.__importStar(t(18)),h=t(145),n=t(146),r=i.__importDefault(t(147));function c(t,e,s,i,l){switch(t){case\"horizontal\":return e<i?\"right\":\"left\";case\"vertical\":return s<l?\"below\":\"above\";default:return t}}s.compute_side=c;class d extends l.AnnotationView{initialize(){super.initialize(),this.plot_view.canvas_view.add_overlay(this.el),o.undisplay(this.el)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,()=>this._draw_tips())}styles(){return[...super.styles(),r.default]}css_classes(){return super.css_classes().concat(h.bk_tooltip)}render(){this.model.visible&&this._draw_tips()}_draw_tips(){const{data:t}=this.model;if(o.empty(this.el),o.undisplay(this.el),this.model.custom?this.el.classList.add(h.bk_tooltip_custom):this.el.classList.remove(h.bk_tooltip_custom),0==t.length)return;const{frame:e}=this.plot_view;for(const[s,i,l]of t){if(this.model.inner_only&&!e.bbox.contains(s,i))continue;const t=o.div({},l);this.el.appendChild(t)}const[s,i]=t[t.length-1],l=c(this.model.attachment,s,i,e._hcenter.value,e._vcenter.value);this.el.classList.remove(n.bk_right),this.el.classList.remove(n.bk_left),this.el.classList.remove(n.bk_above),this.el.classList.remove(n.bk_below);let a;o.display(this.el);let r=0,d=0;switch(l){case\"right\":this.el.classList.add(n.bk_left),r=s+(this.el.offsetWidth-this.el.clientWidth)+10,a=i-this.el.offsetHeight/2;break;case\"left\":this.el.classList.add(n.bk_right),d=this.plot_view.layout.bbox.width-s+10,a=i-this.el.offsetHeight/2;break;case\"below\":this.el.classList.add(n.bk_above),a=i+(this.el.offsetHeight-this.el.clientHeight)+10,r=Math.round(s-this.el.offsetWidth/2);break;case\"above\":this.el.classList.add(n.bk_below),a=i-this.el.offsetHeight-10,r=Math.round(s-this.el.offsetWidth/2)}this.model.show_arrow&&this.el.classList.add(h.bk_tooltip_arrow),this.el.childNodes.length>0?(this.el.style.top=a+\"px\",this.el.style.left=r?r+\"px\":\"auto\",this.el.style.right=d?d+\"px\":\"auto\"):o.undisplay(this.el)}}s.TooltipView=d,d.__name__=\"TooltipView\";class _ extends l.Annotation{constructor(t){super(t)}static init_Tooltip(){this.prototype.default_view=d,this.define({attachment:[a.TooltipAttachment,\"horizontal\"],inner_only:[a.Boolean,!0],show_arrow:[a.Boolean,!0]}),this.override({level:\"overlay\"}),this.internal({data:[a.Any,[]],custom:[a.Any]})}clear(){this.data=[]}add(t,e,s){this.data=this.data.concat([[t,e,s]])}}s.Tooltip=_,_.__name__=\"Tooltip\",_.init_Tooltip()},\n",
" function _(o,t,l){Object.defineProperty(l,\"__esModule\",{value:!0}),l.bk_tooltip=\"bk-tooltip\",l.bk_tooltip_arrow=\"bk-tooltip-arrow\",l.bk_tooltip_custom=\"bk-tooltip-custom\",l.bk_tooltip_row_label=\"bk-tooltip-row-label\",l.bk_tooltip_row_value=\"bk-tooltip-row-value\",l.bk_tooltip_color_block=\"bk-tooltip-color-block\"},\n",
" function _(e,b,k){Object.defineProperty(k,\"__esModule\",{value:!0}),k.bk_active=\"bk-active\",k.bk_inline=\"bk-inline\",k.bk_left=\"bk-left\",k.bk_right=\"bk-right\",k.bk_above=\"bk-above\",k.bk_below=\"bk-below\",k.bk_up=\"bk-up\",k.bk_down=\"bk-down\",k.bk_side=function(e){switch(e){case\"above\":return k.bk_above;case\"below\":return k.bk_below;case\"left\":return k.bk_left;case\"right\":return k.bk_right}}},\n",
" function _(e,r,d){Object.defineProperty(d,\"__esModule\",{value:!0});const i=e(65);class n extends i.RendererView{}d.GuideRendererView=n,n.__name__=\"GuideRendererView\";class t extends i.Renderer{constructor(e){super(e)}static init_GuideRenderer(){this.override({level:\"guide\"})}}d.GuideRenderer=t,t.__name__=\"GuideRenderer\",t.init_GuideRenderer()},\n",
" function _(t,c,e){Object.defineProperty(e,\"__esModule\",{value:!0});const o=t(112);class s extends o.Ticker{constructor(t){super(t)}get_ticks(t,c,e,o,s){return{major:this._collect(e.factors,e,t,c),minor:[],tops:this._collect(e.tops||[],e,t,c),mids:this._collect(e.mids||[],e,t,c)}}_collect(t,c,e,o){const s=[];for(const r of t){const t=c.synthetic(r);t>e&&t<o&&s.push(r)}return s}}e.CategoricalTicker=s,s.__name__=\"CategoricalTicker\"},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const o=e(114),c=e(9);class a extends o.TickFormatter{constructor(e){super(e)}doFormat(e,t){return c.copy(e)}}r.CategoricalTickFormatter=a,a.__name__=\"CategoricalTickFormatter\"},\n",
" function _(s,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=s(150);class t extends o.Axis{constructor(s){super(s)}}n.ContinuousAxis=t,t.__name__=\"ContinuousAxis\"},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(157),a=e(158),r=e(163);class n extends s.LinearAxisView{}i.DatetimeAxisView=n,n.__name__=\"DatetimeAxisView\";class _ extends s.LinearAxis{constructor(e){super(e)}static init_DatetimeAxis(){this.prototype.default_view=n,this.override({ticker:()=>new r.DatetimeTicker,formatter:()=>new a.DatetimeTickFormatter})}}i.DatetimeAxis=_,_.__name__=\"DatetimeAxis\",_.init_DatetimeAxis()},\n",
" function _(e,i,s){Object.defineProperty(s,\"__esModule\",{value:!0});const t=e(150),n=e(155),r=e(113),a=e(109);class _ extends t.AxisView{}s.LinearAxisView=_,_.__name__=\"LinearAxisView\";class c extends n.ContinuousAxis{constructor(e){super(e)}static init_LinearAxis(){this.prototype.default_view=_,this.override({ticker:()=>new a.BasicTicker,formatter:()=>new r.BasicTickFormatter})}}s.LinearAxis=c,c.__name__=\"LinearAxis\",c.init_LinearAxis()},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const r=t(1),i=r.__importDefault(t(159)),n=t(114),o=t(72),a=r.__importStar(t(18)),c=t(160),m=t(9),u=t(8);function h(t){return i.default(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(t=>parseInt(t,10))}function d(t,s){if(u.isFunction(s))return s(t);{const e=c.sprintf(\"$1%06d\",function(t){return Math.round(t/1e3%1*1e6)}(t));return-1==(s=s.replace(/((^|[^%])(%%)*)%f/,e)).indexOf(\"%\")?s:i.default(t,s)}}const l=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"];class _ extends n.TickFormatter{constructor(t){super(t),this.strip_leading_zeros=!0}static init_DatetimeTickFormatter(){this.define({microseconds:[a.Array,[\"%fus\"]],milliseconds:[a.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[a.Array,[\"%Ss\"]],minsec:[a.Array,[\":%M:%S\"]],minutes:[a.Array,[\":%M\",\"%Mm\"]],hourmin:[a.Array,[\"%H:%M\"]],hours:[a.Array,[\"%Hh\",\"%H:%M\"]],days:[a.Array,[\"%m/%d\",\"%a%d\"]],months:[a.Array,[\"%m/%Y\",\"%b %Y\"]],years:[a.Array,[\"%Y\"]]})}initialize(){super.initialize(),this._update_width_formats()}_update_width_formats(){const t=+i.default(new Date),s=function(s){const e=s.map(s=>d(t,s).length),r=m.sort_by(m.zip(e,s),([t])=>t);return m.unzip(r)};this._width_formats={microseconds:s(this.microseconds),milliseconds:s(this.milliseconds),seconds:s(this.seconds),minsec:s(this.minsec),minutes:s(this.minutes),hourmin:s(this.hourmin),hours:s(this.hours),days:s(this.days),months:s(this.months),years:s(this.years)}}_get_resolution_str(t,s){const e=1.1*t;switch(!1){case!(e<.001):return\"microseconds\";case!(e<1):return\"milliseconds\";case!(e<60):return s>=60?\"minsec\":\"seconds\";case!(e<3600):return s>=3600?\"hourmin\":\"minutes\";case!(e<86400):return\"hours\";case!(e<2678400):return\"days\";case!(e<31536e3):return\"months\";default:return\"years\"}}doFormat(t,s){if(0==t.length)return[];const e=Math.abs(t[t.length-1]-t[0])/1e3,r=e/(t.length-1),i=this._get_resolution_str(r,e),[,[n]]=this._width_formats[i],a=[],c=l.indexOf(i),m={};for(const t of l)m[t]=0;m.seconds=5,m.minsec=4,m.minutes=4,m.hourmin=3,m.hours=3;for(const s of t){let t,e;try{e=h(s),t=d(s,n)}catch(t){o.logger.warn(\"unable to format tick for timestamp value \"+s),o.logger.warn(\" - \"+t),a.push(\"ERR\");continue}let r=!1,u=c;for(;0==e[m[l[u]]];){let n;if(u+=1,u==l.length)break;if((\"minsec\"==i||\"hourmin\"==i)&&!r){if(\"minsec\"==i&&0==e[4]&&0!=e[5]||\"hourmin\"==i&&0==e[3]&&0!=e[4]){n=this._width_formats[l[c-1]][1][0],t=d(s,n);break}r=!0}n=this._width_formats[l[u]][1][0],t=d(s,n)}if(this.strip_leading_zeros){let s=t.replace(/^0+/g,\"\");s!=t&&isNaN(parseInt(s))&&(s=\"0\"+s),a.push(s)}else a.push(t)}return a}}e.DatetimeTickFormatter=_,_.__name__=\"DatetimeTickFormatter\",_.init_DatetimeTickFormatter()},\n",
" function _(r,n,e){Object.defineProperty(e,\"__esModule\",{value:!0});const t=r(1),i=t.__importStar(r(161)),u=r(162),a=t.__importDefault(r(159)),f=r(24),o=r(8);function l(r,...n){return u.sprintf(r,...n)}function s(r,n,e){if(o.isNumber(r)){return l((()=>{switch(!1){case Math.floor(r)!=r:return\"%d\";case!(Math.abs(r)>.1&&Math.abs(r)<1e3):return\"%0.3f\";default:return\"%0.3e\"}})(),r)}return\"\"+r}function c(r,n,t){if(null==n)return s;if(null!=t&&r in t){const n=t[r];if(o.isString(n)){if(n in e.DEFAULT_FORMATTERS)return e.DEFAULT_FORMATTERS[n];throw new Error(`Unknown tooltip field formatter type '${n}'`)}return function(r,e,t){return n.format(r,e,t)}}return e.DEFAULT_FORMATTERS.numeral}function m(r,n,e,t){if(\"$\"==r[0]){return function(r,n){if(r in n)return n[r];throw new Error(`Unknown special variable '$${r}'`)}(r.substring(1),t)}return function(r,n,e){const t=n.get_column(r);if(null==t)return null;if(o.isNumber(e))return t[e];const i=t[e.index];if(o.isTypedArray(i)||o.isArray(i)){if(o.isArray(i[0])){return i[e.dim2][e.dim1]}return i[e.flat_index]}return i}(r.substring(1).replace(/[{}]/g,\"\"),n,e)}e.DEFAULT_FORMATTERS={numeral:(r,n,e)=>i.format(r,n),datetime:(r,n,e)=>a.default(r,n),printf:(r,n,e)=>l(n,r)},e.sprintf=l,e.basic_formatter=s,e.get_formatter=c,e.get_value=m,e.replace_placeholders=function(r,n,e,t,i={}){return r=(r=r.replace(/@\\$name/g,r=>`@{${i.name}}`)).replace(/((?:\\$\\w+)|(?:@\\w+)|(?:@{(?:[^{}]+)}))(?:{([^{}]+)})?/g,(r,u,a)=>{const o=m(u,n,e,i);if(null==o)return\"\"+f.escape(\"???\");if(\"safe\"==a)return\"\"+o;const l=c(u,a,t);return\"\"+f.escape(l(o,a,i))})}},\n",
" function _(e,n,t){\n",
" /*!\n",
" * numbro.js\n",
" * version : 1.6.2\n",
" * author : Företagsplatsen AB\n",
" * license : MIT\n",
" * http://www.foretagsplatsen.se\n",
" */\n",
" var r,i={},a=i,o=\"en-US\",l=null,u=\"0,0\";void 0!==n&&n.exports;function c(e){this._value=e}function s(e){var n,t=\"\";for(n=0;n<e;n++)t+=\"0\";return t}function f(e,n,t,r){var i,a,o=Math.pow(10,n);return a=e.toFixed(0).search(\"e\")>-1?function(e,n){var t,r,i,a;return t=(a=e.toString()).split(\"e\")[0],i=a.split(\"e\")[1],a=t.split(\".\")[0]+(r=t.split(\".\")[1]||\"\")+s(i-r.length),n>0&&(a+=\".\"+s(n)),a}(e,n):(t(e*o)/o).toFixed(n),r&&(i=new RegExp(\"0{1,\"+r+\"}$\"),a=a.replace(i,\"\")),a}function d(e,n,t){return n.indexOf(\"$\")>-1?function(e,n,t){var r,a,l=n,u=l.indexOf(\"$\"),c=l.indexOf(\"(\"),s=l.indexOf(\"+\"),f=l.indexOf(\"-\"),d=\"\",p=\"\";-1===l.indexOf(\"$\")?\"infix\"===i[o].currency.position?(p=i[o].currency.symbol,i[o].currency.spaceSeparated&&(p=\" \"+p+\" \")):i[o].currency.spaceSeparated&&(d=\" \"):l.indexOf(\" $\")>-1?(d=\" \",l=l.replace(\" $\",\"\")):l.indexOf(\"$ \")>-1?(d=\" \",l=l.replace(\"$ \",\"\")):l=l.replace(\"$\",\"\");if(a=h(e,l,t,p),-1===n.indexOf(\"$\"))switch(i[o].currency.position){case\"postfix\":a.indexOf(\")\")>-1?((a=a.split(\"\")).splice(-1,0,d+i[o].currency.symbol),a=a.join(\"\")):a=a+d+i[o].currency.symbol;break;case\"infix\":break;case\"prefix\":a.indexOf(\"(\")>-1||a.indexOf(\"-\")>-1?(a=a.split(\"\"),r=Math.max(c,f)+1,a.splice(r,0,i[o].currency.symbol+d),a=a.join(\"\")):a=i[o].currency.symbol+d+a;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else u<=1?a.indexOf(\"(\")>-1||a.indexOf(\"+\")>-1||a.indexOf(\"-\")>-1?(a=a.split(\"\"),r=1,(u<c||u<s||u<f)&&(r=0),a.splice(r,0,i[o].currency.symbol+d),a=a.join(\"\")):a=i[o].currency.symbol+d+a:a.indexOf(\")\")>-1?((a=a.split(\"\")).splice(-1,0,d+i[o].currency.symbol),a=a.join(\"\")):a=a+d+i[o].currency.symbol;return a}(e,n,t):n.indexOf(\"%\")>-1?function(e,n,t){var r,i=\"\";e*=100,n.indexOf(\" %\")>-1?(i=\" \",n=n.replace(\" %\",\"\")):n=n.replace(\"%\",\"\");(r=h(e,n,t)).indexOf(\")\")>-1?((r=r.split(\"\")).splice(-1,0,i+\"%\"),r=r.join(\"\")):r=r+i+\"%\";return r}(e,n,t):n.indexOf(\":\")>-1?function(e){var n=Math.floor(e/60/60),t=Math.floor((e-60*n*60)/60),r=Math.round(e-60*n*60-60*t);return n+\":\"+(t<10?\"0\"+t:t)+\":\"+(r<10?\"0\"+r:r)}(e):h(e,n,t)}function h(e,n,t,r){var a,u,c,s,d,h,p,m,x,g,O,b,w,y,M,v,$,B=!1,E=!1,F=!1,k=\"\",U=!1,N=!1,S=!1,j=!1,D=!1,C=\"\",L=\"\",T=Math.abs(e),K=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],G=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],I=\"\",P=!1,R=!1;if(0===e&&null!==l)return l;if(!isFinite(e))return\"\"+e;if(0===n.indexOf(\"{\")){var W=n.indexOf(\"}\");if(-1===W)throw Error('Format should also contain a \"}\"');b=n.slice(1,W),n=n.slice(W+1)}else b=\"\";if(n.indexOf(\"}\")===n.length-1){var Y=n.indexOf(\"{\");if(-1===Y)throw Error('Format should also contain a \"{\"');w=n.slice(Y+1,-1),n=n.slice(0,Y+1)}else w=\"\";if(v=null===($=-1===n.indexOf(\".\")?n.match(/([0-9]+).*/):n.match(/([0-9]+)\\..*/))?-1:$[1].length,-1!==n.indexOf(\"-\")&&(P=!0),n.indexOf(\"(\")>-1?(B=!0,n=n.slice(1,-1)):n.indexOf(\"+\")>-1&&(E=!0,n=n.replace(/\\+/g,\"\")),n.indexOf(\"a\")>-1){if(g=n.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],g=parseInt(g[0],10),U=n.indexOf(\"aK\")>=0,N=n.indexOf(\"aM\")>=0,S=n.indexOf(\"aB\")>=0,j=n.indexOf(\"aT\")>=0,D=U||N||S||j,n.indexOf(\" a\")>-1?(k=\" \",n=n.replace(\" a\",\"\")):n=n.replace(\"a\",\"\"),p=0===(p=(d=Math.floor(Math.log(T)/Math.LN10)+1)%3)?3:p,g&&0!==T&&(h=Math.floor(Math.log(T)/Math.LN10)+1-g,m=3*~~((Math.min(g,d)-p)/3),T/=Math.pow(10,m),-1===n.indexOf(\".\")&&g>3))for(n+=\"[.]\",M=(M=0===h?0:3*~~(h/3)-h)<0?M+3:M,a=0;a<M;a++)n+=\"0\";Math.floor(Math.log(Math.abs(e))/Math.LN10)+1!==g&&(T>=Math.pow(10,12)&&!D||j?(k+=i[o].abbreviations.trillion,e/=Math.pow(10,12)):T<Math.pow(10,12)&&T>=Math.pow(10,9)&&!D||S?(k+=i[o].abbreviations.billion,e/=Math.pow(10,9)):T<Math.pow(10,9)&&T>=Math.pow(10,6)&&!D||N?(k+=i[o].abbreviations.million,e/=Math.pow(10,6)):(T<Math.pow(10,6)&&T>=Math.pow(10,3)&&!D||U)&&(k+=i[o].abbreviations.thousand,e/=Math.pow(10,3)))}if(n.indexOf(\"b\"
" function _(e,n,t){!function(){\"use strict\";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function n(e){return i(a(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(t,r){var i,s,a,o,p,c,l,u,f,d=1,g=t.length,y=\"\";for(s=0;s<g;s++)if(\"string\"==typeof t[s])y+=t[s];else if(\"object\"==typeof t[s]){if((o=t[s]).keys)for(i=r[d],a=0;a<o.keys.length;a++){if(null==i)throw new Error(n('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',o.keys[a],o.keys[a-1]));i=i[o.keys[a]]}else i=o.param_no?r[o.param_no]:r[d++];if(e.not_type.test(o.type)&&e.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),e.numeric_arg.test(o.type)&&\"number\"!=typeof i&&isNaN(i))throw new TypeError(n(\"[sprintf] expecting number but found %T\",i));switch(e.number.test(o.type)&&(u=i>=0),o.type){case\"b\":i=parseInt(i,10).toString(2);break;case\"c\":i=String.fromCharCode(parseInt(i,10));break;case\"d\":case\"i\":i=parseInt(i,10);break;case\"j\":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case\"e\":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case\"f\":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case\"g\":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case\"t\":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case\"x\":i=(parseInt(i,10)>>>0).toString(16);break;case\"X\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}e.json.test(o.type)?y+=i:(!e.number.test(o.type)||u&&!o.sign?f=\"\":(f=u?\"+\":\"-\",i=i.toString().replace(e.sign,\"\")),c=o.pad_char?\"0\"===o.pad_char?\"0\":o.pad_char.charAt(1):\" \",l=o.width-(f+i).length,p=o.width&&l>0?c.repeat(l):\"\",y+=o.align?f+i+p:\"0\"===c?f+p+i:p+f+i)}return y}var s=Object.create(null);function a(n){if(s[n])return s[n];for(var t,r=n,i=[],a=0;r;){if(null!==(t=e.text.exec(r)))i.push(t[0]);else if(null!==(t=e.modulo.exec(r)))i.push(\"%\");else{if(null===(t=e.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(t[2]){a|=1;var o=[],p=t[2],c=[];if(null===(c=e.key.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(c[1]);\"\"!==(p=p.substring(c[0].length));)if(null!==(c=e.key_access.exec(p)))o.push(c[1]);else{if(null===(c=e.index_access.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[n]=i}void 0!==t&&(t.sprintf=n,t.vsprintf=r),\"undefined\"!=typeof window&&(window.sprintf=n,window.vsprintf=r,\"function\"==typeof define&&define.amd&&define((function(){return{sprintf:n,vsprintf:r}})))}()},\n",
" function _(e,i,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(9),a=e(110),s=e(164),r=e(165),c=e(168),_=e(169),m=e(167);class k extends s.CompositeTicker{constructor(e){super(e)}static init_DatetimeTicker(){this.override({num_minor_ticks:0,tickers:()=>[new a.AdaptiveTicker({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*m.ONE_MILLI,num_minor_ticks:0}),new a.AdaptiveTicker({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:m.ONE_SECOND,max_interval:30*m.ONE_MINUTE,num_minor_ticks:0}),new a.AdaptiveTicker({mantissas:[1,2,4,6,8,12],base:24,min_interval:m.ONE_HOUR,max_interval:12*m.ONE_HOUR,num_minor_ticks:0}),new r.DaysTicker({days:t.range(1,32)}),new r.DaysTicker({days:t.range(1,31,3)}),new r.DaysTicker({days:[1,8,15,22]}),new r.DaysTicker({days:[1,15]}),new c.MonthsTicker({months:t.range(0,12,1)}),new c.MonthsTicker({months:t.range(0,12,2)}),new c.MonthsTicker({months:t.range(0,12,4)}),new c.MonthsTicker({months:t.range(0,12,6)}),new _.YearsTicker({})]})}}n.DatetimeTicker=k,k.__name__=\"DatetimeTicker\",k.init_DatetimeTicker()},\n",
" function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(150),o=e(155),n=e(171),r=e(172);class _ extends s.AxisView{}t.LogAxisView=_,_.__name__=\"LogAxisView\";class c extends o.ContinuousAxis{constructor(e){super(e)}static init_LogAxis(){this.prototype.default_view=_,this.override({ticker:()=>new r.LogTicker,formatter:()=>new n.LogTickFormatter})}}t.LogAxis=c,c.__name__=\"LogAxis\",c.init_LogAxis()},\n",
" function _(t,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=t(1),o=t(114),a=t(113),n=i.__importStar(t(18));class c extends o.TickFormatter{constructor(t){super(t)}static init_LogTickFormatter(){this.define({ticker:[n.Instance,null]})}initialize(){super.initialize(),this.basic_formatter=new a.BasicTickFormatter}doFormat(t,e){if(0==t.length)return[];const r=null!=this.ticker?this.ticker.base:10;let i=!1;const o=new Array(t.length);for(let e=0,a=t.length;e<a;e++)if(o[e]=`${r}^${Math.round(Math.log(t[e])/Math.log(r))}`,e>0&&o[e]==o[e-1]){i=!0;break}return i?this.basic_formatter.doFormat(t,e):o}}r.LogTickFormatter=c,c.__name__=\"LogTickFormatter\",c.init_LogTickFormatter()},\n",
" function _(t,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(110),s=t(9);class n extends i.AdaptiveTicker{constructor(t){super(t)}static init_LogTicker(){this.override({mantissas:[1,5]})}get_ticks_no_defaults(t,o,e,i){const n=this.num_minor_ticks,r=[],c=this.base,a=Math.log(t)/Math.log(c),f=Math.log(o)/Math.log(c),l=f-a;let h;if(isFinite(l))if(l<2){const e=this.get_interval(t,o,i),c=Math.floor(t/e),a=Math.ceil(o/e);if(h=s.range(c,a+1).filter(t=>0!=t).map(t=>t*e).filter(e=>t<=e&&e<=o),n>0&&h.length>0){const t=e/n,o=s.range(0,n).map(o=>o*t);for(const t of o.slice(1))r.push(h[0]-t);for(const t of h)for(const e of o)r.push(t+e)}}else{const t=Math.ceil(.999999*a),o=Math.floor(1.000001*f),e=Math.ceil((o-t)/9);if(h=s.range(t-1,o+1,e).map(t=>c**t),n>0&&h.length>0){const t=c**e/n,o=s.range(1,n+1).map(o=>o*t);for(const t of o)r.push(h[0]/t);r.push(h[0]);for(const t of h)for(const e of o)r.push(t*e)}}else h=[];return{major:h.filter(e=>t<=e&&e<=o),minor:r.filter(e=>t<=e&&e<=o)}}}e.LogTicker=n,n.__name__=\"LogTicker\",n.init_LogTicker()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(150),s=e(157),o=e(174),a=e(175);class c extends i.AxisView{}r.MercatorAxisView=c,c.__name__=\"MercatorAxisView\";class n extends s.LinearAxis{constructor(e){super(e)}static init_MercatorAxis(){this.prototype.default_view=c,this.override({ticker:()=>new a.MercatorTicker({dimension:\"lat\"}),formatter:()=>new o.MercatorTickFormatter({dimension:\"lat\"})})}}r.MercatorAxis=n,n.__name__=\"MercatorAxis\",n.init_MercatorAxis()},\n",
" function _(r,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const o=r(1),n=r(113),i=o.__importStar(r(18)),c=r(32);class s extends n.BasicTickFormatter{constructor(r){super(r)}static init_MercatorTickFormatter(){this.define({dimension:[i.LatLon]})}doFormat(r,t){if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0==r.length)return[];const e=r.length,o=new Array(e);if(\"lon\"==this.dimension)for(let n=0;n<e;n++){const[e]=c.wgs84_mercator.inverse([r[n],t.loc]);o[n]=e}else for(let n=0;n<e;n++){const[,e]=c.wgs84_mercator.inverse([t.loc,r[n]]);o[n]=e}return super.doFormat(o,t)}}e.MercatorTickFormatter=s,s.__name__=\"MercatorTickFormatter\",s.init_MercatorTickFormatter()},\n",
" function _(r,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(1),s=r(109),i=n.__importStar(r(18)),t=r(32);class c extends s.BasicTicker{constructor(r){super(r)}static init_MercatorTicker(){this.define({dimension:[i.LatLon]})}get_ticks_no_defaults(r,o,e,n){if(null==this.dimension)throw new Error(\"MercatorTicker.dimension not configured\");let s,i,c;[r,o]=t.clip_mercator(r,o,this.dimension),\"lon\"===this.dimension?([s,c]=t.wgs84_mercator.inverse([r,e]),[i,c]=t.wgs84_mercator.inverse([o,e])):([c,s]=t.wgs84_mercator.inverse([e,r]),[c,i]=t.wgs84_mercator.inverse([e,o]));const a=super.get_ticks_no_defaults(s,i,e,n),_=[],f=[];if(\"lon\"===this.dimension){for(const r of a.major)if(t.in_bounds(r,\"lon\")){const[o]=t.wgs84_mercator.forward([r,c]);_.push(o)}for(const r of a.minor)if(t.in_bounds(r,\"lon\")){const[o]=t.wgs84_mercator.forward([r,c]);f.push(o)}}else{for(const r of a.major)if(t.in_bounds(r,\"lat\")){const[,o]=t.wgs84_mercator.forward([c,r]);_.push(o)}for(const r of a.minor)if(t.in_bounds(r,\"lat\")){const[,o]=t.wgs84_mercator.forward([c,r]);f.push(o)}}return{major:_,minor:f}}}e.MercatorTicker=c,c.__name__=\"MercatorTicker\",c.init_MercatorTicker()},\n",
" function _(e,n,o){Object.defineProperty(o,\"__esModule\",{value:!0});var t=e(177);o.CustomJS=t.CustomJS;var u=e(179);o.OpenURL=u.OpenURL},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=t(1),u=t(178),c=n.__importStar(t(18)),r=t(17),a=t(24);class i extends u.Callback{constructor(t){super(t)}static init_CustomJS(){this.define({args:[c.Any,{}],code:[c.String,\"\"]})}get names(){return r.keys(this.args)}get values(){return r.values(this.args)}get func(){const t=a.use_strict(this.code);return new Function(...this.names,\"cb_obj\",\"cb_data\",t)}execute(t,e={}){return this.func.apply(t,this.values.concat(t,e))}}s.CustomJS=i,i.__name__=\"CustomJS\",i.init_CustomJS()},\n",
" function _(e,c,l){Object.defineProperty(l,\"__esModule\",{value:!0});const a=e(71);class n extends a.Model{constructor(e){super(e)}}l.Callback=n,n.__name__=\"Callback\"},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(1),s=e(178),i=e(160),c=o.__importStar(e(18));class r extends s.Callback{constructor(e){super(e)}static init_OpenURL(){this.define({url:[c.String,\"http://\"],same_tab:[c.Boolean,!1]})}execute(e,{source:t}){const n=e=>{const n=i.replace_placeholders(this.url,t,e);this.same_tab?window.location.href=n:window.open(n)},{selected:o}=t;for(const e of o.indices)n(e);for(const e of o.line_indices)n(e)}}n.OpenURL=r,r.__name__=\"OpenURL\",r.init_OpenURL()},\n",
" function _(a,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});var n=a(181);r.Canvas=n.Canvas;var s=a(184);r.CartesianFrame=s.CartesianFrame},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),a=e(13),n=e(66),l=e(72),o=s.__importStar(e(18)),r=e(68),h=e(17),c=e(88),d=e(182),_=e(183),v=(()=>{const e=document.createElement(\"canvas\"),t=e.getContext(\"webgl\",{premultipliedAlpha:!0});return null!=t?{canvas:e,gl:t}:void l.logger.trace(\"WebGL is not supported\")})(),p={position:\"absolute\",top:\"0\",left:\"0\",width:\"100%\",height:\"100%\"};class g{constructor(e,t){switch(this.backend=e,this.hidpi=t,this.pixel_ratio=1,this.bbox=new c.BBox,e){case\"webgl\":case\"canvas\":{this._el=this._canvas=r.canvas({style:p});const e=this.canvas.getContext(\"2d\");if(null==e)throw new Error(\"unable to obtain 2D rendering context\");this._ctx=e,t&&(this.pixel_ratio=devicePixelRatio);break}case\"svg\":{const e=new _.SVGRenderingContext2D;this._ctx=e,this._canvas=e.getSvg(),this._el=r.div({style:p},this._canvas);break}}d.fixup_ctx(this._ctx)}get canvas(){return this._canvas}get ctx(){return this._ctx}get el(){return this._el}resize(e,t){this.bbox=new c.BBox({left:0,top:0,width:e,height:t});const i=this._ctx instanceof _.SVGRenderingContext2D?this._ctx:this.canvas;i.width=e*this.pixel_ratio,i.height=t*this.pixel_ratio}prepare(){const{ctx:e,hidpi:t,pixel_ratio:i}=this;e.save(),t&&(e.scale(i,i),e.translate(.5,.5)),this.clear()}clear(){const{x:e,y:t,width:i,height:s}=this.bbox;this.ctx.clearRect(e,t,i,s)}finish(){this.ctx.restore()}save(e){const{_canvas:t}=this;if(t instanceof HTMLCanvasElement)if(null!=t.msToBlob){const i=t.msToBlob();window.navigator.msSaveBlob(i,e)}else{const i=document.createElement(\"a\");i.href=t.toDataURL(\"image/png\"),i.download=e+\".png\",i.target=\"_blank\",i.dispatchEvent(new MouseEvent(\"click\"))}else{const t=this._ctx.getSerializedSvg(!0),i=new Blob([t],{type:\"text/plain\"}),s=document.createElement(\"a\");s.download=e+\".svg\",s.innerHTML=\"Download svg\",s.href=window.URL.createObjectURL(i),s.onclick=e=>document.body.removeChild(e.target),s.style.display=\"none\",document.body.appendChild(s),s.click()}}}i.CanvasLayer=g,g.__name__=\"CanvasLayer\";class b extends n.DOMView{initialize(){super.initialize();const{output_backend:e,hidpi:t}=this.model;\"webgl\"==e&&(this.webgl=v),this.underlays_el=r.div({style:p}),this.primary=new g(e,t),this.overlays=new g(e,t),this.overlays_el=r.div({style:p}),this.events_el=r.div({class:\"bk-canvas-events\",style:p});const i=[this.underlays_el,this.primary.el,this.overlays.el,this.overlays_el,this.events_el];h.extend(this.el.style,p),r.append(this.el,...i),l.logger.debug(\"CanvasView initialized\")}add_underlay(e){this.underlays_el.appendChild(e)}add_overlay(e){this.overlays_el.appendChild(e)}add_event(e){this.events_el.appendChild(e)}get pixel_ratio(){return this.primary.pixel_ratio}resize(e,t){this.bbox=new c.BBox({left:0,top:0,width:e,height:t}),this.primary.resize(e,t),this.overlays.resize(e,t)}prepare_webgl(e){const{webgl:t}=this;if(null!=t){const{width:i,height:s}=this.bbox;t.canvas.width=this.pixel_ratio*i,t.canvas.height=this.pixel_ratio*s;const{gl:a}=t;a.enable(a.SCISSOR_TEST);const[n,l,o,r]=e,{xview:h,yview:c}=this.bbox,d=h.compute(n),_=c.compute(l+r),v=this.pixel_ratio;a.scissor(v*d,v*_,v*o,v*r),a.enable(a.BLEND),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE_MINUS_DST_ALPHA,a.ONE)}}clear_webgl(){const{webgl:e}=this;if(null!=e){const{gl:t,canvas:i}=e;t.viewport(0,0,i.width,i.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT||t.DEPTH_BUFFER_BIT)}}blit_webgl(e){const{webgl:t}=this;if(null!=t&&(l.logger.debug(\"drawing with WebGL\"),e.restore(),e.drawImage(t.canvas,0,0),e.save(),this.model.hidpi)){const t=this.pixel_ratio;e.scale(t,t),e.translate(.5,.5)}}save(e){const{output_backend:t}=this.model,{width:i,height:s}=this.bbox,a=new g(t,!1);a.resize(i,s),a.ctx.drawImage(this.primary.canvas,0,0),a.ctx.drawImage(this.overlays.canvas,0,0),a.save(e)}}i.CanvasView=b,b.__name__=\"CanvasView\";class w extends a.HasProps{constructor(e){super(e)}static init_Canvas(){this.prototype.default_view=b,this.internal({hidpi:[o.Boolean,!0],output_backend:[o.OutputB
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.fixup_ctx=function(e){!function(e){e.setLineDash||(e.setLineDash=t=>{e.mozDash=t,e.webkitLineDash=t}),e.getLineDash||(e.getLineDash=()=>e.mozDash)}(e),function(e){e.setLineDashOffset=t=>{e.lineDashOffset=t,e.mozDashOffset=t,e.webkitLineDashOffset=t},e.getLineDashOffset=()=>e.mozDashOffset}(e),function(e){e.setImageSmoothingEnabled=t=>{e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.oImageSmoothingEnabled=t,e.webkitImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t},e.getImageSmoothingEnabled=()=>{const t=e.imageSmoothingEnabled;return null==t||t}}(e),function(e){e.measureText&&null==e.html5MeasureText&&(e.html5MeasureText=e.measureText,e.measureText=t=>{const n=e.html5MeasureText(t);return n.ascent=1.6*e.html5MeasureText(\"m\").width,n})}(e),function(e){e.ellipse||(e.ellipse=function(t,n,a,o,s,i,m,h=!1){const l=.551784;e.translate(t,n),e.rotate(s);let u=a,r=o;h&&(u=-a,r=-o),e.moveTo(-u,0),e.bezierCurveTo(-u,r*l,-u*l,r,0,r),e.bezierCurveTo(u*l,r,u,r*l,u,0),e.bezierCurveTo(u,-r*l,u*l,-r,0,-r),e.bezierCurveTo(-u*l,-r,-u,-r*l,-u,0),e.rotate(-s),e.translate(-t,-n)})}(e)}},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(8);function r(t){return[...t.childNodes]}function n(t){if(!t)throw new Error(\"cannot create a random attribute name for an undefined object\");const e=\"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\";let s=\"\";do{s=\"\";for(let t=0;t<12;t++)s+=e[Math.floor(Math.random()*e.length)]}while(t[s]);return s}function a(t){const e={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"};return e[t]||e.start}function o(t){const e={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return e[t]||e.alphabetic}const l=function(t,e){const s=new Map,i=t.split(\",\");e=e||10;for(let t=0;t<i.length;t+=2){const r=\"&\"+i[t+1]+\";\",n=parseInt(i[t],e);s.set(r,\"&#\"+n+\";\")}return s.set(\"\\\\xa0\",\" \"),s}(\"50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro\",32),h={strokeStyle:{svgAttr:\"stroke\",canvas:\"#000000\",svg:\"none\",apply:\"stroke\"},fillStyle:{svgAttr:\"fill\",canvas:\"#000000\",svg:null,apply:\"fill\"},lineCap:{svgAttr:\"stroke-linecap\",canvas:\"butt\",svg:\"butt\",apply:\"stroke\"},lineJoin:{svgAttr:\"stroke-linejoin\",canvas:\"miter\",svg:\"miter\",apply:\"stroke\"},miterLimit:{svgAttr:\"stroke-miterlimit\",canvas:10,svg:4,apply:\"stroke\"},lineWidth:{svgAttr:\"stroke-width\",canvas:1,svg:1,apply:\"stroke\"},globalAlpha:{svgAttr:\"opacity\",canvas:1,svg:1,apply:\"fill stroke\"},font:{canvas:\"10px sans-serif\"},shadowColor:{canvas:\"#000000\"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:\"start\"},textBaseline:{canvas:\"alphabetic\"},lineDash:{svgAttr:\"stroke-dasharray\",canvas:[],svg:null,apply:\"stroke\"}};class c{constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const s=this.__ctx.__createElement(\"stop\");if(s.setAttribut
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const a=e(185),_=e(121),n=e(130),r=e(131),i=e(186),g=e(90),c=e(188);class h extends c.LayoutItem{constructor(e,t,s,a,_={},n={}){super(),this.x_scale=e,this.y_scale=t,this.x_range=s,this.y_range=a,this.extra_x_ranges=_,this.extra_y_ranges=n,this._configure_scales()}map_to_screen(e,t,s=\"default\",a=\"default\"){return[this.xscales[s].v_compute(e),this.yscales[a].v_compute(t)]}_get_ranges(e,t){return Object.assign(Object.assign({},t),{default:e})}_get_scales(e,t,s){const c={};for(const h in t){const o=t[h];if((o instanceof i.DataRange1d||o instanceof r.Range1d)&&!(e instanceof _.ContinuousScale))throw new Error(`Range ${o.type} is incompatible is Scale ${e.type}`);if(o instanceof g.FactorRange&&!(e instanceof a.CategoricalScale))throw new Error(`Range ${o.type} is incompatible is Scale ${e.type}`);e instanceof n.LogScale&&o instanceof i.DataRange1d&&(o.scale_hint=\"log\");const l=e.clone();l.setv({source_range:o,target_range:s}),c[h]=l}return c}_configure_frame_ranges(){this._h_target=new r.Range1d({start:this._left.value,end:this._right.value}),this._v_target=new r.Range1d({start:this._bottom.value,end:this._top.value})}_configure_scales(){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_target),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_target)}_update_scales(){this._configure_frame_ranges();for(const e in this._xscales){this._xscales[e].target_range=this._h_target}for(const e in this._yscales){this._yscales[e].target_range=this._v_target}}_set_geometry(e,t){super._set_geometry(e,t),this._update_scales()}get x_ranges(){return this._x_ranges}get y_ranges(){return this._y_ranges}get xscales(){return this._xscales}get yscales(){return this._yscales}}s.CartesianFrame=h,h.__name__=\"CartesianFrame\"},\n",
" function _(t,i,n){Object.defineProperty(n,\"__esModule\",{value:!0});const e=t(1),a=t(187),s=t(81),l=t(72),_=e.__importStar(t(18)),o=e.__importStar(t(88)),r=t(9);class h extends a.DataRange{constructor(t){super(t),this.have_updated_interactively=!1}static init_DataRange1d(){this.define({start:[_.Number],end:[_.Number],range_padding:[_.Number,.1],range_padding_units:[_.PaddingUnits,\"percent\"],flipped:[_.Boolean,!1],follow:[_.StartEnd],follow_interval:[_.Number],default_span:[_.Number,2],only_visible:[_.Boolean,!1]}),this.internal({scale_hint:[_.String,\"auto\"]})}initialize(){super.initialize(),this._initial_start=this.start,this._initial_end=this.end,this._initial_range_padding=this.range_padding,this._initial_range_padding_units=this.range_padding_units,this._initial_follow=this.follow,this._initial_follow_interval=this.follow_interval,this._initial_default_span=this.default_span,this._plot_bounds=new Map}get min(){return Math.min(this.start,this.end)}get max(){return Math.max(this.start,this.end)}computed_renderers(){const t=this.names;let i=this.renderers;if(0==i.length)for(const t of this.plots){const n=t.renderers.filter(t=>t instanceof s.GlyphRenderer);i=i.concat(n)}t.length>0&&(i=i.filter(i=>r.includes(t,i.name))),l.logger.debug(`computed ${i.length} renderers for ${this}`);for(const t of i)l.logger.trace(\" - \"+t);return i}_compute_plot_bounds(t,i){let n=o.empty();for(const e of t){const t=i.get(e);null==t||!e.visible&&this.only_visible||(n=o.union(n,t))}return n}adjust_bounds_for_aspect(t,i){const n=o.empty();let e=t.x1-t.x0;e<=0&&(e=1);let a=t.y1-t.y0;a<=0&&(a=1);const s=.5*(t.x1+t.x0),l=.5*(t.y1+t.y0);return e<i*a?e=i*a:a=e/i,n.x1=s+.5*e,n.x0=s-.5*e,n.y1=l+.5*a,n.y0=l-.5*a,n}_compute_min_max(t,i){let n,e,a=o.empty();for(const i of t)a=o.union(a,i);return[n,e]=0==i?[a.x0,a.x1]:[a.y0,a.y1],[n,e]}_compute_range(t,i){const n=this.range_padding;let e,a;if(null!=this._initial_start&&(t=this._initial_start),null!=this._initial_end&&(i=this._initial_end),\"log\"==this.scale_hint){let s,_;if((isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(i)||!isFinite(i)||i<=0?.1:i/100,l.logger.warn(\"could not determine minimum data value for log axis, DataRange1d using value \"+t)),(isNaN(i)||!isFinite(i)||i<=0)&&(i=isNaN(t)||!isFinite(t)||t<=0?10:100*t,l.logger.warn(\"could not determine maximum data value for log axis, DataRange1d using value \"+i)),i==t)_=this.default_span+.001,s=Math.log(t)/Math.log(10);else{let e,a;\"percent\"==this.range_padding_units?(e=Math.log(t)/Math.log(10),a=Math.log(i)/Math.log(10),_=(a-e)*(1+n)):(e=Math.log(t-n)/Math.log(10),a=Math.log(i+n)/Math.log(10),_=a-e),s=(e+a)/2}e=10**(s-_/2),a=10**(s+_/2)}else{let s;s=i==t?this.default_span:\"percent\"==this.range_padding_units?(i-t)*(1+n):i-t+2*n;const l=(i+t)/2;e=l-s/2,a=l+s/2}let s=1;this.flipped&&([e,a]=[a,e],s=-1);const _=this.follow_interval;return null!=_&&Math.abs(e-a)>_&&(\"start\"==this.follow?a=e+s*_:\"end\"==this.follow&&(e=a-s*_)),[e,a]}update(t,i,n,e){if(this.have_updated_interactively)return;const a=this.computed_renderers();let s=this._compute_plot_bounds(a,t);null!=e&&(s=this.adjust_bounds_for_aspect(s,e)),this._plot_bounds.set(n,s);const[l,_]=this._compute_min_max(this._plot_bounds.values(),i);let[o,r]=this._compute_range(l,_);null!=this._initial_start&&(\"log\"==this.scale_hint?this._initial_start>0&&(o=this._initial_start):o=this._initial_start),null!=this._initial_end&&(\"log\"==this.scale_hint?this._initial_end>0&&(r=this._initial_end):r=this._initial_end);const[h,d]=[this.start,this.end];if(o!=h||r!=d){const t={};o!=h&&(t.start=o),r!=d&&(t.end=r),this.setv(t)}\"auto\"==this.bounds&&this.setv({bounds:[o,r]},{silent:!0}),this.change.emit()}reset(){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()}}n.DataRange1d=h,h.__name__=\"DataRange1d\",h.init_DataRange1d()},\n",
" function _(e,a,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1),r=e(91),s=n.__importStar(e(18));class _ extends r.Range{constructor(e){super(e)}static init_DataRange(){this.define({names:[s.Array,[]],renderers:[s.Array,[]]})}}t.DataRange=_,_.__name__=\"DataRange\",_.init_DataRange()},\n",
" function _(a,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});var e=a(189);t.Sizeable=e.Sizeable;var r=a(190);t.Layoutable=r.Layoutable,t.LayoutItem=r.LayoutItem;var n=a(191);t.HStack=n.HStack,t.VStack=n.VStack,t.AnchorLayout=n.AnchorLayout;var u=a(192);t.Grid=u.Grid,t.Row=u.Row,t.Column=u.Column;var c=a(193);t.ContentBox=c.ContentBox,t.VariadicBox=c.VariadicBox},\n",
" function _(h,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const{min:e,max:w}=Math;class d{constructor(h={}){this.width=null!=h.width?h.width:0,this.height=null!=h.height?h.height:0}bounded_to({width:h,height:t}){return new d({width:this.width==1/0&&null!=h?h:this.width,height:this.height==1/0&&null!=t?t:this.height})}expanded_to({width:h,height:t}){return new d({width:h!=1/0?w(this.width,h):this.width,height:t!=1/0?w(this.height,t):this.height})}expand_to({width:h,height:t}){this.width=w(this.width,h),this.height=w(this.height,t)}narrowed_to({width:h,height:t}){return new d({width:e(this.width,h),height:e(this.height,t)})}narrow_to({width:h,height:t}){this.width=e(this.width,h),this.height=e(this.height,t)}grow_by({left:h,right:t,top:i,bottom:e}){const w=this.width+h+t,s=this.height+i+e;return new d({width:w,height:s})}shrink_by({left:h,right:t,top:i,bottom:e}){const s=w(this.width-h-t,0),n=w(this.height-i-e,0);return new d({width:s,height:n})}map(h,t){return new d({width:h(this.width),height:(null!=t?t:h)(this.height)})}}i.Sizeable=d,d.__name__=\"Sizeable\"},\n",
" function _(t,e,h){Object.defineProperty(h,\"__esModule\",{value:!0});const o=t(190),r=t(88);class i extends o.Layoutable{constructor(){super(...arguments),this.children=[]}}h.Stack=i,i.__name__=\"Stack\";class s extends i{_measure(t){let e=0,h=0;for(const t of this.children){const o=t.measure({width:0,height:0});e+=o.width,h=Math.max(h,o.height)}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const{top:h,bottom:o}=t;let{left:i}=t;for(const t of this.children){const{width:e}=t.measure({width:0,height:0});t.set_geometry(new r.BBox({left:i,width:e,top:h,bottom:o})),i+=e}}}h.HStack=s,s.__name__=\"HStack\";class n extends i{_measure(t){let e=0,h=0;for(const t of this.children){const o=t.measure({width:0,height:0});e=Math.max(e,o.width),h+=o.height}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);const{left:h,right:o}=t;let{top:i}=t;for(const t of this.children){const{height:e}=t.measure({width:0,height:0});t.set_geometry(new r.BBox({top:i,height:e,left:h,right:o})),i+=e}}}h.VStack=n,n.__name__=\"VStack\";class c extends o.Layoutable{constructor(){super(...arguments),this.children=[]}_measure(t){let e=0,h=0;for(const{layout:o}of this.children){const r=o.measure(t);e=Math.max(e,r.width),h=Math.max(h,r.height)}return{width:e,height:h}}_set_geometry(t,e){super._set_geometry(t,e);for(const{layout:e,anchor:h,margin:o}of this.children){const{left:i,right:s,top:n,bottom:c,hcenter:a,vcenter:_}=t,{width:g,height:d}=e.measure(t);let m;switch(h){case\"top_left\":m=new r.BBox({left:i+o,top:n+o,width:g,height:d});break;case\"top_center\":m=new r.BBox({hcenter:a,top:n+o,width:g,height:d});break;case\"top_right\":m=new r.BBox({right:s-o,top:n+o,width:g,height:d});break;case\"bottom_right\":m=new r.BBox({right:s-o,bottom:c-o,width:g,height:d});break;case\"bottom_center\":m=new r.BBox({hcenter:a,bottom:c-o,width:g,height:d});break;case\"bottom_left\":m=new r.BBox({left:i+o,bottom:c-o,width:g,height:d});break;case\"center_left\":m=new r.BBox({left:i+o,vcenter:_,width:g,height:d});break;case\"center\":m=new r.BBox({hcenter:a,vcenter:_,width:g,height:d});break;case\"center_right\":m=new r.BBox({right:s-o,vcenter:_,width:g,height:d})}e.set_geometry(m)}}}h.AnchorLayout=c,c.__name__=\"AnchorLayout\"},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(190),i=e(189),a=e(68);class c extends n.ContentLayoutable{constructor(e){super(),this.content_size=a.unsized(e,()=>new i.Sizeable(a.size(e)))}_content_size(){return this.content_size}}s.ContentBox=c,c.__name__=\"ContentBox\";class o extends n.Layoutable{constructor(e){super(),this.el=e}_measure(e){const t=new i.Sizeable(e).bounded_to(this.sizing.size);return a.sized(this.el,t,()=>{const e=new i.Sizeable(a.content_size(this.el)),{border:t,padding:s}=a.extents(this.el);return e.grow_by(t).grow_by(s).map(Math.ceil)})}}s.VariadicBox=o,o.__name__=\"VariadicBox\";class r extends o{constructor(e){super(e),this._cache=new Map}_measure(e){const{width:t,height:s}=e,n=`${t},${s}`;let i=this._cache.get(n);return null==i&&(i=super._measure(e),this._cache.set(n,i)),i}invalidate_cache(){this._cache.clear()}}s.CachedVariadicBox=r,r.__name__=\"CachedVariadicBox\"},\n",
" function _(e,r,u){Object.defineProperty(u,\"__esModule\",{value:!0});var a=e(195);u.Expression=a.Expression;var n=e(196);u.Stack=n.Stack;var o=e(197);u.CumSum=o.CumSum},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(71);class i extends n.Model{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}v_compute(e){this._connected.has(e)||(this.connect(e.change,()=>this._result.delete(e)),this.connect(e.patching,()=>this._result.delete(e)),this.connect(e.streaming,()=>this._result.delete(e)),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._v_compute(e),this._result.set(e,t)),t}}s.Expression=i,i.__name__=\"Expression\"},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=t(1),o=t(195),r=i.__importStar(t(18));class s extends o.Expression{constructor(t){super(t)}static init_Stack(){this.define({fields:[r.Array,[]]})}_v_compute(t){var e;const n=null!==(e=t.get_length())&&void 0!==e?e:0,i=new Float64Array(n);for(const e of this.fields){const o=t.data[e];if(null!=o)for(let t=0,e=Math.min(n,o.length);t<e;t++)i[t]+=o[t]}return i}}n.Stack=s,s.__name__=\"Stack\",s.init_Stack()},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=e(1),u=e(195),o=i.__importStar(e(18));class r extends u.Expression{constructor(e){super(e)}static init_CumSum(){this.define({field:[o.String],include_zero:[o.Boolean,!1]})}_v_compute(e){const t=new Float64Array(e.get_length()||0),n=e.data[this.field],i=this.include_zero?1:0;t[0]=this.include_zero?0:n[0];for(let e=1;e<t.length;e++)t[e]=t[e-1]+n[e-i];return t}}n.CumSum=r,r.__name__=\"CumSum\",r.init_CumSum()},\n",
" function _(e,r,t){Object.defineProperty(t,\"__esModule\",{value:!0});var l=e(199);t.BooleanFilter=l.BooleanFilter;var i=e(201);t.CustomJSFilter=i.CustomJSFilter;var o=e(200);t.Filter=o.Filter;var F=e(202);t.GroupFilter=F.GroupFilter;var a=e(203);t.IndexFilter=a.IndexFilter},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(1),l=e(200),i=o.__importStar(e(18)),r=e(72),a=e(9),s=e(8);class g extends l.Filter{constructor(e){super(e)}static init_BooleanFilter(){this.define({booleans:[i.Array,null]})}compute_indices(e){const n=this.booleans;return null!=n&&n.length>0?a.every(n,s.isBoolean)?(n.length!==e.get_length()&&r.logger.warn(this+\": length of booleans doesn't match data source\"),a.range(0,n.length).filter(e=>!0===n[e])):(r.logger.warn(this+\": booleans should be array of booleans, defaulting to no filtering\"),null):(null!=n&&0==n.length?r.logger.warn(this+\": booleans is empty, defaulting to no filtering\"):r.logger.warn(this+\": booleans was not set, defaulting to no filtering\"),null)}}t.BooleanFilter=g,g.__name__=\"BooleanFilter\",g.init_BooleanFilter()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(1),n=e(71),l=i.__importStar(e(18)),o=e(8),s=e(9),a=e(72);class f extends n.Model{constructor(e){super(e)}static init_Filter(){this.define({filter:[l.Array,null]})}compute_indices(e){const t=this.filter;return null!=t?o.isArrayOf(t,o.isBoolean)?s.range(0,t.length).filter(e=>!0===t[e]):o.isArrayOf(t,o.isInteger)?t:(a.logger.warn(this+\": filter should either be array of only booleans or only integers, defaulting to no filtering\"),null):(a.logger.warn(this+\": filter was not set to be an array, defaulting to no filtering\"),null)}}r.Filter=f,f.__name__=\"Filter\",f.init_Filter()},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),r=t(200),n=i.__importStar(t(18)),u=t(17),c=t(24);class o extends r.Filter{constructor(t){super(t)}static init_CustomJSFilter(){this.define({args:[n.Any,{}],code:[n.String,\"\"]})}get names(){return u.keys(this.args)}get values(){return u.values(this.args)}get func(){const t=c.use_strict(this.code);return new Function(...this.names,\"source\",t)}compute_indices(t){return this.filter=this.func(...this.values,t),super.compute_indices(t)}}s.CustomJSFilter=o,o.__name__=\"CustomJSFilter\",o.init_CustomJSFilter()},\n",
" function _(t,n,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=t(1),r=t(200),o=e.__importStar(t(18)),u=t(72),l=t(9);class s extends r.Filter{constructor(t){super(t),this.indices=null}static init_GroupFilter(){this.define({column_name:[o.String],group:[o.String]})}compute_indices(t){const n=t.get_column(this.column_name);return null==n?(u.logger.warn(\"group filter: groupby column not found in data source\"),null):(this.indices=l.range(0,t.get_length()||0).filter(t=>n[t]===this.group),0===this.indices.length&&u.logger.warn(`group filter: group '${this.group}' did not match any values in column '${this.column_name}'`),this.indices)}}i.GroupFilter=s,s.__name__=\"GroupFilter\",s.init_GroupFilter()},\n",
" function _(e,i,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(1),r=e(200),s=t.__importStar(e(18)),l=e(72),d=e(8),o=e(9);class c extends r.Filter{constructor(e){super(e)}static init_IndexFilter(){this.define({indices:[s.Array,null]})}compute_indices(e){return null!=this.indices?o.every(this.indices,d.isInteger)?this.indices:(l.logger.warn(this+\": indices should be array of integers, defaulting to no filtering\"),null):(l.logger.warn(this+\": indices was not set, defaulting to no filtering\"),null)}}n.IndexFilter=c,c.__name__=\"IndexFilter\",c.init_IndexFilter()},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const r=t(1),s=t(114),i=r.__importStar(t(18)),c=t(17),a=t(24);class u extends s.TickFormatter{constructor(t){super(t)}static init_FuncTickFormatter(){this.define({args:[i.Any,{}],code:[i.String,\"\"]})}get names(){return c.keys(this.args)}get values(){return c.values(this.args)}_make_func(){const t=a.use_strict(this.code);return new Function(\"tick\",\"index\",\"ticks\",...this.names,t)}doFormat(t,e){const n=this._make_func().bind({});return t.map((t,e,r)=>n(t,e,r,...this.values))}}n.FuncTickFormatter=u,u.__name__=\"FuncTickFormatter\",u.init_FuncTickFormatter()},\n",
" function _(r,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const e=r(1),o=e.__importStar(r(161)),a=r(114),i=e.__importStar(r(18));class u extends a.TickFormatter{constructor(r){super(r)}static init_NumeralTickFormatter(){this.define({format:[i.String,\"0,0\"],language:[i.String,\"en\"],rounding:[i.RoundingFunction,\"round\"]})}get _rounding_fn(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}}doFormat(r,t){const{format:n,language:e,_rounding_fn:a}=this;return r.map(r=>o.format(r,n,e,a))}}n.NumeralTickFormatter=u,u.__name__=\"NumeralTickFormatter\",u.init_NumeralTickFormatter()},\n",
" function _(t,r,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=t(1),n=t(114),o=t(160),a=e.__importStar(t(18));class c extends n.TickFormatter{constructor(t){super(t)}static init_PrintfTickFormatter(){this.define({format:[a.String,\"%s\"]})}doFormat(t,r){return t.map(t=>o.sprintf(this.format,t))}}i.PrintfTickFormatter=c,c.__name__=\"PrintfTickFormatter\",c.init_PrintfTickFormatter()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(84),n=e(92),a=e(23),_=i.__importStar(e(18)),o=e(10),h=e(79);class u extends r.XYGlyphView{_map_data(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius,this._angle=new Float32Array(this._start_angle.length);for(let e=0,t=this._start_angle.length;e<t;e++)this._angle[e]=this._end_angle[e]-this._start_angle[e]}_render(e,t,{sx:s,sy:i,_start_angle:r,_angle:n,sinner_radius:a,souter_radius:_}){const o=this.model.properties.direction.value();for(const h of t)isNaN(s[h]+i[h]+a[h]+_[h]+r[h]+n[h])||(e.translate(s[h],i[h]),e.rotate(r[h]),e.moveTo(_[h],0),e.beginPath(),e.arc(0,0,_[h],0,n[h],o),e.rotate(n[h]),e.lineTo(a[h],0),e.arc(0,0,a[h],0,-n[h],!o),e.closePath(),e.rotate(-n[h]-r[h]),e.translate(-s[h],-i[h]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,h),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,h),e.stroke()))}_hit_point(e){const{sx:t,sy:s}=e,i=this.renderer.xscale.invert(t),r=this.renderer.yscale.invert(s);let n,a,_,u;if(\"data\"==this.model.properties.outer_radius.units)n=i-this.max_outer_radius,_=i+this.max_outer_radius,a=r-this.max_outer_radius,u=r+this.max_outer_radius;else{const e=t-this.max_outer_radius,i=t+this.max_outer_radius;[n,_]=this.renderer.xscale.r_invert(e,i);const r=s-this.max_outer_radius,o=s+this.max_outer_radius;[a,u]=this.renderer.yscale.r_invert(r,o)}const d=[];for(const e of this.index.indices({x0:n,x1:_,y0:a,y1:u})){const t=this.souter_radius[e]**2,s=this.sinner_radius[e]**2,[n,a]=this.renderer.xscale.r_compute(i,this._x[e]),[_,o]=this.renderer.yscale.r_compute(r,this._y[e]),h=(n-a)**2+(_-o)**2;h<=t&&h>=s&&d.push([e,h])}const l=this.model.properties.direction.value(),c=[];for(const[e,i]of d){const r=Math.atan2(s-this.sy[e],t-this.sx[e]);o.angle_between(-r,-this._start_angle[e],-this._end_angle[e],l)&&c.push([e,i])}return h.Selection.from_hits(c)}draw_legend_for_index(e,t,s){n.generic_area_legend(this.visuals,e,t,s)}_scenterxy(e){const t=(this.sinner_radius[e]+this.souter_radius[e])/2,s=(this._start_angle[e]+this._end_angle[e])/2;return{x:this.sx[e]+t*Math.cos(s),y:this.sy[e]+t*Math.sin(s)}}scenterx(e){return this._scenterxy(e).x}scentery(e){return this._scenterxy(e).y}}s.AnnularWedgeView=u,u.__name__=\"AnnularWedgeView\";class d extends r.XYGlyph{constructor(e){super(e)}static init_AnnularWedge(){this.prototype.default_view=u,this.mixins([a.LineVector,a.FillVector]),this.define({direction:[_.Direction,\"anticlock\"],inner_radius:[_.DistanceSpec],outer_radius:[_.DistanceSpec],start_angle:[_.AngleSpec],end_angle:[_.AngleSpec]})}}s.AnnularWedge=d,d.__name__=\"AnnularWedge\",d.init_AnnularWedge()},\n",
" function _(s,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const t=s(1),r=s(84),a=s(23),n=t.__importStar(s(18)),_=s(28),u=s(79);class o extends r.XYGlyphView{_map_data(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius}_render(s,i,{sx:e,sy:t,sinner_radius:r,souter_radius:a}){for(const n of i)if(!isNaN(e[n]+t[n]+r[n]+a[n])){if(this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(s,n),s.beginPath(),_.is_ie)for(const i of[!1,!0])s.arc(e[n],t[n],r[n],0,Math.PI,i),s.arc(e[n],t[n],a[n],Math.PI,0,!i);else s.arc(e[n],t[n],r[n],0,2*Math.PI,!0),s.arc(e[n],t[n],a[n],2*Math.PI,0,!1);s.fill()}this.visuals.line.doit&&(this.visuals.line.set_vectorize(s,n),s.beginPath(),s.arc(e[n],t[n],r[n],0,2*Math.PI),s.moveTo(e[n]+a[n],t[n]),s.arc(e[n],t[n],a[n],0,2*Math.PI),s.stroke())}}_hit_point(s){const{sx:i,sy:e}=s,t=this.renderer.xscale.invert(i),r=this.renderer.yscale.invert(e);let a,n,_,o;if(\"data\"==this.model.properties.outer_radius.units)a=t-this.max_outer_radius,_=t+this.max_outer_radius,n=r-this.max_outer_radius,o=r+this.max_outer_radius;else{const s=i-this.max_outer_radius,t=i+this.max_outer_radius;[a,_]=this.renderer.xscale.r_invert(s,t);const r=e-this.max_outer_radius,u=e+this.max_outer_radius;[n,o]=this.renderer.yscale.r_invert(r,u)}const h=[];for(const s of this.index.indices({x0:a,x1:_,y0:n,y1:o})){const i=this.souter_radius[s]**2,e=this.sinner_radius[s]**2,[a,n]=this.renderer.xscale.r_compute(t,this._x[s]),[_,u]=this.renderer.yscale.r_compute(r,this._y[s]),o=(a-n)**2+(_-u)**2;o<=i&&o>=e&&h.push([s,o])}return u.Selection.from_hits(h)}draw_legend_for_index(s,{x0:i,y0:e,x1:t,y1:r},a){const n=a+1,_=new Array(n);_[a]=(i+t)/2;const u=new Array(n);u[a]=(e+r)/2;const o=.5*Math.min(Math.abs(t-i),Math.abs(r-e)),h=new Array(n);h[a]=.4*o;const d=new Array(n);d[a]=.8*o,this._render(s,[a],{sx:_,sy:u,sinner_radius:h,souter_radius:d})}}e.AnnulusView=o,o.__name__=\"AnnulusView\";class h extends r.XYGlyph{constructor(s){super(s)}static init_Annulus(){this.prototype.default_view=o,this.mixins([a.LineVector,a.FillVector]),this.define({inner_radius:[n.DistanceSpec],outer_radius:[n.DistanceSpec]})}}e.Annulus=h,h.__name__=\"Annulus\",h.init_Annulus()},\n",
" function _(e,i,s){Object.defineProperty(s,\"__esModule\",{value:!0});const t=e(1),r=e(84),n=e(92),a=e(23),_=t.__importStar(e(18));class c extends r.XYGlyphView{_map_data(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius}_render(e,i,{sx:s,sy:t,sradius:r,_start_angle:n,_end_angle:a}){if(this.visuals.line.doit){const _=this.model.properties.direction.value();for(const c of i)isNaN(s[c]+t[c]+r[c]+n[c]+a[c])||(e.beginPath(),e.arc(s[c],t[c],r[c],n[c],a[c],_),this.visuals.line.set_vectorize(e,c),e.stroke())}}draw_legend_for_index(e,i,s){n.generic_line_legend(this.visuals,e,i,s)}}s.ArcView=c,c.__name__=\"ArcView\";class d extends r.XYGlyph{constructor(e){super(e)}static init_Arc(){this.prototype.default_view=c,this.mixins(a.LineVector),this.define({direction:[_.Direction,\"anticlock\"],radius:[_.DistanceSpec],start_angle:[_.AngleSpec],end_angle:[_.AngleSpec]})}}s.Arc=d,d.__name__=\"Arc\",d.init_Arc()},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(23),n=t(85),c=t(89),o=t(92);function r(t,e,i,s,n,c,o,r){const h=[],_=[[],[]];for(let _=0;_<=2;_++){let a,x,l;if(0===_?(x=6*t-12*i+6*n,a=-3*t+9*i-9*n+3*o,l=3*i-3*t):(x=6*e-12*s+6*c,a=-3*e+9*s-9*c+3*r,l=3*s-3*e),Math.abs(a)<1e-12){if(Math.abs(x)<1e-12)continue;const t=-l/x;0<t&&t<1&&h.push(t);continue}const y=x*x-4*l*a,u=Math.sqrt(y);if(y<0)continue;const d=(-x+u)/(2*a);0<d&&d<1&&h.push(d);const f=(-x-u)/(2*a);0<f&&f<1&&h.push(f)}let a=h.length;const x=a;for(;a--;){const x=h[a],l=1-x,y=l*l*l*t+3*l*l*x*i+3*l*x*x*n+x*x*x*o;_[0][a]=y;const u=l*l*l*e+3*l*l*x*s+3*l*x*x*c+x*x*x*r;_[1][a]=u}return _[0][x]=t,_[1][x]=e,_[0][x+1]=o,_[1][x+1]=r,[Math.min(..._[0]),Math.max(..._[1]),Math.max(..._[0]),Math.min(..._[1])]}class h extends c.GlyphView{_index_data(){const t=[];for(let e=0,i=this._x0.length;e<i;e++){if(isNaN(this._x0[e]+this._x1[e]+this._y0[e]+this._y1[e]+this._cx0[e]+this._cy0[e]+this._cx1[e]+this._cy1[e]))continue;const[i,s,n,c]=r(this._x0[e],this._y0[e],this._x1[e],this._y1[e],this._cx0[e],this._cy0[e],this._cx1[e],this._cy1[e]);t.push({x0:i,y0:s,x1:n,y1:c,i:e})}return new n.SpatialIndex(t)}_render(t,e,{sx0:i,sy0:s,sx1:n,sy1:c,scx0:o,scy0:r,scx1:h,scy1:_}){if(this.visuals.line.doit)for(const a of e)isNaN(i[a]+s[a]+n[a]+c[a]+o[a]+r[a]+h[a]+_[a])||(t.beginPath(),t.moveTo(i[a],s[a]),t.bezierCurveTo(o[a],r[a],h[a],_[a],n[a],c[a]),this.visuals.line.set_vectorize(t,a),t.stroke())}draw_legend_for_index(t,e,i){o.generic_line_legend(this.visuals,t,e,i)}scenterx(){throw new Error(\"not implemented\")}scentery(){throw new Error(\"not implemented\")}}i.BezierView=h,h.__name__=\"BezierView\";class _ extends c.Glyph{constructor(t){super(t)}static init_Bezier(){this.prototype.default_view=h,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx0\",\"cy0\"],[\"cx1\",\"cy1\"]]),this.mixins(s.LineVector)}}i.Bezier=_,_.__name__=\"Bezier\",_.init_Bezier()},\n",
" function _(s,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const t=s(1),r=s(84),a=s(23),n=t.__importStar(s(93)),h=t.__importStar(s(18)),d=s(9),_=s(12),l=s(79);class c extends r.XYGlyphView{_map_data(){if(null!=this._radius)if(\"data\"==this.model.properties.radius.units)switch(this.model.radius_dimension){case\"x\":this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius);break;case\"y\":this.sradius=this.sdist(this.renderer.yscale,this._y,this._radius);break;case\"max\":{const s=this.sdist(this.renderer.xscale,this._x,this._radius),i=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=_.map(s,(s,e)=>Math.max(s,i[e]));break}case\"min\":{const s=this.sdist(this.renderer.xscale,this._x,this._radius),i=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=_.map(s,(s,e)=>Math.min(s,i[e]));break}}else this.sradius=this._radius,this.max_size=2*this.max_radius;else this.sradius=_.map(this._size,s=>s/2)}_mask_data(){const[s,i]=this.renderer.plot_view.frame.bbox.ranges;let e,t,r,a;if(null!=this._radius&&\"data\"==this.model.properties.radius.units){const n=s.start,h=s.end;[e,r]=this.renderer.xscale.r_invert(n,h),e-=this.max_radius,r+=this.max_radius;const d=i.start,_=i.end;[t,a]=this.renderer.yscale.r_invert(d,_),t-=this.max_radius,a+=this.max_radius}else{const n=s.start-this.max_size,h=s.end+this.max_size;[e,r]=this.renderer.xscale.r_invert(n,h);const d=i.start-this.max_size,_=i.end+this.max_size;[t,a]=this.renderer.yscale.r_invert(d,_)}return this.index.indices({x0:e,x1:r,y0:t,y1:a})}_render(s,i,{sx:e,sy:t,sradius:r}){for(const a of i)isNaN(e[a]+t[a]+r[a])||(s.beginPath(),s.arc(e[a],t[a],r[a],0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(s,a),s.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(s,a),s.stroke()))}_hit_point(s){const{sx:i,sy:e}=s,t=this.renderer.xscale.invert(i),r=this.renderer.yscale.invert(e);let a,n,h,d;if(null!=this._radius&&\"data\"==this.model.properties.radius.units)a=t-this.max_radius,n=t+this.max_radius,h=r-this.max_radius,d=r+this.max_radius;else{const s=i-this.max_size,t=i+this.max_size;[a,n]=this.renderer.xscale.r_invert(s,t);const r=e-this.max_size,_=e+this.max_size;[h,d]=this.renderer.yscale.r_invert(r,_)}const _=this.index.indices({x0:a,x1:n,y0:h,y1:d}),c=[];if(null!=this._radius&&\"data\"==this.model.properties.radius.units)for(const s of _){const i=this.sradius[s]**2,[e,a]=this.renderer.xscale.r_compute(t,this._x[s]),[n,h]=this.renderer.yscale.r_compute(r,this._y[s]),d=(e-a)**2+(n-h)**2;d<=i&&c.push([s,d])}else for(const s of _){const t=this.sradius[s]**2,r=(this.sx[s]-i)**2+(this.sy[s]-e)**2;r<=t&&c.push([s,r])}return l.Selection.from_hits(c)}_hit_span(s){const{sx:i,sy:e}=s,t=this.bounds();let r,a,n,h;if(\"h\"==s.direction){let s,e;if(n=t.y0,h=t.y1,null!=this._radius&&\"data\"==this.model.properties.radius.units)s=i-this.max_radius,e=i+this.max_radius,[r,a]=this.renderer.xscale.r_invert(s,e);else{const t=this.max_size/2;s=i-t,e=i+t,[r,a]=this.renderer.xscale.r_invert(s,e)}}else{let s,i;if(r=t.x0,a=t.x1,null!=this._radius&&\"data\"==this.model.properties.radius.units)s=e-this.max_radius,i=e+this.max_radius,[n,h]=this.renderer.yscale.r_invert(s,i);else{const t=this.max_size/2;s=e-t,i=e+t,[n,h]=this.renderer.yscale.r_invert(s,i)}}const d=this.index.indices({x0:r,x1:a,y0:n,y1:h});return new l.Selection({indices:d})}_hit_rect(s){const{sx0:i,sx1:e,sy0:t,sy1:r}=s,[a,n]=this.renderer.xscale.r_invert(i,e),[h,d]=this.renderer.yscale.r_invert(t,r),_=this.index.indices({x0:a,x1:n,y0:h,y1:d});return new l.Selection({indices:_})}_hit_poly(s){const{sx:i,sy:e}=s,t=d.range(0,this.sx.length),r=[];for(let s=0,a=t.length;s<a;s++){const a=t[s];n.point_in_poly(this.sx[s],this.sy[s],i,e)&&r.push(a)}return new l.Selection({indices:r})}draw_legend_for_index(s,{x0:i,y0:e,x1:t,y1:r},a){const n=a+1,h=new Array(n);h[a]=(i+t)/2;const d=new Array(n);d[a]=(e+r)/2;const _=new Array(n);_[a]=.2*Math.min(Math.abs(t-i),Math.abs(r-e)),this._render(s,[a],{sx:h,sy:d,sradius:_})}}e.CircleView=c,c.__name__=\"CircleView\";class o extend
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const a=e(1),i=e(84),l=e(23),s=a.__importStar(e(18));class c extends i.XYGlyphView{}n.CenterRotatableView=c,c.__name__=\"CenterRotatableView\";class o extends i.XYGlyph{constructor(e){super(e)}static init_CenterRotatable(){this.mixins([l.LineVector,l.FillVector]),this.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]})}}n.CenterRotatable=o,o.__name__=\"CenterRotatable\",o.init_CenterRotatable()},\n",
" function _(e,l,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(216);class t extends s.EllipseOvalView{}i.EllipseView=t,t.__name__=\"EllipseView\";class _ extends s.EllipseOval{constructor(e){super(e)}static init_Ellipse(){this.prototype.default_view=t}}i.Ellipse=_,_.__name__=\"Ellipse\",_.init_Ellipse()},\n",
" function _(t,s,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=t(1),h=t(214),r=e.__importStar(t(93)),a=t(79);class _ extends h.CenterRotatableView{_set_data(){this.max_w2=0,\"data\"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)}_map_data(){\"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}_render(t,s,{sx:i,sy:e,sw:h,sh:r,_angle:a}){for(const _ of s)isNaN(i[_]+e[_]+h[_]+r[_]+a[_])||(t.beginPath(),t.ellipse(i[_],e[_],h[_]/2,r[_]/2,a[_],0,2*Math.PI),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,_),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,_),t.stroke()))}_hit_point(t){let s,i,e,h,_,n,l,d,o,x;const{sx:m,sy:c}=t,w=this.renderer.xscale.invert(m),p=this.renderer.yscale.invert(c);\"data\"==this.model.properties.width.units?(s=w-this.max_width,i=w+this.max_width):(l=m-this.max_width,d=m+this.max_width,[s,i]=this.renderer.xscale.r_invert(l,d)),\"data\"==this.model.properties.height.units?(e=p-this.max_height,h=p+this.max_height):(o=c-this.max_height,x=c+this.max_height,[e,h]=this.renderer.yscale.r_invert(o,x));const y=this.index.indices({x0:s,x1:i,y0:e,y1:h}),u=[];for(const t of y)_=r.point_in_ellipse(m,c,this._angle[t],this.sh[t]/2,this.sw[t]/2,this.sx[t],this.sy[t]),_&&([l,d]=this.renderer.xscale.r_compute(w,this._x[t]),[o,x]=this.renderer.yscale.r_compute(p,this._y[t]),n=(l-d)**2+(o-x)**2,u.push([t,n]));return a.Selection.from_hits(u)}draw_legend_for_index(t,{x0:s,y0:i,x1:e,y1:h},r){const a=r+1,_=new Array(a);_[r]=(s+e)/2;const n=new Array(a);n[r]=(i+h)/2;const l=this.sw[r]/this.sh[r],d=.8*Math.min(Math.abs(e-s),Math.abs(h-i)),o=new Array(a),x=new Array(a);l>1?(o[r]=d,x[r]=d/l):(o[r]=d*l,x[r]=d),this._render(t,[r],{sx:_,sy:n,sw:o,sh:x,_angle:[0]})}_bounds({x0:t,x1:s,y0:i,y1:e}){return{x0:t-this.max_w2,x1:s+this.max_w2,y0:i-this.max_h2,y1:e+this.max_h2}}}i.EllipseOvalView=_,_.__name__=\"EllipseOvalView\";class n extends h.CenterRotatable{constructor(t){super(t)}}i.EllipseOval=n,n.__name__=\"EllipseOval\"},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1),h=t(218),r=i.__importStar(t(18));class _ extends h.BoxView{scenterx(t){return(this.sleft[t]+this.sright[t])/2}scentery(t){return this.sy[t]}_index_data(){return this._index_box(this._y.length)}_lrtb(t){return[Math.min(this._left[t],this._right[t]),Math.max(this._left[t],this._right[t]),this._y[t]+.5*this._height[t],this._y[t]-.5*this._height[t]]}_map_data(){this.sy=this.renderer.yscale.v_compute(this._y),this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"),this.sleft=this.renderer.xscale.v_compute(this._left),this.sright=this.renderer.xscale.v_compute(this._right);const t=this.sy.length;this.stop=new Float64Array(t),this.sbottom=new Float64Array(t);for(let s=0;s<t;s++)this.stop[s]=this.sy[s]-this.sh[s]/2,this.sbottom[s]=this.sy[s]+this.sh[s]/2;this._clamp_viewport()}}e.HBarView=_,_.__name__=\"HBarView\";class a extends h.Box{constructor(t){super(t)}static init_HBar(){this.prototype.default_view=_,this.coords([[\"left\",\"y\"]]),this.define({height:[r.NumberSpec],right:[r.CoordinateSpec]}),this.override({left:0})}}e.HBar=a,a.__name__=\"HBar\",a.init_HBar()},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(23),r=t(85),n=t(89),h=t(92),o=t(79);class a extends n.GlyphView{get_anchor_point(t,e,i){const s=Math.min(this.sleft[e],this.sright[e]),r=Math.max(this.sright[e],this.sleft[e]),n=Math.min(this.stop[e],this.sbottom[e]),h=Math.max(this.sbottom[e],this.stop[e]);switch(t){case\"top_left\":return{x:s,y:n};case\"top_center\":return{x:(s+r)/2,y:n};case\"top_right\":return{x:r,y:n};case\"bottom_left\":return{x:s,y:h};case\"bottom_center\":return{x:(s+r)/2,y:h};case\"bottom_right\":return{x:r,y:h};case\"center_left\":return{x:s,y:(n+h)/2};case\"center\":return{x:(s+r)/2,y:(n+h)/2};case\"center_right\":return{x:r,y:(n+h)/2};default:return null}}_index_box(t){const e=[];for(let i=0;i<t;i++){const[t,s,r,n]=this._lrtb(i);!isNaN(t+s+r+n)&&isFinite(t+s+r+n)&&e.push({x0:Math.min(t,s),y0:Math.min(r,n),x1:Math.max(s,t),y1:Math.max(r,n),i})}return new r.SpatialIndex(e)}_render(t,e,{sleft:i,sright:s,stop:r,sbottom:n}){for(const h of e)isNaN(i[h]+r[h]+s[h]+n[h])||(t.rect(i[h],r[h],s[h]-i[h],n[h]-r[h]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,h),t.beginPath(),t.rect(i[h],r[h],s[h]-i[h],n[h]-r[h]),t.fill()),this.visuals.hatch.doit2(t,h,()=>{t.beginPath(),t.rect(i[h],r[h],s[h]-i[h],n[h]-r[h]),t.fill()},()=>this.renderer.request_render()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,h),t.beginPath(),t.rect(i[h],r[h],s[h]-i[h],n[h]-r[h]),t.stroke()))}_clamp_viewport(){const t=this.renderer.plot_view.frame.bbox.h_range,e=this.renderer.plot_view.frame.bbox.v_range,i=this.stop.length;for(let s=0;s<i;s++)this.stop[s]=Math.max(this.stop[s],e.start),this.sbottom[s]=Math.min(this.sbottom[s],e.end),this.sleft[s]=Math.max(this.sleft[s],t.start),this.sright[s]=Math.min(this.sright[s],t.end)}_hit_rect(t){return this._hit_rect_against_index(t)}_hit_point(t){const{sx:e,sy:i}=t,s=this.renderer.xscale.invert(e),r=this.renderer.yscale.invert(i),n=this.index.indices({x0:s,y0:r,x1:s,y1:r});return new o.Selection({indices:n})}_hit_span(t){const{sx:e,sy:i}=t;let s;if(\"v\"==t.direction){const t=this.renderer.yscale.invert(i),e=this.renderer.plot_view.frame.bbox.h_range,[r,n]=this.renderer.xscale.r_invert(e.start,e.end);s=this.index.indices({x0:r,y0:t,x1:n,y1:t})}else{const t=this.renderer.xscale.invert(e),i=this.renderer.plot_view.frame.bbox.v_range,[r,n]=this.renderer.yscale.r_invert(i.start,i.end);s=this.index.indices({x0:t,y0:r,x1:t,y1:n})}return new o.Selection({indices:s})}draw_legend_for_index(t,e,i){h.generic_area_legend(this.visuals,t,e,i)}}i.BoxView=a,a.__name__=\"BoxView\";class c extends n.Glyph{constructor(t){super(t)}static init_Box(){this.mixins([s.LineVector,s.FillVector,s.HatchVector])}}i.Box=c,c.__name__=\"Box\",c.init_Box()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(89),n=i.__importStar(e(93)),o=i.__importStar(e(18)),a=e(23),l=e(85),h=e(92),c=e(79);class _ extends r.GlyphView{scenterx(e){return this.sx[e]}scentery(e){return this.sy[e]}_set_data(){const e=this._q.length,t=this.model.size,s=this.model.aspect_scale;if(this._x=new Float64Array(e),this._y=new Float64Array(e),\"pointytop\"==this.model.orientation)for(let i=0;i<e;i++)this._x[i]=t*Math.sqrt(3)*(this._q[i]+this._r[i]/2)/s,this._y[i]=3*-t/2*this._r[i];else for(let i=0;i<e;i++)this._x[i]=3*t/2*this._q[i],this._y[i]=-t*Math.sqrt(3)*(this._r[i]+this._q[i]/2)*s}_index_data(){let e=this.model.size,t=Math.sqrt(3)*e/2;\"flattop\"==this.model.orientation?([t,e]=[e,t],e*=this.model.aspect_scale):t/=this.model.aspect_scale;const s=[];for(let i=0;i<this._x.length;i++){const r=this._x[i],n=this._y[i];!isNaN(r+n)&&isFinite(r+n)&&s.push({x0:r-t,y0:n-e,x1:r+t,y1:n+e,i})}return new l.SpatialIndex(s)}map_data(){[this.sx,this.sy]=this.map_to_screen(this._x,this._y),[this.svx,this.svy]=this._get_unscaled_vertices()}_get_unscaled_vertices(){const e=this.model.size,t=this.model.aspect_scale;if(\"pointytop\"==this.model.orientation){const s=this.renderer.yscale,i=this.renderer.xscale,r=Math.abs(s.compute(0)-s.compute(e)),n=Math.sqrt(3)/2*Math.abs(i.compute(0)-i.compute(e))/t,o=r/2;return[[0,-n,-n,0,n,n],[r,o,-o,-r,-o,o]]}{const s=this.renderer.xscale,i=this.renderer.yscale,r=Math.abs(s.compute(0)-s.compute(e)),n=Math.sqrt(3)/2*Math.abs(i.compute(0)-i.compute(e))*t,o=r/2;return[[r,o,-o,-r,-o,o],[0,-n,-n,0,n,n]]}}_render(e,t,{sx:s,sy:i,svx:r,svy:n,_scale:o}){for(const a of t)if(!isNaN(s[a]+i[a]+o[a])){e.translate(s[a],i[a]),e.beginPath();for(let t=0;t<6;t++)e.lineTo(r[t]*o[a],n[t]*o[a]);e.closePath(),e.translate(-s[a],-i[a]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,a),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,a),e.stroke())}}_hit_point(e){const{sx:t,sy:s}=e,i=this.renderer.xscale.invert(t),r=this.renderer.yscale.invert(s),o=this.index.indices({x0:i,y0:r,x1:i,y1:r}),a=[];for(const e of o)n.point_in_poly(t-this.sx[e],s-this.sy[e],this.svx,this.svy)&&a.push(e);return new c.Selection({indices:a})}_hit_span(e){const{sx:t,sy:s}=e;let i;if(\"v\"==e.direction){const e=this.renderer.yscale.invert(s),t=this.renderer.plot_view.frame.bbox.h_range,[r,n]=this.renderer.xscale.r_invert(t.start,t.end);i=this.index.indices({x0:r,y0:e,x1:n,y1:e})}else{const e=this.renderer.xscale.invert(t),s=this.renderer.plot_view.frame.bbox.v_range,[r,n]=this.renderer.yscale.r_invert(s.start,s.end);i=this.index.indices({x0:e,y0:r,x1:e,y1:n})}return new c.Selection({indices:i})}_hit_rect(e){const{sx0:t,sx1:s,sy0:i,sy1:r}=e,[n,o]=this.renderer.xscale.r_invert(t,s),[a,l]=this.renderer.yscale.r_invert(i,r),h=this.index.indices({x0:n,x1:o,y0:a,y1:l});return new c.Selection({indices:h})}draw_legend_for_index(e,t,s){h.generic_area_legend(this.visuals,e,t,s)}}s.HexTileView=_,_.__name__=\"HexTileView\";class d extends r.Glyph{constructor(e){super(e)}static init_HexTile(){this.prototype.default_view=_,this.coords([[\"r\",\"q\"]]),this.mixins([a.LineVector,a.FillVector]),this.define({size:[o.Number,1],aspect_scale:[o.Number,1],scale:[o.NumberSpec,1],orientation:[o.HexTileOrientation,\"pointytop\"]}),this.override({line_color:null})}}s.HexTile=d,d.__name__=\"HexTile\",d.init_HexTile()},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const _=e(1),i=e(221),n=e(115),s=_.__importStar(e(18));class r extends i.ImageBaseView{connect_signals(){super.connect_signals(),this.connect(this.model.color_mapper.change,()=>this._update_image())}_update_image(){null!=this.image_data&&(this._set_data(null),this.renderer.plot_view.request_render())}_flat_img_to_buf8(e){return this.model.color_mapper.rgba_mapper.v_compute(e)}}a.ImageView=r,r.__name__=\"ImageView\";class o extends i.ImageBase{constructor(e){super(e)}static init_Image(){this.prototype.default_view=r,this.define({color_mapper:[s.Instance,()=>new n.LinearColorMapper({palette:[\"#000000\",\"#252525\",\"#525252\",\"#737373\",\"#969696\",\"#bdbdbd\",\"#d9d9d9\",\"#f0f0f0\",\"#ffffff\"]})]})}}a.Image=o,o.__name__=\"Image\",o.init_Image()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),a=e(84),h=s.__importStar(e(18)),n=e(79),_=e(85),r=e(9),d=e(26);class l extends a.XYGlyphView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.global_alpha.change,()=>this.renderer.request_render())}_render(e,t,{image_data:i,sx:s,sy:a,sw:h,sh:n}){const _=e.getImageSmoothingEnabled();e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.global_alpha;for(const _ of t){if(null==i[_]||isNaN(s[_]+a[_]+h[_]+n[_]))continue;const t=a[_];e.translate(0,t),e.scale(1,-1),e.translate(0,-t),e.drawImage(i[_],0|s[_],0|a[_],h[_],n[_]),e.translate(0,t),e.scale(1,-1),e.translate(0,-t)}e.setImageSmoothingEnabled(_)}_set_data(e){this._set_width_heigh_data();for(let t=0,i=this._image.length;t<i;t++){if(null!=e&&e.indexOf(t)<0)continue;const i=this._image[t];let s;d.is_NDArray(i)?(s=i,this._height[t]=i.shape[0],this._width[t]=i.shape[1]):(s=r.concat(i),this._height[t]=i.length,this._width[t]=i[0].length);const a=this._flat_img_to_buf8(s);this._set_image_data_from_buffer(t,a)}}_index_data(){const e=[];for(let t=0,i=this._x.length;t<i;t++){const[i,s,a,h]=this._lrtb(t);!isNaN(i+s+a+h)&&isFinite(i+s+a+h)&&e.push({x0:i,y0:h,x1:s,y1:a,i:t})}return new _.SpatialIndex(e)}_lrtb(e){const t=this.renderer.xscale.source_range,i=this._x[e],s=t.is_reversed?i-this._dw[e]:i+this._dw[e],a=this.renderer.yscale.source_range,h=this._y[e],n=a.is_reversed?h-this._dh[e]:h+this._dh[e],[_,r]=i<s?[i,s]:[s,i],[d,l]=h<n?[h,n]:[n,h];return[_,r,l,d]}_set_width_heigh_data(){null!=this.image_data&&this.image_data.length==this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length==this._image.length||(this._width=new Array(this._image.length)),null!=this._height&&this._height.length==this._image.length||(this._height=new Array(this._image.length))}_get_or_create_canvas(e){const t=this.image_data[e];if(null!=t&&t.width==this._width[e]&&t.height==this._height[e])return t;{const t=document.createElement(\"canvas\");return t.width=this._width[e],t.height=this._height[e],t}}_set_image_data_from_buffer(e,t){const i=this._get_or_create_canvas(e),s=i.getContext(\"2d\"),a=s.getImageData(0,0,this._width[e],this._height[e]);a.data.set(t),s.putImageData(a,0,0),this.image_data[e]=i}_map_data(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);break;case\"screen\":this.sh=this._dh}}_image_index(e,t,i){const[s,a,h,n]=this._lrtb(e),_=this._width[e],r=this._height[e],d=(a-s)/_,l=(h-n)/r;let g=Math.floor((t-s)/d),o=Math.floor((i-n)/l);return this.renderer.xscale.source_range.is_reversed&&(g=_-g-1),this.renderer.yscale.source_range.is_reversed&&(o=r-o-1),{index:e,dim1:g,dim2:o,flat_index:o*_+g}}_hit_point(e){const{sx:t,sy:i}=e,s=this.renderer.xscale.invert(t),a=this.renderer.yscale.invert(i),h=this.index.indices({x0:s,x1:s,y0:a,y1:a}),_=new n.Selection;for(const e of h)t!=1/0&&i!=1/0&&_.image_indices.push(this._image_index(e,s,a));return _}}i.ImageBaseView=l,l.__name__=\"ImageBaseView\";class g extends a.XYGlyph{constructor(e){super(e)}static init_ImageBase(){this.define({image:[h.NumberSpec],dw:[h.DistanceSpec],dh:[h.DistanceSpec],dilate:[h.Boolean,!1],global_alpha:[h.Number,1]})}}i.ImageBase=g,g.__name__=\"ImageBase\",g.init_ImageBase()},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const _=e(221),i=e(8);class n extends _.ImageBaseView{_flat_img_to_buf8(e){let t;return t=i.isArray(e)?new Uint32Array(e):e,new Uint8Array(t.buffer)}}a.ImageRGBAView=n,n.__name__=\"ImageRGBAView\";class r extends _.ImageBase{constructor(e){super(e)}static init_ImageRGBA(){this.prototype.default_view=n}}a.ImageRGBA=r,r.__name__=\"ImageRGBA\",r.init_ImageRGBA()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(84),a=i.__importStar(e(18)),n=e(12),h=e(85),l=e(224);class _ extends r.XYGlyphView{constructor(){super(...arguments),this._images_rendered=!1}initialize(){super.initialize(),this.connect(this.model.properties.global_alpha.change,()=>this.renderer.request_render())}_index_data(){return new h.SpatialIndex([])}_set_data(){null!=this.image&&this.image.length==this._url.length||(this.image=n.map(this._url,()=>null));const{retry_attempts:e,retry_timeout:t}=this.model;for(let s=0,i=this._url.length;s<i;s++){const i=this._url[s];null!=i&&\"\"!=i&&new l.ImageLoader(i,{loaded:e=>{this.image[s]=e,this.renderer.request_render()},attempts:e+1,timeout:t})}const s=\"data\"==this.model.properties.w.units,i=\"data\"==this.model.properties.h.units,r=this._x.length,a=new Array(s?2*r:r),h=new Array(i?2*r:r);for(let e=0;e<r;e++)a[e]=this._x[e],h[e]=this._y[e];if(s)for(let e=0;e<r;e++)a[r+e]=this._x[e]+this._w[e];if(i)for(let e=0;e<r;e++)h[r+e]=this._y[e]+this._h[e];const _=n.min(a),o=n.max(a),d=n.min(h),c=n.max(h);this._bounds_rect={x0:_,x1:o,y0:d,y1:c}}has_finished(){return super.has_finished()&&1==this._images_rendered}_map_data(){const e=null!=this.model.w?this._w:n.map(this._x,()=>NaN),t=null!=this.model.h?this._h:n.map(this._x,()=>NaN);switch(this.model.properties.w.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,e,\"edge\",this.model.dilate);break;case\"screen\":this.sw=e}switch(this.model.properties.h.units){case\"data\":this.sh=this.sdist(this.renderer.yscale,this._y,t,\"edge\",this.model.dilate);break;case\"screen\":this.sh=t}}_render(e,t,{image:s,sx:i,sy:r,sw:a,sh:n,_angle:h}){const{frame:l}=this.renderer.plot_view;e.rect(l._left.value+1,l._top.value+1,l._width.value-2,l._height.value-2),e.clip();let _=!0;for(const l of t){if(isNaN(i[l]+r[l]+h[l]))continue;const t=s[l];null!=t?this._render_image(e,l,t,i,r,a,n,h):_=!1}_&&!this._images_rendered&&(this._images_rendered=!0,this.notify_finished())}_final_sx_sy(e,t,s,i,r){switch(e){case\"top_left\":return[t,s];case\"top_center\":return[t-i/2,s];case\"top_right\":return[t-i,s];case\"center_right\":return[t-i,s-r/2];case\"bottom_right\":return[t-i,s-r];case\"bottom_center\":return[t-i/2,s-r];case\"bottom_left\":return[t,s-r];case\"center_left\":return[t,s-r/2];case\"center\":return[t-i/2,s-r/2]}}_render_image(e,t,s,i,r,a,n,h){isNaN(a[t])&&(a[t]=s.width),isNaN(n[t])&&(n[t]=s.height);const{anchor:l}=this.model,[_,o]=this._final_sx_sy(l,i[t],r[t],a[t],n[t]);e.save(),e.globalAlpha=this.model.global_alpha;const d=a[t]/2,c=n[t]/2;h[t]?(e.translate(_,o),e.translate(d,c),e.rotate(h[t]),e.translate(-d,-c),e.drawImage(s,0,0,a[t],n[t]),e.translate(d,c),e.rotate(-h[t]),e.translate(-d,-c),e.translate(-_,-o)):e.drawImage(s,_,o,a[t],n[t]),e.restore()}bounds(){return this._bounds_rect}}s.ImageURLView=_,_.__name__=\"ImageURLView\";class o extends r.XYGlyph{constructor(e){super(e)}static init_ImageURL(){this.prototype.default_view=_,this.define({url:[a.StringSpec],anchor:[a.Anchor,\"top_left\"],global_alpha:[a.Number,1],angle:[a.AngleSpec,0],w:[a.DistanceSpec],h:[a.DistanceSpec],dilate:[a.Boolean,!1],retry_attempts:[a.Number,0],retry_timeout:[a.Number,0]})}}s.ImageURL=o,o.__name__=\"ImageURL\",o.init_ImageURL()},\n",
" function _(i,e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=i(72);class a{constructor(i,e={}){this._image=new Image,this._finished=!1;const{attempts:t=1,timeout:a=1}=e;this.promise=new Promise((o,n)=>{this._image.crossOrigin=\"anonymous\";let r=0;this._image.onerror=()=>{if(++r==t){const a=`unable to load ${i} image after ${t} attempts`;if(s.logger.warn(a),null==this._image.crossOrigin)return void(null!=e.failed&&e.failed());s.logger.warn(`attempting to load ${i} without a cross origin policy`),this._image.crossOrigin=null,r=0}setTimeout(()=>this._image.src=i,a)},this._image.onload=()=>{this._finished=!0,null!=e.loaded&&e.loaded(this._image),o(this._image)},this._image.src=i})}get finished(){return this._finished}get image(){return this._image}}t.ImageLoader=a,a.__name__=\"ImageLoader\"},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),n=t(85),l=t(23),o=i.__importStar(t(93)),r=t(9),h=t(17),_=t(89),c=t(92),a=t(79);class x extends _.GlyphView{_index_data(){const t=[];for(let e=0,s=this._xs.length;e<s;e++){if(null==this._xs[e]||0===this._xs[e].length)continue;const s=this._xs[e],i=[];for(let t=0,e=s.length;t<e;t++){const e=s[t];isNaN(e)||i.push(e)}const n=this._ys[e],l=[];for(let t=0,e=n.length;t<e;t++){const e=n[t];isNaN(e)||l.push(e)}const[o,h]=[r.min(i),r.max(i)],[_,c]=[r.min(l),r.max(l)];t.push({x0:o,y0:_,x1:h,y1:c,i:e})}return new n.SpatialIndex(t)}_render(t,e,{sxs:s,sys:i}){for(const n of e){const[e,l]=[s[n],i[n]];this.visuals.line.set_vectorize(t,n);for(let s=0,i=e.length;s<i;s++)0!=s?isNaN(e[s])||isNaN(l[s])?(t.stroke(),t.beginPath()):t.lineTo(e[s],l[s]):(t.beginPath(),t.moveTo(e[s],l[s]));t.stroke()}}_hit_point(t){const e={x:t.sx,y:t.sy};let s=9999;const i=new Map;for(let t=0,n=this.sxs.length;t<n;t++){const n=Math.max(2,this.visuals.line.cache_select(\"line_width\",t)/2);let l=null;for(let i=0,r=this.sxs[t].length-1;i<r;i++){const r={x:this.sxs[t][i],y:this.sys[t][i]},h={x:this.sxs[t][i+1],y:this.sys[t][i+1]},_=o.dist_to_segment(e,r,h);_<n&&_<s&&(s=_,l=[i])}null!=l&&i.set(t,l)}return new a.Selection({indices:[...i.keys()],multiline_indices:h.to_object(i)})}_hit_span(t){const{sx:e,sy:s}=t;let i,n;\"v\"===t.direction?(i=this.renderer.yscale.invert(s),n=this._ys):(i=this.renderer.xscale.invert(e),n=this._xs);const l=new Map;for(let t=0,e=n.length;t<e;t++){const e=[];for(let s=0,l=n[t].length-1;s<l;s++)n[t][s]<=i&&i<=n[t][s+1]&&e.push(s);e.length>0&&l.set(t,e)}return new a.Selection({indices:[...l.keys()],multiline_indices:h.to_object(l)})}get_interpolation_hit(t,e,s){const[i,n,l,o]=[this._xs[t][e],this._ys[t][e],this._xs[t][e+1],this._ys[t][e+1]];return c.line_interpolation(this.renderer,s,i,n,l,o)}draw_legend_for_index(t,e,s){c.generic_line_legend(this.visuals,t,e,s)}scenterx(){throw new Error(\"not implemented\")}scentery(){throw new Error(\"not implemented\")}}s.MultiLineView=x,x.__name__=\"MultiLineView\";class u extends _.Glyph{constructor(t){super(t)}static init_MultiLine(){this.prototype.default_view=x,this.coords([[\"xs\",\"ys\"]]),this.mixins(l.LineVector)}}s.MultiLine=u,u.__name__=\"MultiLine\",u.init_MultiLine()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),n=e(85),r=e(89),o=e(92),l=e(9),h=e(12),_=e(23),a=i.__importStar(e(93)),c=e(79),d=e(8),x=e(11);class y extends r.GlyphView{_index_data(){const e=[];for(let t=0,s=this._xs.length;t<s;t++)for(let s=0,i=this._xs[t].length;s<i;s++){const i=this._xs[t][s][0],n=this._ys[t][s][0];0!=i.length&&e.push({x0:l.min(i),y0:l.min(n),x1:l.max(i),y1:l.max(n),i:t})}return this.hole_index=this._index_hole_data(),new n.SpatialIndex(e)}_index_hole_data(){const e=[];for(let t=0,s=this._xs.length;t<s;t++)for(let s=0,i=this._xs[t].length;s<i;s++)if(this._xs[t][s].length>1)for(let i=1,n=this._xs[t][s].length;i<n;i++){const n=this._xs[t][s][i],r=this._ys[t][s][i];0!=n.length&&e.push({x0:l.min(n),y0:l.min(r),x1:l.max(n),y1:l.max(r),i:t})}return new n.SpatialIndex(e)}_mask_data(){const e=this.renderer.plot_view.frame.x_ranges.default,[t,s]=[e.min,e.max],i=this.renderer.plot_view.frame.y_ranges.default,[n,r]=[i.min,i.max];return this.index.indices({x0:t,x1:s,y0:n,y1:r}).sort((e,t)=>e-t).filter((e,t,s)=>0===t||e!==s[t-1])}_inner_loop(e,t,s){e.beginPath();for(let i=0,n=t.length;i<n;i++)for(let n=0,r=t[i].length;n<r;n++){const r=t[i][n],o=s[i][n];for(let t=0,s=r.length;t<s;t++)0!=t?e.lineTo(r[t],o[t]):e.moveTo(r[t],o[t]);e.closePath()}}_render(e,t,{sxs:s,sys:i}){if(this.visuals.fill.doit||this.visuals.line.doit)for(const n of t){const[t,r]=[s[n],i[n]];this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,n),this._inner_loop(e,t,r),e.fill(\"evenodd\")),this.visuals.hatch.doit2(e,n,()=>{this._inner_loop(e,t,r),e.fill(\"evenodd\")},()=>this.renderer.request_render()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,n),this._inner_loop(e,t,r),e.stroke())}}_hit_rect(e){const{sx0:t,sx1:s,sy0:i,sy1:n}=e,r=[t,s,s,t],o=[i,i,n,n],[l,h]=this.renderer.xscale.r_invert(t,s),[_,d]=this.renderer.yscale.r_invert(i,n),x=this.index.indices({x0:l,x1:h,y0:_,y1:d}),y=[];for(let e=0,t=x.length;e<t;e++){const t=x[e],s=this.sxs[t],i=this.sys[t];let n=!0;for(let e=0,t=s.length;e<t;e++){for(let t=0,l=s[e][0].length;t<l;t++){const l=s[e][0][t],h=i[e][0][t];if(!a.point_in_poly(l,h,r,o)){n=!1;break}}if(!n)break}n&&y.push(t)}return new c.Selection({indices:y})}_hit_point(e){const{sx:t,sy:s}=e,i=this.renderer.xscale.invert(t),n=this.renderer.yscale.invert(s),r=this.index.indices({x0:i,y0:n,x1:i,y1:n}),o=this.hole_index.indices({x0:i,y0:n,x1:i,y1:n}),l=[];for(let e=0,i=r.length;e<i;e++){const i=r[e],n=this.sxs[i],h=this.sys[i];for(let e=0,r=n.length;e<r;e++){const r=n[e].length;if(a.point_in_poly(t,s,n[e][0],h[e][0]))if(1==r)l.push(i);else if(-1==o.indexOf(i))l.push(i);else if(r>1){let o=!1;for(let i=1;i<r;i++){const r=n[e][i],l=h[e][i];if(a.point_in_poly(t,s,r,l)){o=!0;break}}o||l.push(i)}}}return new c.Selection({indices:l})}_get_snap_coord(e){return h.sum(e)/e.length}scenterx(e,t,s){if(1==this.sxs[e].length)return this._get_snap_coord(this.sxs[e][0][0]);{const i=this.sxs[e],n=this.sys[e];for(let e=0,r=i.length;e<r;e++)if(a.point_in_poly(t,s,i[e][0],n[e][0]))return this._get_snap_coord(i[e][0])}x.unreachable()}scentery(e,t,s){if(1==this.sys[e].length)return this._get_snap_coord(this.sys[e][0][0]);{const i=this.sxs[e],n=this.sys[e];for(let e=0,r=i.length;e<r;e++)if(a.point_in_poly(t,s,i[e][0],n[e][0]))return this._get_snap_coord(n[e][0])}x.unreachable()}map_data(){const e=this;for(let[t,s]of this.model._coords){const i=\"s\"+t,n=\"s\"+s;if(t=\"_\"+t,s=\"_\"+s,null!=e[t]&&(d.isArray(e[t][0])||d.isTypedArray(e[t][0]))){const r=e[t].length;e[i]=new Array(r),e[n]=new Array(r);for(let o=0;o<r;o++){const r=e[t][o].length;e[i][o]=new Array(r),e[n][o]=new Array(r);for(let l=0;l<r;l++){const r=e[t][o][l].length;e[i][o][l]=new Array(r),e[n][o][l]=new Array(r);for(let h=0;h<r;h++){const[r,_]=this.map_to_screen(e[t][o][l][h],e[s][o][l][h]);e[i][o][l][h]=r,e[n][o][l][h]=_}}}}}}draw_legend_for_index(e,t,s){o.generic_area_legend(this.visuals,e,t,s)}}s.MultiPolygonsView=y,y.__name__=\"MultiPolygonsView\";class f extends r.Glyph{constructor(e){super(e)}static init_MultiPolygons(){this.prototy
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const l=e(216);class s extends l.EllipseOvalView{_map_data(){super._map_data();const{sw:e}=this,t=e.length;for(let a=0;a<t;a++)e[a]*=.75}}a.OvalView=s,s.__name__=\"OvalView\";class _ extends l.EllipseOval{constructor(e){super(e)}static init_Oval(){this.prototype.default_view=s}}a.Oval=_,_.__name__=\"Oval\",_.init_Oval()},\n",
" function _(s,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=s(1),n=s(85),r=s(89),o=s(92),l=s(9),_=s(12),h=s(23),c=i.__importStar(s(93)),a=s(79),d=s(11);class u extends r.GlyphView{_build_discontinuous_object(s){const t=[];for(let e=0,i=s.length;e<i;e++){t[e]=[];let i=l.copy(s[e]);for(;i.length>0;){const s=l.find_last_index(i,s=>isNaN(s));let n;s>=0?n=i.splice(s):(n=i,i=[]);const r=n.filter(s=>!isNaN(s));t[e].push(r)}}return t}_index_data(){const s=this._build_discontinuous_object(this._xs),t=this._build_discontinuous_object(this._ys),e=[];for(let i=0,n=this._xs.length;i<n;i++)for(let n=0,r=s[i].length;n<r;n++){const r=s[i][n],o=t[i][n];0!=r.length&&e.push({x0:l.min(r),y0:l.min(o),x1:l.max(r),y1:l.max(o),i})}return new n.SpatialIndex(e)}_mask_data(){const s=this.renderer.plot_view.frame.x_ranges.default,[t,e]=[s.min,s.max],i=this.renderer.plot_view.frame.y_ranges.default,[n,r]=[i.min,i.max];return this.index.indices({x0:t,x1:e,y0:n,y1:r}).sort((s,t)=>s-t)}_inner_loop(s,t,e,i){for(let n=0,r=t.length;n<r;n++)0!=n?isNaN(t[n]+e[n])?(s.closePath(),i.apply(s),s.beginPath()):s.lineTo(t[n],e[n]):(s.beginPath(),s.moveTo(t[n],e[n]));s.closePath(),i.call(s)}_render(s,t,{sxs:e,sys:i}){this.sxss=this._build_discontinuous_object(e),this.syss=this._build_discontinuous_object(i);for(const n of t){const[t,r]=[e[n],i[n]];this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(s,n),this._inner_loop(s,t,r,s.fill)),this.visuals.hatch.doit2(s,n,()=>this._inner_loop(s,t,r,s.fill),()=>this.renderer.request_render()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(s,n),this._inner_loop(s,t,r,s.stroke))}}_hit_rect(s){const{sx0:t,sx1:e,sy0:i,sy1:n}=s,r=[t,e,e,t],o=[i,i,n,n],[l,_]=this.renderer.xscale.r_invert(t,e),[h,d]=this.renderer.yscale.r_invert(i,n),u=this.index.indices({x0:l,x1:_,y0:h,y1:d}),x=[];for(let s=0,t=u.length;s<t;s++){const t=u[s],e=this.sxs[t],i=this.sys[t];let n=!0;for(let s=0,t=e.length;s<t;s++){const t=e[s],l=i[s];if(!c.point_in_poly(t,l,r,o)){n=!1;break}}n&&x.push(t)}return new a.Selection({indices:x})}_hit_point(s){const{sx:t,sy:e}=s,i=this.renderer.xscale.invert(t),n=this.renderer.yscale.invert(e),r=this.index.indices({x0:i,y0:n,x1:i,y1:n}),o=[];for(let s=0,i=r.length;s<i;s++){const i=r[s],n=this.sxss[i],l=this.syss[i];for(let s=0,r=n.length;s<r;s++)c.point_in_poly(t,e,n[s],l[s])&&o.push(i)}return new a.Selection({indices:o})}_get_snap_coord(s){return _.sum(s)/s.length}scenterx(s,t,e){if(1==this.sxss[s].length)return this._get_snap_coord(this.sxs[s]);{const i=this.sxss[s],n=this.syss[s];for(let s=0,r=i.length;s<r;s++)if(c.point_in_poly(t,e,i[s],n[s]))return this._get_snap_coord(i[s])}d.unreachable()}scentery(s,t,e){if(1==this.syss[s].length)return this._get_snap_coord(this.sys[s]);{const i=this.sxss[s],n=this.syss[s];for(let s=0,r=i.length;s<r;s++)if(c.point_in_poly(t,e,i[s],n[s]))return this._get_snap_coord(n[s])}d.unreachable()}draw_legend_for_index(s,t,e){o.generic_area_legend(this.visuals,s,t,e)}}e.PatchesView=u,u.__name__=\"PatchesView\";class x extends r.Glyph{constructor(s){super(s)}static init_Patches(){this.prototype.default_view=u,this.coords([[\"xs\",\"ys\"]]),this.mixins([h.LineVector,h.FillVector,h.HatchVector])}}e.Patches=x,x.__name__=\"Patches\",x.init_Patches()},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(218);class _ extends i.BoxView{scenterx(t){return(this.sleft[t]+this.sright[t])/2}scentery(t){return(this.stop[t]+this.sbottom[t])/2}_index_data(){return this._index_box(this._right.length)}_lrtb(t){return[this._left[t],this._right[t],this._top[t],this._bottom[t]]}}s.QuadView=_,_.__name__=\"QuadView\";class o extends i.Box{constructor(t){super(t)}static init_Quad(){this.prototype.default_view=_,this.coords([[\"right\",\"bottom\"],[\"left\",\"top\"]])}}s.Quad=o,o.__name__=\"Quad\",o.init_Quad()},\n",
" function _(t,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=t(23),n=t(85),r=t(89),_=t(92);function a(t,i,e){if(i==(t+e)/2)return[t,e];{const s=(t-i)/(t-2*i+e),n=t*(1-s)**2+2*i*(1-s)*s+e*s**2;return[Math.min(t,e,n),Math.max(t,e,n)]}}class c extends r.GlyphView{_index_data(){const t=[];for(let i=0,e=this._x0.length;i<e;i++){if(isNaN(this._x0[i]+this._x1[i]+this._y0[i]+this._y1[i]+this._cx[i]+this._cy[i]))continue;const[e,s]=a(this._x0[i],this._cx[i],this._x1[i]),[n,r]=a(this._y0[i],this._cy[i],this._y1[i]);t.push({x0:e,y0:n,x1:s,y1:r,i})}return new n.SpatialIndex(t)}_render(t,i,{sx0:e,sy0:s,sx1:n,sy1:r,scx:_,scy:a}){if(this.visuals.line.doit)for(const c of i)isNaN(e[c]+s[c]+n[c]+r[c]+_[c]+a[c])||(t.beginPath(),t.moveTo(e[c],s[c]),t.quadraticCurveTo(_[c],a[c],n[c],r[c]),this.visuals.line.set_vectorize(t,c),t.stroke())}draw_legend_for_index(t,i,e){_.generic_line_legend(this.visuals,t,i,e)}scenterx(){throw new Error(\"not implemented\")}scentery(){throw new Error(\"not implemented\")}}e.QuadraticView=c,c.__name__=\"QuadraticView\";class o extends r.Glyph{constructor(t){super(t)}static init_Quadratic(){this.prototype.default_view=c,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx\",\"cy\"]]),this.mixins(s.LineVector)}}e.Quadratic=o,o.__name__=\"Quadratic\",o.init_Quadratic()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),n=e(84),a=e(92),l=e(23),r=s.__importStar(e(18));class _ extends n.XYGlyphView{_map_data(){\"data\"==this.model.properties.length.units?this.slength=this.sdist(this.renderer.xscale,this._x,this._length):this.slength=this._length}_render(e,t,{sx:i,sy:s,slength:n,_angle:a}){if(this.visuals.line.doit){const l=2*(this.renderer.plot_view.frame._width.value+this.renderer.plot_view.frame._height.value);for(let e=0,t=n.length;e<t;e++)0==n[e]&&(n[e]=l);for(const l of t)isNaN(i[l]+s[l]+a[l]+n[l])||(e.translate(i[l],s[l]),e.rotate(a[l]),e.beginPath(),e.moveTo(0,0),e.lineTo(n[l],0),this.visuals.line.set_vectorize(e,l),e.stroke(),e.rotate(-a[l]),e.translate(-i[l],-s[l]))}}draw_legend_for_index(e,t,i){a.generic_line_legend(this.visuals,e,t,i)}}i.RayView=_,_.__name__=\"RayView\";class h extends n.XYGlyph{constructor(e){super(e)}static init_Ray(){this.prototype.default_view=_,this.mixins(l.LineVector),this.define({length:[r.DistanceSpec],angle:[r.AngleSpec]})}}i.Ray=h,h.__name__=\"Ray\",h.init_Ray()},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1),h=t(214),a=t(92),r=i.__importStar(t(18)),n=t(12),_=t(79);class l extends h.CenterRotatableView{_set_data(){this.max_w2=0,\"data\"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)}_map_data(){if(\"data\"==this.model.properties.width.units)[this.sw,this.sx0]=this._map_dist_corner_for_data_side_length(this._x,this._width,this.renderer.xscale);else{this.sw=this._width;const t=this.sx.length;this.sx0=new Float64Array(t);for(let s=0;s<t;s++)this.sx0[s]=this.sx[s]-this.sw[s]/2}if(\"data\"==this.model.properties.height.units)[this.sh,this.sy1]=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale);else{this.sh=this._height;const t=this.sy.length;this.sy1=new Float64Array(t);for(let s=0;s<t;s++)this.sy1[s]=this.sy[s]-this.sh[s]/2}const t=this.sw.length;this.ssemi_diag=new Float64Array(t);for(let s=0;s<t;s++)this.ssemi_diag[s]=Math.sqrt(this.sw[s]/2*this.sw[s]/2+this.sh[s]/2*this.sh[s]/2)}_render(t,s,{sx:e,sy:i,sx0:h,sy1:a,sw:r,sh:n,_angle:_}){if(this.visuals.fill.doit)for(const l of s)isNaN(e[l]+i[l]+h[l]+a[l]+r[l]+n[l]+_[l])||(this.visuals.fill.set_vectorize(t,l),_[l]?(t.translate(e[l],i[l]),t.rotate(_[l]),t.fillRect(-r[l]/2,-n[l]/2,r[l],n[l]),t.rotate(-_[l]),t.translate(-e[l],-i[l])):t.fillRect(h[l],a[l],r[l],n[l]));if(this.visuals.line.doit){t.beginPath();for(const l of s)isNaN(e[l]+i[l]+h[l]+a[l]+r[l]+n[l]+_[l])||0!=r[l]&&0!=n[l]&&(_[l]?(t.translate(e[l],i[l]),t.rotate(_[l]),t.rect(-r[l]/2,-n[l]/2,r[l],n[l]),t.rotate(-_[l]),t.translate(-e[l],-i[l])):t.rect(h[l],a[l],r[l],n[l]),this.visuals.line.set_vectorize(t,l),t.stroke(),t.beginPath());t.stroke()}}_hit_rect(t){return this._hit_rect_against_index(t)}_hit_point(t){let{sx:s,sy:e}=t;const i=this.renderer.xscale.invert(s),h=this.renderer.yscale.invert(e),a=[];for(let t=0,s=this.sx0.length;t<s;t++)a.push(this.sx0[t]+this.sw[t]/2);const r=[];for(let t=0,s=this.sy1.length;t<s;t++)r.push(this.sy1[t]+this.sh[t]/2);const l=n.max(this._ddist(0,a,this.ssemi_diag)),o=n.max(this._ddist(1,r,this.ssemi_diag)),d=i-l,c=i+l,x=h-o,y=h+o,f=[];for(const t of this.index.indices({x0:d,x1:c,y0:x,y1:y})){let i,h;if(this._angle[t]){const a=Math.sin(-this._angle[t]),r=Math.cos(-this._angle[t]),n=r*(s-this.sx[t])-a*(e-this.sy[t])+this.sx[t],_=a*(s-this.sx[t])+r*(e-this.sy[t])+this.sy[t];s=n,e=_,h=Math.abs(this.sx[t]-s)<=this.sw[t]/2,i=Math.abs(this.sy[t]-e)<=this.sh[t]/2}else h=s-this.sx0[t]<=this.sw[t]&&s-this.sx0[t]>=0,i=e-this.sy1[t]<=this.sh[t]&&e-this.sy1[t]>=0;i&&h&&f.push(t)}return new _.Selection({indices:f})}_map_dist_corner_for_data_side_length(t,s,e){const i=t.length,h=new Float64Array(i),a=new Float64Array(i);for(let e=0;e<i;e++)h[e]=Number(t[e])-s[e]/2,a[e]=Number(t[e])+s[e]/2;const r=e.v_compute(h),n=e.v_compute(a),_=this.sdist(e,h,s,\"edge\",this.model.dilate);let l=r;for(let t=0,s=r.length;t<s;t++)if(r[t]!=n[t]){l=r[t]<n[t]?r:n;break}return[_,l]}_ddist(t,s,e){const i=0==t?this.renderer.xscale:this.renderer.yscale,h=s,a=h.length,r=new Float64Array(a);for(let t=0;t<a;t++)r[t]=h[t]+e[t];const n=i.v_invert(h),_=i.v_invert(r),l=n.length,o=new Float64Array(l);for(let t=0;t<l;t++)o[t]=Math.abs(_[t]-n[t]);return o}draw_legend_for_index(t,s,e){a.generic_area_legend(this.visuals,t,s,e)}_bounds({x0:t,x1:s,y0:e,y1:i}){return{x0:t-this.max_w2,x1:s+this.max_w2,y0:e-this.max_h2,y1:i+this.max_h2}}}e.RectView=l,l.__name__=\"RectView\";class o extends h.CenterRotatable{constructor(t){super(t)}static init_Rect(){this.prototype.default_view=l,this.define({dilate:[r.Boolean,!1]})}}e.Rect=o,o.__name__=\"Rect\",o.init_Rect()},\n",
" function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(1).__importStar(e(93)),n=e(23),r=e(85),h=e(89),_=e(92),a=e(79);class c extends h.GlyphView{_index_data(){const e=[];for(let s=0,t=this._x0.length;s<t;s++){const t=this._x0[s],i=this._x1[s],n=this._y0[s],r=this._y1[s];isNaN(t+i+n+r)||e.push({x0:Math.min(t,i),y0:Math.min(n,r),x1:Math.max(t,i),y1:Math.max(n,r),i:s})}return new r.SpatialIndex(e)}_render(e,s,{sx0:t,sy0:i,sx1:n,sy1:r}){if(this.visuals.line.doit)for(const h of s)isNaN(t[h]+i[h]+n[h]+r[h])||(e.beginPath(),e.moveTo(t[h],i[h]),e.lineTo(n[h],r[h]),this.visuals.line.set_vectorize(e,h),e.stroke())}_hit_point(e){const{sx:s,sy:t}=e,n={x:s,y:t},[r,h]=this.renderer.xscale.r_invert(s-2,s+2),[_,c]=this.renderer.yscale.r_invert(t-2,t+2),o=this.index.indices({x0:r,y0:_,x1:h,y1:c}),x=[];for(const e of o){const s=Math.max(2,this.visuals.line.cache_select(\"line_width\",e)/2)**2,t={x:this.sx0[e],y:this.sy0[e]},r={x:this.sx1[e],y:this.sy1[e]};i.dist_to_segment_squared(n,t,r)<s&&x.push(e)}return new a.Selection({indices:x})}_hit_span(e){const[s,t]=this.renderer.plot_view.frame.bbox.ranges,{sx:i,sy:n}=e;let r,h,_;\"v\"==e.direction?(_=this.renderer.yscale.invert(n),[r,h]=[this._y0,this._y1]):(_=this.renderer.xscale.invert(i),[r,h]=[this._x0,this._x1]);const c=[],[o,x]=this.renderer.xscale.r_invert(s.start,s.end),[l,d]=this.renderer.yscale.r_invert(t.start,t.end),y=this.index.indices({x0:o,y0:l,x1:x,y1:d});for(const s of y){(r[s]<=_&&_<=h[s]||h[s]<=_&&_<=r[s])&&c.push(s);const t=1.5+this.visuals.line.cache_select(\"line_width\",s)/2;r[s]==h[s]&&(\"h\"==e.direction?Math.abs(this.sx0[s]-i)<=t&&c.push(s):Math.abs(this.sy0[s]-n)<=t&&c.push(s))}return new a.Selection({indices:c})}scenterx(e){return(this.sx0[e]+this.sx1[e])/2}scentery(e){return(this.sy0[e]+this.sy1[e])/2}draw_legend_for_index(e,s,t){_.generic_line_legend(this.visuals,e,s,t)}}t.SegmentView=c,c.__name__=\"SegmentView\";class o extends h.Glyph{constructor(e){super(e)}static init_Segment(){this.prototype.default_view=c,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"]]),this.mixins(n.LineVector)}}t.Segment=o,o.__name__=\"Segment\",o.init_Segment()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(84),o=e(92),r=e(23),l=n.__importStar(e(18));class a extends s.XYGlyphView{_render(e,t,{sx:i,sy:n}){let s=!1,o=null;this.visuals.line.set_value(e);const r=t.length;if(!(r<2)){e.beginPath(),e.moveTo(i[0],n[0]);for(const r of t){let t,l,a,_;switch(this.model.mode){case\"before\":[t,a]=[i[r-1],n[r]],[l,_]=[i[r],n[r]];break;case\"after\":[t,a]=[i[r],n[r-1]],[l,_]=[i[r],n[r]];break;case\"center\":{const e=(i[r-1]+i[r])/2;[t,a]=[e,n[r-1]],[l,_]=[e,n[r]];break}default:throw new Error(\"unexpected\")}if(s){if(!isFinite(i[r]+n[r])){e.stroke(),e.beginPath(),s=!1,o=r;continue}null!=o&&r-o>1&&(e.stroke(),s=!1)}s?(e.lineTo(t,a),e.lineTo(l,_)):(e.beginPath(),e.moveTo(i[r],n[r]),s=!0),o=r}e.lineTo(i[r-1],n[r-1]),e.stroke()}}draw_legend_for_index(e,t,i){o.generic_line_legend(this.visuals,e,t,i)}}i.StepView=a,a.__name__=\"StepView\";class _ extends s.XYGlyph{constructor(e){super(e)}static init_Step(){this.prototype.default_view=a,this.mixins(r.LineVector),this.define({mode:[l.StepMode,\"before\"]})}}i.Step=_,_.__name__=\"Step\",_.init_Step()},\n",
" function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1),n=t(84),_=t(23),o=i.__importStar(t(93)),h=i.__importStar(t(18)),r=t(132),l=t(11),a=t(79);class c extends n.XYGlyphView{_rotate_point(t,e,s,i,n){return[(t-s)*Math.cos(n)-(e-i)*Math.sin(n)+s,(t-s)*Math.sin(n)+(e-i)*Math.cos(n)+i]}_text_bounds(t,e,s,i){return[[t,t+s,t+s,t,t],[e,e,e-i,e-i,e]]}_render(t,e,{sx:s,sy:i,_x_offset:n,_y_offset:_,_angle:o,_text:h}){this._sys=[],this._sxs=[];for(const l of e)if(this._sxs[l]=[],this._sys[l]=[],!isNaN(s[l]+i[l]+n[l]+_[l]+o[l])&&null!=h[l]&&this.visuals.text.doit){const e=\"\"+h[l];t.save(),t.translate(s[l]+n[l],i[l]+_[l]),t.rotate(o[l]),this.visuals.text.set_vectorize(t,l);const a=this.visuals.text.cache_select(\"font\",l),{height:c}=r.measure_font(a),x=this.visuals.text.text_line_height.value()*c;if(-1==e.indexOf(\"\\n\")){t.fillText(e,0,0);const o=s[l]+n[l],h=i[l]+_[l],r=t.measureText(e).width,[a,c]=this._text_bounds(o,h,r,x);this._sxs[l].push(a),this._sys[l].push(c)}else{const o=e.split(\"\\n\"),h=x*o.length,r=this.visuals.text.cache_select(\"text_baseline\",l);let a;switch(r){case\"top\":a=0;break;case\"middle\":a=-h/2+x/2;break;case\"bottom\":a=-h+x;break;default:a=0,console.warn(`'${r}' baseline not supported with multi line text`)}for(const e of o){t.fillText(e,0,a);const o=s[l]+n[l],h=a+i[l]+_[l],r=t.measureText(e).width,[c,u]=this._text_bounds(o,h,r,x);this._sxs[l].push(c),this._sys[l].push(u),a+=x}}t.restore()}}_hit_point(t){const{sx:e,sy:s}=t,i=[];for(let t=0;t<this._sxs.length;t++){const n=this._sxs[t],_=this._sys[t],h=n.length;for(let r=0,l=h;r<l;r++){const[l,a]=this._rotate_point(e,s,n[h-1][0],_[h-1][0],-this._angle[t]);o.point_in_poly(l,a,n[r],_[r])&&i.push(t)}}return new a.Selection({indices:i})}_scenterxy(t){const e=this._sxs[t],s=this._sys[t];l.assert(0!=e.length&&0!=s.length);const i=e[0][0],n=s[0][0],_=(e[0][2]+i)/2,o=(s[0][2]+n)/2,[h,r]=this._rotate_point(_,o,i,n,this._angle[t]);return{x:h,y:r}}scenterx(t){return this._scenterxy(t).x}scentery(t){return this._scenterxy(t).y}}s.TextView=c,c.__name__=\"TextView\";class x extends n.XYGlyph{constructor(t){super(t)}static init_Text(){this.prototype.default_view=c,this.mixins(_.TextVector),this.define({text:[h.NullStringSpec,{field:\"text\"}],angle:[h.AngleSpec,0],x_offset:[h.NumberSpec,0],y_offset:[h.NumberSpec,0]})}}s.Text=x,x.__name__=\"Text\",x.init_Text()},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1),h=t(218),r=i.__importStar(t(18));class o extends h.BoxView{scenterx(t){return this.sx[t]}scentery(t){return(this.stop[t]+this.sbottom[t])/2}_index_data(){return this._index_box(this._x.length)}_lrtb(t){return[this._x[t]-this._width[t]/2,this._x[t]+this._width[t]/2,Math.max(this._top[t],this._bottom[t]),Math.min(this._top[t],this._bottom[t])]}_map_data(){this.sx=this.renderer.xscale.v_compute(this._x),this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"),this.stop=this.renderer.yscale.v_compute(this._top),this.sbottom=this.renderer.yscale.v_compute(this._bottom);const t=this.sx.length;this.sleft=new Float64Array(t),this.sright=new Float64Array(t);for(let s=0;s<t;s++)this.sleft[s]=this.sx[s]-this.sw[s]/2,this.sright[s]=this.sx[s]+this.sw[s]/2;this._clamp_viewport()}}e.VBarView=o,o.__name__=\"VBarView\";class _ extends h.Box{constructor(t){super(t)}static init_VBar(){this.prototype.default_view=o,this.coords([[\"x\",\"bottom\"]]),this.define({width:[r.NumberSpec],top:[r.CoordinateSpec]}),this.override({bottom:0})}}e.VBar=_,_.__name__=\"VBar\",_.init_VBar()},\n",
" function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(1),r=e(84),n=e(92),a=e(23),_=i.__importStar(e(18)),d=e(10),o=e(79);class l extends r.XYGlyphView{_map_data(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius}_render(e,s,{sx:t,sy:i,sradius:r,_start_angle:n,_end_angle:a}){const _=this.model.properties.direction.value();for(const d of s)isNaN(t[d]+i[d]+r[d]+n[d]+a[d])||(e.beginPath(),e.arc(t[d],i[d],r[d],n[d],a[d],_),e.lineTo(t[d],i[d]),e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,d),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,d),e.stroke()))}_hit_point(e){let s,t,i,r,n,a,_,l,c;const{sx:h,sy:u}=e,p=this.renderer.xscale.invert(h),x=this.renderer.yscale.invert(u),g=2*this.max_radius;\"data\"===this.model.properties.radius.units?(a=p-g,_=p+g,l=x-g,c=x+g):(t=h-g,i=h+g,[a,_]=this.renderer.xscale.r_invert(t,i),r=u-g,n=u+g,[l,c]=this.renderer.yscale.r_invert(r,n));const y=[];for(const e of this.index.indices({x0:a,x1:_,y0:l,y1:c})){const a=this.sradius[e]**2;[t,i]=this.renderer.xscale.r_compute(p,this._x[e]),[r,n]=this.renderer.yscale.r_compute(x,this._y[e]),s=(t-i)**2+(r-n)**2,s<=a&&y.push([e,s])}const f=this.model.properties.direction.value(),v=[];for(const[e,s]of y){const t=Math.atan2(u-this.sy[e],h-this.sx[e]);d.angle_between(-t,-this._start_angle[e],-this._end_angle[e],f)&&v.push([e,s])}return o.Selection.from_hits(v)}draw_legend_for_index(e,s,t){n.generic_area_legend(this.visuals,e,s,t)}_scenterxy(e){const s=this.sradius[e]/2,t=(this._start_angle[e]+this._end_angle[e])/2;return{x:this.sx[e]+s*Math.cos(t),y:this.sy[e]+s*Math.sin(t)}}scenterx(e){return this._scenterxy(e).x}scentery(e){return this._scenterxy(e).y}}t.WedgeView=l,l.__name__=\"WedgeView\";class c extends r.XYGlyph{constructor(e){super(e)}static init_Wedge(){this.prototype.default_view=l,this.mixins([a.LineVector,a.FillVector]),this.define({direction:[_.Direction,\"anticlock\"],radius:[_.DistanceSpec],start_angle:[_.AngleSpec],end_angle:[_.AngleSpec]})}}t.Wedge=c,c.__name__=\"Wedge\",c.init_Wedge()},\n",
" function _(e,t,_){Object.defineProperty(_,\"__esModule\",{value:!0});const r=e(1);r.__exportStar(e(101),_),r.__exportStar(e(239),_),r.__exportStar(e(240),_)},\n",
" function _(e,o,r){Object.defineProperty(r,\"__esModule\",{value:!0});const t=e(71);class n extends t.Model{constructor(e){super(e)}}r.LayoutProvider=n,n.__name__=\"LayoutProvider\"},\n",
" function _(t,a,e){Object.defineProperty(e,\"__esModule\",{value:!0});const o=t(1),r=t(239),s=o.__importStar(t(18));class n extends r.LayoutProvider{constructor(t){super(t)}static init_StaticLayoutProvider(){this.define({graph_layout:[s.Any,{}]})}get_node_coordinates(t){const a=[],e=[],o=t.data.index;for(let t=0,r=o.length;t<r;t++){const r=this.graph_layout[o[t]],[s,n]=null!=r?r:[NaN,NaN];a.push(s),e.push(n)}return[a,e]}get_edge_coordinates(t){const a=[],e=[],o=t.data.start,r=t.data.end,s=null!=t.data.xs&&null!=t.data.ys;for(let n=0,u=o.length;n<u;n++){const u=null!=this.graph_layout[o[n]]&&null!=this.graph_layout[r[n]];if(s&&u)a.push(t.data.xs[n]),e.push(t.data.ys[n]);else{let t,s;[s,t]=u?[this.graph_layout[o[n]],this.graph_layout[r[n]]]:[[NaN,NaN],[NaN,NaN]],a.push([s[0],t[0]]),e.push([s[1],t[1]])}}return[a,e]}}e.StaticLayoutProvider=n,n.__name__=\"StaticLayoutProvider\",n.init_StaticLayoutProvider()},\n",
" function _(e,r,d){Object.defineProperty(d,\"__esModule\",{value:!0});var i=e(242);d.Grid=i.Grid},\n",
" function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1),s=e(151),r=n.__importStar(e(23)),_=n.__importStar(e(18)),o=e(8);class a extends s.GuideRendererView{render(){if(!this.model.visible)return;const e=this.layer.ctx;e.save(),this._draw_regions(e),this._draw_minor_grids(e),this._draw_grids(e),e.restore()}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.request_render())}_draw_regions(e){if(!this.visuals.band_fill.doit&&!this.visuals.band_hatch.doit)return;this.visuals.band_fill.set_value(e);const[i,t]=this.grid_coords(\"major\",!1);for(let n=0;n<i.length-1;n++){if(n%2!=1)continue;const[s,r]=this.plot_view.map_to_screen(i[n],t[n],this.model.x_range_name,this.model.y_range_name),[_,o]=this.plot_view.map_to_screen(i[n+1],t[n+1],this.model.x_range_name,this.model.y_range_name);this.visuals.band_fill.doit&&e.fillRect(s[0],r[0],_[1]-s[0],o[1]-r[0]),this.visuals.band_hatch.doit2(e,n,()=>{e.fillRect(s[0],r[0],_[1]-s[0],o[1]-r[0])},()=>this.request_render())}}_draw_grids(e){if(!this.visuals.grid_line.doit)return;const[i,t]=this.grid_coords(\"major\");this._draw_grid_helper(e,this.visuals.grid_line,i,t)}_draw_minor_grids(e){if(!this.visuals.minor_grid_line.doit)return;const[i,t]=this.grid_coords(\"minor\");this._draw_grid_helper(e,this.visuals.minor_grid_line,i,t)}_draw_grid_helper(e,i,t,n){i.set_value(e);for(let i=0;i<t.length;i++){const[s,r]=this.plot_view.map_to_screen(t[i],n[i],this.model.x_range_name,this.model.y_range_name);e.beginPath(),e.moveTo(Math.round(s[0]),Math.round(r[0]));for(let i=1;i<s.length;i++)e.lineTo(Math.round(s[i]),Math.round(r[i]));e.stroke()}}ranges(){const e=this.model.dimension,i=(e+1)%2,t=this.plot_view.frame,n=[t.x_ranges[this.model.x_range_name],t.y_ranges[this.model.y_range_name]];return[n[e],n[i]]}computed_bounds(){const[e]=this.ranges(),i=this.model.bounds,t=[e.min,e.max];let n,s;if(o.isArray(i))n=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]),n<t[0]&&(n=t[0]),s>t[1]&&(s=t[1]);else{[n,s]=t;for(const e of this.plot_view.axis_views)e.dimension==this.model.dimension&&e.model.x_range_name==this.model.x_range_name&&e.model.y_range_name==this.model.y_range_name&&([n,s]=e.computed_bounds)}return[n,s]}grid_coords(e,i=!0){const t=this.model.dimension,n=(t+1)%2,[s,r]=this.ranges();let[_,o]=this.computed_bounds();[_,o]=[Math.min(_,o),Math.max(_,o)];const a=[[],[]],d=this.model.get_ticker();if(null==d)return a;const l=d.get_ticks(_,o,s,r.min,{})[e],h=s.min,m=s.max,c=r.min,u=r.max;i||(l[0]!=h&&l.splice(0,0,h),l[l.length-1]!=m&&l.push(m));for(let e=0;e<l.length;e++){if((l[e]==h||l[e]==m)&&i)continue;const s=[],r=[],_=2;for(let i=0;i<_;i++){const t=c+(u-c)/(_-1)*i;s.push(l[e]),r.push(t)}a[t].push(s),a[n].push(r)}return a}}t.GridView=a,a.__name__=\"GridView\";class d extends s.GuideRenderer{constructor(e){super(e)}static init_Grid(){this.prototype.default_view=a,this.mixins([[\"grid_\",r.Line],[\"minor_grid_\",r.Line],[\"band_\",r.Fill],[\"band_\",r.Hatch]]),this.define({bounds:[_.Any,\"auto\"],dimension:[_.Any,0],axis:[_.Instance],ticker:[_.Instance],x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"]}),this.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null})}get_ticker(){return null!=this.ticker?this.ticker:null!=this.axis?this.axis.ticker:null}}t.Grid=d,d.__name__=\"Grid\",d.init_Grid()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(245),o=n.__importStar(e(18));class c extends s.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,()=>this.rebuild())}get child_models(){return this.model.children}}i.BoxView=c,c.__name__=\"BoxView\";class r extends s.LayoutDOM{constructor(e){super(e)}static init_Box(){this.define({children:[o.Array,[]],spacing:[o.Number,0]})}}i.Box=r,r.__name__=\"Box\",r.init_Box()},\n",
" function _(t,i,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=t(1),o=t(71),l=t(68),n=t(72),h=t(8),a=s.__importStar(t(18)),_=t(99),r=t(66),d=t(246);class u extends r.DOMView{constructor(){super(...arguments),this._idle_notified=!1,this._offset_parent=null,this._viewport={}}initialize(){super.initialize(),this.el.style.position=this.is_root?\"relative\":\"absolute\",this._child_views=new Map}async lazy_initialize(){await this.build_child_views()}remove(){for(const t of this.child_views)t.remove();this._child_views.clear(),super.remove()}connect_signals(){super.connect_signals(),this.is_root&&(this._on_resize=()=>this.resize_layout(),window.addEventListener(\"resize\",this._on_resize),this._parent_observer=setInterval(()=>{const t=this.el.offsetParent;this._offset_parent!=t&&(this._offset_parent=t,null!=t&&(this.compute_viewport(),this.invalidate_layout()))},250));const t=this.model.properties;this.on_change([t.width,t.height,t.min_width,t.min_height,t.max_width,t.max_height,t.margin,t.width_policy,t.height_policy,t.sizing_mode,t.aspect_ratio,t.visible],()=>this.invalidate_layout()),this.on_change([t.background,t.css_classes],()=>this.invalidate_render())}disconnect_signals(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener(\"resize\",this._on_resize),super.disconnect_signals()}css_classes(){return super.css_classes().concat(this.model.css_classes)}get child_views(){return this.child_models.map(t=>this._child_views.get(t))}async build_child_views(){await _.build_views(this._child_views,this.child_models,{parent:this})}render(){super.render(),l.empty(this.el);const{background:t}=this.model;this.el.style.backgroundColor=null!=t?t:\"\",l.classes(this.el).clear().add(...this.css_classes());for(const t of this.child_views)this.el.appendChild(t.el),t.render()}update_layout(){for(const t of this.child_views)t.update_layout();this._update_layout()}update_position(){this.el.style.display=this.model.visible?\"block\":\"none\";const t=this.is_root?this.layout.sizing.margin:void 0;l.position(this.el,this.layout.bbox,t);for(const t of this.child_views)t.update_position()}after_layout(){for(const t of this.child_views)t.after_layout();this._has_finished=!0}compute_viewport(){this._viewport=this._viewport_size()}renderTo(t){t.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()}build(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this}async rebuild(){await this.build_child_views(),this.invalidate_render()}compute_layout(){const t=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),n.logger.debug(`layout computed in ${Date.now()-t} ms`),this.notify_finished()}resize_layout(){this.root.compute_viewport(),this.root.compute_layout()}invalidate_layout(){this.root.update_layout(),this.root.compute_layout()}invalidate_render(){this.render(),this.invalidate_layout()}has_finished(){if(!super.has_finished())return!1;for(const t of this.child_views)if(!t.has_finished())return!1;return!0}notify_finished(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()}_width_policy(){return null!=this.model.width?\"fixed\":\"fit\"}_height_policy(){return null!=this.model.height?\"fixed\":\"fit\"}box_sizing(){let{width_policy:t,height_policy:i,aspect_ratio:e}=this.model;\"auto\"==t&&(t=this._width_policy()),\"auto\"==i&&(i=this._height_policy());const{sizing_mode:s}=this.model;if(null!=s)if(\"fixed\"==s)t=i=\"fixed\";else if(\"stretch_both\"==s)t=i=\"max\";else if(\"stretch_width\"==s)t=\"max\";else if(\"stretch_height\"==s)i=\"max\";else switch(null==e&&(e=\"auto\"),s){case\"scale_width\":t=\"max\",i=\"min\";break;case\"scale_height\":t=\"min\",i=\"max\";break;case\"scale_both\":t=\"max\",i=\"max\"}const o={width_policy:t,height_policy:i},{min_width:l,min_height:n}=this.model;null!=l&&(o.min_width=l),null!=n&&(o.min_height
" function _(e,o,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.bk_root=\"bk-root\"},\n",
" function _(t,o,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(1),e=t(244),n=t(192),l=s.__importStar(t(18));class u extends e.BoxView{_update_layout(){const t=this.child_views.map(t=>t.layout);this.layout=new n.Column(t),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}}i.ColumnView=u,u.__name__=\"ColumnView\";class _ extends e.Box{constructor(t){super(t)}static init_Column(){this.prototype.default_view=u,this.define({rows:[l.Any,\"auto\"]})}}i.Column=_,_.__name__=\"Column\",_.init_Column()},\n",
" function _(t,i,s){Object.defineProperty(s,\"__esModule\",{value:!0});const o=t(1),e=t(245),n=t(192),l=o.__importStar(t(18));class r extends e.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,()=>this.rebuild())}get child_models(){return this.model.children.map(([t])=>t)}_update_layout(){this.layout=new n.Grid,this.layout.rows=this.model.rows,this.layout.cols=this.model.cols,this.layout.spacing=this.model.spacing;for(const[t,i,s,o,e]of this.model.children){const n=this._child_views.get(t);this.layout.items.push({layout:n.layout,row:i,col:s,row_span:o,col_span:e})}this.layout.set_sizing(this.box_sizing())}}s.GridBoxView=r,r.__name__=\"GridBoxView\";class a extends e.LayoutDOM{constructor(t){super(t)}static init_GridBox(){this.prototype.default_view=r,this.define({children:[l.Array,[]],rows:[l.Any,\"auto\"],cols:[l.Any,\"auto\"],spacing:[l.Any,0]})}}s.GridBox=a,a.__name__=\"GridBox\",a.init_GridBox()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(245),_=e(188);class n extends s.LayoutDOMView{get child_models(){return[]}_update_layout(){this.layout=new _.ContentBox(this.el),this.layout.set_sizing(this.box_sizing())}}o.HTMLBoxView=n,n.__name__=\"HTMLBoxView\";class i extends s.LayoutDOM{constructor(e){super(e)}}o.HTMLBox=i,i.__name__=\"HTMLBox\"},\n",
" function _(t,o,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(1),e=t(244),_=t(192),a=s.__importStar(t(18));class n extends e.BoxView{_update_layout(){const t=this.child_views.map(t=>t.layout);this.layout=new _.Row(t),this.layout.cols=this.model.cols,this.layout.spacing=[0,this.model.spacing],this.layout.set_sizing(this.box_sizing())}}i.RowView=n,n.__name__=\"RowView\";class l extends e.Box{constructor(t){super(t)}static init_Row(){this.prototype.default_view=n,this.define({cols:[a.Any,\"auto\"]})}}i.Row=l,l.__name__=\"Row\",l.init_Row()},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const i=e(245),s=e(188);class _ extends i.LayoutDOMView{get child_models(){return[]}_update_layout(){this.layout=new s.LayoutItem,this.layout.set_sizing(this.box_sizing())}}a.SpacerView=_,_.__name__=\"SpacerView\";class o extends i.LayoutDOM{constructor(e){super(e)}static init_Spacer(){this.prototype.default_view=_}}a.Spacer=o,o.__name__=\"Spacer\",o.init_Spacer()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),a=e(188),l=e(68),h=e(9),o=i.__importStar(e(18)),c=e(245),d=e(71),r=e(146),n=e(253),_=e(254),b=e(255),p=i.__importDefault(e(256)),u=i.__importDefault(e(257)),m=i.__importDefault(e(258));class v extends c.LayoutDOMView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.tabs.change,()=>this.rebuild()),this.connect(this.model.properties.active.change,()=>this.on_active_change())}styles(){return[...super.styles(),p.default,u.default,m.default]}get child_models(){return this.model.tabs.map(e=>e.child)}_update_layout(){const e=this.model.tabs_location,t=\"above\"==e||\"below\"==e,{scroll_el:s,headers_el:i}=this;this.header=new class extends a.ContentBox{_measure(e){const a=l.size(s),o=l.children(i).slice(0,3).map(e=>l.size(e)),{width:c,height:d}=super._measure(e);if(t){const t=a.width+h.sum(o.map(e=>e.width));return{width:e.width!=1/0?e.width:t,height:d}}{const t=a.height+h.sum(o.map(e=>e.height));return{width:c,height:e.height!=1/0?e.height:t}}}}(this.header_el),t?this.header.set_sizing({width_policy:\"fit\",height_policy:\"fixed\"}):this.header.set_sizing({width_policy:\"fixed\",height_policy:\"fit\"});let o=1,c=1;switch(e){case\"above\":o-=1;break;case\"below\":o+=1;break;case\"left\":c-=1;break;case\"right\":c+=1}const d={layout:this.header,row:o,col:c},r=this.child_views.map(e=>({layout:e.layout,row:1,col:1}));this.layout=new a.Grid([d,...r]),this.layout.set_sizing(this.box_sizing())}update_position(){super.update_position(),this.header_el.style.position=\"absolute\",l.position(this.header_el,this.header.bbox);const e=this.model.tabs_location,t=\"above\"==e||\"below\"==e,s=l.size(this.scroll_el),i=l.scroll_size(this.headers_el);if(t){const{width:e}=this.header.bbox;i.width>e?(this.wrapper_el.style.maxWidth=e-s.width+\"px\",l.display(this.scroll_el)):(this.wrapper_el.style.maxWidth=\"\",l.undisplay(this.scroll_el))}else{const{height:e}=this.header.bbox;i.height>e?(this.wrapper_el.style.maxHeight=e-s.height+\"px\",l.display(this.scroll_el)):(this.wrapper_el.style.maxHeight=\"\",l.undisplay(this.scroll_el))}const{child_views:a}=this;for(const e of a)l.hide(e.el);const h=a[this.model.active];null!=h&&l.show(h.el)}render(){super.render();const{active:e}=this.model,t=this.model.tabs_location,s=\"above\"==t||\"below\"==t,i=this.model.tabs.map((t,s)=>{const i=l.div({class:[n.bk_tab,s==e?r.bk_active:null]},t.title);if(i.addEventListener(\"click\",e=>{e.target==e.currentTarget&&this.change_active(s)}),t.closable){const e=l.div({class:n.bk_close});e.addEventListener(\"click\",e=>{if(e.target==e.currentTarget){this.model.tabs=h.remove_at(this.model.tabs,s);const e=this.model.tabs.length;this.model.active>e-1&&(this.model.active=e-1)}}),i.appendChild(e)}return i});this.headers_el=l.div({class:[n.bk_headers]},i),this.wrapper_el=l.div({class:n.bk_headers_wrapper},this.headers_el);const a=l.div({class:[_.bk_btn,_.bk_btn_default],disabled:\"\"},l.div({class:[b.bk_caret,r.bk_left]})),o=l.div({class:[_.bk_btn,_.bk_btn_default]},l.div({class:[b.bk_caret,r.bk_right]}));let c=0;const d=e=>()=>{const t=this.model.tabs.length;c=\"left\"==e?Math.max(c-1,0):Math.min(c+1,t-1),0==c?a.setAttribute(\"disabled\",\"\"):a.removeAttribute(\"disabled\"),c==t-1?o.setAttribute(\"disabled\",\"\"):o.removeAttribute(\"disabled\");const i=l.children(this.headers_el).slice(0,c).map(e=>e.getBoundingClientRect());if(s){const e=-h.sum(i.map(e=>e.width));this.headers_el.style.left=e+\"px\"}else{const e=-h.sum(i.map(e=>e.height));this.headers_el.style.top=e+\"px\"}};a.addEventListener(\"click\",d(\"left\")),o.addEventListener(\"click\",d(\"right\")),this.scroll_el=l.div({class:_.bk_btn_group},a,o),this.header_el=l.div({class:[n.bk_tabs_header,r.bk_side(t)]},this.scroll_el,this.wrapper_el),this.el.appendChild(this.header_el)}change_active(e){e!=this.model.active&&(this.model.active=e)}on_active_change(){const e=this.model.active,t=l.children(this.headers_el);for(const e of t)e.classList.remove(r.bk_active);t[e].classList.add(r.bk_active);const{child
" function _(e,b,a){Object.defineProperty(a,\"__esModule\",{value:!0}),a.bk_tabs_header=\"bk-tabs-header\",a.bk_headers_wrapper=\"bk-headers-wrapper\",a.bk_headers=\"bk-headers\",a.bk_tab=\"bk-tab\",a.bk_close=\"bk-close\"},\n",
" function _(n,b,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.bk_btn=\"bk-btn\",t.bk_btn_group=\"bk-btn-group\",t.bk_btn_default=\"bk-btn-default\",t.bk_btn_primary=\"bk-btn-primary\",t.bk_btn_success=\"bk-btn-success\",t.bk_btn_warning=\"bk-btn-warning\",t.bk_btn_danger=\"bk-btn-danger\",t.bk_btn_type=function(n){switch(n){case\"default\":return t.bk_btn_default;case\"primary\":return t.bk_btn_primary;case\"success\":return t.bk_btn_success;case\"warning\":return t.bk_btn_warning;case\"danger\":return t.bk_btn_danger}},t.bk_dropdown_toggle=\"bk-dropdown-toggle\"},\n",
" function _(e,b,d){Object.defineProperty(d,\"__esModule\",{value:!0}),d.bk_menu=\"bk-menu\",d.bk_caret=\"bk-caret\",d.bk_divider=\"bk-divider\"},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const o=e(247);class _ extends o.ColumnView{}i.WidgetBoxView=_,_.__name__=\"WidgetBoxView\";class n extends o.Column{constructor(e){super(e)}static init_WidgetBox(){this.prototype.default_view=_}}i.WidgetBox=n,n.__name__=\"WidgetBox\",n.init_WidgetBox()},\n",
" function _(r,a,o){Object.defineProperty(o,\"__esModule\",{value:!0});var e=r(261);o.CategoricalColorMapper=e.CategoricalColorMapper;var p=r(263);o.CategoricalMarkerMapper=p.CategoricalMarkerMapper;var l=r(264);o.CategoricalPatternMapper=l.CategoricalPatternMapper;var C=r(116);o.ContinuousColorMapper=C.ContinuousColorMapper;var M=r(117);o.ColorMapper=M.ColorMapper;var t=r(115);o.LinearColorMapper=t.LinearColorMapper;var i=r(265);o.LogColorMapper=i.LogColorMapper},\n",
" function _(r,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const o=r(1),a=r(262),c=r(117),i=o.__importStar(r(18));class s extends c.ColorMapper{constructor(r){super(r)}static init_CategoricalColorMapper(){this.define({factors:[i.Array],start:[i.Number,0],end:[i.Number]})}_v_compute(r,t,e,{nan_color:o}){a.cat_v_compute(r,this.factors,e,t,this.start,this.end,o)}}e.CategoricalColorMapper=s,s.__name__=\"CategoricalColorMapper\",s.init_CategoricalColorMapper()},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const l=e(12),i=e(8);function u(e,n){if(e.length!=n.length)return!1;for(let t=0,l=e.length;t<l;t++)if(e[t]!==n[t])return!1;return!0}t._cat_equals=u,t.cat_v_compute=function(e,n,t,c,f,o,r){for(let _=0,g=e.length;_<g;_++){let g,s,d=e[_];i.isString(d)?g=l.index_of(n,d):(null!=f?d=null!=o?d.slice(f,o):d.slice(f):null!=o&&(d=d.slice(0,o)),g=1==d.length?l.index_of(n,d[0]):l.find_index(n,e=>u(e,d))),s=g<0||g>=t.length?r:t[g],c[_]=s}}},\n",
" function _(r,e,a){Object.defineProperty(a,\"__esModule\",{value:!0});const t=r(1),s=r(262),i=r(118),c=t.__importStar(r(18));class n extends i.Mapper{constructor(r){super(r)}static init_CategoricalMarkerMapper(){this.define({factors:[c.Array],markers:[c.Array],start:[c.Number,0],end:[c.Number],default_value:[c.MarkerType,\"circle\"]})}v_compute(r){const e=new Array(r.length);return s.cat_v_compute(r,this.factors,this.markers,e,this.start,this.end,this.default_value),e}}a.CategoricalMarkerMapper=n,n.__name__=\"CategoricalMarkerMapper\",n.init_CategoricalMarkerMapper()},\n",
" function _(t,e,a){Object.defineProperty(a,\"__esModule\",{value:!0});const r=t(1),n=t(262),s=t(118),i=r.__importStar(t(18));class c extends s.Mapper{constructor(t){super(t)}static init_CategoricalPatternMapper(){this.define({factors:[i.Array],patterns:[i.Array],start:[i.Number,0],end:[i.Number],default_value:[i.HatchPatternType,\" \"]})}v_compute(t){const e=new Array(t.length);return n.cat_v_compute(t,this.factors,this.patterns,e,this.start,this.end,this.default_value),e}}a.CategoricalPatternMapper=c,c.__name__=\"CategoricalPatternMapper\",c.init_CategoricalPatternMapper()},\n",
" function _(o,l,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=o(116),e=o(12);class i extends t.ContinuousColorMapper{constructor(o){super(o)}_v_compute(o,l,n,t){const{nan_color:i,low_color:h,high_color:c}=t,r=n.length,s=null!=this.low?this.low:e.min(o),u=null!=this.high?this.high:e.max(o),a=r/(Math.log(u)-Math.log(s)),g=n.length-1;for(let t=0,e=o.length;t<e;t++){const e=o[t];if(isNaN(e)){l[t]=i;continue}if(e>u){l[t]=null!=c?c:n[g];continue}if(e==u){l[t]=n[g];continue}if(e<s){l[t]=null!=h?h:n[0];continue}const r=Math.log(e)-Math.log(s);let _=Math.floor(r*a);_>g&&(_=g),l[t]=n[_]}}}n.LogColorMapper=i,i.__name__=\"LogColorMapper\"},\n",
" function _(e,r,t){Object.defineProperty(t,\"__esModule\",{value:!0}),e(1).__exportStar(e(267),t);var a=e(268);t.Marker=a.Marker;var _=e(269);t.Scatter=_.Scatter},\n",
" function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(1),r=e(84),n=e(23),a=i.__importStar(e(93)),_=i.__importStar(e(18)),h=e(9),c=e(79);class o extends r.XYGlyphView{_render(e,s,{sx:t,sy:i,_size:r,_angle:n}){for(const a of s){if(isNaN(t[a]+i[a]+r[a]+n[a]))continue;const s=r[a]/2;e.beginPath(),e.translate(t[a],i[a]),n[a]&&e.rotate(n[a]),this._render_one(e,a,s,this.visuals.line,this.visuals.fill),n[a]&&e.rotate(-n[a]),e.translate(-t[a],-i[a])}}_mask_data(){const e=this.renderer.plot_view.frame.bbox.h_range,s=e.start-this.max_size,t=e.end+this.max_size,[i,r]=this.renderer.xscale.r_invert(s,t),n=this.renderer.plot_view.frame.bbox.v_range,a=n.start-this.max_size,_=n.end+this.max_size,[h,c]=this.renderer.yscale.r_invert(a,_);return this.index.indices({x0:i,x1:r,y0:h,y1:c})}_hit_point(e){const{sx:s,sy:t}=e,i=s-this.max_size,r=s+this.max_size,[n,a]=this.renderer.xscale.r_invert(i,r),_=t-this.max_size,h=t+this.max_size,[o,x]=this.renderer.yscale.r_invert(_,h),l=this.index.indices({x0:n,x1:a,y0:o,y1:x}),d=[];for(const e of l){const i=this._size[e]/2,r=Math.abs(this.sx[e]-s)+Math.abs(this.sy[e]-t);Math.abs(this.sx[e]-s)<=i&&Math.abs(this.sy[e]-t)<=i&&d.push([e,r])}return c.Selection.from_hits(d)}_hit_span(e){const{sx:s,sy:t}=e,i=this.bounds(),r=this.max_size/2;let n,a,_,h;if(\"h\"==e.direction){_=i.y0,h=i.y1;const e=s-r,t=s+r;[n,a]=this.renderer.xscale.r_invert(e,t)}else{n=i.x0,a=i.x1;const e=t-r,s=t+r;[_,h]=this.renderer.yscale.r_invert(e,s)}const o=this.index.indices({x0:n,x1:a,y0:_,y1:h});return new c.Selection({indices:o})}_hit_rect(e){const{sx0:s,sx1:t,sy0:i,sy1:r}=e,[n,a]=this.renderer.xscale.r_invert(s,t),[_,h]=this.renderer.yscale.r_invert(i,r),o=this.index.indices({x0:n,x1:a,y0:_,y1:h});return new c.Selection({indices:o})}_hit_poly(e){const{sx:s,sy:t}=e,i=h.range(0,this.sx.length),r=[];for(let e=0,n=i.length;e<n;e++){const n=i[e];a.point_in_poly(this.sx[e],this.sy[e],s,t)&&r.push(n)}return new c.Selection({indices:r})}draw_legend_for_index(e,{x0:s,x1:t,y0:i,y1:r},n){const a=n+1,_=new Array(a);_[n]=(s+t)/2;const h=new Array(a);h[n]=(i+r)/2;const c=new Array(a);c[n]=.4*Math.min(Math.abs(t-s),Math.abs(r-i));const o=new Array(a);o[n]=0,this._render(e,[n],{sx:_,sy:h,_size:c,_angle:o})}}t.MarkerView=o,o.__name__=\"MarkerView\";class x extends r.XYGlyph{constructor(e){super(e)}static init_Marker(){this.mixins([n.LineVector,n.FillVector]),this.define({size:[_.DistanceSpec,{units:\"screen\",value:4}],angle:[_.AngleSpec,0]})}}t.Marker=x,x.__name__=\"Marker\",x.init_Marker()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const a=e(1),s=e(268),n=e(267),i=a.__importStar(e(18));class _ extends s.MarkerView{_render(e,t,{sx:r,sy:a,_size:s,_angle:i,_marker:_}){for(const c of t){if(isNaN(r[c]+a[c]+s[c]+i[c])||null==_[c])continue;const t=s[c]/2;e.beginPath(),e.translate(r[c],a[c]),i[c]&&e.rotate(i[c]),n.marker_funcs[_[c]](e,c,t,this.visuals.line,this.visuals.fill),i[c]&&e.rotate(-i[c]),e.translate(-r[c],-a[c])}}draw_legend_for_index(e,{x0:t,x1:r,y0:a,y1:s},n){const i=n+1,_=new Array(i);_[n]=(t+r)/2;const c=new Array(i);c[n]=(a+s)/2;const o=new Array(i);o[n]=.4*Math.min(Math.abs(r-t),Math.abs(s-a));const l=new Array(i);l[n]=0;const u=new Array(i);u[n]=this._marker[n],this._render(e,[n],{sx:_,sy:c,_size:o,_angle:l,_marker:u})}}r.ScatterView=_,_.__name__=\"ScatterView\";class c extends s.Marker{constructor(e){super(e)}static init_Scatter(){this.prototype.default_view=_,this.define({marker:[i.MarkerSpec,{value:\"circle\"}]})}}r.Scatter=c,c.__name__=\"Scatter\",c.init_Scatter()},\n",
" function _(a,o,p){Object.defineProperty(p,\"__esModule\",{value:!0});var t=a(271);p.MapOptions=t.MapOptions;var e=a(271);p.GMapOptions=e.GMapOptions;var n=a(271);p.GMapPlot=n.GMapPlot;var M=a(272);p.Plot=M.Plot},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const o=t(1),n=t(72),a=t(272),s=o.__importStar(t(18)),p=t(71),r=t(131),_=t(296);i.GMapPlotView=_.GMapPlotView;class l extends p.Model{constructor(t){super(t)}static init_MapOptions(){this.define({lat:[s.Number],lng:[s.Number],zoom:[s.Number,12]})}}i.MapOptions=l,l.__name__=\"MapOptions\",l.init_MapOptions();class c extends l{constructor(t){super(t)}static init_GMapOptions(){this.define({map_type:[s.String,\"roadmap\"],scale_control:[s.Boolean,!1],styles:[s.String],tilt:[s.Int,45]})}}i.GMapOptions=c,c.__name__=\"GMapOptions\",c.init_GMapOptions();class u extends a.Plot{constructor(t){super(t)}static init_GMapPlot(){this.prototype.default_view=_.GMapPlotView,this.define({map_options:[s.Instance],api_key:[s.String]}),this.override({x_range:()=>new r.Range1d,y_range:()=>new r.Range1d})}initialize(){super.initialize(),this.use_map=!0,this.api_key||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.\")}}i.GMapPlot=u,u.__name__=\"GMapPlot\",u.init_GMapPlot()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(1),o=i.__importStar(e(23)),n=i.__importStar(e(18)),s=e(14),a=e(9),l=e(17),_=e(8),h=e(245),c=e(142),u=e(120),d=e(273),b=e(76),g=e(81),p=e(186),m=e(290);r.PlotView=m.PlotView;class f extends h.LayoutDOM{constructor(e){super(e)}static init_Plot(){this.prototype.default_view=m.PlotView,this.mixins([[\"outline_\",o.Line],[\"background_\",o.Fill],[\"border_\",o.Fill]]),this.define({toolbar:[n.Instance,()=>new d.Toolbar],toolbar_location:[n.Location,\"right\"],toolbar_sticky:[n.Boolean,!0],plot_width:[n.Number,600],plot_height:[n.Number,600],frame_width:[n.Number,null],frame_height:[n.Number,null],title:[n.Any,()=>new c.Title({text:\"\"})],title_location:[n.Location,\"above\"],above:[n.Array,[]],below:[n.Array,[]],left:[n.Array,[]],right:[n.Array,[]],center:[n.Array,[]],renderers:[n.Array,[]],x_range:[n.Instance,()=>new p.DataRange1d],extra_x_ranges:[n.Any,{}],y_range:[n.Instance,()=>new p.DataRange1d],extra_y_ranges:[n.Any,{}],x_scale:[n.Instance,()=>new u.LinearScale],y_scale:[n.Instance,()=>new u.LinearScale],lod_factor:[n.Number,10],lod_interval:[n.Number,300],lod_threshold:[n.Number,2e3],lod_timeout:[n.Number,500],hidpi:[n.Boolean,!0],output_backend:[n.OutputBackend,\"canvas\"],min_border:[n.Number,5],min_border_top:[n.Number,null],min_border_left:[n.Number,null],min_border_bottom:[n.Number,null],min_border_right:[n.Number,null],inner_width:[n.Number],inner_height:[n.Number],outer_width:[n.Number],outer_height:[n.Number],match_aspect:[n.Boolean,!1],aspect_scale:[n.Number,1],reset_policy:[n.ResetPolicy,\"standard\"]}),this.override({outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"})}get width(){const e=this.properties.width.get_value();return null!=e?e:this.plot_width}set width(e){this.setv({width:e,plot_width:e})}get height(){const e=this.properties.height.get_value();return null!=e?e:this.plot_height}set height(e){this.setv({height:e,plot_height:e})}_doc_attached(){super._doc_attached(),this._push_changes([[this.properties.inner_height,null,this.inner_height],[this.properties.inner_width,null,this.inner_width]])}initialize(){super.initialize(),this.reset=new s.Signal0(this,\"reset\");for(const e of l.values(this.extra_x_ranges).concat(this.x_range)){let t=e.plots;_.isArray(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}for(const e of l.values(this.extra_y_ranges).concat(this.y_range)){let t=e.plots;_.isArray(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}}add_layout(e,t=\"center\"){const r=this.properties[t].get_value();this.setv({[t]:[...r,e]})}remove_layout(e){const t=t=>{a.remove_by(t,t=>t==e)};t(this.left),t(this.right),t(this.above),t(this.below),t(this.center)}add_renderers(...e){this.renderers=this.renderers.concat(e)}add_glyph(e,t=new b.ColumnDataSource,r={}){const i=Object.assign(Object.assign({},r),{data_source:t,glyph:e}),o=new g.GlyphRenderer(i);return this.add_renderers(o),o}add_tools(...e){this.toolbar.tools=this.toolbar.tools.concat(e)}get panels(){return[...this.side_panels,...this.center]}get side_panels(){const{above:e,below:t,left:r,right:i}=this;return a.concat([e,t,r,i])}}r.Plot=f,f.__name__=\"Plot\",f.init_Plot()},\n",
" function _(t,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1).__importStar(t(18)),c=t(8),o=t(9),n=t(274),a=t(283),l=t=>{switch(t){case\"tap\":return\"active_tap\";case\"pan\":return\"active_drag\";case\"pinch\":case\"scroll\":return\"active_scroll\";case\"multi\":return\"active_multi\"}return null},r=t=>\"tap\"==t||\"pan\"==t;class _ extends a.ToolbarBase{constructor(t){super(t)}static init_Toolbar(){this.prototype.default_view=a.ToolbarBaseView,this.define({active_drag:[i.Any,\"auto\"],active_inspect:[i.Any,\"auto\"],active_scroll:[i.Any,\"auto\"],active_tap:[i.Any,\"auto\"],active_multi:[i.Any,null]})}connect_signals(){super.connect_signals();const{tools:t,active_drag:s,active_inspect:e,active_scroll:i,active_tap:c,active_multi:o}=this.properties;this.on_change([t,s,e,i,c,o],()=>this._init_tools())}_init_tools(){if(super._init_tools(),\"auto\"==this.active_inspect);else if(this.active_inspect instanceof n.InspectTool){let t=!1;for(const s of this.inspectors)s!=this.active_inspect?s.active=!1:t=!0;t||(this.active_inspect=null)}else if(c.isArray(this.active_inspect)){const t=o.intersection(this.active_inspect,this.inspectors);t.length!=this.active_inspect.length&&(this.active_inspect=t);for(const t of this.inspectors)o.includes(this.active_inspect,t)||(t.active=!1)}else if(null==this.active_inspect)for(const t of this.inspectors)t.active=!1;const t=t=>{t.active?this._active_change(t):t.active=!0};for(const t in this.gestures){const s=this.gestures[t];s.tools=o.sort_by(s.tools,t=>t.default_order);for(const t of s.tools)this.connect(t.properties.active.change,()=>this._active_change(t))}for(const s in this.gestures){const e=l(s);if(e){const i=this[e];if(\"auto\"==i){const e=this.gestures[s];0!=e.tools.length&&r(s)&&t(e.tools[0])}else null!=i&&(o.includes(this.tools,i)?t(i):this[e]=null)}}}}e.Toolbar=_,_.__name__=\"Toolbar\",_.init_Toolbar()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const n=e(1),s=e(275),i=e(282),_=n.__importStar(e(18));class c extends s.ButtonToolView{}o.InspectToolView=c,c.__name__=\"InspectToolView\";class l extends s.ButtonTool{constructor(e){super(e),this.event_type=\"move\"}static init_InspectTool(){this.prototype.button_view=i.OnOffButtonView,this.define({toggleable:[_.Boolean,!0]}),this.override({active:!0})}}o.InspectTool=l,l.__name__=\"InspectTool\",l.init_InspectTool()},\n",
" function _(t,e,o){Object.defineProperty(o,\"__esModule\",{value:!0});const i=t(1),s=i.__importDefault(t(276)),n=t(66),l=t(277),r=t(68),a=i.__importStar(t(18)),u=t(24),_=t(8),h=t(9),c=t(278),m=i.__importDefault(t(279)),d=i.__importDefault(t(280)),p=i.__importDefault(t(257)),f=t(281);class g extends n.DOMView{initialize(){super.initialize();const t=this.model.menu;if(null!=t){const e=this.parent.model.toolbar_location,o=\"left\"==e||\"above\"==e,i=this.parent.model.horizontal?\"vertical\":\"horizontal\";this._menu=new f.ContextMenu(o?h.reversed(t):t,{orientation:i,prevent_hide:t=>t.target==this.el})}this._hammer=new s.default(this.el,{touchAction:\"auto\",inputClass:s.default.TouchMouseInput}),this.connect(this.model.change,()=>this.render()),this._hammer.on(\"tap\",t=>{var e;(null===(e=this._menu)||void 0===e?void 0:e.is_open)?this._menu.hide():t.target==this.el&&this._clicked()}),this._hammer.on(\"press\",()=>this._pressed())}remove(){var t;this._hammer.destroy(),null===(t=this._menu)||void 0===t||t.remove(),super.remove()}styles(){return[...super.styles(),m.default,d.default,p.default]}css_classes(){return super.css_classes().concat(c.bk_toolbar_button)}render(){r.empty(this.el);const t=this.model.computed_icon;_.isString(t)&&(u.startsWith(t,\"data:image\")?this.el.style.backgroundImage=\"url('\"+t+\"')\":this.el.classList.add(t)),this.el.title=this.model.tooltip,null!=this._menu&&this.root.el.appendChild(this._menu.el)}_pressed(){var t;const{left:e,top:o,right:i,bottom:s}=this.el.getBoundingClientRect(),n=(()=>{switch(this.parent.model.toolbar_location){case\"right\":return{right:e,top:o};case\"left\":return{left:i,top:o};case\"above\":return{left:e,top:s};case\"below\":return{left:e,bottom:o}}})();null===(t=this._menu)||void 0===t||t.toggle(n)}}o.ButtonToolButtonView=g,g.__name__=\"ButtonToolButtonView\";class v extends l.ToolView{}o.ButtonToolView=v,v.__name__=\"ButtonToolView\";class b extends l.Tool{constructor(t){super(t)}static init_ButtonTool(){this.internal({disabled:[a.Boolean,!1]})}get tooltip(){return this.tool_name}get computed_icon(){return this.icon}get menu(){return null}}o.ButtonTool=b,b.__name__=\"ButtonTool\",b.init_ButtonTool()},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=t(1).__importStar(t(18)),o=t(67),s=t(9),a=t(71);class r extends o.View{get plot_view(){return this.parent}get plot_model(){return this.parent.model}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>{this.model.active?this.activate():this.deactivate()})}activate(){}deactivate(){}}i.ToolView=r,r.__name__=\"ToolView\";class _ extends a.Model{constructor(t){super(t)}static init_Tool(){this.prototype._known_aliases=new Map,this.internal({active:[n.Boolean,!1]})}get synthetic_renderers(){return[]}_get_dim_tooltip(t,e){switch(e){case\"width\":return t+\" (x-axis)\";case\"height\":return t+\" (y-axis)\";case\"both\":return t}}_get_dim_limits([t,e],[i,n],o,a){const r=o.bbox.h_range;let _;\"width\"==a||\"both\"==a?(_=[s.min([t,i]),s.max([t,i])],_=[s.max([_[0],r.start]),s.min([_[1],r.end])]):_=[r.start,r.end];const l=o.bbox.v_range;let c;return\"height\"==a||\"both\"==a?(c=[s.min([e,n]),s.max([e,n])],c=[s.max([c[0],l.start]),s.min([c[1],l.end])]):c=[l.start,l.end],[_,c]}static register_alias(t,e){this.prototype._known_aliases.set(t,e)}static from_string(t){const e=this.prototype._known_aliases.get(t);if(null!=e)return e();{const e=[...this.prototype._known_aliases.keys()];throw new Error(`unexpected tool name '${t}', possible tools are ${e.join(\", \")}`)}}}i.Tool=_,_.__name__=\"Tool\",_.init_Tool()},\n",
" function _(o,b,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.bk_toolbar=\"bk-toolbar\",t.bk_toolbar_hidden=\"bk-toolbar-hidden\",t.bk_toolbar_button=\"bk-toolbar-button\",t.bk_button_bar=\"bk-button-bar\",t.bk_toolbar_button_custom_action=\"bk-toolbar-button-custom-action\"},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(275),i=e(146),s=e(68);class c extends o.ButtonToolButtonView{render(){super.render(),s.classes(this.el).toggle(i.bk_active,this.model.active)}_clicked(){const{active:e}=this.model;this.model.active=!e}}n.OnOffButtonView=c,c.__name__=\"OnOffButtonView\"},\n",
" function _(t,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1),s=t(72),l=t(68),n=t(99),a=i.__importStar(t(18)),r=t(66),_=t(9),c=t(8),h=t(71),u=t(284),v=t(285),d=t(286),b=t(274),p=t(278),g=t(288),f=t(146),m=i.__importDefault(t(279)),w=i.__importDefault(t(289));class y extends h.Model{constructor(t){super(t)}static init_ToolbarViewModel(){this.define({_visible:[a.Any,null],autohide:[a.Boolean,!1]})}get visible(){return!this.autohide||null!=this._visible&&this._visible}}e.ToolbarViewModel=y,y.__name__=\"ToolbarViewModel\",y.init_ToolbarViewModel();class T extends r.DOMView{initialize(){super.initialize(),this._tool_button_views=new Map,this._toolbar_view_model=new y({autohide:this.model.autohide})}async lazy_initialize(){await this._build_tool_button_views()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.tools.change,async()=>{await this._build_tool_button_views(),this.render()}),this.connect(this.model.properties.autohide.change,()=>{this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change()}),this.connect(this._toolbar_view_model.properties._visible.change,()=>this._on_visible_change())}styles(){return[...super.styles(),m.default,w.default]}remove(){n.remove_views(this._tool_button_views),super.remove()}async _build_tool_button_views(){const t=null!=this.model._proxied_tools?this.model._proxied_tools:this.model.tools;await n.build_views(this._tool_button_views,t,{parent:this},t=>t.button_view)}set_visibility(t){t!=this._toolbar_view_model._visible&&(this._toolbar_view_model._visible=t)}_on_visible_change(){const t=this._toolbar_view_model.visible,o=p.bk_toolbar_hidden;this.el.classList.contains(o)&&t?this.el.classList.remove(o):t||this.el.classList.add(o)}render(){if(l.empty(this.el),this.el.classList.add(p.bk_toolbar),this.el.classList.add(f.bk_side(this.model.toolbar_location)),this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change(),null!=this.model.logo){const t=\"grey\"===this.model.logo?g.bk_grey:null,o=l.a({href:\"https://bokeh.org/\",target:\"_blank\",class:[g.bk_logo,g.bk_logo_small,t]});this.el.appendChild(o)}for(const[,t]of this._tool_button_views)t.render();const t=[],o=t=>this._tool_button_views.get(t).el,{gestures:e}=this.model;for(const i in e)t.push(e[i].tools.map(o));t.push(this.model.actions.map(o)),t.push(this.model.inspectors.filter(t=>t.toggleable).map(o));for(const o of t)if(0!==o.length){const t=l.div({class:p.bk_button_bar},o);this.el.appendChild(t)}}update_layout(){}update_position(){}after_layout(){this._has_finished=!0}}function k(){return{pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}}}e.ToolbarBaseView=T,T.__name__=\"ToolbarBaseView\";class M extends h.Model{constructor(t){super(t)}static init_ToolbarBase(){this.prototype.default_view=T,this.define({tools:[a.Array,[]],logo:[a.Logo,\"normal\"],autohide:[a.Boolean,!1]}),this.internal({gestures:[a.Any,k],actions:[a.Array,[]],inspectors:[a.Array,[]],help:[a.Array,[]],toolbar_location:[a.Location,\"right\"]})}initialize(){super.initialize(),this._init_tools()}_init_tools(){const t=function(t,o){if(t.length!=o.length)return!0;const e=new Set(o.map(t=>t.id));return _.some(t,t=>!e.has(t.id))},o=this.tools.filter(t=>t instanceof b.InspectTool);t(this.inspectors,o)&&(this.inspectors=o);const e=this.tools.filter(t=>t instanceof d.HelpTool);t(this.help,e)&&(this.help=e);const i=this.tools.filter(t=>t instanceof v.ActionTool);t(this.actions,i)&&(this.actions=i);const l=(t,o)=>{t in this.gestures||s.logger.warn(`Toolbar: unknown event type '${t}' for tool: ${o}`)},n={pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools
" function _(e,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(275),n=e(282);class u extends s.ButtonToolView{}t.GestureToolView=u,u.__name__=\"GestureToolView\";class _ extends s.ButtonTool{constructor(e){super(e),this.button_view=n.OnOffButtonView}}t.GestureTool=_,_.__name__=\"GestureTool\"},\n",
" function _(o,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const e=o(275),i=o(14);class s extends e.ButtonToolButtonView{_clicked(){this.model.do.emit()}}n.ActionToolButtonView=s,s.__name__=\"ActionToolButtonView\";class c extends e.ButtonToolView{connect_signals(){super.connect_signals(),this.connect(this.model.do,()=>this.doit())}}n.ActionToolView=c,c.__name__=\"ActionToolView\";class l extends e.ButtonTool{constructor(o){super(o),this.button_view=s,this.do=new i.Signal0(this,\"do\")}}n.ActionTool=l,l.__name__=\"ActionTool\"},\n",
" function _(o,e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=o(1),l=o(285),s=i.__importStar(o(18)),n=o(287);class _ extends l.ActionToolView{doit(){window.open(this.model.redirect)}}t.HelpToolView=_,_.__name__=\"HelpToolView\";class r extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Help\",this.icon=n.bk_tool_icon_help}static init_HelpTool(){this.prototype.default_view=_,this.define({help_tooltip:[s.String,\"Click the question mark to learn more about Bokeh plot tools.\"],redirect:[s.String,\"https://docs.bokeh.org/en/latest/docs/user_guide/tools.html\"]}),this.register_alias(\"help\",()=>new r)}get tooltip(){return this.help_tooltip}}t.HelpTool=r,r.__name__=\"HelpTool\",r.init_HelpTool()},\n",
" function _(o,_,l){Object.defineProperty(l,\"__esModule\",{value:!0}),l.bk_tool_icon_box_select=\"bk-tool-icon-box-select\",l.bk_tool_icon_box_zoom=\"bk-tool-icon-box-zoom\",l.bk_tool_icon_zoom_in=\"bk-tool-icon-zoom-in\",l.bk_tool_icon_zoom_out=\"bk-tool-icon-zoom-out\",l.bk_tool_icon_help=\"bk-tool-icon-help\",l.bk_tool_icon_hover=\"bk-tool-icon-hover\",l.bk_tool_icon_crosshair=\"bk-tool-icon-crosshair\",l.bk_tool_icon_lasso_select=\"bk-tool-icon-lasso-select\",l.bk_tool_icon_pan=\"bk-tool-icon-pan\",l.bk_tool_icon_xpan=\"bk-tool-icon-xpan\",l.bk_tool_icon_ypan=\"bk-tool-icon-ypan\",l.bk_tool_icon_range=\"bk-tool-icon-range\",l.bk_tool_icon_polygon_select=\"bk-tool-icon-polygon-select\",l.bk_tool_icon_redo=\"bk-tool-icon-redo\",l.bk_tool_icon_reset=\"bk-tool-icon-reset\",l.bk_tool_icon_save=\"bk-tool-icon-save\",l.bk_tool_icon_tap_select=\"bk-tool-icon-tap-select\",l.bk_tool_icon_undo=\"bk-tool-icon-undo\",l.bk_tool_icon_wheel_pan=\"bk-tool-icon-wheel-pan\",l.bk_tool_icon_wheel_zoom=\"bk-tool-icon-wheel-zoom\",l.bk_tool_icon_box_edit=\"bk-tool-icon-box-edit\",l.bk_tool_icon_freehand_draw=\"bk-tool-icon-freehand-draw\",l.bk_tool_icon_poly_draw=\"bk-tool-icon-poly-draw\",l.bk_tool_icon_point_draw=\"bk-tool-icon-point-draw\",l.bk_tool_icon_poly_edit=\"bk-tool-icon-poly-edit\",l.bk_tool_icon_line_edit=\"bk-tool-icon-line-edit\"},\n",
" function _(o,l,b){Object.defineProperty(b,\"__esModule\",{value:!0}),b.bk_logo=\"bk-logo\",b.bk_logo_notebook=\"bk-logo-notebook\",b.bk_logo_small=\"bk-logo-small\",b.bk_grey=\"bk-grey\"},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const a=e(303);class s extends a.WebDataSource{constructor(e){super(e),this.initialized=!1}destroy(){super.destroy()}setup(){if(!this.initialized){this.initialized=!0,new EventSource(this.data_url).onmessage=e=>{this.load_data(JSON.parse(e.data),this.mode,this.max_size)}}}}i.ServerSentDataSource=s,s.__name__=\"ServerSentDataSource\"},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const r=e(1),s=e(76),i=r.__importStar(e(18));class n extends s.ColumnDataSource{constructor(e){super(e)}get_column(e){const t=this.data[e];return null!=t?t:[]}initialize(){super.initialize(),this.setup()}load_data(e,t,a){const{adapter:r}=this;let s;switch(s=null!=r?r.execute(this,{response:e}):e,t){case\"replace\":this.data=s;break;case\"append\":{const e=this.data;for(const t of this.columns()){const r=Array.from(e[t]),i=Array.from(s[t]);s[t]=r.concat(i).slice(-a)}this.data=s;break}}}static init_WebDataSource(){this.define({mode:[i.UpdateMode,\"replace\"],max_size:[i.Number],adapter:[i.Any,null],data_url:[i.String]})}}a.WebDataSource=n,n.__name__=\"WebDataSource\",n.init_WebDataSource()},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=t(1),a=t(303),r=t(72),o=s.__importStar(t(18));class n extends a.WebDataSource{constructor(t){super(t),this.initialized=!1}static init_AjaxDataSource(){this.define({polling_interval:[o.Number],content_type:[o.String,\"application/json\"],http_headers:[o.Any,{}],method:[o.HTTPMethod,\"POST\"],if_modified:[o.Boolean,!1]})}destroy(){null!=this.interval&&clearInterval(this.interval),super.destroy()}setup(){if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval)){const t=()=>this.get_data(this.mode,this.max_size,this.if_modified);this.interval=setInterval(t,this.polling_interval)}}get_data(t,e=0,i=!1){const s=this.prepare_request();s.addEventListener(\"load\",()=>this.do_load(s,t,e)),s.addEventListener(\"error\",()=>this.do_error(s)),s.send()}prepare_request(){const t=new XMLHttpRequest;t.open(this.method,this.data_url,!0),t.withCredentials=!1,t.setRequestHeader(\"Content-Type\",this.content_type);const e=this.http_headers;for(const i in e){const s=e[i];t.setRequestHeader(i,s)}return t}do_load(t,e,i){if(200===t.status){const s=JSON.parse(t.responseText);this.load_data(s,e,i)}}do_error(t){r.logger.error(`Failed to fetch JSON from ${this.data_url} with code ${t.status}`)}}i.AjaxDataSource=n,n.__name__=\"AjaxDataSource\",n.init_AjaxDataSource()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const r=e(1),n=e(77),s=e(72),a=r.__importStar(e(18)),i=e(9);function l(e){return null!=e?e:NaN}class c extends n.ColumnarDataSource{constructor(e){super(e)}static init_GeoJSONDataSource(){this.define({geojson:[a.Any]}),this.internal({data:[a.Any,{}]})}initialize(){super.initialize(),this._update_data()}connect_signals(){super.connect_signals(),this.connect(this.properties.geojson.change,()=>this._update_data())}_update_data(){this.data=this.geojson_to_column_data()}_get_new_list_array(e){return i.range(0,e).map(e=>[])}_get_new_nan_array(e){return i.range(0,e).map(e=>NaN)}_add_properties(e,t,o,r){const n=e.properties||{};for(const e in n)t.hasOwnProperty(e)||(t[e]=this._get_new_nan_array(r)),t[e][o]=l(n[e])}_add_geometry(e,t,o){function r(e,t){return e.concat([[NaN,NaN,NaN]]).concat(t)}switch(e.type){case\"Point\":{const[r,n,s]=e.coordinates;t.x[o]=r,t.y[o]=n,t.z[o]=l(s);break}case\"LineString\":{const{coordinates:r}=e;for(let e=0;e<r.length;e++){const[n,s,a]=r[e];t.xs[o][e]=n,t.ys[o][e]=s,t.zs[o][e]=l(a)}break}case\"Polygon\":{e.coordinates.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\");const r=e.coordinates[0];for(let e=0;e<r.length;e++){const[n,s,a]=r[e];t.xs[o][e]=n,t.ys[o][e]=s,t.zs[o][e]=l(a)}break}case\"MultiPoint\":s.logger.warn(\"MultiPoint not supported in Bokeh\");break;case\"MultiLineString\":{const n=e.coordinates.reduce(r);for(let e=0;e<n.length;e++){const[r,s,a]=n[e];t.xs[o][e]=r,t.ys[o][e]=s,t.zs[o][e]=l(a)}break}case\"MultiPolygon\":{const n=[];for(const t of e.coordinates)t.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),n.push(t[0]);const a=n.reduce(r);for(let e=0;e<a.length;e++){const[r,n,s]=a[e];t.xs[o][e]=r,t.ys[o][e]=n,t.zs[o][e]=l(s)}break}default:throw new Error(\"Invalid GeoJSON geometry type: \"+e.type)}}geojson_to_column_data(){const e=JSON.parse(this.geojson);let t;switch(e.type){case\"GeometryCollection\":if(null==e.geometries)throw new Error(\"No geometries found in GeometryCollection\");if(0===e.geometries.length)throw new Error(\"geojson.geometries must have one or more items\");t=e.geometries;break;case\"FeatureCollection\":if(null==e.features)throw new Error(\"No features found in FeaturesCollection\");if(0==e.features.length)throw new Error(\"geojson.features must have one or more items\");t=e.features;break;default:throw new Error(\"Bokeh only supports type GeometryCollection and FeatureCollection at top level\")}let o=0;for(const e of t){const t=\"Feature\"===e.type?e.geometry:e;\"GeometryCollection\"==t.type?o+=t.geometries.length:o+=1}const r={x:this._get_new_nan_array(o),y:this._get_new_nan_array(o),z:this._get_new_nan_array(o),xs:this._get_new_list_array(o),ys:this._get_new_list_array(o),zs:this._get_new_list_array(o)};let n=0;for(const e of t){const t=\"Feature\"==e.type?e.geometry:e;if(\"GeometryCollection\"==t.type)for(const s of t.geometries)this._add_geometry(s,r,n),\"Feature\"===e.type&&this._add_properties(e,r,n,o),n+=1;else this._add_geometry(t,r,n),\"Feature\"===e.type&&this._add_properties(e,r,n,o),n+=1}return r}}o.GeoJSONDataSource=c,c.__name__=\"GeoJSONDataSource\",c.init_GeoJSONDataSource()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(1),n=e(71),s=e(17),l=i.__importStar(e(18));class a extends n.Model{constructor(e){super(e)}static init_TileSource(){this.define({url:[l.String,\"\"],tile_size:[l.Number,256],max_zoom:[l.Number,30],min_zoom:[l.Number,0],extra_url_vars:[l.Any,{}],attribution:[l.String,\"\"],x_origin_offset:[l.Number],y_origin_offset:[l.Number],initial_resolution:[l.Number]})}initialize(){super.initialize(),this.tiles=new Map,this._normalize_case()}connect_signals(){super.connect_signals(),this.connect(this.change,()=>this._clear_cache())}string_lookup_replace(e,t){let r=e;for(const[e,i]of s.entries(t))r=r.replace(`{${e}}`,i);return r}_normalize_case(){const e=this.url.replace(\"{x}\",\"{X}\").replace(\"{y}\",\"{Y}\").replace(\"{z}\",\"{Z}\").replace(\"{q}\",\"{Q}\").replace(\"{xmin}\",\"{XMIN}\").replace(\"{ymin}\",\"{YMIN}\").replace(\"{xmax}\",\"{XMAX}\").replace(\"{ymax}\",\"{YMAX}\");this.url=e}_clear_cache(){this.tiles=new Map}tile_xyz_to_key(e,t,r){return`${e}:${t}:${r}`}key_to_tile_xyz(e){const[t,r,i]=e.split(\":\").map(e=>parseInt(e));return[t,r,i]}sort_tiles_from_center(e,t){const[r,i,n,s]=t,l=(n-r)/2+r,a=(s-i)/2+i;e.sort((function(e,t){return Math.sqrt((l-e[0])**2+(a-e[1])**2)-Math.sqrt((l-t[0])**2+(a-t[1])**2)}))}get_image_url(e,t,r){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",t.toString()).replace(\"{Z}\",r.toString())}}r.TileSource=a,a.__name__=\"TileSource\",a.init_TileSource()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const n=e(32);function o(e,t){return n.wgs84_mercator.forward([e,t])}function c(e,t){return n.wgs84_mercator.inverse([e,t])}r.geographic_to_meters=o,r.meters_to_geographic=c,r.geographic_extent_to_meters=function(e){const[t,r,n,c]=e,[_,i]=o(t,r),[s,u]=o(n,c);return[_,i,s,u]},r.meters_extent_to_geographic=function(e){const[t,r,n,o]=e,[_,i]=c(t,r),[s,u]=c(n,o);return[_,i,s,u]}},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const _=e(310);class s extends _.MercatorTileSource{constructor(e){super(e)}get_image_url(e,t,r){const _=this.string_lookup_replace(this.url,this.extra_url_vars),[s,o,u]=this.tms_to_wmts(e,t,r),c=this.tile_xyz_to_quadkey(s,o,u);return _.replace(\"{Q}\",c)}}r.QUADKEYTileSource=s,s.__name__=\"QUADKEYTileSource\"},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),_=e(315),a=e(82),n=e(131),r=e(68),h=s.__importStar(e(18)),l=e(224),o=e(9),d=e(8),m=e(80),c=e(76),u=e(316),p=s.__importDefault(e(317));class g extends a.DataRendererView{initialize(){this._tiles=[],super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.request_render()),this.connect(this.model.tile_source.change,()=>this.request_render())}styles(){return[...super.styles(),p.default]}get_extent(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]}get map_plot(){return this.plot_model}get map_canvas(){return this.layer.ctx}get map_frame(){return this.plot_view.frame}get x_range(){return this.map_plot.x_range}get y_range(){return this.map_plot.y_range}_set_data(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0}_update_attribution(){null!=this.attribution_el&&r.removeElement(this.attribution_el);const{attribution:e}=this.model.tile_source;if(d.isString(e)&&e.length>0){const{layout:t,frame:i}=this.plot_view,s=t._width.value-i._right.value,_=t._height.value-i._bottom.value,a=i._width.value;this.attribution_el=r.div({class:u.bk_tile_attribution,style:{position:\"absolute\",right:s+\"px\",bottom:_+\"px\",\"max-width\":a-4+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.5)\",\"font-size\":\"9px\",\"line-height\":\"1.05\",\"white-space\":\"nowrap\",overflow:\"hidden\",\"text-overflow\":\"ellipsis\"}}),this.plot_view.canvas_view.add_event(this.attribution_el),this.attribution_el.innerHTML=e,this.attribution_el.title=this.attribution_el.textContent.replace(/\\s*\\n\\s*/g,\" \")}}_map_data(){this.initial_extent=this.get_extent();const 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_level(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.x_range instanceof n.Range1d&&(this.x_range.reset_start=t[0],this.x_range.reset_end=t[2]),this.y_range instanceof n.Range1d&&(this.y_range.reset_start=t[1],this.y_range.reset_end=t[3]),this._update_attribution()}_create_tile(e,t,i,s,_=!1){const[a,n,r]=this.model.tile_source.normalize_xyz(e,t,i),h={img:void 0,tile_coords:[e,t,i],normalized_coords:[a,n,r],quadkey:this.model.tile_source.tile_xyz_to_quadkey(e,t,i),cache_key:this.model.tile_source.tile_xyz_to_key(e,t,i),bounds:s,loaded:!1,finished:!1,x_coord:s[0],y_coord:s[3]},o=this.model.tile_source.get_image_url(a,n,r);new l.ImageLoader(o,{loaded:e=>{Object.assign(h,{img:e,loaded:!0}),_?(h.finished=!0,this.notify_finished()):this.request_render()},failed(){h.finished=!0}}),this.model.tile_source.tiles.set(h.cache_key,h),this._tiles.push(h)}_enforce_aspect_ratio(){if(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value){const e=this.get_extent(),t=this.model.tile_source.get_level_by_extent(e,this.map_frame._height.value,this.map_frame._width.value),i=this.model.tile_source.snap_to_zoom_level(e,this.map_frame._height.value,this.map_frame._width.value,t);this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value}}has_finished(){if(!super.has_finished())return!1;if(0===this._tiles.length)return!1;for(const e of this._tiles)if(!e.finished)return!1;return!0}render(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()}_draw_tile(e){const t=this.model.tile_source.tiles.get(e);if(null!=t&&t.loaded){const[[e],[i]]=this.plot_view.map_to_screen([t.bounds[0]],[t.bounds[3]]),[[s],[_]]=this.plot_view
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const o=e(310);class s extends o.MercatorTileSource{constructor(e){super(e)}get_image_url(e,t,r){const o=this.string_lookup_replace(this.url,this.extra_url_vars),[s,c,_]=this.tms_to_wmts(e,t,r);return o.replace(\"{X}\",s.toString()).replace(\"{Y}\",c.toString()).replace(\"{Z}\",_.toString())}}r.WMTSTileSource=s,s.__name__=\"WMTSTileSource\"},\n",
" function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0}),i.bk_tile_attribution=\"bk-tile-attribution\"},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});n.default=\"\\n.bk-root .bk-tile-attribution a {\\n color: black;\\n}\\n\"},\n",
" function _(e,r,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(310);class c extends o.MercatorTileSource{constructor(e){super(e)}get_image_url(e,r,t){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",e.toString()).replace(\"{Y}\",r.toString()).replace(\"{Z}\",t.toString())}}t.TMSTileSource=c,c.__name__=\"TMSTileSource\"},\n",
" function _(e,r,a){Object.defineProperty(a,\"__esModule\",{value:!0});var t=e(320);a.CanvasTexture=t.CanvasTexture;var u=e(322);a.ImageURLTexture=u.ImageURLTexture;var v=e(321);a.Texture=v.Texture},\n",
" function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const r=t(1),c=t(321),s=r.__importStar(t(18)),i=t(24);class a extends c.Texture{constructor(t){super(t)}static init_CanvasTexture(){this.define({code:[s.String]})}get func(){const t=i.use_strict(this.code);return new Function(\"ctx\",\"color\",\"scale\",\"weight\",t)}get_pattern(t,e,n){return r=>{const c=document.createElement(\"canvas\");c.width=e,c.height=e;const s=c.getContext(\"2d\");return this.func.call(this,s,t,e,n),r.createPattern(c,this.repetition)}}}n.CanvasTexture=a,a.__name__=\"CanvasTexture\",a.init_CanvasTexture()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=e(1),n=e(71),o=r.__importStar(e(18));class _ extends n.Model{constructor(e){super(e)}static init_Texture(){this.define({repetition:[o.TextureRepetition,\"repeat\"]})}onload(e){e()}}i.Texture=_,_.__name__=\"Texture\",_.init_Texture()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=e(1),a=e(321),n=r.__importStar(e(18)),s=e(224);class o extends a.Texture{constructor(e){super(e)}static init_ImageURLTexture(){this.define({url:[n.String]})}initialize(){super.initialize(),this._loader=new s.ImageLoader(this.url)}get_pattern(e,t,i){return e=>this._loader.finished?e.createPattern(this._loader.image,this.repetition):null}onload(e){this._loader.promise.then(()=>e())}}i.ImageURLTexture=o,o.__name__=\"ImageURLTexture\",o.init_ImageURLTexture()},\n",
" function _(t,o,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=t(1),s=t(285),e=n.__importStar(t(18)),c=t(278);class _ extends s.ActionToolButtonView{css_classes(){return super.css_classes().concat(c.bk_toolbar_button_custom_action)}}i.CustomActionButtonView=_,_.__name__=\"CustomActionButtonView\";class l extends s.ActionToolView{doit(){null!=this.model.callback&&this.model.callback.execute(this.model)}}i.CustomActionView=l,l.__name__=\"CustomActionView\";class u extends s.ActionTool{constructor(t){super(t),this.tool_name=\"Custom Action\",this.button_view=_}static init_CustomAction(){this.prototype.default_view=l,this.define({action_tooltip:[e.String,\"Perform a Custom Action\"],callback:[e.Any],icon:[e.String]})}get tooltip(){return this.action_tooltip}}i.CustomAction=u,u.__name__=\"CustomAction\",u.init_CustomAction()},\n",
" function _(o,e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=o(285),s=o(287);class n extends i.ActionToolView{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state_changed,()=>this.model.disabled=!this.plot_view.can_redo())}doit(){this.plot_view.redo()}}t.RedoToolView=n,n.__name__=\"RedoToolView\";class _ extends i.ActionTool{constructor(o){super(o),this.tool_name=\"Redo\",this.icon=s.bk_tool_icon_redo}static init_RedoTool(){this.prototype.default_view=n,this.override({disabled:!0}),this.register_alias(\"redo\",()=>new _)}}t.RedoTool=_,_.__name__=\"RedoTool\",_.init_RedoTool()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(285),i=e(287);class _ extends s.ActionToolView{doit(){this.plot_view.reset()}}o.ResetToolView=_,_.__name__=\"ResetToolView\";class l extends s.ActionTool{constructor(e){super(e),this.tool_name=\"Reset\",this.icon=i.bk_tool_icon_reset}static init_ResetTool(){this.prototype.default_view=_,this.register_alias(\"reset\",()=>new l)}}o.ResetTool=l,l.__name__=\"ResetTool\",l.init_ResetTool()},\n",
" function _(e,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(285),s=e(287);class _ extends i.ActionToolView{doit(){this.plot_view.save(\"bokeh_plot\")}}t.SaveToolView=_,_.__name__=\"SaveToolView\";class a extends i.ActionTool{constructor(e){super(e),this.tool_name=\"Save\",this.icon=s.bk_tool_icon_save}static init_SaveTool(){this.prototype.default_view=_,this.register_alias(\"save\",()=>new a)}}t.SaveTool=a,a.__name__=\"SaveTool\",a.init_SaveTool()},\n",
" function _(o,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const n=o(285),i=o(287);class s extends n.ActionToolView{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state_changed,()=>this.model.disabled=!this.plot_view.can_undo())}doit(){this.plot_view.undo()}}e.UndoToolView=s,s.__name__=\"UndoToolView\";class _ extends n.ActionTool{constructor(o){super(o),this.tool_name=\"Undo\",this.icon=i.bk_tool_icon_undo}static init_UndoTool(){this.prototype.default_view=s,this.override({disabled:!0}),this.register_alias(\"undo\",()=>new _)}}e.UndoTool=_,_.__name__=\"UndoTool\",_.init_UndoTool()},\n",
" function _(o,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=o(1),n=o(285),s=o(330),_=e.__importStar(o(18)),m=o(287);class l extends n.ActionToolView{doit(){const o=this.plot_view.frame,t=this.model.dimensions,i=\"width\"==t||\"both\"==t,e=\"height\"==t||\"both\"==t,n=s.scale_range(o,this.model.factor,i,e);this.plot_view.push_state(\"zoom_out\",{range:n}),this.plot_view.update_range(n,!1,!0),this.model.document&&this.model.document.interactive_start(this.plot_model)}}i.ZoomInToolView=l,l.__name__=\"ZoomInToolView\";class h extends n.ActionTool{constructor(o){super(o),this.tool_name=\"Zoom In\",this.icon=m.bk_tool_icon_zoom_in}static init_ZoomInTool(){this.prototype.default_view=l,this.define({factor:[_.Percent,.1],dimensions:[_.Dimensions,\"both\"]}),this.register_alias(\"zoom_in\",()=>new h({dimensions:\"both\"})),this.register_alias(\"xzoom_in\",()=>new h({dimensions:\"width\"})),this.register_alias(\"yzoom_in\",()=>new h({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}i.ZoomInTool=h,h.__name__=\"ZoomInTool\",h.init_ZoomInTool()},\n",
" function _(n,t,e){Object.defineProperty(e,\"__esModule\",{value:!0});const o=n(10);function r(n,t,e){const[o,r]=[n.start,n.end],c=null!=e?e:(r+o)/2;return[o-(o-c)*t,r-(r-c)*t]}function c(n,[t,e]){const o={};for(const r in n){const c=n[r],[s,l]=c.r_invert(t,e);o[r]={start:s,end:l}}return o}e.scale_highlow=r,e.get_info=c,e.scale_range=function(n,t,e=!0,s=!0,l){t=o.clamp(t,-.9,.9);const a=e?t:0,[u,i]=r(n.bbox.h_range,a,null!=l?l.x:void 0),_=c(n.xscales,[u,i]),f=s?t:0,[d,b]=r(n.bbox.v_range,f,null!=l?l.y:void 0);return{xrs:_,yrs:c(n.yscales,[d,b]),factor:t}}},\n",
" function _(o,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const e=o(1),s=o(285),n=o(330),_=e.__importStar(o(18)),m=o(287);class l extends s.ActionToolView{doit(){const o=this.plot_view.frame,t=this.model.dimensions,i=\"width\"==t||\"both\"==t,e=\"height\"==t||\"both\"==t,s=n.scale_range(o,-this.model.factor,i,e);this.plot_view.push_state(\"zoom_out\",{range:s}),this.plot_view.update_range(s,!1,!0),this.model.document&&this.model.document.interactive_start(this.plot_model)}}i.ZoomOutToolView=l,l.__name__=\"ZoomOutToolView\";class h extends s.ActionTool{constructor(o){super(o),this.tool_name=\"Zoom Out\",this.icon=m.bk_tool_icon_zoom_out}static init_ZoomOutTool(){this.prototype.default_view=l,this.define({factor:[_.Percent,.1],dimensions:[_.Dimensions,\"both\"]}),this.register_alias(\"zoom_out\",()=>new h({dimensions:\"both\"})),this.register_alias(\"xzoom_out\",()=>new h({dimensions:\"width\"})),this.register_alias(\"yzoom_out\",()=>new h({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}i.ZoomOutTool=h,h.__name__=\"ZoomOutTool\",h.init_ZoomOutTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const o=e(1).__importStar(e(18)),n=e(9),i=e(8),r=e(11),_=e(284);class c extends _.GestureToolView{constructor(){super(...arguments),this._mouse_in_frame=!0}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void r.unreachable():\"replace\"}_move_enter(e){this._mouse_in_frame=!0}_move_exit(e){this._mouse_in_frame=!1}_map_drag(e,t,s){const o=this.plot_view.frame;return o.bbox.contains(e,t)?[o.xscales[s.x_range_name].invert(e),o.yscales[s.y_range_name].invert(t)]:null}_delete_selected(e){const t=e.data_source,s=t.selected.indices;s.sort();for(const e of t.columns()){const o=t.get_array(e);for(let e=0;e<s.length;e++){const t=s[e];o.splice(t-e,1)}}this._emit_cds_changes(t)}_pop_glyphs(e,t){const s=e.columns();if(t&&s.length)for(const o of s){let s=e.get_array(o);const n=s.length-t+1;n<1||(i.isArray(s)||(s=Array.from(s),e.data[o]=s),s.splice(0,n))}}_emit_cds_changes(e,t=!0,s=!0,o=!0){s&&e.selection_manager.clear(),t&&e.change.emit(),o&&(e.data=e.data,e.properties.data.change.emit())}_drag_points(e,t,s=\"both\"){if(null==this._basepoint)return;const[o,n]=this._basepoint;for(const i of t){const t=this._map_drag(o,n,i),r=this._map_drag(e.sx,e.sy,i);if(null==r||null==t)continue;const[_,c]=r,[a,l]=t,[d,u]=[_-a,c-l],m=i.glyph,h=i.data_source,[p,f]=[m.x.field,m.y.field];for(const e of h.selected.indices)!p||\"width\"!=s&&\"both\"!=s||(h.data[p][e]+=d),!f||\"height\"!=s&&\"both\"!=s||(h.data[f][e]+=u);h.change.emit()}this._basepoint=[e.sx,e.sy]}_pad_empty_columns(e,t){for(const s of e.columns())n.includes(t,s)||e.get_array(s).push(this.model.empty_value)}_select_event(e,t,s){const o=this.plot_view.frame,{sx:n,sy:i}=e;if(!o.bbox.contains(n,i))return[];const r={type:\"point\",sx:n,sy:i},_=[];for(const e of s){const s=e.get_selection_manager(),o=e.data_source,n=[this.plot_view.renderer_views.get(e)];s.select(n,r,!0,t)&&_.push(e),o.properties.selected.change.emit()}return _}}s.EditToolView=c,c.__name__=\"EditToolView\";class a extends _.GestureTool{constructor(e){super(e)}static init_EditTool(){this.define({custom_icon:[o.String],custom_tooltip:[o.String],empty_value:[o.Any],renderers:[o.Array,[]]})}get tooltip(){return this.custom_tooltip||this.tool_name}get computed_icon(){return this.custom_icon||this.icon}}s.EditTool=a,a.__name__=\"EditTool\",a.init_EditTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),_=e(68),o=i.__importStar(e(18)),n=e(332),a=e(287);class d extends n.EditToolView{_tap(e){null==this._draw_basepoint&&null==this._basepoint&&this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)if(e.keyCode===_.Keys.Backspace)this._delete_selected(t);else if(e.keyCode==_.Keys.Esc){t.data_source.selection_manager.clear()}}_set_extent([e,t],[s,i],_,o=!1){const n=this.model.renderers[0],a=this.plot_view.frame,d=n.glyph,l=n.data_source,r=a.xscales[n.x_range_name],h=a.yscales[n.y_range_name],[p,u]=r.r_invert(e,t),[c,m]=h.r_invert(s,i),[f,b]=[(p+u)/2,(c+m)/2],[x,y]=[u-p,m-c],[w,g]=[d.x.field,d.y.field],[v,E]=[d.width.field,d.height.field];if(_)this._pop_glyphs(l,this.model.num_objects),w&&l.get_array(w).push(f),g&&l.get_array(g).push(b),v&&l.get_array(v).push(x),E&&l.get_array(E).push(y),this._pad_empty_columns(l,[w,g,v,E]);else{const e=l.data[w].length-1;w&&(l.data[w][e]=f),g&&(l.data[g][e]=b),v&&(l.data[v][e]=x),E&&(l.data[E][e]=y)}this._emit_cds_changes(l,!0,!1,o)}_update_box(e,t=!1,s=!1){if(null==this._draw_basepoint)return;const i=[e.sx,e.sy],_=this.plot_view.frame,o=this.model.dimensions,n=this.model._get_dim_limits(this._draw_basepoint,i,_,o);if(null!=n){const[e,i]=n;this._set_extent(e,i,t,s)}}_doubletap(e){this.model.active&&(null!=this._draw_basepoint?(this._update_box(e,!1,!0),this._draw_basepoint=null):(this._draw_basepoint=[e.sx,e.sy],this._select_event(e,\"append\",this.model.renderers),this._update_box(e,!0,!1)))}_move(e){this._update_box(e,!1,!1)}_pan_start(e){if(e.shiftKey){if(null!=this._draw_basepoint)return;this._draw_basepoint=[e.sx,e.sy],this._update_box(e,!0,!1)}else{if(null!=this._basepoint)return;this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy]}}_pan(e,t=!1,s=!1){if(e.shiftKey){if(null==this._draw_basepoint)return;this._update_box(e,t,s)}else{if(null==this._basepoint)return;this._drag_points(e,this.model.renderers)}}_pan_end(e){if(this._pan(e,!1,!0),e.shiftKey)this._draw_basepoint=null;else{this._basepoint=null;for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0)}}}s.BoxEditToolView=d,d.__name__=\"BoxEditToolView\";class l extends n.EditTool{constructor(e){super(e),this.tool_name=\"Box Edit Tool\",this.icon=a.bk_tool_icon_box_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=1}static init_BoxEditTool(){this.prototype.default_view=d,this.define({dimensions:[o.Dimensions,\"both\"],num_objects:[o.Int,0]})}}s.BoxEditTool=l,l.__name__=\"BoxEditTool\",l.init_BoxEditTool()},\n",
" function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const s=e(1),r=e(68),_=s.__importStar(e(18)),o=e(8),i=e(332),d=e(287);class n extends i.EditToolView{_draw(e,t,a=!1){if(!this.model.active)return;const s=this.model.renderers[0],r=this._map_drag(e.sx,e.sy,s);if(null==r)return;const[_,i]=r,d=s.data_source,n=s.glyph,[l,h]=[n.xs.field,n.ys.field];if(\"new\"==t)this._pop_glyphs(d,this.model.num_objects),l&&d.get_array(l).push([_]),h&&d.get_array(h).push([i]),this._pad_empty_columns(d,[l,h]);else if(\"add\"==t){if(l){const e=d.data[l].length-1;let t=d.get_array(l)[e];o.isArray(t)||(t=Array.from(t),d.data[l][e]=t),t.push(_)}if(h){const e=d.data[h].length-1;let t=d.get_array(h)[e];o.isArray(t)||(t=Array.from(t),d.data[h][e]=t),t.push(i)}}this._emit_cds_changes(d,!0,!0,a)}_pan_start(e){this._draw(e,\"new\")}_pan(e){this._draw(e,\"add\")}_pan_end(e){this._draw(e,\"add\",!0)}_tap(e){this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===r.Keys.Esc?t.data_source.selection_manager.clear():e.keyCode===r.Keys.Backspace&&this._delete_selected(t)}}a.FreehandDrawToolView=n,n.__name__=\"FreehandDrawToolView\";class l extends i.EditTool{constructor(e){super(e),this.tool_name=\"Freehand Draw Tool\",this.icon=d.bk_tool_icon_freehand_draw,this.event_type=[\"pan\",\"tap\"],this.default_order=3}static init_FreehandDrawTool(){this.prototype.default_view=n,this.define({num_objects:[_.Int,0]})}}a.FreehandDrawTool=l,l.__name__=\"FreehandDrawTool\",l.init_FreehandDrawTool()},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(1),i=e(68),a=s.__importStar(e(18)),n=e(332),_=e(287);class r extends n.EditToolView{_tap(e){if(this._select_event(e,this._select_mode(e),this.model.renderers).length||!this.model.add)return;const t=this.model.renderers[0],o=this._map_drag(e.sx,e.sy,t);if(null==o)return;const s=t.glyph,i=t.data_source,[a,n]=[s.x.field,s.y.field],[_,r]=o;this._pop_glyphs(i,this.model.num_objects),a&&i.get_array(a).push(_),n&&i.get_array(n).push(r),this._pad_empty_columns(i,[a,n]),i.change.emit(),i.data=i.data,i.properties.data.change.emit()}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===i.Keys.Backspace?this._delete_selected(t):e.keyCode==i.Keys.Esc&&t.data_source.selection_manager.clear()}_pan_start(e){this.model.drag&&(this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){this.model.drag&&null!=this._basepoint&&this._drag_points(e,this.model.renderers)}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0);this._basepoint=null}}}o.PointDrawToolView=r,r.__name__=\"PointDrawToolView\";class d extends n.EditTool{constructor(e){super(e),this.tool_name=\"Point Draw Tool\",this.icon=_.bk_tool_icon_point_draw,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=2}static init_PointDrawTool(){this.prototype.default_view=r,this.define({add:[a.Boolean,!0],drag:[a.Boolean,!0],num_objects:[a.Int,0]})}}o.PointDrawTool=d,d.__name__=\"PointDrawTool\",d.init_PointDrawTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),r=e(68),a=i.__importStar(e(18)),o=e(8),n=e(337),_=e(287);class d extends n.PolyToolView{constructor(){super(...arguments),this._drawing=!1,this._initialized=!1}_tap(e){this._drawing?this._draw(e,\"add\",!0):this._select_event(e,this._select_mode(e),this.model.renderers)}_draw(e,t,s=!1){const i=this.model.renderers[0],r=this._map_drag(e.sx,e.sy,i);if(this._initialized||this.activate(),null==r)return;const[a,n]=this._snap_to_vertex(e,...r),_=i.data_source,d=i.glyph,[l,h]=[d.xs.field,d.ys.field];if(\"new\"==t)this._pop_glyphs(_,this.model.num_objects),l&&_.get_array(l).push([a,a]),h&&_.get_array(h).push([n,n]),this._pad_empty_columns(_,[l,h]);else if(\"edit\"==t){if(l){const e=_.data[l][_.data[l].length-1];e[e.length-1]=a}if(h){const e=_.data[h][_.data[h].length-1];e[e.length-1]=n}}else if(\"add\"==t){if(l){const e=_.data[l].length-1;let t=_.get_array(l)[e];const s=t[t.length-1];t[t.length-1]=a,o.isArray(t)||(t=Array.from(t),_.data[l][e]=t),t.push(s)}if(h){const e=_.data[h].length-1;let t=_.get_array(h)[e];const s=t[t.length-1];t[t.length-1]=n,o.isArray(t)||(t=Array.from(t),_.data[h][e]=t),t.push(s)}}this._emit_cds_changes(_,!0,!1,s)}_show_vertices(){if(!this.model.active)return;const e=[],t=[];for(let s=0;s<this.model.renderers.length;s++){const i=this.model.renderers[s],r=i.data_source,a=i.glyph,[o,n]=[a.xs.field,a.ys.field];if(o)for(const t of r.get_array(o))Array.prototype.push.apply(e,t);if(n)for(const e of r.get_array(n))Array.prototype.push.apply(t,e);this._drawing&&s==this.model.renderers.length-1&&(e.splice(e.length-1,1),t.splice(t.length-1,1))}this._set_vertices(e,t)}_doubletap(e){this.model.active&&(this._drawing?(this._drawing=!1,this._draw(e,\"edit\",!0)):(this._drawing=!0,this._draw(e,\"new\",!0)))}_move(e){this._drawing&&this._draw(e,\"edit\")}_remove(){const e=this.model.renderers[0],t=e.data_source,s=e.glyph,[i,r]=[s.xs.field,s.ys.field];if(i){const e=t.data[i].length-1,s=t.get_array(i)[e];s.splice(s.length-1,1)}if(r){const e=t.data[r].length-1,s=t.get_array(r)[e];s.splice(s.length-1,1)}this._emit_cds_changes(t)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===r.Keys.Backspace?this._delete_selected(t):e.keyCode==r.Keys.Esc&&(this._drawing&&(this._remove(),this._drawing=!1),t.data_source.selection_manager.clear())}_pan_start(e){this.model.drag&&(this._select_event(e,\"append\",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){if(null==this._basepoint||!this.model.drag)return;const[t,s]=this._basepoint;for(const i of this.model.renderers){const r=this._map_drag(t,s,i),a=this._map_drag(e.sx,e.sy,i);if(null==a||null==r)continue;const o=i.data_source,n=i.glyph,[_,d]=[n.xs.field,n.ys.field];if(!_&&!d)continue;const[l,h]=a,[c,g]=r,[p,f]=[l-c,h-g];for(const e of o.selected.indices){let t,s,i;_&&(s=o.data[_][e]),d?(i=o.data[d][e],t=i.length):t=s.length;for(let e=0;e<t;e++)s&&(s[e]+=p),i&&(i[e]+=f)}o.change.emit()}this._basepoint=[e.sx,e.sy]}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source);this._basepoint=null}}activate(){if(this.model.vertex_renderer&&this.model.active){if(this._show_vertices(),!this._initialized)for(const e of this.model.renderers){const t=e.data_source;t.connect(t.properties.data.change,()=>this._show_vertices())}this._initialized=!0}}deactivate(){this._drawing&&(this._remove(),this._drawing=!1),this.model.vertex_renderer&&this._hide_vertices()}}s.PolyDrawToolView=d,d.__name__=\"PolyDrawToolView\";class l extends n.PolyTool{constructor(e){super(e),this.tool_name=\"Polygon Draw Tool\",this.icon=_.bk_tool_icon_poly_draw,this.event_type=[\"pan\",\"tap\",\"move\"],this.default_order=3}static init_PolyDrawTool(){this.prototype.default_view=d,this.define({drag:[a.Boolean,!0],num_objects:[a.Int,0]})}}s.PolyDrawTool=l,l.__name__=\"PolyDrawTool\",l.init_PolyDrawTool()},\n",
" function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const o=e(1).__importStar(e(18)),i=e(8),s=e(332);class _ extends s.EditToolView{_set_vertices(e,t){const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[s,_]=[r.x.field,r.y.field];s&&(i.isArray(e)?o.data[s]=e:r.x={value:e}),_&&(i.isArray(t)?o.data[_]=t:r.y={value:t}),this._emit_cds_changes(o,!0,!0,!1)}_hide_vertices(){this._set_vertices([],[])}_snap_to_vertex(e,t,r){if(this.model.vertex_renderer){const o=this._select_event(e,\"replace\",[this.model.vertex_renderer]),i=this.model.vertex_renderer.data_source,s=this.model.vertex_renderer.glyph,[_,l]=[s.x.field,s.y.field];if(o.length){const e=i.selected.indices[0];_&&(t=i.data[_][e]),l&&(r=i.data[l][e]),i.selection_manager.clear()}}return[t,r]}}r.PolyToolView=_,_.__name__=\"PolyToolView\";class l extends s.EditTool{constructor(e){super(e)}static init_PolyTool(){this.prototype.default_view=_,this.define({vertex_renderer:[o.Instance]})}}r.PolyTool=l,l.__name__=\"PolyTool\",l.init_PolyTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const r=e(68),i=e(8),_=e(337),d=e(287);class n extends _.PolyToolView{constructor(){super(...arguments),this._drawing=!1}_doubletap(e){if(!this.model.active)return;const t=this._map_drag(e.sx,e.sy,this.model.vertex_renderer);if(null==t)return;const[s,r]=t,i=this._select_event(e,\"replace\",[this.model.vertex_renderer]),_=this.model.vertex_renderer.data_source,d=this.model.vertex_renderer.glyph,[n,l]=[d.x.field,d.y.field];if(i.length&&null!=this._selected_renderer){const e=_.selected.indices[0];this._drawing?(this._drawing=!1,_.selection_manager.clear()):(_.selected.indices=[e+1],n&&_.get_array(n).splice(e+1,0,s),l&&_.get_array(l).splice(e+1,0,r),this._drawing=!0),_.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}else this._show_vertices(e)}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,\"replace\",this.model.renderers);if(!t.length)return this._set_vertices([],[]),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,_=s.data_source,d=_.selected.indices[0],[n,l]=[r.xs.field,r.ys.field];let a,c;n?(a=_.data[n][d],i.isArray(a)||(_.data[n][d]=a=Array.from(a))):a=r.xs.value,l?(c=_.data[l][d],i.isArray(c)||(_.data[l][d]=c=Array.from(c))):c=r.ys.value,this._selected_renderer=s,this._set_vertices(a,c)}_move(e){if(this._drawing&&null!=this._selected_renderer){const t=this.model.vertex_renderer,s=t.data_source,r=t.glyph,i=this._map_drag(e.sx,e.sy,t);if(null==i)return;let[_,d]=i;const n=s.selected.indices;[_,d]=this._snap_to_vertex(e,_,d),s.selected.indices=n;const[l,a]=[r.x.field,r.y.field],c=n[0];l&&(s.data[l][c]=_),a&&(s.data[a][c]=d),s.change.emit(),this._selected_renderer.data_source.change.emit()}}_tap(e){const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null==s)return;if(this._drawing&&this._selected_renderer){let[r,i]=s;const _=t.data_source,d=t.glyph,[n,l]=[d.x.field,d.y.field],a=_.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const c=a[0];if(_.selected.indices=[c+1],n){const e=_.get_array(n),t=e[c];e[c]=r,e.splice(c+1,0,t)}if(l){const e=_.get_array(l),t=e[c];e[c]=i,e.splice(c+1,0,t)}return _.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}const r=this._select_mode(e);this._select_event(e,r,[t]),this._select_event(e,r,this.model.renderers)}_remove_vertex(){if(!this._drawing||!this._selected_renderer)return;const e=this.model.vertex_renderer,t=e.data_source,s=e.glyph,r=t.selected.indices[0],[i,_]=[s.x.field,s.y.field];i&&t.get_array(i).splice(r,1),_&&t.get_array(_).splice(r,1),t.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}_pan_start(e){this._select_event(e,\"append\",[this.model.vertex_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}_keyup(e){if(!this.model.active||!this._mouse_in_frame)return;let t;t=this._selected_renderer?[this.model.vertex_renderer]:this.model.renderers;for(const s of t)e.keyCode===r.Keys.Backspace?(this._delete_selected(s),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source)):e.keyCode==r.Keys.Esc&&(this._drawing?(this._remove_vertex(),this._drawing=!1):this._selected_renderer&&this._hide_vertices(),s.data_source.selection_manager.clear())}deactivate(){this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._hide_vertices())}}s.PolyEditToolView=n,n.__name__=\"PolyEditToolView\";class l extends _.PolyTool{constructor(e){super(e),this.tool_name=\"Poly Edit Tool\",this.icon=d.bk_tool_icon_poly_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=4}static init_PolyEditTool(){t
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(1),i=e(340),l=e(107),_=s.__importStar(e(18)),n=e(287);class c extends i.SelectToolView{_compute_limits(e){const t=this.plot_view.frame,o=this.model.dimensions;let s=this._base_point;if(\"center\"==this.model.origin){const[t,o]=s,[i,l]=e;s=[t-(i-t),o-(l-o)]}return this.model._get_dim_limits(s,e,t,o)}_pan_start(e){const{sx:t,sy:o}=e;this._base_point=[t,o]}_pan(e){const{sx:t,sy:o}=e,s=[t,o],[i,l]=this._compute_limits(s);this.model.overlay.update({left:i[0],right:i[1],top:l[0],bottom:l[1]}),this.model.select_every_mousemove&&this._do_select(i,l,!1,this._select_mode(e))}_pan_end(e){const{sx:t,sy:o}=e,s=[t,o],[i,l]=this._compute_limits(s);this._do_select(i,l,!0,this._select_mode(e)),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null,this.plot_view.push_state(\"box_select\",{selection:this.plot_view.get_selection()})}_do_select([e,t],[o,s],i,l=\"replace\"){const _={type:\"rect\",sx0:e,sx1:t,sy0:o,sy1:s};this._select(_,i,l)}}o.BoxSelectToolView=c,c.__name__=\"BoxSelectToolView\";const r=()=>new l.BoxAnnotation({level:\"overlay\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class h extends i.SelectTool{constructor(e){super(e),this.tool_name=\"Box Select\",this.icon=n.bk_tool_icon_box_select,this.event_type=\"pan\",this.default_order=30}static init_BoxSelectTool(){this.prototype.default_view=c,this.define({dimensions:[_.Dimensions,\"both\"],select_every_mousemove:[_.Boolean,!1],overlay:[_.Instance,r],origin:[_.BoxOrigin,\"corner\"]}),this.register_alias(\"box_select\",()=>new h),this.register_alias(\"xbox_select\",()=>new h({dimensions:\"width\"})),this.register_alias(\"ybox_select\",()=>new h({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}o.BoxSelectTool=h,h.__name__=\"BoxSelectTool\",h.init_BoxSelectTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(1),o=e(284),r=e(81),c=e(100),i=e(341),l=n.__importStar(e(18)),a=e(68),d=e(291),_=e(14),h=e(11);class u extends o.GestureToolView{connect_signals(){super.connect_signals(),this.model.clear.connect(()=>this._clear())}get computed_renderers(){const e=this.model.renderers,t=this.plot_model.renderers,s=this.model.names;return i.compute_renderers(e,t,s)}_computed_renderers_by_data_source(){var e;const t=new Map;for(const s of this.computed_renderers){let n;if(s instanceof r.GlyphRenderer)n=s.data_source;else{if(!(s instanceof c.GraphRenderer))continue;n=s.node_renderer.data_source}const o=null!==(e=t.get(n))&&void 0!==e?e:[];t.set(n,[...o,s])}return t}_select_mode(e){const{shiftKey:t,ctrlKey:s}=e;return t||s?t&&!s?\"append\":!t&&s?\"intersect\":t&&s?\"subtract\":void h.unreachable():this.model.mode}_keyup(e){e.keyCode==a.Keys.Esc&&this._clear()}_clear(){for(const e of this.computed_renderers)e.get_selection_manager().clear();this.plot_view.request_render()}_select(e,t,s){const n=this._computed_renderers_by_data_source();for(const[,o]of n){const n=o[0].get_selection_manager(),r=[];for(const e of o){const t=this.plot_view.renderer_views.get(e);null!=t&&r.push(t)}n.select(r,e,t,s)}null!=this.model.callback&&this._emit_callback(e),this._emit_selection_event(e,t)}_emit_selection_event(e,t=!0){const{frame:s}=this.plot_view,n=s.xscales.default,o=s.yscales.default;let r;switch(e.type){case\"point\":{const{sx:t,sy:s}=e,c=n.invert(t),i=o.invert(s);r=Object.assign(Object.assign({},e),{x:c,y:i});break}case\"span\":{const{sx:t,sy:s}=e,c=n.invert(t),i=o.invert(s);r=Object.assign(Object.assign({},e),{x:c,y:i});break}case\"rect\":{const{sx0:t,sx1:s,sy0:c,sy1:i}=e,[l,a]=n.r_invert(t,s),[d,_]=o.r_invert(c,i);r=Object.assign(Object.assign({},e),{x0:l,y0:d,x1:a,y1:_});break}case\"poly\":{const{sx:t,sy:s}=e,c=n.v_invert(t),i=o.v_invert(s);r=Object.assign(Object.assign({},e),{x:c,y:i});break}}this.plot_model.trigger_event(new d.SelectionGeometry(r,t))}}s.SelectToolView=u,u.__name__=\"SelectToolView\";class p extends o.GestureTool{constructor(e){super(e)}initialize(){super.initialize(),this.clear=new _.Signal0(this,\"clear\")}static init_SelectTool(){this.define({renderers:[l.Any,\"auto\"],names:[l.Array,[]],mode:[l.Any,\"replace\"]})}get menu(){return[{icon:\"bk-tool-icon-replace-mode\",tooltip:\"Replace the current selection\",active:()=>\"replace\"==this.mode,handler:()=>{this.mode=\"replace\",this.active=!0}},{icon:\"bk-tool-icon-append-mode\",tooltip:\"Append to the current selection (Shift)\",active:()=>\"append\"==this.mode,handler:()=>{this.mode=\"append\",this.active=!0}},{icon:\"bk-tool-icon-intersect-mode\",tooltip:\"Intersect with the current selection (Ctrl)\",active:()=>\"intersect\"==this.mode,handler:()=>{this.mode=\"intersect\",this.active=!0}},{icon:\"bk-tool-icon-subtract-mode\",tooltip:\"Subtract from the current selection (Shift+Ctrl)\",active:()=>\"subtract\"==this.mode,handler:()=>{this.mode=\"subtract\",this.active=!0}},null,{icon:\"bk-tool-icon-clear-selection\",tooltip:\"Clear the current selection (Esc)\",handler:()=>{this.clear.emit()}}]}}s.SelectTool=p,p.__name__=\"SelectTool\",p.init_SelectTool()},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const r=e(9);t.compute_renderers=function(e,n,t){if(null==e)return[];let u=\"auto\"==e?n:e;return t.length>0&&(u=u.filter(e=>r.includes(t,e.name))),u}},\n",
" function _(t,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const s=t(1),i=t(284),n=t(107),_=s.__importStar(t(18)),a=t(287);class l extends i.GestureToolView{_match_aspect(t,o,e){const s=e.bbox.aspect,i=e.bbox.h_range.end,n=e.bbox.h_range.start,_=e.bbox.v_range.end,a=e.bbox.v_range.start;let l=Math.abs(t[0]-o[0]),r=Math.abs(t[1]-o[1]);const h=0==r?0:l/r,[c]=h>=s?[1,h/s]:[s/h,1];let m,p,d,b;return t[0]<=o[0]?(m=t[0],p=t[0]+l*c,p>i&&(p=i)):(p=t[0],m=t[0]-l*c,m<n&&(m=n)),l=Math.abs(p-m),t[1]<=o[1]?(b=t[1],d=t[1]+l/s,d>_&&(d=_)):(d=t[1],b=t[1]-l/s,b<a&&(b=a)),r=Math.abs(d-b),t[0]<=o[0]?p=t[0]+s*r:m=t[0]-s*r,[[m,p],[b,d]]}_compute_limits(t){const o=this.plot_view.frame,e=this.model.dimensions;let s,i,n=this._base_point;if(\"center\"==this.model.origin){const[o,e]=n,[s,i]=t;n=[o-(s-o),e-(i-e)]}return this.model.match_aspect&&\"both\"==e?[s,i]=this._match_aspect(n,t,o):[s,i]=this.model._get_dim_limits(n,t,o,e),[s,i]}_pan_start(t){this._base_point=[t.sx,t.sy]}_pan(t){const o=[t.sx,t.sy],[e,s]=this._compute_limits(o);this.model.overlay.update({left:e[0],right:e[1],top:s[0],bottom:s[1]})}_pan_end(t){const o=[t.sx,t.sy],[e,s]=this._compute_limits(o);this._update(e,s),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null}_update([t,o],[e,s]){if(Math.abs(o-t)<=5||Math.abs(s-e)<=5)return;const{xscales:i,yscales:n}=this.plot_view.frame,_={};for(const e in i){const s=i[e],[n,a]=s.r_invert(t,o);_[e]={start:n,end:a}}const a={};for(const t in n){const o=n[t],[i,_]=o.r_invert(e,s);a[t]={start:i,end:_}}const l={xrs:_,yrs:a};this.plot_view.push_state(\"box_zoom\",{range:l}),this.plot_view.update_range(l)}}e.BoxZoomToolView=l,l.__name__=\"BoxZoomToolView\";const r=()=>new n.BoxAnnotation({level:\"overlay\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class h extends i.GestureTool{constructor(t){super(t),this.tool_name=\"Box Zoom\",this.icon=a.bk_tool_icon_box_zoom,this.event_type=\"pan\",this.default_order=20}static init_BoxZoomTool(){this.prototype.default_view=l,this.define({dimensions:[_.Dimensions,\"both\"],overlay:[_.Instance,r],match_aspect:[_.Boolean,!1],origin:[_.BoxOrigin,\"corner\"]}),this.register_alias(\"box_zoom\",()=>new h({dimensions:\"both\"})),this.register_alias(\"xbox_zoom\",()=>new h({dimensions:\"width\"})),this.register_alias(\"ybox_zoom\",()=>new h({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}e.BoxZoomTool=h,h.__name__=\"BoxZoomTool\",h.init_BoxZoomTool()},\n",
" function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(1),l=e(340),i=e(139),a=e(68),_=o.__importStar(e(18)),c=e(287);class n extends l.SelectToolView{initialize(){super.initialize(),this.data=null}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>this._active_change())}_active_change(){this.model.active||this._clear_overlay()}_keyup(e){e.keyCode==a.Keys.Enter&&this._clear_overlay()}_pan_start(e){const{sx:s,sy:t}=e;this.data={sx:[s],sy:[t]}}_pan(e){const{sx:s,sy:t}=e,[o,l]=this.plot_view.frame.bbox.clip(s,t);this.data.sx.push(o),this.data.sy.push(l),this.model.overlay.update({xs:this.data.sx,ys:this.data.sy}),this.model.select_every_mousemove&&this._do_select(this.data.sx,this.data.sy,!1,this._select_mode(e))}_pan_end(e){this._clear_overlay(),this._do_select(this.data.sx,this.data.sy,!0,this._select_mode(e)),this.plot_view.push_state(\"lasso_select\",{selection:this.plot_view.get_selection()})}_clear_overlay(){this.model.overlay.update({xs:[],ys:[]})}_do_select(e,s,t,o){const l={type:\"poly\",sx:e,sy:s};this._select(l,t,o)}}t.LassoSelectToolView=n,n.__name__=\"LassoSelectToolView\";const h=()=>new i.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class r extends l.SelectTool{constructor(e){super(e),this.tool_name=\"Lasso Select\",this.icon=c.bk_tool_icon_lasso_select,this.event_type=\"pan\",this.default_order=12}static init_LassoSelectTool(){this.prototype.default_view=n,this.define({select_every_mousemove:[_.Boolean,!0],overlay:[_.Instance,h]}),this.register_alias(\"lasso_select\",()=>new r)}}t.LassoSelectTool=r,r.__name__=\"LassoSelectTool\",r.init_LassoSelectTool()},\n",
" function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),n=e(345),r=s.__importStar(e(18)),_=e(287);class d extends n.LineToolView{constructor(){super(...arguments),this._drawing=!1}_doubletap(e){if(!this.model.active)return;const t=this.model.renderers;for(const i of t){1==this._select_event(e,\"replace\",[i]).length&&(this._selected_renderer=i)}this._show_intersections(),this._update_line_cds()}_show_intersections(){if(!this.model.active)return;if(null==this._selected_renderer)return;if(!this.model.renderers.length)return this._set_intersection([],[]),this._selected_renderer=null,void(this._drawing=!1);const e=this._selected_renderer.data_source,t=this._selected_renderer.glyph,[i,s]=[t.x.field,t.y.field],n=e.get_array(i),r=e.get_array(s);this._set_intersection(n,r)}_tap(e){const t=this.model.intersection_renderer;if(null==this._map_drag(e.sx,e.sy,t))return;if(this._drawing&&this._selected_renderer){const i=this._select_mode(e);if(0==this._select_event(e,i,[t]).length)return}const i=this._select_mode(e);this._select_event(e,i,[t]),this._select_event(e,i,this.model.renderers)}_update_line_cds(){if(null==this._selected_renderer)return;const e=this.model.intersection_renderer.glyph,t=this.model.intersection_renderer.data_source,[i,s]=[e.x.field,e.y.field];if(i&&s){const e=t.data[i],n=t.data[s];this._selected_renderer.data_source.data[i]=e,this._selected_renderer.data_source.data[s]=n}this._emit_cds_changes(this._selected_renderer.data_source,!0,!0,!1)}_pan_start(e){this._select_event(e,\"append\",[this.model.intersection_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer],this.model.dimensions),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer]),this._emit_cds_changes(this.model.intersection_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}activate(){this._drawing=!0}deactivate(){this._selected_renderer&&(this._drawing&&(this._drawing=!1),this._hide_intersections())}}i.LineEditToolView=d,d.__name__=\"LineEditToolView\";class o extends n.LineTool{constructor(e){super(e),this.tool_name=\"Line Edit Tool\",this.icon=_.bk_tool_icon_line_edit,this.event_type=[\"tap\",\"pan\",\"move\"],this.default_order=4}static init_LineEditTool(){this.prototype.default_view=d,this.define({dimensions:[r.Dimensions,\"both\"]})}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}i.LineEditTool=o,o.__name__=\"LineEditTool\",o.init_LineEditTool()},\n",
" function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1).__importStar(e(18)),o=e(8),s=e(332);class _ extends s.EditToolView{_set_intersection(e,i){const t=this.model.intersection_renderer.glyph,n=this.model.intersection_renderer.data_source,[s,_]=[t.x.field,t.y.field];s&&(o.isArray(e)?n.data[s]=e:t.x={value:e}),_&&(o.isArray(i)?n.data[_]=i:t.y={value:i}),this._emit_cds_changes(n,!0,!0,!1)}_hide_intersections(){this._set_intersection([],[])}}t.LineToolView=_,_.__name__=\"LineToolView\";class r extends s.EditTool{constructor(e){super(e)}static init_LineTool(){this.prototype.default_view=_,this.define({intersection_renderer:[n.Instance]})}}t.LineTool=r,r.__name__=\"LineTool\",r.init_LineTool()},\n",
" function _(t,s,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=t(1),e=t(284),o=i.__importStar(t(18)),a=t(287);class _ extends e.GestureToolView{_pan_start(t){this.last_dx=0,this.last_dy=0;const{sx:s,sy:n}=t,i=this.plot_view.frame.bbox;if(!i.contains(s,n)){const t=i.h_range,e=i.v_range;(s<t.start||s>t.end)&&(this.v_axis_only=!0),(n<e.start||n>e.end)&&(this.h_axis_only=!0)}null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}_pan(t){this._update(t.deltaX,t.deltaY),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}_pan_end(t){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.push_state(\"pan\",{range:this.pan_info})}_update(t,s){const n=this.plot_view.frame,i=t-this.last_dx,e=s-this.last_dy,o=n.bbox.h_range,a=o.start-i,_=o.end-i,h=n.bbox.v_range,l=h.start-e,r=h.end-e,d=this.model.dimensions;let c,p,m,u,x,y;\"width\"!=d&&\"both\"!=d||this.v_axis_only?(c=o.start,p=o.end,m=0):(c=a,p=_,m=-i),\"height\"!=d&&\"both\"!=d||this.h_axis_only?(u=h.start,x=h.end,y=0):(u=l,x=r,y=-e),this.last_dx=t,this.last_dy=s;const{xscales:v,yscales:b}=n,g={};for(const t in v){const s=v[t],[n,i]=s.r_invert(c,p);g[t]={start:n,end:i}}const w={};for(const t in b){const s=b[t],[n,i]=s.r_invert(u,x);w[t]={start:n,end:i}}this.pan_info={xrs:g,yrs:w,sdx:m,sdy:y},this.plot_view.update_range(this.pan_info,!0)}}n.PanToolView=_,_.__name__=\"PanToolView\";class h extends e.GestureTool{constructor(t){super(t),this.tool_name=\"Pan\",this.event_type=\"pan\",this.default_order=10}static init_PanTool(){this.prototype.default_view=_,this.define({dimensions:[o.Dimensions,\"both\"]}),this.register_alias(\"pan\",()=>new h({dimensions:\"both\"})),this.register_alias(\"xpan\",()=>new h({dimensions:\"width\"})),this.register_alias(\"ypan\",()=>new h({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(\"Pan\",this.dimensions)}get icon(){switch(this.dimensions){case\"both\":return a.bk_tool_icon_pan;case\"width\":return a.bk_tool_icon_xpan;case\"height\":return a.bk_tool_icon_ypan}}}n.PanTool=h,h.__name__=\"PanTool\",h.init_PanTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const l=e(1),o=e(340),i=e(139),a=e(68),_=l.__importStar(e(18)),c=e(9),n=e(287);class h extends o.SelectToolView{initialize(){super.initialize(),this.data={sx:[],sy:[]}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>this._active_change())}_active_change(){this.model.active||this._clear_data()}_keyup(e){e.keyCode==a.Keys.Enter&&this._clear_data()}_doubletap(e){this._do_select(this.data.sx,this.data.sy,!0,this._select_mode(e)),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()}_clear_data(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})}_tap(e){const{sx:t,sy:s}=e;this.plot_view.frame.bbox.contains(t,s)&&(this.data.sx.push(t),this.data.sy.push(s),this.model.overlay.update({xs:c.copy(this.data.sx),ys:c.copy(this.data.sy)}))}_do_select(e,t,s,l){const o={type:\"poly\",sx:e,sy:t};this._select(o,s,l)}}s.PolySelectToolView=h,h.__name__=\"PolySelectToolView\";const y=()=>new i.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:2,line_dash:[4,4]});class d extends o.SelectTool{constructor(e){super(e),this.tool_name=\"Poly Select\",this.icon=n.bk_tool_icon_polygon_select,this.event_type=\"tap\",this.default_order=11}static init_PolySelectTool(){this.prototype.default_view=h,this.define({overlay:[_.Instance,y]}),this.register_alias(\"poly_select\",()=>new d)}}s.PolySelectTool=d,d.__name__=\"PolySelectTool\",d.init_PolySelectTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),n=e(107),l=e(72),a=i.__importStar(e(18)),r=e(284),o=e(287);function _(e){switch(e){case 1:return 2;case 2:return 1;case 4:return 5;case 5:return 4;default:return e}}function h(e,t,s,i){if(null==t)return!1;const n=s.compute(t);return Math.abs(e-n)<i}function d(e,t,s,i,n){let l=!0;if(null!=n.left&&null!=n.right){const t=s.invert(e);(t<n.left||t>n.right)&&(l=!1)}if(null!=n.bottom&&null!=n.top){const e=i.invert(t);(e<n.bottom||e>n.top)&&(l=!1)}return l}function u(e,t,s){let i=0;return e>=s.start&&e<=s.end&&(i+=1),t>=s.start&&t<=s.end&&(i+=1),i}function c(e,t,s,i){const n=t.compute(e),l=t.invert(n+s);return l>=i.start&&l<=i.end?l:e}function g(e,t,s){return e>t.start?(t.end=e,s):(t.end=t.start,t.start=e,_(s))}function y(e,t,s){return e<t.end?(t.start=e,s):(t.start=t.end,t.end=e,_(s))}function f(e,t,s,i){const[n,l]=t.r_compute(e.start,e.end),[a,r]=t.r_invert(n+s,l+s),o=u(e.start,e.end,i);u(a,r,i)>=o&&(e.start=a,e.end=r)}s.flip_side=_,s.is_near=h,s.is_inside=d,s.sides_inside=u,s.compute_value=c,s.update_range_end_side=g,s.update_range_start_side=y,s.update_range=f;class p extends r.GestureToolView{initialize(){super.initialize(),this.side=0,this.model.update_overlay_from_ranges()}connect_signals(){super.connect_signals(),null!=this.model.x_range&&this.connect(this.model.x_range.change,()=>this.model.update_overlay_from_ranges()),null!=this.model.y_range&&this.connect(this.model.y_range.change,()=>this.model.update_overlay_from_ranges())}_pan_start(e){this.last_dx=0,this.last_dy=0;const t=this.model.x_range,s=this.model.y_range,i=this.plot_view.frame,l=i.xscales.default,a=i.yscales.default,r=this.model.overlay,{left:o,right:_,top:u,bottom:c}=r,g=this.model.overlay.properties.line_width.value()+n.EDGE_TOLERANCE;null!=t&&this.model.x_interaction&&(h(e.sx,o,l,g)?this.side=1:h(e.sx,_,l,g)?this.side=2:d(e.sx,e.sy,l,a,r)&&(this.side=3)),null!=s&&this.model.y_interaction&&(0==this.side&&h(e.sy,c,a,g)&&(this.side=4),0==this.side&&h(e.sy,u,a,g)?this.side=5:d(e.sx,e.sy,l,a,this.model.overlay)&&(3==this.side?this.side=7:this.side=6))}_pan(e){const t=this.plot_view.frame,s=e.deltaX-this.last_dx,i=e.deltaY-this.last_dy,n=this.model.x_range,l=this.model.y_range,a=t.xscales.default,r=t.yscales.default;if(null!=n)if(3==this.side||7==this.side)f(n,a,s,t.x_range);else if(1==this.side){const e=c(n.start,a,s,t.x_range);this.side=y(e,n,this.side)}else if(2==this.side){const e=c(n.end,a,s,t.x_range);this.side=g(e,n,this.side)}if(null!=l)if(6==this.side||7==this.side)f(l,r,i,t.y_range);else if(4==this.side){const e=c(l.start,r,i,t.y_range);this.side=y(e,l,this.side)}else if(5==this.side){const e=c(l.end,r,i,t.y_range);this.side=g(e,l,this.side)}this.last_dx=e.deltaX,this.last_dy=e.deltaY}_pan_end(e){this.side=0}}s.RangeToolView=p,p.__name__=\"RangeToolView\";const m=()=>new n.BoxAnnotation({level:\"overlay\",fill_color:\"lightgrey\",fill_alpha:.5,line_color:\"black\",line_alpha:1,line_width:.5,line_dash:[2,2]});class v extends r.GestureTool{constructor(e){super(e),this.tool_name=\"Range Tool\",this.icon=o.bk_tool_icon_range,this.event_type=\"pan\",this.default_order=1}static init_RangeTool(){this.prototype.default_view=p,this.define({x_range:[a.Instance,null],x_interaction:[a.Boolean,!0],y_range:[a.Instance,null],y_interaction:[a.Boolean,!0],overlay:[a.Instance,m]})}initialize(){super.initialize(),this.overlay.in_cursor=\"grab\",this.overlay.ew_cursor=null!=this.x_range&&this.x_interaction?\"ew-resize\":null,this.overlay.ns_cursor=null!=this.y_range&&this.y_interaction?\"ns-resize\":null}update_overlay_from_ranges(){null==this.x_range&&null==this.y_range&&(this.overlay.left=null,this.overlay.right=null,this.overlay.bottom=null,this.overlay.top=null,l.logger.warn(\"RangeTool not configured with any Ranges.\")),null==this.x_range?(this.overlay.left=null,this.overlay.right=null):(this.overlay.left=this.x_range.start,this.overlay.right=this.x_range.end),null==this.y_range?(this.overlay.bottom=null,this.overlay.top=null):(this.overlay.bottom=this.y_range.start,t
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),o=e(340),a=i.__importStar(e(18)),n=e(287);class _ extends o.SelectToolView{_tap(e){const{sx:t,sy:s}=e,i={type:\"point\",sx:t,sy:s};this._select(i,!0,this._select_mode(e))}_select(e,t,s){const i=this.model.callback;if(\"select\"==this.model.behavior){const o=this._computed_renderers_by_data_source();for(const[,a]of o){const o=a[0].get_selection_manager(),n=a.map(e=>this.plot_view.renderer_views.get(e));if(o.select(n,e,t,s)&&null!=i){const{frame:t}=this.plot_view,s=t.xscales[a[0].x_range_name],n=t.yscales[a[0].y_range_name],_=s.invert(e.sx),c=n.invert(e.sy),l={geometries:Object.assign(Object.assign({},e),{x:_,y:c}),source:o.source};i.execute(this.model,l)}}this._emit_selection_event(e),this.plot_view.push_state(\"tap\",{selection:this.plot_view.get_selection()})}else for(const t of this.computed_renderers){const s=t.get_selection_manager();if(s.inspect(this.plot_view.renderer_views.get(t),e)&&null!=i){const{frame:o}=this.plot_view,a=o.xscales[t.x_range_name],n=o.yscales[t.y_range_name],_=a.invert(e.sx),c=n.invert(e.sy),l={geometries:Object.assign(Object.assign({},e),{x:_,y:c}),source:s.source};i.execute(this.model,l)}}}}s.TapToolView=_,_.__name__=\"TapToolView\";class c extends o.SelectTool{constructor(e){super(e),this.tool_name=\"Tap\",this.icon=n.bk_tool_icon_tap_select,this.event_type=\"tap\",this.default_order=10}static init_TapTool(){this.prototype.default_view=_,this.define({behavior:[a.TapBehavior,\"select\"],callback:[a.Any]}),this.register_alias(\"click\",()=>new c({behavior:\"inspect\"})),this.register_alias(\"tap\",()=>new c)}}s.TapTool=c,c.__name__=\"TapTool\",c.init_TapTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(1),o=e(284),i=n.__importStar(e(18)),a=e(287);class l extends o.GestureToolView{_scroll(e){let t=this.model.speed*e.delta;t>.9?t=.9:t<-.9&&(t=-.9),this._update_ranges(t)}_update_ranges(e){const{frame:t}=this.plot_view,s=t.bbox.h_range,n=t.bbox.v_range,[o,i]=[s.start,s.end],[a,l]=[n.start,n.end];let r,h,_,d;switch(this.model.dimension){case\"height\":{const t=Math.abs(l-a);r=o,h=i,_=a-t*e,d=l-t*e;break}case\"width\":{const t=Math.abs(i-o);r=o-t*e,h=i-t*e,_=a,d=l;break}default:throw new Error(\"this shouldn't have happened\")}const{xscales:c,yscales:p}=t,m={};for(const e in c){const t=c[e],[s,n]=t.r_invert(r,h);m[e]={start:s,end:n}}const u={};for(const e in p){const t=p[e],[s,n]=t.r_invert(_,d);u[e]={start:s,end:n}}const w={xrs:m,yrs:u,factor:e};this.plot_view.push_state(\"wheel_pan\",{range:w}),this.plot_view.update_range(w,!1,!0),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}}s.WheelPanToolView=l,l.__name__=\"WheelPanToolView\";class r extends o.GestureTool{constructor(e){super(e),this.tool_name=\"Wheel Pan\",this.icon=a.bk_tool_icon_wheel_pan,this.event_type=\"scroll\",this.default_order=12}static init_WheelPanTool(){this.prototype.default_view=l,this.define({dimension:[i.Dimension,\"width\"]}),this.internal({speed:[i.Number,.001]}),this.register_alias(\"xwheel_pan\",()=>new r({dimension:\"width\"})),this.register_alias(\"ywheel_pan\",()=>new r({dimension:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}s.WheelPanTool=r,r.__name__=\"WheelPanTool\",r.init_WheelPanTool()},\n",
" function _(e,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(1),i=e(284),l=e(330),n=s.__importStar(e(18)),_=e(28),h=e(287);class a extends i.GestureToolView{_pinch(e){const{sx:o,sy:t,scale:s,ctrlKey:i,shiftKey:l}=e;let n;n=s>=1?20*(s-1):-20/s,this._scroll({type:\"wheel\",sx:o,sy:t,delta:n,ctrlKey:i,shiftKey:l})}_scroll(e){const{frame:o}=this.plot_view,t=o.bbox.h_range,s=o.bbox.v_range,{sx:i,sy:n}=e,_=this.model.dimensions,h=(\"width\"==_||\"both\"==_)&&t.start<i&&i<t.end,a=(\"height\"==_||\"both\"==_)&&s.start<n&&n<s.end;if(!(h&&a||this.model.zoom_on_axis))return;const m=this.model.speed*e.delta,r=l.scale_range(o,m,h,a,{x:i,y:n});this.plot_view.push_state(\"wheel_zoom\",{range:r}),this.plot_view.update_range(r,!1,!0,this.model.maintain_focus),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}}t.WheelZoomToolView=a,a.__name__=\"WheelZoomToolView\";class m extends i.GestureTool{constructor(e){super(e),this.tool_name=\"Wheel Zoom\",this.icon=h.bk_tool_icon_wheel_zoom,this.event_type=_.is_mobile?\"pinch\":\"scroll\",this.default_order=10}static init_WheelZoomTool(){this.prototype.default_view=a,this.define({dimensions:[n.Dimensions,\"both\"],maintain_focus:[n.Boolean,!0],zoom_on_axis:[n.Boolean,!0],speed:[n.Number,1/600]}),this.register_alias(\"wheel_zoom\",()=>new m({dimensions:\"both\"})),this.register_alias(\"xwheel_zoom\",()=>new m({dimensions:\"width\"})),this.register_alias(\"ywheel_zoom\",()=>new m({dimensions:\"height\"}))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}t.WheelZoomTool=m,m.__name__=\"WheelZoomTool\",m.init_WheelZoomTool()},\n",
" function _(i,s,e){Object.defineProperty(e,\"__esModule\",{value:!0});const t=i(1),o=i(274),n=i(141),l=t.__importStar(i(18)),h=i(17),a=i(287);class r extends o.InspectToolView{_move(i){if(!this.model.active)return;const{sx:s,sy:e}=i;this.plot_view.frame.bbox.contains(s,e)?this._update_spans(s,e):this._update_spans(null,null)}_move_exit(i){this._update_spans(null,null)}_update_spans(i,s){const e=this.model.dimensions;\"width\"!=e&&\"both\"!=e||(this.model.spans.width.location=s),\"height\"!=e&&\"both\"!=e||(this.model.spans.height.location=i)}}e.CrosshairToolView=r,r.__name__=\"CrosshairToolView\";class _ extends o.InspectTool{constructor(i){super(i),this.tool_name=\"Crosshair\",this.icon=a.bk_tool_icon_crosshair}static init_CrosshairTool(){this.prototype.default_view=r,this.define({dimensions:[l.Dimensions,\"both\"],line_color:[l.Color,\"black\"],line_width:[l.Number,1],line_alpha:[l.Number,1]}),this.internal({spans:[l.Any]}),this.register_alias(\"crosshair\",()=>new _)}get tooltip(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)}get synthetic_renderers(){return h.values(this.spans)}initialize(){super.initialize(),this.spans={width:new n.Span({for_hover:!0,dimension:\"width\",location_units:\"screen\",level:\"overlay\",line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new n.Span({for_hover:!0,dimension:\"height\",location_units:\"screen\",level:\"overlay\",line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}}}e.CrosshairTool=_,_.__name__=\"CrosshairTool\",_.init_CrosshairTool()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const r=e(1),o=e(71),i=r.__importStar(e(18)),a=e(17),n=e(24);class u extends o.Model{constructor(e){super(e)}static init_CustomJSHover(){this.define({args:[i.Any,{}],code:[i.String,\"\"]})}get values(){return a.values(this.args)}_make_code(e,t,s,r){return new Function(...a.keys(this.args),e,t,s,n.use_strict(r))}format(e,t,s){return this._make_code(\"value\",\"format\",\"special_vars\",this.code)(...this.values,e,t,s)}}s.CustomJSHover=u,u.__name__=\"CustomJSHover\",u.init_CustomJSHover()},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(1),o=e(274),i=e(144),r=e(81),l=e(100),a=e(341),c=n.__importStar(e(93)),d=e(160),_=e(68),p=n.__importStar(e(18)),h=e(20),m=e(17),u=e(8),y=e(99),x=e(287),f=e(145);function v(e,t,s,n,o,i){const r={x:o[e],y:i[e]},l={x:o[e+1],y:i[e+1]};let a,d;if(\"span\"==t.type)\"h\"==t.direction?(a=Math.abs(r.x-s),d=Math.abs(l.x-s)):(a=Math.abs(r.y-n),d=Math.abs(l.y-n));else{const e={x:s,y:n};a=c.dist_2_pts(r,e),d=c.dist_2_pts(l,e)}return a<d?[[r.x,r.y],e]:[[l.x,l.y],e+1]}function w(e,t,s){return[[e[s],t[s]],s]}s._nearest_line_hit=v,s._line_hit=w;class g extends o.InspectToolView{initialize(){super.initialize(),this._ttmodels=null,this._ttviews=new Map}remove(){y.remove_views(this._ttviews),super.remove()}connect_signals(){super.connect_signals();for(const e of this.computed_renderers)e instanceof r.GlyphRenderer?this.connect(e.data_source.inspect,this._update):e instanceof l.GraphRenderer&&(this.connect(e.node_renderer.data_source.inspect,this._update),this.connect(e.edge_renderer.data_source.inspect,this._update));this.connect(this.model.properties.renderers.change,()=>this._computed_renderers=this._ttmodels=null),this.connect(this.model.properties.names.change,()=>this._computed_renderers=this._ttmodels=null),this.connect(this.model.properties.tooltips.change,()=>this._ttmodels=null)}_compute_ttmodels(){const e=new Map,t=this.model.tooltips;if(null!=t)for(const s of this.computed_renderers){const n=new i.Tooltip({custom:u.isString(t)||u.isFunction(t),attachment:this.model.attachment,show_arrow:this.model.show_arrow});s instanceof r.GlyphRenderer?e.set(s,n):s instanceof l.GraphRenderer&&(e.set(s.node_renderer,n),e.set(s.edge_renderer,n))}return y.build_views(this._ttviews,[...e.values()],{parent:this.plot_view}),e}get computed_renderers(){if(null==this._computed_renderers){const e=this.model.renderers,t=this.plot_model.renderers,s=this.model.names;this._computed_renderers=a.compute_renderers(e,t,s)}return this._computed_renderers}get ttmodels(){return null==this._ttmodels&&(this._ttmodels=this._compute_ttmodels()),this._ttmodels}_clear(){this._inspect(1/0,1/0);for(const[,e]of this.ttmodels)e.clear()}_move(e){if(!this.model.active)return;const{sx:t,sy:s}=e;this.plot_view.frame.bbox.contains(t,s)?this._inspect(t,s):this._clear()}_move_exit(){this._clear()}_inspect(e,t){let s;if(\"mouse\"==this.model.mode)s={type:\"point\",sx:e,sy:t};else{s={type:\"span\",direction:\"vline\"==this.model.mode?\"h\":\"v\",sx:e,sy:t}}for(const e of this.computed_renderers){e.get_selection_manager().inspect(this.plot_view.renderer_views.get(e),s)}null!=this.model.callback&&this._emit_callback(s)}_update([e,{geometry:t}]){if(!this.model.active)return;if(!(e instanceof r.GlyphRendererView))return;const{model:s}=e;if(\"ignore\"==this.model.muted_policy&&s instanceof r.GlyphRenderer&&s.muted)return;const n=this.ttmodels.get(s);if(null==n)return;n.clear();const o=s.get_selection_manager();let i=o.inspectors.get(s);if(s instanceof r.GlyphRenderer&&(i=s.view.convert_selection_to_subset(i)),i.is_empty())return;const l=o.source,{frame:a}=this.plot_view,{sx:c,sy:d}=t,_=a.xscales[s.x_range_name],p=a.yscales[s.y_range_name],h=_.invert(c),u=p.invert(d),y=e.glyph;for(const s of i.line_indices){let o,r,a=y._x[s+1],m=y._y[s+1],x=s;switch(this.model.line_policy){case\"interp\":[a,m]=y.get_interpolation_hit(s,t),o=_.compute(a),r=p.compute(m);break;case\"prev\":[[o,r],x]=w(y.sx,y.sy,s);break;case\"next\":[[o,r],x]=w(y.sx,y.sy,s+1);break;case\"nearest\":[[o,r],x]=v(s,t,c,d,y.sx,y.sy),a=y._x[x],m=y._y[x];break;default:[o,r]=[c,d]}const f={index:x,x:h,y:u,sx:c,sy:d,data_x:a,data_y:m,rx:o,ry:r,indices:i.line_indices,name:e.model.name};n.add(o,r,this._render_tooltips(l,x,f))}for(const e of i.image_indices){const t={index:e.index,x:h,y:u,sx:c,sy:d},s=this._render_tooltips(l,e,t);n.add(c,d,s)}for(const o of i.indices)if(m.isEmpty(i.multiline_indices)){const t=null!=y._x?y._x[o]:void 0,a=null!=y._y?y._y[o]:void 0;let _,p,m;if(\"snap_to_data\"==this.model.point_policy){let e=y.get_anchor_point(th
" function _(t,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1).__importStar(t(18)),n=t(14),s=t(71),l=t(274),c=t(356);class r extends s.Model{constructor(t){super(t)}static init_ToolProxy(){this.define({tools:[i.Array,[]],active:[i.Boolean,!1],disabled:[i.Boolean,!1]})}get button_view(){return this.tools[0].button_view}get event_type(){return this.tools[0].event_type}get tooltip(){return this.tools[0].tooltip}get tool_name(){return this.tools[0].tool_name}get icon(){return this.tools[0].computed_icon}get computed_icon(){return this.icon}get toggleable(){const t=this.tools[0];return t instanceof l.InspectTool&&t.toggleable}initialize(){super.initialize(),this.do=new n.Signal0(this,\"do\")}connect_signals(){super.connect_signals(),this.connect(this.do,()=>this.doit()),this.connect(this.properties.active.change,()=>this.set_active());for(const t of this.tools)this.connect(t.properties.active.change,()=>{this.active=t.active})}doit(){for(const t of this.tools)t.do.emit()}set_active(){for(const t of this.tools)t.active=this.active}get menu(){const{menu:t}=this.tools[0];if(null==t)return null;const o=[];for(const[e,i]of c.enumerate(t))if(null==e)o.push(null);else{const t=()=>{var t,o;for(const e of this.tools)null===(o=null===(t=e.menu)||void 0===t?void 0:t[i])||void 0===o||o.handler()};o.push(Object.assign(Object.assign({},e),{handler:t}))}return o}}e.ToolProxy=r,r.__name__=\"ToolProxy\",r.init_ToolProxy()},\n",
" function _(e,n,o){Object.defineProperty(o,\"__esModule\",{value:!0});const t=e(9);function*r(e,n){const o=e.length;if(n>o)return;const r=t.range(n);for(yield r.map(n=>e[n]);;){let f;for(const e of t.reversed(t.range(n)))if(r[e]!=e+o-n){f=e;break}if(null==f)return;r[f]+=1;for(const e of t.range(f+1,n))r[e]=r[e-1]+1;yield r.map(n=>e[n])}}o.enumerate=function*(e){let n=0;for(const o of e)yield[o,n++]},o.combinations=r,o.subsets=function*(e){for(const n of t.range(e.length+1))yield*r(e,n)}},\n",
" function _(t,o,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=t(1).__importStar(t(18)),e=t(9),n=t(283),r=t(355),l=t(245),c=t(188);class h extends n.ToolbarBase{constructor(t){super(t)}static init_ProxyToolbar(){this.define({toolbars:[i.Array,[]]})}initialize(){super.initialize(),this._merge_tools()}_merge_tools(){this._proxied_tools=[];const t={},o={},s={},i=[],n=[];for(const t of this.help)e.includes(n,t.redirect)||(i.push(t),n.push(t.redirect));this._proxied_tools.push(...i),this.help=i;for(const t in this.gestures){const o=this.gestures[t];t in s||(s[t]={});for(const i of o.tools)i.type in s[t]||(s[t][i.type]=[]),s[t][i.type].push(i)}for(const o of this.inspectors)o.type in t||(t[o.type]=[]),t[o.type].push(o);for(const t of this.actions)t.type in o||(o[t.type]=[]),o[t.type].push(t);const l=(t,o=!1)=>{const s=new r.ToolProxy({tools:t,active:o});return this._proxied_tools.push(s),s};for(const t in s){const o=this.gestures[t];o.tools=[];for(const i in s[t]){const e=s[t][i];if(e.length>0)if(\"multi\"==t)for(const t of e){const s=l([t]);o.tools.push(s),this.connect(s.properties.active.change,()=>this._active_change(s))}else{const t=l(e);o.tools.push(t),this.connect(t.properties.active.change,()=>this._active_change(t))}}}this.actions=[];for(const t in o){const s=o[t];if(\"CustomAction\"==t)for(const t of s)this.actions.push(l([t]));else s.length>0&&this.actions.push(l(s))}this.inspectors=[];for(const o in t){const s=t[o];s.length>0&&this.inspectors.push(l(s,!0))}for(const t in this.gestures){const o=this.gestures[t];0!=o.tools.length&&(o.tools=e.sort_by(o.tools,t=>t.default_order),\"pinch\"!=t&&\"scroll\"!=t&&\"multi\"!=t&&(o.tools[0].active=!0))}}}s.ProxyToolbar=h,h.__name__=\"ProxyToolbar\",h.init_ProxyToolbar();class a extends l.LayoutDOMView{initialize(){this.model.toolbar.toolbar_location=this.model.toolbar_location,super.initialize()}get child_models(){return[this.model.toolbar]}_update_layout(){this.layout=new c.ContentBox(this.child_views[0].el);const{toolbar:t}=this.model;t.horizontal?this.layout.set_sizing({width_policy:\"fit\",min_width:100,height_policy:\"fixed\"}):this.layout.set_sizing({width_policy:\"fixed\",height_policy:\"fit\",min_height:100})}}s.ToolbarBoxView=a,a.__name__=\"ToolbarBoxView\";class _ extends l.LayoutDOM{constructor(t){super(t)}static init_ToolbarBox(){this.prototype.default_view=a,this.define({toolbar:[i.Instance],toolbar_location:[i.Location,\"right\"]})}}s.ToolbarBox=_,_.__name__=\"ToolbarBox\",_.init_ToolbarBox()},\n",
" function _(e,n,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(5),i=e(66),d=e(99),c=e(68),l=e(359);t.index={},t.add_document_standalone=async function(e,n,s=[],a=!1){const u=new Map;async function r(o){let a;const r=e.roots().indexOf(o),f=s[r];null!=f?a=f:n.classList.contains(l.BOKEH_ROOT)?a=n:(a=c.div({class:l.BOKEH_ROOT}),n.appendChild(a));const v=await d.build_view(o,{parent:null});return v instanceof i.DOMView&&v.renderTo(a),u.set(o,v),t.index[o.id]=v,v}for(const n of e.roots())await r(n);return a&&(window.document.title=e.title()),e.on_change(e=>{e instanceof o.RootAddedEvent?r(e.model):e instanceof o.RootRemovedEvent?function(e){const n=u.get(e);null!=n&&(n.remove(),u.delete(e),delete t.index[e.id])}(e.model):a&&e instanceof o.TitleChangedEvent&&(window.document.title=e.title)}),[...u.values()]}},\n",
" function _(e,o,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(68),r=e(246);function l(e){let o=document.getElementById(e);if(null==o)throw new Error(`Error rendering Bokeh model: could not find #${e} HTML tag`);if(!document.body.contains(o))throw new Error(`Error rendering Bokeh model: element #${e} must be under <body>`);if(\"SCRIPT\"==o.tagName){const e=t.div({class:n.BOKEH_ROOT});t.replaceWith(o,e),o=e}return o}n.BOKEH_ROOT=r.bk_root,n._resolve_element=function(e){const{elementid:o}=e;return null!=o?l(o):document.body},n._resolve_root_elements=function(e){const o=[];if(null!=e.root_ids&&null!=e.roots)for(const n of e.root_ids)o.push(l(e.roots[n]));return o}},\n",
" function _(n,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});const e=n(361),s=n(72),c=n(358);t._get_ws_url=function(n,o){let t,e=\"ws:\";return\"https:\"==window.location.protocol&&(e=\"wss:\"),null!=o?(t=document.createElement(\"a\"),t.href=o):t=window.location,null!=n?\"/\"==n&&(n=\"\"):n=t.pathname.replace(/\\/+$/,\"\"),e+\"//\"+t.host+n+\"/ws\"};const r={};t.add_document_from_session=async function(n,o,t,a=[],i=!1){const l=window.location.search.substr(1);let d;try{d=await function(n,o,t){const s=e.parse_token(o).session_id;n in r||(r[n]={});const c=r[n];return s in c||(c[s]=e.pull_session(n,o,t)),c[s]}(n,o,l)}catch(n){const t=e.parse_token(o).session_id;throw s.logger.error(`Failed to load Bokeh session ${t}: ${n}`),n}return c.add_document_standalone(d.document,t,a,i)}},\n",
" function _(e,s,n){Object.defineProperty(n,\"__esModule\",{value:!0});const t=e(72),o=e(5),r=e(362),i=e(363),c=e(364);n.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",n.DEFAULT_TOKEN=\"eyJzZXNzaW9uX2lkIjogImRlZmF1bHQifQ\";let l=0;function _(e){let s=e.split(\".\")[0];const n=s.length%4;return 0!=n&&(s+=\"=\".repeat(4-n)),JSON.parse(atob(s.replace(/_/g,\"/\").replace(/-/g,\"+\")))}n.parse_token=_;class h{constructor(e=n.DEFAULT_SERVER_WEBSOCKET_URL,s=n.DEFAULT_TOKEN,o=null){this.url=e,this.token=s,this.args_string=o,this._number=l++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_replies=new Map,this._pending_messages=[],this._receiver=new i.Receiver,this.id=_(s).session_id.split(\".\")[0],t.logger.debug(`Creating websocket ${this._number} to '${this.url}' session '${this.id}'`)}async connect(){if(this.closed_permanently)throw new Error(\"Cannot connect() a closed ClientConnection\");if(null!=this.socket)throw new Error(\"Already connected\");this._current_handler=null,this._pending_replies.clear(),this._pending_messages=[];try{let e=\"\"+this.url;return null!=this.args_string&&this.args_string.length>0&&(e+=\"?\"+this.args_string),this.socket=new WebSocket(e,[\"bokeh\",this.token]),new Promise((e,s)=>{this.socket.binaryType=\"arraybuffer\",this.socket.onopen=()=>this._on_open(e,s),this.socket.onmessage=e=>this._on_message(e),this.socket.onclose=e=>this._on_close(e,s),this.socket.onerror=()=>this._on_error(s)})}catch(e){throw t.logger.error(\"websocket creation failed to url: \"+this.url),t.logger.error(\" - \"+e),e}}close(){this.closed_permanently||(t.logger.debug(\"Permanently closing websocket connection \"+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,\"close method called on ClientConnection \"+this._number),this.session._connection_closed())}_schedule_reconnect(e){setTimeout(()=>{this.closed_permanently||t.logger.info(`Websocket connection ${this._number} disconnected, will not attempt to reconnect`)},e)}send(e){if(null==this.socket)throw new Error(\"not connected so cannot send \"+e);e.send(this.socket)}async send_with_reply(e){const s=await new Promise((s,n)=>{this._pending_replies.set(e.msgid(),{resolve:s,reject:n}),this.send(e)});if(\"ERROR\"===s.msgtype())throw new Error(\"Error reply \"+s.content.text);return s}async _pull_doc_json(){const e=r.Message.create(\"PULL-DOC-REQ\",{}),s=await this.send_with_reply(e);if(!(\"doc\"in s.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return s.content.doc}async _repull_session_doc(e,s){var n;t.logger.debug(this.session?\"Repulling session\":\"Pulling session for first time\");try{const n=await this._pull_doc_json();if(null==this.session)if(this.closed_permanently)t.logger.debug(\"Got new document after connection was already closed\"),s(new Error(\"The connection has been closed\"));else{const s=o.Document.from_json(n),i=o.Document._compute_patch_since_json(n,s);if(i.events.length>0){t.logger.debug(`Sending ${i.events.length} changes from model construction back to server`);const e=r.Message.create(\"PATCH-DOC\",{},i);this.send(e)}this.session=new c.ClientSession(this,s,this.id);for(const e of this._pending_messages)this.session.handle(e);this._pending_messages=[],t.logger.debug(\"Created a new session from new pulled doc\"),e(this.session)}else this.session.document.replace_with_json(n),t.logger.debug(\"Updated existing session with new pulled doc\")}catch(e){null===(n=console.trace)||void 0===n||n.call(console,e),t.logger.error(\"Failed to repull session \"+e),s(e)}}_on_open(e,s){t.logger.info(`Websocket connection ${this._number} is now open`),this._current_handler=n=>{this._awaiting_ack_handler(n,e,s)}}_on_message(e){null==this._current_handler&&t.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(e.data)}catch(e){this._close_bad_protocol(e.toString())}const s=this._receiver.message;if(null!=s){const e=s.problem();null!=e&&this._close_bad_protocol(e),this._current_handler(s)}}_on_close(e,s){t.logger.info(
" function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const r=e(24);class n{constructor(e,s,t){this.header=e,this.metadata=s,this.content=t,this.buffers=new Map}static assemble(e,s,t){const r=JSON.parse(e),i=JSON.parse(s),a=JSON.parse(t);return new n(r,i,a)}assemble_buffer(e,s){const t=null!=this.header.num_buffers?this.header.num_buffers:0;if(t<=this.buffers.size)throw new Error(\"too many buffers received, expecting \"+t);const{id:r}=JSON.parse(e);this.buffers.set(r,s)}static create(e,s,t={}){const r=n.create_header(e);return new n(r,s,t)}static create_header(e){return{msgid:r.uniqueId(),msgtype:e}}complete(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(null==this.header.num_buffers||this.buffers.size==this.header.num_buffers)}send(e){if((null!=this.header.num_buffers?this.header.num_buffers:0)>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");const s=JSON.stringify(this.header),t=JSON.stringify(this.metadata),r=JSON.stringify(this.content);e.send(s),e.send(t),e.send(r)}msgid(){return this.header.msgid}msgtype(){return this.header.msgtype}reqid(){return this.header.reqid}problem(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"}}t.Message=n,n.__name__=\"Message\"},\n",
" function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const _=e(362),r=e(8);class i{constructor(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}consume(e){this._current_consumer(e)}_HEADER(e){this._assume_text(e),this.message=null,this._partial=null,this._fragments=[e],this._buf_header=null,this._current_consumer=this._METADATA}_METADATA(e){this._assume_text(e),this._fragments.push(e),this._current_consumer=this._CONTENT}_CONTENT(e){this._assume_text(e),this._fragments.push(e);const[t,s,r]=this._fragments.slice(0,3);this._partial=_.Message.assemble(t,s,r),this._check_complete()}_BUFFER_HEADER(e){this._assume_text(e),this._buf_header=e,this._current_consumer=this._BUFFER_PAYLOAD}_BUFFER_PAYLOAD(e){this._assume_binary(e),this._partial.assemble_buffer(this._buf_header,e),this._check_complete()}_assume_text(e){if(!r.isString(e))throw new Error(\"Expected text fragment but received binary fragment\")}_assume_binary(e){if(!(e instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")}_check_complete(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER}}s.Receiver=i,i.__name__=\"Receiver\"},\n",
" function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(5),s=e(362),c=e(72);class i{constructor(e,t,n){this._connection=e,this.document=t,this.id=n,this._document_listener=e=>{this._document_changed(e)},this.document.on_change(this._document_listener,!0)}handle(e){const t=e.msgtype();\"PATCH-DOC\"===t?this._handle_patch(e):\"OK\"===t?this._handle_ok(e):\"ERROR\"===t?this._handle_error(e):c.logger.debug(\"Doing nothing with message \"+e.msgtype())}close(){this._connection.close()}_connection_closed(){this.document.remove_on_change(this._document_listener)}async request_server_info(){const e=s.Message.create(\"SERVER-INFO-REQ\",{});return(await this._connection.send_with_reply(e)).content}async force_roundtrip(){await this.request_server_info()}_document_changed(e){if(e.setter_id===this.id)return;const t=e instanceof o.DocumentEventBatch?e.events:[e],n=this.document.create_json_patch(t),c=s.Message.create(\"PATCH-DOC\",{},n);this._connection.send(c)}_handle_patch(e){this.document.apply_json_patch(e.content,e.buffers,this.id)}_handle_ok(e){c.logger.trace(\"Unhandled OK reply to \"+e.reqid())}_handle_error(e){c.logger.error(`Unhandled ERROR reply to ${e.reqid()}: ${e.content.text}`)}}n.ClientSession=i,i.__name__=\"ClientSession\"},\n",
" function _(e,o,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1);var r=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var o,t=e[Symbol.asyncIterator];return t?t.call(e):(e=\"function\"==typeof __values?__values(e):e[Symbol.iterator](),o={},n(\"next\"),n(\"throw\"),n(\"return\"),o[Symbol.asyncIterator]=function(){return this},o);function n(t){o[t]=e[t]&&function(o){return new Promise((function(n,r){(function(e,o,t,n){Promise.resolve(n).then((function(o){e({value:o,done:t})}),o)})(n,r,(o=e[t](o)).done,o.value)}))}}};const s=e(5),i=e(363),l=e(72),a=e(68),c=e(17),u=e(358),f=e(359),g=n.__importDefault(e(69)),m=n.__importDefault(e(289)),d=n.__importDefault(e(366));function p(e,o){o.buffers.length>0?e.consume(o.buffers[0].buffer):e.consume(o.content.data);const t=e.message;null!=t&&this.apply_json_patch(t.content,t.buffers)}function _(e,o){if(\"undefined\"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){l.logger.info(\"Registering Jupyter comms for target \"+e);const t=Jupyter.notebook.kernel.comm_manager;try{t.register_target(e,t=>{l.logger.info(\"Registering Jupyter comms for target \"+e);const n=new i.Receiver;t.on_msg(p.bind(o,n))})}catch(e){l.logger.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if(o.roots()[0].id in t.kernels){l.logger.info(\"Registering JupyterLab comms for target \"+e);const n=t.kernels[o.roots()[0].id];try{n.registerCommTarget(e,t=>{l.logger.info(\"Registering JupyterLab comms for target \"+e);const n=new i.Receiver;t.onMsg=p.bind(o,n)})}catch(e){l.logger.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if(\"undefined\"!=typeof google&&null!=google.colab.kernel){l.logger.info(\"Registering Google Colab comms for target \"+e);const t=google.colab.kernel.comms;try{t.registerTarget(e,async t=>{var n,s,a;l.logger.info(\"Registering Google Colab comms for target \"+e);const c=new i.Receiver;try{for(var u,f=r(t.messages);!(u=await f.next()).done;){const e=u.value,t={data:e.data},n=[];for(const o of null!==(a=e.buffers)&&void 0!==a?a:[])n.push(new DataView(o));const r={content:t,buffers:n};p.bind(o)(c,r)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(s=f.return)&&await s.call(f)}finally{if(n)throw n.error}}})}catch(e){l.logger.warn(`Google Colab comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest @bokeh/jupyter_bokeh extension is installed. In an exported notebook this warning is expected.\")}a.stylesheet.append(g.default),a.stylesheet.append(m.default),a.stylesheet.append(d.default),t.kernels={},t.embed_items_notebook=function(e,o){if(1!=c.size(e))throw new Error(\"embed_items_notebook expects exactly one document in docs_json\");const t=s.Document.from_json(c.values(e)[0]);for(const e of o){null!=e.notebook_comms_target&&_(e.notebook_comms_target,t);const o=f._resolve_element(e),n=f._resolve_root_elements(e);u.add_document_standalone(t,o,n)}}},\n",
" function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});o.default=\"\\n/* notebook specific tweaks so no black outline and matching padding\\n/* can't be wrapped inside bk-root. here are the offending jupyter lines:\\n/* https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/less/renderedhtml.less#L59-L76 */\\n.rendered_html .bk-root .bk-tooltip table,\\n.rendered_html .bk-root .bk-tooltip tr,\\n.rendered_html .bk-root .bk-tooltip th,\\n.rendered_html .bk-root .bk-tooltip td {\\n border: none;\\n padding: 1px;\\n}\\n\"},\n",
" function _(e,t,_){Object.defineProperty(_,\"__esModule\",{value:!0});const o=e(1);o.__exportStar(e(362),_),o.__exportStar(e(363),_)},\n",
" function _(e,t,n){function s(){const e=document.getElementsByTagName(\"body\")[0],t=document.getElementsByClassName(\"bokeh-test-div\");1==t.length&&(e.removeChild(t[0]),delete t[0]);const n=document.createElement(\"div\");n.classList.add(\"bokeh-test-div\"),n.style.display=\"none\",e.insertBefore(n,e.firstChild)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.results={},n.init=function(){s()},n.record0=function(e,t){n.results[e]=t},n.record=function(e,t){n.results[e]=t,s()},n.count=function(e){null==n.results[e]&&(n.results[e]=0),n.results[e]+=1,s()}},\n",
" throw new Error(\"Cannot find Bokeh \" + version + \". You have to load it prior to loading plugins.\");\n",
" }\n",
" })\n",
" ({\n",
" 390: function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const r=e(1).__importStar(e(391));o.Widgets=r,e(7).register_models(r)},\n",
" 392: function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=t(1),s=i.__importStar(t(18)),o=t(68),l=t(99),r=t(393),_=t(254),c=i.__importDefault(t(256));class u extends r.ControlView{*controls(){yield this.button_el}async lazy_initialize(){await super.lazy_initialize();const{icon:t}=this.model;null!=t&&(this.icon_view=await l.build_view(t,{parent:this}))}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.render())}remove(){null!=this.icon_view&&this.icon_view.remove(),super.remove()}styles(){return[...super.styles(),c.default]}_render_button(...t){return o.button({type:\"button\",disabled:this.model.disabled,class:[_.bk_btn,_.bk_btn_type(this.model.button_type)]},...t)}render(){super.render(),this.button_el=this._render_button(this.model.label),this.button_el.addEventListener(\"click\",()=>this.click()),null!=this.icon_view&&(o.prepend(this.button_el,this.icon_view.el,o.nbsp()),this.icon_view.render()),this.group_el=o.div({class:_.bk_btn_group},this.button_el),this.el.appendChild(this.group_el)}click(){}}n.AbstractButtonView=u,u.__name__=\"AbstractButtonView\";class a extends r.Control{constructor(t){super(t)}static init_AbstractButton(){this.define({label:[s.String,\"Button\"],icon:[s.Instance],button_type:[s.ButtonType,\"default\"]})}}n.AbstractButton=a,a.__name__=\"AbstractButton\",a.init_AbstractButton()},\n",
" 393: function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(458),n=e(68);class i extends s.WidgetView{connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.disabled,()=>{for(const e of this.controls())n.toggle_attribute(e,\"disabled\",this.model.disabled)})}}o.ControlView=i,i.__name__=\"ControlView\";class l extends s.Widget{constructor(e){super(e)}}o.Control=l,l.__name__=\"Control\"},\n",
" 458: function _(i,e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=i(1),n=i(249),r=o.__importStar(i(18));class _ extends n.HTMLBoxView{_width_policy(){return\"horizontal\"==this.model.orientation?super._width_policy():\"fixed\"}_height_policy(){return\"horizontal\"==this.model.orientation?\"fixed\":super._height_policy()}box_sizing(){const i=super.box_sizing();return\"horizontal\"==this.model.orientation?null==i.width&&(i.width=this.model.default_size):null==i.height&&(i.height=this.model.default_size),i}}t.WidgetView=_,_.__name__=\"WidgetView\";class s extends n.HTMLBox{constructor(i){super(i)}static init_Widget(){this.define({orientation:[r.Orientation,\"horizontal\"],default_size:[r.Number,300]}),this.override({margin:[5,5,5,5]})}}t.Widget=s,s.__name__=\"Widget\",s.init_Widget()},\n",
" 395: function _(e,t,c){Object.defineProperty(c,\"__esModule\",{value:!0});const s=e(71),n=e(66);class o extends n.DOMView{}c.AbstractIconView=o,o.__name__=\"AbstractIconView\";class _ extends s.Model{constructor(e){super(e)}}c.AbstractIcon=_,_.__name__=\"AbstractIcon\"},\n",
" 396: function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const i=e(1),s=e(397),h=e(68),_=i.__importStar(e(18)),o=e(10),u=e(146),r=e(255),c=i.__importDefault(e(257));class l extends s.TextInputView{constructor(){super(...arguments),this._open=!1,this._last_value=\"\",this._hover_index=0}styles(){return[...super.styles(),c.default]}render(){super.render(),this.input_el.addEventListener(\"keydown\",e=>this._keydown(e)),this.input_el.addEventListener(\"keyup\",e=>this._keyup(e)),this.menu=h.div({class:[r.bk_menu,u.bk_below]}),this.menu.addEventListener(\"click\",e=>this._menu_click(e)),this.menu.addEventListener(\"mouseover\",e=>this._menu_hover(e)),this.el.appendChild(this.menu),h.undisplay(this.menu)}change_input(){this._open&&this.menu.children.length>0&&(this.model.value=this.menu.children[this._hover_index].textContent,this.input_el.focus(),this._hide_menu())}_update_completions(e){h.empty(this.menu);for(const t of e){const e=h.div({},t);this.menu.appendChild(e)}e.length>0&&this.menu.children[0].classList.add(u.bk_active)}_show_menu(){if(!this._open){this._open=!0,this._hover_index=0,this._last_value=this.model.value,h.display(this.menu);const e=t=>{const{target:n}=t;n instanceof HTMLElement&&!this.el.contains(n)&&(document.removeEventListener(\"click\",e),this._hide_menu())};document.addEventListener(\"click\",e)}}_hide_menu(){this._open&&(this._open=!1,h.undisplay(this.menu))}_menu_click(e){e.target!=e.currentTarget&&e.target instanceof Element&&(this.model.value=e.target.textContent,this.input_el.focus(),this._hide_menu())}_menu_hover(e){if(e.target!=e.currentTarget&&e.target instanceof Element){let t=0;for(t=0;t<this.menu.children.length&&this.menu.children[t].textContent!=e.target.textContent;t++);this._bump_hover(t)}}_bump_hover(e){const t=this.menu.children.length;this._open&&t>0&&(this.menu.children[this._hover_index].classList.remove(u.bk_active),this._hover_index=o.clamp(e,0,t-1),this.menu.children[this._hover_index].classList.add(u.bk_active))}_keydown(e){}_keyup(e){switch(e.keyCode){case h.Keys.Enter:this.change_input();break;case h.Keys.Esc:this._hide_menu();break;case h.Keys.Up:this._bump_hover(this._hover_index-1);break;case h.Keys.Down:this._bump_hover(this._hover_index+1);break;default:{const e=this.input_el.value;if(e.length<this.model.min_characters)return void this._hide_menu();const t=[],{case_sensitive:n}=this.model;let i;i=n?e=>e:e=>e.toLowerCase();for(const n of this.model.completions)i(n).startsWith(i(e))&&t.push(n);this._update_completions(t),0==t.length?this._hide_menu():this._show_menu()}}}}n.AutocompleteInputView=l,l.__name__=\"AutocompleteInputView\";class a extends s.TextInput{constructor(e){super(e)}static init_AutocompleteInput(){this.prototype.default_view=l,this.define({completions:[_.Array,[]],min_characters:[_.Int,2],case_sensitive:[_.Boolean,!0]})}}n.AutocompleteInput=a,a.__name__=\"AutocompleteInput\",a.init_AutocompleteInput()},\n",
" 397: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(398),l=e(68),p=n.__importStar(e(18)),u=e(400);class a extends s.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,()=>this.input_el.name=this.model.name||\"\"),this.connect(this.model.properties.value.change,()=>this.input_el.value=this.model.value),this.connect(this.model.properties.value_input.change,()=>this.input_el.value=this.model.value_input),this.connect(this.model.properties.disabled.change,()=>this.input_el.disabled=this.model.disabled),this.connect(this.model.properties.placeholder.change,()=>this.input_el.placeholder=this.model.placeholder)}render(){super.render(),this.input_el=l.input({type:\"text\",class:u.bk_input,name:this.model.name,value:this.model.value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.input_el.addEventListener(\"change\",()=>this.change_input()),this.input_el.addEventListener(\"input\",()=>this.change_input_oninput()),this.group_el.appendChild(this.input_el)}change_input(){this.model.value=this.input_el.value,super.change_input()}change_input_oninput(){this.model.value_input=this.input_el.value,super.change_input()}}i.TextInputView=a,a.__name__=\"TextInputView\";class h extends s.InputWidget{constructor(e){super(e)}static init_TextInput(){this.prototype.default_view=a,this.define({value:[p.String,\"\"],value_input:[p.String,\"\"],placeholder:[p.String,\"\"]})}}i.TextInput=h,h.__name__=\"TextInput\",h.init_TextInput()},\n",
" 398: function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=t(1),l=t(393),s=t(68),_=n.__importStar(t(18)),o=n.__importDefault(t(399)),r=t(400);class p extends l.ControlView{*controls(){yield this.input_el}connect_signals(){super.connect_signals(),this.connect(this.model.properties.title.change,()=>{this.label_el.textContent=this.model.title})}styles(){return[...super.styles(),o.default]}render(){super.render();const{title:t}=this.model;this.label_el=s.label({style:{display:0==t.length?\"none\":\"\"}},t),this.group_el=s.div({class:r.bk_input_group},this.label_el),this.el.appendChild(this.group_el)}change_input(){}}i.InputWidgetView=p,p.__name__=\"InputWidgetView\";class u extends l.Control{constructor(t){super(t)}static init_InputWidget(){this.define({title:[_.String,\"\"]})}}i.InputWidget=u,u.__name__=\"InputWidget\",u.init_InputWidget()},\n",
" 400: function _(u,e,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.bk_input=\"bk-input\",n.bk_input_group=\"bk-input-group\"},\n",
" 401: function _(t,e,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=t(392),o=t(291);class s extends n.AbstractButtonView{click(){this.model.clicks=this.model.clicks+1,this.model.trigger_event(new o.ButtonClick),super.click()}}i.ButtonView=s,s.__name__=\"ButtonView\";class c extends n.AbstractButton{constructor(t){super(t)}static init_Button(){this.prototype.default_view=s,this.override({label:\"Button\"})}}i.Button=c,c.__name__=\"Button\",c.init_Button()},\n",
" 402: function _(t,e,o){Object.defineProperty(o,\"__esModule\",{value:!0});const i=t(1),c=t(403),s=t(68),n=i.__importStar(t(18)),a=t(146);class u extends c.ButtonGroupView{get active(){return new Set(this.model.active)}change_active(t){const{active:e}=this;e.has(t)?e.delete(t):e.add(t),this.model.active=[...e].sort()}_update_active(){const{active:t}=this;this._buttons.forEach((e,o)=>{s.classes(e).toggle(a.bk_active,t.has(o))})}}o.CheckboxButtonGroupView=u,u.__name__=\"CheckboxButtonGroupView\";class r extends c.ButtonGroup{constructor(t){super(t)}static init_CheckboxButtonGroup(){this.prototype.default_view=u,this.define({active:[n.Array,[]]})}}o.CheckboxButtonGroup=r,r.__name__=\"CheckboxButtonGroup\",r.init_CheckboxButtonGroup()},\n",
" 403: function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=t(1),o=t(393),i=t(68),r=n.__importStar(t(18)),_=t(254),u=n.__importDefault(t(256));class a extends o.ControlView{*controls(){yield*this._buttons}connect_signals(){super.connect_signals();const t=this.model.properties;this.on_change(t.button_type,()=>this.render()),this.on_change(t.labels,()=>this.render()),this.on_change(t.active,()=>this._update_active())}styles(){return[...super.styles(),u.default]}render(){super.render(),this._buttons=this.model.labels.map((t,e)=>{const s=i.div({class:[_.bk_btn,_.bk_btn_type(this.model.button_type)],disabled:this.model.disabled},t);return s.addEventListener(\"click\",()=>this.change_active(e)),s}),this._update_active();const t=i.div({class:_.bk_btn_group},this._buttons);this.el.appendChild(t)}}s.ButtonGroupView=a,a.__name__=\"ButtonGroupView\";class l extends o.Control{constructor(t){super(t)}static init_ButtonGroup(){this.define({labels:[r.Array,[]],button_type:[r.ButtonType,\"default\"]})}}s.ButtonGroup=l,l.__name__=\"ButtonGroup\",l.init_ButtonGroup()},\n",
" 404: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(405),o=e(68),c=e(9),a=n.__importStar(e(18)),l=e(146),d=e(400);class r extends s.InputGroupView{render(){super.render();const e=o.div({class:[d.bk_input_group,this.model.inline?l.bk_inline:null]});this.el.appendChild(e);const{active:t,labels:i}=this.model;this._inputs=[];for(let n=0;n<i.length;n++){const s=o.input({type:\"checkbox\",value:\"\"+n});s.addEventListener(\"change\",()=>this.change_active(n)),this._inputs.push(s),this.model.disabled&&(s.disabled=!0),c.includes(t,n)&&(s.checked=!0);const a=o.label({},s,o.span({},i[n]));e.appendChild(a)}}change_active(e){const t=new Set(this.model.active);t.has(e)?t.delete(e):t.add(e),this.model.active=[...t].sort()}}i.CheckboxGroupView=r,r.__name__=\"CheckboxGroupView\";class p extends s.InputGroup{constructor(e){super(e)}static init_CheckboxGroup(){this.prototype.default_view=r,this.define({active:[a.Array,[]],labels:[a.Array,[]],inline:[a.Boolean,!1]})}}i.CheckboxGroup=p,p.__name__=\"CheckboxGroup\",p.init_CheckboxGroup()},\n",
" 405: function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const s=e(1),o=e(393),r=s.__importDefault(e(399));class u extends o.ControlView{*controls(){yield*this._inputs}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.render())}styles(){return[...super.styles(),r.default]}}n.InputGroupView=u,u.__name__=\"InputGroupView\";class _ extends o.Control{constructor(e){super(e)}}n.InputGroup=_,_.__name__=\"InputGroup\"},\n",
" 406: function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1),o=e(398),s=e(68),l=n.__importStar(e(18)),r=e(400);class c extends o.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,()=>this.input_el.name=this.model.name||\"\"),this.connect(this.model.properties.color.change,()=>this.input_el.value=this.model.color),this.connect(this.model.properties.disabled.change,()=>this.input_el.disabled=this.model.disabled)}render(){super.render(),this.input_el=s.input({type:\"color\",class:r.bk_input,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){this.model.color=this.input_el.value,super.change_input()}}t.ColorPickerView=c,c.__name__=\"ColorPickerView\";class d extends o.InputWidget{constructor(e){super(e)}static init_ColorPicker(){this.prototype.default_view=c,this.define({color:[l.Color,\"#000000\"]})}}t.ColorPicker=d,d.__name__=\"ColorPicker\",d.init_ColorPicker()},\n",
" 410: function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const i=e(1).__importDefault(e(159)),r=e(411);class n extends r.AbstractRangeSliderView{}a.DateRangeSliderView=n,n.__name__=\"DateRangeSliderView\";class d extends r.AbstractSlider{constructor(e){super(e),this.behaviour=\"drag\",this.connected=[!1,!0,!1]}static init_DateRangeSlider(){this.prototype.default_view=n,this.override({format:\"%d %b %Y\"})}_formatter(e,t){return i.default(e,t)}}a.DateRangeSlider=d,d.__name__=\"DateRangeSlider\",d.init_DateRangeSlider()},\n",
" 411: function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),l=i.__importStar(e(412)),r=i.__importStar(e(18)),o=e(68),n=e(9),a=e(393),d=e(413),h=e(400),_=i.__importDefault(e(414)),c=i.__importDefault(e(415));class u extends a.ControlView{*controls(){yield this.slider_el}get noUiSlider(){return this.slider_el.noUiSlider}connect_signals(){super.connect_signals();const{direction:e,orientation:t,tooltips:s}=this.model.properties;this.on_change([e,t,s],()=>this.render());const{start:i,end:l,value:r,step:o,title:n}=this.model.properties;this.on_change([i,l,r,o],()=>{const{start:e,end:t,value:s,step:i}=this._calc_to();this.noUiSlider.updateOptions({range:{min:e,max:t},start:s,step:i})});const{bar_color:a}=this.model.properties;this.on_change(a,()=>{this._set_bar_color()});const{show_value:d}=this.model.properties;this.on_change([r,n,d],()=>this._update_title())}styles(){return[...super.styles(),_.default,c.default]}_update_title(){o.empty(this.title_el);const e=null==this.model.title||0==this.model.title.length&&!this.model.show_value;if(this.title_el.style.display=e?\"none\":\"\",!e&&(0!=this.model.title.length&&(this.title_el.textContent=this.model.title+\": \"),this.model.show_value)){const{value:e}=this._calc_to(),t=e.map(e=>this.model.pretty(e)).join(\" .. \");this.title_el.appendChild(o.span({class:d.bk_slider_value},t))}}_set_bar_color(){if(!this.model.disabled){this.slider_el.querySelector(\".noUi-connect\").style.backgroundColor=this.model.bar_color}}_keypress_handle(e,t=0){const{start:s,value:i,end:l,step:r}=this._calc_to(),o=2==i.length;let n=s,a=l;switch(o&&0==t?a=i[1]:o&&1==t&&(n=i[0]),e.which){case 37:i[t]=Math.max(i[t]-r,n);break;case 39:i[t]=Math.min(i[t]+r,a);break;default:return}this.model.value=o?i:i[0],this.model.properties.value.change.emit(),this.model.value_throttled=this.model.value,this.noUiSlider.set(i)}render(){super.render();const{start:e,end:t,value:s,step:i}=this._calc_to();let r;if(this.model.tooltips){const e={to:e=>this.model.pretty(e)};r=n.repeat(e,s.length)}else r=!1;if(null==this.slider_el){this.slider_el=o.div(),l.create(this.slider_el,{range:{min:e,max:t},start:s,step:i,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:r,orientation:this.model.orientation,direction:this.model.direction}),this.noUiSlider.on(\"slide\",(e,t,s)=>this._slide(s)),this.noUiSlider.on(\"change\",(e,t,s)=>this._change(s)),this._set_keypress_handles();const n=(e,t)=>{if(!r)return;this.slider_el.querySelectorAll(\".noUi-handle\")[e].querySelector(\".noUi-tooltip\").style.display=t?\"block\":\"\"};this.noUiSlider.on(\"start\",(e,t)=>n(t,!0)),this.noUiSlider.on(\"end\",(e,t)=>n(t,!1))}else this.noUiSlider.updateOptions({range:{min:e,max:t},start:s,step:i});this._set_bar_color(),this.model.disabled?this.slider_el.setAttribute(\"disabled\",\"true\"):this.slider_el.removeAttribute(\"disabled\"),this.title_el=o.div({class:d.bk_slider_title}),this._update_title(),this.group_el=o.div({class:h.bk_input_group},this.title_el,this.slider_el),this.el.appendChild(this.group_el)}_slide(e){this.model.value=this._calc_from(e)}_change(e){this.model.value=this._calc_from(e),this.model.value_throttled=this.model.value}}u.__name__=\"AbstractBaseSliderView\";class m extends u{_calc_to(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}}_calc_from([e]){return Number.isInteger(this.model.start)&&Number.isInteger(this.model.end)&&Number.isInteger(this.model.step)?Math.round(e):e}_set_keypress_handles(){const e=this.slider_el.querySelector(\".noUi-handle\");e.setAttribute(\"tabindex\",\"0\"),e.addEventListener(\"keydown\",e=>this._keypress_handle(e))}}s.AbstractSliderView=m,m.__name__=\"AbstractSliderView\";class p extends u{_calc_to(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}}_calc_from(e){return e}_set_keypress_handles(){const e=this.slider_el.querySelector(\".noUi-handle-lower\"),t=this.slider_el.querySelector(\".noUi-handle-upper\");e.setAttribute(\"tabindex\",\"0\"),e.addEventListener
" 412: function _(t,e,r){\n",
" /*! nouislider - 14.5.0 - 5/11/2020 */\n",
" var n;n=function(){\"use strict\";var t=\"14.5.0\";function e(t){t.parentElement.removeChild(t)}function r(t){return null!=t}function n(t){t.preventDefault()}function i(t){return\"number\"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,r){r>0&&(u(t,e),setTimeout((function(){c(t,e)}),r))}function s(t){return Math.max(Math.min(t,100),0)}function a(t){return Array.isArray(t)?t:[t]}function l(t){var e=(t=String(t)).split(\".\");return e.length>1?e[1].length:0}function u(t,e){t.classList&&!/\\s/.test(e)?t.classList.add(e):t.className+=\" \"+e}function c(t,e){t.classList&&!/\\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function p(t){var e=void 0!==window.pageXOffset,r=\"CSS1Compat\"===(t.compatMode||\"\");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function f(t,e){return 100/(e-t)}function d(t,e,r){return 100*e/(t[r+1]-t[r])}function h(t,e){for(var r=1;t>=e[r];)r+=1;return r}function m(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=h(r,t),i=t[n-1],o=t[n],s=e[n-1],a=e[n];return s+function(t,e){return d(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}([i,o],r)/f(s,a)}function g(t,e,r,n){if(100===n)return n;var i=h(n,t),o=t[i-1],s=t[i];return r?n-o>(s-o)/2?s:o:e[i-1]?t[i-1]+function(t,e){return Math.round(t/e)*e}(n-t[i-1],e[i-1]):n}function v(t,e,r){var n;if(\"number\"==typeof e&&(e=[e]),!Array.isArray(e))throw new Error(\"noUiSlider (14.5.0): 'range' contains invalid value.\");if(!i(n=\"min\"===t?0:\"max\"===t?100:parseFloat(t))||!i(e[0]))throw new Error(\"noUiSlider (14.5.0): 'range' value isn't numeric.\");r.xPct.push(n),r.xVal.push(e[0]),n?r.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(r.xSteps[0]=e[1]),r.xHighestCompleteStep.push(0)}function x(t,e,r){if(e)if(r.xVal[t]!==r.xVal[t+1]){r.xSteps[t]=d([r.xVal[t],r.xVal[t+1]],e,0)/f(r.xPct[t],r.xPct[t+1]);var n=(r.xVal[t+1]-r.xVal[t])/r.xNumSteps[t],i=Math.ceil(Number(n.toFixed(3))-1),o=r.xVal[t]+r.xNumSteps[t]*i;r.xHighestCompleteStep[t]=o}else r.xSteps[t]=r.xHighestCompleteStep[t]=r.xVal[t]}function b(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i=[];for(n in t)t.hasOwnProperty(n)&&i.push([t[n],n]);for(i.length&&\"object\"==typeof i[0][0]?i.sort((function(t,e){return t[0][0]-e[0][0]})):i.sort((function(t,e){return t[0]-e[0]})),n=0;n<i.length;n++)v(i[n][1],i[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)x(n,this.xNumSteps[n],this)}b.prototype.getDistance=function(t){var e,r=[];for(e=0;e<this.xNumSteps.length-1;e++){var n=this.xNumSteps[e];if(n&&t/n%1!=0)throw new Error(\"noUiSlider (14.5.0): 'limit', 'margin' and 'padding' of \"+this.xPct[e]+\"% range must be divisible by step.\");r[e]=d(this.xVal,t,e)}return r},b.prototype.getAbsoluteDistance=function(t,e,r){var n,i=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++;var o=1,s=e[i],a=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);s>0;)a=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=a*n,o=(s-100*n)/e[i+c],n=1):(l=e[i+c]*a/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),s=e[i+c]*o;return t+u},b.prototype.toStepping=function(t){return t=m(this.xVal,this.xPct,t)},b.prototype.fromStepping=function(t){return function(t,e,r){if(r>=100)return t.slice(-1)[0];var n=h(r,e),i=t[n-1],o=t[n],s=e[n-1];return function(t,e){return e*(t[1]-t[0])/100+t[0]}([i,o],(r-s)*f(s,e[n]))}(this.xVal,this.xPct,t)},b.prototype.getStep=function(t){return t=g(this.xPct,this.xSteps,this.snap,t)},b.prototype.getDefaultStep=function(t,e,r){var n=h(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},b.prototype.getNearbySteps=function(t){var e=h(t,this.xPct);return{stepBefore
" 413: function _(e,l,i){Object.defineProperty(i,\"__esModule\",{value:!0}),i.bk_slider_value=\"bk-slider-value\",i.bk_slider_title=\"bk-slider-title\"},\n",
" 416: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=e(1).__importDefault(e(159)),a=e(411);class d extends a.AbstractSliderView{}i.DateSliderView=d,d.__name__=\"DateSliderView\";class s extends a.AbstractSlider{constructor(e){super(e),this.behaviour=\"tap\",this.connected=[!0,!1]}static init_DateSlider(){this.prototype.default_view=d,this.override({format:\"%d %b %Y\"})}_formatter(e,t){return r.default(e,t)}}i.DateSlider=s,s.__name__=\"DateSlider\",s.init_DateSlider()},\n",
" 417: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const r=e(1),_=e(418),n=r.__importStar(e(18));class s extends _.MarkupView{render(){super.render(),this.model.render_as_text?this.markup_el.textContent=this.model.text:this.markup_el.innerHTML=this.model.text}}i.DivView=s,s.__name__=\"DivView\";class a extends _.Markup{constructor(e){super(e)}static init_Div(){this.prototype.default_view=s,this.define({render_as_text:[n.Boolean,!1]})}}i.Div=a,a.__name__=\"Div\",a.init_Div()},\n",
" 418: function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),a=e(193),n=e(68),l=i.__importStar(e(18)),r=e(458),_=e(419),c=i.__importDefault(e(420));class u extends r.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>{this.layout.invalidate_cache(),this.render(),this.root.compute_layout()})}styles(){return[...super.styles(),c.default]}_update_layout(){this.layout=new a.CachedVariadicBox(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render();const e=Object.assign(Object.assign({},this.model.style),{display:\"inline-block\"});this.markup_el=n.div({class:_.bk_clearfix,style:e}),this.el.appendChild(this.markup_el)}}s.MarkupView=u,u.__name__=\"MarkupView\";class o extends r.Widget{constructor(e){super(e)}static init_Markup(){this.define({text:[l.String,\"\"],style:[l.Any,{}]})}}s.Markup=o,o.__name__=\"Markup\",o.init_Markup()},\n",
" 419: function _(e,c,f){Object.defineProperty(f,\"__esModule\",{value:!0}),f.bk_clearfix=\"bk-clearfix\"},\n",
" 421: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(392),o=e(291),_=e(68),d=n.__importStar(e(18)),l=e(8),r=e(146),u=e(254),c=e(255),h=n.__importDefault(e(257));class p extends s.AbstractButtonView{constructor(){super(...arguments),this._open=!1}styles(){return[...super.styles(),h.default]}render(){super.render();const e=_.div({class:[c.bk_caret,r.bk_down]});if(this.model.is_split){const t=this._render_button(e);t.classList.add(u.bk_dropdown_toggle),t.addEventListener(\"click\",()=>this._toggle_menu()),this.group_el.appendChild(t)}else this.button_el.appendChild(e);const t=this.model.menu.map((e,t)=>{if(null==e)return _.div({class:c.bk_divider});{const i=l.isString(e)?e:e[0],n=_.div({},i);return n.addEventListener(\"click\",()=>this._item_click(t)),n}});this.menu=_.div({class:[c.bk_menu,r.bk_below]},t),this.el.appendChild(this.menu),_.undisplay(this.menu)}_show_menu(){if(!this._open){this._open=!0,_.display(this.menu);const e=t=>{const{target:i}=t;i instanceof HTMLElement&&!this.el.contains(i)&&(document.removeEventListener(\"click\",e),this._hide_menu())};document.addEventListener(\"click\",e)}}_hide_menu(){this._open&&(this._open=!1,_.undisplay(this.menu))}_toggle_menu(){this._open?this._hide_menu():this._show_menu()}click(){this.model.is_split?(this._hide_menu(),this.model.trigger_event(new o.ButtonClick),super.click()):this._toggle_menu()}_item_click(e){this._hide_menu();const t=this.model.menu[e];if(null!=t){const i=l.isString(t)?t:t[1];l.isString(i)?this.model.trigger_event(new o.MenuItemClick(i)):i.execute(this.model,{index:e})}}}i.DropdownView=p,p.__name__=\"DropdownView\";class m extends s.AbstractButton{constructor(e){super(e)}static init_Dropdown(){this.prototype.default_view=p,this.define({split:[d.Boolean,!1],menu:[d.Array,[]]}),this.override({label:\"Dropdown\"})}get is_split(){return this.split}}i.Dropdown=m,m.__name__=\"Dropdown\",m.init_Dropdown()},\n",
" 422: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const l=e(1).__importStar(e(18)),s=e(458);class n extends s.WidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.render()),this.connect(this.model.properties.width.change,()=>this.render())}render(){null==this.dialogEl&&(this.dialogEl=document.createElement(\"input\"),this.dialogEl.type=\"file\",this.dialogEl.multiple=this.model.multiple,this.dialogEl.onchange=()=>{const{files:e}=this.dialogEl;null!=e&&this.load_files(e)},this.el.appendChild(this.dialogEl)),null!=this.model.accept&&\"\"!=this.model.accept&&(this.dialogEl.accept=this.model.accept),this.dialogEl.style.width=\"{this.model.width}px\",this.dialogEl.disabled=this.model.disabled}async load_files(e){const t=[],i=[],l=[];let s;for(s=0;s<e.length;s++){i.push(e[s].name);const n=await this.readfile(e[s]),[,o,,a]=n.split(/[:;,]/,4);t.push(a),l.push(o)}this.model.multiple?(this.model.filename=i,this.model.mime_type=l,this.model.value=t):(this.model.filename=i[0],this.model.mime_type=l[0],this.model.value=t[0])}readfile(e){return new Promise((t,i)=>{const l=new FileReader;l.onload=()=>{var s;const{result:n}=l;null!=n?t(n):i(null!==(s=l.error)&&void 0!==s?s:new Error(`unable to read '${e.name}'`))},l.readAsDataURL(e)})}}i.FileInputView=n,n.__name__=\"FileInputView\";class o extends s.Widget{constructor(e){super(e)}static init_FileInput(){this.prototype.default_view=n,this.define({value:[l.Any,\"\"],mime_type:[l.Any,\"\"],filename:[l.Any,\"\"],accept:[l.String,\"\"],multiple:[l.Boolean,!1]})}}i.FileInput=o,o.__name__=\"FileInput\",o.init_FileInput()},\n",
" 423: function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(1),n=e(68),l=e(8),o=i.__importStar(e(18)),c=e(398),r=e(400);class h extends c.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,()=>this.render_selection()),this.connect(this.model.properties.options.change,()=>this.render()),this.connect(this.model.properties.name.change,()=>this.render()),this.connect(this.model.properties.title.change,()=>this.render()),this.connect(this.model.properties.size.change,()=>this.render()),this.connect(this.model.properties.disabled.change,()=>this.render())}render(){super.render();const e=this.model.options.map(e=>{let t,s;return l.isString(e)?t=s=e:[t,s]=e,n.option({value:t},s)});this.select_el=n.select({multiple:!0,class:r.bk_input,name:this.model.name,disabled:this.model.disabled},e),this.select_el.addEventListener(\"change\",()=>this.change_input()),this.group_el.appendChild(this.select_el),this.render_selection()}render_selection(){const e=new Set(this.model.value);for(const t of this.el.querySelectorAll(\"option\"))t.selected=e.has(t.value);this.select_el.size=this.model.size}change_input(){const e=null!=this.el.querySelector(\"select:focus\"),t=[];for(const e of this.el.querySelectorAll(\"option\"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.select_el.focus()}}s.MultiSelectView=h,h.__name__=\"MultiSelectView\";class d extends c.InputWidget{constructor(e){super(e)}static init_MultiSelect(){this.prototype.default_view=h,this.define({value:[o.Array,[]],options:[o.Array,[]],size:[o.Number,4]})}}s.MultiSelect=d,d.__name__=\"MultiSelect\",d.init_MultiSelect()},\n",
" 424: function _(a,e,r){Object.defineProperty(r,\"__esModule\",{value:!0});const t=a(418),p=a(68);class s extends t.MarkupView{render(){super.render();const a=p.p({style:{margin:0}},this.model.text);this.markup_el.appendChild(a)}}r.ParagraphView=s,s.__name__=\"ParagraphView\";class i extends t.Markup{constructor(a){super(a)}static init_Paragraph(){this.prototype.default_view=s}}r.Paragraph=i,i.__name__=\"Paragraph\",i.init_Paragraph()},\n",
" 425: function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const n=e(397);class r extends n.TextInputView{render(){super.render(),this.input_el.type=\"password\"}}s.PasswordInputView=r,r.__name__=\"PasswordInputView\";class p extends n.TextInput{constructor(e){super(e)}static init_PasswordInput(){this.prototype.default_view=r}}s.PasswordInput=p,p.__name__=\"PasswordInput\",p.init_PasswordInput()},\n",
" 426: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),l=s.__importDefault(e(427)),o=e(68),n=e(8),h=s.__importStar(e(18)),r=e(400),c=s.__importDefault(e(428)),d=e(398);class a extends d.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,()=>this.render_selection()),this.connect(this.model.properties.disabled.change,()=>this.set_disabled()),this.connect(this.model.properties.max_items.change,()=>this.render()),this.connect(this.model.properties.option_limit.change,()=>this.render()),this.connect(this.model.properties.delete_button.change,()=>this.render()),this.connect(this.model.properties.placeholder.change,()=>this.render()),this.connect(this.model.properties.options.change,()=>this.render()),this.connect(this.model.properties.name.change,()=>this.render()),this.connect(this.model.properties.title.change,()=>this.render())}styles(){return[...super.styles(),c.default]}render(){super.render();const e=this.model.options.map(e=>{let t,i;return n.isString(e)?t=i=e:[t,i]=e,o.option({value:t},i)});this.select_el=o.select({multiple:!0,class:r.bk_input,name:this.model.name,disabled:this.model.disabled},e),this.group_el.appendChild(this.select_el),this.render_selection();let t=\"choices__item\",i=\"choices__button\";this.model.solid?(t+=\" solid\",i+=\" solid\"):(t+=\" light\",i+=\" light\");const s={removeItemButton:this.model.delete_button,classNames:{item:t,button:i}};null!==this.model.placeholder&&(s.placeholderValue=this.model.placeholder),null!==this.model.max_items&&(s.maxItemCount=this.model.max_items),null!==this.model.option_limit&&(s.renderChoiceLimit=this.model.option_limit),this.choice_el=new l.default(this.select_el,s),this.select_el.addEventListener(\"change\",()=>this.change_input())}render_selection(){const e=new Set(this.model.value);for(const t of Array.from(this.el.querySelectorAll(\"option\")))t.selected=e.has(t.value)}set_disabled(){this.model.disabled?this.choice_el.disable():this.choice_el.enable()}change_input(){const e=null!=this.el.querySelector(\"select:focus\"),t=[];for(const e of Array.from(this.el.querySelectorAll(\"option\")))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.select_el.focus()}}i.MultiChoiceView=a,a.__name__=\"MultiChoiceView\";class u extends d.InputWidget{constructor(e){super(e)}static init_MultiChoice(){this.prototype.default_view=a,this.define({value:[h.Array,[]],options:[h.Array,[]],max_items:[h.Number,null],delete_button:[h.Boolean,!0],placeholder:[h.String,null],option_limit:[h.Number,null],solid:[h.Boolean,!0]})}}i.MultiChoice=u,u.__name__=\"MultiChoice\",u.init_MultiChoice()},\n",
" 429: function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const s=e(418),i=e(68);class n extends s.MarkupView{render(){super.render();const e=i.pre({style:{overflow:\"auto\"}},this.model.text);this.markup_el.appendChild(e)}}r.PreTextView=n,n.__name__=\"PreTextView\";class _ extends s.Markup{constructor(e){super(e)}static init_PreText(){this.prototype.default_view=n}}r.PreText=_,_.__name__=\"PreText\",_.init_PreText()},\n",
" 430: function _(t,o,e){Object.defineProperty(e,\"__esModule\",{value:!0});const i=t(1),a=t(403),n=t(68),u=i.__importStar(t(18)),s=t(146);class _ extends a.ButtonGroupView{change_active(t){this.model.active!==t&&(this.model.active=t)}_update_active(){const{active:t}=this.model;this._buttons.forEach((o,e)=>{n.classes(o).toggle(s.bk_active,t===e)})}}e.RadioButtonGroupView=_,_.__name__=\"RadioButtonGroupView\";class c extends a.ButtonGroup{constructor(t){super(t)}static init_RadioButtonGroup(){this.prototype.default_view=_,this.define({active:[u.Any,null]})}}e.RadioButtonGroup=c,c.__name__=\"RadioButtonGroup\",c.init_RadioButtonGroup()},\n",
" 431: function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=e(1),a=e(68),s=e(24),o=n.__importStar(e(18)),d=e(405),l=e(146),p=e(400);class r extends d.InputGroupView{render(){super.render();const e=a.div({class:[p.bk_input_group,this.model.inline?l.bk_inline:null]});this.el.appendChild(e);const i=s.uniqueId(),{active:t,labels:n}=this.model;this._inputs=[];for(let s=0;s<n.length;s++){const o=a.input({type:\"radio\",name:i,value:\"\"+s});o.addEventListener(\"change\",()=>this.change_active(s)),this._inputs.push(o),this.model.disabled&&(o.disabled=!0),s==t&&(o.checked=!0);const d=a.label({},o,a.span({},n[s]));e.appendChild(d)}}change_active(e){this.model.active=e}}t.RadioGroupView=r,r.__name__=\"RadioGroupView\";class u extends d.InputGroup{constructor(e){super(e)}static init_RadioGroup(){this.prototype.default_view=r,this.define({active:[o.Number],labels:[o.Array,[]],inline:[o.Boolean,!1]})}}t.RadioGroup=u,u.__name__=\"RadioGroup\",u.init_RadioGroup()},\n",
" 432: function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(1).__importStar(e(161)),a=e(411),n=e(8);class o extends a.AbstractRangeSliderView{}r.RangeSliderView=o,o.__name__=\"RangeSliderView\";class s extends a.AbstractSlider{constructor(e){super(e),this.behaviour=\"drag\",this.connected=[!1,!0,!1]}static init_RangeSlider(){this.prototype.default_view=o,this.override({format:\"0[.]00\"})}_formatter(e,t){return n.isString(t)?i.format(e,t):t.doFormat([e],{loc:0})[0]}}r.RangeSlider=s,s.__name__=\"RangeSlider\",s.init_RangeSlider()},\n",
" 433: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(68),l=e(8),o=e(17),p=n.__importStar(e(18)),u=e(398),a=e(400);class _ extends u.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,options:t}=this.model.properties;this.on_change(e,()=>{this._update_value()}),this.on_change(t,()=>{s.empty(this.input_el),s.append(this.input_el,...this.options_el())})}options_el(){function e(e){return e.map(e=>{let t,i;return l.isString(e)?t=i=e:[t,i]=e,s.option({value:t},i)})}const{options:t}=this.model;return l.isArray(t)?e(t):o.entries(t).map(([t,i])=>s.optgroup({label:t},e(i)))}render(){super.render(),this.input_el=s.select({class:a.bk_input,name:this.model.name,disabled:this.model.disabled},this.options_el()),this._update_value(),this.input_el.addEventListener(\"change\",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){const e=this.input_el.value;this.model.value=e,super.change_input()}_update_value(){const{value:e}=this.model;null!=e&&0!=e.length&&(this.input_el.value=this.model.value)}}i.SelectView=_,_.__name__=\"SelectView\";class h extends u.InputWidget{constructor(e){super(e)}static init_Select(){this.prototype.default_view=_,this.define({value:[p.String,\"\"],options:[p.Any,[]]})}}i.Select=h,h.__name__=\"Select\",h.init_Select()},\n",
" 434: function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const i=e(1).__importStar(e(161)),o=e(411),s=e(8);class _ extends o.AbstractSliderView{}r.SliderView=_,_.__name__=\"SliderView\";class a extends o.AbstractSlider{constructor(e){super(e),this.behaviour=\"tap\",this.connected=[!0,!1]}static init_Slider(){this.prototype.default_view=_,this.override({format:\"0[.]00\"})}_formatter(e,t){return s.isString(t)?i.format(e,t):t.doFormat([e],{loc:0})[0]}}r.Slider=a,a.__name__=\"Slider\",a.init_Slider()},\n",
" 435: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(1),s=e(398),l=e(68),h=n.__importStar(e(18)),o=e(400),{floor:p,max:d,min:u}=Math;function r(e){return p(e)!==e?e.toFixed(16).replace(/0+$/,\"\").split(\".\")[1].length:0}class a extends s.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.low.change,()=>{const{low:e}=this.model;null!=e&&(this.input_el.min=e.toFixed(16))}),this.connect(this.model.properties.high.change,()=>{const{high:e}=this.model;null!=e&&(this.input_el.max=e.toFixed(16))}),this.connect(this.model.properties.step.change,()=>{const{step:e}=this.model;this.input_el.step=e.toFixed(16)}),this.connect(this.model.properties.value.change,()=>{const{value:e,step:t}=this.model;this.input_el.value=e.toFixed(r(t)).replace(/(\\.[0-9]*[1-9])0+$|\\.0*$/,\"$1\")}),this.connect(this.model.properties.disabled.change,()=>{this.input_el.disabled=this.model.disabled})}render(){super.render(),this.input_el=l.input({type:\"number\",class:o.bk_input,name:this.model.name,min:this.model.low,max:this.model.high,value:this.model.value,step:this.model.step,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){if(this.input_el.value){const{step:e}=this.model;let t=Number(this.input_el.value);null!=this.model.low&&(t=d(t,this.model.low)),null!=this.model.high&&(t=u(t,this.model.high)),this.model.value=Number(t.toFixed(r(e))),super.change_input()}}}i.SpinnerView=a,a.__name__=\"SpinnerView\";class c extends s.InputWidget{constructor(e){super(e)}static init_Spinner(){this.prototype.default_view=a,this.define({value:[h.Number,0],low:[h.Number,null],high:[h.Number,null],step:[h.Number,1]})}}i.Spinner=c,c.__name__=\"Spinner\",c.init_Spinner()},\n",
" 436: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),n=e(398),l=e(68),h=s.__importStar(e(18)),o=e(400);class a extends n.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,()=>this.input_el.name=this.model.name||\"\"),this.connect(this.model.properties.value.change,()=>this.input_el.value=this.model.value),this.connect(this.model.properties.disabled.change,()=>this.input_el.disabled=this.model.disabled),this.connect(this.model.properties.placeholder.change,()=>this.input_el.placeholder=this.model.placeholder),this.connect(this.model.properties.rows.change,()=>this.input_el.rows=this.model.rows),this.connect(this.model.properties.cols.change,()=>this.input_el.cols=this.model.cols),this.connect(this.model.properties.max_length.change,()=>this.input_el.maxLength=this.model.max_length)}render(){super.render(),this.input_el=l.textarea({class:o.bk_input,name:this.model.name,disabled:this.model.disabled,placeholder:this.model.placeholder,cols:this.model.cols,rows:this.model.rows,maxLength:this.model.max_length}),this.input_el.textContent=this.model.value,this.input_el.addEventListener(\"change\",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){this.model.value=this.input_el.value,super.change_input()}}i.TextAreaInputView=a,a.__name__=\"TextAreaInputView\";class p extends n.InputWidget{constructor(e){super(e)}static init_TextAreaInput(){this.prototype.default_view=a,this.define({value:[h.String,\"\"],value_input:[h.String,\"\"],placeholder:[h.String,\"\"],cols:[h.Number,20],rows:[h.Number,2],max_length:[h.Number,500]})}}i.TextAreaInput=p,p.__name__=\"TextAreaInput\",p.init_TextAreaInput()},\n",
" 437: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),c=e(392),o=e(68),a=s.__importStar(e(18)),n=e(146);class l extends c.AbstractButtonView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>this._update_active())}render(){super.render(),this._update_active()}click(){this.model.active=!this.model.active,super.click()}_update_active(){o.classes(this.button_el).toggle(n.bk_active,this.model.active)}}i.ToggleView=l,l.__name__=\"ToggleView\";class _ extends c.AbstractButton{constructor(e){super(e)}static init_Toggle(){this.prototype.default_view=l,this.define({active:[a.Boolean,!1]}),this.override({label:\"Toggle\"})}}i.Toggle=_,_.__name__=\"Toggle\",_.init_Toggle()},\n",
" throw new Error(\"Cannot find Bokeh \" + version + \". You have to load it prior to loading plugins.\");\n",
" }\n",
" })\n",
" ({\n",
" 438: function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const r=e(1).__importStar(e(439));o.Tables=r,e(7).register_models(r)},\n",
" 439: function _(a,g,r){Object.defineProperty(r,\"__esModule\",{value:!0});const e=a(1);e.__exportStar(a(440),r),e.__exportStar(a(462),r);var t=a(441);r.DataTable=t.DataTable;var o=a(465);r.TableColumn=o.TableColumn;var n=a(457);r.TableWidget=n.TableWidget;var u=a(466);r.AvgAggregator=u.AvgAggregator,r.MinAggregator=u.MinAggregator,r.MaxAggregator=u.MaxAggregator,r.SumAggregator=u.SumAggregator;var l=a(467);r.GroupingInfo=l.GroupingInfo,r.DataCube=l.DataCube},\n",
" 440: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1).__importStar(e(18)),r=e(68),a=e(66),n=e(71),l=e(441),u=e(459);class d extends a.DOMView{constructor(e){const{model:t,parent:i}=e.column;super(Object.assign({model:t,parent:i},e)),this.args=e,this.initialize(),this.render()}get emptyValue(){return null}initialize(){super.initialize(),this.inputEl=this._createInput(),this.defaultValue=null}async lazy_initialize(){throw new Error(\"unsupported\")}css_classes(){return super.css_classes().concat(u.bk_cell_editor)}render(){super.render(),this.args.container.append(this.el),this.el.appendChild(this.inputEl),this.renderEditor(),this.disableNavigation()}renderEditor(){}disableNavigation(){this.inputEl.addEventListener(\"keydown\",e=>{switch(e.keyCode){case r.Keys.Left:case r.Keys.Right:case r.Keys.Up:case r.Keys.Down:case r.Keys.PageUp:case r.Keys.PageDown:e.stopImmediatePropagation()}})}destroy(){this.remove()}focus(){this.inputEl.focus()}show(){}hide(){}position(){}getValue(){return this.inputEl.value}setValue(e){this.inputEl.value=e}serializeValue(){return this.getValue()}isValueChanged(){return!(\"\"==this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue}applyValue(e,t){const i=this.args.grid.getData(),s=i.index.indexOf(e[l.DTINDEX_NAME]);i.setField(s,this.args.column.field,t)}loadValue(e){const t=e[this.args.column.field];this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)}validateValue(e){if(this.args.column.validator){const t=this.args.column.validator(e);if(!t.valid)return t}return{valid:!0,msg:null}}validate(){return this.validateValue(this.getValue())}}i.CellEditorView=d,d.__name__=\"CellEditorView\";class o extends n.Model{}i.CellEditor=o,o.__name__=\"CellEditor\";class _ extends d{get emptyValue(){return\"\"}_createInput(){return r.input({type:\"text\"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}}i.StringEditorView=_,_.__name__=\"StringEditorView\";class c extends o{static init_StringEditor(){this.prototype.default_view=_,this.define({completions:[s.Array,[]]})}}i.StringEditor=c,c.__name__=\"StringEditor\",c.init_StringEditor();class p extends d{_createInput(){return r.textarea()}}i.TextEditorView=p,p.__name__=\"TextEditorView\";class h extends o{static init_TextEditor(){this.prototype.default_view=p}}i.TextEditor=h,h.__name__=\"TextEditor\",h.init_TextEditor();class E extends d{_createInput(){return r.select()}renderEditor(){for(const e of this.model.options)this.inputEl.appendChild(r.option({value:e},e));this.focus()}}i.SelectEditorView=E,E.__name__=\"SelectEditorView\";class V extends o{static init_SelectEditor(){this.prototype.default_view=E,this.define({options:[s.Array,[]]})}}i.SelectEditor=V,V.__name__=\"SelectEditor\",V.init_SelectEditor();class m extends d{_createInput(){return r.input({type:\"text\"})}}i.PercentEditorView=m,m.__name__=\"PercentEditorView\";class f extends o{static init_PercentEditor(){this.prototype.default_view=m}}i.PercentEditor=f,f.__name__=\"PercentEditor\",f.init_PercentEditor();class x extends d{_createInput(){return r.input({type:\"checkbox\",value:\"true\"})}renderEditor(){this.focus()}loadValue(e){this.defaultValue=!!e[this.args.column.field],this.inputEl.checked=this.defaultValue}serializeValue(){return this.inputEl.checked}}i.CheckboxEditorView=x,x.__name__=\"CheckboxEditorView\";class w extends o{static init_CheckboxEditor(){this.prototype.default_view=x}}i.CheckboxEditor=w,w.__name__=\"CheckboxEditor\",w.init_CheckboxEditor();class g extends d{_createInput(){return r.input({type:\"text\"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}remove(){super.remove()}serializeValue(){return parseInt(this.getValue(),10)||0}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}validateValue(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid integer\"}:super.validateValue(e)}}i.IntEditorView=g,g.__name__=\"IntEditorView
" 441: function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(1),o=e(442),n=e(446),l=e(447),r=e(448),d=s.__importStar(e(18)),a=e(24),h=e(8),c=e(9),u=e(17),_=e(72),m=e(188),g=e(457),p=e(458),b=e(459),f=s.__importDefault(e(460)),w=s.__importDefault(e(461));i.DTINDEX_NAME=\"__bkdt_internal_index__\";class x{constructor(e,t){this.init(e,t)}init(e,t){if(i.DTINDEX_NAME in e.data)throw new Error(`special name ${i.DTINDEX_NAME} cannot be used as a data table column`);this.source=e,this.view=t,this.index=this.view.indices}getLength(){return this.index.length}getItem(e){const t={};for(const i of u.keys(this.source.data))t[i]=this.source.data[i][this.index[e]];return t[i.DTINDEX_NAME]=this.index[e],t}getField(e,t){return t==i.DTINDEX_NAME?this.index[e]:this.source.data[t][this.index[e]]}setField(e,t,i){const s=this.index[e];this.source.patch({[t]:[[s,i]]})}getItemMetadata(e){return null}getRecords(){return c.range(0,this.getLength()).map(e=>this.getItem(e))}sort(e){let t=e.map(e=>[e.sortCol.field,e.sortAsc?1:-1]);0==t.length&&(t=[[i.DTINDEX_NAME,1]]);const s=this.getRecords(),o=this.index.slice();this.index.sort((function(e,i){for(const[n,l]of t){const t=s[o.indexOf(e)][n],r=s[o.indexOf(i)][n],d=t==r?0:t>r?l:-l;if(0!=d)return d}return 0}))}}i.TableDataProvider=x,x.__name__=\"TableDataProvider\";class C extends p.WidgetView{constructor(){super(...arguments),this._in_selection_update=!1,this._warned_not_reorderable=!1}connect_signals(){super.connect_signals(),this.connect(this.model.change,()=>this.render()),this.connect(this.model.source.streaming,()=>this.updateGrid()),this.connect(this.model.source.patching,()=>this.updateGrid()),this.connect(this.model.source.change,()=>this.updateGrid()),this.connect(this.model.source.properties.data.change,()=>this.updateGrid()),this.connect(this.model.source.selected.change,()=>this.updateSelection()),this.connect(this.model.source.selected.properties.indices.change,()=>this.updateSelection())}remove(){var e;null===(e=this.grid)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),f.default,w.default]}_update_layout(){this.layout=new m.LayoutItem,this.layout.set_sizing(this.box_sizing())}update_position(){super.update_position(),this.grid.resizeCanvas()}updateGrid(){if(this.model.view.compute_indices(),this.data.init(this.model.source,this.model.view),this.model.sortable){const e=this.grid.getColumns(),t=this.grid.getSortColumns().map(t=>({sortCol:{field:e[this.grid.getColumnIndex(t.columnId)].field},sortAsc:t.sortAsc}));this.data.sort(t)}this.grid.invalidate(),this.grid.render()}updateSelection(){if(this._in_selection_update)return;const{selected:e}=this.model.source,t=e.indices.map(e=>this.data.index.indexOf(e)).sort();this._in_selection_update=!0,this.grid.setSelectedRows(t),this._in_selection_update=!1;const i=this.grid.getViewport(),s=this.model.get_scroll_index(i,t);null!=s&&this.grid.scrollRowToTop(s)}newIndexColumn(){return{id:a.uniqueId(),name:this.model.index_header,field:i.DTINDEX_NAME,width:this.model.index_width,behavior:\"select\",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:b.bk_cell_index,headerCssClass:b.bk_header_index}}css_classes(){return super.css_classes().concat(b.bk_data_table)}render(){let e,t=this.model.columns.map(e=>Object.assign(Object.assign({},e.toColumn()),{parent:this}));if(\"checkbox\"==this.model.selectable&&(e=new n.CheckboxSelectColumn({cssClass:b.bk_cell_select}),t.unshift(e.getColumnDefinition())),null!=this.model.index_position){const e=this.model.index_position,i=this.newIndexColumn();-1==e?t.push(i):e<-1?t.splice(e+1,0,i):t.splice(e,0,i)}let{reorderable:i}=this.model;!i||\"undefined\"!=typeof $&&null!=$.fn&&null!=$.fn.sortable||(this._warned_not_reorderable||(_.logger.warn(\"jquery-ui is required to enable DataTable.reorderable\"),this._warned_not_reorderable=!0),i=!1);const s={enableCellNavigation:!1!==this.model.selectable,enableColumnReorder:i,forceFitColumns:this.model.fit_columns,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:!1,rowHeight
" 445: function _(t,i,n){function o(){var t=!1,i=!1;this.stopPropagation=function(){t=!0},this.isPropagationStopped=function(){return t},this.stopImmediatePropagation=function(){i=!0},this.isImmediatePropagationStopped=function(){return i}}function e(){this.__nonDataRow=!0}function r(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function s(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function l(){var t=null;this.isActive=function(i){return i?t===i:null!==t},this.activate=function(i){if(i!==t){if(null!==t)throw new Error(\"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController\");if(!i.commitCurrentEdit)throw new Error(\"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()\");if(!i.cancelCurrentEdit)throw new Error(\"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()\");t=i}},this.deactivate=function(i){if(t!==i)throw new Error(\"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one\");t=null},this.commitCurrentEdit=function(){return!t||t.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!t||t.cancelCurrentEdit()}}r.prototype=new e,r.prototype.equals=function(t){return this.value===t.value&&this.count===t.count&&this.collapsed===t.collapsed&&this.title===t.title},s.prototype=new e,i.exports={Event:function(){var t=[];this.subscribe=function(i){t.push(i)},this.unsubscribe=function(i){for(var n=t.length-1;n>=0;n--)t[n]===i&&t.splice(n,1)},this.notify=function(i,n,e){var r;n=n||new o,e=e||this;for(var s=0;s<t.length&&!n.isPropagationStopped()&&!n.isImmediatePropagationStopped();s++)r=t[s].call(e,n,i);return r}},EventData:o,EventHandler:function(){var t=[];this.subscribe=function(i,n){return t.push({event:i,handler:n}),i.subscribe(n),this},this.unsubscribe=function(i,n){for(var o=t.length;o--;)if(t[o].event===i&&t[o].handler===n)return t.splice(o,1),void i.unsubscribe(n);return this},this.unsubscribeAll=function(){for(var i=t.length;i--;)t[i].event.unsubscribe(t[i].handler);return t=[],this}},Range:function(t,i,n,o){void 0===n&&void 0===o&&(n=t,o=i),this.fromRow=Math.min(t,n),this.fromCell=Math.min(i,o),this.toRow=Math.max(t,n),this.toCell=Math.max(i,o),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(t,i){return t>=this.fromRow&&t<=this.toRow&&i>=this.fromCell&&i<=this.toCell},this.toString=function(){return this.isSingleCell()?\"(\"+this.fromRow+\":\"+this.fromCell+\")\":\"(\"+this.fromRow+\":\"+this.fromCell+\" - \"+this.toRow+\":\"+this.toCell+\")\"}},NonDataRow:e,Group:r,GroupTotals:s,EditorLock:l,GlobalEditorLock:new l,keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,ESC:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38,C:67,V:86},preClickClassName:\"slick-edit-preclick\"}},\n",
" 448: function _(r,t,o){var _=r(1);_.__exportStar(r(445),t.exports),_.__exportStar(r(449),t.exports),_.__exportStar(r(452),t.exports),_.__exportStar(r(453),t.exports),_.__exportStar(r(454),t.exports),_.__exportStar(r(455),t.exports),_.__exportStar(r(456),t.exports)},\n",
" 449: function _(require,module,exports){\n",
" /**\n",
" * @license\n",
" * (c) 2009-2016 Michael Leibman\n",
" * michael{dot}leibman{at}gmail{dot}com\n",
" * http://github.com/mleibman/slickgrid\n",
" *\n",
" * Distributed under MIT license.\n",
" * All rights reserved.\n",
" *\n",
" * SlickGrid v2.3\n",
" *\n",
" * NOTES:\n",
" * Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.\n",
" * This increases the speed dramatically, but can only be done safely because there are no event handlers\n",
" * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()\n",
" * and do proper cleanup.\n",
" */\n",
" var $=require(443),Slick=require(445),scrollbarDimensions,maxSupportedCssHeight;function SlickGrid(container,data,columns,options){$.fn.drag||require(450),$.fn.drop||require(451);var defaults={alwaysShowVerticalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,autoHeight:!1,editorLock:Slick.GlobalEditorLock,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,showPreHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:\"flashing\",selectedCellCssClass:\"selected\",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:\"new-row\",preserveCopiedSelectionOnPaste:!1,showCellSelection:!0,viewportClass:null,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1},columnDefaults={name:\"\",resizable:!0,sortable:!1,minWidth:30,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},th,h,ph,n,cj,page=0,offset=0,vScrollDir=1,initialized=!1,$container,uid=\"slickgrid_\"+Math.round(1e6*Math.random()),self=this,$focusSink,$focusSink2,$headerScroller,$headers,$headerRow,$headerRowScroller,$headerRowSpacer,$footerRow,$footerRowScroller,$footerRowSpacer,$preHeaderPanel,$preHeaderPanelScroller,$preHeaderPanelSpacer,$topPanelScroller,$topPanel,$viewport,$canvas,$style,$boundAncestors,stylesheet,columnCssRulesL,columnCssRulesR,viewportH,viewportW,canvasWidth,viewportHasHScroll,viewportHasVScroll,headerColumnWidthDiff=0,headerColumnHeightDiff=0,cellWidthDiff=0,cellHeightDiff=0,jQueryNewWidthBehaviour=!1,absoluteColumnMinWidth,tabbingDirection=1,activePosX,activeRow,activeCell,activeCellNode=null,currentEditor=null,serializedEditorValue,editController,rowsCache={},renderedRows=0,numVisibleRows,prevScrollTop=0,scrollTop=0,lastRenderedScrollTop=0,lastRenderedScrollLeft=0,prevScrollLeft=0,scrollLeft=0,selectionModel,selectedRows=[],plugins=[],cellCssClasses={},columnsById={},sortColumns=[],columnPosLeft=[],columnPosRight=[],pagingActive=!1,pagingIsLastPage=!1,scrollThrottle=ActionThrottle(render,50),h_editorLoader=null,h_render=null,h_postrender=null,h_postrenderCleanup=null,postProcessedRows={},postProcessToRow=null,postProcessFromRow=null,postProcessedCleanupQueue=[],postProcessgroupId=0,counter_rows_rendered=0,counter_rows_removed=0,rowNodeFromLastMouseWheelEvent,zombieRowNodeFromLastMouseWheelEvent,zombieRowCacheFromLastMouseWheelEvent,zombieRowPostProcessedFromLastMouseWheelEvent,cssShow={position:\"absolute\",visibility:\"hidden\",display:\"block\"},$hiddenParents,oldProps=[],columnResizeDragging=!1;function init(){if(($container=container instanceof $?container:$(container)).length<1)throw new Error(\"SlickGrid requires a valid container, \"+container+\" does not exist in the DOM.\");cacheCssForHiddenInit(),maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,columnsById={};for(var e=0;e<columns.length;e++){var o=columns[e]=$.extend({},columnDefaults,columns[e]);columnsById[o.id]=e,o.minWidth&&o.width<o.minWidth&&(o.width=o.minWidth),o.maxWidth&&o.width>o.maxWidth&&(o.width=o.maxWidth)}if(options.enableColumnReorder&&!$.fn.sortable)throw new Error(\"SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded\");editController={commitCurrentEdit,cancelCurrentEdit},$container.empty().css(\"overflow\",\"hidden\").css(\"outline\",0).addClas
" 450: function _(t,e,a){\n",
" /*!\n",
" * jquery.event.drag - v 2.3.0\n",
" * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n",
" * Open Source MIT License - http://threedubmedia.com/code/license\n",
" 457: function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(1),n=e(458),c=e(98),a=s.__importStar(e(18));class o extends n.Widget{constructor(e){super(e)}static init_TableWidget(){this.define({source:[a.Instance],view:[a.Instance,()=>new c.CDSView]})}initialize(){super.initialize(),null==this.view.source&&(this.view.source=this.source,this.view.compute_indices())}}t.TableWidget=o,o.__name__=\"TableWidget\",o.init_TableWidget()},\n",
" 458: function _(i,e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=i(1),n=i(249),r=o.__importStar(i(18));class _ extends n.HTMLBoxView{_width_policy(){return\"horizontal\"==this.model.orientation?super._width_policy():\"fixed\"}_height_policy(){return\"horizontal\"==this.model.orientation?\"fixed\":super._height_policy()}box_sizing(){const i=super.box_sizing();return\"horizontal\"==this.model.orientation?null==i.width&&(i.width=this.model.default_size):null==i.height&&(i.height=this.model.default_size),i}}t.WidgetView=_,_.__name__=\"WidgetView\";class s extends n.HTMLBox{constructor(i){super(i)}static init_Widget(){this.define({orientation:[r.Orientation,\"horizontal\"],default_size:[r.Number,300]}),this.override({margin:[5,5,5,5]})}}t.Widget=s,s.__name__=\"Widget\",s.init_Widget()},\n",
" 459: function _(e,l,b){Object.defineProperty(b,\"__esModule\",{value:!0}),b.bk_data_table=\"bk-data-table\",b.bk_cell_index=\"bk-cell-index\",b.bk_header_index=\"bk-header-index\",b.bk_cell_editor=\"bk-cell-editor\",b.bk_cell_select=\"bk-cell-select\"},\n",
" throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");\n",
" }\n",
" })\n",
" ({\n",
" \"4e90918c0a\": function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const s=e(\"tslib\").__importStar(e(\"22ae8fda70\"));o.Panel=s,e(\"@bokehjs/base\").register_models(s)},\n",
" \"3343056bd8\": function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const i=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),s=e(\"@bokehjs/models/layouts/html_box\"),n=e(\"@bokehjs/core/dom\"),a=e(\"ba20932521\");class d extends a.PanelHTMLBoxView{initialize(){super.initialize(),this._ace=window.ace,this._container=n.div({id:\"_\"+Math.random().toString(36).substr(2,9),style:{width:\"100%\",height:\"100%\"}})}connect_signals(){super.connect_signals(),this.connect(this.model.properties.code.change,()=>this._update_code_from_model()),this.connect(this.model.properties.theme.change,()=>this._update_theme()),this.connect(this.model.properties.language.change,()=>this._update_language()),this.connect(this.model.properties.annotations.change,()=>this._add_annotations()),this.connect(this.model.properties.readonly.change,()=>{this._editor.setReadOnly(this.model.readonly)})}render(){super.render(),this._container!==this.el.childNodes[0]&&this.el.appendChild(this._container),this._container.textContent=this.model.code,this._editor=this._ace.edit(this._container.id),this._editor.setTheme(\"ace/theme/\"+`${this.model.theme}`),this._editor.session.setMode(\"ace/mode/\"+`${this.model.language}`),this._editor.setReadOnly(this.model.readonly),this._langTools=this._ace.require(\"ace/ext/language_tools\"),this._editor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,fontFamily:\"monospace\"}),this._editor.on(\"change\",()=>this._update_code_from_editor())}_update_code_from_model(){this._editor&&this._editor.getValue()!=this.model.code&&this._editor.setValue(this.model.code)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_theme(){this._editor.setTheme(\"ace/theme/\"+`${this.model.theme}`)}_update_language(){this._editor.session.setMode(\"ace/mode/\"+`${this.model.language}`)}_add_annotations(){this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),this._editor.resize()}}o.AcePlotView=d,d.__name__=\"AcePlotView\";class h extends s.HTMLBox{constructor(e){super(e)}static init_AcePlot(){this.prototype.default_view=d,this.define({code:[i.String],language:[i.String,\"python\"],theme:[i.String,\"chrome\"],annotations:[i.Array,[]],readonly:[i.Boolean,!1]}),this.override({height:300,width:300})}}o.AcePlot=h,h.__name__=\"AcePlot\",h.__module__=\"panel.models.ace\",h.init_AcePlot()},\n",
" \"ba20932521\": function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const s=e(\"@bokehjs/core/layout/layoutable\"),h=e(\"@bokehjs/core/layout/types\"),o=e(\"@bokehjs/core/dom\"),_=e(\"@bokehjs/models/widgets/markup\"),n=e(\"@bokehjs/models/layouts/html_box\");function a(e,i){let t=null!=i.width?\"fixed\":\"fit\",s=null!=i.height?\"fixed\":\"fit\";const{sizing_mode:h}=i;if(null!=h)if(\"fixed\"==h)t=s=\"fixed\";else if(\"stretch_both\"==h)t=s=\"max\";else if(\"stretch_width\"==h)t=\"max\";else if(\"stretch_height\"==h)s=\"max\";else switch(h){case\"scale_width\":t=\"max\",s=\"min\";break;case\"scale_height\":t=\"min\",s=\"max\";break;case\"scale_both\":t=\"max\",s=\"max\";break;default:throw new Error(\"unreachable\")}\"fixed\"==t&&i.width?e.style.width=i.width+\"px\":\"max\"==t&&(e.style.width=\"100%\"),\"fixed\"==s&&i.height?e.style.height=i.height+\"px\":\"max\"==s&&(e.style.height=\"100%\")}t.set_size=a;class d extends s.Layoutable{constructor(e,i,t){super(),this.el=e,this.sizing_mode=i,this.changed=t,this._cache={},this._cache_count={}}_measure(e){const i=[e.width,e.height,this.sizing_mode].toString(),t=this.changed&&\"fixed\"!=this.sizing_mode&&null!=this.sizing_mode?1:0;if(i in this._cache&&this._cache_count[i]>=t)return this._cache_count[i]=this._cache_count[i]+1,this._cache[i];const s=new h.Sizeable(e).bounded_to(this.sizing.size),_=o.sized(this.el,s,()=>{const e=new h.Sizeable(o.content_size(this.el)),{border:i,padding:t}=o.extents(this.el);return e.grow_by(i).grow_by(t).map(Math.ceil)});return this._cache[i]=_,this._cache_count[i]=0,_}}t.CachedVariadicBox=d,d.__name__=\"CachedVariadicBox\";class l extends _.MarkupView{_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new d(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),a(this.markup_el,this.model)}}t.PanelMarkupView=l,l.__name__=\"PanelMarkupView\";class c extends n.HTMLBoxView{_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new d(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),a(this.el,this.model)}}t.PanelHTMLBoxView=c,c.__name__=\"PanelHTMLBoxView\"},\n",
" \"66d52165db\": function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const o=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),s=e(\"@bokehjs/models/layouts/html_box\"),l=e(\"ba20932521\");class d extends l.PanelHTMLBoxView{initialize(){super.initialize(),this._blocked=!1,this._setting=!1,this._time=Date.now()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.loop.change,()=>this.set_loop()),this.connect(this.model.properties.paused.change,()=>this.set_paused()),this.connect(this.model.properties.time.change,()=>this.set_time()),this.connect(this.model.properties.value.change,()=>this.set_value()),this.connect(this.model.properties.volume.change,()=>this.set_volume())}render(){super.render(),this.audioEl=document.createElement(\"audio\"),this.audioEl.controls=!0,this.audioEl.src=this.model.value,this.audioEl.currentTime=this.model.time,this.audioEl.loop=this.model.loop,null!=this.model.volume?this.audioEl.volume=this.model.volume/100:this.model.volume=100*this.audioEl.volume,this.audioEl.onpause=()=>this.model.paused=!0,this.audioEl.onplay=()=>this.model.paused=!1,this.audioEl.ontimeupdate=()=>this.update_time(this),this.audioEl.onvolumechange=()=>this.update_volume(this),this.el.appendChild(this.audioEl),this.model.paused||this.audioEl.play()}update_time(e){e._setting?e._setting=!1:Date.now()-e._time<e.model.throttle||(e._blocked=!0,e.model.time=e.audioEl.currentTime,e._time=Date.now())}update_volume(e){e._setting?e._setting=!1:(e._blocked=!0,e.model.volume=100*e.audioEl.volume)}set_loop(){this.audioEl.loop=this.model.loop}set_paused(){!this.audioEl.paused&&this.model.paused&&this.audioEl.pause(),this.audioEl.paused&&!this.model.paused&&this.audioEl.play()}set_volume(){this._blocked?this._blocked=!1:(this._setting=!0,null!=this.model.volume&&(this.audioEl.volume=this.model.volume/100))}set_time(){this._blocked?this._blocked=!1:(this._setting=!0,this.audioEl.currentTime=this.model.time)}set_value(){this.audioEl.src=this.model.value}}i.AudioView=d,d.__name__=\"AudioView\";class u extends s.HTMLBox{constructor(e){super(e)}static init_Audio(){this.prototype.default_view=d,this.define({loop:[o.Boolean,!1],paused:[o.Boolean,!0],time:[o.Number,0],throttle:[o.Number,250],value:[o.Any,\"\"],volume:[o.Number,null]})}}i.Audio=u,u.__name__=\"Audio\",u.__module__=\"panel.models.widgets\",u.init_Audio()},\n",
" \"71a9759436\": function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const o=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),i=e(\"@bokehjs/document\"),s=e(\"@bokehjs/core/view\"),c=e(\"@bokehjs/model\"),_=e(\"@bokehjs/protocol/message\"),l=e(\"@bokehjs/protocol/receiver\");class r extends s.View{renderTo(){}}n.CommManagerView=r,r.__name__=\"CommManagerView\";class a extends c.Model{constructor(e){super(e),this._document_listener=e=>this._document_changed(e),this._receiver=new l.Receiver,this._event_buffer=[],this._blocked=!1,this._timeout=Date.now(),null!=window.PyViz&&window.PyViz.comm_manager?(this.ns=window.PyViz,this.ns.comm_manager.register_target(this.plot_id,this.comm_id,e=>this.msg_handler(e)),this._client_comm=this.ns.comm_manager.get_client_comm(this.plot_id,this.client_comm_id,e=>this.on_ack(e))):console.log(\"Could not find comm manager on window.PyViz, ensure the extension is loaded.\")}_doc_attached(){super._doc_attached(),null!=this.document&&this.document.on_change(this._document_listener)}_document_changed(e){e.setter_id!==this.id&&(e instanceof i.ModelChangedEvent&&!(e.attr in e.model.serializable_attributes())||(this._event_buffer.unshift(e),(!this._blocked||Date.now()>this._timeout)&&(setTimeout(()=>this.process_events(),this.debounce),this._blocked=!0,this._timeout=Date.now()+this.timeout)))}process_events(){if(null==this.document||null==this._client_comm)return;const e=_.Message.create(\"PATCH-DOC\",{},this.document.create_json_patch(this._event_buffer));this._client_comm.send(e),this._event_buffer=[]}on_ack(e){const t=e.metadata;this._event_buffer.length?(this.process_events(),this._blocked=!0,this._timeout=Date.now()+this.timeout):this._blocked=!1,this._event_buffer=[],\"Ready\"==t.msg_type&&t.content?console.log(\"Python callback returned following output:\",t.content):\"Error\"==t.msg_type&&console.log(\"Python failed with the following traceback:\",t.traceback)}msg_handler(e){const t=e.metadata,n=e.buffers,o=e.content.data,i=this.plot_id;if(\"Ready\"==t.msg_type)t.content?console.log(\"Python callback returned following output:\",t.content):\"Error\"==t.msg_type&&console.log(\"Python failed with the following traceback:\",t.traceback);else if(null!=i){let e=null;if(i in this.ns.plot_index&&null!=this.ns.plot_index[i]?e=this.ns.plot_index[i]:void 0!==window.Bokeh&&i in window.Bokeh.index&&(e=window.Bokeh.index[i]),null==e)return;null!=n&&n.length>0?this._receiver.consume(n[0].buffer):this._receiver.consume(o);const t=this._receiver.message;null!=t&&Object.keys(t.content).length>0&&null!=this.document&&this.document.apply_json_patch(t.content,t.buffers,this.id)}}static init_CommManager(){this.prototype.default_view=r,this.define({plot_id:[o.String,null],comm_id:[o.String,null],client_comm_id:[o.String,null],timeout:[o.Number,5e3],debounce:[o.Number,50]})}}n.CommManager=a,a.__name__=\"CommManager\",a.__module__=\"panel.models.comm_manager\",a.init_CommManager()},\n",
" \"f6b9b1d914\": function _(e,t,o){Object.defineProperty(o,\"__esModule\",{value:!0});const i=e(\"tslib\"),a=e(\"@bokehjs/core/dom\"),s=i.__importStar(e(\"@bokehjs/core/properties\")),n=e(\"@bokehjs/models/layouts/html_box\"),c=e(\"ba20932521\"),r=e(\"064eac2866\"),d=i.__importDefault(e(\"093eb75864\")),l=window.deck,_=window.mapboxgl,h=window.loaders;function p(){const e={},t=Object.keys(l).filter(e=>e.charAt(0)===e.charAt(0).toUpperCase());for(const o of t)e[o]=l[o];return e}class u extends c.PanelHTMLBoxView{connect_signals(){super.connect_signals();const{data:e,mapbox_api_key:t,tooltip:o,layers:i,initialViewState:a,data_sources:s}=this.model.properties;this.on_change([t,o],()=>this.render()),this.on_change([e,a],()=>this.updateDeck()),this.on_change([i],()=>this._update_layers()),this.on_change([s],()=>this._connect_sources(!0)),this._layer_map={},this._connected=[],this._connect_sources()}_update_layers(){this._layer_map={},this._update_data(!0)}_connect_sources(e=!1){for(const e of this.model.data_sources)this._connected.indexOf(e)<0&&(this.connect(e.properties.data.change,()=>this._update_data(!0)),this._connected.push(e));this._update_data(e)}initialize(){if(super.initialize(),l.JSONConverter){const{CSVLoader:e,Tile3DLoader:t}=h;h.registerLoaders([t,e]);const o={classes:p(),enumerations:{COORDINATE_SYSTEM:l.COORDINATE_SYSTEM,GL:d.default},constants:{Tile3DLoader:t}};this.jsonConverter=new l.JSONConverter({configuration:o})}}_update_data(e=!0){let t=0;for(const e of this.model.layers){let o;if(t+=1,t-1 in this._layer_map)o=this.model.data_sources[this._layer_map[t-1]];else{if(\"number\"!=typeof e.data)continue;this._layer_map[t-1]=e.data,o=this.model.data_sources[e.data]}const i=[],a=o.columns();for(let e=0;e<o.data[a[0]].length;e++){const t={};for(const i of a){const a=o._shapes[i];void 0!==a&&a.length>1&&\"number\"==typeof a[0]?t[i]=o.data[i].slice(e*a[1],e*a[1]+a[1]):t[i]=o.data[i][e]}i.push(t)}e.data=i}e&&this.updateDeck()}_on_click_event(e){const t={coordinate:e.coordinate,lngLat:e.lngLat,index:e.index};this.model.clickState=t}_on_hover_event(e){const t={coordinate:e.coordinate,lngLat:e.lngLat,index:e.index};this.model.hoverState=t}_on_viewState_event(e){this.model.viewState=e.viewState}getData(){return Object.assign(Object.assign({},this.model.data),{layers:this.model.layers,initialViewState:this.model.initialViewState,onViewStateChange:e=>this._on_viewState_event(e),onClick:e=>this._on_click_event(e),onHover:e=>this._on_hover_event(e)})}updateDeck(){if(!this.deckGL)return void this.render();const e=this.getData();if(l.updateDeck)l.updateDeck(e,this.deckGL);else{const t=this.jsonConverter.convert(e);this.deckGL.setProps(t)}}createDeck({mapboxApiKey:e,container:t,jsonInput:o,tooltip:i}){let a;try{const s=this.jsonConverter.convert(o),n=r.makeTooltip(i);a=new l.DeckGL(Object.assign(Object.assign({},s),{map:_,mapboxApiAccessToken:e,container:t,getTooltip:n}))}catch(e){console.error(e)}return a}render(){super.render();const e=a.div({class:\"deckgl\"});c.set_size(e,this.model);const t=this.model.mapbox_api_key,o=this.model.tooltip,i=this.getData();l.createDeck?this.deckGL=l.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}):this.deckGL=this.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}),this.el.appendChild(e)}}o.DeckGLPlotView=u,u.__name__=\"DeckGLPlotView\";class m extends n.HTMLBox{constructor(e){super(e)}static init_DeckGLPlot(){this.prototype.default_view=u,this.define({data:[s.Any],data_sources:[s.Array,[]],clickState:[s.Any],hoverState:[s.Any],initialViewState:[s.Any],layers:[s.Array,[]],mapbox_api_key:[s.String],tooltip:[s.Any],viewState:[s.Any]}),this.override({height:400,width:600})}}o.DeckGLPlot=m,m.__name__=\"DeckGLPlot\",m.__module__=\"panel.models.deckgl\",m.init_DeckGLPlot()},\n",
" \"064eac2866\": function _(e,t,n){\n",
" /*\n",
" This file was adapted from https://github.com/uber/deck.gl/ the LICENSE\n",
" below is preserved to comply with the original license.\n",
" copies of the Software, and to permit persons to whom the Software is\n",
" furnished to do so, subject to the following conditions:\n",
" \n",
" The above copyright notice and this permission notice shall be included in\n",
" all copies or substantial portions of the Software.\n",
" \n",
" THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n",
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n",
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n",
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n",
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n",
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n",
" THE SOFTWARE.\n",
" */\n",
" let i,l;Object.defineProperty(n,\"__esModule\",{value:!0});const o={fontFamily:'\"Helvetica Neue\", Helvetica, Arial, sans-serif',display:\"flex\",flex:\"wrap\",maxWidth:\"500px\",flexDirection:\"column\",zIndex:2};function r(){return document.createElement(\"div\")}function s(e){if(!e.picked)return null;if(e.object===i)return l;const t={html:a(e.object),style:o};return l=t,i=e.object,t}n.getTooltipDefault=s;const c=new Set([\"position\",\"index\"]);function a(e){const t=r();for(const n in e){if(c.has(n))continue;const i=r();i.className=\"header\",i.textContent=n;const l=r();l.className=\"value\",l.textContent=u(e[n]);const o=r();f(o,i,l),o.appendChild(i),o.appendChild(l),t.appendChild(o)}return t.innerHTML}function f(e,t,n){Object.assign(t.style,{fontWeight:700,marginRight:\"10px\",flex:\"1 1 0%\"}),Object.assign(n.style,{flex:\"none\",maxWidth:\"250px\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\"}),Object.assign(e.style,{display:\"flex\",flexDirection:\"row\",justifyContent:\"space-between\",alignItems:\"stretch\"})}function u(e){let t;if(Array.isArray(e)&&e.length>4)t=`Array<${e.length}>`;else if(\"string\"==typeof e)t=e;else if(\"number\"==typeof e)t=String(e);else try{t=JSON.stringify(e)}catch(e){t=\"<Non-Serializable Object>\"}return t.length>50&&(t=t.slice(0,50)),t}function p(e,t){let n=e;for(const e in t)n=n.replace(`{${e}}`,t[e]);return n}n.tabularize=a,n.toText=u,n.substituteIn=p,n.makeTooltip=function(e){return e?e.html||e.text?t=>{if(!t.picked)return null;const n={style:e.style||o};return e.html?n.html=p(e.html,t.object):n.text=p(e.text,t.object),n}:s:null}},\n",
" \"093eb75864\": function _(E,_,R){_.exports={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIV
" \"ae707e931d\": function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const n=e(\"@bokehjs/models/widgets/markup\"),a=e(\"ba20932521\");class s extends a.PanelMarkupView{render(){var e;super.render();const t=(e=this.model.text,(new DOMParser).parseFromString(e,\"text/html\").documentElement.textContent)||this.model.text;t?(this.markup_el.innerHTML=t,Array.from(this.markup_el.querySelectorAll(\"script\")).forEach(e=>{const t=document.createElement(\"script\");Array.from(e.attributes).forEach(e=>t.setAttribute(e.name,e.value)),t.appendChild(document.createTextNode(e.innerHTML)),e.parentNode&&e.parentNode.replaceChild(t,e)})):this.markup_el.innerHTML=\"\"}}r.HTMLView=s,s.__name__=\"HTMLView\";class o extends n.Markup{constructor(e){super(e)}static init_HTML(){this.prototype.default_view=s}}r.HTML=o,o.__name__=\"HTML\",o.__module__=\"panel.models.markup\",o.init_HTML()},\n",
" \"9ba5b8422a\": function _(e,t,r){Object.defineProperty(r,\"__esModule\",{value:!0});const s=e(\"tslib\"),i=s.__importStar(e(\"@bokehjs/core/properties\")),o=e(\"@bokehjs/models/widgets/markup\"),n=s.__importDefault(e(\"18bba7b7e1\")),a=e(\"ba20932521\");class d extends a.PanelMarkupView{render(){super.render();const e=this.model.text.replace(/(\\r\\n|\\n|\\r)/gm,\"\").replace(\"'\",'\"');let t;try{t=window.JSON.parse(e)}catch(e){return void(this.markup_el.innerHTML=\"<b>Invalid JSON:</b> \"+e.toString())}const r={hoverPreviewEnabled:this.model.hover_preview,theme:this.model.theme},s=new n.default(t,this.model.depth,r).render();let i=\"border-radius: 5px; padding: 10px;\";\"dark\"==this.model.theme?s.style.cssText=\"background-color: rgb(30, 30, 30);\"+i:s.style.cssText=i,this.markup_el.append(s)}}r.JSONView=d,d.__name__=\"JSONView\";const l=[\"dark\",\"light\"];class p extends o.Markup{constructor(e){super(e)}static init_JSON(){this.prototype.default_view=d,this.define({depth:[i.Number,1],hover_preview:[i.Boolean,!1],theme:[i.Enum(l),\"dark\"]})}}r.JSON=p,p.__name__=\"JSON\",p.__module__=\"panel.models.markup\",p.init_JSON()},\n",
" \"a94e371ba4\": function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const l=e(\"tslib\"),n=e(\"@bokehjs/models/widgets/input_widget\"),s=e(\"@bokehjs/styles/buttons\"),o=l.__importStar(e(\"@bokehjs/core/properties\"));class a extends n.InputWidgetView{constructor(){super(...arguments),this._initialized=!1}connect_signals(){super.connect_signals(),this.connect(this.model.properties.button_type.change,()=>this.render()),this.connect(this.model.properties.data.change,()=>this.render()),this.connect(this.model.properties.filename.change,()=>this.render()),this.connect(this.model.properties.label.change,()=>this._update_label())}render(){if(super.render(),this.anchor_el=document.createElement(\"a\"),this.anchor_el.classList.add(s.bk_btn),this.anchor_el.classList.add(s.bk_btn_type(this.model.button_type)),this.anchor_el.textContent=this.model.label,null===this.model.data||null===this.model.filename)return this.anchor_el.addEventListener(\"click\",()=>this.click()),this.group_el.appendChild(this.anchor_el),void(this._initialized=!0);const e=function(e){const t=atob(e.split(\",\")[1]),i=e.split(\",\")[0].split(\":\")[1].split(\";\")[0],l=new ArrayBuffer(t.length),n=new Uint8Array(l);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return new Blob([l],{type:i})}(this.model.data),t=URL.createObjectURL(e);this.anchor_el.href=t,this.anchor_el.download=this.model.filename,this.group_el.appendChild(this.anchor_el),this.model.auto&&this._initialized&&this.anchor_el.click(),this._initialized=!0}_update_label(){this.anchor_el.textContent=this.model.label}click(){this.model.clicks=this.model.clicks+1}}i.FileDownloadView=a,a.__name__=\"FileDownloadView\";class r extends n.InputWidget{constructor(e){super(e)}static init_FileDownload(){this.prototype.default_view=a,this.define({auto:[o.Boolean,!1],clicks:[o.Number,0],data:[o.String,null],label:[o.String,\"Download\"],filename:[o.String,null],button_type:[o.ButtonType,\"default\"]}),this.override({title:\"\"})}}i.FileDownload=r,r.__name__=\"FileDownload\",r.__module__=\"panel.models.widgets\",r.init_FileDownload()},\n",
" \"7b859fb3cf\": function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const a=e(\"@bokehjs/models/widgets/markup\"),n=e(\"ba20932521\");class r extends n.PanelMarkupView{render(){super.render(),this.markup_el.innerHTML=this.model.text,window.renderMathInElement&&window.renderMathInElement(this.el,{delimiters:[{left:\"$$\",right:\"$$\",display:!0},{left:\"\\\\[\",right:\"\\\\]\",display:!0},{left:\"$\",right:\"$\",display:!1},{left:\"\\\\(\",right:\"\\\\)\",display:!1}]})}}i.KaTeXView=r,r.__name__=\"KaTeXView\";class s extends a.Markup{constructor(e){super(e)}static init_KaTeX(){this.prototype.default_view=r}}i.KaTeX=s,s.__name__=\"KaTeX\",s.__module__=\"panel.models.katex\",s.init_KaTeX()},\n",
" \"0c21036737\": function _(e,t,a){Object.defineProperty(a,\"__esModule\",{value:!0});const i=e(\"@bokehjs/models/widgets/markup\"),s=e(\"ba20932521\");class _ extends s.PanelMarkupView{initialize(){super.initialize(),this._hub=window.MathJax.Hub,this._hub.Config({tex2jax:{inlineMath:[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]]}})}render(){super.render(),this._hub&&(this.markup_el.innerHTML=this.model.text,this._hub.Queue([\"Typeset\",this._hub,this.markup_el]))}}a.MathJaxView=_,_.__name__=\"MathJaxView\";class h extends i.Markup{constructor(e){super(e)}static init_MathJax(){this.prototype.default_view=_}}a.MathJax=h,h.__name__=\"MathJax\",h.__module__=\"panel.models.mathjax\",h.init_MathJax()},\n",
" \"2363c12dd6\": function _(t,e,o){Object.defineProperty(o,\"__esModule\",{value:!0});const i=t(\"tslib\").__importStar(t(\"@bokehjs/core/properties\")),l=t(\"@bokehjs/core/util/object\"),r=t(\"@bokehjs/core/util/eq\"),s=t(\"@bokehjs/models/layouts/html_box\"),n=t(\"99a25e6992\"),a=t(\"990b5dd5c7\"),p=t(\"ba20932521\"),h=window.Plotly,_=(t,e,o)=>{let i=Array.isArray(e)?[]:{};if(\"click\"===o||\"hover\"===o||\"selected\"===o){const o=[];if(null==e)return null;const l=t.data;for(let t=0;t<e.points.length;t++){const i=e.points[t];let r={};for(let t in i){const e=i[t];!i.hasOwnProperty(t)||Array.isArray(e)||a.isPlainObject(e)||(r[t]=e)}null!=i&&(i.hasOwnProperty(\"curveNumber\")&&i.hasOwnProperty(\"pointNumber\")&&l[i.curveNumber].hasOwnProperty(\"customdata\")&&(r.customdata=l[i.curveNumber].customdata[i.pointNumber]),i.hasOwnProperty(\"pointNumbers\")&&(r.pointNumbers=i.pointNumbers)),o[t]=r}i.points=o}else if(\"relayout\"===o||\"restyle\"===o)for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return e.hasOwnProperty(\"range\")&&(i.range=e.range),e.hasOwnProperty(\"lassoPoints\")&&(i.lassoPoints=e.lassoPoints),i};class u extends p.PanelHTMLBoxView{constructor(){super(...arguments),this._settingViewport=!1,this._plotInitialized=!1,this._reacting=!1,this._relayouting=!1,this._end_relayouting=n.debounce(()=>{this._relayouting=!1},2e3,!1)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.viewport_update_policy.change,this._updateSetViewportFunction),this.connect(this.model.properties.viewport_update_throttle.change,this._updateSetViewportFunction),this.connect(this.model.properties._render_count.change,this.plot),this.connect(this.model.properties.viewport.change,this._updateViewportFromProperty)}render(){super.render(),window.Plotly&&this.plot()}plot(){if(!window.Plotly)return;const t=[];for(let e=0;e<this.model.data.length;e++)t.push(this._get_trace(e,!1));let e=a.deepCopy(this.model.layout);if(this._relayouting){const t=this.el.layout;Object.keys(t).reduce((t,o)=>{\"axis\"===o.slice(1,5)&&\"range\"in t&&(e[o].range=t.range)},{})}this._reacting=!0,h.react(this.el,t,e,this.model.config).then(()=>{this._updateSetViewportFunction(),this._updateViewportProperty(),this._plotInitialized||(this.el.on(\"plotly_relayout\",t=>{!0!==t._update_from_property&&(this.model.relayout_data=_(this.el,t,\"relayout\"),this._updateViewportProperty(),this._end_relayouting())}),this.el.on(\"plotly_relayouting\",()=>{\"mouseup\"!==this.model.viewport_update_policy&&(this._relayouting=!0,this._updateViewportProperty())}),this.el.on(\"plotly_restyle\",t=>{this.model.restyle_data=_(this.el,t,\"restyle\"),this._updateViewportProperty()}),this.el.on(\"plotly_click\",t=>{this.model.click_data=_(this.el,t,\"click\")}),this.el.on(\"plotly_hover\",t=>{this.model.hover_data=_(this.el,t,\"hover\")}),this.el.on(\"plotly_selected\",t=>{this.model.selected_data=_(this.el,t,\"selected\")}),this.el.on(\"plotly_clickannotation\",t=>{delete t.event,delete t.fullAnnotation,this.model.clickannotation_data=t}),this.el.on(\"plotly_deselect\",()=>{this.model.selected_data=null}),this.el.on(\"plotly_unhover\",()=>{this.model.hover_data=null})),this._plotInitialized=!0,this._reacting=!1})}_get_trace(t,e){const o=l.clone(this.model.data[t]),i=this.model.data_sources[t];for(const t of i.columns()){const l=i._shapes[t][0];let s=i.get_array(t)[0];if(l.length>1){const t=[];for(let e=0;e<l[0];e++)t.push(s.slice(e*l[1],(e+1)*l[1]));s=t}let n=t.split(\".\"),a=n[n.length-1];var r=o;for(let t of n.slice(0,-1))r=r[t];e&&1==n.length?r[a]=[s]:r[a]=s}return o}_updateViewportFromProperty(){if(!h||this._settingViewport||this._reacting||!this.model.viewport)return;const t=this.el._fullLayout;Object.keys(this.model.viewport).reduce((e,o)=>{if(r.isEqual(a.get(t,o),e))return!0;{let t=a.deepCopy(this.model.viewport);return t._update_from_property=!0,h.relayout(this.el,t),!1}},{})}_updateViewportProperty(){const t=this.el._fullLayout;let e={};for(let o in t){if(!t.hasOwnProperty(o))continue;let i=o.slice(0,5);\"xaxis\"!==i&&\"yaxis\"!==i||(e[o+\".range\"]=a.
" \"990b5dd5c7\": function _(t,e,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.get=(t,e,n)=>{const r=n=>String.prototype.split.call(e,n).filter(Boolean).reduce((t,e)=>null!=t?t[e]:t,t),o=r(/[,[\\]]+?/)||r(/[,[\\].]+?/);return void 0===o||o===t?n:o},n.throttle=function(t,e){var n=0;return function(){var r=Number(new Date);r-n>=e&&(t(),n=r)}},n.deepCopy=function t(e){var n;if(null==e||\"object\"!=typeof e)return e;if(e instanceof Array){n=[];for(var r=0,o=e.length;r<o;r++)n[r]=t(e[r]);return n}if(e instanceof Object){const n={};for(const r in e){const o=r;e.hasOwnProperty(o)&&(n[o]=t(e[o]))}return n}throw new Error(\"Unable to copy obj! Its type isn't supported.\")},n.isPlainObject=function(t){return\"[object Object]\"===Object.prototype.toString.call(t)}},\n",
" \"76307e5afa\": function _(e,s,t){Object.defineProperty(t,\"__esModule\",{value:!0});const i=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),o=e(\"@bokehjs/models/layouts/html_box\"),r=e(\"ba20932521\");class l extends o.HTMLBoxView{connect_signals(){super.connect_signals();const e=()=>{this.render(),this.root.compute_layout()};this.connect(this.model.properties.height.change,e),this.connect(this.model.properties.width.change,e),this.connect(this.model.properties.height_policy.change,e),this.connect(this.model.properties.width_policy.change,e),this.connect(this.model.properties.sizing_mode.change,e),this.connect(this.model.properties.active.change,()=>this.setCSS()),this.connect(this.model.properties.bar_color.change,()=>this.setCSS()),this.connect(this.model.properties.css_classes.change,()=>this.setCSS()),this.connect(this.model.properties.value.change,()=>this.setValue()),this.connect(this.model.properties.max.change,()=>this.setMax())}render(){super.render();const e=Object.assign(Object.assign({},this.model.style),{display:\"inline-block\"});this.progressEl=document.createElement(\"progress\"),this.setValue(),this.setMax(),r.set_size(this.progressEl,this.model),this.setCSS();for(const s in e)this.progressEl.style.setProperty(s,e[s]);this.el.appendChild(this.progressEl)}setCSS(){let e=this.model.css_classes.join(\" \")+\" \"+this.model.bar_color;this.model.active&&(e+=\" active\"),this.progressEl.className=e}setValue(){null!=this.model.value&&(this.progressEl.value=this.model.value)}setMax(){null!=this.model.max&&(this.progressEl.max=this.model.max)}_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new r.CachedVariadicBox(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}}t.ProgressView=l,l.__name__=\"ProgressView\";class h extends o.HTMLBox{constructor(e){super(e)}static init_Progress(){this.prototype.default_view=l,this.define({active:[i.Boolean,!0],bar_color:[i.String,\"primary\"],style:[i.Any,{}],max:[i.Number,100],value:[i.Number,null]})}}t.Progress=h,h.__name__=\"Progress\",h.__module__=\"panel.models.widgets\",h.init_Progress()},\n",
" \"38b2bc9574\": function _(e,t,s){Object.defineProperty(s,\"__esModule\",{value:!0});const i=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),a=e(\"@bokehjs/core/view\"),o=e(\"@bokehjs/core/util/array\"),c=e(\"@bokehjs/model\"),n=e(\"@bokehjs/protocol/receiver\");class r extends a.View{renderTo(){}}s.StateView=r,r.__name__=\"StateView\";class _ extends c.Model{constructor(e){super(e),this._receiver=new n.Receiver,this._cache={}}apply_state(e){this._receiver.consume(e.header),this._receiver.consume(e.metadata),this._receiver.consume(e.content),this._receiver.message&&this.document&&this.document.apply_json_patch(this._receiver.message.content)}_receive_json(e,t){const s=JSON.parse(e);this._cache[t]=s;let i=this.state;for(const e of this.values)i=i[e];i===t?this.apply_state(s):this._cache[i]&&this.apply_state(this._cache[i])}set_state(e,t){let s=o.copy(this.values);s[this.widgets[e.id]]=t;let i=this.state;for(const e of s)i=i[e];var a,c,n;this.values=s,this.json?this._cache[i]?this.apply_state(this._cache[i]):(a=i,c=e=>this._receive_json(e,i),(n=new XMLHttpRequest).overrideMimeType(\"application/json\"),n.open(\"GET\",a,!0),n.onreadystatechange=function(){4==n.readyState&&200==n.status&&c(n.responseText)},n.send(null)):this.apply_state(i)}static init_State(){this.prototype.default_view=r,this.define({json:[i.Boolean,!1],state:[i.Any,{}],widgets:[i.Any,{}],values:[i.Any,[]]})}}s.State=_,_.__name__=\"State\",_.__module__=\"panel.models.state\",_.init_State()},\n",
" \"90d1f929bd\": function _(t,e,s){Object.defineProperty(s,\"__esModule\",{value:!0});const o=t(\"tslib\").__importStar(t(\"@bokehjs/core/properties\")),a=t(\"@bokehjs/core/util/types\"),n=t(\"@bokehjs/models/layouts/html_box\");class c extends n.HTMLBoxView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,this._plot),this.connect(this.model.properties.data_sources.change,()=>this._connect_sources()),this._connected=[],this._connect_sources()}_connect_sources(){for(const t in this.model.data_sources){const e=this.model.data_sources[t];this._connected.indexOf(t)<0&&(this.connect(e.properties.data.change,this._plot),this._connected.push(t))}}_fetch_datasets(){const t={};for(const e in this.model.data_sources){const s=this.model.data_sources[e],o=[],a=s.columns();for(let t=0;t<s.data[a[0]].length;t++){const e={};for(const o of a)e[o]=s.data[o][t];o.push(e)}t[e]=o}return t}render(){super.render(),this._plot()}_plot(){const t=this.model.data;if(null!=t&&window.vegaEmbed){if(this.model.data_sources&&Object.keys(this.model.data_sources).length>0){const e=this._fetch_datasets();if(\"data\"in e&&(t.data.values=e.data,delete e.data),null!=t.data){const s=a.isArray(t.data)?t.data:[t.data];for(const t of s)t.name in e&&(t.values=e[t.name],delete e[t.name])}this.model.data.datasets=e}window.vegaEmbed(this.el,this.model.data,{actions:!1})}}}s.VegaPlotView=c,c.__name__=\"VegaPlotView\";class d extends n.HTMLBox{constructor(t){super(t)}static init_VegaPlot(){this.prototype.default_view=c,this.define({data:[o.Any],data_sources:[o.Any]})}}s.VegaPlot=d,d.__name__=\"VegaPlot\",d.__module__=\"panel.models.vega\",d.init_VegaPlot()},\n",
" \"b0c3e9e9c2\": function _(e,i,t){Object.defineProperty(t,\"__esModule\",{value:!0});const o=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),s=e(\"@bokehjs/models/layouts/html_box\"),l=e(\"ba20932521\");class d extends l.PanelHTMLBoxView{initialize(){super.initialize(),this._blocked=!1,this._setting=!1,this._time=Date.now()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.loop.change,()=>this.set_loop()),this.connect(this.model.properties.paused.change,()=>this.set_paused()),this.connect(this.model.properties.time.change,()=>this.set_time()),this.connect(this.model.properties.value.change,()=>this.set_value()),this.connect(this.model.properties.volume.change,()=>this.set_volume())}render(){super.render(),this.videoEl=document.createElement(\"video\"),this.model.sizing_mode&&\"fixed\"!==this.model.sizing_mode||(this.model.height&&(this.videoEl.height=this.model.height),this.model.width&&(this.videoEl.width=this.model.width)),this.videoEl.style.objectFit=\"fill\",this.videoEl.style.minWidth=\"100%\",this.videoEl.style.minHeight=\"100%\",this.videoEl.controls=!0,this.videoEl.src=this.model.value,this.videoEl.currentTime=this.model.time,this.videoEl.loop=this.model.loop,null!=this.model.volume?this.videoEl.volume=this.model.volume/100:this.model.volume=100*this.videoEl.volume,this.videoEl.onpause=()=>this.model.paused=!0,this.videoEl.onplay=()=>this.model.paused=!1,this.videoEl.ontimeupdate=()=>this.update_time(this),this.videoEl.onvolumechange=()=>this.update_volume(this),this.el.appendChild(this.videoEl),this.model.paused||this.videoEl.play()}update_time(e){e._setting?e._setting=!1:Date.now()-e._time<e.model.throttle||(e._blocked=!0,e.model.time=e.videoEl.currentTime,e._time=Date.now())}update_volume(e){e._setting?e._setting=!1:(e._blocked=!0,e.model.volume=100*e.videoEl.volume)}set_loop(){this.videoEl.loop=this.model.loop}set_paused(){!this.videoEl.paused&&this.model.paused&&this.videoEl.pause(),this.videoEl.paused&&!this.model.paused&&this.videoEl.play()}set_volume(){this._blocked?this._blocked=!1:(this._setting=!0,null!=this.model.volume&&(this.videoEl.volume=this.model.volume/100))}set_time(){this._blocked?this._blocked=!1:(this._setting=!0,this.videoEl.currentTime=this.model.time)}set_value(){this.videoEl.src=this.model.value}}t.VideoView=d,d.__name__=\"VideoView\";class h extends s.HTMLBox{constructor(e){super(e)}static init_Video(){this.prototype.default_view=d,this.define({loop:[o.Boolean,!1],paused:[o.Boolean,!0],time:[o.Number,0],throttle:[o.Number,250],value:[o.Any,\"\"],volume:[o.Number,null]})}}t.Video=h,h.__name__=\"Video\",h.__module__=\"panel.models.widgets\",h.init_Video()},\n",
" \"3c7145a2fa\": function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const s=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),o=e(\"@bokehjs/models/layouts/html_box\"),h=e(\"ba20932521\");class a extends h.PanelHTMLBoxView{constructor(){super(...arguments),this.constraints={audio:!1,video:!0}}initialize(){super.initialize(),null!==this.model.timeout&&this.set_timeout()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.timeout.change,()=>this.set_timeout()),this.connect(this.model.properties.snapshot.change,()=>this.snapshot()),this.connect(this.model.properties.paused.change,()=>this.pause())}pause(){this.model.paused&&(null!=this.timer&&(clearInterval(this.timer),this.timer=null),this.videoEl.pause()),this.set_timeout()}set_timeout(){this.timer&&(clearInterval(this.timer),this.timer=null),this.model.timeout>0&&(this.timer=setInterval(()=>this.snapshot(),this.model.timeout))}snapshot(){this.canvasEl.width=this.videoEl.videoWidth,this.canvasEl.height=this.videoEl.videoHeight;const e=this.canvasEl.getContext(\"2d\");e&&e.drawImage(this.videoEl,0,0,this.canvasEl.width,this.canvasEl.height),this.model.value=this.canvasEl.toDataURL(\"image/\"+this.model.format,.95)}remove(){super.remove(),this.timer&&(clearInterval(this.timer),this.timer=null)}render(){super.render(),this.videoEl||(this.videoEl=document.createElement(\"video\"),this.model.sizing_mode&&\"fixed\"!==this.model.sizing_mode||(this.model.height&&(this.videoEl.height=this.model.height),this.model.width&&(this.videoEl.width=this.model.width)),this.videoEl.style.objectFit=\"fill\",this.videoEl.style.minWidth=\"100%\",this.videoEl.style.minHeight=\"100%\",this.canvasEl=document.createElement(\"canvas\"),this.el.appendChild(this.videoEl),navigator.mediaDevices.getUserMedia&&navigator.mediaDevices.getUserMedia(this.constraints).then(e=>{this.videoEl.srcObject=e,this.model.paused||this.videoEl.play()}).catch(console.error))}}i.VideoStreamView=a,a.__name__=\"VideoStreamView\";class l extends o.HTMLBox{constructor(e){super(e)}static init_VideoStream(){this.prototype.default_view=a,this.define({format:[s.String,\"png\"],paused:[s.Boolean,!1],snapshot:[s.Boolean,!1],timeout:[s.Number,0],value:[s.Any]}),this.override({height:240,width:320})}}i.VideoStream=l,l.__name__=\"VideoStream\",l.__module__=\"panel.models.widgets\",l.init_VideoStream()},\n",
" \"ecfbb965eb\": function _(e,o,l){Object.defineProperty(l,\"__esModule\",{value:!0});var V=e(\"5b5e56e89a\");l.VTKPlot=V.VTKPlot;var t=e(\"729dd26c71\");l.VTKVolumePlot=t.VTKVolumePlot;var K=e(\"e23461e5d7\");l.VTKAxes=K.VTKAxes},\n",
" \"5b5e56e89a\": function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const s=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),i=e(\"@bokehjs/core/dom\"),a=e(\"c704c63c0a\"),o=e(\"ba07c3d566\");class r extends a.AbstractVTKView{constructor(){super(...arguments),this._axes_initialized=!1}connect_signals(){super.connect_signals(),this.connect(this.model.properties.axes.change,()=>{this._delete_axes(),this.model.axes&&this._set_axes(),this._vtk_renwin.getRenderWindow().render()}),this.el.addEventListener(\"mouseenter\",()=>{const e=this._vtk_renwin.getInteractor();this.model.enable_keybindings&&(document.querySelector(\"body\").addEventListener(\"keypress\",e.handleKeyPress),document.querySelector(\"body\").addEventListener(\"keydown\",e.handleKeyDown),document.querySelector(\"body\").addEventListener(\"keyup\",e.handleKeyUp))}),this.el.addEventListener(\"mouseleave\",()=>{const e=this._vtk_renwin.getInteractor();document.querySelector(\"body\").removeEventListener(\"keypress\",e.handleKeyPress),document.querySelector(\"body\").removeEventListener(\"keydown\",e.handleKeyDown),document.querySelector(\"body\").removeEventListener(\"keyup\",e.handleKeyUp)})}render(){super.render(),this._axes=null,this._axes_initialized=!1,this._plot()}after_layout(){this._axes_initialized||(this._render_axes_canvas(),this._axes_initialized=!0)}_render_axes_canvas(){const e=this._vtk_container.getElementsByTagName(\"canvas\");if(1!=e.length)throw Error(\"Error at initialization of the 3D scene, container should have one and only one canvas\");e[0].classList.add(\"scene3d-canvas\");const t=i.canvas({style:{position:\"absolute\",top:\"0\",left:\"0\",width:\"100%\",height:\"100%\"}});t.classList.add(\"axes-canvas\"),this._vtk_container.appendChild(t),this._vtk_renwin.setResizeCallback(()=>{const e=this._vtk_container.getBoundingClientRect(),n=Math.floor(e.width*window.devicePixelRatio),s=Math.floor(e.height*window.devicePixelRatio);t.setAttribute(\"width\",n.toFixed()),t.setAttribute(\"height\",s.toFixed())})}_delete_axes(){if(null==this._axes)return;Object.keys(this._axes).forEach(e=>this._vtk_renwin.getRenderer().removeActor(this._axes[e]));const e=this._vtk_renwin.getContainer().getElementsByClassName(\"axes-canvas\")[0],t=e.getContext(\"2d\");t&&t.clearRect(0,0,e.clientWidth*window.devicePixelRatio,e.clientHeight*window.devicePixelRatio),this._axes=null}_set_axes(){if(this.model.axes){const e=this._vtk_renwin.getContainer().getElementsByClassName(\"axes-canvas\")[0],{psActor:t,axesActor:n,gridActor:s}=this.model.axes.create_axes(e);this._axes={psActor:t,axesActor:n,gridActor:s},this._vtk_renwin.getRenderer().addActor(t),this._vtk_renwin.getRenderer().addActor(n),this._vtk_renwin.getRenderer().addActor(s)}}_plot(){if(!this.model.data)return void this._vtk_renwin.getRenderWindow().render();const e=o.vtkns.DataAccessHelper.get(\"zip\",{zipContent:atob(this.model.data),callback:t=>{const n=o.vtkns.HttpSceneLoader.newInstance({renderer:this._vtk_renwin.getRenderer(),dataAccessHelper:e}),s=o.vtk.macro.debounce(()=>{null==this._axes&&this.model.axes&&this._set_axes(),this.model.properties.camera.change.emit()},100);n.setUrl(\"index.json\"),n.onReady(s)}})}}n.VTKPlotView=r,r.__name__=\"VTKPlotView\";class d extends a.AbstractVTKPlot{constructor(e){super(e),this.outline=o.vtkns.OutlineFilter.newInstance();const t=o.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=o.vtkns.Actor.newInstance(),this.outline_actor.setMapper(t)}static init_VTKPlot(){this.prototype.default_view=r,this.define({data:[s.String],axes:[s.Instance],enable_keybindings:[s.Boolean,!1]})}}n.VTKPlot=d,d.__name__=\"VTKPlot\",d.init_VTKPlot()},\n",
" \"c704c63c0a\": function _(e,t,i){Object.defineProperty(i,\"__esModule\",{value:!0});const n=e(\"tslib\").__importStar(e(\"@bokehjs/core/properties\")),r=e(\"@bokehjs/core/dom\"),s=e(\"@bokehjs/core/util/object\"),a=e(\"@bokehjs/models/layouts/html_box\"),o=e(\"ba20932521\"),_=e(\"ba07c3d566\");class d extends o.PanelHTMLBoxView{constructor(){super(...arguments),this._setting_camera=!1}connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,()=>{this.invalidate_render()}),this.connect(this.model.properties.orientation_widget.change,()=>{this._orientation_widget_visibility(this.model.orientation_widget)}),this.connect(this.model.properties.camera.change,()=>this._set_camera_state())}_orientation_widget_visibility(e){this._orientationWidget.setEnabled(e),e?this._widgetManager.enablePicking():this._widgetManager.disablePicking(),this._orientationWidget.updateMarkerOrientation(),this._vtk_renwin.getRenderWindow().render()}_create_orientation_widget(){const e=_.vtkns.AxesActor.newInstance(),t=_.vtkns.OrientationMarkerWidget.newInstance({actor:e,interactor:this._vtk_renwin.getInteractor()});t.setEnabled(!0),t.setViewportCorner(_.vtkns.OrientationMarkerWidget.Corners.BOTTOM_RIGHT),t.setViewportSize(.15),t.setMinPixelSize(100),t.setMaxPixelSize(300),this._orientationWidget=t;const i=_.vtkns.WidgetManager.newInstance();i.setRenderer(t.getRenderer());const n=_.vtkns.InteractiveOrientationWidget.newInstance();n.placeWidget(e.getBounds()),n.setBounds(e.getBounds()),n.setPlaceFactor(1);const r=i.addWidget(n);this._widgetManager=i,r.onOrientationChange(({direction:e})=>{const t=this._vtk_renwin.getRenderer().getActiveCamera(),i=t.getFocalPoint(),n=t.getPosition(),r=t.getViewUp(),s=Math.sqrt(Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2)+Math.pow(n[2]-i[2],2));t.setPosition(i[0]+e[0]*s,i[1]+e[1]*s,i[2]+e[2]*s),e[0]&&t.setViewUp(_.majorAxis(r,1,2)),e[1]&&t.setViewUp(_.majorAxis(r,0,2)),e[2]&&t.setViewUp(_.majorAxis(r,0,1)),this._orientationWidget.updateMarkerOrientation(),this._vtk_renwin.getRenderer().resetCameraClippingRange(),this._vtk_renwin.getRenderWindow().render()}),this._orientation_widget_visibility(this.model.orientation_widget)}_get_camera_state(){if(!this._setting_camera){this._setting_camera=!0;const e=s.clone(this._vtk_renwin.getRenderer().getActiveCamera().get());delete e.classHierarchy,delete e.vtkObject,delete e.vtkCamera,delete e.viewPlaneNormal,this.model.camera=e,this._setting_camera=!1}}_set_camera_state(){if(!this._setting_camera){this._setting_camera=!0;try{this.model.camera&&this._vtk_renwin.getRenderer().getActiveCamera().set(this.model.camera)}finally{this._setting_camera=!1}this._orientationWidget.updateMarkerOrientation(),this._vtk_renwin.getRenderer().resetCameraClippingRange(),this._vtk_renwin.getRenderWindow().render()}}render(){super.render(),this._orientationWidget=null,this._vtk_container=r.div(),o.set_size(this._vtk_container,this.model),this.el.appendChild(this._vtk_container),this._vtk_renwin=_.vtkns.FullScreenRenderWindow.newInstance({rootContainer:this.el,container:this._vtk_container}),this._remove_default_key_binding(),this._create_orientation_widget(),this._vtk_renwin.getRenderer().getActiveCamera().onModified(()=>this._get_camera_state()),this._set_camera_state(),this.model.renderer_el=this._vtk_renwin}after_layout(){super.after_layout(),this._vtk_renwin.resize()}_remove_default_key_binding(){const e=this._vtk_renwin.getInteractor();document.querySelector(\"body\").removeEventListener(\"keypress\",e.handleKeyPress),document.querySelector(\"body\").removeEventListener(\"keydown\",e.handleKeyDown),document.querySelector(\"body\").removeEventListener(\"keyup\",e.handleKeyUp)}}i.AbstractVTKView=d,d.__name__=\"AbstractVTKView\";class c extends a.HTMLBox{constructor(e){super(e)}getActors(){return this.renderer_el.getRenderer().getActors()}static init_AbstractVTKPlot(){this.define({orientation_widget:[n.Boolean,!1],camera:[n.Instance]}),this.override({height:300,width:300})}}i.AbstractVTKPlot=c,c.__name__=\"AbstractVTKPlot\",c.__module__=\"panel.models.vtk
" \"ba07c3d566\": function _(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0});const r=e(\"@bokehjs/core/util/serialization\"),a=e(\"@bokehjs/core/util/array\");function o(e){const t=Math.min(Math.max(Math.round(e),0),255).toString(16);return 2==t.length?t:\"0\"+t}function i(e,t,n){return\"#\"+o(e)+o(t)+o(n)}function s(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,a=e.length;r<a;r++)n[r]=e.charCodeAt(r);return t}n.vtk=window.vtk,n.vtkns={},n.vtk&&(n.vtkns.DataArray=n.vtk.Common.Core.vtkDataArray,n.vtkns.ImageData=n.vtk.Common.DataModel.vtkImageData,n.vtkns.OutlineFilter=n.vtk.Filters.General.vtkOutlineFilter,n.vtkns.CubeSource=n.vtk.Filters.Sources.vtkCubeSource,n.vtkns.LineSource=n.vtk.Filters.Sources.vtkLineSource,n.vtkns.PlaneSource=n.vtk.Filters.Sources.vtkPlaneSource,n.vtkns.PointSource=n.vtk.Filters.Sources.vtkPointSource,n.vtkns.OrientationMarkerWidget=n.vtk.Interaction.Widgets.vtkOrientationMarkerWidget,n.vtkns.DataAccessHelper=n.vtk.IO.Core.DataAccessHelper,n.vtkns.HttpSceneLoader=n.vtk.IO.Core.vtkHttpSceneLoader,n.vtkns.ImageSlice=n.vtk.Rendering.Core.vtkImageSlice,n.vtkns.Actor=n.vtk.Rendering.Core.vtkActor,n.vtkns.AxesActor=n.vtk.Rendering.Core.vtkAxesActor,n.vtkns.Mapper=n.vtk.Rendering.Core.vtkMapper,n.vtkns.ImageMapper=n.vtk.Rendering.Core.vtkImageMapper,n.vtkns.SphereMapper=n.vtk.Rendering.Core.vtkSphereMapper,n.vtkns.WidgetManager=n.vtk.Widgets.Core.vtkWidgetManager,n.vtkns.InteractiveOrientationWidget=n.vtk.Widgets.Widgets3D.vtkInteractiveOrientationWidget,n.vtkns.PixelSpaceCallbackMapper=n.vtk.Rendering.Core.vtkPixelSpaceCallbackMapper,n.vtkns.FullScreenRenderWindow=n.vtk.Rendering.Misc.vtkFullScreenRenderWindow,n.vtkns.VolumeController=n.vtk.Interaction.UI.vtkVolumeController,n.vtkns.Volume=n.vtk.Rendering.Core.vtkVolume,n.vtkns.VolumeMapper=n.vtk.Rendering.Core.vtkVolumeMapper,n.vtkns.ColorTransferFunction=n.vtk.Rendering.Core.vtkColorTransferFunction,n.vtkns.PiecewiseFunction=n.vtk.Common.DataModel.vtkPiecewiseFunction,n.vtkns.BoundingBox=n.vtk.Common.DataModel.vtkBoundingBox),n.hexToRGB=function(e){return[parseInt(e.slice(1,3),16)/255,parseInt(e.slice(3,5),16)/255,parseInt(e.slice(5,7),16)/255]},n.rgbToHex=i,n.vtkLutToMapper=function(e){const{scale:t,nodes:r}=e.get(\"scale\",\"nodes\");if(t!==n.vtkns.ColorTransferFunction.Scale.LINEAR)throw\"Error transfer function scale not handle\";const o=r.map(e=>e.x),s=Math.min(...o),k=Math.max(...o),v=a.linspace(s,k,255),c=[0,0,0];return{low:s,high:k,palette:v.map(t=>(e.getColor(t,c),i(255*c[0],255*c[1],255*c[2])))}},n.data2VTKImageData=function(e){const t=n.vtkns.ImageData.newInstance({spacing:e.spacing});t.setDimensions(e.dims),t.setOrigin(null!=e.origin?e.origin:e.dims.map(e=>e/2));const a=n.vtkns.DataArray.newInstance({name:\"scalars\",numberOfComponents:1,values:new r.ARRAY_TYPES[e.dtype](s(atob(e.buffer)))});return t.getPointData().setScalars(a),t},n.majorAxis=function(e,t,n){const r=[0,0,0],a=Math.abs(e[t])>Math.abs(e[n])?t:n,o=e[a]>0?1:-1;return r[a]=o,r},n.cartesian_product=function(...e){return e.reduce((e,t)=>e.flatMap(e=>t.map(t=>[].concat(e,t))))}},\n",
" var docs_json = {\"35b628d6-d2a9-412e-bc75-8d2563f29817\":{\"roots\":{\"references\":[{\"attributes\":{\"axis_label\":\"y\",\"bounds\":\"auto\",\"formatter\":{\"id\":\"1033\"},\"major_label_orientation\":\"horizontal\",\"ticker\":{\"id\":\"1022\"},\"visible\":false},\"id\":\"1021\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"1036\"},\"glyph\":{\"id\":\"1045\"},\"hover_glyph\":{\"id\":\"1047\"},\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1046\"},\"selection_glyph\":null,\"view\":{\"id\":\"1049\"}},\"id\":\"1048\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1015\",\"type\":\"LinearScale\"},{\"attributes\":{\"text\":{\"field\":\"Stage\"},\"text_align\":\"center\",\"text_baseline\":\"middle\",\"text_color\":{\"value\":\"black\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\",\"transform\":{\"id\":\"1062\"}}},\"id\":\"1066\",\"type\":\"Text\"},{\"attributes\":{\"data_source\":{\"id\":\"1070\"},\"glyph\":{\"id\":\"1073\"},\"hover_glyph\":{\"id\":\"1076\"},\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1074\"},\"selection_glyph\":{\"id\":\"1075\"},\"view\":{\"id\":\"1078\"}},\"id\":\"1077\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data_source\":{\"id\":\"1063\"},\"glyph\":{\"id\":\"1066\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1067\"},\"selection_glyph\":null,\"view\":{\"id\":\"1069\"}},\"id\":\"1068\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1006\"},{\"id\":\"1007\"},{\"id\":\"1025\"}]},\"id\":\"1026\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1033\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"NodesAndLinkedEdges\"},{\"attributes\":{\"children\":[{\"id\":\"1003\"},{\"id\":\"1008\"},{\"id\":\"1197\"},{\"id\":\"1198\"}],\"margin\":[0,0,0,0],\"name\":\"Row02590\"},\"id\":\"1002\",\"type\":\"Row\"},{\"attributes\":{\"callback\":null,\"renderers\":[{\"id\":\"1050\"}],\"tags\":[\"hv_created\"],\"tooltips\":[[\"Stage\",\"@{index_hover}\"],[\"State\",\"@{State}\"]]},\"id\":\"1006\",\"type\":\"HoverTool\"},{\"attributes\":{\"callback\":null,\"renderers\":[{\"id\":\"1077\"}]},\"id\":\"1025\",\"type\":\"TapTool\"},{\"attributes\":{\"data_source\":{\"id\":\"1035\"},\"glyph\":{\"id\":\"1038\"},\"hover_glyph\":{\"id\":\"1041\"},\"muted_glyph\":{\"id\":\"1042\"},\"nonselection_glyph\":{\"id\":\"1039\"},\"selection_glyph\":{\"id\":\"1040\"},\"view\":{\"id\":\"1044\"}},\"id\":\"1043\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"field\":\"node_color\",\"transform\":{\"id\":\"1034\"}},\"size\":{\"units\":\"screen\",\"value\":15}},\"id\":\"1038\",\"type\":\"Circle\"},{\"attributes\":{\"css_classes\":[\"markdown\"],\"margin\":[0,0,0,5],\"name\":\"Markdown00124\",\"text\":\"<h2>Stage: Welcome</h2>\"},\"id\":\"1003\",\"type\":\"panel.models.markup.HTML\"},{\"attributes\":{\"range\":null,\"value\":-0.3},\"id\":\"1062\",\"type\":\"Dodge\"},{\"attributes\":{\"line_width\":{\"value\":2}},\"id\":\"1045\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1085\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1064\",\"type\":\"Selection\"},{\"attributes\":{\"align\":null,\"below\":[{\"id\":\"1017\"}],\"center\":[{\"id\":\"1020\"},{\"id\":\"1024\"}],\"left\":[{\"id\":\"1021\"}],\"margin\":null,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"min_border_top\":10,\"min_width\":400,\"outline_line_alpha\":0,\"plot_height\":80,\"plot_width\":null,\"renderers\":[{\"id\":\"1050\"},{\"id\":\"1068\"},{\"id\":\"1077\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"1009\"},\"toolbar\":{\"id\":\"1026\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1004\"},\"x_scale\":{\"id\":\"1013\"},\"y_range\":{\"id\":\"1005\"},\"y_scale\":{\"id\":\"1015\"}},\"id\":\"1008\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"margin\":[0,0,0,0],\"tabs\":[{\"id\":\"1204\"},{\"id\":\"1206\"}]},\"id\":\"1
" var render_items = [{\"docid\":\"35b628d6-d2a9-412e-bc75-8d2563f29817\",\"root_ids\":[\"1001\"],\"roots\":{\"1001\":\"1217a79c-8761-4a5b-815b-e8af624bacee\"}}];\n",