@holoviz/panel 1.8.6 → 1.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/panel.min.js CHANGED
@@ -43,7 +43,7 @@
43
43
  })
44
44
  ({
45
45
  "4e90918c0a": function _(e,s,t,b,o){b();const i=e("tslib").__importStar(e("2fe1822b2b"));t.Panel=i;(0,e("@bokehjs/base").register_models)(i)},
46
- "2fe1822b2b": function _(e,t,a,o,c){o(),a.VizzuChart=a.VideoStream=a.Video=a.VegaPlot=a.TrendIndicator=a.TooltipIcon=a.ToggleIcon=void 0;const d=e("tslib");c("AcePlot",e("78ccb7a2c5").AcePlot),c("AnyWidgetComponent",e("1f663ffe94").AnyWidgetComponent),c("Audio",e("fd59c985b3").Audio),c("BrowserInfo",e("5a16cc23e6").BrowserInfo),c("Button",e("1db93211cd").Button),c("ButtonIcon",e("1738ddeb3a").ButtonIcon),c("ClickableIcon",e("6c7fbea0ef").ClickableIcon),c("Card",e("25fcfb521e").Card),c("CheckboxButtonGroup",e("51fbe9e2d0").CheckboxButtonGroup),c("ChatAreaInput",e("27a077673d").ChatAreaInput),c("Column",e("b273e5b2fb").Column),c("CommManager",e("1bec1b1fcc").CommManager),c("CustomSelect",e("92bbd30bd1").CustomSelect),c("CustomMultiSelect",e("27b5580835").CustomMultiSelect),c("DataTabulator",e("8cfbb15960").DataTabulator),c("DatetimePicker",e("100965d6f3").DatetimePicker),c("DatetimeSlider",e("c97cc0eade").DatetimeSlider),c("DeckGLPlot",e("01df2ec63b").DeckGLPlot),c("DiscretePlayer",e("0dca2cd4f6").DiscretePlayer),c("ECharts",e("1da56f3c52").ECharts),c("Feed",e("f9c84aaf3d").Feed),c("FileDownload",e("84a13dddfb").FileDownload),c("FileDropper",e("8531319d94").FileDropper),c("HTML",e("4c04683fdc").HTML),c("IPyWidget",e("8a8089cbf3").IPyWidget),c("JSON",e("245cd3cfde").JSON),c("JSONEditor",e("a123a88e31").JSONEditor),c("KaTeX",e("f672d71a9f").KaTeX),c("Location",e("bd8e0fe48b").Location),c("MathJax",e("d889a68424").MathJax),c("Modal",e("8c62aa80d9").Modal),c("PDF",e("f87ad1873c").PDF),c("Perspective",e("29a0b0da9a").Perspective),c("Player",e("96e805ccb5").Player),c("PlotlyPlot",e("7d9124b744").PlotlyPlot),c("Progress",e("b1f4d68596").Progress),c("QuillInput",e("f6d86c7342").QuillInput),c("RadioButtonGroup",e("25e2d7c208").RadioButtonGroup),c("ReactComponent",e("d42fdf93ec").ReactComponent),c("ReactiveHTML",e("d5752cda5a").ReactiveHTML),c("ReactiveESM",e("d92390e7cb").ReactiveESM),c("SingleSelect",e("4155401209").SingleSelect),c("SpeechToText",e("5ac2cab0ab").SpeechToText),c("State",e("92822cb73a").State),c("Tabs",e("fffb4344f7").Tabs),c("Terminal",e("a961b5ae5e").Terminal),c("TextAreaInput",e("b7d595d74a").TextAreaInput),c("TextInput",e("8be416b160").TextInput),c("TextToSpeech",e("a04eb51988").TextToSpeech),c("TimePicker",e("1afcab4e45").TimePicker),c("ToggleIcon",e("ad985f285e").ToggleIcon),c("TooltipIcon",e("ae3a172647").TooltipIcon),c("TrendIndicator",e("29d55a28a9").TrendIndicator),c("VegaPlot",e("119dc23765").VegaPlot),c("Video",e("79dc37b888").Video),c("VideoStream",e("f8afc4e661").VideoStream),c("VizzuChart",e("1f7bc1f95b").VizzuChart),d.__exportStar(e("c51f25e2a7"),a)},
46
+ "2fe1822b2b": function _(e,t,a,o,c){o(),a.VizzuChart=a.VideoStream=a.Video=a.VegaPlot=a.TrendIndicator=a.TooltipIcon=a.ToggleIcon=void 0;const d=e("tslib");c("AcePlot",e("78ccb7a2c5").AcePlot),c("AnyWidgetComponent",e("1f663ffe94").AnyWidgetComponent),c("Audio",e("fd59c985b3").Audio),c("BrowserInfo",e("5a16cc23e6").BrowserInfo),c("Button",e("1db93211cd").Button),c("ButtonIcon",e("1738ddeb3a").ButtonIcon),c("ClickableIcon",e("6c7fbea0ef").ClickableIcon),c("Card",e("25fcfb521e").Card),c("CheckboxButtonGroup",e("51fbe9e2d0").CheckboxButtonGroup),c("ChatAreaInput",e("27a077673d").ChatAreaInput),c("Column",e("b273e5b2fb").Column),c("CommManager",e("1bec1b1fcc").CommManager),c("CustomSelect",e("92bbd30bd1").CustomSelect),c("CustomMultiSelect",e("27b5580835").CustomMultiSelect),c("DataTabulator",e("5bee7c9df6").DataTabulator),c("DatetimePicker",e("100965d6f3").DatetimePicker),c("DatetimeSlider",e("c97cc0eade").DatetimeSlider),c("DeckGLPlot",e("01df2ec63b").DeckGLPlot),c("DiscretePlayer",e("0dca2cd4f6").DiscretePlayer),c("ECharts",e("1da56f3c52").ECharts),c("Feed",e("f9c84aaf3d").Feed),c("FileDownload",e("84a13dddfb").FileDownload),c("FileDropper",e("8531319d94").FileDropper),c("HTML",e("4c04683fdc").HTML),c("IPyWidget",e("8a8089cbf3").IPyWidget),c("JSON",e("245cd3cfde").JSON),c("JSONEditor",e("a123a88e31").JSONEditor),c("KaTeX",e("f672d71a9f").KaTeX),c("Location",e("bd8e0fe48b").Location),c("MathJax",e("d889a68424").MathJax),c("Modal",e("8c62aa80d9").Modal),c("PDF",e("f87ad1873c").PDF),c("Perspective",e("29a0b0da9a").Perspective),c("Player",e("96e805ccb5").Player),c("PlotlyPlot",e("7d9124b744").PlotlyPlot),c("Progress",e("b1f4d68596").Progress),c("QuillInput",e("f6d86c7342").QuillInput),c("RadioButtonGroup",e("25e2d7c208").RadioButtonGroup),c("ReactComponent",e("d42fdf93ec").ReactComponent),c("ReactiveHTML",e("d5752cda5a").ReactiveHTML),c("ReactiveESM",e("d92390e7cb").ReactiveESM),c("SingleSelect",e("4155401209").SingleSelect),c("SpeechToText",e("5ac2cab0ab").SpeechToText),c("State",e("92822cb73a").State),c("Tabs",e("fffb4344f7").Tabs),c("Terminal",e("a961b5ae5e").Terminal),c("TextAreaInput",e("b7d595d74a").TextAreaInput),c("TextInput",e("8be416b160").TextInput),c("TextToSpeech",e("a04eb51988").TextToSpeech),c("TimePicker",e("1afcab4e45").TimePicker),c("ToggleIcon",e("ad985f285e").ToggleIcon),c("TooltipIcon",e("ae3a172647").TooltipIcon),c("TrendIndicator",e("29d55a28a9").TrendIndicator),c("VegaPlot",e("119dc23765").VegaPlot),c("Video",e("79dc37b888").Video),c("VideoStream",e("f8afc4e661").VideoStream),c("VizzuChart",e("1f7bc1f95b").VizzuChart),d.__exportStar(e("c51f25e2a7"),a)},
47
47
  "78ccb7a2c5": function _(e,t,i,o,s){var n;o();const d=e("@bokehjs/core/dom"),_=e("9b11ce01a3"),a=e("a3669a897a");class h extends _.HTMLBoxView{connect_signals(){super.connect_signals();const{code:e,theme:t,language:i,filename:o,print_margin:s,annotations:n,soft_tabs:d,indent:_,readonly:a}=this.model.properties;this.on_change(e,(()=>this._update_code_from_model())),this.on_change(t,(()=>this._update_theme())),this.on_change(i,(()=>this._update_language())),this.on_change(o,(()=>this._update_filename())),this.on_change(s,(()=>this._update_print_margin())),this.on_change(n,(()=>this._add_annotations())),this.on_change(_,(()=>this._editor.setOptions({tabSize:this.model.indent}))),this.on_change(d,(()=>this._editor.setOptions({useSoftTabs:this.model.soft_tabs}))),this.on_change(a,(()=>{this._editor.setReadOnly(this.model.readonly)}))}render(){super.render(),this._container=(0,d.div)({id:(0,a.ID)(),style:{width:"100%",height:"100%",zIndex:"0"}}),this.shadow_el.append(this._container),this._container.textContent=this.model.code,this._editor=ace.edit(this._container),this._editor.renderer.attachToShadowRoot(),this._langTools=ace.require("ace/ext/language_tools"),this._modelist=ace.require("ace/ext/modelist"),this._editor.setOptions({enableBasicAutocompletion:!0,tabSize:this.model.indent,useSoftTabs:this.model.soft_tabs,enableSnippets:!0,fontFamily:"monospace"}),this._update_theme(),this._update_filename(),this._update_language(),this._editor.setReadOnly(this.model.readonly),this._editor.setShowPrintMargin(this.model.print_margin),this.model.on_keyup?this._editor.on("change",(()=>this._update_code_from_editor())):(this._editor.on("blur",(()=>this._update_code_from_editor())),this._editor.commands.addCommand({name:"updateCodeFromEditor",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:()=>{this._update_code_from_editor()}})),this._editor.on("change",(()=>this._update_code_input_from_editor()))}_update_code_from_model(){if(this._editor&&this._editor.getValue()!=this.model.code){const e=this._editor.getCursorPosition(),t=this._editor.session.getScrollTop(),i=this._editor.session.getScrollLeft();this._editor.setValue(this.model.code,-1);const o=this._editor.session.getLength();if(e.row<o){const t=this._editor.session.getLine(e.row).length,i=Math.min(e.column,t);this._editor.moveCursorToPosition({row:e.row,column:i})}else this._editor.moveCursorToPosition({row:o-1,column:this._editor.session.getLine(o-1).length});this._editor.clearSelection(),this._editor.session.setScrollTop(t),this._editor.session.setScrollLeft(i)}}_update_print_margin(){this._editor.setShowPrintMargin(this.model.print_margin)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_code_input_from_editor(){this._editor.getValue()!=this.model.code_input&&(this.model.code_input=this._editor.getValue())}_update_theme(){this._editor&&this._editor.setTheme(`ace/theme/${this.model.theme}`)}_update_filename(){if(this.model.filename){const e=this._modelist.getModeForPath(this.model.filename).mode;this.model.language=e.slice(9)}}_update_language(){null!=this.model.language&&this._editor.session.setMode(`ace/mode/${this.model.language}`)}_add_annotations(){this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),void 0!==this._editor&&this._editor.resize()}}i.AcePlotView=h,h.__name__="AcePlotView";class r extends _.HTMLBox{constructor(e){super(e)}}i.AcePlot=r,n=r,r.__name__="AcePlot",r.__module__="panel.models.ace",n.prototype.default_view=h,n.define((({Any:e,Bool:t,Int:i,List:o,Str:s,Nullable:n})=>({annotations:[o(e),[]],code:[s,""],code_input:[s,""],filename:[n(s),null],indent:[i,4],language:[s,""],on_keyup:[t,!0],print_margin:[t,!1],theme:[s,"github_light_default"],readonly:[t,!1],soft_tabs:[t,!1]}))),n.override({height:300,width:300})},
48
48
  "9b11ce01a3": function _(e,t,i,s,h){s(),i.set_size=o;const n=e("@bokehjs/core/dom"),l=e("@bokehjs/core/util/types"),a=e("@bokehjs/core/util/assert"),r=e("@bokehjs/models/widgets/widget"),d=e("@bokehjs/models/layouts/layout_dom");class _ extends r.WidgetView{connect_signals(){super.connect_signals();const{width:e,height:t,min_height:i,max_height:s,margin:h,sizing_mode:n}=this.model.properties;this.on_change([e,t,i,s,h,n],(()=>{o(this.el,this.model),o(this.container,this.model,!1)}))}async lazy_initialize(){await super.lazy_initialize(),"not_started"!=this.provider.status&&"loading"!=this.provider.status||this.provider.ready.connect((()=>{this.contains_tex_string(this.model.text)&&this.render()}))}watch_stylesheets(){this._initialized_stylesheets=new Map;for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets.set(t.href,!1),t.addEventListener("load",(()=>{this._initialized_stylesheets.set(t.href,!0),[...this._initialized_stylesheets.values()].every((e=>e))&&requestAnimationFrame((()=>this.style_redraw()))})))}0==this._initialized_stylesheets.size&&this.style_redraw()}rerender_(e=null){(e=e??this).rerender?e.rerender():(e.render(),e.r_after_render())}style_redraw(){}has_math_disabled(){return this.model.disable_math||!this.contains_tex_string(this.model.text)}render(){super.render(),o(this.el,this.model),this.container=(0,n.div)(),o(this.container,this.model,!1),this.shadow_el.appendChild(this.container),"failed"!=this.provider.status&&"loaded"!=this.provider.status||(this._has_finished=!0)}}function o(e,t,i=!0){let s=null!=t.width?"fixed":"fit",h=null!=t.height?"fixed":"fit";const{sizing_mode:r,margin:d}=t;if(null!=r)if("fixed"==r)s=h="fixed";else if("stretch_both"==r)s=h="max";else if("stretch_width"==r)s="max";else if("stretch_height"==r)h="max";else switch(r){case"scale_width":s="max",h="min";break;case"scale_height":s="min",h="max";break;case"scale_both":s="max",h="max";break;default:(0,a.unreachable)()}let _,o;i?(0,l.isArray)(d)?4===d.length?(o=d[0]+d[2],_=d[1]+d[3]):(o=2*d[0],_=2*d[1]):null==d?o=_=0:_=o=2*d:o=_=0,"fixed"==s&&null!=t.width?e.style.width=(0,n.px)(t.width):"max"==s&&(e.style.width=0!=_?`calc(100% - ${(0,n.px)(_)})`:"100%"),null!=t.min_width&&(e.style.minWidth=(0,n.px)(t.min_width)),null!=t.max_width&&(e.style.maxWidth=(0,n.px)(t.max_width)),"fixed"==h&&null!=t.height?e.style.height=(0,n.px)(t.height):"max"==h&&(e.style.height=0!=o?`calc(100% - ${(0,n.px)(o)})`:"100%"),null!=t.min_height&&(e.style.minHeight=(0,n.px)(t.min_height)),null!=t.max_height&&(e.style.maxHeight=(0,n.px)(t.max_height))}i.PanelMarkupView=_,_.__name__="PanelMarkupView";class m extends d.LayoutDOMView{connect_signals(){super.connect_signals();const{width:e,height:t,min_height:i,max_height:s,margin:h,sizing_mode:n}=this.model.properties;this.on_change([e,t,i,s,h,n],(()=>{o(this.el,this.model)}))}render(){super.render(),o(this.el,this.model)}rerender_(e=null){(e=e??this).rerender?e.rerender():(e.render(),e.r_after_render())}watch_stylesheets(){this._initialized_stylesheets=new Map;for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets.set(t.href,!1),t.addEventListener("load",(()=>{this._initialized_stylesheets.set(t.href,!0),[...this._initialized_stylesheets.values()].every((e=>e))&&this.style_redraw()})))}0===Object.keys(this._initialized_stylesheets).length&&requestAnimationFrame((()=>this.style_redraw()))}style_redraw(){}get child_models(){return[]}}i.HTMLBoxView=m,m.__name__="HTMLBoxView";class c extends d.LayoutDOM{constructor(e){super(e)}}i.HTMLBox=c,c.__name__="HTMLBox"},
49
49
  "a3669a897a": function _(t,e,n,r,o){r(),n.throttle=function(t,e){let n=0,r=null;return function(...o){const c=this,s=Date.now();r&&clearTimeout(r),s-n>=e?(t.apply(c,o),n=Date.now()):r=setTimeout((function(){t.apply(c,o),n=Date.now(),r=null}),e-(s-n))}},n.deepCopy=function t(e){let n;if(null==e||"object"!=typeof e)return e;if(e instanceof Array){n=[];for(let 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.reshape=function(t,e){let n=0;if(!e||!t)return[];return function r(o){let s=[];if(o===e.length-1)s=(0,c.concat)(t.slice(n,n+e[o])),n+=e[o];else for(let t=0;t<e[o];t++)s.push(r(o+1));return s}(0)},n.loadScript=async function(t,e){const n=document.createElement("script");return n.type=t,n.src=e,n.defer=!0,document.head.appendChild(n),new Promise(((t,e)=>{n.onload=()=>{t()},n.onerror=()=>{e()}}))},n.ID=function(){return`_${Math.random().toString(36).substring(2,11)}`},n.convertUndefined=function t(e){if((0,s.isArray)(e))return e.map(t);(0,s.isPlainObject)(e)&&Object.entries(e).forEach((([n,r])=>{(0,s.isPlainObject)(r)||(0,s.isArray)(r)?t(r):void 0===r&&(e[n]=null)}));return e},n.formatError=function(t,e){let n=`<span class="msg">${t}</span>`;const r=n.match(/\((\d+):(\d+)\)/);if(!r)return n;const o=parseInt(r[1]),c=parseInt(r[2]),s=Math.max(0,o-5),i=o-s,u=e.replace(">","&lt;").replace("<","&gt;").split(/\r?\n/).slice(s,o+5);n+="<br><br>";for(let t=0;t<i;t++){n+=`<pre${t==i-1?' class="highlight"':""}>${u[t]}</pre>`}const l=" ".repeat(c-1);n+=`<pre class="highlight">${l}^</pre>`;for(let t=i;t<u.length;t++)n+=`<pre>${u[t]}</pre>`;return n},n.find_attributes=function(t,e,n){const r=RegExp(`\\b${e}\\.([a-zA-Z_][a-zA-Z0-9_]*)\\b`,"g"),o=[];let s,i;for(;null!==(s=r.exec(t))&&null!==(i=s[0].slice(e.length+1))&&!n.includes(i);)o.push(i);return(0,c.uniq)(o)},n.schedule_when=function(t,e,n=10){const r=()=>{e()?t():setTimeout(r,n)};r()},n.compileToFunction=l,n.transformJsPlaceholders=function(t,e){return function t(n){if("string"==typeof n){const t=n.match(i);return t?l(t[1],e):n}if(Array.isArray(n))return n.map(t);if(n&&"object"==typeof n&&Object.getPrototypeOf(n)===Object.prototype){const e={};for(const[r,o]of Object.entries(n))e[r]=t(o);return e}return n}(t)};const c=t("@bokehjs/core/util/array"),s=t("@bokehjs/core/util/types");n.get=(t,e,n=void 0)=>{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.MARK="--x_x--0_0--";const i=new RegExp(`^${n.MARK}([\\s\\S]*?)${n.MARK}$`),u={mode:"expression",args:[]};function l(t,e=u){const{mode:n,args:r}={...u,...e};return new Function(...r,"expression"===n?`"use strict";\nreturn (${t});`:`"use strict";\n${t}`)()}},
@@ -157,7 +157,7 @@ function(e){const t={};void 0!==e.detail&&Object.assign(t,{detail:JSON.parse(JSO
157
157
  "1bec1b1fcc": function _(e,t,s,n,o){var i;n();const c=e("@bokehjs/document"),_=e("@bokehjs/core/view"),h=e("@bokehjs/model"),l=e("@bokehjs/protocol/message"),r=e("@bokehjs/protocol/receiver"),a=e("@bokehjs/core/serialization/buffer"),d=e("@bokehjs/core/util/types"),m=e("@bokehjs/core/util/object");s.comm_settings={debounce:!0};class u extends _.View{}s.CommManagerView=u,u.__name__="CommManagerView";class f extends h.Model{constructor(e){super(e),this._document_listener=e=>this._document_changed(e)}initialize(){super.initialize(),this._receiver=new r.Receiver,this._event_buffer=[],this._blocked=!1,this._reconnect=!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=>{for(const t of this.ns.shared_views.get(this.plot_id))t!==this&&t.msg_handler(e);try{this.msg_handler(e)}catch(e){console.error(e)}})),this._client_comm=this.ns.comm_manager.get_client_comm(this.plot_id,this.client_comm_id,(e=>this.on_ack(e))),this._reconnect=!this._client_comm?.active||!1,null==this.ns.shared_views&&(this.ns.shared_views=new Map),this.ns.shared_views.has(this.plot_id)?this.ns.shared_views.get(this.plot_id).push(this):this.ns.shared_views.set(this.plot_id,[this])):console.warn("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 instanceof c.ModelChangedEvent&&!e.model.properties[e.attr].syncable||(this._event_buffer.push(e),this._reconnect&&this._client_comm?.connected?this.on_ack({metadata:{msg_type:"Ready"}}):s.comm_settings.debounce?(!this._blocked||Date.now()>this._timeout)&&(setTimeout((()=>this.process_events()),this.debounce),this._blocked=!0,this._timeout=Date.now()+this.timeout):this.process_events())}_extract_buffers(e,t){if((0,d.isArray)(e))for(const s of e)this._extract_buffers(s,t);else if(e instanceof Map)for(const s of e.keys()){const n=e.get(s);this._extract_buffers(n,t)}else{if(e instanceof a.Buffer){const{buffer:s}=e,n=t.length;return t.push(s),{id:n}}if((0,d.isPlainObject)(e))for(const s of(0,m.keys)(e)){const n=this._extract_buffers(e[s],t);null!=n&&(e[s]=n)}}}process_events(){if(null==this.document||null==this._client_comm)return;const e=this.document.create_json_patch(this._event_buffer);this._event_buffer=[];const t={...l.Message.create("PATCH-DOC",{},e)},s=[];this._extract_buffers(t.content,s),this._client_comm.send(t,{},s);for(const t of this.ns.shared_views.get(this.plot_id))t!==this&&null!=t.document&&t.document.apply_json_patch(e,[],this.id)}disconnect_signals(){super.disconnect_signals(),this.ns.shared_views.shared_views.delete(this.plot_id)}on_ack(e){const t=e.metadata;this._event_buffer.length>0?(this._blocked=!0,this._timeout=Date.now()+this.timeout,this.process_events()):this._blocked=!1,"Ready"==t.msg_type&&t.content?console.log("Python callback returned following output:",t.content):"Error"==t.msg_type&&console.warn("Python failed with the following traceback:",t.traceback)}msg_handler(e){const t=e.metadata,s=e.buffers,n=e.content.data,o=this.plot_id;if("Ready"==t.msg_type)t.content?console.log("Python callback returned following output:",t.content):"Error"==t.msg_type&&console.warn("Python failed with the following traceback:",t.traceback);else if(null!=o){let e=null;if(o in this.ns.plot_index&&null!=this.ns.plot_index[o]?e=this.ns.plot_index[o]:void 0!==window.Bokeh&&o in window.Bokeh.index&&(e=window.Bokeh.index[o]),null==e)return;if(n.length)this._receiver.consume(n);else{if(!(null!=s&&s.length>0))return;this._receiver.consume(s[0].buffer)}const t=this._receiver.message;if(null!=t&&Object.keys(t.content).length>0&&null!=this.document){const e=t.content;this.document.apply_json_patch(e,t.buffers)}}}}s.CommManager=f,i=f,f.__name__="CommManager",f.__module__="panel.models.comm_manager",i.prototype.default_view=u,i.define((({Int:e,Str:t,Nullable:s})=>({plot_id:[s(t),null],comm_id:[s(t),null],client_comm_id:[s(t),null],timeout:[e,5e3],debounce:[e,50]})))},
158
158
  "92bbd30bd1": function _(e,t,s,o,i){var n;o();const l=e("@bokehjs/models/widgets/select");class d extends l.SelectView{connect_signals(){super.connect_signals();const{disabled_options:e}=this.model.properties;this.on_change(e,(()=>this._update_disabled_options()))}options_el(){const e=super.options_el(),{disabled_options:t}=this.model;return e.forEach((e=>{e instanceof HTMLOptionElement&&t.includes(e.value)&&e.setAttribute("disabled","true")})),e}_update_disabled_options(){for(const e of this.input_el.options)this.model.disabled_options.includes(e.value)?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}}s.CustomSelectView=d,d.__name__="CustomSelectView";class _ extends l.Select{constructor(e){super(e)}}s.CustomSelect=_,n=_,_.__name__="CustomSelect",_.__module__="panel.models.widgets",n.prototype.default_view=d,n.define((({List:e,Str:t})=>({disabled_options:[e(t),[]]})))},
159
159
  "27b5580835": function _(e,t,l,o,s){var n,i;o();const c=e("@bokehjs/models/widgets/multiselect"),r=e("@bokehjs/core/bokeh_events");class u extends r.ModelEvent{constructor(e){super(),this.option=e}get event_values(){return{model:this.origin,option:this.option}}}l.DoubleClickEvent=u,n=u,u.__name__="DoubleClickEvent",n.prototype.event_name="dblclick_event";class _ extends c.MultiSelectView{render(){super.render();for(const e of this.input_el.children)e.addEventListener("dblclick",(e=>{e.target&&this.model.trigger_event(new u(e.target.value))}))}}l.CustomMultiSelectView=_,_.__name__="CustomMultiSelectView";class d extends c.MultiSelect{constructor(e){super(e)}}l.CustomMultiSelect=d,i=d,d.__name__="CustomMultiSelect",d.__module__="panel.models.widgets",i.prototype.default_view=_},
160
- "8cfbb15960": function _(t,e,i,s,o){var l,n,a,r;s();const d=t("tslib"),h=t("@bokehjs/core/dom"),c=t("@bokehjs/core/util/arrayable"),u=t("@bokehjs/core/util/types"),_=t("@bokehjs/core/bokeh_events"),g=t("@bokehjs/core/dom"),m=t("@bokehjs/core/kinds"),p=t("@bokehjs/models/sources/column_data_source"),f=t("@bokehjs/models/widgets/tables"),b=t("99a25e6992"),w=t("1bec1b1fcc"),y=t("be689f0377"),x=t("9b11ce01a3"),v=t("a3669a897a"),z=d.__importDefault(t("3d732ff91f"));class S extends _.ModelEvent{constructor(t,e,i){super(),this.column=t,this.row=e,this.pre=i}get event_values(){return{model:this.origin,column:this.column,row:this.row,pre:this.pre}}}i.TableEditEvent=S,l=S,S.__name__="TableEditEvent",l.prototype.event_name="table-edit";class M extends _.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e}get event_values(){return{model:this.origin,column:this.column,row:this.row}}}i.CellClickEvent=M,n=M,M.__name__="CellClickEvent",n.prototype.event_name="cell-click";class T extends _.ModelEvent{constructor(t,e,i=!1){super(),this.indices=t,this.selected=e,this.flush=i}get event_values(){return{model:this.origin,indices:this.indices,selected:this.selected,flush:this.flush}}}function C(t,e,i){for(const s of i)if(s[t]==e)return s;return null}function E(t,e,i,s=0){const o={};if(0==t.length)return o;let l="";s>0&&(l=i[s-1]);for(const n of t){const t=E(n._children,e,i,s+1);for(const e in t)(0,u.isArray)(t[e])?n[e]=(0,c.sum)(t[e])/t[e].length:n[e]=t[e];for(const t of e.slice(1)){let e="";"string"==typeof l?e=l:t.field in l&&(e=l[t.field]);const i=n[t.field];if(t.field in o){const s=o[t.field];"min"===e?o[t.field]=i<s?i:s:"max"===e?o[t.field]=i>s?i:s:"sum"===e?o[t.field]=i+s:"mean"===e&&((0,u.isArray)(o[t.field])?o[t.field].push(i):o[t.field]=[s,i])}else o[t.field]=i}}return o}function D(t,e,i,s){const o=[],l=e[0].field;for(const s of t){const t=s[i[0]];let n=C(l,t,o);null==n&&(n={_children:[]},n[l]=t,o.push(n));let a=n;for(const t of i.slice(1)){a=C(l,s[t],a._children),null==a&&(a={_children:[]},a[l]=s[t],n._children.push(a));for(const t of e.slice(1))a[t.field]=s[t];n=a}for(const t of e.slice(1))a[t.field]=s[t.field]}const n=[];for(const t of i)t in s?s[t]instanceof Map?n.push(Object.fromEntries(s[t])):n.push(s[t]):n.push("sum");return E(o,e,n),o}i.SelectionEvent=T,a=T,T.__name__="SelectionEvent",a.prototype.event_name="selection-change";const k=function(t,e,i,s,o,l,n){let a;a=0;const r={zone:new window.luxon.IANAZone("UTC")};if(t=Number.isNaN(t)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(t,r),e=Number.isNaN(e)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(e,r),t.isValid){if(e.isValid)return t-e;a=1}else a=e.isValid?-1:0;return a*=-1,a},P=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","date"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(t=>{"Enter"==t.key&&setTimeout(r,100),"Escape"==t.key&&setTimeout(s,100)})),a},L=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd'T'T");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd'T'T",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","datetime-local"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(t=>{"Enter"==t.key&&setTimeout(r,100),"Escape"==t.key&&setTimeout(s,100)})),a},R=function(t,e){const i=t.getRow().getData();let s=e.options;for(const t of e.lookup_order)if(s=i[t]in s?s[i[t]]:[],Array.isArray(s))break;return s||[]};function N(t,e){if(null==t.columns)return t.field===e?t:null;for(const i of t.columns){const t=N(i,e);if(t)return t}}function F(t){if(null==t.columns)return{...t};const e=[];for(const i of t.columns)e.push(F(i));return{...t,columns:e}}class V extends x.HTMLBoxView{constructor(){super(...arguments),this.columns=new Map,this.container=null,this._tabulator_cell_updating=!1,this._updating_page=!1,this._updating_expanded=!1,this._updating_sort=!1,this._updating_page_size=!1,this._selection_updating=!1,this._last_selected_row=null,this._lastVerticalScrollbarTopPosition=0,this._lastHorizontalScrollbarLeftPosition=0,this._applied_styles=!1,this._building=!1,this._redrawing=!1,this._debounced_redraw=null,this._restore_scroll=!1,this._updating_scroll=!1,this._is_scrolling=!1,this._automatic_page_size=!1}connect_signals(){super.connect_signals(),this._debounced_redraw=(0,b.debounce)((()=>this._resize_redraw()),20,!1);const{configuration:t,layout:e,columns:i,groupby:s,visible:o,download:l,children:n,expanded:a,cell_styles:r,hidden_columns:d,page_size:h,page:c,max_page:u,frozen_rows:_,sorters:g,theme_classes:m}=this.model.properties;this.on_change([t,e,s],(0,b.debounce)((()=>{this.invalidate_render()}),20,!1)),this.on_change(o,(()=>{this.model.visible&&(this.tabulator.element.style.visibility="visible")})),this.on_change(i,(()=>{this.tabulator.setColumns(this.getColumns()),this.setHidden()})),this.on_change(l,(()=>{const t=this.model.filename.endsWith(".json")?"json":"csv";this.tabulator.download(t,this.model.filename)})),this.on_change(n,(()=>this.renderChildren())),this.on_change(a,(()=>{for(const t of this.tabulator.rowManager.getRows())t.cells.length>0&&t.cells[0].layoutElement();for(const t of this.tabulator.rowManager.getRows())if(t.cells.length>0){const e=t.data._index,i=this.model.expanded.includes(e)?"\u25bc":"\u25ba";t.cells[1].element.innerText=i}this.model.embed_content&&!this._updating_expanded&&this.renderChildren()})),this.on_change(r,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.on_change(d,(()=>{this.setHidden(),this.tabulator.redraw(!0)})),this.on_change(h,(()=>this.setPageSize())),this.on_change(c,(()=>{this._updating_page||this.setPage()})),this.on_change(o,(()=>this.setVisibility())),this.on_change(u,(()=>this.setMaxPage())),this.on_change(_,(()=>this.setFrozen())),this.on_change(g,(()=>this.setSorters())),this.on_change(m,(()=>this.setCSSClasses(this.tabulator.element))),this.on_change(this.model.source.properties.data,(()=>{void 0!==this.tabulator&&(this._restore_scroll="horizontal",this._selection_updating=!0,this._updating_scroll=!0,this.setData(),this._updating_scroll=!1,this._selection_updating=!1,this.postUpdate())})),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>{const t=this.model.source.selected.indices;this._updating_scroll=!0,this.updateOrAddData(),this._updating_scroll=!1,this.model.source.selected.indices=t,this.restore_scroll()})),this.connect(this.model.source.selected.change,(()=>this.setSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.setSelection()))}get groupBy(){return this.model.groupby.length>0&&(t=>{const e=[];for(const i of this.model.groupby){const s=`${i}: ${t[i]}`;e.push(s)}return e.join(", ")})}get sorters(){const t=[];this.model.sorters.length>0&&t.push({column:"_index",dir:"asc"});for(const e of this.model.sorters.reverse())void 0===e.column&&(e.column=e.field),t.push(e);return t}invalidate_render(){this.tabulator.destroy(),this.tabulator=null,this.rerender_()}redraw(t=!0,e=!0){this._building||null==this.tabulator||this._redrawing||(this._redrawing=!0,t&&null!=this.tabulator.columnManager.element&&this.tabulator.columnManager.redraw(!0),e&&null!=this.tabulator.rowManager.renderer&&(this.tabulator.rowManager.redraw(!0),this.setStyles()),this._redrawing=!1,this._restore_scroll=!0)}get is_drawing(){return this._building||this._redrawing||!this.has_finished()}after_layout(){super.after_layout(),null!=this.tabulator&&this._initializing&&!this.is_drawing&&(this._initializing=!1,this._resize_redraw())}after_resize(){super.after_resize(),this._is_scrolling||this._initializing||this.is_drawing||this._debounced_redraw()}_resize_redraw(){if(this._initializing||!this.container||this._building)return;const t=this.container.clientWidth,e=this.container.clientHeight;t&&e&&(this.redraw(!0,!0),this.restore_scroll(),window.requestAnimationFrame((()=>this.recompute_page_size())))}stylesheets(){return[...super.stylesheets(),z.default]}setCSSClasses(t){t.className="pnx-tabulator tabulator";for(const e of this.model.theme_classes)t.classList.add(e)}render(){null!=this.tabulator&&this.tabulator.destroy(),super.render(),this._initializing=!0,this._building=!0;const t=(0,g.div)({style:{display:"contents"}}),e=(0,g.div)({style:{width:"100%",height:"100%",visibility:"hidden"}});this.container=e,this.setCSSClasses(e),t.appendChild(e),this.shadow_el.appendChild(t);const i=this.getConfiguration();this.tabulator=new Tabulator(e,i),this.watch_stylesheets(),this.init_callbacks()}style_redraw(){this.model.visible&&(this.tabulator.element.style.visibility="visible"),this._initializing||this._building||this.redraw()}tableInit(){this._building=!0;this.tabulator.modules.ajax.sendRequest=(t,e,i)=>this.requestPage(e.page,e.sort),this.tabulator.modules.page._parseRemoteData=()=>!1}init_callbacks(){this.tabulator.on("tableBuilding",(()=>this.tableInit())),this.tabulator.on("tableBuilt",(()=>this.tableBuilt())),this.tabulator.on("selectableRowsCheck",(t=>{const e=this.model.selectable_rows;return null==e||e.includes(t._row.data._index)})),this.tabulator.on("tooltips",(t=>`${t.getColumn().getField()}: ${t.getValue()}`)),this.tabulator.on("scrollVertical",(0,b.debounce)((()=>{this.setStyles()}),50,!1)),this.tabulator.on("rowSelectionChanged",((t,e,i,s)=>{this.rowSelectionChanged(t,e,i,s)})),this.tabulator.on("rowClick",((t,e)=>this.rowClicked(t,e))),this.tabulator.on("cellEdited",(t=>this.cellEdited(t))),this.tabulator.on("dataFiltering",(t=>{this.record_scroll(),this.model.filters=t})),this.tabulator.on("dataFiltered",((t,e)=>{this._building||(0===e.length&&this.tabulator.rowManager.renderEmptyScroll(),null!=this.model.pagination&&this.updatePage(this.tabulator.getPage()))})),this.tabulator.on("pageLoaded",(t=>{this.updatePage(t)})),this.tabulator.on("renderComplete",(()=>{this._building||this.postUpdate()})),this.tabulator.on("dataSorting",(t=>{const e=[];for(const i of t)"_index"!==i.field&&e.push({field:i.field,dir:i.dir});"remote"!==this.model.pagination&&(this._updating_sort=!0,this.model.sorters=e.reverse(),this._updating_sort=!1)}))}tableBuilt(){this.setSelection(),this.renderChildren(),this.setStyles();const t=this.shadow_el.querySelector(".tabulator-tableholder");let e;t&&t.addEventListener("scroll",(()=>{this.record_scroll(),this._is_scrolling=!0,clearTimeout(e),e=setTimeout((()=>{this._is_scrolling=!1}),200)})),this.model.pagination&&(this.setMaxPage(),this.tabulator.setPage(this.model.page)),this._building=!1,(0,v.schedule_when)((()=>{const t=this._initializing;this._initializing=!1,t&&this._resize_redraw()}),(()=>this.has_finished()&&[...this._initialized_stylesheets.values()].every((t=>t))))}recompute_page_size(){if(!this.model.pagination||null!==this.model.page_size||this._automatic_page_size)return;this._automatic_page_size=!0;const t=this.model.sizing_mode&&(this.model.sizing_mode.includes("height")||this.model.sizing_mode.includes("both")),e=this.shadow_el.querySelector(".tabulator-tableholder"),i=this.shadow_el.querySelector(".tabulator-table");if(null!=i&&null!=e){const s=e.clientHeight;let o=0,l=null;const n=[];for(let e=0;e<i.children.length;e++){const a=i.children[e].clientHeight;if(n.push(a),o+=a,o>s){l=e,t&&(l-=1);break}}if(o<s){l=i.children.length;const e=s-o;l+=Math.floor(e/Math.min(...n)),t&&(l-=2)}this._updating_page_size=!0;try{this.model.page_size=Math.max(l||1,1)}finally{this._updating_page_size=!1}}}requestPage(t,e){return new Promise(((i,s)=>{try{if(null!=t&&null!=e){this._updating_sort=!0;const i=[];for(const t of e)"_index"!==t.field&&i.push({field:t.field,dir:t.dir});this.model.sorters=i,this._updating_sort=!1,this._updating_page=!0;try{this.model.page=t||1}finally{this._updating_page=!1}}i([])}catch(t){s(t)}}))}getLayout(){switch(this.model.layout){case"fit_data":return"fitData";case"fit_data_fill":return"fitDataFill";case"fit_data_stretch":return"fitDataStretch";case"fit_data_table":return"fitDataTable";case"fit_columns":return"fitColumns"}}getConfiguration(){const t="toggle"===this.model.select_mode||NaN,e={...(0,v.transformJsPlaceholders)(this.model.configuration),index:"_index",nestedFieldSeparator:!1,movableColumns:!1,selectableRows:t,columns:this.getColumns(),initialSort:this.sorters,layout:this.getLayout(),pagination:null!=this.model.pagination,paginationMode:this.model.pagination,paginationSize:this.model.page_size||20,paginationInitialPage:1,popupContainer:this.model.container_popup&&this.container,groupBy:this.groupBy,frozenRows:t=>this.model.frozen_rows.length>0&&this.model.frozen_rows.includes(t._row.data._index),rowFormatter:t=>this._render_row(t,!1)};null!=this.model.max_height&&(e.maxHeight=this.model.max_height),"remote"===this.model.pagination&&(e.ajaxURL="http://panel.pyviz.org",e.sortMode="remote");const i=this.getData();return{...e,data:i}}get_child(t){return this.model.children instanceof Map&&this.model.children.get(t)||null}get child_models(){const t=[];for(const e of this.model.expanded){const i=this.get_child(e);null!=i&&t.push(i)}return t}get row_index(){const t=this.tabulator.getRows(),e=new Map;for(const i of t){const t=i._row?.data._index;null!=t&&e.set(t,i)}return e}renderChildren(){new Promise((async()=>{await this.build_child_views();const t=this.row_index,e=this.model.expanded;for(const i of e){const s=this.get_child(i),o=t.get(i);null!=(null==s?null:this._child_views.get(s))&&this._render_row(o,i===e[e.length-1])}}))}_render_row(t,e=!0){const i=t._row?.data._index;if(!this.model.expanded.includes(i))return;const s=this.get_child(i),o=null==s?null:this._child_views.get(s);null!=o&&(0,v.schedule_when)((()=>{const i=t.getElement(),s=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,l=i.style.paddingLeft?`-${i.style.paddingLeft}`:"0",n=i.children[i.children.length-1];let a;if(null!=n&&"row-content"==n.className){if(a=n,a.children.length&&a.children[0]===o.el)return}else a=(0,g.div)({class:"row-content",style:{background_color:s,margin_left:l,max_width:"100%",overflow_x:"hidden"}}),i.appendChild(a);(0,h.display)(o.el),a.appendChild(o.el),0===o.shadow_el.children.length&&this.rerender_(o),e&&(this._update_children(),this.resize_table())}),(()=>this.has_finished()))}resize_table(){if(null!=this.tabulator.rowManager.renderer)try{this.tabulator.rowManager.adjustTableSize()}catch(t){}this.invalidate_layout()}_expand_render(t){const e=t._cell.row.data._index;return this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc"}_update_expand(t){const e=t._cell.row.data._index,i=[...this.model.expanded];if(i.includes(e)){const t=i.indexOf(e),s=i.splice(t,1)[0],o=this.get_child(s);if(null!=o){const t=this._child_views.get(o);void 0!==t&&null!=t.el&&(0,h.undisplay)(t.el)}}else i.push(e);if(this._updating_expanded=!0,this.model.expanded=i,this._updating_expanded=!1,!i.includes(e))return;let s=!0;for(const t of this.model.expanded)if(null==this.get_child(t)){s=!1;break}s&&this.renderChildren()}getData(){const t=this.model.source;let e;return e=null===t||0===t.columns().length?[]:(0,y.transform_cds_to_records)(t,!0),this.model.configuration.dataTree&&(e=D(e,this.model.columns,this.model.indexes,this.model.aggregators)),e}getColumns(){this.columns=new Map;const t=(0,v.transformJsPlaceholders)(this.model.configuration?.columns),e=[];if(e.push({field:"_index",frozen:!0,visible:!1}),null!=t)for(const i of t){const t=F(i);if("expand"===i.formatter){const t={hozAlign:"center",cellClick:(t,e)=>{this._update_expand(e)},formatter:t=>this._expand_render(t),width:40,frozen:!0};e.push(t)}else"rowSelection"===t.formatter&&(t.cellClick=(t,e)=>{e.getRow().toggleSelect()}),e.push(t)}for(const i of this.model.columns){let s=null;if(null!=t)for(const t of e)if(s=N(t,i.field),null!=s)break;if(null==s&&(s={field:i.field}),this.columns.set(i.field,s),null==s.title&&(s.title=i.title),void 0===s.headerTooltip&&(s.headerTooltip=!0),null==s.width&&null!=i.width&&0!=i.width&&(s.width=i.width),null==s.formatter&&null!=i.formatter){const t=i.formatter.type;s.formatter="BooleanFormatter"===t?"tickCross":t=>{const e=t.getRow(),s=i.formatter.doFormat(t.getRow(),t,t.getValue(),null,e.getData());if("HTMLTemplateFormatter"===i.formatter.type)return s;const o=(0,g.div)();o.innerHTML=s;const l=o.children[0];return"function(){return c.convert(arguments)}"===l.innerHTML?"":l}}"timestamp"==s.sorter&&(s.sorter=k),void 0===s.sorter&&(s.sorter="string");const o=i.editor,l=o.type;null!=s.editor?"date"===s.editor?s.editor=P:"datetime"===s.editor?s.editor=L:"nested"===s.editor&&(s.editorParams.valuesLookup=t=>R(t,s.editorParams),s.editor="list"):"StringEditor"===l?o.completions.length>0?(s.editor="list",s.editorParams={values:o.completions,autocomplete:!0,listOnEmpty:!0}):s.editor="input":"TextEditor"===l?s.editor="textarea":"IntEditor"===l||"NumberEditor"===l?(s.editor="number",s.editorParams={step:o.step},s.validator="IntEditor"===l?"integer":"numeric"):"CheckboxEditor"===l?s.editor="tickCross":"DateEditor"===l?s.editor=P:"SelectEditor"===l?(s.editor="list",s.editorParams={values:o.options}):null!=o&&null!=o.default_view&&(s.editor=(t,e,s,o)=>{this.renderEditor(i,t,e,s,o)}),s.visible=0!=s.visible&&!this.model.hidden_columns.includes(i.field);const n=s.editable;(0,u.isFunction)(n)?s.editable=t=>this.model.editable&&null!=o.default_view&&n(t):(0,u.isBoolean)(n)?s.editable=()=>this.model.editable&&null!=o.default_view&&n:s.editable=()=>this.model.editable&&null!=o.default_view,s.headerFilter&&(0,u.isBoolean)(s.headerFilter)&&(0,u.isString)(s.editor)&&(s.headerFilter=s.editor,s.headerFilterParams=s.editorParams);for(const t of this.model.sorters)s.field===t.field&&(s.headerSortStartingDir=t.dir);s.cellClick=(t,e)=>{const s=e.getData()._index,o=new M(i.field,s);this.model.trigger_event(o)},null==t&&e.push(s)}for(const t in this.model.buttons){const i={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const s=i.getData()._index,o=new M(t,s);this.model.trigger_event(o)}};e.push(i)}return this.model.container_popup&&"fit_data_stretch"!==this.model.layout&&e.push({width:1,maxWidth:1,minWidth:1,resizable:!1,cssClass:"empty",sorter:null}),e}renderEditor(t,e,i,s,o){const l=t.editor,n=new l.default_view({column:t,model:l,parent:this,container:e._cell.element});return n.initialize(),n.connect_signals(),i((()=>{n.setValue(e.getValue())})),n.inputEl.addEventListener("input",(()=>{const t=n.serializeValue(),i=e.getValue(),l=n.validate();l.valid||o(l.msg),null!=i&&typeof t!=typeof i?o("Mismatching type"):s(n.serializeValue())})),n.inputEl}setData(){if(this._initializing||this._building||!this.tabulator.initialized)return Promise.resolve(void 0);const t=this.getData();return null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t)}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=e?.data._index||0;this._updating_page=!0;const s=this.setData();this.model.follow?s.then((()=>{this.model.pagination&&this.tabulator.setPage(Math.ceil(this.tabulator.rowManager.getDataCount()/(this.model.page_size||20))),e&&this.tabulator.scrollToRow(i,"top",!1),this._updating_page=!1})):this._updating_page=!0}postUpdate(){if(this.setSelection(),this.setStyles(),this._restore_scroll){const t="horizontal"!==this._restore_scroll,e="vertical"!==this._restore_scroll;this.restore_scroll(e,t),this._restore_scroll=!1}}updateOrAddData(){if(this._tabulator_cell_updating)return;const t=this.tabulator.element.style.minHeight;this.tabulator.element.style.minHeight=`${this.tabulator.element.offsetHeight}px`;const e=(0,y.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(e).then((()=>{this.tabulator.element.style.minHeight=t}))}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}setVisibility(){null!=this.tabulator&&(this.tabulator.element.style.visibility=this.model.visible?"visible":"hidden")}updatePage(t){"local"!==this.model.pagination||this.model.page===t||this._updating_page||(this._updating_page=!0,this.model.page=t,this._updating_page=!1,this.setStyles())}setGroupBy(){this.tabulator.setGroupBy(this.groupBy)}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setStyles(){const t=this.model.cell_styles.data;if(null!=this.tabulator&&0!=this.tabulator.getDataCount()&&null!=t&&t.size){this._applied_styles=!1;for(const e of t.keys()){const i=t.get(e),s=this.tabulator.getRow(e);if(!s)continue;const o=s._row.cells;for(const t of i.keys()){const e=i.get(t),s=o[t];if(null==s||!e.length)continue;const l=s.element;for(const t of e){let e,i;if((0,u.isArray)(t))[e,i]=t;else{if(!t.includes(":"))continue;[e,i]=t.split(":")}l.style.setProperty(e,i.trimLeft()),this._applied_styles=!0}}}}}setHidden(){for(const t of this.tabulator.getColumns()){const e=t._column;"_index"==e.field||this.model.hidden_columns.includes(e.field)?t.hide():t.show()}}setMaxPage(){this.tabulator.setMaxPage(this.model.max_page),this.tabulator.modules.page.pagesElement&&this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(Math.min(this.model.max_page,this.model.page)),"local"===this.model.pagination&&this.setStyles()}setPageSize(){this._updating_page_size||(this._automatic_page_size=!1),this.tabulator.setPageSize(this.model.page_size),"local"===this.model.pagination&&this.setStyles()}setSelection(){if(null==this.tabulator||this._initializing||this._selection_updating||!this.tabulator.initialized)return;const t=this.model.source.selected.indices,e=this.tabulator.getSelectedData().map((t=>t._index));if(JSON.stringify(t)!=JSON.stringify(e)){this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t);for(const e of t){this.tabulator.rowManager.findRow(e)&&this.tabulator.scrollToRow(e,"center",!1).catch((()=>{}))}this._selection_updating=!1}}restore_scroll(t=!0,e=!0){if(!t&&!e)return;const i={behavior:"instant"};e&&(i.top=this._lastVerticalScrollbarTopPosition),t&&(i.left=this._lastHorizontalScrollbarLeftPosition),setTimeout((()=>{this._updating_scroll=!0,this.tabulator.rowManager.element.scrollTo(i),this._updating_scroll=!1}),0)}record_scroll(){this._updating_scroll||(this._lastVerticalScrollbarTopPosition=this.tabulator.rowManager.element.scrollTop,this._lastHorizontalScrollbarLeftPosition=this.tabulator.rowManager.element.scrollLeft)}rowClicked(t,e){if(this._selection_updating||this._initializing||(0,u.isString)(this.model.select_mode)||!1===this.model.select_mode||this.model.configuration.dataTree||"\u25ba"===t.srcElement?.innerText)return;let i=[];const s=this.model.source.selected,o=e._row.data._index;if(t.ctrlKey||t.metaKey)i=[...s.indices];else if(t.shiftKey&&this._last_selected_row){const t=e._row.parent.getDisplayRows(),s=t.indexOf(this._last_selected_row);if(-1!==s){const o=t.indexOf(e._row),l=s>o,[n,a]=l?[o+1,s+1]:[s,o];i=t.slice(n,a).map((t=>t.data._index)),l&&(i=i.reverse())}}const l=!(t.ctrlKey||t.metaKey||t.shiftKey),n=i.includes(o),a="remote"===this.model.pagination;if(!n||a?i.push(o):i.splice(i.indexOf(o),1),(0,u.isNumber)(this.model.select_mode))for(;i.length>this.model.select_mode;)i.shift();const r=this._filter_selected(i);a||(this.tabulator.deselectRow(),this.tabulator.selectRow(r)),this._last_selected_row=e._row,this._selection_updating=!0,a||(s.indices=r),this.model.trigger_event(new T(i,!n,l)),this._selection_updating=!1}_filter_selected(t){const e=[];for(const i of t)(null==this.model.selectable_rows||this.model.selectable_rows.indexOf(i)>=0)&&e.push(i);return e}rowSelectionChanged(t,e,i,s){if(!(this._selection_updating||this._initializing||(0,u.isBoolean)(this.model.select_mode)||(0,u.isNumber)(this.model.select_mode)||this.model.configuration.dataTree)){if("remote"===this.model.pagination){const t=i.map((t=>t._row.data._index)),e=s.map((t=>t._row.data._index));t.length>0&&(this._selection_updating=!0,this.model.trigger_event(new T(t,!0,!1))),e.length>0&&(this._selection_updating=!0,this.model.trigger_event(new T(e,!1,!1)))}else{const e=t.map((t=>t._index)),i=this._filter_selected(e);this._selection_updating=e.length===i.length,this.model.source.selected.indices=i}this._selection_updating=!1}}cellEdited(t){const e=t._cell.column.field,i=this.columns.get(e),s=t.getData()._index,o=t._cell.value;if("numeric"!==i.validator||""!==o){this._tabulator_cell_updating=!0,w.comm_settings.debounce=!1,this.model.trigger_event(new S(e,s,!0));try{this.model.source.patch({[e]:[[s,o]]})}finally{w.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new S(e,s,!1)),this.tabulator.scrollToRow(s,"top",!1)}else t.setValue(NaN,!0)}}i.DataTabulatorView=V,V.__name__="DataTabulatorView",i.TableLayout=(0,m.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class A extends x.HTMLBox{constructor(t){super(t)}}i.DataTabulator=A,r=A,A.__name__="DataTabulator",A.__module__="panel.models.tabulator",r.prototype.default_view=V,r.define((({Any:t,List:e,Bool:s,Nullable:o,Float:l,Ref:n,Str:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,new Map],configuration:[t,{}],columns:[e(n(f.TableColumn)),[]],download:[s,!1],editable:[s,!0],embed_content:[s,!1],expanded:[e(l),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[s,!0],frozen_rows:[e(l),[]],groupby:[e(a),[]],hidden_columns:[e(a),[]],indexes:[e(a),[]],layout:[i.TableLayout,"fit_data"],max_page:[l,0],pagination:[o(a),null],page:[l,0],page_size:[o(l),null],select_mode:[t,!0],selectable_rows:[o(e(l)),null],source:[n(p.ColumnDataSource)],sorters:[e(t),[]],cell_styles:[t,{}],theme_classes:[e(a),[]],container_popup:[s,!0]})))},
160
+ "5bee7c9df6": function _(t,e,i,s,l){var o,n,a,r;s();const d=t("tslib"),h=t("@bokehjs/core/dom"),c=t("@bokehjs/core/util/arrayable"),u=t("@bokehjs/core/util/types"),_=t("@bokehjs/core/bokeh_events"),g=t("@bokehjs/core/dom"),m=t("@bokehjs/core/kinds"),p=t("@bokehjs/models/sources/column_data_source"),f=t("@bokehjs/models/widgets/tables"),b=t("99a25e6992"),w=t("1bec1b1fcc"),y=t("be689f0377"),x=t("9b11ce01a3"),v=t("a3669a897a"),z=d.__importDefault(t("3d732ff91f"));class S extends _.ModelEvent{constructor(t,e,i){super(),this.column=t,this.row=e,this.pre=i}get event_values(){return{model:this.origin,column:this.column,row:this.row,pre:this.pre}}}i.TableEditEvent=S,o=S,S.__name__="TableEditEvent",o.prototype.event_name="table-edit";class M extends _.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e}get event_values(){return{model:this.origin,column:this.column,row:this.row}}}i.CellClickEvent=M,n=M,M.__name__="CellClickEvent",n.prototype.event_name="cell-click";class T extends _.ModelEvent{constructor(t,e,i=!1){super(),this.indices=t,this.selected=e,this.flush=i}get event_values(){return{model:this.origin,indices:this.indices,selected:this.selected,flush:this.flush}}}function C(t,e,i){for(const s of i)if(s[t]==e)return s;return null}function E(t,e,i,s=0){const l={};if(0==t.length)return l;let o="";s>0&&(o=i[s-1]);for(const n of t){const t=E(n._children,e,i,s+1);for(const e in t)(0,u.isArray)(t[e])?n[e]=(0,c.sum)(t[e])/t[e].length:n[e]=t[e];for(const t of e.slice(1)){let e="";"string"==typeof o?e=o:t.field in o&&(e=o[t.field]);const i=n[t.field];if(t.field in l){const s=l[t.field];"min"===e?l[t.field]=i<s?i:s:"max"===e?l[t.field]=i>s?i:s:"sum"===e?l[t.field]=i+s:"mean"===e&&((0,u.isArray)(l[t.field])?l[t.field].push(i):l[t.field]=[s,i])}else l[t.field]=i}}return l}function D(t,e,i,s){const l=[],o=e[0].field;for(const s of t){const t=s[i[0]];let n=C(o,t,l);null==n&&(n={_children:[]},n[o]=t,l.push(n));let a=n;for(const t of i.slice(1)){a=C(o,s[t],a._children),null==a&&(a={_children:[]},a[o]=s[t],n._children.push(a));for(const t of e.slice(1))a[t.field]=s[t];n=a}for(const t of e.slice(1))a[t.field]=s[t.field]}const n=[];for(const t of i)t in s?s[t]instanceof Map?n.push(Object.fromEntries(s[t])):n.push(s[t]):n.push("sum");return E(l,e,n),l}i.SelectionEvent=T,a=T,T.__name__="SelectionEvent",a.prototype.event_name="selection-change";const k=function(t,e,i,s,l,o,n){let a;a=0;const r={zone:new window.luxon.IANAZone("UTC")};if(t=Number.isNaN(t)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(t,r),e=Number.isNaN(e)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(e,r),t.isValid){if(e.isValid)return t-e;a=1}else a=e.isValid?-1:0;return a*=-1,a},P=function(t,e,i,s){const l=t.getValue(),o={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===l||null===l?null:window.luxon.DateTime.fromMillis(l,o).toFormat("yyyy-MM-dd");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd",o).toMillis();t!=n?i(t):s()}return a.setAttribute("type","date"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(t=>{"Enter"==t.key&&setTimeout(r,100),"Escape"==t.key&&setTimeout(s,100)})),a},L=function(t,e,i,s){const l=t.getValue(),o={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===l||null===l?null:window.luxon.DateTime.fromMillis(l,o).toFormat("yyyy-MM-dd'T'T");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd'T'T",o).toMillis();t!=n?i(t):s()}return a.setAttribute("type","datetime-local"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(t=>{"Enter"==t.key&&setTimeout(r,100),"Escape"==t.key&&setTimeout(s,100)})),a},R=function(t,e){const i=t.getRow().getData();let s=e.options;for(const t of e.lookup_order)if(s=i[t]in s?s[i[t]]:[],Array.isArray(s))break;return s||[]};function N(t,e){if(null==t.columns)return t.field===e?t:null;for(const i of t.columns){const t=N(i,e);if(t)return t}}function F(t){if(null==t.columns)return{...t};const e=[];for(const i of t.columns)e.push(F(i));return{...t,columns:e}}class V extends x.HTMLBoxView{constructor(){super(...arguments),this.columns=new Map,this.container=null,this._tabulator_cell_updating=!1,this._updating_page=!1,this._updating_expanded=!1,this._updating_sort=!1,this._updating_page_size=!1,this._selection_updating=!1,this._last_selected_row=null,this._lastVerticalScrollbarTopPosition=0,this._lastHorizontalScrollbarLeftPosition=0,this._applied_styles=!1,this._building=!1,this._redrawing=!1,this._debounced_redraw=null,this._restore_scroll=!1,this._updating_scroll=!1,this._is_scrolling=!1,this._automatic_page_size=!1}connect_signals(){super.connect_signals(),this._debounced_redraw=(0,b.debounce)((()=>this._resize_redraw()),20,!1);const{configuration:t,layout:e,columns:i,groupby:s,visible:l,download:o,children:n,expanded:a,cell_styles:r,hidden_columns:d,page_size:h,page:c,max_page:u,frozen_rows:_,sorters:g,theme_classes:m}=this.model.properties;this.on_change([t,e,s],(0,b.debounce)((()=>{this.invalidate_render()}),20,!1)),this.on_change(l,(()=>{this.model.visible&&(this.tabulator.element.style.visibility="visible")})),this.on_change(i,(()=>{this.tabulator.setColumns(this.getColumns()),this.setHidden()})),this.on_change(o,(()=>{const t=this.model.filename.endsWith(".json")?"json":"csv";this.tabulator.download(t,this.model.filename)})),this.on_change(n,(()=>this.renderChildren())),this.on_change(a,(()=>{for(const t of this.tabulator.rowManager.getRows())t.cells.length>0&&t.cells[0].layoutElement();for(const t of this.tabulator.rowManager.getRows())if(t.cells.length>0){const e=t.data._index,i=this.model.expanded.includes(e)?"\u25bc":"\u25ba";t.cells[1].element.innerText=i}this.model.embed_content&&!this._updating_expanded&&this.renderChildren()})),this.on_change(r,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.on_change(d,(()=>{this.setHidden(),this.tabulator.redraw(!0)})),this.on_change(h,(()=>this.setPageSize())),this.on_change(c,(()=>{this._updating_page||this.setPage()})),this.on_change(l,(()=>this.setVisibility())),this.on_change(u,(()=>this.setMaxPage())),this.on_change(_,(()=>this.setFrozen())),this.on_change(g,(()=>this.setSorters())),this.on_change(m,(()=>this.setCSSClasses(this.tabulator.element))),this.on_change(this.model.source.properties.data,(()=>{void 0!==this.tabulator&&(this._restore_scroll="horizontal",this._selection_updating=!0,this._updating_scroll=!0,this.setData(),this._updating_scroll=!1,this._selection_updating=!1,this.postUpdate())})),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>{const t=this.model.source.selected.indices;this._updating_scroll=!0,this.updateOrAddData(),this._updating_scroll=!1,this.model.source.selected.indices=t,this.restore_scroll()})),this.connect(this.model.source.selected.change,(()=>this.setSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.setSelection()))}get groupBy(){return this.model.groupby.length>0&&(t=>{const e=[];for(const i of this.model.groupby){const s=`${i}: ${t[i]}`;e.push(s)}return e.join(", ")})}get sorters(){const t=[];this.model.sorters.length>0&&t.push({column:"_index",dir:"asc"});for(const e of this.model.sorters.reverse())void 0===e.column&&(e.column=e.field),t.push(e);return t}invalidate_render(){this.tabulator.destroy(),this.tabulator=null,this.rerender_()}redraw(t=!0,e=!0){this._building||null==this.tabulator||this._redrawing||(this._redrawing=!0,t&&null!=this.tabulator.columnManager.element&&this.tabulator.columnManager.redraw(!0),e&&null!=this.tabulator.rowManager.renderer&&(this.tabulator.rowManager.redraw(!0),this.setStyles()),this._redrawing=!1,this._restore_scroll=!0)}get is_drawing(){return this._building||this._redrawing||!this.has_finished()}after_layout(){super.after_layout(),null!=this.tabulator&&this._initializing&&!this.is_drawing&&(this._initializing=!1,this._resize_redraw())}after_resize(){super.after_resize(),this._is_scrolling||this._initializing||this.is_drawing||this._debounced_redraw()}_resize_redraw(){if(this._initializing||!this.container||this._building)return;const t=this.container.clientWidth,e=this.container.clientHeight;t&&e&&(this.redraw(!0,!0),this.restore_scroll(),requestAnimationFrame((()=>this.recompute_page_size())))}stylesheets(){return[...super.stylesheets(),z.default]}setCSSClasses(t){t.className="pnx-tabulator tabulator";for(const e of this.model.theme_classes)t.classList.add(e)}render(){null!=this.tabulator&&this.tabulator.destroy(),super.render(),this._initializing=!0,this._building=!0;const t=(0,g.div)({style:{display:"contents"}}),e=(0,g.div)({style:{width:"100%",height:"100%",visibility:"hidden"}});this.container=e,this.setCSSClasses(e),t.appendChild(e),this.shadow_el.appendChild(t);const i=this.getConfiguration();this.tabulator=new Tabulator(e,i),this.watch_stylesheets(),this.init_callbacks()}style_redraw(){this.model.visible&&(this.tabulator.element.style.visibility="visible"),this._initializing||this._building||this.redraw()}tableInit(){this._building=!0;this.tabulator.modules.ajax.sendRequest=(t,e,i)=>this.requestPage(e.page,e.sort),this.tabulator.modules.page._parseRemoteData=()=>!1}init_callbacks(){this.tabulator.on("tableBuilding",(()=>this.tableInit())),this.tabulator.on("tableBuilt",(()=>this.tableBuilt())),this.tabulator.on("selectableRowsCheck",(t=>{const e=this.model.selectable_rows;return null==e||e.includes(t._row.data._index)})),this.tabulator.on("tooltips",(t=>`${t.getColumn().getField()}: ${t.getValue()}`)),this.tabulator.on("scrollVertical",(0,b.debounce)((()=>{this.setStyles()}),50,!1)),this.tabulator.on("rowSelectionChanged",((t,e,i,s)=>{this.rowSelectionChanged(t,e,i,s)})),this.tabulator.on("rowClick",((t,e)=>this.rowClicked(t,e))),this.tabulator.on("cellEdited",(t=>this.cellEdited(t))),this.tabulator.on("dataFiltering",(t=>{this.record_scroll(),this.model.filters=t})),this.tabulator.on("dataFiltered",((t,e)=>{this._building||(0===e.length&&this.tabulator.rowManager.renderEmptyScroll(),null!=this.model.pagination&&this.updatePage(this.tabulator.getPage()))})),this.tabulator.on("pageLoaded",(t=>{this.updatePage(t)})),this.tabulator.on("renderComplete",(()=>{this._building||this.postUpdate()})),this.tabulator.on("dataSorting",(t=>{const e=[];for(const i of t)"_index"!==i.field&&e.push({field:i.field,dir:i.dir});"remote"!==this.model.pagination&&(this._updating_sort=!0,this.model.sorters=e.reverse(),this._updating_sort=!1)}))}tableBuilt(){this.setSelection(),this.renderChildren(),this.setStyles();const t=this.shadow_el.querySelector(".tabulator-tableholder");let e;t&&t.addEventListener("scroll",(()=>{this.record_scroll(),this._is_scrolling=!0,clearTimeout(e),e=setTimeout((()=>{this._is_scrolling=!1}),200)})),this.model.pagination&&(this.setMaxPage(),this.tabulator.setPage(this.model.page)),this._building=!1,(0,v.schedule_when)((()=>{const t=this._initializing;this._initializing=!1,t&&this._resize_redraw()}),(()=>this.has_finished()&&[...this._initialized_stylesheets.values()].every((t=>t))))}recompute_page_size(){if(!this.model.pagination||null!==this.model.page_size&&!this._automatic_page_size)return;this._automatic_page_size=!0;const t=this.model.sizing_mode&&(this.model.sizing_mode.includes("height")||this.model.sizing_mode.includes("both")),e=this.shadow_el.querySelector(".tabulator-tableholder"),i=this.shadow_el.querySelector(".tabulator-table");if(null!=i&&null!=e){const s=e.clientHeight;let l=0,o=null;const n=[];for(let e=0;e<i.children.length;e++){const a=i.children[e].clientHeight;if(n.push(a),l+=a,l>s){o=e,t&&(o-=1);break}}if(l<s){o=i.children.length;const e=s-l;o+=Math.floor(e/Math.min(...n)),t&&(o-=1)}this._updating_page_size=!0;try{this.model.page_size=Math.max(o||1,1)}finally{this._updating_page_size=!1}}}requestPage(t,e){return new Promise(((i,s)=>{try{if(null!=t&&null!=e){this._updating_sort=!0;const i=[];for(const t of e)"_index"!==t.field&&i.push({field:t.field,dir:t.dir});this.model.sorters=i,this._updating_sort=!1,this._updating_page=!0;try{this.model.page=t||1}finally{this._updating_page=!1}}i([])}catch(t){s(t)}}))}getLayout(){switch(this.model.layout){case"fit_data":return"fitData";case"fit_data_fill":return"fitDataFill";case"fit_data_stretch":return"fitDataStretch";case"fit_data_table":return"fitDataTable";case"fit_columns":return"fitColumns"}}getConfiguration(){const t="toggle"===this.model.select_mode||NaN,e={...(0,v.transformJsPlaceholders)(this.model.configuration),index:"_index",nestedFieldSeparator:!1,movableColumns:!1,selectableRows:t,columns:this.getColumns(),initialSort:this.sorters,layout:this.getLayout(),pagination:null!=this.model.pagination,paginationMode:this.model.pagination,paginationSize:this.model.page_size||20,paginationInitialPage:1,popupContainer:this.model.container_popup&&this.container,groupBy:this.groupBy,frozenRows:t=>this.model.frozen_rows.length>0&&this.model.frozen_rows.includes(t._row.data._index),rowFormatter:t=>this._render_row(t,!1)};null!=this.model.max_height&&(e.maxHeight=this.model.max_height),"remote"===this.model.pagination&&(e.ajaxURL="http://panel.pyviz.org",e.sortMode="remote");const i=this.getData();return{...e,data:i}}get_child(t){return this.model.children instanceof Map&&this.model.children.get(t)||null}get child_models(){const t=[];for(const e of this.model.expanded){const i=this.get_child(e);null!=i&&t.push(i)}return t}get row_index(){const t=this.tabulator.getRows(),e=new Map;for(const i of t){const t=i._row?.data._index;null!=t&&e.set(t,i)}return e}renderChildren(){new Promise((async()=>{await this.build_child_views();const t=this.row_index,e=this.model.expanded;for(const i of e){const s=this.get_child(i),l=t.get(i);null!=(null==s?null:this._child_views.get(s))&&this._render_row(l,i===e[e.length-1])}}))}_render_row(t,e=!0){const i=t._row?.data._index;if(!this.model.expanded.includes(i))return;const s=this.get_child(i),l=null==s?null:this._child_views.get(s);null!=l&&(0,v.schedule_when)((()=>{const i=t.getElement(),s=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,o=i.style.paddingLeft?`-${i.style.paddingLeft}`:"0",n=i.children[i.children.length-1];let a;if(null!=n&&"row-content"==n.className){if(a=n,a.children.length&&a.children[0]===l.el)return}else a=(0,g.div)({class:"row-content",style:{background_color:s,margin_left:o,max_width:"100%",overflow_x:"hidden"}}),i.appendChild(a);(0,h.display)(l.el),a.appendChild(l.el),0===l.shadow_el.children.length&&this.rerender_(l),e&&(this._update_children(),this.resize_table())}),(()=>this.has_finished()))}resize_table(){if(null!=this.tabulator.rowManager.renderer)try{this.tabulator.rowManager.adjustTableSize()}catch(t){}this.invalidate_layout()}_expand_render(t){const e=t._cell.row.data._index;return this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc"}_update_expand(t){const e=t._cell.row.data._index,i=[...this.model.expanded];if(i.includes(e)){const t=i.indexOf(e),s=i.splice(t,1)[0],l=this.get_child(s);if(null!=l){const t=this._child_views.get(l);void 0!==t&&null!=t.el&&(0,h.undisplay)(t.el)}}else i.push(e);if(this._updating_expanded=!0,this.model.expanded=i,this._updating_expanded=!1,!i.includes(e))return;let s=!0;for(const t of this.model.expanded)if(null==this.get_child(t)){s=!1;break}s&&this.renderChildren()}getData(){const t=this.model.source;let e;return e=null===t||0===t.columns().length?[]:(0,y.transform_cds_to_records)(t,!0),this.model.configuration.dataTree&&(e=D(e,this.model.columns,this.model.indexes,this.model.aggregators)),e}getColumns(){this.columns=new Map;const t=(0,v.transformJsPlaceholders)(this.model.configuration?.columns),e=[];if(e.push({field:"_index",frozen:!0,visible:!1}),null!=t)for(const i of t){const t=F(i);if("expand"===i.formatter){const t={hozAlign:"center",cellClick:(t,e)=>{this._update_expand(e)},formatter:t=>this._expand_render(t),width:40,frozen:!0};e.push(t)}else"rowSelection"===t.formatter&&(t.cellClick=(t,e)=>{e.getRow().toggleSelect()}),e.push(t)}for(const i of this.model.columns){let s=null;if(null!=t)for(const t of e)if(s=N(t,i.field),null!=s)break;if(null==s&&(s={field:i.field}),this.columns.set(i.field,s),null==s.title&&(s.title=i.title),void 0===s.headerTooltip&&(s.headerTooltip=!0),null==s.width&&null!=i.width&&0!=i.width&&(s.width=i.width),null==s.formatter&&null!=i.formatter){const t=i.formatter.type;s.formatter="BooleanFormatter"===t?"tickCross":t=>{const e=t.getRow(),s=i.formatter.doFormat(t.getRow(),t,t.getValue(),null,e.getData());if("HTMLTemplateFormatter"===i.formatter.type)return s;const l=(0,g.div)();l.innerHTML=s;const o=l.children[0];return"function(){return c.convert(arguments)}"===o.innerHTML?"":o}}"timestamp"==s.sorter&&(s.sorter=k),void 0===s.sorter&&(s.sorter="string");const l=i.editor,o=l.type;null!=s.editor?"date"===s.editor?s.editor=P:"datetime"===s.editor?s.editor=L:"nested"===s.editor&&(s.editorParams.valuesLookup=t=>R(t,s.editorParams),s.editor="list"):"StringEditor"===o?l.completions.length>0?(s.editor="list",s.editorParams={values:l.completions,autocomplete:!0,listOnEmpty:!0}):s.editor="input":"TextEditor"===o?s.editor="textarea":"IntEditor"===o||"NumberEditor"===o?(s.editor="number",s.editorParams={step:l.step},s.validator="IntEditor"===o?"integer":"numeric"):"CheckboxEditor"===o?s.editor="tickCross":"DateEditor"===o?s.editor=P:"SelectEditor"===o?(s.editor="list",s.editorParams={values:l.options}):null!=l&&null!=l.default_view&&(s.editor=(t,e,s,l)=>{this.renderEditor(i,t,e,s,l)}),s.visible=0!=s.visible&&!this.model.hidden_columns.includes(i.field);const n=s.editable;(0,u.isFunction)(n)?s.editable=t=>this.model.editable&&null!=l.default_view&&n(t):(0,u.isBoolean)(n)?s.editable=()=>this.model.editable&&null!=l.default_view&&n:s.editable=()=>this.model.editable&&null!=l.default_view,s.headerFilter&&(0,u.isBoolean)(s.headerFilter)&&(0,u.isString)(s.editor)&&(s.headerFilter=s.editor,s.headerFilterParams=s.editorParams);for(const t of this.model.sorters)s.field===t.field&&(s.headerSortStartingDir=t.dir);s.cellClick=(t,e)=>{const s=e.getData()._index,l=new M(i.field,s);this.model.trigger_event(l)},null==t&&e.push(s)}for(const t in this.model.buttons){const i={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const s=i.getData()._index,l=new M(t,s);this.model.trigger_event(l)}};e.push(i)}return this.model.container_popup&&"fit_data_stretch"!==this.model.layout&&e.push({width:1,maxWidth:1,minWidth:1,resizable:!1,cssClass:"empty",sorter:null}),e}renderEditor(t,e,i,s,l){const o=t.editor,n=new o.default_view({column:t,model:o,parent:this,container:e._cell.element});return n.initialize(),n.connect_signals(),i((()=>{n.setValue(e.getValue())})),n.inputEl.addEventListener("input",(()=>{const t=n.serializeValue(),i=e.getValue(),o=n.validate();o.valid||l(o.msg),null!=i&&typeof t!=typeof i?l("Mismatching type"):s(n.serializeValue())})),n.inputEl}setData(){if(this._initializing||this._building||!this.tabulator.initialized)return Promise.resolve(void 0);const t=this.getData();return null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t)}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=e?.data._index||0;this._updating_page=!0;const s=this.setData();this.model.follow?s.then((()=>{this.model.pagination&&this.tabulator.setPage(Math.ceil(this.tabulator.rowManager.getDataCount()/(this.model.page_size||20))),e&&this.tabulator.scrollToRow(i,"top",!1),this._updating_page=!1})):this._updating_page=!0}postUpdate(){if(this.setSelection(),this.setStyles(),this._restore_scroll){const t="horizontal"!==this._restore_scroll,e="vertical"!==this._restore_scroll;this.restore_scroll(e,t),this._restore_scroll=!1}}updateOrAddData(){if(this._tabulator_cell_updating)return;const t=this.tabulator.element.style.minHeight;this.tabulator.element.style.minHeight=`${this.tabulator.element.offsetHeight}px`;const e=(0,y.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(e).then((()=>{this.tabulator.element.style.minHeight=t}))}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}setVisibility(){null!=this.tabulator&&(this.tabulator.element.style.visibility=this.model.visible?"visible":"hidden")}updatePage(t){"local"!==this.model.pagination||this.model.page===t||this._updating_page||(this._updating_page=!0,this.model.page=t,this._updating_page=!1,this.setStyles())}setGroupBy(){this.tabulator.setGroupBy(this.groupBy)}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setStyles(){const t=this.model.cell_styles.data;if(null!=this.tabulator&&0!=this.tabulator.getDataCount()&&null!=t&&t.size){this._applied_styles=!1;for(const e of t.keys()){const i=t.get(e),s=this.tabulator.getRow(e);if(!s)continue;const l=s._row.cells;for(const t of i.keys()){const e=i.get(t),s=l[t];if(null==s||!e.length)continue;const o=s.element;for(const t of e){let e,i;if((0,u.isArray)(t))[e,i]=t;else{if(!t.includes(":"))continue;[e,i]=t.split(":")}o.style.setProperty(e,i.trimLeft()),this._applied_styles=!0}}}}}setHidden(){for(const t of this.tabulator.getColumns()){const e=t._column;"_index"==e.field||this.model.hidden_columns.includes(e.field)?t.hide():t.show()}}setMaxPage(){this.tabulator.setMaxPage(this.model.max_page),this.tabulator.modules.page.pagesElement&&this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(Math.min(this.model.max_page,this.model.page)),"local"===this.model.pagination&&this.setStyles()}setPageSize(){this._updating_page_size||(this._automatic_page_size=!1),this.tabulator.setPageSize(this.model.page_size),"local"===this.model.pagination&&this.setStyles()}setSelection(){if(null==this.tabulator||this._initializing||this._selection_updating||!this.tabulator.initialized)return;const t=this.model.source.selected.indices,e=this.tabulator.getSelectedData().map((t=>t._index));if(JSON.stringify(t)!=JSON.stringify(e)){this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t);for(const e of t){this.tabulator.rowManager.findRow(e)&&this.tabulator.scrollToRow(e,"center",!1).catch((()=>{}))}this._selection_updating=!1}}restore_scroll(t=!0,e=!0){if(!t&&!e)return;const i={behavior:"instant"};e&&(i.top=this._lastVerticalScrollbarTopPosition),t&&(i.left=this._lastHorizontalScrollbarLeftPosition),setTimeout((()=>{this._updating_scroll=!0,this.tabulator.rowManager.element.scrollTo(i),this._updating_scroll=!1}),0)}record_scroll(){this._updating_scroll||(this._lastVerticalScrollbarTopPosition=this.tabulator.rowManager.element.scrollTop,this._lastHorizontalScrollbarLeftPosition=this.tabulator.rowManager.element.scrollLeft)}rowClicked(t,e){if(this._selection_updating||this._initializing||(0,u.isString)(this.model.select_mode)||!1===this.model.select_mode||this.model.configuration.dataTree||"\u25ba"===t.srcElement?.innerText)return;let i=[];const s=this.model.source.selected,l=e._row.data._index;if(t.ctrlKey||t.metaKey)i=[...s.indices];else if(t.shiftKey&&this._last_selected_row){const t=e._row.parent.getDisplayRows(),s=t.indexOf(this._last_selected_row);if(-1!==s){const l=t.indexOf(e._row),o=s>l,[n,a]=o?[l+1,s+1]:[s,l];i=t.slice(n,a).map((t=>t.data._index)),o&&(i=i.reverse())}}const o=!(t.ctrlKey||t.metaKey||t.shiftKey),n=i.includes(l),a="remote"===this.model.pagination;if(!n||a?i.push(l):i.splice(i.indexOf(l),1),(0,u.isNumber)(this.model.select_mode))for(;i.length>this.model.select_mode;)i.shift();const r=this._filter_selected(i);a||(this.tabulator.deselectRow(),this.tabulator.selectRow(r)),this._last_selected_row=e._row,this._selection_updating=!0,a||(s.indices=r),this.model.trigger_event(new T(i,!n,o)),this._selection_updating=!1}_filter_selected(t){const e=[];for(const i of t)(null==this.model.selectable_rows||this.model.selectable_rows.indexOf(i)>=0)&&e.push(i);return e}rowSelectionChanged(t,e,i,s){if(!(this._selection_updating||this._initializing||(0,u.isBoolean)(this.model.select_mode)||(0,u.isNumber)(this.model.select_mode)||this.model.configuration.dataTree)){if("remote"===this.model.pagination){const t=i.map((t=>t._row.data._index)),e=s.map((t=>t._row.data._index));t.length>0&&(this._selection_updating=!0,this.model.trigger_event(new T(t,!0,!1))),e.length>0&&(this._selection_updating=!0,this.model.trigger_event(new T(e,!1,!1)))}else{const e=t.map((t=>t._index)),i=this._filter_selected(e);this._selection_updating=e.length===i.length,this.model.source.selected.indices=i}this._selection_updating=!1}}cellEdited(t){const e=t._cell.column.field,i=this.columns.get(e),s=t.getData()._index,l=t._cell.value;if("numeric"!==i.validator||""!==l){this._tabulator_cell_updating=!0,w.comm_settings.debounce=!1,this.model.trigger_event(new S(e,s,!0));try{this.model.source.patch({[e]:[[s,l]]})}finally{w.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new S(e,s,!1)),this.tabulator.scrollToRow(s,"top",!1)}else t.setValue(NaN,!0)}}i.DataTabulatorView=V,V.__name__="DataTabulatorView",i.TableLayout=(0,m.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class A extends x.HTMLBox{constructor(t){super(t)}}i.DataTabulator=A,r=A,A.__name__="DataTabulator",A.__module__="panel.models.tabulator",r.prototype.default_view=V,r.define((({Any:t,List:e,Bool:s,Nullable:l,Float:o,Ref:n,Str:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,new Map],configuration:[t,{}],columns:[e(n(f.TableColumn)),[]],download:[s,!1],editable:[s,!0],embed_content:[s,!1],expanded:[e(o),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[s,!0],frozen_rows:[e(o),[]],groupby:[e(a),[]],hidden_columns:[e(a),[]],indexes:[e(a),[]],layout:[i.TableLayout,"fit_data"],max_page:[o,0],pagination:[l(a),null],page:[o,0],page_size:[l(o),null],select_mode:[t,!0],selectable_rows:[l(e(o)),null],source:[n(p.ColumnDataSource)],sorters:[e(t),[]],cell_styles:[t,{}],theme_classes:[e(a),[]],container_popup:[s,!0]})))},
161
161
  "99a25e6992": function _(n,l,u,t,e){function o(n,l,u){var t,e,o,a,r;function i(){var c=Date.now()-a;c<l&&c>=0?t=setTimeout(i,l-c):(t=null,u||(r=n.apply(o,e),o=e=null))}null==l&&(l=100);var c=function(){o=this,e=arguments,a=Date.now();var c=u&&!t;return t||(t=setTimeout(i,l)),c&&(r=n.apply(o,e),o=e=null),r};return c.clear=function(){t&&(clearTimeout(t),t=null)},c.flush=function(){t&&(r=n.apply(o,e),o=e=null,clearTimeout(t),t=null)},c}o.debounce=o,l.exports=o},
162
162
  "be689f0377": function _(n,e,t,l,o){l(),t.transform_cds_to_records=function(n,e=!1,t=0){const l=[],o=n.columns(),r=n.get_length();if(0===o.length||null===r)return[];for(let c=t;c<r;c++){const t={};for(const e of o){const l=n.get_array(e),o=null==l[0]||null==l[0].shape?null:l[0].shape;if(null!=o&&o.length>1&&(0,s.isNumber)(o[0]))t[e]=l.slice(c*o[1],c*o[1]+o[1]);else if(l.length!=r&&l.length%r==0){const n=l.length/r;t[e]=l.slice(c*n,c*n+n)}else t[e]=l[c]}e&&(t._index=c),l.push(t)}return l},t.dict_to_records=function(n,e=!0){for(let t=0;t<n.index.length;t++){const l={};for(const o of n)(e||"index"!==o)&&(l[o]=n[o][t])}return[]};const s=n("@bokehjs/core/util/types")},
163
163
  "3d732ff91f": function _(t,a,o,r,l){r(),o.panel_models_markup_HTML="bk-panel-models-markup-HTML",o.default=".pnx-tabulator.tabulator{overflow:visible;}.tabulator-table{max-width:max-content;}.tabulator-table .tabulator-row .row-content .bk-panel-models-markup-HTML{white-space:normal;}.tabulator-table .tabulator-cell.empty{min-width:0px !important;width:0px !important;padding:0px !important;}.tabulator-header .tabulator-col.empty{min-width:0px !important;width:100% !important;border-right:unset !important;}.tabulator-header .tabulator-col.empty .tabulator-col-content{padding:0px !important;}"},
@@ -268,4 +268,4 @@ const r=t("@bokehjs/core/util/types");let o,s;const c={fontFamily:'"Helvetica Ne
268
268
  "18592eecef": function _(e,t,i,s,n){var r;s();const o=e("b06d05fa3e"),a=e("df9946ff52");class l extends o.AbstractVTKView{connect_signals(){super.connect_signals();const{data:e,colormap:t,shadow:i,sampling:s,edge_gradient:n,rescale:r,ambient:o,diffuse:l,camera:d,specular:_,specular_power:c,display_volume:h,display_slices:g,slice_i:p,slice_j:m,slice_k:u,render_background:v,interpolation:w,controller_expanded:y,nan_opacity:k}=this.model.properties;this.on_change(e,(()=>{this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data),this.invalidate_render()})),this.on_change(t,(()=>{this.colormap_selector.value=this.model.colormap;const e=new Event("change");this.colormap_selector.dispatchEvent(e)})),this.on_change(i,(()=>{this.shadow_selector.value=this.model.shadow?"1":"0";const e=new Event("change");this.shadow_selector.dispatchEvent(e)})),this.on_change(s,(()=>{this.sampling_slider.value=this.model.sampling.toFixed(2);const e=new Event("input");this.sampling_slider.dispatchEvent(e)})),this.on_change(n,(()=>{this.edge_gradient_slider.value=this.model.edge_gradient.toFixed(2);const e=new Event("input");this.edge_gradient_slider.dispatchEvent(e)})),this.on_change(r,(()=>{this._controllerWidget.setRescaleColorMap(this.model.rescale),this._vtk_renwin.getRenderWindow().render()})),this.on_change(o,(()=>{this.volume.getProperty().setAmbient(this.model.ambient),this._vtk_renwin.getRenderWindow().render()})),this.on_change(l,(()=>{this.volume.getProperty().setDiffuse(this.model.diffuse),this._vtk_renwin.getRenderWindow().render()})),this.on_change(d,(()=>{this._setting_camera||(this._set_camera_state(),this._vtk_renwin.getRenderWindow().render())})),this.on_change(_,(()=>{this.volume.getProperty().setSpecular(this.model.specular),this._vtk_renwin.getRenderWindow().render()})),this.on_change(c,(()=>{this.volume.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderWindow().render()})),this.on_change(h,(()=>{this._set_volume_visibility(this.model.display_volume),this._vtk_renwin.getRenderWindow().render()})),this.on_change(g,(()=>{this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderWindow().render()})),this.on_change(p,(()=>{void 0!==this.image_actor_i&&(this.image_actor_i.getMapper().setISlice(this.model.slice_i),this._vtk_renwin.getRenderWindow().render())})),this.on_change(m,(()=>{void 0!==this.image_actor_j&&(this.image_actor_j.getMapper().setJSlice(this.model.slice_j),this._vtk_renwin.getRenderWindow().render())})),this.on_change(u,(()=>{void 0!==this.image_actor_k&&(this.image_actor_k.getMapper().setKSlice(this.model.slice_k),this._vtk_renwin.getRenderWindow().render())})),this.on_change(v,(()=>{this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._vtk_renwin.getRenderWindow().render()})),this.on_change(w,(()=>{this._set_interpolation(this.model.interpolation),this._vtk_renwin.getRenderWindow().render()})),this.on_change(y,(()=>{null!=this._controllerWidget&&this._controllerWidget.setExpanded(this.model.controller_expanded)})),this.on_change(k,(()=>{const e=this.image_actor_i.getProperty().getScalarOpacity();e.get(["nodes"]).nodes[0].y=this.model.nan_opacity,e.modified(),this._vtk_renwin.getRenderWindow().render()}))}render(){this._vtk_renwin=null,this._orientationWidget=null,this._axes=null,super.render(),this._create_orientation_widget(),this._set_axes(),this._vtk_renwin.getRenderer().resetCamera(),Object.keys(this.model.camera).length>0&&this._set_camera_state(),this._get_camera_state()}invalidate_render(){this._vtk_renwin=null,super.invalidate_render()}init_vtk_renwin(){this._vtk_renwin=a.vtkns.FullScreenRenderWindow.newInstance({rootContainer:this.shadow_el,container:this._vtk_container})}plot(){this._controllerWidget=a.vtkns.VolumeController.newInstance({size:[400,150],rescaleColorMap:this.model.rescale}),this._plot_volume(),this._plot_slices(),this._controllerWidget.setupContent(this._vtk_renwin.getRenderWindow(),this.volume,!0),this._controllerWidget.setContainer(this.el),this._controllerWidget.setExpanded(this.model.controller_expanded),this._connect_js_controls(),this._vtk_renwin.getRenderWindow().getInteractor(),this._vtk_renwin.getRenderWindow().getInteractor().setDesiredUpdateRate(45),this._set_volume_visibility(this.model.display_volume),this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._set_interpolation(this.model.interpolation),this._set_camera_state()}get vtk_image_data(){return this._vtk_image_data||(this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data)),this._vtk_image_data}get volume(){return this._vtk_renwin.getRenderer().getVolumes()[0]}get image_actor_i(){return this._vtk_renwin.getRenderer().getActors()[0]}get image_actor_j(){return this._vtk_renwin.getRenderer().getActors()[1]}get image_actor_k(){return this._vtk_renwin.getRenderer().getActors()[2]}get shadow_selector(){return this.el.querySelector(".js-shadow")}get edge_gradient_slider(){return this.el.querySelector(".js-edge")}get sampling_slider(){return this.el.querySelector(".js-spacing")}get colormap_selector(){return this.el.querySelector(".js-color-preset")}_connect_js_controls(){const{el:e}=this._controllerWidget.get("el");if(void 0!==e){e.querySelector(".js-button").addEventListener("click",(()=>this.model.controller_expanded=this._controllerWidget.getExpanded()))}this.colormap_selector.addEventListener("change",(()=>{this.model.colormap=this.colormap_selector.value})),this.model.colormap?this.model.properties.colormap.change.emit():this.model.colormap=this.colormap_selector.value,this.shadow_selector.addEventListener("change",(()=>{this.model.shadow=!!Number(this.shadow_selector.value)})),(this.model.shadow=!!Number(this.shadow_selector.value))&&this.model.properties.shadow.change.emit(),this.sampling_slider.addEventListener("input",(()=>{const e=Number(this.sampling_slider.value);Math.abs(this.model.sampling-e)>=.005&&(this.model.sampling=e)})),Math.abs(this.model.sampling-Number(this.shadow_selector.value))>=.005&&this.model.properties.sampling.change.emit(),this.edge_gradient_slider.addEventListener("input",(()=>{const e=Number(this.edge_gradient_slider.value);Math.abs(this.model.edge_gradient-e)>=.005&&(this.model.edge_gradient=e)})),Math.abs(this.model.edge_gradient-Number(this.edge_gradient_slider.value))>=.005&&this.model.properties.edge_gradient.change.emit()}_plot_slices(){const e=this._vtk_image_data,t=a.vtkns.ImageSlice.newInstance(),i=a.vtkns.ImageSlice.newInstance(),s=a.vtkns.ImageSlice.newInstance(),n=a.vtkns.ImageMapper.newInstance(),r=a.vtkns.ImageMapper.newInstance(),o=a.vtkns.ImageMapper.newInstance();n.setInputData(e),n.setISlice(this.model.slice_i),t.setMapper(n),r.setInputData(e),r.setJSlice(this.model.slice_j),i.setMapper(r),o.setInputData(e),o.setKSlice(this.model.slice_k),s.setMapper(o);const l=a.vtkns.PiecewiseFunction.newInstance(),d=this.volume.getProperty().getRGBTransferFunction(0),_=this.volume.getMapper().getInputData().getPointData().getScalars().getRange();l.removeAllPoints(),l.addPoint(_[0]-1,this.model.nan_opacity),l.addPoint(_[0],1),l.addPoint(_[1],1);const c=t.getProperty();i.setProperty(c),s.setProperty(c),c.setRGBTransferFunction(d),c.setScalarOpacity(l);const h=this._vtk_renwin.getRenderer();h.addActor(t),h.addActor(i),h.addActor(s)}_plot_volume(){const e=this.vtk_image_data,t=a.vtkns.Volume.newInstance(),i=a.vtkns.VolumeMapper.newInstance();t.setMapper(i),i.setInputData(e);const s=(e.getPointData().getScalars()||e.getPointData().getArrays()[0]).getRange(),n=a.vtkns.ColorTransferFunction.newInstance();if(null!=this.model.colormap){const e=a.vtkns.ColorTransferFunction.vtkColorMaps.getPresetByName(this.model.colormap);n.applyColorMap(e)}n.onModified((()=>this.model.mapper=(0,a.vtkLutToMapper)(n)));const r=a.vtkns.PiecewiseFunction.newInstance(),o=.7*Math.sqrt(e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0));i.setSampleDistance(o),t.getProperty().setRGBTransferFunction(0,n),t.getProperty().setScalarOpacity(0,r),t.getProperty().setInterpolationTypeToFastLinear(),t.getProperty().setScalarOpacityUnitDistance(0,a.vtkns.BoundingBox.getDiagonalLength(e.getBounds())/Math.max(...e.getDimensions())),t.getProperty().setGradientOpacityMinimumValue(0,0),t.getProperty().setGradientOpacityMaximumValue(0,.05*(s[1]-s[0])),t.getProperty().setShade(this.model.shadow),t.getProperty().setUseGradientOpacity(0,!0),t.getProperty().setGradientOpacityMinimumOpacity(0,0),t.getProperty().setGradientOpacityMaximumOpacity(0,1),t.getProperty().setAmbient(this.model.ambient),t.getProperty().setDiffuse(this.model.diffuse),t.getProperty().setSpecular(this.model.specular),t.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderer().addVolume(t)}_set_interpolation(e){"fast_linear"==e?(this.volume.getProperty().setInterpolationTypeToFastLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):"linear"==e?(this.volume.getProperty().setInterpolationTypeToLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):(this.volume.getProperty().setInterpolationTypeToNearest(),this.image_actor_i.getProperty().setInterpolationTypeToNearest())}_set_slices_visibility(e){this.image_actor_i.setVisibility(e),this.image_actor_j.setVisibility(e),this.image_actor_k.setVisibility(e)}_set_volume_visibility(e){this.volume.setVisibility(e)}}i.VTKVolumePlotView=l,l.__name__="VTKVolumePlotView";class d extends o.AbstractVTKPlot{constructor(e){super(e)}}i.VTKVolumePlot=d,r=d,d.__name__="VTKVolumePlot",r.prototype.default_view=l,r.define((({Any:e,Array:t,Boolean:i,Int:s,Number:n,String:r,Struct:o})=>({ambient:[n,.2],colormap:[r],data:[e],diffuse:[n,.7],display_slices:[i,!1],display_volume:[i,!0],edge_gradient:[n,.2],interpolation:[a.Interpolation,"fast_linear"],mapper:[o({palette:t(r),low:n,high:n}),{palette:[],low:0,high:0}],nan_opacity:[n,1],render_background:[r,"#52576e"],rescale:[i,!1],sampling:[n,.4],shadow:[i,!0],slice_i:[s,0],slice_j:[s,0],slice_k:[s,0],specular:[n,.3],specular_power:[n,8],controller_expanded:[i,!0]}))),r.override({height:300,width:300})},
269
269
  "a4e5946204": function _(e,t,n,i,r){var s;i();const _=e("@bokehjs/core/util/object"),o=e("99a25e6992"),c=e("b06d05fa3e"),a=e("5e89c7b3eb"),h=e("df9946ff52"),d="panel";class l extends c.AbstractVTKView{initialize(){super.initialize(),this._renderable=!1,this._synchronizer_context=h.vtkns.SynchronizableRenderWindow.getSynchronizerContext(`${d}-{this.model.id}`)}connect_signals(){super.connect_signals();const{arrays:e,scene:t,one_time_reset:n}=this.model.properties;this.on_change([e,t],(0,o.debounce)((()=>{this._vtk_renwin.delete(),this._vtk_renwin=null,this.invalidate_render()}),20)),this.on_change(n,(()=>{this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters()}))}init_vtk_renwin(){this._vtk_renwin=h.vtkns.FullScreenRenderWindowSynchronized.newInstance({rootContainer:this.el,container:this._vtk_container,synchronizerContext:this._synchronizer_context})}remove(){this._vtk_renwin&&this._vtk_renwin.delete(),super.remove()}plot(){this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();const e=(0,_.clone)(this.model.scene);this._sync_plot(e,(()=>this._on_scene_ready())).then((()=>{this._set_camera_state(),this._get_camera_state()}))}_on_scene_ready(){this._renderable=!0,this._camera_callbacks.push(this._vtk_renwin.getRenderer().getActiveCamera().onModified((()=>this._vtk_render()))),this._orientationWidget||this._create_orientation_widget(),this._axes||this._set_axes(),this._vtk_renwin.resize(),this._vtk_render()}_sync_plot(e,t){this._renderable=!1,this._unsubscribe_camera_cb(),this._synchronizer_context.setFetchArrayFunction((e=>Promise.resolve(this.model.arrays[e])));const n=this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);return n&&!this._vtk_renwin.getRenderer()&&this._vtk_renwin.getRenderWindow().addRenderer(n),this._vtk_renwin.getRenderWindow().synchronize(e).then(t)}}n.VTKSynchronizedPlotView=l,l.__name__="VTKSynchronizedPlotView";class v extends c.AbstractVTKPlot{constructor(e){super(e),(0,a.initialize_fullscreen_render)(),this.outline=h.vtkns.OutlineFilter.newInstance();const t=h.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=h.vtkns.Actor.newInstance(),this.outline_actor.setMapper(t)}getActors(e){let t=this.renderer_el.getRenderer().getActors();if(e){const n=this.renderer_el.getSynchronizerContext(d);t=t.filter((t=>{const i=n.getInstanceId(t);return!!i&&i.slice(-16)==e.slice(1,17)}))}return t}}n.VTKSynchronizedPlot=v,s=v,v.__name__="VTKSynchronizedPlot",v.__module__="panel.models.vtk",s.prototype.default_view=l,s.define((({Any:e,Array:t,Boolean:n,Bytes:i,Dict:r,String:s})=>({arrays:[r(i),{}],arrays_processed:[t(s),[]],enable_keybindings:[n,!1],one_time_reset:[n,!1],rebuild:[n,!1],scene:[e,{}]}))),s.override({height:300,width:300})},
270
270
  "5e89c7b3eb": function _(e,n,o,t,r){t(),o.initialize_fullscreen_render=function(){const e={newInstance:window.vtk.macro.newInstance(((e,n,o={})=>{Object.assign(n,l,o),window.vtk.macro.obj(e,n),window.vtk.macro.get(e,n,["renderWindow","openGLRenderWindow","interactor","rootContainer","container","controlContainer","synchronizerContext"]),function(e,n){n.renderWindow=i.vtkns.SynchronizableRenderWindow.newInstance({synchronizerContext:n.synchronizerContext}),n.openGLRenderWindow=i.vtkns.OpenGLRenderWindow.newInstance(),n.openGLRenderWindow.setContainer(n.container),n.renderWindow.addView(n.openGLRenderWindow),n.interactor=i.vtkns.RenderWindowInteractor.newInstance(),n.interactor.setInteractorStyle(i.vtkns.InteractorStyleTrackballCamera.newInstance()),n.interactor.setView(n.openGLRenderWindow),n.interactor.initialize(),n.interactor.bindEvents(n.container),e.getRenderer=()=>n.renderWindow.getRenderers()[0],e.removeController=()=>{const e=n.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=e=>{n.controllerVisibility=e,n.controlContainer&&(n.controlContainer.style.display=e?"block":"none")},e.toggleControllerVisibility=()=>{e.setControllerVisibility(!n.controllerVisibility)},e.addController=o=>{n.controlContainer=document.createElement("div"),(0,i.applyStyle)(n.controlContainer,n.controlPanelStyle||a),n.rootContainer.appendChild(n.controlContainer),n.controlContainer.innerHTML=o,e.setControllerVisibility(n.controllerVisibility),n.rootContainer.addEventListener("keypress",(n=>{"c"===String.fromCharCode(n.charCode)&&e.toggleControllerVisibility()}))},e.delete=window.vtk.macro.chain(e.setContainer,n.openGLRenderWindow.delete,e.delete),e.resize=()=>{const e=n.container.getBoundingClientRect(),o=window.devicePixelRatio||1;n.openGLRenderWindow.setSize(Math.floor(e.width*o),Math.floor(e.height*o)),n.resizeCallback&&n.resizeCallback(e),n.renderWindow.render()},e.setResizeCallback=o=>{n.resizeCallback=o,e.resize()},n.listenWindowResize&&window.addEventListener("resize",e.resize);e.resize()}(e,n)}))};i.vtkns.FullScreenRenderWindowSynchronized=e};const i=e("df9946ff52"),l={containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0,synchronizerContextName:"default"},a={position:"absolute",left:"25px",top:"25px",backgroundColor:"white",borderRadius:"5px",listStyle:"none",padding:"5px 10px",margin:"0",display:"block",border:"solid 1px black",maxWidth:"calc(100vw - 70px)",maxHeight:"calc(100vh - 60px)",overflow:"auto"}},
271
- }, "4e90918c0a", {"index":"4e90918c0a","models/index":"2fe1822b2b","models/ace":"78ccb7a2c5","models/layout":"9b11ce01a3","models/util":"a3669a897a","models/anywidget_component":"1f663ffe94","models/reactive_esm":"d92390e7cb","models/event-to-object":"a572dba9cd","models/html":"4c04683fdc","styles/models/html.css":"9b8139e439","styles/models/esm.css":"727a14f76b","models/audio":"fd59c985b3","models/browser":"5a16cc23e6","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"6c7fbea0ef","models/card":"25fcfb521e","models/column":"b273e5b2fb","styles/models/card.css":"6342ac8e26","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"27a077673d","models/textarea_input":"b7d595d74a","models/comm_manager":"1bec1b1fcc","models/customselect":"92bbd30bd1","models/multiselect":"27b5580835","models/tabulator":"8cfbb15960","models/data":"be689f0377","styles/models/tabulator.css":"3d732ff91f","models/datetime_picker":"100965d6f3","models/datetime_slider":"c97cc0eade","models/deckgl":"01df2ec63b","models/lumagl":"a49afbffe9","models/tooltips":"f8f8ea4284","models/discrete_player":"0dca2cd4f6","models/player":"96e805ccb5","models/echarts":"1da56f3c52","models/feed":"f9c84aaf3d","models/file_download":"84a13dddfb","models/file_dropper":"8531319d94","styles/models/filedropper.css":"c03dd3c931","models/ipywidget":"8a8089cbf3","models/json":"245cd3cfde","models/jsoneditor":"a123a88e31","models/katex":"f672d71a9f","models/location":"bd8e0fe48b","models/mathjax":"d889a68424","models/modal":"8c62aa80d9","styles/models/modal.css":"be4b4352c6","models/pdf":"f87ad1873c","models/perspective":"29a0b0da9a","styles/models/perspective.css":"2e2913ea54","models/plotly":"7d9124b744","styles/models/plotly.css":"3d56c75186","models/progress":"b1f4d68596","models/quill":"f6d86c7342","models/radio_button_group":"25e2d7c208","models/react_component":"d42fdf93ec","models/reactive_html":"d5752cda5a","models/singleselect":"4155401209","models/speech_to_text":"5ac2cab0ab","models/state":"92822cb73a","models/tabs":"fffb4344f7","models/terminal":"a961b5ae5e","models/text_input":"8be416b160","models/text_to_speech":"a04eb51988","models/time_picker":"1afcab4e45","models/toggle_icon":"ad985f285e","models/tooltip_icon":"ae3a172647","models/trend":"29d55a28a9","models/vega":"119dc23765","models/video":"79dc37b888","styles/models/video.css":"dfe21e6f1b","models/videostream":"f8afc4e661","models/vizzu":"1f7bc1f95b","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"ac55912dc1","models/vtk/vtklayout":"b06d05fa3e","models/vtk/util":"df9946ff52","models/vtk/vtkcolorbar":"b1d68776a9","models/vtk/vtkaxes":"0379dcf1cd","models/vtk/vtkvolume":"18592eecef","models/vtk/vtksynchronized":"a4e5946204","models/vtk/panel_fullscreen_renwin_sync":"5e89c7b3eb"}, {});});
271
+ }, "4e90918c0a", {"index":"4e90918c0a","models/index":"2fe1822b2b","models/ace":"78ccb7a2c5","models/layout":"9b11ce01a3","models/util":"a3669a897a","models/anywidget_component":"1f663ffe94","models/reactive_esm":"d92390e7cb","models/event-to-object":"a572dba9cd","models/html":"4c04683fdc","styles/models/html.css":"9b8139e439","styles/models/esm.css":"727a14f76b","models/audio":"fd59c985b3","models/browser":"5a16cc23e6","models/button":"1db93211cd","models/button_icon":"1738ddeb3a","models/icon":"6c7fbea0ef","models/card":"25fcfb521e","models/column":"b273e5b2fb","styles/models/card.css":"6342ac8e26","models/checkbox_button_group":"51fbe9e2d0","models/chatarea_input":"27a077673d","models/textarea_input":"b7d595d74a","models/comm_manager":"1bec1b1fcc","models/customselect":"92bbd30bd1","models/multiselect":"27b5580835","models/tabulator":"5bee7c9df6","models/data":"be689f0377","styles/models/tabulator.css":"3d732ff91f","models/datetime_picker":"100965d6f3","models/datetime_slider":"c97cc0eade","models/deckgl":"01df2ec63b","models/lumagl":"a49afbffe9","models/tooltips":"f8f8ea4284","models/discrete_player":"0dca2cd4f6","models/player":"96e805ccb5","models/echarts":"1da56f3c52","models/feed":"f9c84aaf3d","models/file_download":"84a13dddfb","models/file_dropper":"8531319d94","styles/models/filedropper.css":"c03dd3c931","models/ipywidget":"8a8089cbf3","models/json":"245cd3cfde","models/jsoneditor":"a123a88e31","models/katex":"f672d71a9f","models/location":"bd8e0fe48b","models/mathjax":"d889a68424","models/modal":"8c62aa80d9","styles/models/modal.css":"be4b4352c6","models/pdf":"f87ad1873c","models/perspective":"29a0b0da9a","styles/models/perspective.css":"2e2913ea54","models/plotly":"7d9124b744","styles/models/plotly.css":"3d56c75186","models/progress":"b1f4d68596","models/quill":"f6d86c7342","models/radio_button_group":"25e2d7c208","models/react_component":"d42fdf93ec","models/reactive_html":"d5752cda5a","models/singleselect":"4155401209","models/speech_to_text":"5ac2cab0ab","models/state":"92822cb73a","models/tabs":"fffb4344f7","models/terminal":"a961b5ae5e","models/text_input":"8be416b160","models/text_to_speech":"a04eb51988","models/time_picker":"1afcab4e45","models/toggle_icon":"ad985f285e","models/tooltip_icon":"ae3a172647","models/trend":"29d55a28a9","models/vega":"119dc23765","models/video":"79dc37b888","styles/models/video.css":"dfe21e6f1b","models/videostream":"f8afc4e661","models/vizzu":"1f7bc1f95b","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"ac55912dc1","models/vtk/vtklayout":"b06d05fa3e","models/vtk/util":"df9946ff52","models/vtk/vtkcolorbar":"b1d68776a9","models/vtk/vtkaxes":"0379dcf1cd","models/vtk/vtkvolume":"18592eecef","models/vtk/vtksynchronized":"a4e5946204","models/vtk/panel_fullscreen_renwin_sync":"5e89c7b3eb"}, {});});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holoviz/panel",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "The powerful data exploration & web app framework for Python.",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RKHRZGFMQPSVVCWF</RequestId><HostId>U+OtLhJUoSw2s3dUwJSnNUfDtxn6GPgSl01NdG8HqASv2d9XjKJDvFkCsBxmsRFXl2BXkNwNVI0=</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RKHRE8TT8GMTSDEJ</RequestId><HostId>GqoZHakFRc5IODf3jCNs0lq0QIlZFjKRPPeEqtE6egHYgWZ1crhH0p/bBz1pACd/D1E3ZE+QXMY=</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RKHTNJC6B4WRQCAG</RequestId><HostId>BRlBZBR/ABHeppeD2MXeF9eNcdUpJOafl1fjLyR1iuwLlqyvIkFDwHjBaG6oXERyl0Ni/MHvqa5EFFn6s+CASS/ym4CkUU5ZaDOkkzYRv2w=</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RKHVAJGQJN0QTZWV</RequestId><HostId>cmi9XUFl34NYIP6/z8aGoMckgfcHxGZ6MUSp7kQDQibuGAmn60xQHf68gkyUMX9FIZcatcq+Jxo=</HostId></Error>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RKHPNWT2W5BWHVY0</RequestId><HostId>hfqLomRpqIhDSlU9ilqwISEKJJ60BBTDpzZOyx7iRqwAsYBwXGXX2wddoyJ0gNRmXNIXHDc2QHRpJLJ0OeycoqCqUFY9D24e</HostId></Error>